@charset "UTF-8";
/* ==========================================================================
   Luma / components
   --------------------------------------------------------------------------
   Every reusable piece. Each one is written once and is correct in both colour
   schemes and both directions, because it uses tokens for colour and logical
   properties for position.

   Contents
      1. Card
      2. Button
      3. Icon button
      4. Badge
      5. Avatar
      6. User row and mini card
      7. Form controls
      8. Search
      9. Switch and checkbox
     10. Dropdown
     11. Modal
     12. Toast
     13. Tooltip
     14. Tabs
     15. Alert
     16. Skeleton
     17. Empty and error states
     18. Stories
     19. Composer
     20. Post card
     21. Post media
     22. Widgets
     23. Page states
   ========================================================================== */

/* ==========================================================================
   1. Card
   ========================================================================== */

.lm-card {
  background-color: var(--lm-surface);
  /* A fainter line than a form field's, so a column of cards reads as
     floating sheets rather than as a stack of boxes. */
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-lg);
  box-shadow: var(--lm-shadow-sm);
}

.lm-card--flat   { box-shadow: none; }
.lm-card--raised { box-shadow: var(--lm-shadow-md); }

.lm-card--interactive {
  transition: border-color var(--lm-fast), box-shadow var(--lm-fast);
}

.lm-card--interactive:hover {
  border-color: var(--lm-border-strong);
  box-shadow: var(--lm-shadow-md);
}

.lm-card__header {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4) var(--lm-space-5);
  border-block-end: 1px solid var(--lm-border);
}

.lm-card__title {
  margin: 0;
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-semibold);
}

.lm-card__subtitle {
  margin: 0;
  font-size: var(--lm-text-sm);
  color: var(--lm-muted);
}

.lm-card__body   { padding: var(--lm-space-5); }
.lm-card__body--tight { padding: var(--lm-space-4); }

.lm-card__footer {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4) var(--lm-space-5);
  border-block-start: 1px solid var(--lm-border);
}

/* ==========================================================================
   2. Button
   ========================================================================== */

.lm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--lm-space-2);
  min-block-size: 40px;
  padding-inline: var(--lm-space-5);
  padding-block: var(--lm-space-2);
  border: 1px solid transparent;
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
  font-family: inherit;
  font-size: var(--lm-text-base);
  font-weight: var(--lm-weight-semibold);
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  transition: background-color var(--lm-fast), border-color var(--lm-fast),
              color var(--lm-fast), box-shadow var(--lm-fast), opacity var(--lm-fast);
}

.lm-btn:hover {
  background-color: var(--lm-border);
  color: var(--lm-text);
}

.lm-btn:active   { transform: translateY(0.5px); }

.lm-btn:disabled,
.lm-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.lm-btn svg {
  inline-size: 18px;
  block-size: 18px;
  stroke-width: 2;
}

/* -------------------------------------------------------------- variants */

.lm-btn--primary {
  background-color: var(--lm-primary-strong);
  color: var(--lm-primary-contrast);
  box-shadow: var(--lm-shadow-sm);
}

.lm-btn--primary:hover {
  background-color: var(--lm-primary-strong-hover);
  color: var(--lm-primary-contrast);
}

.lm-btn--primary:active { background-color: var(--lm-primary-strong-active); }

.lm-btn--outline {
  background-color: transparent;
  border-color: var(--lm-border-strong);
  color: var(--lm-text);
}

.lm-btn--outline:hover {
  background-color: var(--lm-surface-secondary);
  border-color: var(--lm-muted);
}

.lm-btn--soft {
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
}

.lm-btn--soft:hover {
  background-color: var(--lm-primary-soft-2);
  color: var(--lm-primary-text);
}

.lm-btn--ghost {
  background-color: transparent;
  color: var(--lm-text-secondary);
}

.lm-btn--ghost:hover {
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
}

.lm-btn--danger {
  background-color: var(--lm-danger);
  color: var(--lm-on-danger);
}

.lm-btn--danger:hover {
  background-color: color-mix(in srgb, var(--lm-danger) 86%, var(--lm-text));
  color: var(--lm-on-danger);
}

.lm-btn--link {
  background: none;
  border: 0;
  min-block-size: auto;
  padding-inline: 0;
  color: var(--lm-primary-text);
  font-weight: var(--lm-weight-medium);
}

.lm-btn--link:hover {
  background: none;
  color: var(--lm-primary-hover);
  text-decoration: underline;
}

/* ----------------------------------------------------------------- sizes */

.lm-btn--sm {
  min-block-size: 32px;
  padding-inline: var(--lm-space-3);
  font-size: var(--lm-text-sm);
  border-radius: var(--lm-radius-sm);
}

.lm-btn--sm svg { inline-size: 16px; block-size: 16px; }

.lm-btn--lg {
  min-block-size: 46px;
  padding-inline: var(--lm-space-6);
  font-size: var(--lm-text-md);
}

.lm-btn--block { inline-size: 100%; }
.lm-btn--pill  { border-radius: var(--lm-radius-pill); }

/* --------------------------------------------------------------- loading
   The label is hidden rather than replaced, so the button keeps its width and
   the layout does not shift while a request is in flight.
   ---------------------------------------------------------------------- */

.lm-btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.lm-btn.is-loading > * { visibility: hidden; }

.lm-btn.is-loading::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: 17px;
  block-size: 17px;
  margin-block-start: -8.5px;
  margin-inline-start: -8.5px;
  border: 2px solid currentcolor;
  border-block-start-color: transparent;
  border-radius: 50%;
  color: var(--lm-primary-contrast);
  animation: lm-spin 680ms linear infinite;
}

.lm-btn--outline.is-loading::after,
.lm-btn--ghost.is-loading::after,
.lm-btn--soft.is-loading::after,
.lm-btn:not([class*="--primary"]):not([class*="--danger"]).is-loading::after {
  color: var(--lm-text-secondary);
}

@keyframes lm-spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   3. Icon button
   ========================================================================== */

.lm-icon-btn {
  /* The containing block for a badge. Without this the badge is positioned
     against the viewport and lands in the corner of the window. */
  position: relative;
  display: inline-grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--lm-radius-pill);
  background-color: transparent;
  color: var(--lm-text-secondary);
  transition: background-color var(--lm-fast), color var(--lm-fast);
}

.lm-icon-btn:hover {
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
}

.lm-icon-btn[aria-expanded="true"] {
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
}

.lm-icon-btn svg {
  inline-size: 20px;
  block-size: 20px;
  stroke-width: 1.8;
}

.lm-icon-btn--sm { inline-size: 32px; block-size: 32px; }
.lm-icon-btn--sm svg { inline-size: 17px; block-size: 17px; }

.lm-icon-btn--lg { inline-size: 50px; block-size: 50px; }
.lm-icon-btn--lg svg { inline-size: 22px; block-size: 22px; }

/* A tinted disc behind the glyph, for the controls the reference sets on
   one: the appearance switch in the header and the "more" button on a
   profile. */
.lm-icon-btn--soft {
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
}

.lm-icon-btn--soft:hover {
  background-color: var(--lm-sunken);
}

/* A count sitting on a bell or an envelope. */
.lm-icon-btn__dot {
  position: absolute;
  inset-block-start: 6px;
  inset-inline-end: 6px;
  min-inline-size: 16px;
  block-size: 16px;
  padding-inline: 4px;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-primary-strong);
  color: var(--lm-primary-contrast);
  font-size: 10px;
  font-weight: var(--lm-weight-bold);
  line-height: 16px;
  text-align: center;
  border: 2px solid var(--lm-surface);
  box-sizing: content-box;
}

/* With no number in it the badge is only saying "there is something", so it
   shrinks to a dot rather than sitting there as an empty pill. */
.lm-icon-btn__dot:empty {
  min-inline-size: 0;
  inline-size: 7px;
  block-size: 7px;
  padding-inline: 0;
  /* Tucked into the corner of the button, clear of the 20px glyph centred in
     it. At 8px inset the dot sat on the bell rather than beside it. */
  inset-block-start: 6px;
  inset-inline-end: 6px;
}

/* The avatar trigger has no padding of its own; the avatar fills it. */
.lm-icon-btn--avatar {
  inline-size: 34px;
  block-size: 34px;
  margin-inline-start: var(--lm-space-1);
}

.lm-icon-btn--avatar:hover {
  background-color: transparent;
  box-shadow: 0 0 0 2px var(--lm-primary-soft-2);
}

.lm-icon-btn--avatar[aria-expanded="true"] {
  background-color: transparent;
  box-shadow: 0 0 0 2px var(--lm-primary);
}

/* ==========================================================================
   4. Badge
   ========================================================================== */

.lm-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-1);
  padding-inline: var(--lm-space-2);
  padding-block: 2px;
  border-radius: var(--lm-radius-xs);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-medium);
  white-space: nowrap;
}

.lm-badge--primary { background-color: var(--lm-primary-soft); color: var(--lm-primary-text); }
.lm-badge--success { background-color: var(--lm-success-soft); color: var(--lm-success-text); }
.lm-badge--warning { background-color: var(--lm-warning-soft); color: var(--lm-warning-text); }
.lm-badge--danger  { background-color: var(--lm-danger-soft);  color: var(--lm-danger-text); }

/* A filled coral disc carrying a small number. Used for unread counts in the
   navigation, where the reference uses a solid dot rather than a soft pill:
   a count is a fact that wants to be noticed, unlike a label. */
.lm-count {
  display: inline-grid;
  place-items: center;
  min-inline-size: 22px;
  block-size: 22px;
  padding-inline: 6px;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-primary-strong);
  color: var(--lm-on-primary);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-bold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.lm-badge--count {
  min-inline-size: 20px;
  justify-content: center;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-primary-strong);
  color: var(--lm-primary-contrast);
  font-weight: var(--lm-weight-bold);
}

/* The tick beside a confirmed account. Blue, not coral: the reference keeps
   the brand colour for actions and gives the mark its own hue, so it never
   reads as a button. It is a shape, so the text contrast rule does not apply. */
.lm-verified {
  display: inline-grid;
  place-items: center;
  inline-size: 16px;
  block-size: 16px;
  color: var(--lm-info);
  flex-shrink: 0;
}

.lm-verified svg { inline-size: 16px; block-size: 16px; }

/* ==========================================================================
   5. Avatar
   ========================================================================== */

.lm-avatar {
  display: inline-grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: 50%;
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
  font-size: var(--lm-text-base);
  font-weight: var(--lm-weight-semibold);
  overflow: hidden;
  flex-shrink: 0;
  user-select: none;
}

.lm-avatar img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.lm-avatar--xs { inline-size: 26px; block-size: 26px; font-size: var(--lm-text-xs); }
.lm-avatar--sm { inline-size: 32px; block-size: 32px; font-size: var(--lm-text-sm); }
.lm-avatar--lg { inline-size: 52px; block-size: 52px; font-size: var(--lm-text-lg); }
.lm-avatar--xl { inline-size: 84px; block-size: 84px; font-size: var(--lm-text-2xl); }

/* Six tones, so a column of letter avatars reads as a set of distinct people
   rather than one repeated shape. The hues are muted on purpose: an avatar is
   an identifier, not a call to action, and it must not outshout the coral.
   Each tone declares its own text colour, because a tint that works behind
   dark text in light mode is a shade that needs light text in dark mode. */
.lm-avatar--tone-1 { background-color: var(--lm-tone-1-bg); color: var(--lm-tone-1-fg); }
.lm-avatar--tone-2 { background-color: var(--lm-tone-2-bg); color: var(--lm-tone-2-fg); }
.lm-avatar--tone-3 { background-color: var(--lm-tone-3-bg); color: var(--lm-tone-3-fg); }
.lm-avatar--tone-4 { background-color: var(--lm-tone-4-bg); color: var(--lm-tone-4-fg); }
.lm-avatar--tone-5 { background-color: var(--lm-tone-5-bg); color: var(--lm-tone-5-fg); }
.lm-avatar--tone-6 { background-color: var(--lm-tone-6-bg); color: var(--lm-tone-6-fg); }

/* ==========================================================================
   6. User row and mini card
   ========================================================================== */

.lm-user-row {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  min-inline-size: 0;
}

.lm-user-row__body {
  min-inline-size: 0;
  flex: 1 1 auto;
}

.lm-user-row__name {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--lm-text);
  font-size: var(--lm-text-base);
  font-weight: var(--lm-weight-semibold);
  min-inline-size: 0;
}

/* The name line holds the name and, when there is one, the verified mark.
   The name itself truncates; the mark must not, or it disappears first. */
.lm-user-row__name > a,
.lm-user-row__name > span:not(.lm-verified) {
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-user-row__name > .lm-verified { flex-shrink: 0; }

.lm-user-row__name > a:hover,
a.lm-user-row__name:hover { color: var(--lm-primary-text); }

.lm-user-row__meta {
  display: block;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-user-row__action { flex-shrink: 0; }

/* The signed-in person at the foot of the navigation. */
.lm-user-card {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  inline-size: 100%;
  padding: var(--lm-space-2);
  border: 0;
  border-radius: var(--lm-radius-md);
  background-color: transparent;
  text-align: start;
  transition: background-color var(--lm-fast);
}

.lm-user-card:hover { background-color: var(--lm-surface); }

.lm-user-card__chevron {
  margin-inline-start: auto;
  color: var(--lm-muted);
  flex-shrink: 0;
}

.lm-user-card__chevron svg { inline-size: 16px; block-size: 16px; }

/* ==========================================================================
   7. Form controls
   ========================================================================== */

.lm-field {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  margin-block-end: var(--lm-space-4);
}

.lm-label {
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-medium);
  color: var(--lm-text);
}

.lm-label__optional {
  font-weight: var(--lm-weight-regular);
  color: var(--lm-subtle);
}

.lm-input,
.lm-textarea,
.lm-select {
  inline-size: 100%;
  min-block-size: 44px;
  padding-inline: var(--lm-space-4);
  padding-block: var(--lm-space-3);
  background-color: var(--lm-surface);
  border: 1px solid var(--lm-border-strong);
  border-radius: var(--lm-radius-md);
  color: var(--lm-text);
  font-size: var(--lm-text-base);
  line-height: 1.4;
  transition: border-color var(--lm-fast), box-shadow var(--lm-fast),
              background-color var(--lm-fast);
}

.lm-input::placeholder,
.lm-textarea::placeholder { color: var(--lm-subtle); }

.lm-input:focus,
.lm-textarea:focus,
.lm-select:focus {
  outline: none;
  border-color: var(--lm-primary);
  box-shadow: 0 0 0 3px var(--lm-focus-ring);
}

/* WCAG exempts a disabled control from the contrast rule. The exemption is
   not needed here: --lm-subtle measures 4.09:1 on this field, --lm-muted
   measures 4.66:1, and the grey fill, the cursor and the missing focus ring
   all still say disabled. */
.lm-input:disabled,
.lm-textarea:disabled,
.lm-select:disabled {
  background-color: var(--lm-surface-secondary);
  color: var(--lm-muted);
  cursor: not-allowed;
}

.lm-input.is-invalid,
.lm-textarea.is-invalid,
.lm-select.is-invalid { border-color: var(--lm-danger); }

.lm-input.is-invalid:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lm-danger) 25%, transparent);
}

.lm-textarea {
  min-block-size: 96px;
  resize: vertical;
}

/* The arrow sits on the inline end, so it moves to the left in Arabic. */
.lm-select {
  appearance: none;
  padding-inline-end: var(--lm-space-10);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238a8a96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--lm-space-3) center;
  background-size: 20px;
}

html[dir="rtl"] .lm-select {
  background-position: left var(--lm-space-3) center;
}

.lm-help       { font-size: var(--lm-text-sm); color: var(--lm-muted); }
.lm-error-text { font-size: var(--lm-text-sm); color: var(--lm-danger); }

/* -------------------------------------------------------- password field */

.lm-password {
  position: relative;
  display: flex;
  align-items: center;
}

.lm-password__input {
  padding-inline-end: calc(var(--lm-space-10) + var(--lm-space-2));
}

.lm-password__toggle {
  position: absolute;
  inset-inline-end: var(--lm-space-2);
  display: inline-grid;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  padding: 0;
  border: 0;
  border-radius: var(--lm-radius-sm);
  background-color: transparent;
  color: var(--lm-subtle);
  transition: background-color var(--lm-fast), color var(--lm-fast);
}

.lm-password__toggle:hover {
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
}

.lm-password__toggle svg { inline-size: 19px; block-size: 19px; }

.lm-password__toggle .lm-password__icon-hide,
.lm-password__toggle.is-revealed .lm-password__icon-show { display: none; }

.lm-password__toggle.is-revealed .lm-password__icon-hide { display: block; }

/* ==========================================================================
   8. Search
   ========================================================================== */

.lm-search {
  position: relative;
  display: flex;
  align-items: center;
  inline-size: 100%;
  max-inline-size: 460px;
}

.lm-search__icon {
  position: absolute;
  inset-inline-start: var(--lm-space-3);
  inline-size: 18px;
  block-size: 18px;
  color: var(--lm-muted);
  pointer-events: none;
}

.lm-search__input {
  inline-size: 100%;
  min-block-size: 40px;
  padding-inline-start: var(--lm-space-10);
  padding-inline-end: var(--lm-space-4);
  padding-block: var(--lm-space-2);
  background-color: var(--lm-surface-secondary);
  border: 1px solid transparent;
  border-radius: var(--lm-radius-pill);
  color: var(--lm-text);
  font-size: var(--lm-text-base);
  transition: background-color var(--lm-fast), border-color var(--lm-fast),
              box-shadow var(--lm-fast);
}

.lm-search__input::placeholder { color: var(--lm-muted); }

.lm-search__input:focus {
  outline: none;
  background-color: var(--lm-surface);
  border-color: var(--lm-primary);
  box-shadow: 0 0 0 3px var(--lm-focus-ring);
}

/* ------------------------------------------------------------ language pill
   The language switch in the header shows its code, so a reader can tell
   which language is active without opening the menu.
   -------------------------------------------------------------------- */

.lm-lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-block-size: 40px;
  padding-inline: var(--lm-space-3) var(--lm-space-2);
  border: 0;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
  font-size: var(--lm-text-base);
  font-weight: var(--lm-weight-semibold);
  transition: background-color var(--lm-fast);
}

.lm-lang-pill:hover,
.lm-lang-pill[aria-expanded="true"] {
  background-color: var(--lm-sunken);
}

.lm-lang-pill > svg { inline-size: 18px; block-size: 18px; }

/* A language code is Latin whatever the page direction. */
.lm-lang-pill__code {
  font-family: var(--lm-font);
  direction: ltr;
  unicode-bidi: isolate;
  letter-spacing: 0.02em;
}

.lm-lang-pill__chevron {
  display: inline-flex;
  color: var(--lm-muted);
}

.lm-lang-pill__chevron svg { inline-size: 14px; block-size: 14px; }

/* The hairline between the notification icons and the account controls. */
.lm-header__divider {
  inline-size: 1px;
  block-size: 26px;
  margin-inline: var(--lm-space-2);
  background-color: var(--lm-border);
  flex-shrink: 0;
}

/* ==========================================================================
   9. Switch and checkbox
   ========================================================================== */

.lm-check {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  font-size: var(--lm-text-base);
  cursor: pointer;
}

.lm-check input[type="checkbox"],
.lm-check input[type="radio"] {
  inline-size: 18px;
  block-size: 18px;
  margin: 0;
  accent-color: var(--lm-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.lm-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-3);
  cursor: pointer;
}

.lm-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lm-switch__track {
  position: relative;
  inline-size: 42px;
  block-size: 24px;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-border-strong);
  transition: background-color var(--lm-fast);
  flex-shrink: 0;
}

.lm-switch__track::after {
  content: "";
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  inline-size: 18px;
  block-size: 18px;
  border-radius: 50%;
  background-color: var(--lm-switch-knob);
  box-shadow: var(--lm-shadow-sm);
  transition: transform var(--lm-fast);
}

.lm-switch input:checked + .lm-switch__track { background-color: var(--lm-primary); }
.lm-switch input:checked + .lm-switch__track::after { transform: translateX(18px); }
html[dir="rtl"] .lm-switch input:checked + .lm-switch__track::after { transform: translateX(-18px); }

.lm-switch input:focus-visible + .lm-switch__track {
  box-shadow: 0 0 0 3px var(--lm-focus-ring);
}

/* ==========================================================================
   10. Dropdown
   ========================================================================== */

.lm-dropdown { position: relative; }

.lm-dropdown__menu {
  position: absolute;
  inset-block-start: calc(100% + var(--lm-space-2));
  inset-inline-end: 0;
  z-index: var(--lm-z-dropdown);
  min-inline-size: 232px;
  max-inline-size: min(300px, calc(100vw - var(--lm-space-8)));
  padding-block: var(--lm-space-2);
  background-color: var(--lm-surface);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-md);
  box-shadow: var(--lm-shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity var(--lm-fast), transform var(--lm-fast), visibility var(--lm-fast);
}

.lm-dropdown__menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.lm-dropdown__menu--start {
  inset-inline-end: auto;
  inset-inline-start: 0;
  transform-origin: top left;
}

/* Opens upward when there is no room below, set by script. */
.lm-dropdown__menu--up {
  inset-block-start: auto;
  inset-block-end: calc(100% + var(--lm-space-2));
  transform-origin: bottom right;
}

.lm-dropdown__menu--up.lm-dropdown__menu--start {
  transform-origin: bottom left;
}

/* A trigger that fills its column, such as the user card at the foot of the
   navigation, rather than sitting inline. */
.lm-dropdown--block { display: block; }

.lm-dropdown__item {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  inline-size: 100%;
  padding: var(--lm-space-3) var(--lm-space-4);
  border: 0;
  background: none;
  color: var(--lm-text);
  font-size: var(--lm-text-base);
  text-align: start;
  transition: background-color var(--lm-fast);
}

.lm-dropdown__item:hover,
.lm-dropdown__item:focus-visible {
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
}

.lm-dropdown__item.is-active { color: var(--lm-primary-text); font-weight: var(--lm-weight-medium); }

.lm-dropdown__item svg { inline-size: 18px; block-size: 18px; color: var(--lm-muted); }
.lm-dropdown__item.is-active svg { color: var(--lm-primary-text); }

.lm-dropdown__item--danger { color: var(--lm-danger); }
.lm-dropdown__item--danger svg { color: var(--lm-danger); }

.lm-dropdown__divider {
  block-size: 1px;
  margin-block: var(--lm-space-2);
  background-color: var(--lm-border);
}

.lm-dropdown__heading {
  padding: var(--lm-space-2) var(--lm-space-4);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lm-subtle);
}

.lm-dropdown__user {
  display: flex;
  flex-direction: column;
  padding: var(--lm-space-3) var(--lm-space-4);
  border-block-end: 1px solid var(--lm-border);
  margin-block-end: var(--lm-space-2);
  min-inline-size: 0;
}

.lm-dropdown__user-name {
  font-weight: var(--lm-weight-semibold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-dropdown__user-meta {
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A menu entry that has to be a form, because the action it performs must
   not be reachable by a plain link. The form adds no box of its own. */
.lm-dropdown__form { display: contents; }

/* ==========================================================================
   11. Modal
   ========================================================================== */

.lm-modal {
  position: fixed;
  inset: 0;
  z-index: var(--lm-z-modal);
  display: grid;
  place-items: center;
  padding: var(--lm-space-4);
  background-color: var(--lm-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--lm-normal), visibility var(--lm-normal);
}

.lm-modal.is-open { opacity: 1; visibility: visible; }

/* A modal on its way out takes no more clicks: whatever it covered is usable
   the moment it starts to close, not after the fade. */
.lm-modal:not(.is-open) { pointer-events: none; }

.lm-modal__dialog {
  inline-size: 100%;
  max-inline-size: 460px;
  max-block-size: calc(100vh - var(--lm-space-8));
  overflow-y: auto;
  background-color: var(--lm-surface);
  border-radius: var(--lm-radius-lg);
  box-shadow: var(--lm-shadow-xl);
  transform: translateY(12px) scale(0.97);
  transition: transform var(--lm-slow);
}

.lm-modal.is-open .lm-modal__dialog { transform: translateY(0) scale(1); }

.lm-modal__dialog--lg { max-inline-size: 720px; }

.lm-modal__header {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-3);
  padding: var(--lm-space-5) var(--lm-space-5) var(--lm-space-3);
}

.lm-modal__title { margin: 0; font-size: var(--lm-text-lg); }
.lm-modal__close { margin-inline-start: auto; }
.lm-modal__body  { padding: 0 var(--lm-space-5) var(--lm-space-5); }

.lm-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4) var(--lm-space-5);
  border-block-start: 1px solid var(--lm-border);
}

body.lm-modal-open { overflow: hidden; }

/* ==========================================================================
   12. Toast
   ========================================================================== */

.lm-toasts {
  position: fixed;
  inset-block-end: var(--lm-space-5);
  inset-inline-end: var(--lm-space-5);
  z-index: var(--lm-z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  max-inline-size: min(380px, calc(100vw - var(--lm-space-8)));
  pointer-events: none;
}

.lm-toast {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-3) var(--lm-space-4);
  background-color: var(--lm-surface);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-md);
  box-shadow: var(--lm-shadow-xl);
  font-size: var(--lm-text-base);
  pointer-events: auto;
  animation: lm-toast-in 220ms var(--lm-ease-out);
}

.lm-toast.is-leaving { animation: lm-toast-out 160ms var(--lm-ease) forwards; }

.lm-toast__mark {
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background-color: var(--lm-info);
  flex-shrink: 0;
}

.lm-toast--success .lm-toast__mark { background-color: var(--lm-success); }
.lm-toast--error   .lm-toast__mark { background-color: var(--lm-danger); }
.lm-toast--warning .lm-toast__mark { background-color: var(--lm-warning); }

.lm-toast__text { min-inline-size: 0; }

/* Phase 31. One action a toast may offer, such as Undo. */
.lm-toast__action {
  flex-shrink: 0;
  margin-inline-start: auto;
  padding: 2px var(--lm-space-2);
  border: 0;
  border-radius: var(--lm-radius-sm);
  background: none;
  color: var(--lm-primary-text);
  font-weight: var(--lm-weight-semibold);
  cursor: pointer;
}

.lm-toast__action:hover { background-color: var(--lm-primary-soft); }

@keyframes lm-toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes lm-toast-out {
  to { opacity: 0; transform: translateY(6px); }
}

/* ==========================================================================
   13. Tooltip
   --------------------------------------------------------------------------
   Used by the collapsed navigation rail, where the label is not on screen.
   ========================================================================== */

.lm-tooltip {
  position: fixed;
  z-index: var(--lm-z-toast);
  padding: 5px var(--lm-space-3);
  border-radius: var(--lm-radius-xs);
  background-color: var(--lm-text);
  color: var(--lm-background);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-medium);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity var(--lm-fast), transform var(--lm-fast);
}

.lm-tooltip.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   14. Tabs
   ========================================================================== */

.lm-tabs {
  display: flex;
  gap: var(--lm-space-1);
  border-block-end: 1px solid var(--lm-border);
}

.lm-tab {
  position: relative;
  padding: var(--lm-space-3) var(--lm-space-4);
  border: 0;
  background: none;
  color: var(--lm-muted);
  font-size: var(--lm-text-base);
  font-weight: var(--lm-weight-medium);
  transition: color var(--lm-fast);
}

.lm-tab:hover { color: var(--lm-text); }

.lm-tab.is-active { color: var(--lm-primary-text); font-weight: var(--lm-weight-semibold); }

.lm-tab.is-active::after {
  content: "";
  position: absolute;
  inset-inline: var(--lm-space-3);
  inset-block-end: -1px;
  block-size: 2px;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-primary);
}

/* ==========================================================================
   15. Alert
   ========================================================================== */

.lm-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4);
  border: 1px solid transparent;
  border-radius: var(--lm-radius-md);
  font-size: var(--lm-text-base);
}

.lm-alert svg {
  inline-size: 20px;
  block-size: 20px;
  flex-shrink: 0;
  margin-block-start: 1px;
}

/* The border keeps the plain colour — it is a shape, and 3:1 is its bar.
   Only the words move to the deeper one. */
.lm-alert--info    { background-color: var(--lm-info-soft);    border-color: color-mix(in srgb, var(--lm-info) 28%, transparent);    color: var(--lm-info-text); }
.lm-alert--success { background-color: var(--lm-success-soft); border-color: color-mix(in srgb, var(--lm-success) 28%, transparent); color: var(--lm-success-text); }
.lm-alert--warning { background-color: var(--lm-warning-soft); border-color: color-mix(in srgb, var(--lm-warning) 28%, transparent); color: var(--lm-warning-text); }
.lm-alert--error   { background-color: var(--lm-danger-soft);  border-color: color-mix(in srgb, var(--lm-danger) 28%, transparent);  color: var(--lm-danger-text); }

.lm-alert__body  { min-inline-size: 0; }
.lm-alert__title { margin: 0 0 var(--lm-space-1); font-size: var(--lm-text-base); font-weight: var(--lm-weight-semibold); color: inherit; }
.lm-alert p      { margin: 0; color: inherit; }

/* ==========================================================================
   16. Skeleton
   ========================================================================== */

.lm-skeleton {
  background: linear-gradient(
    90deg,
    var(--lm-surface-secondary) 25%,
    var(--lm-border) 37%,
    var(--lm-surface-secondary) 63%
  );
  background-size: 400% 100%;
  border-radius: var(--lm-radius-xs);
  animation: lm-shimmer 1.4s ease infinite;
}

.lm-skeleton--text   { block-size: 12px; margin-block: 6px; }
.lm-skeleton--title  { block-size: 16px; inline-size: 40%; }
.lm-skeleton--avatar { inline-size: 40px; block-size: 40px; border-radius: 50%; }
.lm-skeleton--media  { block-size: 220px; border-radius: var(--lm-radius-md); }

@keyframes lm-shimmer {
  from { background-position: 100% 50%; }
  to   { background-position: 0 50%; }
}

.lm-skeleton-post {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
  padding: var(--lm-space-5);
}

.lm-skeleton-post__head {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
}

/* ==========================================================================
   17. Empty and error states
   ========================================================================== */

.lm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-12) var(--lm-space-5);
  text-align: center;
}

.lm-empty__icon {
  display: grid;
  place-items: center;
  inline-size: 56px;
  block-size: 56px;
  border-radius: 50%;
  background-color: var(--lm-surface-secondary);
  color: var(--lm-muted);
}

.lm-empty__icon svg { inline-size: 26px; block-size: 26px; }

.lm-empty__title { margin: 0; font-size: var(--lm-text-md); }
.lm-empty__text  { margin: 0; max-inline-size: 38ch; color: var(--lm-muted); }

.lm-empty--error .lm-empty__icon { background-color: var(--lm-danger-soft); color: var(--lm-danger-text); }

/* ==========================================================================
   18. Stories
   --------------------------------------------------------------------------
   Rounded upright thumbnails with the name beneath, not rings around circular
   avatars. A circle can only show a face; a tall tile shows the moment, which
   is what a story actually is. Luma's own touch is that unseen is marked by a
   coral hairline around the tile rather than by a thick gradient ring, so a
   full rail reads as calm.
   ========================================================================== */

.lm-stories__head {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-3) var(--lm-space-5) var(--lm-space-1);
}

.lm-stories__title {
  margin: 0;
  font-size: var(--lm-text-lg);
  font-weight: var(--lm-weight-semibold);
}

.lm-stories__more {
  margin-inline-start: auto;
}

.lm-stories {
  padding-block-end: var(--lm-space-2);
}

.lm-stories__track {
  /* One tile's size, set here and changed per width in responsive.css: the
     tile, and the "add another" button that sits on its lower corner, both
     read it. Portrait, because a story is. */
  --lm-story-w: 100px;
  --lm-story-h: 160px;

  display: flex;
  align-items: stretch;
  /* The ring around a tile is drawn 5px outside it, so the gap is two rings
     plus the space that should show between them. */
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
  scrollbar-width: none;
  padding-inline: var(--lm-space-5);
  /* Room for the ring around your own story, which is drawn outside its
     tile and would otherwise be clipped by the scroll box. */
  padding-block: 6px;
}

.lm-stories__track::-webkit-scrollbar { display: none; }

.lm-story {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--lm-space-2);
  inline-size: var(--lm-story-w);
  flex-shrink: 0;
  scroll-snap-align: start;
  text-align: center;
  /* Every tile is a button, so the element defaults are cleared here rather
     than on each one. */
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}

.lm-story__tile {
  position: relative;
  display: block;
  inline-size: 100%;
  block-size: var(--lm-story-h);
  border-radius: 14px;
  overflow: hidden;
  background-color: var(--lm-surface-secondary);
  transition: transform var(--lm-fast), box-shadow var(--lm-fast);
}

.lm-story:hover .lm-story__tile {
  transform: translateY(-2px);
  box-shadow: var(--lm-shadow-md);
}

/* A hairline inside every tile, so a pale picture still has an edge. The
   reference draws no unseen ring; the one ring in the rail marks your own
   story below. */
.lm-story__tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--lm-border);
  pointer-events: none;
}

/* Your own story: a coral ring drawn outside the tile with a white gap, as
   the reference sets it. */
.lm-story--own .lm-story__tile {
  box-shadow: 0 0 0 3px var(--lm-surface), 0 0 0 5px var(--lm-primary);
}

.lm-story--own:hover .lm-story__tile {
  box-shadow: 0 0 0 3px var(--lm-surface), 0 0 0 5px var(--lm-primary);
}

.lm-story__tile img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

/* The face of whoever posted, tucked into the end corner of the tile, where
   the reference puts its badge. */
.lm-story__face {
  position: absolute;
  inset-block-end: 6px;
  inset-inline-end: 6px;
  border: 2px solid var(--lm-surface);
  border-radius: 50%;
}

.lm-story__name {
  inline-size: 100%;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-medium);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The tile that starts a story. The whole button is the grey box and the
   label sits inside it under the plus, so it stands as tall as a tile and
   its name together. */
.lm-story--create {
  justify-content: center;
  gap: var(--lm-space-3);
  padding-block: var(--lm-space-3);
  border-radius: 14px;
  background-color: var(--lm-sunken);
  transition: background-color var(--lm-fast);
}

.lm-story--create:hover {
  background-color: var(--lm-surface-secondary);
}

.lm-story--create .lm-story__tile {
  display: grid;
  place-items: center;
  inline-size: auto;
  block-size: auto;
  background: none;
}

.lm-story--create:hover .lm-story__tile {
  transform: none;
  box-shadow: none;
}

.lm-story--create .lm-story__tile::after {
  box-shadow: none;
}

.lm-story__plus {
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: 50%;
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
}

.lm-story__plus svg { inline-size: 20px; block-size: 20px; }

/* -- Phase 15: the real tray ------------------------------------------------ */

/* Each place in the tray is a slot: the tile, and for your own stories a
   small "add another" beside it — two buttons, never one inside the other.
   A flex box, so the "Add story" box stands as tall as a tile and its name. */
.lm-story__slot {
  position: relative;
  display: flex;
  flex-shrink: 0;
  scroll-snap-align: start;
}

/* Something not yet seen: the coral ring. Everything seen: a quiet one. */
.lm-story--unseen .lm-story__tile,
.lm-story--unseen:hover .lm-story__tile {
  box-shadow: 0 0 0 3px var(--lm-surface), 0 0 0 5px var(--lm-primary);
}

.lm-story--seen .lm-story__tile,
.lm-story--seen:hover .lm-story__tile {
  box-shadow: 0 0 0 3px var(--lm-surface), 0 0 0 4px var(--lm-border-strong);
}

.lm-story__add {
  position: absolute;
  inset-block-start: calc(var(--lm-story-h) - 32px);
  inset-inline-start: 8px;
  display: grid;
  place-items: center;
  inline-size: 28px;
  block-size: 28px;
  padding: 0;
  border: 2px solid var(--lm-surface);
  border-radius: 50%;
  background-color: var(--lm-primary-strong);
  color: var(--lm-on-primary);
  box-shadow: var(--lm-shadow-sm);
}

.lm-story__add svg { inline-size: 16px; block-size: 16px; }

.lm-story__add:focus-visible {
  outline: 2px solid var(--lm-primary);
  outline-offset: 2px;
}

/* ==========================================================================
   19. Composer (Phase 37.1.1: the invitation)
   --------------------------------------------------------------------------
   Collapsed, the card is only an invitation: the reader's picture beside a
   pill in their name, and under a hairline the three most-used parts as
   labelled buttons — the shape of the reference product. The form itself
   opens as a dialog (section 38).
   ========================================================================== */

.lm-composer__row {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4) var(--lm-space-5) var(--lm-space-3);
}

.lm-composer__row > .lm-avatar {
  inline-size: 44px;
  block-size: 44px;
  font-size: var(--lm-text-md);
  flex-shrink: 0;
}

.lm-composer__prompt {
  flex: 1 1 auto;
  min-inline-size: 0;
  min-block-size: 44px;
  padding-inline: var(--lm-space-5);
  padding-block: var(--lm-space-2);
  border: 0;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-muted);
  font-size: var(--lm-text-md);
  text-align: start;
  transition: background-color var(--lm-fast);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-composer__prompt:hover {
  background-color: var(--lm-sunken);
}

/* The quick parts: transparent buttons with a coloured icon and a visible
   word each, sharing one row under a hairline. */
.lm-composer__actions {
  display: flex;
  align-items: stretch;
  gap: var(--lm-space-1);
  margin: 0 var(--lm-space-4);
  padding-block: var(--lm-space-1);
  border-block-start: 1px solid var(--lm-card-border);
}

.lm-composer__action {
  flex: 1 1 0;
  min-inline-size: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--lm-space-2);
  min-block-size: 42px;
  padding: 0 var(--lm-space-2);
  border: 0;
  border-radius: var(--lm-radius-sm);
  background-color: transparent;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  transition: background-color var(--lm-fast);
}

.lm-composer__action:hover {
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
}

.lm-composer__action svg { inline-size: 22px; block-size: 22px; flex-shrink: 0; }

.lm-composer__action-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The icons carry the reference's colours; the words stay neutral. */
.lm-composer__action--photos { background-color: transparent; color: var(--lm-text-secondary); }
.lm-composer__action--activity { background-color: transparent; color: var(--lm-text-secondary); }
.lm-composer__action--photos svg { color: var(--lm-success-text); }
.lm-composer__action--video svg { color: var(--lm-primary-text); }
.lm-composer__action--activity svg { color: var(--lm-warning-text); }

.lm-composer__action--video,
.lm-composer__action--video:hover {
  background-color: transparent;
  color: var(--lm-text-secondary);
}

.lm-composer__action--video:hover,
.lm-composer__action--photos:hover,
.lm-composer__action--activity:hover {
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
}

/* ==========================================================================
   20. Post card
   --------------------------------------------------------------------------
   The shape every feed reader already knows. A post is not the place to be
   original: portrait and name at the top, the words, the picture edge to
   edge, a summary line, three equal buttons, and the box to answer in.
   ========================================================================== */

.lm-post {
  /* NO overflow: hidden here. The card clipped everything past its edges,
     which included its own menu: opened on a short post the menu was cut
     off at the card's bottom edge, and on the reader's own post the items
     below the fold — edit, delete — were simply not there. The picture
     edge to edge never needed it: .lm-media clips its own corners. */
  overflow: visible;
}

.lm-post__header {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4) var(--lm-space-4) var(--lm-space-2);
}

.lm-post__avatar {
  display: inline-flex;
  flex-shrink: 0;
}

.lm-post__header > .lm-post__avatar .lm-avatar {
  inline-size: 40px;
  block-size: 40px;
  font-size: var(--lm-text-md);
}

.lm-post__author {
  min-inline-size: 0;
  flex: 1 1 auto;
}

/* Name on the first line, the rest on the second: the eye finds the name
   and the time without reading anything else. */
.lm-post__name {
  display: flex;
  align-items: center;
  gap: 5px;
  min-inline-size: 0;
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-semibold);
  line-height: 1.3;
}

.lm-post__name a {
  color: var(--lm-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-post__name a:hover { text-decoration: underline; }

.lm-post__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-block-start: 1px;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
  line-height: 1.3;
}

.lm-post__meta svg { inline-size: 12px; block-size: 12px; }

.lm-post__dot {
  inline-size: 2px;
  block-size: 2px;
  border-radius: 50%;
  background-color: var(--lm-subtle);
  flex-shrink: 0;
}

.lm-post__privacy {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.lm-post__time { color: inherit; }
.lm-post__time:hover { text-decoration: underline; }

.lm-post__edited { font-style: italic; }

.lm-post__menu { flex-shrink: 0; margin-inline-start: auto; }

.lm-post__body {
  padding: var(--lm-space-1) var(--lm-space-4) var(--lm-space-3);
  font-size: var(--lm-text-md);
  line-height: var(--lm-leading);
  color: var(--lm-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.lm-post__body a { font-weight: var(--lm-weight-medium); }

/* A post being deleted fades rather than vanishing, so the list does not
   appear to jump on its own. */
.lm-post.is-removing {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity var(--lm-normal), transform var(--lm-normal);
  pointer-events: none;
}

.lm-post-back {
  align-self: flex-start;
}

/* ==========================================================================
   21. Post media
   --------------------------------------------------------------------------
   Edge to edge, in the picture's own proportions. The first build inset the
   picture and cut it to a wide band, which turned a telephone photograph
   into a strip of someone's forehead. A picture is the content; the card
   gives it the whole width and does not decide what it is of.

   The width and height attributes on the img reserve the box before a byte
   arrives, which is what stops the feed jumping as pictures load. Very tall
   pictures are capped and cropped rather than allowed to fill three screens.
   ========================================================================== */

.lm-media {
  display: grid;
  gap: 2px;
  margin: 0;
  background-color: var(--lm-surface-secondary);
  overflow: hidden;
}

.lm-media__item {
  position: relative;
  display: block;
  inline-size: 100%;
  overflow: hidden;
  background-color: var(--lm-surface-secondary);
}

.lm-media__item img {
  inline-size: 100%;
  block-size: auto;
  display: block;
}

.lm-media--1 { grid-template-columns: 1fr; }

/* One picture (Phase 38.0.3, the owner's rule): across the card's whole
   width, ALWAYS — never bars at its sides — in a box of its own shape up
   to 4:5 and never taller than 620px (the height the feed always had): a
   tall or square photograph fills that box, trimmed from its middle, so
   the post stays about the size of a two-picture one. Pressing it opens
   the viewer, where it is whole at its own size. The tile's width is
   definite (inline-size: 100%), so the height cap cannot narrow it. */
.lm-media--1 .lm-media__item { max-block-size: 620px; }

.lm-media--1 .lm-media__item img {
  block-size: 100%;
  object-fit: cover;
}

.lm-media--2 { grid-template-columns: 1fr 1fr; }
.lm-media--2 .lm-media__item { aspect-ratio: 1 / 1; }
.lm-media--2 .lm-media__item img { block-size: 100%; object-fit: cover; }

.lm-media--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.lm-media--3 .lm-media__item:first-child { grid-row: span 2; }
.lm-media--3 .lm-media__item { aspect-ratio: 4 / 3; }
.lm-media--3 .lm-media__item:first-child { aspect-ratio: auto; }
.lm-media--3 .lm-media__item img { block-size: 100%; object-fit: cover; }

.lm-media--4 { grid-template-columns: 1fr 1fr; }
.lm-media--4 .lm-media__item { aspect-ratio: 4 / 3; }
.lm-media--4 .lm-media__item img { block-size: 100%; object-fit: cover; }

/* Phase 38.0.1. A group arranged by its pictures' own shapes
   (components/post-media picks the modifier from their sizes). */

/* Two wide ones: stacked, each (nearly) its own shape — an inline
   aspect-ratio from its size, held between 6:5 and 5:2. */
.lm-media--2.lm-media--rows { grid-template-columns: 1fr; }

/* Two tall ones: side by side, and taller than square. */
.lm-media--2.lm-media--tall .lm-media__item { aspect-ratio: 4 / 5; }

/* Three or four, the first wide: it goes across the top. */
.lm-media--3.lm-media--top { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
.lm-media--3.lm-media--top .lm-media__item { aspect-ratio: 1 / 1; }
.lm-media--3.lm-media--top .lm-media__item:first-child { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }

.lm-media--4.lm-media--top { grid-template-columns: repeat(3, 1fr); }
.lm-media--4.lm-media--top .lm-media__item { aspect-ratio: 1 / 1; }
.lm-media--4.lm-media--top .lm-media__item:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }

/* Four, the first tall: it goes down the side, the others beside it. */
.lm-media--4.lm-media--side { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(3, minmax(0, 1fr)); }
.lm-media--4.lm-media--side .lm-media__item { aspect-ratio: auto; }
.lm-media--4.lm-media--side .lm-media__item:first-child { grid-row: 1 / span 3; aspect-ratio: 3 / 4; }
/* The pictures fill their tiles without sizing them: the first tile's shape
   decides the height, the three beside it share it. */
.lm-media--4.lm-media--side .lm-media__item img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; }

.lm-media__more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-color: var(--lm-overlay);
  color: var(--lm-on-scrim);
  font-size: var(--lm-text-2xl);
  font-weight: var(--lm-weight-bold);
}

.lm-media__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.lm-media__play span {
  display: grid;
  place-items: center;
  inline-size: 56px;
  block-size: 56px;
  border-radius: 50%;
  background-color: var(--lm-overlay);
  color: var(--lm-on-scrim);
  backdrop-filter: blur(4px);
}

.lm-media__play svg { inline-size: 24px; block-size: 24px; fill: currentColor; stroke: none; }

/* ------------------------------------------------------------- summary
   Who reacted and how many answered, on one quiet line above the buttons.
   Left out entirely when there is nothing to say.
   -------------------------------------------------------------------- */

.lm-post__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lm-space-3);
  min-block-size: 36px;
  padding: var(--lm-space-2) var(--lm-space-4) 0;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
}

.lm-post__summary--empty {
  min-block-size: 0;
  padding-block: 0;
}

.lm-post__reactions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lm-post__summary-count:hover { text-decoration: underline; cursor: default; }

/* The discs overlap a little so three read as one group, each with a ring
   of the card colour so they do not merge. */
.lm-rx-cluster {
  display: inline-flex;
  align-items: center;
}

.lm-rx-cluster__mark {
  inline-size: 18px;
  block-size: 18px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--lm-surface);
}

.lm-rx-cluster__mark + .lm-rx-cluster__mark {
  margin-inline-start: -4px;
}

.lm-post__summary-comments {
  margin-inline-start: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
}

.lm-post__summary-comments:hover { text-decoration: underline; color: var(--lm-text); }

/* ------------------------------------------------------------- actions
   Three equal buttons across the card, each a full third wide, with a
   hairline above. The one arrangement a reader never has to learn.
   -------------------------------------------------------------------- */

.lm-post__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--lm-space-1);
  margin: var(--lm-space-2) var(--lm-space-4) 0;
  padding-block: var(--lm-space-1);
  border-block-start: 1px solid var(--lm-card-border);
}

.lm-post__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--lm-space-2);
  min-inline-size: 0;
  min-block-size: 38px;
  padding-inline: var(--lm-space-2);
  border: 0;
  border-radius: var(--lm-radius-xs);
  background-color: transparent;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-semibold);
  transition: background-color var(--lm-fast), color var(--lm-fast);
}

.lm-post__action:hover {
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
}

.lm-post__action svg { inline-size: 20px; block-size: 20px; flex-shrink: 0; }

.lm-post__action > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The reactor takes one third like its two neighbours. */
.lm-reactor {
  position: relative;
  display: flex;
  min-inline-size: 0;
}

.lm-reactor__main {
  flex: 1 1 auto;
}

/* ------------------------------------------------------------ comments
   The box is always there; the thread appears under it.
   -------------------------------------------------------------------- */

.lm-post__comments {
  margin: var(--lm-space-1) var(--lm-space-4) 0;
  padding: var(--lm-space-3) 0 var(--lm-space-4);
  border-block-start: 1px solid var(--lm-card-border);
}

.lm-post__thread {
  margin-block-start: var(--lm-space-3);
}

.lm-post__thread[hidden] {
  display: none;
}

/* ==========================================================================
   22. Widgets
   ========================================================================== */

/* The icon leads the title, at the reading start, as the reference sets
   every widget heading. */
.lm-widget__header {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-5) var(--lm-space-5) var(--lm-space-2);
}

.lm-widget__header > svg {
  inline-size: 20px;
  block-size: 20px;
  color: var(--lm-text-secondary);
  flex-shrink: 0;
}

.lm-widget__title {
  margin: 0;
  font-size: var(--lm-text-lg);
  font-weight: var(--lm-weight-semibold);
}

.lm-widget__flame {
  display: inline-flex;
  color: var(--lm-primary-text);
  flex-shrink: 0;
}

.lm-widget__flame svg { inline-size: 20px; block-size: 20px; }

/* ----------------------------------------------------------- about a person
   Short facts with an icon each, then the bio as a quotation. Used by the
   contextual column of a profile.
   -------------------------------------------------------------------- */

.lm-widget__facts {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
  margin: 0;
  padding: var(--lm-space-2) var(--lm-space-5) var(--lm-space-4);
  list-style: none;
}

.lm-widget__fact {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  min-inline-size: 0;
  color: var(--lm-text);
  font-size: var(--lm-text-md);
}

.lm-widget__fact > svg {
  inline-size: 18px;
  block-size: 18px;
  color: var(--lm-text-secondary);
  flex-shrink: 0;
}

.lm-widget__fact > span,
.lm-widget__fact > a {
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-widget__quote {
  margin: 0;
  padding: var(--lm-space-4) var(--lm-space-5) var(--lm-space-5);
  border-block-start: 1px solid var(--lm-card-border);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-md);
  line-height: var(--lm-leading);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.lm-widget__quote::before { content: open-quote; }
.lm-widget__quote::after  { content: close-quote; }

.lm-widget__list {
  display: flex;
  flex-direction: column;
}

.lm-widget__row {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-3) var(--lm-space-5);
  transition: background-color var(--lm-fast);
}

/* A hairline between entries rather than a border on each, so the list reads
   as one object. */
.lm-widget__row + .lm-widget__row {
  border-block-start: 1px solid var(--lm-card-border);
}

a.lm-widget__row:hover { background-color: var(--lm-surface-secondary); }

.lm-widget__footer {
  padding: var(--lm-space-2) var(--lm-space-5) var(--lm-space-4);
}

.lm-widget__footer .lm-btn svg {
  inline-size: 15px;
  block-size: 15px;
}

/* A trending entry: the tag, and the count underneath in a quieter grey.
   The reference drops the rank number, which was only ever decoration. */
.lm-trend { min-inline-size: 0; flex: 1 1 auto; }

.lm-trend__tag {
  display: block;
  color: var(--lm-text);
  font-size: var(--lm-text-base);
  font-weight: var(--lm-weight-semibold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-trend__count {
  display: block;
  margin-block-start: 2px;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
}

/* ------------------------------------------------------------ statistics
   Three figures across one row. Tabular figures and a pinned direction, so
   a column of numbers lines up and reads the same way in both languages.
   -------------------------------------------------------------------- */

.lm-widget__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: var(--lm-space-2) var(--lm-space-4) var(--lm-space-5);
}

.lm-widget__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-inline: var(--lm-space-2);
  text-align: center;
  min-inline-size: 0;
}

.lm-widget__stat + .lm-widget__stat {
  border-inline-start: 1px solid var(--lm-card-border);
}

.lm-widget__stat-value {
  font-size: var(--lm-text-xl);
  font-weight: var(--lm-weight-bold);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}

.lm-widget__stat-label {
  color: var(--lm-muted);
  font-size: var(--lm-text-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-inline-size: 100%;
}

/* ==========================================================================
   23. Page states
   ========================================================================== */

.lm-page-state {
  display: grid;
  place-items: center;
  min-block-size: calc(100vh - var(--lm-header-height));
  padding: var(--lm-space-8) var(--lm-space-4);
  text-align: center;
}

.lm-page-state__code {
  font-size: clamp(3.5rem, 12vw, 6rem);
  font-weight: var(--lm-weight-bold);
  line-height: 1;
  letter-spacing: -0.03em;
  background: var(--lm-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  direction: ltr;
}

.lm-page-state__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--lm-space-4);
  max-inline-size: 42ch;
}

/* ==========================================================================
   24. Table
   --------------------------------------------------------------------------
   Used by the admin panel. text-align: start rather than left, so an Arabic
   table needs no override, and a wrapper takes the horizontal scroll so the
   page itself never scrolls sideways.
   ========================================================================== */

.lm-table-wrap {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-radius: var(--lm-radius-md);
}

.lm-table {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: var(--lm-text-base);
}

.lm-table th,
.lm-table td {
  padding: var(--lm-space-3) var(--lm-space-4);
  text-align: start;
  vertical-align: middle;
  border-block-end: 1px solid var(--lm-border);
}

.lm-table th {
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  /* --lm-muted is measured against a card, and this sits on the sunken field
     instead: 4.38:1 in the dark scheme. A column heading is a heading. */
  color: var(--lm-text-secondary);
  background-color: var(--lm-sunken);
  white-space: nowrap;
}

.lm-table tbody tr {
  transition: background-color var(--lm-fast);
}

.lm-table tbody tr:hover {
  background-color: var(--lm-surface-2);
}

.lm-table tbody tr:last-child td {
  border-block-end: 0;
}

/* ==========================================================================
   25. Stat
   ========================================================================== */

.lm-stat {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-1);
  padding: var(--lm-space-5);
}

.lm-stat__label {
  font-size: var(--lm-text-sm);
  color: var(--lm-muted);
}

/* A figure reads left to right in every language, so it is pinned to ltr and
   given tabular figures to keep a column of them aligned. */
.lm-stat__value {
  font-size: var(--lm-text-2xl);
  font-weight: var(--lm-weight-bold);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  text-align: start;
}

.lm-stat__hint {
  font-size: var(--lm-text-xs);
  color: var(--lm-subtle);
}

/* ==========================================================================
   26. Authentication pages
   --------------------------------------------------------------------------
   Two panels. The form is at the reading-start edge and the visual panel at
   the reading-end, which is the reference design's arrangement and the right
   way round: the form is what the visitor came for.

   The visual panel is drawn, not photographed. The reference uses a
   photograph; Luma has no photograph to use and would need a licence for one,
   so the same warmth is built from the brand gradient and two soft shapes.
   ========================================================================== */

.lm-auth {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-block-size: 100vh;
}

.lm-auth__panel {
  display: flex;
  flex-direction: column;
  padding: var(--lm-space-6) var(--lm-space-8);
  background-color: var(--lm-background);
}

/* The row above the card: appearance, language, and the way to the other
   half of the pair. */
.lm-auth__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2);
  margin-block-end: var(--lm-space-8);
}

/* The way to the other half of the pair. It stays on the row when it fits;
   a longer translation wraps the whole group onto its own row (and, on the
   narrowest phones, the prompt above the button) rather than running off
   the screen. */
.lm-auth__bar-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--lm-space-2);
  margin-inline-start: auto;
  min-inline-size: 0;
  max-inline-size: 100%;
}

.lm-auth__bar-end .lm-btn {
  max-inline-size: 100%;
}

.lm-auth__bar-text {
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
}

.lm-auth__card {
  inline-size: 100%;
  max-inline-size: 520px;
  margin-inline: auto;
  margin-block: auto;
}

.lm-auth__card .lm-card__body {
  padding: var(--lm-space-8);
}

.lm-auth__card-footer {
  max-inline-size: 520px;
  margin-inline: auto;
  margin-block-start: var(--lm-space-5);
}

.lm-auth__legal {
  margin: var(--lm-space-8) 0 0;
  color: var(--lm-subtle);
  font-size: var(--lm-text-xs);
  text-align: center;
}

.lm-auth__title {
  margin: 0 0 var(--lm-space-2);
  font-size: var(--lm-text-3xl);
  font-weight: var(--lm-weight-bold);
  letter-spacing: -0.02em;
  line-height: var(--lm-leading-tight);
}

.lm-auth__subtitle {
  margin: 0 0 var(--lm-space-7);
  color: var(--lm-muted);
  font-size: var(--lm-text-md);
}

.lm-auth__form > .lm-alert {
  margin-block-end: var(--lm-space-4);
}

.lm-auth__options {
  margin-block-end: var(--lm-space-5);
  gap: var(--lm-space-3);
  flex-wrap: wrap;
}

.lm-auth__pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--lm-space-3);
}

.lm-auth__terms {
  align-items: flex-start;
  line-height: var(--lm-leading-snug);
}

.lm-auth__terms input {
  margin-block-start: 2px;
}

/* ------------------------------------------------------------ the visual */

.lm-auth__visual {
  position: relative;
  display: flex;
  align-items: center;
  padding: var(--lm-space-10);
  background: var(--lm-auth-visual);
  overflow: hidden;
  isolation: isolate;
}

/* Two soft shapes, offset from each other, which is what gives the panel
   depth without an image. */
.lm-auth__visual::before,
.lm-auth__visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  z-index: -1;
}

.lm-auth__visual::before {
  inline-size: 56%;
  aspect-ratio: 1;
  inset-block-start: -16%;
  inset-inline-end: -14%;
  background-color: rgb(255 255 255 / 34%);
}

/* Soft enough to be felt rather than seen. At 22% opacity this read as a
   second panel behind the first and cut across the quote at the bottom. */
.lm-auth__visual::after {
  inline-size: 86%;
  aspect-ratio: 1;
  inset-block-end: -46%;
  inset-inline-start: -26%;
  background-color: rgb(217 83 95 / 9%);
}

.lm-auth__visual-inner {
  max-inline-size: 460px;
}

.lm-auth__headline {
  margin: var(--lm-space-8) 0 var(--lm-space-4);
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  font-weight: var(--lm-weight-bold);
  line-height: var(--lm-leading-tight);
  letter-spacing: -0.02em;
}

.lm-auth__blurb {
  margin: 0 0 var(--lm-space-8);
  max-inline-size: 38ch;
  font-size: var(--lm-text-lg);
  color: var(--lm-text-secondary);
}

.lm-auth__points {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-5);
}

.lm-auth__point {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-4);
}

.lm-auth__point-icon {
  display: grid;
  place-items: center;
  inline-size: 46px;
  block-size: 46px;
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface);
  color: var(--lm-primary-text);
  flex-shrink: 0;
  box-shadow: var(--lm-shadow-sm);
}

.lm-auth__point-icon svg { inline-size: 21px; block-size: 21px; }

.lm-auth__point-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-inline-size: 0;
}

.lm-auth__point-body strong {
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-semibold);
}

.lm-auth__point-body span {
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-base);
}

.lm-auth__quote {
  margin: var(--lm-space-10) 0 0;
  padding-inline-start: var(--lm-space-4);
  border-inline-start: 3px solid var(--lm-primary);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-md);
  font-style: italic;
}

/* ==========================================================================
   26b. Segmented control
   --------------------------------------------------------------------------
   Two mutually exclusive destinations shown as one control. Used for the
   sign-in and registration pair, where a tab reads as a choice and two
   separate links read as a navigation problem.
   ========================================================================== */

.lm-segment {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  margin-block-end: var(--lm-space-7);
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-surface-secondary);
}

.lm-segment__item {
  display: grid;
  place-items: center;
  min-block-size: 42px;
  padding-inline: var(--lm-space-4);
  border-radius: var(--lm-radius-pill);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-base);
  font-weight: var(--lm-weight-medium);
  text-align: center;
  transition: background-color var(--lm-fast), color var(--lm-fast);
}

/* A segment item may be a button (a tab that shows, rather than a link that
   goes): no native face. The active style below still wins. */
button.lm-segment__item {
  border: 0;
  background-color: transparent;
  font-family: inherit;
  cursor: pointer;
}

.lm-segment__item:hover { color: var(--lm-text); }

.lm-segment__item.is-active {
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
  font-weight: var(--lm-weight-semibold);
}

/* ==========================================================================
   27. Welcome page
   --------------------------------------------------------------------------
   The signed-out landing page. Same two-panel idea as the auth pages, wider
   headline, no form.
   ========================================================================== */

.lm-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--lm-space-10);
  /* The header sits above this, so a full viewport height would guarantee a
     scrollbar on a screen that could otherwise hold the whole page. */
  min-block-size: calc(100vh - var(--lm-header-height));
  max-inline-size: var(--lm-container);
  margin-inline: auto;
  padding: var(--lm-space-8) var(--lm-space-4);
}

.lm-welcome__headline {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: var(--lm-leading-tight);
  letter-spacing: -0.02em;
  margin-block-end: var(--lm-space-3);
}

.lm-welcome__subhead {
  font-size: var(--lm-text-lg);
  color: var(--lm-muted);
  max-inline-size: 34ch;
}

.lm-welcome__card {
  max-inline-size: 420px;
  margin-inline-start: auto;
}

.lm-welcome__points {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-5);
}

.lm-welcome__point {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-4);
}

.lm-welcome__point-icon {
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
  flex-shrink: 0;
}

.lm-welcome__point-icon svg { inline-size: 20px; block-size: 20px; }

.lm-welcome__point-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-inline-size: 0;
}

/* ==========================================================================
   28. Placeholder media tile
   --------------------------------------------------------------------------
   A gradient stands in for a photograph that does not exist. Used by the
   demo feed, and by any real image that has not loaded, so a post never
   collapses into a grey rectangle.
   ========================================================================== */

.lm-tile {
  position: relative;
  display: block;
  inline-size: 100%;
  block-size: 100%;
  background: var(--lm-tile, linear-gradient(135deg, var(--lm-tone-1-bg), var(--lm-tone-2-bg)));
  overflow: hidden;
}

/* A soft light source in one corner. A flat rectangle of colour reads as an
   empty element; the same rectangle with a highlight reads as a picture that
   has not loaded, which is what it is standing in for. */
.lm-tile::before {
  content: "";
  position: absolute;
  inset-block-start: -30%;
  inset-inline-start: -10%;
  inline-size: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / 55%), transparent 68%);
}

/* And a shadow in the opposite one, so the two ends of the tile differ. */
.lm-tile::after {
  content: "";
  position: absolute;
  inset-block-end: -40%;
  inset-inline-end: -16%;
  inline-size: 84%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(40 20 24 / 16%), transparent 66%);
}

.lm-tile--1 { --lm-tile: linear-gradient(135deg, var(--lm-tone-1-bg), var(--lm-tone-4-bg)); }
.lm-tile--2 { --lm-tile: linear-gradient(160deg, var(--lm-tone-2-bg), var(--lm-tone-6-bg)); }
.lm-tile--3 { --lm-tile: linear-gradient(200deg, var(--lm-tone-3-bg), var(--lm-tone-4-bg)); }
.lm-tile--4 { --lm-tile: linear-gradient(135deg, var(--lm-tone-5-bg), var(--lm-tone-2-bg)); }
.lm-tile--5 { --lm-tile: linear-gradient(120deg, var(--lm-tone-4-bg), var(--lm-tone-1-bg)); }
.lm-tile--6 { --lm-tile: linear-gradient(210deg, var(--lm-tone-6-bg), var(--lm-tone-3-bg)); }
.lm-tile--7 { --lm-tile: linear-gradient(145deg, var(--lm-tone-3-bg), var(--lm-tone-5-bg)); }
.lm-tile--8 { --lm-tile: linear-gradient(170deg, var(--lm-tone-5-bg), var(--lm-tone-1-bg)); }

/* ==========================================================================
   29. Brand
   --------------------------------------------------------------------------
   The mark and the wordmark are separate elements so either can be used
   alone. The tagline is optional and only the sidebar asks for it.
   ========================================================================== */

.lm-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-3);
  color: var(--lm-text);
  min-inline-size: 0;
}

.lm-brand:hover { color: var(--lm-text); }

.lm-mark {
  flex-shrink: 0;
  /* The mark is a gesture, not an icon, so the global svg rule that gives
     every icon a stroke and no fill must not reach it. */
  fill: none;
}

.lm-brand__body {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
}

.lm-brand__text {
  font-size: var(--lm-text-2xl);
  font-weight: var(--lm-weight-bold);
  letter-spacing: -0.03em;
  line-height: 1.1;
  /* Never wraps. Squeezed in a phone header it once broke letter by letter
     into a column beside the mark. */
  white-space: nowrap;
  /* The wordmark is always set in the Latin face, in both languages. A brand
     name is not translated and not transliterated. */
  font-family: var(--lm-font);
  direction: ltr;
  unicode-bidi: isolate;
}

.lm-brand__tagline {
  margin-block-start: 3px;
  color: var(--lm-muted);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-medium);
  line-height: 1.45;
  max-inline-size: 22ch;
}

/* In the header the lockup is smaller and never carries the tagline. */
.lm-brand--sm .lm-brand__text { font-size: var(--lm-text-lg); }

/* In the navigation panel it is the largest thing on the page, with the
   tagline set to wrap under the wordmark. */
.lm-nav .lm-brand__text { font-size: 2rem; }

.lm-nav .lm-brand__tagline {
  margin-block-start: 6px;
  font-size: var(--lm-text-base);
  font-weight: var(--lm-weight-regular);
  max-inline-size: 13ch;
}

/* ==========================================================================
   30. User chip
   --------------------------------------------------------------------------
   The signed-in person in the header. The name is shown rather than an avatar
   alone, because an avatar by itself is a guessing game on an account whose
   picture is a letter.
   ========================================================================== */

.lm-user-chip {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  max-inline-size: 230px;
  padding: 4px;
  padding-inline-end: var(--lm-space-2);
  border: 0;
  border-radius: var(--lm-radius-pill);
  background-color: transparent;
  color: var(--lm-text);
  transition: background-color var(--lm-fast);
}

.lm-user-chip:hover,
.lm-user-chip[aria-expanded="true"] {
  background-color: var(--lm-surface-secondary);
}

.lm-user-chip > .lm-avatar {
  inline-size: 46px;
  block-size: 46px;
  font-size: var(--lm-text-lg);
}

.lm-user-chip__name {
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-semibold);
}

.lm-user-chip__chevron {
  display: inline-flex;
  color: var(--lm-muted);
  flex-shrink: 0;
}

.lm-user-chip__chevron svg { inline-size: 16px; block-size: 16px; }

/* ==========================================================================
   31. Profile header
   --------------------------------------------------------------------------
   Presentation only. Phase 4 wires it to real data; nothing here assumes
   anything about where that data comes from.

   The shape is the reference design's, and two of its anchors are physical:
   the portrait sits at the left of the card and the actions at the right in
   both languages. Everything else is logical. rtl.css reverses the one row
   that needs it.
   ========================================================================== */

.lm-profile { overflow: hidden; }

.lm-profile__cover {
  position: relative;
  block-size: 198px;
  background-color: var(--lm-surface-secondary);
}

.lm-profile__cover .lm-tile {
  position: absolute;
  inset: 0;
}

/* Top-right of the cover in both languages, which is where the reference
   puts it and where every other product puts it. Written as inline-end,
   which is the right in English; rtl.css moves it to inline-start, which is
   the right in Arabic. */
.lm-profile__cover-edit {
  position: absolute;
  inset-block-start: var(--lm-space-5);
  inset-inline-end: var(--lm-space-5);
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  min-block-size: 38px;
  padding-inline: var(--lm-space-4);
  border: 0;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-overlay);
  color: var(--lm-on-scrim);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-medium);
  backdrop-filter: blur(6px);
  transition: background-color var(--lm-fast);
}

.lm-profile__cover-edit:hover {
  background-color: color-mix(in srgb, var(--lm-overlay) 80%, black);
  color: var(--lm-on-scrim);
}

.lm-profile__cover-edit svg { inline-size: 17px; block-size: 17px; }

/* The row under the cover: the portrait, pulled up onto it, and the actions
   at the other end. space-between rather than an auto margin, so the same
   rule holds when rtl.css reverses the row. */
.lm-profile__bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--lm-space-4);
  padding-inline: var(--lm-space-8) var(--lm-space-5);
}

.lm-profile__avatar {
  position: relative;
  flex-shrink: 0;
  /* Half the portrait's height, so it sits astride the cover's edge. */
  margin-block-start: -83px;
}

.lm-profile__avatar .lm-avatar {
  inline-size: 165px;
  block-size: 165px;
  font-size: 3.25rem;
  border: 5px solid var(--lm-surface);
  box-shadow: var(--lm-shadow-md);
}

/* Bottom-right of the portrait in both languages, to match the portrait's
   own physical anchor. Same trick as the cover button: inline-end here,
   inline-start in rtl.css. */
.lm-profile__online {
  position: absolute;
  inset-block-end: 14px;
  inset-inline-end: 14px;
  inline-size: 22px;
  block-size: 22px;
  border-radius: 50%;
  background-color: var(--lm-success);
  border: 3px solid var(--lm-surface);
}

.lm-profile__actions {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding-block-start: var(--lm-space-4);
  flex-wrap: wrap;
}

.lm-profile__body {
  padding: var(--lm-space-2) var(--lm-space-8) var(--lm-space-3);
}

/* Name, handle, bio and facts, centred in a block that sits under the
   portrait. rtl.css pushes the block to the portrait's side of the card. */
.lm-profile__identity {
  max-inline-size: 400px;
  text-align: center;
}

.lm-profile__name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--lm-space-2);
  margin: 0;
  font-size: 1.625rem;
  font-weight: var(--lm-weight-bold);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.lm-profile__name .lm-verified {
  inline-size: 22px;
  block-size: 22px;
}

.lm-profile__name .lm-verified svg {
  inline-size: 22px;
  block-size: 22px;
}

.lm-profile__handle {
  margin: 4px 0 0;
  color: var(--lm-muted);
  font-size: var(--lm-text-md);
}

.lm-profile__bio {
  margin: var(--lm-space-3) 0 0;
  font-size: var(--lm-text-md);
  line-height: var(--lm-leading);
  color: var(--lm-text);
}

.lm-profile__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--lm-space-3) var(--lm-space-5);
  margin-block-start: var(--lm-space-3);
}

.lm-profile__fact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--lm-muted);
  font-size: var(--lm-text-base);
}

.lm-profile__fact svg { inline-size: 17px; block-size: 17px; }

/* Three figures across the card, each a number over its label, with a
   hairline between them. */
.lm-profile__figures {
  display: flex;
  justify-content: center;
  margin: var(--lm-space-3) 0 0;
}

.lm-profile__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-inline-size: 200px;
  padding-block: var(--lm-space-1);
  text-align: center;
}

.lm-profile__figure + .lm-profile__figure {
  border-inline-start: 1px solid var(--lm-card-border);
}

.lm-profile__figure-value {
  margin: 0;
  font-size: var(--lm-text-xl);
  font-weight: var(--lm-weight-bold);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}

.lm-profile__figure-label {
  margin: 0;
  color: var(--lm-muted);
  font-size: var(--lm-text-base);
}

/* The tab strip is its own card under the header, with the four tabs
   spread across it and the active one underlined in coral. */
.lm-tabs-host .lm-tabs {
  gap: 0;
  padding-inline: var(--lm-space-2);
  background-color: var(--lm-surface);
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-lg);
  box-shadow: var(--lm-shadow-sm);
  /* Phase 18: six tabs now (Pages joined). They share the width while their
     words fit, and scroll inside the bar rather than break a word in two —
     "Communities" wrapped mid-word at 1440px with equal-width tabs. */
  overflow-x: auto;
  scrollbar-width: none;
}

.lm-tabs-host .lm-tabs::-webkit-scrollbar { display: none; }

.lm-tabs-host .lm-tab {
  flex: 1 0 auto;
  padding-block: var(--lm-space-3);
  font-size: var(--lm-text-md);
  text-align: center;
  white-space: nowrap;
}

.lm-tabs-host .lm-tab.is-active::after {
  inset-inline: 18%;
  inset-block-end: -1px;
}

/* ==========================================================================
   32. Profile page additions
   --------------------------------------------------------------------------
   The header itself is section 31. These are the parts a real profile needs
   that the design preview never exercised.
   ========================================================================== */

.lm-profile__cover-image {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.lm-profile__website {
  color: var(--lm-primary-text);
}

.lm-profile__website:hover {
  text-decoration: underline;
}

/* A tab panel. Hidden with the attribute rather than a class, so the browser
   takes it out of the accessibility tree and out of find-in-page too. */
.lm-tab-panel {
  padding-block-start: var(--lm-space-4);
}

.lm-tab-panel[hidden] {
  display: none;
}

/* ==========================================================================
   33. About list
   ========================================================================== */

.lm-about {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: var(--lm-space-2) 0;
}

.lm-about__row {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  gap: var(--lm-space-4);
  padding: var(--lm-space-4) var(--lm-space-5);
}

.lm-about__row + .lm-about__row {
  border-block-start: 1px solid var(--lm-card-border);
}

.lm-about__label {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  color: var(--lm-muted);
  font-size: var(--lm-text-base);
}

.lm-about__label svg {
  inline-size: 17px;
  block-size: 17px;
  flex-shrink: 0;
}

.lm-about__value {
  margin: 0;
  color: var(--lm-text);
  font-size: var(--lm-text-md);
  line-height: var(--lm-leading);
  /* A bio keeps the line breaks its author typed, and a long address breaks
     rather than pushing the card wider than the column. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   34. Settings
   ========================================================================== */

.lm-settings {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: var(--lm-space-6);
  align-items: start;
}

.lm-settings__nav {
  position: sticky;
  inset-block-start: calc(var(--lm-header-height) + var(--lm-space-5));
}

.lm-settings__heading {
  margin: 0 0 var(--lm-space-4);
  padding-inline: var(--lm-space-3);
  font-size: var(--lm-text-2xl);
  font-weight: var(--lm-weight-bold);
  letter-spacing: -0.02em;
}

.lm-settings__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lm-settings__item {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  min-block-size: 44px;
  padding-inline: var(--lm-space-3);
  border-radius: var(--lm-radius-md);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-base);
  font-weight: var(--lm-weight-medium);
  transition: background-color var(--lm-fast), color var(--lm-fast);
}

.lm-settings__item svg {
  inline-size: 19px;
  block-size: 19px;
  flex-shrink: 0;
}

a.lm-settings__item:hover {
  background-color: var(--lm-surface);
  color: var(--lm-text);
}

.lm-settings__item.is-active {
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
  font-weight: var(--lm-weight-semibold);
}

.lm-settings__view {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin-block-start: var(--lm-space-5);
  padding-inline: var(--lm-space-3);
  color: var(--lm-primary-text);
  font-size: var(--lm-text-base);
  font-weight: var(--lm-weight-medium);
}

.lm-settings__view svg { inline-size: 16px; block-size: 16px; }

.lm-settings__view:hover { text-decoration: underline; }

.lm-settings__form {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-4);
}

.lm-settings__section { overflow: visible; }

.lm-settings__pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--lm-space-4);
}

.lm-settings__actions {
  display: flex;
  justify-content: flex-end;
  padding-block-end: var(--lm-space-4);
}

/* ==========================================================================
   35. Image fields
   --------------------------------------------------------------------------
   The picture, what can be done to it, and a state while that is happening.
   The file input is visually hidden and driven by a real button, so the
   control is reachable by keyboard and announces itself properly.
   ========================================================================== */

.lm-imagefield {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
}

.lm-imagefield__row {
  display: flex;
  align-items: center;
  gap: var(--lm-space-5);
  flex-wrap: wrap;
}

.lm-imagefield__side {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  min-inline-size: 0;
}

.lm-imagefield__cover {
  position: relative;
  aspect-ratio: 16 / 5;
  border-radius: var(--lm-radius-md);
  overflow: hidden;
  background-color: var(--lm-surface-secondary);
}

.lm-imagefield__cover img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  display: block;
}

.lm-imagefield__avatar {
  position: relative;
  flex-shrink: 0;
}

.lm-imagefield__actions {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  flex-wrap: wrap;
}

/* Shown while an upload is in flight. A spinner over the picture says where
   the waiting is happening, which a spinner on the button does not. */
.lm-imagefield__busy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background-color: var(--lm-overlay);
}

.lm-imagefield__busy::after {
  content: "";
  inline-size: 26px;
  block-size: 26px;
  border-radius: 50%;
  border: 2px solid var(--lm-on-scrim);
  border-block-start-color: transparent;
  animation: lm-spin 640ms linear infinite;
}

.lm-imagefield__avatar .lm-imagefield__busy {
  border-radius: 50%;
}

/* ==========================================================================
   36. Choice cards and toggle rows
   ========================================================================== */

.lm-choices {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
}

.lm-choice {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-4);
  padding: var(--lm-space-4);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-md);
  cursor: pointer;
  transition: border-color var(--lm-fast), background-color var(--lm-fast);
}

.lm-choice:hover { border-color: var(--lm-border-strong); }

.lm-choice.is-selected,
.lm-choice:has(input:checked) {
  border-color: var(--lm-primary);
  background-color: var(--lm-primary-soft);
}

.lm-choice input {
  margin-block-start: 3px;
  accent-color: var(--lm-primary);
  flex-shrink: 0;
}

.lm-choice__icon {
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text-secondary);
  flex-shrink: 0;
}

.lm-choice.is-selected .lm-choice__icon,
.lm-choice:has(input:checked) .lm-choice__icon {
  background-color: var(--lm-surface);
  color: var(--lm-primary-text);
}

.lm-choice__icon svg { inline-size: 20px; block-size: 20px; }

.lm-choice__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-inline-size: 0;
}

.lm-choice__body strong { font-size: var(--lm-text-md); font-weight: var(--lm-weight-semibold); }
.lm-choice__body span { color: var(--lm-text-secondary); font-size: var(--lm-text-base); }

.lm-toggle-row {
  display: flex;
  align-items: center;
  gap: var(--lm-space-4);
  padding-block: var(--lm-space-4);
}

.lm-toggle-row + .lm-toggle-row {
  border-block-start: 1px solid var(--lm-card-border);
}

.lm-toggle-row__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-inline-size: 0;
  flex: 1 1 auto;
}

.lm-toggle-row__body strong { font-size: var(--lm-text-md); font-weight: var(--lm-weight-semibold); }
.lm-toggle-row__body span { color: var(--lm-muted); font-size: var(--lm-text-base); }

/* ==========================================================================
   37. Character counter
   ========================================================================== */

.lm-help {
  display: flex;
  align-items: baseline;
  gap: var(--lm-space-3);
  margin: var(--lm-space-2) 0 0;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
}

.lm-help__count {
  margin-inline-start: auto;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.lm-help__count.is-over { color: var(--lm-danger); font-weight: var(--lm-weight-semibold); }

@keyframes lm-spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   38. The post editor (Phase 37.1.1)
   --------------------------------------------------------------------------
   The reference product's "Create post", for writing a post (the composer)
   and editing one (the edit dialog). A white form pane — the way out and
   the mark; who is writing beside the title; Feeling and Location as pill
   chips; the words in a box; photos and videos in a dashed drop zone; the
   other parts as tiles; Share, as rows; one wide Post button that rests
   grey until there is something to post — and, on wide screens, the live
   Preview centred on the page's own grey. Tablets get the form alone as a
   centred dialog, phones as a full sheet (responsive.css).

   Nothing the site cannot do is drawn: no tagging, collaborators, GIFs,
   calls, scheduling, drafts, AI label, sharing to groups or stories, text
   backgrounds or emoji picker.
   ========================================================================== */

/* -- the composer's overlay ----------------------------------------------- */

.lm-composer__overlay { display: none; }

/* One cell the size of the screen. minmax(0, 1fr), not auto: an auto track
   grows to the editor's widest unbreakable child, which pushed the phone
   sheet past the screen's edge (off the right in English, the left in
   Arabic). */
.lm-composer.is-open .lm-composer__overlay {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: var(--lm-z-modal);
  padding: var(--lm-space-4);
  background-color: var(--lm-overlay);
}

/* The page behind an open editor holds still — and so does the card it
   opened from: the script keeps the card at its collapsed height while the
   editor is up (base.css makes [hidden] always win, so the hidden prompt
   cannot hold the space itself). */
body.lm-composer-lock { overflow: hidden; }

/* The edit dialog's modal: the same one-cell rule. */
.lm-modal--editor {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

/* -- the editor ------------------------------------------------------------ */

.lm-editor {
  display: flex;
  flex-direction: column;
  inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 0;
  max-inline-size: 640px;
  max-block-size: min(52rem, calc(100vh - var(--lm-space-8)));
  overflow: hidden;
  background-color: var(--lm-surface);
  border-radius: var(--lm-radius-lg);
  box-shadow: var(--lm-shadow-xl);
}

.lm-composer__dialog { color: var(--lm-text); }

.lm-editor__pane {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-inline-size: 0;
  min-block-size: 0;
  background-color: var(--lm-surface);
}

.lm-editor__preview { display: none; }

/* The way out, in a grey circle, and the mark. */
.lm-editor__top {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  min-block-size: 56px;
  padding: var(--lm-space-2) var(--lm-space-3);
  border-block-end: 1px solid var(--lm-card-border);
}

.lm-editor__close {
  display: grid;
  place-items: center;
  flex: none;
  inline-size: 40px;
  block-size: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
  cursor: pointer;
  transition: background-color var(--lm-fast);
}

.lm-editor__close:hover { background-color: var(--lm-sunken); }
.lm-editor__close svg { inline-size: 20px; block-size: 20px; }

.lm-editor__mark { display: inline-flex; flex: none; }

/* Who is writing, beside the title. */
.lm-editor__head {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-3) var(--lm-space-4);
  border-block-end: 1px solid var(--lm-card-border);
}

.lm-editor__head > .lm-avatar {
  inline-size: 40px;
  block-size: 40px;
  font-size: var(--lm-text-sm);
  flex-shrink: 0;
}

.lm-editor__head-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-inline-size: 0;
}

.lm-editor__title {
  margin: 0;
  font-size: var(--lm-text-xl);
  font-weight: var(--lm-weight-bold);
  line-height: var(--lm-leading-tight);
}

.lm-composer__who-name {
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The Phase 27 note and "Posting in …": a caption, not a banner. */
.lm-editor__head .lm-composer__as,
.lm-composer__where {
  display: flex;
  align-items: center;
  gap: var(--lm-space-1);
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
}

.lm-editor__head .lm-composer__as svg,
.lm-composer__where svg { inline-size: 14px; block-size: 14px; flex-shrink: 0; }

.lm-composer__where > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-editor__scroll {
  flex: 1 1 auto;
  min-block-size: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
  padding: var(--lm-space-3) var(--lm-space-3) var(--lm-space-5);
}

/* -- Feeling and Location: pill chips over the box ------------------------ */

.lm-composer__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-2);
}

.lm-editor__chip {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  min-block-size: 32px;
  padding: 0 var(--lm-space-3);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-surface);
  color: var(--lm-text);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  cursor: pointer;
  transition: background-color var(--lm-fast);
}

.lm-editor__chip:hover,
.lm-editor__chip[aria-pressed="true"] { background-color: var(--lm-surface-secondary); }

.lm-editor__chip svg { inline-size: 16px; block-size: 16px; flex-shrink: 0; }

/* -- the words, in a box ----------------------------------------------------- */

.lm-composer__field {
  position: relative;
  min-inline-size: 0;
}

.lm-editor .lm-composer__text,
.lm-editor .lm-post-edit__text {
  display: block;
  inline-size: 100%;
  min-block-size: 96px;
  padding: var(--lm-space-3) var(--lm-space-4);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-surface);
  color: var(--lm-text);
  font-size: var(--lm-text-md);
  line-height: var(--lm-leading);
  resize: vertical;
}

/* The box grows with the words where the browser can, as the reference's
   does; elsewhere it keeps its handle. */
@supports (field-sizing: content) {
  .lm-editor .lm-composer__text {
    field-sizing: content;
    max-block-size: 50vh;
    resize: none;
  }
}

.lm-editor .lm-composer__text:focus,
.lm-editor .lm-post-edit__text:focus {
  outline: none;
  border-color: var(--lm-primary);
  box-shadow: 0 0 0 3px var(--lm-focus-ring);
}

/* -- the panel ----------------------------------------------------------- */

.lm-composer__panel {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
  min-inline-size: 0;
}

.lm-editor .lm-composer__tool,
.lm-editor .lm-composer__context,
.lm-editor .lm-composer__previews,
.lm-editor .lm-composer__hint { margin: 0; }

/* Photos and videos: the dashed drop zone. */
.lm-composer__drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  inline-size: 100%;
  min-block-size: 116px;
  margin-block-start: var(--lm-space-2);
  padding: var(--lm-space-4);
  border: 2px dashed var(--lm-border);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface);
  color: var(--lm-text);
  cursor: pointer;
  transition: background-color var(--lm-fast), border-color var(--lm-fast);
}

.lm-composer__drop:hover,
.lm-composer__drop.is-over {
  border-color: var(--lm-border-strong);
  background-color: var(--lm-surface-secondary);
}

.lm-composer__drop-icon { display: inline-flex; margin-block-end: var(--lm-space-1); }
.lm-composer__drop-icon svg { inline-size: 22px; block-size: 22px; }

.lm-composer__drop-title {
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-semibold);
}

.lm-composer__drop-hint {
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-md);
}

/* Once something is attached, "Uploaded media" takes the drop zone's
   place — and the tiles get their title, as in the reference. A poll or a
   part panel open takes it away too. */
.lm-composer__media:has(> .lm-composer__previews[hidden]) { display: none; }

.lm-composer__panel:has(.lm-composer__previews:not([hidden])) .lm-composer__drop,
.lm-composer__panel:has([data-lm-composer-panel-part="poll"]:not([hidden])) .lm-composer__drop { display: none; }

.lm-composer__add { min-inline-size: 0; }

.lm-composer__add-title { display: none; }

.lm-composer__panel:has(.lm-composer__previews:not([hidden])) .lm-composer__add-title { display: block; }

.lm-composer__previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--lm-space-2);
}

.lm-composer__preview {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--lm-radius-sm);
  overflow: hidden;
  background-color: var(--lm-surface-secondary);
}

.lm-composer__preview img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  display: block;
}

.lm-composer__preview-remove {
  position: absolute;
  inset-block-start: 6px;
  inset-inline-end: 6px;
  display: grid;
  place-items: center;
  inline-size: 28px;
  block-size: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: var(--lm-overlay);
  color: var(--lm-on-scrim);
  cursor: pointer;
}

.lm-composer__preview-remove svg {
  inline-size: 14px;
  block-size: 14px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.lm-composer__hint {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
}

.lm-composer__hint svg {
  inline-size: 16px;
  block-size: 16px;
  flex-shrink: 0;
}

/* The other parts: tiles, an icon over a bold name. */
.lm-editor .lm-composer__toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 158px));
  gap: var(--lm-space-2);
  margin: 0;
  padding: 0;
  border: 0;
}

.lm-editor .lm-composer__tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--lm-space-2);
  inline-size: auto;
  min-block-size: 94px;
  padding: var(--lm-space-3) var(--lm-space-2);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-surface);
  color: var(--lm-text);
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-semibold);
  text-align: center;
}

.lm-editor .lm-composer__tool-btn:hover,
.lm-editor .lm-composer__tool-btn[aria-pressed="true"] {
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
}

.lm-editor .lm-composer__tool-btn svg { inline-size: 24px; block-size: 24px; color: var(--lm-text); }

.lm-editor .lm-composer__tool-text { line-height: var(--lm-leading-snug); }

/* -- sections, and Share's rows -------------------------------------------- */

.lm-editor__section {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  min-inline-size: 0;
}

.lm-editor__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lm-space-3);
}

.lm-editor__section-title {
  margin: 0;
  font-size: var(--lm-text-lg);
  font-weight: var(--lm-weight-bold);
}

.lm-editor__link {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-1);
  padding: 0;
  border: 0;
  background: none;
  color: var(--lm-primary-text);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  cursor: pointer;
}

.lm-editor__link:hover { text-decoration: underline; }
.lm-editor__link svg { inline-size: 16px; block-size: 16px; flex-shrink: 0; }

.lm-editor__share { margin-block-start: var(--lm-space-3); gap: 0; }
.lm-editor__share .lm-editor__section-title { margin-block-end: var(--lm-space-1); }
.lm-editor__share .lm-dropdown { display: block; }

.lm-editor__row {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  inline-size: 100%;
  min-block-size: 58px;
  padding: var(--lm-space-2) 0;
  border: 0;
  border-radius: var(--lm-radius-sm);
  background: none;
  color: var(--lm-text);
  text-align: start;
}

button.lm-editor__row { cursor: pointer; }
button.lm-editor__row:hover { background-color: var(--lm-surface-secondary); }

.lm-editor__row-icon { display: inline-flex; flex: none; }
.lm-editor__row-icon svg { inline-size: 24px; block-size: 24px; }

.lm-editor__row-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-inline-size: 0;
}

.lm-editor__row-title { font-size: var(--lm-text-md); }

.lm-editor__row-value {
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-editor__row-go { display: inline-flex; flex: none; color: var(--lm-text-secondary); }
.lm-editor__row-go svg { inline-size: 20px; block-size: 20px; }

/* A choice opens in place, under its row: no floating menu for the
   scrolling pane to cut off. */
.lm-editor__share .lm-dropdown__menu {
  position: static;
  display: none;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: none;
  margin-block: 0 var(--lm-space-2);
  box-shadow: none;
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: none;
}

.lm-editor__share .lm-dropdown__menu.is-open { display: block; }

.lm-composer__privacy { max-inline-size: 100%; }
.lm-composer__privacy-icon svg { inline-size: 24px; block-size: 24px; }

/* Phase 73. An audience choice: its name, and who it reaches beneath. */
.lm-audience-choice { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.lm-audience-choice__label { font-weight: inherit; }
.lm-audience-choice__help {
  display: block;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-regular);
  line-height: var(--lm-leading-snug);
  white-space: normal;
}
.lm-dropdown__item.is-active .lm-audience-choice__help { color: var(--lm-text-secondary); }
.lm-composer__privacy .lm-dropdown__item > svg { flex: none; }

/* The audience where it is not a choice: a row that only says. */
.lm-editor .lm-composer__audience { color: var(--lm-text); }

/* -- the foot: one wide button ------------------------------------------------ */

.lm-editor__foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-3);
  border-block-start: 1px solid var(--lm-card-border);
  background-color: var(--lm-surface);
}

.lm-composer__foot { color: var(--lm-text); }

.lm-editor__submit {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  inline-size: 100%;
}

.lm-editor__primary {
  flex: 1 1 auto;
  justify-content: center;
  min-block-size: 40px;
  border-radius: var(--lm-radius-sm);
}

/* Nothing to post yet: grey, as the reference rests it. Still pressable —
   an empty press says why. */
.lm-editor__primary.is-idle,
.lm-editor__primary.is-idle:hover {
  background-color: var(--lm-surface-secondary);
  border-color: var(--lm-surface-secondary);
  color: var(--lm-muted);
  box-shadow: none;
}

.lm-editor__submit--pair .lm-btn--ghost { flex: none; }

/* Silent until the limit is close, then a count, then a warning. */
.lm-composer__count {
  flex: none;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
  font-variant-numeric: tabular-nums;
}

.lm-composer__count:empty { display: none; }

.lm-composer__count.is-over {
  color: var(--lm-danger);
  font-weight: var(--lm-weight-semibold);
}

/* -- the live preview ----------------------------------------------------- */

.lm-post-preview {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  inline-size: 100%;
  max-inline-size: 500px;
}

.lm-post-preview__title {
  margin: 0;
  font-size: var(--lm-text-lg);
  font-weight: var(--lm-weight-bold);
}

/* A picture of a post: nothing in it is clicked or selected. */
.lm-post-preview__card {
  margin: 0;
  pointer-events: none;
  user-select: none;
}

.lm-post-preview__more {
  display: inline-flex;
  margin-inline-start: auto;
  align-self: flex-start;
  color: var(--lm-text-secondary);
}

.lm-post-preview__more svg { inline-size: 20px; block-size: 20px; }

.lm-post-preview__extra { min-inline-size: 0; }

.lm-post-preview__card .lm-media__item video {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

/* The reference's quiet row: three icons, no words. */
.lm-post-preview__actions {
  display: flex;
  align-items: center;
  gap: var(--lm-space-5);
  padding: var(--lm-space-3) var(--lm-space-4);
  color: var(--lm-text-secondary);
}

.lm-post-preview__actions svg { inline-size: 20px; block-size: 20px; }

.lm-post-preview__icons { display: none; }

/* Wide screens: the editor fills the screen — the form on one side, the
   preview centred on the page's grey on the other. */
@media (min-width: 1120px) {
  .lm-composer.is-open .lm-composer__overlay,
  .lm-modal--editor {
    padding: 0;
    place-items: stretch;
  }

  .lm-editor {
    display: grid;
    grid-template-columns: minmax(0, min(720px, 50%)) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    max-inline-size: none;
    max-block-size: none;
    block-size: 100%;
    border-radius: 0;
    box-shadow: none;
    background-color: var(--lm-background);
  }

  .lm-editor__pane {
    border-inline-end: 1px solid var(--lm-card-border);
    box-shadow: var(--lm-shadow-md);
  }

  .lm-editor__preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-inline-size: 0;
    min-block-size: 0;
    overflow-y: auto;
    padding: var(--lm-space-8);
    background-color: var(--lm-background);
  }
}

/* ==========================================================================
   39. Post additions
   --------------------------------------------------------------------------
   Folded into section 20 when the card was rebuilt. Kept as a heading so
   the numbering in the index above stays true.
   ========================================================================== */

/* ==========================================================================
   40. Load more
   ========================================================================== */

.lm-load-more {
  display: flex;
  justify-content: center;
  padding-block: var(--lm-space-4);
}

/* ==========================================================================
   41. Photo grid
   --------------------------------------------------------------------------
   The Photos tab. Square tiles, because a grid of mixed shapes is a ragged
   edge; the picture itself keeps its proportions in the post, which is where
   it is the content rather than an index entry.
   ========================================================================== */

.lm-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--lm-space-2);
}

.lm-photo-tile {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--lm-radius-sm);
  overflow: hidden;
  background-color: var(--lm-surface-secondary);
}

.lm-photo-tile img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--lm-normal);
}

.lm-photo-tile:hover img {
  transform: scale(1.04);
}

/* ==========================================================================
   42. Feed tabs
   ========================================================================== */

.lm-feed-tabs {
  display: flex;
  gap: var(--lm-space-1);
  padding: var(--lm-space-1);
  background-color: var(--lm-surface);
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-pill);
  box-shadow: var(--lm-shadow-sm);
}

.lm-feed-tab {
  flex: 1 1 0;
  min-inline-size: 0;
  padding-block: var(--lm-space-3);
  border-radius: var(--lm-radius-pill);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-medium);
  text-align: center;
  transition: background-color var(--lm-fast), color var(--lm-fast);
}

.lm-feed-tab:hover {
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
}

.lm-feed-tab.is-active {
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
  font-weight: var(--lm-weight-semibold);
}

/* ==========================================================================
   43. Follow button
   --------------------------------------------------------------------------
   One button, two states. Both labels are in the markup and one is hidden,
   so the swap after a response is a class rather than the script inventing a
   translated string.
   ========================================================================== */

.lm-follow__on  { display: none; }
.lm-follow__off { display: inline; }

.lm-follow--on .lm-follow__on  { display: inline; }
.lm-follow--on .lm-follow__off { display: none; }

/* Phase 71. Asked a private account and waiting: a third state, its own
   label in the markup like the other two. */
.lm-follow__req { display: none; }
.lm-follow--req .lm-follow__req { display: inline; }
.lm-follow--req .lm-follow__off,
.lm-follow--req .lm-follow__on { display: none; }

/* Following, hovered, offers to stop. The word does not change — that would
   need a third label — but the tint says the press will undo something. */
.lm-follow--on:hover {
  background-color: var(--lm-danger-soft);
  color: var(--lm-danger-text);
}

/* ==========================================================================
   44. Reactions
   --------------------------------------------------------------------------
   Filled coloured discs. They opt out of the stroke-only rule every other
   icon follows, and each part takes its colour from the tokens by class.
   ========================================================================== */

.lm-rx {
  fill: none;
  stroke: none;
  border-radius: 50%;
}

.lm-rx .lm-rx-disc--blue   { fill: var(--lm-rx-blue); }
.lm-rx .lm-rx-disc--red    { fill: var(--lm-rx-red); }
.lm-rx .lm-rx-disc--yellow { fill: var(--lm-rx-yellow); }
.lm-rx .lm-rx-white        { fill: var(--lm-rx-white); }
.lm-rx .lm-rx-face         { fill: var(--lm-rx-face); }
.lm-rx .lm-rx-heart        { fill: var(--lm-rx-red); }

.lm-rx .lm-rx-line {
  fill: none;
  stroke: var(--lm-rx-face);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* -------------------------------------------------------- the Like button */

.lm-reactor__icon {
  display: inline-flex;
}

.lm-reactor__icon svg {
  inline-size: 20px;
  block-size: 20px;
}

/* Pressed, the button takes the colour of the reaction it holds. Colour is
   never the only signal: the disc itself is on the button and the label
   names the reaction. */
.lm-reactor__main.is-active          { font-weight: var(--lm-weight-bold); }
.lm-reactor__main--like              { color: var(--lm-rx-blue); }
.lm-reactor__main--love              { color: var(--lm-rx-red); }
.lm-reactor__main--haha,
.lm-reactor__main--insight,
.lm-reactor__main--support           { color: var(--lm-rx-face); }

/* The keyboard's way in: out of sight until it is focused, then a real
   button beside the Like button. The same pattern as the skip link. */
.lm-visually-hidden-focusable:not(:focus):not(:focus-visible) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.lm-reactor__more {
  display: grid;
  place-items: center;
  inline-size: 28px;
  block-size: 38px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--lm-text-secondary);
  border-radius: var(--lm-radius-xs);
  flex-shrink: 0;
}

.lm-reactor__more:focus-visible {
  outline: 2px solid var(--lm-primary);
  outline-offset: -2px;
}

.lm-reactor__more svg { inline-size: 15px; block-size: 15px; }

/* -------------------------------------------------------------- the row */

.lm-reactor__menu {
  position: absolute;
  inset-block-end: calc(100% + 4px);
  inset-inline-start: 0;
  z-index: var(--lm-z-dropdown);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  background-color: var(--lm-surface);
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-pill);
  box-shadow: var(--lm-shadow-lg);
  transform-origin: bottom left;
  animation: lm-reactor-in var(--lm-fast) ease-out;
}

@keyframes lm-reactor-in {
  from { opacity: 0; transform: translateY(6px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.lm-reactor__menu[hidden] {
  display: none;
}

.lm-reactor__choice {
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  transition: transform var(--lm-fast);
}

.lm-reactor__choice svg {
  inline-size: 38px;
  block-size: 38px;
}

/* The one under the pointer grows, the way every reaction row does; a
   keyboard focus does the same so the two feel alike. */
.lm-reactor__choice:hover,
.lm-reactor__choice:focus-visible {
  transform: translateY(-6px) scale(1.25);
  outline: none;
}

.lm-reactor__choice:focus-visible svg {
  box-shadow: 0 0 0 3px var(--lm-focus-ring);
}

/* The chosen one, marked by a ring as well as by aria-pressed — never by
   colour alone, and every disc is a different colour anyway. */
.lm-reactor__choice.is-active svg {
  box-shadow: 0 0 0 3px var(--lm-primary-soft-2);
}

/* ==========================================================================
   45. Comments
   --------------------------------------------------------------------------
   A small portrait, a rounded grey bubble with the name on its first line,
   and under it a quiet line of Reply · Edit · time. Replies step in once,
   joined to their root by a thin line, and never deeper.
   ========================================================================== */

.lm-thread {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
}

.lm-thread__list {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
}

.lm-thread__empty {
  margin: 0;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
  text-align: center;
  padding-block: var(--lm-space-2);
}

.lm-thread__more {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-semibold);
}

.lm-thread__more:hover { text-decoration: underline; }

/* ------------------------------------------------------------- one comment */

.lm-comment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--lm-space-2);
  align-items: start;
}

.lm-comment__avatar {
  display: inline-flex;
  flex-shrink: 0;
  margin-block-start: 2px;
}

.lm-comment__avatar .lm-avatar {
  inline-size: 32px;
  block-size: 32px;
  font-size: var(--lm-text-sm);
}

.lm-comment--reply .lm-comment__avatar .lm-avatar {
  inline-size: 28px;
  block-size: 28px;
  font-size: var(--lm-text-xs);
}

.lm-comment__body {
  min-inline-size: 0;
}

/* The bubble sits with its start edge at the portrait and grows only as
   wide as its words, so a short reply is a short bubble. */
.lm-comment__bubble {
  display: inline-block;
  max-inline-size: 100%;
  padding: var(--lm-space-2) var(--lm-space-3);
  background-color: var(--lm-surface-secondary);
  border-radius: 18px;
  min-inline-size: 0;
}

.lm-comment__name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--lm-text);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  line-height: 1.3;
}

.lm-comment__name:hover { text-decoration: underline; }

.lm-comment__name .lm-verified { inline-size: 13px; block-size: 13px; }
.lm-comment__name .lm-verified svg { inline-size: 13px; block-size: 13px; }

.lm-comment__replying {
  display: block;
  color: var(--lm-muted);
  font-size: var(--lm-text-xs);
  line-height: 1.3;
}

.lm-comment__text {
  margin: 1px 0 0;
  color: var(--lm-text);
  font-size: var(--lm-text-md);
  line-height: 1.4;

  /* The author's line breaks survive, and a long unbroken run — a URL, a
     word nobody meant to be that long — wraps rather than widening the
     thread and giving the whole page a sideways scroll. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.lm-comment__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-block-start: 2px;
  padding-inline-start: var(--lm-space-3);
  color: var(--lm-muted);
  font-size: var(--lm-text-xs);
  line-height: 1.4;
}

.lm-comment__time { color: inherit; }
.lm-comment__time:hover { text-decoration: underline; }

.lm-comment__edited { font-style: italic; }

.lm-comment__dot {
  inline-size: 2px;
  block-size: 2px;
  border-radius: 50%;
  background-color: var(--lm-subtle);
  flex-shrink: 0;
}

.lm-comment__act {
  padding: 0;
  border: 0;
  background: none;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-bold);
}

.lm-comment__act:hover { text-decoration: underline; color: var(--lm-text); }
.lm-comment__act--danger:hover { color: var(--lm-danger); }

/* --------------------------------------------------------------- replies */

/* One step in, with a thin line down the left tying the replies to their
   root. The indent is the portrait's width plus the gap, so a reply's
   bubble starts where the root's words did. */
.lm-comment__replies {
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  margin-inline-start: 40px;
  margin-block-start: var(--lm-space-1);
}

.lm-comment__replies:empty {
  display: none;
}

.lm-comment__replies::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: -22px;
  inline-size: 2px;
  border-radius: 1px;
  background-color: var(--lm-border);
}

.lm-comment__more {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin-inline-start: 40px;
  margin-block-start: var(--lm-space-1);
  padding: 0;
  border: 0;
  background: none;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
}

.lm-comment__more:hover { text-decoration: underline; }

.lm-comment__more svg { inline-size: 14px; block-size: 14px; }

/* The arrow turns down to say "these are underneath". */
.lm-comment__more-turn { transform: rotate(90deg); }

/* ------------------------------------------------------------- a tombstone */

.lm-comment--removed .lm-comment__tombstone {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  padding: var(--lm-space-2) var(--lm-space-3);
  background-color: var(--lm-surface-secondary);
  border-radius: 18px;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
  font-style: italic;
}

.lm-comment--removed .lm-comment__tombstone svg {
  inline-size: 14px;
  block-size: 14px;
  flex-shrink: 0;
}

/* ----------------------------------------------------------- writing one */

.lm-comment-form {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
}

.lm-comment-form__row {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-2);
}

.lm-comment-form__row > .lm-avatar {
  inline-size: 32px;
  block-size: 32px;
  font-size: var(--lm-text-sm);
  flex-shrink: 0;
  margin-block-start: 2px;
}

/* The box: a rounded grey field with the send button inside its end. */
.lm-comment-form__box {
  position: relative;
  flex: 1 1 auto;
  min-inline-size: 0;
  display: flex;
  align-items: flex-end;
  background-color: var(--lm-surface-secondary);
  border: 1px solid transparent;
  border-radius: 20px;
  transition: background-color var(--lm-fast), border-color var(--lm-fast);
}

.lm-comment-form__box:focus-within {
  background-color: var(--lm-surface);
  border-color: var(--lm-primary);
  box-shadow: 0 0 0 3px var(--lm-focus-ring);
}

.lm-comment-form__text {
  flex: 1 1 auto;
  min-inline-size: 0;
  min-block-size: 36px;
  max-block-size: 200px;
  padding: 8px var(--lm-space-2) 8px var(--lm-space-4);
  border: 0;
  background: none;
  color: var(--lm-text);
  font: inherit;
  font-size: var(--lm-text-md);
  line-height: 1.4;
  resize: none;
  overflow-y: auto;
}

.lm-comment-form__text:focus { outline: none; }
.lm-comment-form__text::placeholder { color: var(--lm-muted); }

.lm-comment-form__send {
  display: grid;
  place-items: center;
  inline-size: 36px;
  block-size: 36px;
  margin-inline-end: 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--lm-primary-text);
  flex-shrink: 0;
  transition: background-color var(--lm-fast);
}

.lm-comment-form__send:hover { background-color: var(--lm-primary-soft); }

.lm-comment-form__send svg { inline-size: 18px; block-size: 18px; }

.lm-comment-form__target {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin-inline-start: 40px;
  padding: 4px var(--lm-space-3);
  background-color: var(--lm-primary-soft);
  border-radius: var(--lm-radius-pill);
  color: var(--lm-primary-text);
  font-size: var(--lm-text-xs);
  align-self: flex-start;
}

.lm-comment-form__target[hidden] { display: none; }

.lm-comment-form__target-clear {
  display: grid;
  place-items: center;
  inline-size: 20px;
  block-size: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
}

.lm-comment-form__target-clear svg { inline-size: 12px; block-size: 12px; }

.lm-comment-form__error {
  margin: 0 0 0 40px;
  color: var(--lm-danger);
}

.lm-comment__editor {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  margin-block-start: var(--lm-space-2);
}

.lm-comment__editor textarea {
  inline-size: 100%;
  min-block-size: 64px;
  resize: vertical;
}

.lm-comment__editor-actions {
  display: flex;
  gap: var(--lm-space-2);
}

/* ==========================================================================
   46. A list of people
   ========================================================================== */

.lm-user-list {
  display: flex;
  flex-direction: column;
}

.lm-user-row--list {
  padding: var(--lm-space-3) var(--lm-space-5);
}

.lm-user-row--list + .lm-user-row--list {
  border-block-start: 1px solid var(--lm-card-border);
}

.lm-profile__figure-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: inherit;
  border-radius: var(--lm-radius-sm);
  padding-inline: var(--lm-space-3);
}

.lm-profile__figure-link:hover {
  color: var(--lm-primary-text);
}

.lm-profile__figure-link:hover .lm-profile__figure-label {
  color: var(--lm-primary-text);
}

/* ==========================================================================
   47. Notifications
   ==========================================================================

   The panel over the bell and the page at /notifications share every rule
   here, because they share the row template. One list, one set of rules: a
   notification that reads one way in the header and another way on the page
   would be two designs for one thing.

   The unread state is a tinted background plus a dot, never colour alone —
   somebody who cannot distinguish the tint still has the dot, and the dot has
   a visually-hidden word behind it for a screen reader. */

.lm-notifications__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lm-space-3);
  padding: var(--lm-space-5) var(--lm-space-5) var(--lm-space-3);
}

.lm-notifications__title {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  font-size: var(--lm-text-lg);
  font-weight: var(--lm-weight-semibold);
  color: var(--lm-text);
}

/* AN ICON BESIDE A HEADING NEEDS AN EXPLICIT SIZE.
   Lm_Icon() emits <svg viewBox="0 0 24 24"> with no width or height. Inside a
   flex container that leaves it free to grow: the bell beside "Notifications"
   rendered at 113px and the bookmark beside "Saved" at 804px, both shipped in
   Phase 7 and both read as design choices when the screenshots were reviewed.
   One rule for every such heading, because the mistake is general and so is
   the fix. */
.lm-notifications__title > .lm-icon,
.lm-saved__title > .lm-icon,
.lm-explore__title > .lm-icon {
  inline-size: 22px;
  block-size: 22px;
  flex: 0 0 auto;
}

/* THE TAB STRIP.
   Written in Phase 7 for the notification inbox and reused by the search page,
   and styled by NOTHING until Phase 8 — .lm-tabs__tab appeared in two
   templates and in no stylesheet, so both pages rendered their tabs as
   run-together links. It looked deliberate enough in a screenshot to survive a
   review.
   Modelled on .lm-feed-tabs, which is the shape this design already uses for
   the same job. */
.lm-tabs {
  display: flex;
  gap: var(--lm-space-1);
  padding: var(--lm-space-1);
  background-color: var(--lm-surface);
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-pill);
  box-shadow: var(--lm-shadow-sm);
}

.lm-tabs__tab {
  flex: 1 1 0;
  min-inline-size: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--lm-space-2);
  padding-block: var(--lm-space-3);
  border-radius: var(--lm-radius-pill);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-medium);
  color: var(--lm-text-secondary);
  text-align: center;
  text-decoration: none;
  transition: background-color var(--lm-fast) var(--lm-ease),
              color var(--lm-fast) var(--lm-ease);
}

.lm-tabs__tab:hover {
  background-color: var(--lm-surface-2);
  color: var(--lm-text);
}

.lm-tabs__tab.is-active {
  background-color: var(--lm-primary-strong);
  color: var(--lm-on-primary);
}

.lm-tabs__tab.is-active .lm-tabs__count {
  color: inherit;
}

.lm-notifications__tabs,
.lm-search__tabs {
  margin-inline: var(--lm-space-3);
}

.lm-tabs__count {
  margin-inline-start: var(--lm-space-1);
  font-size: var(--lm-text-xs);
  color: var(--lm-primary-text);
}

.lm-notifications__list {
  display: flex;
  flex-direction: column;
}

/* ------------------------------------------------------------- one row */

.lm-notification {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-3);
  padding: var(--lm-space-3) var(--lm-space-5);
  color: inherit;
  text-decoration: none;
  transition: background-color var(--lm-fast) var(--lm-ease);
}

.lm-notification + .lm-notification {
  border-block-start: 1px solid var(--lm-card-border);
}

.lm-notification:hover,
.lm-notification:focus-visible {
  background: var(--lm-surface-2);
}

/* Unread. The tint is deliberately slight: it marks a row without turning the
   list into stripes, and the dot at the end is what actually carries the
   meaning. */
.lm-notification--unread {
  background: var(--lm-primary-soft);
}

.lm-notification--unread:hover,
.lm-notification--unread:focus-visible {
  background: var(--lm-primary-soft-2);
}

/* The portrait, with the kind of event as a small mark on its corner. */
.lm-notification__figure {
  position: relative;
  flex: 0 0 auto;
}

.lm-notification__mark {
  position: absolute;
  inset-block-end: -2px;
  inset-inline-end: -2px;
  display: grid;
  place-items: center;
  inline-size: 18px;
  block-size: 18px;
  border-radius: var(--lm-radius-pill);
  background: var(--lm-primary-strong);
  color: var(--lm-on-primary);
  border: 2px solid var(--lm-surface);
}

.lm-notification__mark .lm-icon {
  inline-size: 10px;
  block-size: 10px;
}

/* One colour per kind, so the list is legible at a glance. A reaction is the
   red of the heart disc; a repost is the green every reader associates with
   passing something along; everything else is the site's own primary. */
/* The strengthened fills, not the plain colours. A white glyph on --lm-rx-red
   is 4.11:1 and on the dark scheme's light green it was 1.74:1 — a white mark
   on a pale green disc, which is the worst pair on the site. The glyph colour
   flips with the scheme the way it does everywhere else. */
.lm-notification__mark--post_reaction {
  background: var(--lm-danger-strong);
  color: var(--lm-on-danger);
}

.lm-notification__mark--post_share {
  background: var(--lm-success-strong);
  color: var(--lm-on-success);
}

.lm-notification__body {
  flex: 1 1 auto;
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lm-notification__text {
  font-size: var(--lm-text-sm);
  line-height: var(--lm-leading-snug);
  color: var(--lm-text);
}

.lm-notification--unread .lm-notification__text {
  font-weight: var(--lm-weight-medium);
}

.lm-notification__time {
  font-size: var(--lm-text-xs);
  color: var(--lm-muted);
}

.lm-notification__dot {
  flex: 0 0 auto;
  align-self: center;
  inline-size: 8px;
  block-size: 8px;
  border-radius: var(--lm-radius-pill);
  background: var(--lm-primary);
}

/* ------------------------------------------------- the panel over the bell */

.lm-header__bell {
  position: relative;
}

/* The badge on the bell. Present but empty at zero, so the script writes into
   one element rather than creating one — and an empty badge must take no space
   at all, or the bell sits off-centre while nothing is unread. */
.lm-icon-btn__badge {
  position: absolute;
  inset-block-start: 2px;
  inset-inline-end: 2px;
  display: grid;
  place-items: center;
  min-inline-size: 16px;
  block-size: 16px;
  padding-inline: 4px;
  border-radius: var(--lm-radius-pill);
  background: var(--lm-danger);
  color: var(--lm-on-danger);
  font-size: 10px;
  font-weight: var(--lm-weight-bold);
  line-height: 1;
}

.lm-icon-btn__badge.is-empty {
  display: none;
}

.lm-notifications__panel {
  inline-size: min(360px, calc(100vw - var(--lm-space-8)));
  padding: 0;
  overflow: hidden;
}

.lm-notifications__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lm-space-2);
  padding: var(--lm-space-3) var(--lm-space-4);
  border-block-end: 1px solid var(--lm-card-border);
}

/* The smallest button. Used by the notification panel's "mark all read" and
   defined by nothing until the style check found it, so that button has been
   rendering at the default size inside a 360px panel header. */
.lm-btn--xs {
  padding: 4px var(--lm-space-3);
  font-size: var(--lm-text-xs);
  border-radius: var(--lm-radius-pill);
}

.lm-notifications__panel-title {
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  color: var(--lm-text);
}

/* Scrolls at a height that shows a few rows whole rather than cutting one in
   half, which reads as the list having ended. */
.lm-notifications__panel-body {
  max-block-size: min(420px, 60vh);
  overflow-y: auto;
  padding: var(--lm-space-2);
}

.lm-notifications__panel-body .lm-notification {
  padding: var(--lm-space-2) var(--lm-space-3);
  border-radius: var(--lm-radius-md);
}

.lm-notifications__panel-body .lm-notification + .lm-notification {
  border-block-start: 0;
}

.lm-notifications__panel-empty {
  margin: 0;
  padding: var(--lm-space-6) var(--lm-space-4);
  text-align: center;
  font-size: var(--lm-text-sm);
  color: var(--lm-muted);
}

.lm-notifications__panel-foot {
  padding: var(--lm-space-2);
  border-block-start: 1px solid var(--lm-card-border);
}

.lm-notifications__panel-all {
  display: block;
  padding: var(--lm-space-2);
  border-radius: var(--lm-radius-md);
  text-align: center;
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-medium);
  color: var(--lm-primary-text);
  text-decoration: none;
}

.lm-notifications__panel-all:hover {
  background: var(--lm-surface-2);
}

/* ==========================================================================
   48. Saved posts
   ========================================================================== */

.lm-saved__head {
  padding: var(--lm-space-5);
}

.lm-saved__title {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  font-size: var(--lm-text-lg);
  font-weight: var(--lm-weight-semibold);
  color: var(--lm-text);
}

.lm-saved__note {
  margin: var(--lm-space-1) 0 0;
  font-size: var(--lm-text-sm);
  color: var(--lm-muted);
}

/* The saved state on the menu item. The icon swaps to the filled one server
   side; this is the colour that goes with it. */
.lm-post__save.is-saved,
.lm-post__save[data-lm-saved="1"] {
  color: var(--lm-primary-text);
}

/* ==========================================================================
   49. Reposts
   ==========================================================================

   A repost is the same card with a line above it saying who passed it along,
   and the original drawn quietly inside. The inner card is bordered rather
   than tinted, because a tint would read as a different KIND of post; a border
   reads as a post inside a post, which is what it is. */

.lm-post__reposted {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  padding: var(--lm-space-3) var(--lm-space-5) 0;
  font-size: var(--lm-text-sm);
  color: var(--lm-muted);
}

.lm-post__reposted .lm-icon {
  inline-size: 15px;
  block-size: 15px;
  flex: 0 0 auto;
}

.lm-post__reposted-by {
  color: var(--lm-text);
  font-weight: var(--lm-weight-medium);
  text-decoration: none;
}

.lm-post__reposted-by:hover {
  text-decoration: underline;
}

.lm-embed {
  margin: var(--lm-space-3) var(--lm-space-5) 0;
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-lg);
  overflow: hidden;
}

.lm-embed__header {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  padding: var(--lm-space-3) var(--lm-space-4) 0;
}

.lm-embed__avatar {
  flex: 0 0 auto;
  line-height: 0;
}

.lm-embed__author {
  min-inline-size: 0;
}

.lm-embed__name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
}

.lm-embed__name a {
  color: var(--lm-text);
  text-decoration: none;
}

.lm-embed__name a:hover {
  text-decoration: underline;
}

.lm-embed__meta {
  display: flex;
  align-items: center;
  gap: var(--lm-space-1);
  font-size: var(--lm-text-xs);
  color: var(--lm-muted);
}

.lm-embed__time {
  color: inherit;
  text-decoration: none;
}

.lm-embed__body {
  padding: var(--lm-space-2) var(--lm-space-4) var(--lm-space-3);
  font-size: var(--lm-text-sm);
  line-height: var(--lm-leading);
  color: var(--lm-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* The embedded post's pictures sit inside the border, so their own rounding
   would leave four pale corners against it. */
.lm-embed .lm-post__media {
  margin: 0;
  border-radius: 0;
}

/* The original is gone: deleted, made private, or its author suspended. One
   neutral sentence for all three. */
.lm-embed--gone {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  padding: var(--lm-space-5) var(--lm-space-4);
  background: var(--lm-surface-2);
  color: var(--lm-muted);
}

/* The icon must be told its size. Lm_Icon() emits an svg with no width or
   height, base.css gives every svg max-inline-size:100% and block-size:auto,
   and inside a flex row with a definite width that resolves to the whole
   row: the eye filled the card and pushed the sentence off its right edge.
   It shipped that way in Phase 7 because no fixture ever produced a gone
   original, so no screenshot ever drew this state and the oversized-icon
   check had nothing to measure. */
.lm-embed--gone > .lm-icon {
  flex: 0 0 auto;
  inline-size: 20px;
  block-size: 20px;
}

.lm-embed__gone-text {
  margin: 0;
  font-size: var(--lm-text-sm);
}

/* The repost button, once this reader has reposted. Green rather than the
   site's primary, because the primary already means "liked" on the button
   beside it and two buttons lit the same colour say nothing. */
.lm-post__action--share.is-shared {
  color: var(--lm-success);
}

.lm-post__action--share.is-shared .lm-icon {
  color: inherit;
}

/* ==========================================================================
   50. The summary row's second side
   ==========================================================================

   The comment and repost counts sit together at the end of the row, so the
   reactions stay at the start and the two numbers do not drift apart as one of
   them disappears at zero. */

.lm-post__summary-side {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  margin-inline-start: auto;
}

.lm-post__summary-shares {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--lm-text-sm);
  color: var(--lm-muted);
  cursor: pointer;
}

.lm-post__summary-shares:hover {
  color: var(--lm-text);
  text-decoration: underline;
}

/* ==========================================================================
   51. Hashtags and mentions
   ==========================================================================

   Both are links inside a post's text, and both are the site's primary colour
   without an underline until hover — the same treatment, because to a reader
   they are the same kind of thing: a word that leads somewhere. */

.lm-tag,
.lm-mention {
  color: var(--lm-primary-text);
  font-weight: var(--lm-weight-medium);
  text-decoration: none;
}

.lm-tag:hover,
.lm-mention:hover,
.lm-tag:focus-visible,
.lm-mention:focus-visible {
  text-decoration: underline;
}

/* ------------------------------------------------------------ the tag page */

.lm-tagpage__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--lm-space-2);
  padding: var(--lm-space-8) var(--lm-space-5);
  text-align: center;
}

.lm-tagpage__icon {
  display: grid;
  place-items: center;
  inline-size: 56px;
  block-size: 56px;
  border-radius: var(--lm-radius-pill);
  background: var(--lm-primary-soft);
  color: var(--lm-primary-text);
}

.lm-tagpage__icon .lm-icon {
  inline-size: 26px;
  block-size: 26px;
}

.lm-tagpage__title {
  margin: 0;
  font-size: var(--lm-text-2xl);
  font-weight: var(--lm-weight-bold);
  color: var(--lm-text);
  overflow-wrap: anywhere;
}

.lm-tagpage__count {
  margin: 0;
  font-size: var(--lm-text-sm);
  color: var(--lm-muted);
}

/* ==========================================================================
   52. Search
   ==========================================================================

   The header field is a real form, so it is styled as one rather than as a
   decorated input: the suggestion panel hangs off it and the whole thing has
   to position together. */

.lm-search {
  position: relative;
}

.lm-search__panel {
  position: absolute;
  inset-block-start: calc(100% + var(--lm-space-2));
  inset-inline: 0;
  z-index: var(--lm-z-dropdown);
  max-block-size: min(420px, 60vh);
  overflow-y: auto;
  padding: var(--lm-space-2);
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-lg);
  background: var(--lm-surface);
  box-shadow: var(--lm-shadow-lg);
}

.lm-suggest__group + .lm-suggest__group {
  margin-block-start: var(--lm-space-2);
  padding-block-start: var(--lm-space-2);
  border-block-start: 1px solid var(--lm-card-border);
}

.lm-suggest__heading {
  margin: 0 0 var(--lm-space-1);
  padding-inline: var(--lm-space-2);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
  color: var(--lm-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lm-suggest__row {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  padding: var(--lm-space-2);
  border-radius: var(--lm-radius-md);
  color: inherit;
  text-decoration: none;
}

.lm-suggest__row:hover,
.lm-suggest__row:focus-visible {
  background: var(--lm-surface-2);
}

.lm-suggest__mark {
  display: grid;
  place-items: center;
  inline-size: 32px;
  block-size: 32px;
  flex: 0 0 auto;
  border-radius: var(--lm-radius-pill);
  background: var(--lm-primary-soft);
  color: var(--lm-primary-text);
}

.lm-suggest__text {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
}

.lm-suggest__name {
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-medium);
  color: var(--lm-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-suggest__handle {
  font-size: var(--lm-text-xs);
  color: var(--lm-muted);
}

.lm-suggest__all {
  display: block;
  margin-block-start: var(--lm-space-2);
  padding: var(--lm-space-2);
  border-block-start: 1px solid var(--lm-card-border);
  text-align: center;
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-medium);
  color: var(--lm-primary-text);
  text-decoration: none;
}

.lm-suggest__empty {
  margin: 0;
  padding: var(--lm-space-5) var(--lm-space-4);
  text-align: center;
  font-size: var(--lm-text-sm);
  color: var(--lm-muted);
}

/* ------------------------------------------------------- the search page */

.lm-search__head {
  padding: var(--lm-space-5);
}

.lm-search__form {
  display: flex;
  gap: var(--lm-space-3);
  align-items: center;
}

.lm-search__field {
  position: relative;
  flex: 1 1 auto;
  min-inline-size: 0;
  display: flex;
  align-items: center;
}

/* AN ABSOLUTELY POSITIONED SVG NEEDS AN EXPLICIT SIZE.
   Lm_Icon() emits <svg viewBox="0 0 24 24"> with no width or height, so the
   size normally comes from the element it sits inside. Taking it out of flow
   with position:absolute removes that, and the icon grew to fill the page —
   a magnifying glass a thousand pixels across, over the search results. The
   elsewhere-used .lm-search__icon avoids this by being a sized <span> wrapper;
   this one sets the size directly. */
.lm-search__field .lm-icon {
  position: absolute;
  inset-inline-start: var(--lm-space-3);
  inline-size: 18px;
  block-size: 18px;
  color: var(--lm-muted);
  pointer-events: none;
}

.lm-search__field .lm-search__input {
  padding-inline-start: var(--lm-space-8);
}

.lm-search__section + .lm-search__section {
  margin-block-start: var(--lm-space-4);
}

.lm-search__posts {
  margin-block-start: var(--lm-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-4);
}

.lm-search__posts-head,
.lm-explore__posts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lm-space-3);
  padding-inline: var(--lm-space-1);
}

.lm-search__more {
  margin-inline-start: auto;
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-medium);
  color: var(--lm-primary-text);
  text-decoration: none;
}

.lm-search__more:hover {
  text-decoration: underline;
}

.lm-search__results {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-4);
  min-inline-size: 0;
}

/* ==========================================================================
   53. A list of hashtags
   ========================================================================== */

.lm-tag-list {
  display: flex;
  flex-direction: column;
}

.lm-tag-row {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-3) var(--lm-space-5);
  color: inherit;
  text-decoration: none;
}

.lm-tag-row + .lm-tag-row {
  border-block-start: 1px solid var(--lm-card-border);
}

.lm-tag-row:hover,
.lm-tag-row:focus-visible {
  background: var(--lm-surface-2);
}

.lm-tag-row__mark {
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  flex: 0 0 auto;
  border-radius: var(--lm-radius-pill);
  background: var(--lm-primary-soft);
  color: var(--lm-primary-text);
}

.lm-tag-row__body {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
}

.lm-tag-row__name {
  font-size: var(--lm-text-base);
  font-weight: var(--lm-weight-semibold);
  color: var(--lm-text);
  overflow-wrap: anywhere;
}

.lm-tag-row__count {
  font-size: var(--lm-text-xs);
  color: var(--lm-muted);
}

/* ==========================================================================
   54. Explore
   ========================================================================== */

.lm-explore__head {
  padding: var(--lm-space-5);
}

.lm-explore__title {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  font-size: var(--lm-text-lg);
  font-weight: var(--lm-weight-semibold);
  color: var(--lm-text);
}

.lm-explore__note {
  margin: var(--lm-space-1) 0 0;
  font-size: var(--lm-text-sm);
  color: var(--lm-muted);
}

.lm-explore__section {
  margin-block-start: var(--lm-space-4);
}

/* The trending formula, printed on the page. Small, because it is a footnote
   rather than a heading — but present, because a trending list nobody can
   explain is one nobody should trust. */
.lm-explore__formula {
  margin: 0;
  padding: 0 var(--lm-space-5) var(--lm-space-3);
  font-size: var(--lm-text-xs);
  color: var(--lm-muted);
}

/* ==========================================================================
   55. The report dialog
   ========================================================================== */

.lm-report__lead {
  margin: 0 0 var(--lm-space-4);
  font-size: var(--lm-text-sm);
  color: var(--lm-text-secondary);
}

.lm-report__reasons {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lm-report__reason {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-3);
  border-radius: var(--lm-radius-md);
  font-size: var(--lm-text-sm);
  color: var(--lm-text);
  cursor: pointer;
}

.lm-report__reason:hover {
  background: var(--lm-surface-2);
}

.lm-report__reason input {
  flex: 0 0 auto;
  accent-color: var(--lm-primary);
}

.lm-report__details {
  margin-block-start: var(--lm-space-4);
}

/* ==========================================================================
   Phase 27. The active identity
   --------------------------------------------------------------------------
   The switcher in the account menu, the header chip marked as a Page, the
   "Posting as" line on the composer and the comment box, the banner over
   the account's own areas, and the Page profile's figures. Tokens only;
   logical properties only (rtl.css reorders the chip, as before).
   ========================================================================== */

/* -- The header chip ----------------------------------------------------- */

.lm-user-chip__avatar {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.lm-user-chip__avatar > .lm-avatar {
  inline-size: 46px;
  block-size: 46px;
  font-size: var(--lm-text-lg);
}

/* A small flag on the picture: this is a Page, not the person. */
.lm-user-chip__mark {
  position: absolute;
  inset-block-end: -2px;
  inset-inline-end: -2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 20px;
  block-size: 20px;
  border: 2px solid var(--lm-surface);
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-primary-strong);
  color: var(--lm-on-primary);
}

.lm-user-chip__mark svg { inline-size: 11px; block-size: 11px; }

.lm-user-chip--page .lm-user-chip__name { color: var(--lm-primary-text); }

/* -- The switcher -------------------------------------------------------- */

.lm-dropdown__menu.lm-identity-menu {
  min-inline-size: min(288px, calc(100vw - var(--lm-space-6)));
  max-inline-size: min(340px, calc(100vw - var(--lm-space-6)));
}

.lm-identity__current {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  padding: var(--lm-space-2) var(--lm-space-4) var(--lm-space-3);
  border-block-end: 1px solid var(--lm-border);
  margin-block-end: var(--lm-space-2);
}

.lm-identity__eyebrow,
.lm-identity__heading {
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lm-subtle);
}

.lm-identity__heading {
  display: block;
  padding: var(--lm-space-3) var(--lm-space-4) var(--lm-space-1);
}

.lm-identity__row {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  min-inline-size: 0;
}

.lm-identity__text {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-inline-size: 0;
}

.lm-identity__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: var(--lm-weight-semibold);
  color: var(--lm-text);
}

.lm-identity__kind {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-1);
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--lm-text-sm);
  color: var(--lm-muted);
}

.lm-identity__kind svg { inline-size: 13px; block-size: 13px; flex-shrink: 0; }

.lm-dropdown__item.lm-identity__back {
  color: var(--lm-primary-text);
  font-weight: var(--lm-weight-semibold);
}

.lm-dropdown__item.lm-identity__back svg { color: var(--lm-primary-text); }

.lm-identity__list {
  max-block-size: min(46vh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.lm-identity__option {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  inline-size: 100%;
  padding: var(--lm-space-2) var(--lm-space-4);
  border: 0;
  background: none;
  color: var(--lm-text);
  text-align: start;
  cursor: pointer;
  transition: background-color var(--lm-fast);
}

.lm-identity__option:hover,
.lm-identity__option:focus-visible {
  background-color: var(--lm-surface-secondary);
}

.lm-identity__option.is-current {
  background-color: var(--lm-primary-soft);
  cursor: default;
}

.lm-identity__option:disabled { opacity: 1; }

.lm-identity__option .lm-avatar { flex-shrink: 0; }

.lm-identity__check {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--lm-primary-text);
}

.lm-identity__check svg { inline-size: 18px; block-size: 18px; }

.lm-identity__count {
  flex-shrink: 0;
  min-inline-size: 22px;
  padding: 1px var(--lm-space-2);
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-primary-strong);
  color: var(--lm-on-primary);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-bold);
  text-align: center;
}

.lm-identity__empty {
  margin: 0;
  padding: var(--lm-space-1) var(--lm-space-4) var(--lm-space-2);
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
  line-height: var(--lm-leading-snug);
}

/* -- "Posting as", "Commenting as", "Following as" ----------------------- */

.lm-actor-note {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: var(--lm-space-1);
  max-inline-size: 100%;
  padding: 2px var(--lm-space-3);
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  line-height: var(--lm-leading-snug);
}

.lm-actor-note span {
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-actor-note svg { inline-size: 14px; block-size: 14px; flex-shrink: 0; }

.lm-actor-note--block { display: flex; inline-size: fit-content; margin: 0 0 var(--lm-space-3); }

.lm-actor-note--current {
  background-color: var(--lm-success-soft);
  color: var(--lm-success-text);
}

.lm-composer__as { margin: 0 0 var(--lm-space-3); }

.lm-comment-form__as { margin: 0 0 var(--lm-space-2); }

/* A long title (a Page's name in it) wraps instead of pushing the page wide. */
.lm-notifications__title > span { min-inline-size: 0; overflow-wrap: anywhere; }
.lm-notifications__title { min-inline-size: 0; }

/* The Page's follow button carries its note with it; the wrapper adds no box. */
.lm-page-follow { display: contents; }

/* -- The personal-area banner -------------------------------------------- */

.lm-actor-banner-host {
  display: grid;
  grid-template-columns: minmax(0, calc(var(--lm-feed-width) + var(--lm-widgets-width) + var(--lm-shell-gap)));
  justify-content: center;
  padding-inline: var(--lm-shell-inset) var(--lm-shell-gutter);
  padding-block-start: var(--lm-space-4);
}

.lm-actor-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2) var(--lm-space-3);
  padding: var(--lm-space-3) var(--lm-space-4);
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-info-soft);
  color: var(--lm-text);
}

.lm-actor-banner--notice { background-color: var(--lm-warning-soft); }

.lm-actor-banner__icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--lm-info-text);
}

.lm-actor-banner--notice .lm-actor-banner__icon { color: var(--lm-warning-text); }

.lm-actor-banner__icon svg { inline-size: 20px; block-size: 20px; }

.lm-actor-banner__text {
  flex: 1 1 14rem;
  min-inline-size: 0;
  margin: 0;
  font-size: var(--lm-text-sm);
  line-height: var(--lm-leading-snug);
  overflow-wrap: anywhere;
}

.lm-actor-banner__action { flex-shrink: 0; }

/* -- The Page profile's figures ------------------------------------------ */

.lm-page__figures {
  justify-content: flex-start;
  margin-block-start: var(--lm-space-4);
  padding-block-start: var(--lm-space-3);
  border-block-start: 1px solid var(--lm-card-border);
}

.lm-page__figures .lm-profile__figure {
  flex: 1 1 0;
  min-inline-size: 0;
}

.lm-page__figures .lm-profile__figure-value { font-size: var(--lm-text-lg); }

.lm-page__figures .lm-profile__figure-label { font-size: var(--lm-text-sm); }

.lm-actor-suggest .lm-community-grid { padding: 0 var(--lm-space-4) var(--lm-space-4); }

@media (max-width: 1399px) {
  .lm-actor-banner-host { grid-template-columns: minmax(0, var(--lm-feed-width)); }
}

@media (max-width: 767px) {
  .lm-actor-banner-host { padding-block-start: var(--lm-space-3); }

  .lm-actor-banner { padding: var(--lm-space-3); }

  .lm-actor-banner__action { flex: 1 1 100%; justify-content: center; }

  .lm-user-chip__avatar > .lm-avatar {
    inline-size: 36px;
    block-size: 36px;
    font-size: var(--lm-text-base);
  }

  .lm-user-chip__mark { inline-size: 18px; block-size: 18px; }
}

/* ==========================================================================
   Phase 32. Sensitive content
   --------------------------------------------------------------------------
   The warning drawn in place of sensitive or NSFW content, the blurred
   content beneath it, the author's own neutral note, and Settings → Safety.
   A card's cover sits in the text column; a comment's is one line inside
   its bubble.
   ========================================================================== */

.lm-safety-cover {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: var(--lm-space-2) var(--lm-space-3);
  margin: var(--lm-space-1) var(--lm-space-4) var(--lm-space-3);
  padding: var(--lm-space-4);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
}

.lm-safety-cover__icon {
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: 50%;
  background-color: var(--lm-surface);
  color: var(--lm-text-secondary);
}

.lm-safety-cover__icon svg { inline-size: 20px; block-size: 20px; }

.lm-safety-cover__words { min-inline-size: 0; }

.lm-safety-cover__title {
  margin: 0;
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-semibold);
  line-height: var(--lm-leading-snug);
}

.lm-safety-cover__text {
  margin: 2px 0 0;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
  line-height: var(--lm-leading-snug);
}

/* Under the words, in their column. A long label wraps rather than pushing
   the card wider than a 320px screen. */
.lm-safety-cover__actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-2);
}

.lm-safety-cover__actions .lm-btn { white-space: normal; }

.lm-safety-cover .lm-btn--ghost:hover { background-color: var(--lm-border); }

/* A comment's: icon, title and View on one line, inside the bubble. */
.lm-safety-cover--compact {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  background: none;
}

.lm-safety-cover--compact .lm-safety-cover__icon {
  inline-size: 24px;
  block-size: 24px;
  background: none;
}

.lm-safety-cover--compact .lm-safety-cover__icon svg { inline-size: 16px; block-size: 16px; }

.lm-safety-cover--compact .lm-safety-cover__title { font-size: var(--lm-text-sm); }

.lm-safety-cover--compact .lm-safety-cover__actions { grid-column: auto; }

/* What the warning stands in front of. The filter first, then the clip —
   so the blur cannot bleed over the summary line below it. Inert and hidden
   from screen readers in the markup; "View" takes all three off. */
.lm-safety-body.is-covered {
  max-block-size: 260px;
  overflow: hidden;
  clip-path: inset(0);
  filter: blur(48px) saturate(0.5);
  pointer-events: none;
  user-select: none;
}

.lm-comment__text.lm-safety-body.is-covered {
  max-block-size: 4.2em;
  filter: blur(6px);
}

/* The author's own content: what state it is in, in a sentence — never who
   reported it, never which moderator. */
.lm-safety-note {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-2);
  margin: 0 var(--lm-space-4) var(--lm-space-2);
  padding: var(--lm-space-2) var(--lm-space-3);
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  line-height: var(--lm-leading-snug);
}

.lm-safety-note svg {
  inline-size: 16px;
  block-size: 16px;
  flex-shrink: 0;
  margin-block-start: 1px;
}

.lm-safety-note--compact {
  margin: var(--lm-space-1) 0 0;
  padding: 0;
  background: none;
  font-size: var(--lm-text-xs);
}

.lm-safety-note--compact svg { inline-size: 14px; block-size: 14px; }

/* Settings → Safety. */
.lm-safety-settings .lm-alert { margin: 0; }

.lm-safety-status {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-safety-status__item {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-3);
  padding-block: var(--lm-space-3);
  border-block-end: 1px solid var(--lm-border);
}

.lm-safety-status__item:first-child { padding-block-start: 0; }

.lm-safety-status__item:last-child { border-block-end: 0; }

.lm-safety-status__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  inline-size: 32px;
  block-size: 32px;
  border-radius: 50%;
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text-secondary);
}

.lm-safety-status__icon svg { inline-size: 16px; block-size: 16px; }

.lm-safety-status__body {
  display: grid;
  gap: 2px;
  flex: 1 1 auto;
  min-inline-size: 0;
}

.lm-safety-status__line {
  display: flex;
  flex-wrap: wrap;
  gap: 2px var(--lm-space-2);
  margin: 0;
  color: var(--lm-text);
  font-size: var(--lm-text-base);
}

.lm-safety-status__text {
  margin: 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  overflow-wrap: anywhere;
}

.lm-safety-status__time,
.lm-safety-status__how {
  color: var(--lm-muted);
  font-size: var(--lm-text-xs);
}

/* ==========================================================================
   Phase 33. Settings → Notifications: a member's push devices. One row per
   installation — what it is, when it was last seen, on or off, and "remove"
   for that one only. The row wraps on a phone so nothing overflows at 320px.
   ========================================================================== */

.lm-push-devices__list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-push-devices__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2) var(--lm-space-3);
  padding-block: var(--lm-space-3);
}

.lm-push-devices__item + .lm-push-devices__item {
  border-block-start: 1px solid var(--lm-card-border);
}

.lm-push-devices__icon {
  display: inline-flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  inline-size: 36px;
  block-size: 36px;
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text-secondary);
}

.lm-push-devices__icon svg {
  inline-size: 20px;
  block-size: 20px;
}

.lm-push-devices__body {
  display: grid;
  flex: 1 1 180px;
  gap: 2px;
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

.lm-push-devices__body .lm-help {
  margin: 0;
}

.lm-push-devices__state {
  color: var(--lm-success-text);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
}

.lm-push-devices__item.is-off .lm-push-devices__state {
  color: var(--lm-muted);
}

.lm-push-devices__item.is-off .lm-push-devices__icon {
  opacity: 0.55;
}

/* ==========================================================================
   Phase 33.1. The Notifications page: the tabs and the filter on one bar
   (wrapping on a phone), and what a notification is about at the reading
   end — a post's picture, a video's poster, a reel's cover — kept apart
   from the actor's portrait at the start.
   ========================================================================== */

.lm-notifications__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--lm-space-2) var(--lm-space-3);
  margin-inline: var(--lm-space-3);
}

/* The tabs are built to share a full-width bar (flex 1 1 0, allowed to
   shrink to nothing). Beside the filter they need a real size, and a tab
   is never narrower than its words: when both do not fit, the filter goes
   to its own line instead of squeezing "All" into a dot. */
.lm-notifications__bar .lm-notifications__tabs {
  flex: 1 1 12rem;
  max-inline-size: 24rem;
  margin-inline: 0;
}

.lm-notifications__bar .lm-tabs__tab {
  min-inline-size: max-content;
  padding-inline: var(--lm-space-4);
  white-space: nowrap;
}

.lm-notifications__filter {
  flex: 0 0 auto;
  max-inline-size: 100%;
}

.lm-notifications__filter-btn {
  max-inline-size: 100%;
}

.lm-notifications__filter-btn .lm-icon {
  flex: 0 0 16px;
  inline-size: 16px;
  block-size: 16px;
}

.lm-notifications__filter-label {
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-notification__preview {
  position: relative;
  flex: 0 0 48px;
  align-self: center;
  inline-size: 48px;
  block-size: 48px;
  overflow: hidden;
  border-radius: var(--lm-radius-md);
  background: var(--lm-surface-secondary);
}

.lm-notification__preview img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.lm-notification__preview-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--lm-on-scrim);
  background: var(--lm-overlay);
}

.lm-notification__preview-play .lm-icon {
  inline-size: 16px;
  block-size: 16px;
}

.lm-notifications__panel-body .lm-notification__preview {
  flex-basis: 40px;
  inline-size: 40px;
  block-size: 40px;
}

/* ==========================================================================
   Phase 34. Social login: "Continue with Google" — Google's own mark on a
   neutral button, as its guidelines ask — the "or" between it and the
   form, the verified address on the step after Google, and Settings →
   Account's connected accounts.
   ========================================================================== */

.lm-auth__social {
  display: grid;
  gap: var(--lm-space-4);
  margin-block-end: var(--lm-space-4);
}

.lm-btn--social {
  gap: var(--lm-space-3);
  border-color: var(--lm-border-strong);
  background-color: var(--lm-surface);
  color: var(--lm-text);
  font-weight: var(--lm-weight-semibold);
}

.lm-btn--social:hover {
  border-color: var(--lm-border-strong);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
}

.lm-btn__brand {
  flex: 0 0 20px;
  inline-size: 20px;
  block-size: 20px;
}

.lm-auth__or {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  color: var(--lm-muted);
  font-size: var(--lm-text-xs);
}

.lm-auth__or::before,
.lm-auth__or::after {
  content: '';
  flex: 1 1 auto;
  block-size: 1px;
  background-color: var(--lm-border);
}

.lm-auth__identity {
  margin: 0 0 var(--lm-space-4);
  padding: var(--lm-space-3);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  overflow-wrap: anywhere;
}

.lm-settings__stack {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-4);
}

.lm-connected {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2) var(--lm-space-3);
}

.lm-connected__mark {
  display: inline-flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-secondary);
}

.lm-connected__mark svg {
  inline-size: 22px;
  block-size: 22px;
}

.lm-connected__body {
  display: grid;
  flex: 1 1 180px;
  gap: 2px;
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

.lm-connected__body .lm-help {
  margin: 0;
}

.lm-connected__action {
  margin-inline-start: auto;
}

/* ==========================================================================
   Phase 35.2. Ask Luma — one question about one piece of content.
   Above the media viewer and the story viewer (it opens from both), below
   toasts. Logical properties only, so Arabic mirrors itself.
   ========================================================================== */

.lm-modal.lm-ask { z-index: calc(var(--lm-z-modal) + 20); }

.lm-ask__dialog { max-inline-size: 520px; }

.lm-ask__header { align-items: center; }

.lm-ask__mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  inline-size: 36px;
  block-size: 36px;
  border-radius: var(--lm-radius-pill);
  background: var(--lm-gradient);
  color: var(--lm-on-gradient);
}

.lm-ask__mark .lm-icon { inline-size: 18px; block-size: 18px; }

.lm-ask__heading { min-inline-size: 0; }

.lm-ask__about {
  margin: 2px 0 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

.lm-ask__body { display: grid; gap: var(--lm-space-3); }

.lm-ask__label {
  margin: 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
  letter-spacing: 0.02em;
}

.lm-ask__form { display: grid; gap: var(--lm-space-2); }

.lm-ask__images { display: grid; gap: var(--lm-space-2); }

.lm-ask__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-2);
}

.lm-ask__thumb {
  inline-size: 56px;
  block-size: 56px;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--lm-border);
  border-radius: var(--lm-radius-md);
  background: var(--lm-sunken);
  cursor: pointer;
}

.lm-ask__thumb img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.lm-ask__thumb.is-selected { border-color: var(--lm-primary); box-shadow: 0 0 0 2px var(--lm-primary-ring); }
.lm-ask__thumb:focus-visible { outline: none; box-shadow: var(--lm-focus-ring); }

.lm-ask__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-2);
  margin-block-end: var(--lm-space-2);
}

.lm-ask__chip {
  max-inline-size: 100%;
  padding: var(--lm-space-2) var(--lm-space-3);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-pill);
  background: var(--lm-surface-2);
  color: var(--lm-text);
  font: inherit;
  font-size: var(--lm-text-sm);
  text-align: start;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color var(--lm-fast), border-color var(--lm-fast);
}

.lm-ask__chip:hover { border-color: var(--lm-primary); background: var(--lm-primary-soft); }
.lm-ask__chip:focus-visible { outline: none; box-shadow: var(--lm-focus-ring); }

.lm-ask__compose {
  display: flex;
  align-items: flex-end;
  gap: var(--lm-space-2);
}

.lm-ask__input { flex: 1 1 auto; min-inline-size: 0; resize: none; }
.lm-ask__submit { flex: 0 0 auto; }

.lm-ask__usage { margin: 0; }

.lm-ask__notes {
  display: grid;
  gap: var(--lm-space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

.lm-ask__notes:empty { display: none; }

.lm-ask__notes li {
  padding-inline-start: var(--lm-space-3);
  border-inline-start: 2px solid var(--lm-border-strong);
}

.lm-ask__gate {
  display: grid;
  justify-items: start;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4);
  border-radius: var(--lm-radius-md);
  background: var(--lm-sunken);
}

.lm-ask__gate-text { margin: 0; }

.lm-ask__thinking {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4) 0;
  color: var(--lm-text-secondary);
}

.lm-ask__dots { display: inline-flex; gap: 4px; }

.lm-ask__dots span {
  inline-size: 7px;
  block-size: 7px;
  border-radius: var(--lm-radius-pill);
  background: var(--lm-primary);
  animation: lm-ask-dot 1.1s var(--lm-ease) infinite;
}

.lm-ask__dots span:nth-child(2) { animation-delay: 0.15s; }
.lm-ask__dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes lm-ask-dot {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
  40%           { opacity: 1;    transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .lm-ask__dots span { animation: none; opacity: 0.7; }
}

.lm-ask__error {
  margin: 0;
  padding: var(--lm-space-3);
  border-radius: var(--lm-radius-md);
  background: var(--lm-danger-soft);
  color: var(--lm-danger-text);
  font-size: var(--lm-text-sm);
}

.lm-ask__result { display: grid; gap: var(--lm-space-3); min-inline-size: 0; }

.lm-ask__asked {
  margin: 0;
  padding: var(--lm-space-2) var(--lm-space-3);
  border-radius: var(--lm-radius-md);
  background: var(--lm-surface-2);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  overflow-wrap: anywhere;
}

.lm-ask__badges { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }
.lm-ask__badges[hidden] { display: none; }

.lm-ask__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--lm-space-3);
  border-radius: var(--lm-radius-pill);
  background: var(--lm-info-soft);
  color: var(--lm-info-text);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
}

.lm-ask__badge--supported         { background: var(--lm-success-soft); color: var(--lm-success-text); }
.lm-ask__badge--likely_misleading { background: var(--lm-danger-soft);  color: var(--lm-danger-text); }
.lm-ask__badge--unverified,
.lm-ask__badge--insufficient_evidence,
.lm-ask__badge--assessment        { background: var(--lm-warning-soft); color: var(--lm-warning-text); }
.lm-ask__badge--web               { background: var(--lm-sunken);       color: var(--lm-text-secondary); }

.lm-ask__answer {
  margin: 0;
  font-size: var(--lm-text-base);
  line-height: var(--lm-leading);
  overflow-wrap: anywhere;
}

.lm-ask__cite {
  margin-inline-start: 2px;
  color: var(--lm-primary-text);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
  text-decoration: none;
  vertical-align: super;
}

.lm-ask__cite:hover { text-decoration: underline; }

.lm-ask__sources { display: grid; gap: var(--lm-space-2); }
.lm-ask__sources[hidden] { display: none; }

.lm-ask__source-list {
  display: grid;
  gap: var(--lm-space-1);
  margin: 0;
  padding-inline-start: var(--lm-space-5);
  font-size: var(--lm-text-sm);
}

.lm-ask__source-list li { min-inline-size: 0; }
.lm-ask__source-list li:target .lm-ask__source-title { background: var(--lm-primary-soft); }

.lm-ask__source {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--lm-space-2);
  max-inline-size: 100%;
  color: var(--lm-primary-text);
  text-decoration: none;
}

.lm-ask__source:hover .lm-ask__source-title { text-decoration: underline; }

.lm-ask__source-title { overflow-wrap: anywhere; }

.lm-ask__source-domain {
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  overflow-wrap: anywhere;
}

.lm-ask__disclaimer { margin: 0; }
.lm-ask__again { justify-self: start; }

.lm-ask__menu-item .lm-icon,
.lm-ask__again .lm-icon { color: var(--lm-primary-text); }

.lm-ask__loading { min-block-size: 96px; }

/* The media viewer's own "Ask Luma", over the dark stage. */
.lm-viewer__ask {
  position: absolute;
  inset-block-start: var(--lm-space-4);
  inset-inline-end: var(--lm-space-4);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  min-block-size: 44px;
  padding: 0 var(--lm-space-4);
  border: 0;
  border-radius: var(--lm-radius-pill);
  background: color-mix(in srgb, var(--lm-on-scrim) 14%, transparent);
  color: var(--lm-on-scrim);
  font: inherit;
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  cursor: pointer;
}

.lm-viewer__ask[hidden] { display: none; }
.lm-viewer__ask:hover { background: color-mix(in srgb, var(--lm-on-scrim) 24%, transparent); }
.lm-viewer__ask .lm-icon { inline-size: 18px; block-size: 18px; flex: 0 0 auto; }

@media (max-width: 480px) {
  .lm-ask__dialog { max-block-size: calc(100vh - var(--lm-space-4)); }
  .lm-ask__compose { flex-direction: column; align-items: stretch; }
  .lm-ask__submit { inline-size: 100%; }
}

/* =========================================================================
   Phase 35.2.1. The AI actor's replies in a thread: its own mark (never an
   uploaded picture), a small badge beside its name, the verdict, notes and
   sources under the words, and a fixed reply's Packages link. Tokens only,
   so dark mode and RTL follow; logical properties throughout.
   ========================================================================= */
.lm-avatar.lm-avatar--ai {
  background: var(--lm-gradient);
  color: var(--lm-on-gradient);
}

.lm-avatar--ai .lm-icon,
.lm-avatar--ai svg { inline-size: 56%; block-size: 56%; }

.lm-comment--ai .lm-comment__bubble {
  border: 1px solid var(--lm-border);
  background-color: var(--lm-surface);
}

.lm-comment--ai .lm-comment__name:hover { text-decoration: none; }

.lm-ai-badge {
  display: inline-flex;
  align-items: center;
  margin-inline-start: 4px;
  padding: 0 6px;
  border-radius: var(--lm-radius-pill);
  background: var(--lm-primary-soft);
  color: var(--lm-primary-text);
  font-size: 10px;
  font-weight: var(--lm-weight-semibold);
  line-height: 16px;
  letter-spacing: 0.02em;
}

.lm-comment__ai-verdict { margin-block: 4px 2px; }

.lm-comment__ai-note {
  margin: 4px 0 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.lm-comment__ai-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-block-start: 6px;
  color: var(--lm-primary-text);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  text-decoration: none;
}

.lm-comment__ai-cta:hover { text-decoration: underline; }
.lm-comment__ai-cta .lm-icon,
.lm-comment__ai-cta svg { inline-size: 14px; block-size: 14px; flex: 0 0 auto; }

.lm-comment__ai-sources { display: grid; gap: 2px; min-inline-size: 0; margin-block-start: 6px; }

.lm-comment__ai-sources-title {
  margin: 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
}

.lm-comment__ai-source-list {
  display: grid;
  gap: 2px;
  min-inline-size: 0;
  margin: 0;
  padding-inline-start: var(--lm-space-5);
  font-size: var(--lm-text-sm);
}

.lm-comment__ai-source-list li { min-inline-size: 0; }

.lm-comment__ai-generated { font-style: italic; }

/* "Luma AI is answering…" under the comment that asked, until the reply is
   there. */
.lm-comment--pending .lm-comment__bubble {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

/* =========================================================================
   Phase 35.3. AI Reply in the comment box: a small button under the box,
   and a private panel (styles, an optional note, a preview with Use /
   Try another / Cancel). Lined up with the box, past the portrait. Tokens
   only; logical properties throughout.
   ========================================================================= */
.lm-comment-form__tools {
  display: flex;
  margin-inline-start: 40px;
  margin-block-start: -2px;
}

.lm-ai-reply__open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-block-size: 28px;
  padding: 0 var(--lm-space-2);
  border: 0;
  border-radius: var(--lm-radius-pill);
  background: none;
  color: var(--lm-primary-text);
  font: inherit;
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
  cursor: pointer;
}

.lm-ai-reply__open:hover,
.lm-ai-reply__open[aria-expanded="true"] { background: var(--lm-primary-soft); }
.lm-ai-reply__open:focus-visible { outline: none; box-shadow: var(--lm-focus-ring); }
.lm-ai-reply__open .lm-icon,
.lm-ai-reply__open svg { inline-size: 14px; block-size: 14px; flex: 0 0 auto; }

.lm-ai-reply {
  display: grid;
  gap: var(--lm-space-2);
  min-inline-size: 0;
  margin-inline-start: 40px;
  padding: var(--lm-space-3);
  border: 1px solid var(--lm-border);
  border-radius: 14px;
  background: var(--lm-surface);
}

.lm-ai-reply[hidden],
.lm-ai-reply [hidden] { display: none; }

.lm-ai-reply__head {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  min-inline-size: 0;
}

.lm-ai-reply__mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  inline-size: 24px;
  block-size: 24px;
  border-radius: var(--lm-radius-pill);
  background: var(--lm-gradient);
  color: var(--lm-on-gradient);
}

.lm-ai-reply__mark .lm-icon,
.lm-ai-reply__mark svg { inline-size: 14px; block-size: 14px; }

.lm-ai-reply__about {
  flex: 1 1 auto;
  min-inline-size: 0;
  margin: 0;
  color: var(--lm-text);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  overflow-wrap: anywhere;
}

.lm-ai-reply__close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  inline-size: 28px;
  block-size: 28px;
  padding: 0;
  border: 0;
  border-radius: var(--lm-radius-pill);
  background: none;
  color: var(--lm-text-secondary);
  cursor: pointer;
}

.lm-ai-reply__close:hover { background: var(--lm-surface-secondary); }
.lm-ai-reply__close .lm-icon,
.lm-ai-reply__close svg { inline-size: 16px; block-size: 16px; }

.lm-ai-reply__busy {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

.lm-ai-reply__compose,
.lm-ai-reply__preview,
.lm-ai-reply__gate { display: grid; gap: var(--lm-space-2); min-inline-size: 0; }

.lm-ai-reply__label {
  margin: 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
}

.lm-ai-reply__styles { display: flex; flex-wrap: wrap; gap: 6px; }

.lm-ai-reply__style {
  min-block-size: 30px;
  padding: 0 var(--lm-space-3);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-pill);
  background: var(--lm-surface);
  color: var(--lm-text);
  font: inherit;
  font-size: var(--lm-text-xs);
  cursor: pointer;
}

.lm-ai-reply__style[aria-pressed="true"] {
  border-color: var(--lm-primary);
  background: var(--lm-primary-soft);
  color: var(--lm-primary-text);
  font-weight: var(--lm-weight-semibold);
}

.lm-ai-reply__style:focus-visible { outline: none; box-shadow: var(--lm-focus-ring); }

.lm-ai-reply__note { inline-size: 100%; min-inline-size: 0; }

.lm-ai-reply__actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }

.lm-ai-reply__text {
  margin: 0;
  padding: var(--lm-space-2) var(--lm-space-3);
  border-radius: 12px;
  background: var(--lm-surface-secondary);
  color: var(--lm-text);
  font-size: var(--lm-text-md);
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.lm-ai-reply__gate-text {
  margin: 0;
  color: var(--lm-text);
  font-size: var(--lm-text-sm);
  overflow-wrap: anywhere;
}

.lm-ai-reply__plans {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-self: start;
  color: var(--lm-primary-text);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  text-decoration: none;
}

.lm-ai-reply__plans:hover { text-decoration: underline; }
.lm-ai-reply__plans .lm-icon,
.lm-ai-reply__plans svg { inline-size: 14px; block-size: 14px; flex: 0 0 auto; }

.lm-ai-reply__error {
  margin: 0;
  color: var(--lm-danger-text);
  font-size: var(--lm-text-sm);
  overflow-wrap: anywhere;
}

.lm-ai-reply__hint {
  margin: 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
}

.lm-ai-reply__hint:empty { display: none; }

.lm-ai-reply__private {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  line-height: 1.4;
}

.lm-ai-reply__private .lm-icon,
.lm-ai-reply__private svg { inline-size: 12px; block-size: 12px; flex: 0 0 auto; margin-block-start: 2px; }

/* A long menu (the language menu, with many languages) scrolls inside itself
   instead of running off the screen. */
.lm-dropdown__menu--scroll {
  max-block-size: min(70vh, 460px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ==========================================================================
   Phase 38.8. Chart — a small column chart drawn on the server
   --------------------------------------------------------------------------
   Columns in the design system's colours (never colour alone: the legend
   names each series and the figures are in a table any reader can open);
   the axis is text under the plot. Right to left, time runs right to left:
   the plot is mirrored and the axis row follows the page's direction.
   ========================================================================== */

.lm-chart { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0; min-inline-size: 0; }
.lm-chart__caption { display: flex; flex-direction: column; gap: var(--lm-space-1); }
.lm-chart__title { font-weight: var(--lm-weight-semibold); font-size: var(--lm-text-sm); }
.lm-chart__legend { display: flex; flex-wrap: wrap; gap: var(--lm-space-1) var(--lm-space-3); font-size: var(--lm-text-xs); color: var(--lm-text-secondary); }
.lm-chart__key { display: inline-flex; align-items: center; gap: var(--lm-space-1); min-inline-size: 0; }
.lm-chart__total { color: var(--lm-text); font-weight: var(--lm-weight-semibold); direction: ltr; unicode-bidi: isolate; }
.lm-chart__swatch { inline-size: 10px; block-size: 10px; border-radius: 2px; flex: none; background-color: var(--lm-primary); }
.lm-chart__swatch--success { background-color: var(--lm-success); }
.lm-chart__swatch--danger { background-color: var(--lm-danger); }
.lm-chart__swatch--muted { background-color: var(--lm-border-strong); }
.lm-chart__plot { position: relative; block-size: 132px; padding-block-start: var(--lm-space-4); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); overflow: hidden; }
.lm-chart__max { position: absolute; inset-block-start: 2px; inset-inline-start: var(--lm-space-2); font-size: var(--lm-text-xs); color: var(--lm-subtle); }
.lm-chart__svg { display: block; inline-size: 100%; block-size: 100%; }
[dir="rtl"] .lm-chart__svg { transform: scaleX(-1); }
.lm-chart__base { stroke: var(--lm-border-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lm-chart__bar { fill: var(--lm-primary); }
.lm-chart__bar--success { fill: var(--lm-success); }
.lm-chart__bar--danger { fill: var(--lm-danger); }
.lm-chart__bar--muted { fill: var(--lm-border-strong); }
.lm-chart__axis { display: flex; justify-content: space-between; gap: var(--lm-space-2); font-size: var(--lm-text-xs); color: var(--lm-subtle); }
.lm-chart__axis span { min-inline-size: 0; overflow-wrap: anywhere; }
.lm-chart__empty { display: flex; align-items: center; gap: var(--lm-space-2); margin: 0; padding: var(--lm-space-3); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary);
  color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-chart__empty .lm-icon { inline-size: 16px; block-size: 16px; flex: none; }
.lm-chart__data summary { cursor: pointer; font-size: var(--lm-text-xs); color: var(--lm-text-secondary); }
/* The figures' table scrolls inside itself: never the page. */
.lm-chart__table { max-inline-size: 100%; max-block-size: 320px; overflow: auto; margin-block-start: var(--lm-space-2); }
.lm-chart__table .lm-table { font-size: var(--lm-text-xs); }
.lm-chart__table .lm-table th[scope="row"] { font-weight: var(--lm-weight-regular); white-space: nowrap; }

/* -------------------------------------------------------------------------
   Phase 74. Settings → Security, the second step of a sign-in, and the
   email-change confirmation.
   ------------------------------------------------------------------------- */
.lm-security__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--lm-space-2) var(--lm-space-4); margin: 0; padding: 0; list-style: none; }
.lm-security__fact { display: flex; align-items: flex-start; gap: var(--lm-space-2); color: var(--lm-text-secondary); font-size: var(--lm-text-sm); min-inline-size: 0; }
.lm-security__fact svg { flex: none; inline-size: 18px; block-size: 18px; margin-block-start: 1px; color: var(--lm-muted); }
.lm-security__fact.is-good svg { color: var(--lm-success-text); }
.lm-security__fact span { min-inline-size: 0; overflow-wrap: anywhere; }

.lm-security__current { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2) var(--lm-space-3); margin-block-end: var(--lm-space-4); }
.lm-security__label { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-security__value { font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; min-inline-size: 0; }

.lm-security__pending { display: flex; align-items: flex-start; gap: var(--lm-space-3); margin-block-end: var(--lm-space-4); padding: var(--lm-space-3); border: 1px solid var(--lm-card-border); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); }
.lm-security__pending > svg { flex: none; inline-size: 20px; block-size: 20px; color: var(--lm-warning-text); }
.lm-security__pending-body { display: grid; gap: var(--lm-space-1); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-security__pending-body p { margin: 0; }

.lm-security__row-actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); margin-block: var(--lm-space-2); }
.lm-security__form { display: grid; gap: var(--lm-space-3); margin-block-start: var(--lm-space-3); }
.lm-security__form[hidden] { display: none; }
.lm-security__danger { color: var(--lm-danger-text); }

.lm-security__status { display: flex; align-items: flex-start; gap: var(--lm-space-3); margin-block-end: var(--lm-space-2); }
.lm-security__status > svg { flex: none; inline-size: 28px; block-size: 28px; color: var(--lm-muted); }
.lm-security__status.is-on > svg { color: var(--lm-success-text); }
.lm-security__status p { margin: var(--lm-space-1) 0 0; }

.lm-security__note { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin-block-start: var(--lm-space-3); }
.lm-security__note svg { flex: none; inline-size: 16px; block-size: 16px; margin-block-start: 2px; }

.lm-security__steps { margin: 0; padding-inline-start: var(--lm-space-5); color: var(--lm-text-secondary); font-size: var(--lm-text-sm); display: grid; gap: var(--lm-space-1); }
.lm-security__qr { inline-size: min(220px, 100%); padding: var(--lm-space-2); border-radius: var(--lm-radius-md); background-color: var(--lm-qr-ground); border: 1px solid var(--lm-card-border); }
.lm-security__qr:empty { display: none; }
.lm-security__qr svg { display: block; inline-size: 100%; block-size: auto; }
.lm-security__key { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); }
.lm-security__key .lm-label { inline-size: 100%; margin: 0; }
.lm-security__key code { padding: var(--lm-space-1) var(--lm-space-2); border-radius: var(--lm-radius-sm); background-color: var(--lm-surface-secondary); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--lm-text-sm); letter-spacing: 0.04em; overflow-wrap: anywhere; min-inline-size: 0; }

.lm-security__codes { display: grid; gap: var(--lm-space-3); margin-block-start: var(--lm-space-3); }
.lm-security__codes[hidden] { display: none; }
.lm-security__code-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--lm-space-2); margin: 0; padding-block: var(--lm-space-3); padding-inline: calc(var(--lm-space-3) + 1.6em) var(--lm-space-3); border: 1px dashed var(--lm-border); border-radius: var(--lm-radius-md); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--lm-text-base); text-align: start; }

.lm-security__header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--lm-space-2); }
.lm-security__header .lm-btn svg { inline-size: 16px; block-size: 16px; }

.lm-security__list { display: grid; margin: 0; padding: 0; list-style: none; }
.lm-security__list:empty { display: none; }
.lm-security__item { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2) var(--lm-space-3); padding-block: var(--lm-space-3); }
.lm-security__item + .lm-security__item { border-block-start: 1px solid var(--lm-card-border); }
.lm-security__icon { display: inline-flex; flex: 0 0 36px; align-items: center; justify-content: center; inline-size: 36px; block-size: 36px; border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); color: var(--lm-text-secondary); }
.lm-security__icon svg { inline-size: 20px; block-size: 20px; }
.lm-security__item.is-current .lm-security__icon { color: var(--lm-success-text); }
.lm-security__body { display: grid; flex: 1 1 180px; gap: 2px; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-security__body .lm-help { margin: 0; }

.lm-two-factor__code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--lm-text-lg); letter-spacing: 0.12em; text-align: center; }

/* Phase 75. Settings → Account management: the archive's real state, what
   stepping away and leaving mean, and what still needs the member. */
.lm-manage__subhead { margin: 0 0 var(--lm-space-2); font-size: var(--lm-text-sm); font-weight: var(--lm-weight-semibold); color: var(--lm-text); }
.lm-manage__list { display: grid; gap: var(--lm-space-1); margin: 0 0 var(--lm-space-3); padding-inline-start: var(--lm-space-5); color: var(--lm-text-secondary); font-size: var(--lm-text-sm); list-style: disc; }
.lm-manage__list li::marker, .lm-manage__blockers li::marker { color: var(--lm-muted); }
.lm-manage__list li { overflow-wrap: anywhere; }
.lm-manage__timeline { display: grid; gap: var(--lm-space-2); margin: 0 0 var(--lm-space-4); padding-inline-start: var(--lm-space-5); font-size: var(--lm-text-sm); list-style: decimal; }
.lm-manage__timeline li::marker { color: var(--lm-text-secondary); font-weight: var(--lm-weight-semibold); }
.lm-manage__timeline li { overflow-wrap: anywhere; }
.lm-manage__columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--lm-space-2) var(--lm-space-5); }
.lm-manage__blockers { margin-block: var(--lm-space-3); padding: var(--lm-space-3); border: 1px solid color-mix(in srgb, var(--lm-warning-text) 30%, transparent); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); font-size: var(--lm-text-sm); }
.lm-manage__blockers-lead { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: 0 0 var(--lm-space-2); font-weight: var(--lm-weight-semibold); }
.lm-manage__blockers-lead svg { flex: none; inline-size: 18px; block-size: 18px; color: var(--lm-warning-text); }
.lm-manage__blockers ul { display: grid; gap: var(--lm-space-1); margin: 0; padding-inline-start: var(--lm-space-5); color: var(--lm-text-secondary); list-style: disc; }
.lm-manage__blockers li { overflow-wrap: anywhere; }
.lm-manage__confirm { align-items: flex-start; font-size: var(--lm-text-sm); }
.lm-manage__danger { border-color: color-mix(in srgb, var(--lm-danger) 32%, var(--lm-card-border)); }
.lm-manage__danger .lm-card__title { color: var(--lm-danger-text); }
.lm-manage__exports { display: grid; margin: 0 0 var(--lm-space-3); padding: 0; list-style: none; }
.lm-manage__export { display: grid; gap: var(--lm-space-1); padding-block: var(--lm-space-3); }
.lm-manage__export + .lm-manage__export { border-block-start: 1px solid var(--lm-card-border); }
.lm-manage__export-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); }
.lm-manage__export-line { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: 0; font-size: var(--lm-text-sm); color: var(--lm-text-secondary); overflow-wrap: anywhere; min-inline-size: 0; }
.lm-manage__export-line svg { flex: none; inline-size: 16px; block-size: 16px; margin-block-start: 2px; }
.lm-manage__export[data-status="ready"] .lm-manage__export-line svg { color: var(--lm-success-text); }
.lm-manage__export[data-status="failed"] .lm-manage__export-line svg { color: var(--lm-danger-text); }
.lm-manage__spinner { flex: none; display: inline-block; inline-size: 14px; block-size: 14px; margin-block-start: 3px; border: 2px solid var(--lm-border); border-block-start-color: var(--lm-primary); border-radius: 50%; animation: lm-spin 680ms linear infinite; }
.lm-manage__unlock { padding: var(--lm-space-3); border: 1px solid var(--lm-card-border); border-radius: var(--lm-radius-md); }
.lm-manage .lm-btn svg { inline-size: 16px; block-size: 16px; }
.lm-confirm-email__address { margin: 0 0 var(--lm-space-4); font-size: var(--lm-text-lg); font-weight: var(--lm-weight-semibold); text-align: center; overflow-wrap: anywhere; }
.lm-security { min-inline-size: 0; }
.lm-security__setup { justify-items: start; }
.lm-security__setup .lm-field, .lm-security__setup .lm-settings__actions { justify-self: stretch; }

/* -------------------------------------------------------------------------
   Phase 76. Profile details and who may see each one.
   Edit profile: one card per section, "who can see this" beside each field;
   work and education as lists edited in a dialog. The About tab: groups,
   each left out when empty; the owner sees each field's audience.
   ------------------------------------------------------------------------- */
.lm-profile-edit { display: flex; flex-direction: column; gap: var(--lm-space-4); min-inline-size: 0; }
.lm-profile-edit__nav { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }
.lm-profile-edit__nav a,
.lm-about-groups__nav a { display: inline-flex; align-items: center; min-block-size: 36px; padding-inline: var(--lm-space-4); border: 1px solid var(--lm-card-border); border-radius: var(--lm-radius-pill); background-color: var(--lm-surface); color: var(--lm-text-secondary); font-size: var(--lm-text-sm); font-weight: var(--lm-weight-medium); text-decoration: none; }
.lm-profile-edit__nav a:hover,
.lm-about-groups__nav a:hover { border-color: var(--lm-primary); color: var(--lm-primary-text); }
.lm-profile-edit__form .lm-card__body { display: flex; flex-direction: column; gap: var(--lm-space-4); }
.lm-profile-edit__labelrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-2) var(--lm-space-3); min-inline-size: 0; }
.lm-profile-edit__labelrow > .lm-label { margin: 0; }
.lm-label--sub { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); font-weight: var(--lm-weight-medium); }
.lm-profile-edit__group { display: flex; flex-direction: column; gap: var(--lm-space-3); min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.lm-profile-edit__group > legend { margin-block-end: var(--lm-space-1); padding: 0; }
.lm-profile-edit__audiences { display: grid; gap: var(--lm-space-2); margin-block-start: var(--lm-space-2); padding: var(--lm-space-3); border: 1px solid var(--lm-card-border); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); }
.lm-profile-edit__public { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: 0; }
.lm-profile-edit__public svg { flex: none; inline-size: 15px; block-size: 15px; margin-block-start: 2px; }
.lm-profile-edit__actions { gap: var(--lm-space-2); padding-block-end: 0; }
.lm-profile-edit__listhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-2); }
.lm-profile-edit__listhead .lm-btn svg { inline-size: 16px; block-size: 16px; }
.lm-profile-edit__social + .lm-profile-edit__social { margin-block-start: var(--lm-space-1); }

.lm-audience { display: inline-flex; align-items: center; gap: var(--lm-space-2); max-inline-size: 100%; color: var(--lm-text-secondary); }
.lm-audience__icon { display: inline-flex; flex: none; inline-size: 16px; block-size: 16px; }
.lm-audience__icon > span { display: inline-flex; inline-size: 16px; block-size: 16px; }
.lm-audience__icon svg { inline-size: 16px; block-size: 16px; }
.lm-audience__select.lm-select { inline-size: auto; min-inline-size: 0; min-block-size: 36px; padding-block: var(--lm-space-1); padding-inline-start: var(--lm-space-3); padding-inline-end: var(--lm-space-8); border-radius: var(--lm-radius-pill); font-size: var(--lm-text-sm); background-size: 16px; }

.lm-audience-badge { display: inline-flex; align-items: center; vertical-align: middle; margin-inline-start: var(--lm-space-2); color: var(--lm-muted); white-space: normal; }
.lm-audience-badge svg { inline-size: 14px; block-size: 14px; }

.lm-profile-entries { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.lm-profile-entry { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--lm-space-3); padding-block: var(--lm-space-3); }
.lm-profile-entry + .lm-profile-entry { border-block-start: 1px solid var(--lm-card-border); }
.lm-profile-entry__icon,
.lm-about-entry__icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: var(--lm-radius-md); background-color: var(--lm-primary-soft); color: var(--lm-primary-text); }
.lm-profile-entry__icon svg,
.lm-about-entry__icon svg { inline-size: 20px; block-size: 20px; }
.lm-profile-entry__body,
.lm-about-entry__body { min-inline-size: 0; }
.lm-profile-entry__title,
.lm-about-entry__title { margin: 0; color: var(--lm-text); font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-profile-entry__meta,
.lm-about-entry__meta { margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); overflow-wrap: anywhere; }
.lm-profile-entry__actions { display: flex; gap: var(--lm-space-1); }
.lm-profile-entry__actions .lm-icon-btn svg { inline-size: 18px; block-size: 18px; }
.lm-profile-entry .lm-audience-badge { margin: 0; }

.lm-modal__dialog.lm-profile-entry-dialog { inline-size: 100%; max-inline-size: 560px; }
.lm-profile-entry-dialog__body { display: flex; flex-direction: column; gap: var(--lm-space-4); }
/* From and To one under the other: each month and year pair gets the whole width (a year never clipped by its select's arrow). */
.lm-profile-entry-dialog__dates { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--lm-space-4); }
.lm-profile-entry-dialog__date { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--lm-space-2); }
#lm-profile-entry-form[data-lm-entry-kind="work"] .lm-for-education,
#lm-profile-entry-form[data-lm-entry-kind="education"] .lm-for-work,
#lm-profile-entry-form[data-lm-entry-mode="new"] .lm-for-edit,
#lm-profile-entry-form[data-lm-entry-mode="edit"] .lm-for-new { display: none; }

.lm-about-groups { display: flex; flex-direction: column; gap: var(--lm-space-4); min-inline-size: 0; }
.lm-about-groups__nav { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }
.lm-about-group { scroll-margin-block-start: calc(var(--lm-header-height) + var(--lm-space-4)); }
.lm-about-group__head { display: flex; align-items: center; justify-content: space-between; gap: var(--lm-space-3); padding: var(--lm-space-4) var(--lm-space-5) 0; }
.lm-about-group__title { margin: 0; color: var(--lm-text); font-size: var(--lm-text-lg); font-weight: var(--lm-weight-semibold); }
.lm-about-group__head .lm-btn svg { inline-size: 16px; block-size: 16px; }
.lm-about-list { display: flex; flex-direction: column; gap: var(--lm-space-3); margin: 0; padding: var(--lm-space-4) var(--lm-space-5); list-style: none; }
.lm-about-list__item { display: flex; align-items: flex-start; gap: var(--lm-space-3); color: var(--lm-text); font-size: var(--lm-text-md); line-height: var(--lm-leading); min-inline-size: 0; }
.lm-about-list__item > svg { flex: none; inline-size: 20px; block-size: 20px; margin-block-start: 2px; color: var(--lm-muted); }
.lm-about-list__text { min-inline-size: 0; overflow-wrap: anywhere; }
.lm-about-list__text--pre { white-space: pre-wrap; }
.lm-about-list__item .lm-audience-badge { margin-block-start: 4px; }
.lm-about-entries { display: flex; flex-direction: column; margin: 0; padding: var(--lm-space-2) var(--lm-space-5) var(--lm-space-3); list-style: none; }
.lm-about-entry { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: var(--lm-space-3); padding-block: var(--lm-space-3); }
.lm-about-entry + .lm-about-entry { border-block-start: 1px solid var(--lm-card-border); }
.lm-about-entry__text { margin: var(--lm-space-2) 0 0; color: var(--lm-text); font-size: var(--lm-text-sm); white-space: pre-wrap; overflow-wrap: anywhere; }
.lm-about-group .lm-about__value a { color: var(--lm-primary-text); }

.lm-privacy-fields { display: grid; margin: 0 0 var(--lm-space-4); }
.lm-privacy-fields__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-2); padding-block: var(--lm-space-2); }
.lm-privacy-fields__row + .lm-privacy-fields__row { border-block-start: 1px solid var(--lm-card-border); }
.lm-privacy-fields__row dt { color: var(--lm-text); font-size: var(--lm-text-sm); }
.lm-privacy-fields__row dd { display: inline-flex; align-items: center; gap: var(--lm-space-2); margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-privacy-fields__row dd svg { inline-size: 15px; block-size: 15px; }

@media (max-width: 640px) {
  .lm-profile-entry { grid-template-columns: auto minmax(0, 1fr) auto; }
  .lm-profile-entry .lm-audience-badge { grid-column: 3; grid-row: 1; }
  .lm-profile-entry__actions { grid-column: 2 / -1; justify-content: flex-end; }
  .lm-profile-entry-dialog__dates { grid-template-columns: minmax(0, 1fr); }
  .lm-about-group__head { padding-inline: var(--lm-space-4); }
  .lm-about-list, .lm-about-entries { padding-inline: var(--lm-space-4); }
  .lm-profile-edit__actions .lm-btn { inline-size: auto; flex: 1 1 0; }
}
/* The dialog's buttons stay in reach while its fields scroll (a long form on a phone). */
.lm-profile-entry-dialog .lm-modal__footer { position: sticky; inset-block-end: 0; z-index: 1; background-color: var(--lm-surface); }
/* A section's title and its explanation stack: side by side they squeeze each other on a phone. */
.lm-profile-edit__form > .lm-card__header { flex-direction: column; align-items: flex-start; gap: var(--lm-space-1); }

/* =========================================================================
   Phase 77. The profile, redesigned
   -------------------------------------------------------------------------
   The approved mockup's shape (header card, tabs card, posts, side cards
   beside them) with the reference's patterns where the mockup is silent:
   icon tabs that never scroll sideways, side cards with "See all", a photo
   card, the owner's checklist, person and group rows, media sections, a
   calmer private state. Scoped under .lm-profile-feed (the profile's own
   column) so the shared tab and widget styles other pages use do not move.
   The header's physical anchors stay as they were (rtl.css).
   ========================================================================= */

/* -- Header ---------------------------------------------------------------- */
.lm-profile-feed .lm-profile { overflow: visible; }
.lm-profile-feed .lm-profile__cover {
  block-size: 236px;
  overflow: hidden;
  /* The card's inner curve (its radius less its 1px border), so no sliver
     of the card shows at the corners. */
  border-start-start-radius: calc(var(--lm-radius-lg) - 1px);
  border-start-end-radius: calc(var(--lm-radius-lg) - 1px);
}
.lm-profile-feed .lm-profile__cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  block-size: 45%;
  /* A darkening scrim in both schemes (--lm-text is light in dark mode). */
  background: linear-gradient(to top, color-mix(in srgb, var(--lm-overlay) 45%, transparent), transparent);
  pointer-events: none;
}
.lm-profile-feed .lm-profile__cover-edit { z-index: 1; }
.lm-profile-feed .lm-profile__avatar .lm-avatar { box-shadow: var(--lm-shadow-md); }
.lm-profile__avatar-edit {
  position: absolute;
  inset-block-end: 12px;
  inset-inline-start: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 38px;
  block-size: 38px;
  border: 3px solid var(--lm-surface);
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
  box-shadow: var(--lm-shadow-sm);
  transition: background-color var(--lm-fast);
}
.lm-profile__avatar-edit:hover { background-color: var(--lm-primary-soft); color: var(--lm-primary-text); }
.lm-profile__avatar-edit svg { inline-size: 18px; block-size: 18px; }
.lm-profile-feed .lm-profile__name { font-size: 1.75rem; letter-spacing: -0.01em; }
@media (min-width: 768px) {
  .lm-profile-feed .lm-profile__identity { max-inline-size: 460px; }
}
.lm-profile-feed .lm-profile__fact { color: var(--lm-text-secondary); }
.lm-profile-feed .lm-profile__actions [data-lm-message-open] { background-color: var(--lm-surface-secondary); color: var(--lm-text); }
.lm-profile-feed .lm-profile__actions [data-lm-message-open]:hover { background-color: var(--lm-sunken); color: var(--lm-text); }
.lm-profile__join svg { inline-size: 18px; block-size: 18px; }

/* -- Tabs card: the tabs that fit, then More ---------------------------------- */
.lm-profile-tabs-host { display: flex; flex-direction: column; gap: var(--lm-space-4); min-inline-size: 0; }
.lm-profile-tabs { display: flex; align-items: stretch; gap: var(--lm-space-1); padding: var(--lm-space-1) var(--lm-space-2); min-inline-size: 0; }
.lm-profile-tabs__row { display: flex; flex: 1 1 auto; gap: var(--lm-space-1); min-inline-size: 0; overflow: hidden; }
.lm-profile-tab {
  position: relative;
  display: inline-flex;
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
  gap: var(--lm-space-2);
  min-block-size: 48px;
  padding-inline: var(--lm-space-4);
  border: 0;
  border-radius: var(--lm-radius-md);
  background: none;
  color: var(--lm-text-secondary);
  font: inherit;
  font-size: var(--lm-text-base);
  font-weight: var(--lm-weight-semibold);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--lm-fast), color var(--lm-fast);
}
.lm-profile-tab svg { flex: none; inline-size: 18px; block-size: 18px; }
.lm-profile-tab:hover { background-color: var(--lm-surface-secondary); color: var(--lm-text); }
/* An inset ring: the row clips anything drawn outside a tab. */
.lm-profile-tab:focus-visible, .lm-profile-side__toggle:focus-visible { outline: 2px solid var(--lm-primary-text); outline-offset: -2px; box-shadow: none; }
/* The reference's pill bar: the active tab is a tinted pill (primary text
   on the soft tint, never the light coral as text). */
/* ...and heavier, so the choice reads without colour (and in forced colours). */
.lm-profile-tab.is-active, .lm-profile-tab.is-active:hover { background-color: var(--lm-primary-soft); color: var(--lm-primary-text); font-weight: var(--lm-weight-bold); }
.lm-profile-tabs.is-measuring .lm-profile-tab { flex: 0 0 auto; }
.lm-profile-tabs__more { display: flex; flex: none; padding-inline-start: var(--lm-space-1); border-inline-start: 1px solid var(--lm-border); }
.lm-profile-tabs__more[hidden] { display: none; }
.lm-profile-tabs__more-btn { flex: none; }
.lm-profile-tabs__more .lm-dropdown__item[hidden] { display: none; }
.lm-profile-tabs__more .lm-dropdown__item svg { inline-size: 18px; block-size: 18px; }

/* -- Posts: side cards beside the posts where the widgets column is not shown -- */
.lm-profile-overview { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--lm-space-4); align-items: start; }
.lm-profile-overview__main { display: flex; flex-direction: column; gap: var(--lm-space-4); min-inline-size: 0; }
.lm-profile-overview__aside { min-inline-size: 0; }

/* -- Side cards ----------------------------------------------------------------- */
.lm-profile-side { display: flex; flex-direction: column; gap: var(--lm-space-4); min-inline-size: 0; }
.lm-profile-side__card { overflow: hidden; }
.lm-profile-side__head { display: flex; align-items: center; justify-content: space-between; gap: var(--lm-space-3); padding: var(--lm-space-4) var(--lm-space-5) var(--lm-space-2); }
.lm-profile-side__title { display: inline-flex; align-items: center; gap: var(--lm-space-2); margin: 0; color: var(--lm-text); font-size: var(--lm-text-md); font-weight: var(--lm-weight-semibold); }
.lm-profile-side__title svg { flex: none; inline-size: 19px; block-size: 19px; color: var(--lm-muted); }
.lm-profile-side__more { flex: none; color: var(--lm-primary-text); font-size: var(--lm-text-sm); font-weight: var(--lm-weight-semibold); text-decoration: none; }
.lm-profile-side__more:hover { text-decoration: underline; }
.lm-profile-side__toggle { display: flex; flex: 1 1 auto; align-items: center; gap: var(--lm-space-2); min-inline-size: 0; min-block-size: 32px; padding: 0; border: 0; border-radius: var(--lm-radius-sm); background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
/* Open: the chevron points up (fold); folded: down (open). */
.lm-profile-side__toggle > svg { flex: none; inline-size: 20px; block-size: 20px; color: var(--lm-muted); transform: rotate(180deg); transition: transform var(--lm-fast); }
.lm-profile-intro--collapsible.is-collapsed .lm-profile-side__toggle > svg { transform: none; }
.lm-profile-intro--collapsible.is-collapsed .lm-profile-intro__body { display: none; }
.lm-profile-intro--collapsible.is-collapsed .lm-profile-side__head { padding-block-end: var(--lm-space-4); }
.lm-profile-side__empty { margin: 0 0 var(--lm-space-3); color: var(--lm-muted); font-size: var(--lm-text-sm); }

.lm-profile-intro .lm-profile-side__head { min-block-size: 56px; }
.lm-profile-intro__body { display: flex; flex-direction: column; gap: var(--lm-space-3); padding: var(--lm-space-1) var(--lm-space-5) var(--lm-space-5); }
.lm-profile-intro__bio { margin: 0; color: var(--lm-text); line-height: var(--lm-leading); white-space: pre-wrap; overflow-wrap: anywhere; }
.lm-profile-intro__facts { display: flex; flex-direction: column; gap: var(--lm-space-3); margin: 0; padding: 0; list-style: none; }
.lm-profile-intro__facts li { display: flex; align-items: flex-start; gap: var(--lm-space-3); color: var(--lm-text); font-size: var(--lm-text-base); min-inline-size: 0; }
.lm-profile-intro__facts li > svg { flex: none; inline-size: 18px; block-size: 18px; margin-block-start: 2px; color: var(--lm-muted); }
.lm-profile-intro__facts li > span, .lm-profile-intro__facts li > a { min-inline-size: 0; overflow-wrap: anywhere; }
.lm-profile-intro__facts a { color: var(--lm-primary-text); }
.lm-profile-intro__links { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); margin: 0; padding: 0; list-style: none; }
.lm-profile-intro__links a { display: inline-flex; align-items: center; gap: var(--lm-space-1); min-block-size: 32px; padding-inline: var(--lm-space-3); border-radius: var(--lm-radius-pill); background-color: var(--lm-surface-secondary); color: var(--lm-text); font-size: var(--lm-text-sm); font-weight: var(--lm-weight-medium); text-decoration: none; }
.lm-profile-intro__links a:hover { background-color: var(--lm-primary-soft); color: var(--lm-primary-text); }
.lm-profile-intro__links svg { inline-size: 15px; block-size: 15px; }
.lm-profile-intro__edit svg { inline-size: 16px; block-size: 16px; }
.lm-profile-intro__privacy { display: inline-flex; align-items: center; justify-content: center; gap: var(--lm-space-2); min-block-size: 32px; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); text-decoration: none; }
.lm-profile-intro__privacy:hover { color: var(--lm-primary-text); text-decoration: underline; }
.lm-profile-intro__privacy svg { flex: none; inline-size: 15px; block-size: 15px; }

.lm-profile-side__photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: var(--lm-space-1) var(--lm-space-5) var(--lm-space-5); }
.lm-profile-side__photos a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--lm-radius-sm); background-color: var(--lm-surface-secondary); }
.lm-profile-side__photos img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform var(--lm-normal); }
.lm-profile-side__photos a:hover img { transform: scale(1.05); }

.lm-profile-side__people, .lm-profile-side__groups { display: flex; flex-direction: column; margin: 0; padding: var(--lm-space-1) var(--lm-space-3) var(--lm-space-3); list-style: none; }
.lm-profile-side__people li, .lm-profile-side__groups li { display: flex; align-items: center; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-profile-side__person, .lm-profile-side__group { display: flex; flex: 1 1 auto; align-items: center; gap: var(--lm-space-3); min-inline-size: 0; padding: var(--lm-space-2); border-radius: var(--lm-radius-md); color: inherit; text-decoration: none; }
.lm-profile-side__person:hover, .lm-profile-side__group:hover { background-color: var(--lm-surface-secondary); }
.lm-profile-side__person-text { display: flex; flex-direction: column; min-inline-size: 0; }
.lm-profile-side__person-name { overflow: hidden; color: var(--lm-text); font-weight: var(--lm-weight-semibold); text-overflow: ellipsis; white-space: nowrap; }
.lm-profile-side__person-meta { overflow: hidden; color: var(--lm-muted); font-size: var(--lm-text-sm); text-overflow: ellipsis; white-space: nowrap; }
.lm-profile-side__people .lm-follow { flex: none; }

.lm-profile-check .lm-profile-side__head { padding-block-end: var(--lm-space-1); }
.lm-profile-check__pct { color: var(--lm-primary-text); font-weight: var(--lm-weight-bold); }
.lm-profile-check__bar { block-size: 8px; margin: var(--lm-space-1) var(--lm-space-5) var(--lm-space-2); overflow: hidden; border-radius: var(--lm-radius-pill); background-color: var(--lm-sunken); }
.lm-profile-check__bar span { display: block; block-size: 100%; border-radius: inherit; background: var(--lm-gradient); }
.lm-profile-check__list { display: flex; flex-direction: column; margin: 0; padding: 0 var(--lm-space-3) var(--lm-space-3); list-style: none; }
.lm-profile-check__item > a, .lm-profile-check__item.is-done { display: flex; align-items: center; gap: var(--lm-space-3); min-block-size: 40px; padding-inline: var(--lm-space-2); border-radius: var(--lm-radius-md); color: var(--lm-text); font-size: var(--lm-text-sm); text-decoration: none; }
.lm-profile-check__item > a:hover { background-color: var(--lm-surface-secondary); }
.lm-profile-check__item > a > span:not(.lm-profile-check__ring) { flex: 1 1 auto; }
.lm-profile-check__item > a > svg { flex: none; inline-size: 16px; block-size: 16px; color: var(--lm-muted); }
.lm-profile-check__item.is-done { color: var(--lm-muted); text-decoration: line-through; }
.lm-profile-check__item.is-done > svg { flex: none; inline-size: 20px; block-size: 20px; color: var(--lm-success-text); }
.lm-profile-check__ring { flex: none; inline-size: 20px; block-size: 20px; border: 2px solid var(--lm-border-strong); border-radius: var(--lm-radius-pill); }
html[dir="rtl"] .lm-profile-check__item > a > svg { transform: scaleX(-1); }

/* -- Media sections (photos, reels, series) ------------------------------------ */
.lm-profile-media { overflow: hidden; }
.lm-profile-media__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2) var(--lm-space-3); padding: var(--lm-space-4) var(--lm-space-5); }
.lm-profile-media__title { margin: 0; margin-inline-end: auto; color: var(--lm-text); font-size: var(--lm-text-lg); font-weight: var(--lm-weight-semibold); }
.lm-profile-media__head .lm-reelgrid__count { margin: 0; }
.lm-profile-media__head .lm-btn svg { inline-size: 16px; block-size: 16px; }
.lm-profile-media .lm-series-tab__head { margin: 0; }
.lm-profile-media .lm-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0 var(--lm-space-5) var(--lm-space-5); }
.lm-profile-media .lm-photo-tile { border-radius: var(--lm-radius-md); }
.lm-profile-media .lm-reelgrid, .lm-profile-media .lm-seriescards { padding: 0 var(--lm-space-5) var(--lm-space-5); }
.lm-video-tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background-color: var(--lm-sunken); }
.lm-video-tile img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.lm-video-tile__blank { display: flex; align-items: center; justify-content: center; inline-size: 100%; block-size: 100%; color: var(--lm-muted); }
.lm-video-tile__blank svg { inline-size: 36px; block-size: 36px; }
.lm-video-tile__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; margin: auto; border-radius: var(--lm-radius-pill); background-color: var(--lm-overlay); color: var(--lm-on-scrim); pointer-events: none; }
/* The triangle never mirrors, so its optical nudge is physical too. */
.lm-video-tile__play svg { inline-size: 20px; block-size: 20px; translate: 1px 0; }
.lm-video-tile__time { position: absolute; inset-block-end: var(--lm-space-2); inset-inline-end: var(--lm-space-2); padding: 2px var(--lm-space-2); border-radius: var(--lm-radius-pill); background-color: var(--lm-overlay); color: var(--lm-on-scrim); font-size: var(--lm-text-xs); font-weight: var(--lm-weight-semibold); }
.lm-profile-media .lm-load-more { margin: 0 var(--lm-space-5) var(--lm-space-5); }
/* Inside the reel grid its padding already insets the button; the series
   button sits in the card itself. */
.lm-profile-media .lm-reelgrid .lm-reelgrid__more { margin: var(--lm-space-3) 0 0; }
.lm-profile-media > .lm-reelgrid__more { display: flex; inline-size: auto; margin: 0 var(--lm-space-5) var(--lm-space-5); }
.lm-profile-media .lm-empty { padding-block: var(--lm-space-8); }

/* -- A private account ----------------------------------------------------------- */
.lm-profile-feed .lm-profile-private { display: flex; flex-direction: column; align-items: center; gap: var(--lm-space-2); padding: var(--lm-space-10) var(--lm-space-6); text-align: center; }
.lm-profile-feed .lm-profile-private__icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 72px; block-size: 72px; margin-block-end: var(--lm-space-2); border-radius: var(--lm-radius-pill); background-color: var(--lm-primary-soft); color: var(--lm-primary-text); }
.lm-profile-feed .lm-profile-private__icon svg { inline-size: 32px; block-size: 32px; }
.lm-profile-feed .lm-profile-private__title { margin: 0; font-size: var(--lm-text-xl); }
.lm-profile-feed .lm-profile-private__text { max-inline-size: 420px; margin: 0; color: var(--lm-text-secondary); }
.lm-profile-private__action { margin-block-start: var(--lm-space-3); }

/* -- About (Phase 76's groups): a section list beside them, when there is room -- */
.lm-about-groups__list { display: flex; flex-direction: column; gap: var(--lm-space-4); min-inline-size: 0; }

/* -- Widths -------------------------------------------------------------------- */
@media (min-width: 1400px) {
  /* The widgets column shows the side cards; the copy in the Posts tab rests. */
  .lm-profile-overview__aside { display: none; }
}

@media (min-width: 1024px) and (max-width: 1399px) {
  .lm-profile-overview { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); }
  .lm-profile-overview--solo { grid-template-columns: minmax(0, 1fr); }
  /* Sticky like the widgets column, and like it scrolling on its own when
     it is taller than the screen (a 768px-high laptop), so no card is out
     of reach until the posts end. */
  .lm-profile-overview__aside {
    position: sticky;
    inset-block-start: calc(var(--lm-header-height) + var(--lm-space-4));
    max-block-size: calc(100vh - var(--lm-header-height) - var(--lm-space-8));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--lm-border-strong) transparent;
  }
  .lm-profile-overview__aside .lm-profile-side > * { flex-shrink: 0; }
}

@media (min-width: 1024px) {
  .lm-profile-feed .lm-about-groups { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--lm-space-4); align-items: start; }
  .lm-profile-feed .lm-about-groups > .lm-alert { grid-column: 1 / -1; }
  .lm-profile-feed .lm-about-groups__nav { position: sticky; inset-block-start: calc(var(--lm-header-height) + var(--lm-space-4)); flex-direction: column; flex-wrap: nowrap; gap: var(--lm-space-1); padding: var(--lm-space-2); border: 1px solid var(--lm-card-border); border-radius: var(--lm-radius-lg); background-color: var(--lm-surface); }
  .lm-profile-feed .lm-about-groups__nav a { justify-content: flex-start; min-block-size: 40px; border: 0; border-radius: var(--lm-radius-md); background: none; }
  .lm-profile-feed .lm-about-groups__nav a:hover { background-color: var(--lm-primary-soft); }
  .lm-profile-feed .lm-about-groups > .lm-card { grid-column: 1 / -1; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  /* Beside the portrait there is room for the buttons in one row only when
     they are a little tighter. */
  .lm-profile-feed .lm-profile__actions { gap: var(--lm-space-2); }
  .lm-profile-feed .lm-profile__actions > .lm-btn { padding-inline: var(--lm-space-4); }
}

@media (max-width: 1023px) {
  /* Only About me (folding) and the owner's checklist beside the posts; the
     rest is in the tabs. */
  .lm-profile-side--panel .lm-profile-side--secondary { display: none; }
  /* Nothing left beside the posts at all: no empty row and gap above them. */
  .lm-profile-overview__aside--wide { display: none; }
  .lm-profile-feed .lm-profile__cover { block-size: 200px; }
}

@media (max-width: 767px) {
  .lm-profile-feed .lm-profile__cover { block-size: 150px; }
  .lm-profile-feed .lm-profile__avatar .lm-avatar { inline-size: 104px; block-size: 104px; border-width: 4px; }
  .lm-profile-feed .lm-profile__avatar { margin-block-start: -60px; }
  .lm-profile__avatar-edit { inline-size: 32px; block-size: 32px; inset-block-end: 4px; inset-inline-start: 2px; }
  .lm-profile__avatar-edit svg { inline-size: 15px; block-size: 15px; }
  .lm-profile-feed .lm-profile__name { font-size: var(--lm-text-2xl); }
  /* At most two buttons a row (each at least 40%), so the last one keeps the
     more button company instead of leaving it alone on a line. */
  .lm-profile-feed .lm-profile__actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }
  .lm-profile-feed .lm-profile__actions > .lm-btn { flex: 1 1 auto; min-inline-size: 40%; }
  .lm-profile-feed .lm-profile__actions > .lm-dropdown { flex: none; margin-inline-start: auto; }
  /* The three figures read alike: a number, then its word, on one line
     (the links used to stack while Posts did not). */
  .lm-profile-feed .lm-profile__figure-link { flex-direction: row; align-items: baseline; gap: 6px; padding-inline: 0; }
  .lm-profile-tabs { gap: 0; padding: var(--lm-space-1); }
  .lm-profile-tabs__row { gap: 0; }
  .lm-profile-tab { gap: 4px; min-block-size: 46px; padding-inline: var(--lm-space-2); font-size: var(--lm-text-sm); }
  .lm-profile-tab svg { inline-size: 16px; block-size: 16px; }
  /* More keeps its word and chevron; the dots would only cost a tab. */
  .lm-profile-tabs__more-btn > svg:first-child { display: none; }
  .lm-profile-media .lm-photo-grid { gap: 3px; padding: 0 var(--lm-space-3) var(--lm-space-3); }
  .lm-profile-media__head { padding: var(--lm-space-3) var(--lm-space-4); }
  .lm-profile-media .lm-reelgrid, .lm-profile-media .lm-seriescards { padding: 0 var(--lm-space-3) var(--lm-space-3); }
  .lm-profile-media > .lm-reelgrid__more { margin: 0 var(--lm-space-3) var(--lm-space-3); }
  .lm-profile-feed .lm-profile__cover { border-start-start-radius: calc(var(--lm-radius-md) - 1px); border-start-end-radius: calc(var(--lm-radius-md) - 1px); }
  .lm-profile-side__head { padding-inline: var(--lm-space-4); }
  .lm-profile-intro__body { padding-inline: var(--lm-space-4); }
  .lm-profile-feed .lm-profile-private { padding: var(--lm-space-8) var(--lm-space-4); }
}
@media (min-width: 1024px) {
  /* One group, no section list: the groups take the whole width. */
  .lm-profile-feed .lm-about-groups:not(:has(> .lm-about-groups__nav)) { grid-template-columns: minmax(0, 1fr); }
}

/* -- Phase 77: followers and following ------------------------------------------ */
.lm-follow-page { min-inline-size: 0; }
.lm-follow-page__head { overflow: hidden; }
.lm-follow-page__band { position: relative; block-size: 96px; overflow: hidden; background-color: var(--lm-surface-secondary); }
.lm-follow-page__band img, .lm-follow-page__band .lm-tile { position: absolute; inset: 0; display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
/* The portrait rides up over the band; the words stay below it. */
.lm-follow-page__who { display: flex; align-items: flex-start; gap: var(--lm-space-4); padding: 0 var(--lm-space-5); }
.lm-follow-page__avatar { position: relative; z-index: 1; flex: none; margin-block-start: -38px; border-radius: var(--lm-radius-pill); }
.lm-follow-page__avatar .lm-avatar { inline-size: 76px; block-size: 76px; border: 4px solid var(--lm-surface); box-shadow: var(--lm-shadow-sm); }
.lm-follow-page__text { display: flex; flex-direction: column; gap: var(--lm-space-1); min-inline-size: 0; padding-block-start: var(--lm-space-3); }
.lm-follow-page__title { margin: 0; color: var(--lm-text); font-size: var(--lm-text-xl); font-weight: var(--lm-weight-bold); overflow-wrap: anywhere; }
.lm-follow-page__back { display: inline-flex; align-items: center; gap: var(--lm-space-1); color: var(--lm-text-secondary); font-size: var(--lm-text-sm); text-decoration: none; }
.lm-follow-page__back:hover { color: var(--lm-primary-text); }
.lm-follow-page__back svg { inline-size: 15px; block-size: 15px; }
.lm-follow-page__switch { display: flex; gap: var(--lm-space-1); margin: var(--lm-space-4) var(--lm-space-5) var(--lm-space-4); padding: var(--lm-space-1); border-radius: var(--lm-radius-pill); background-color: var(--lm-surface-secondary); }
.lm-follow-page__option { display: inline-flex; flex: 1 1 0; align-items: center; justify-content: center; gap: var(--lm-space-2); min-block-size: 40px; border-radius: var(--lm-radius-pill); color: var(--lm-text-secondary); font-weight: var(--lm-weight-semibold); text-decoration: none; transition: background-color var(--lm-fast), color var(--lm-fast); }
.lm-follow-page__option:hover { color: var(--lm-text); }
.lm-follow-page__option.is-active { background-color: var(--lm-surface); color: var(--lm-primary-text); box-shadow: var(--lm-shadow-sm); }
.lm-follow-page__count { padding-inline: var(--lm-space-2); border-radius: var(--lm-radius-pill); background-color: var(--lm-primary-soft); color: var(--lm-primary-text); font-size: var(--lm-text-xs); line-height: 1.6; }

.lm-person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--lm-space-4); }
.lm-person-card { display: flex; flex-direction: column; align-items: center; padding-block-end: var(--lm-space-4); overflow: hidden; text-align: center; }
.lm-person-card__band { position: relative; display: block; inline-size: 100%; block-size: 76px; overflow: hidden; background-color: var(--lm-surface-secondary); }
.lm-person-card__band img, .lm-person-card__band .lm-tile { position: absolute; inset: 0; display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.lm-person-card__avatar { position: relative; z-index: 1; margin-block-start: -38px; border-radius: var(--lm-radius-pill); }
.lm-person-card__avatar .lm-avatar { inline-size: 76px; block-size: 76px; border: 4px solid var(--lm-surface); }
.lm-person-card__name { display: inline-flex; align-items: center; justify-content: center; gap: var(--lm-space-1); max-inline-size: 100%; margin: var(--lm-space-2) 0 0; padding-inline: var(--lm-space-3); font-size: var(--lm-text-md); }
.lm-person-card__name a { overflow: hidden; color: var(--lm-text); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.lm-person-card__name a:hover { text-decoration: underline; }
.lm-person-card__meta { max-inline-size: 100%; margin: var(--lm-space-1) 0 0; padding-inline: var(--lm-space-3); overflow: hidden; color: var(--lm-muted); font-size: var(--lm-text-sm); text-overflow: ellipsis; white-space: nowrap; }
.lm-person-card__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--lm-space-2); margin-block-start: var(--lm-space-3); padding-inline: var(--lm-space-3); }

@media (max-width: 767px) {
  .lm-person-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lm-space-3); }
  .lm-follow-page__who { padding-inline: var(--lm-space-4); }
  .lm-follow-page__switch { margin-inline: var(--lm-space-4); }
}
