@charset "UTF-8";
/* ==========================================================================
   Luma / layout
   --------------------------------------------------------------------------
   The application shell: header, navigation, feed column, contextual widgets
   and the mobile bottom bar. Widths live here; the pieces that sit inside them
   live in components.css.

   The shell is one grid. Source order is navigation, main, widgets, and the
   document direction decides which physical side each lands on, so Arabic puts
   navigation on the right with no second rule. Breakpoint behaviour is in
   responsive.css so this file describes the full-size layout only.
   ========================================================================== */

/* ==========================================================================
   The application frame
   --------------------------------------------------------------------------
   Two columns for the whole page: the navigation panel, and everything else.
   The header belongs to "everything else", so it sits beside the panel rather
   than over it, and the panel runs from the very top of the window with the
   lockup at its head. This is the reference design's structure, and it is
   what makes the panel read as part of the product rather than as a strip of
   links under a toolbar.

   The panel is the first grid column, which is the reading-start edge: the
   right in Arabic, the left in English, with no second rule.
   ========================================================================== */

.lm-app__frame {
  display: grid;
  grid-template-columns: var(--lm-nav-width) minmax(0, 1fr);
  min-block-size: 100vh;
}

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

/* ==========================================================================
   Shell
   --------------------------------------------------------------------------
   The content area under the header: the feed and, where the width allows,
   the contextual column. Only the feed grows; past its cap the two columns
   centre together in whatever room is left.
   ========================================================================== */

.lm-shell {
  display: grid;
  grid-template-columns: minmax(0, var(--lm-feed-width)) var(--lm-widgets-width);
  justify-content: center;
  gap: var(--lm-shell-gap);
  align-items: start;
  inline-size: 100%;
  padding-inline: var(--lm-shell-inset) var(--lm-shell-gutter);
  padding-block: var(--lm-space-5);
}

/* A page with no contextual column, such as settings. */
.lm-shell--narrow {
  grid-template-columns: minmax(0, var(--lm-feed-width));
}

/* A page with no columns at all, such as a notice. */
.lm-shell--full {
  grid-template-columns: minmax(0, var(--lm-shell-max));
}

/* A page that is one thing as wide as the feed and its column together:
   messages, and settings. Without this they sat in the feed's track alone,
   with the contextual column's space standing empty beside them — a narrow
   page pushed to one side of a wide screen. */
.lm-shell--wide {
  grid-template-columns: minmax(0, calc(var(--lm-feed-width) + var(--lm-shell-gap) + var(--lm-widgets-width)));
}

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

/* The reading column. Its width is decided by the grid track it sits in. */
.lm-feed {
  inline-size: 100%;
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-4);
}

/* The posts inside it.
   --------------------------------------------------------------------------
   The gap above separates the feed's own parts — the composer, the tabs, the
   list — and stops at the list's edge, so for a while the cards inside it sat
   flush against one another: two 20 pixel corners touching, and in the dark
   scheme a card and the page behind it are close enough in tone that the
   join all but disappeared. A column of posts read as one long sheet.

   The same measure as the gap above, so the rhythm down the column is even
   from the composer to the last post. */
.lm-feed__list {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-4);
  min-inline-size: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */

.lm-header {
  position: sticky;
  inset-block-start: 0;
  z-index: var(--lm-z-header);
  block-size: var(--lm-header-height);
  background-color: color-mix(in srgb, var(--lm-surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-block-end: 1px solid var(--lm-border);
}

/* color-mix is recent. Without it the bar is simply opaque, which is fine. */
@supports not (background-color: color-mix(in srgb, red 50%, blue)) {
  .lm-header {
    background-color: var(--lm-surface);
  }
}

/* Lined up with the shell beneath it, so the search field and the feed share
   an edge. */
.lm-header__inner {
  display: flex;
  align-items: center;
  gap: var(--lm-space-4);
  block-size: 100%;
  padding-inline: var(--lm-shell-inset) var(--lm-shell-gutter);
}

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

/* Search is the header's main job now that the brand lives in the panel.
   Parent-scoped, because the same element is also an .lm-search whose own
   rule in components.css caps it at 460. */
.lm-header .lm-header__search {
  max-inline-size: 640px;
  flex: 1 1 auto;
}

.lm-header .lm-header__search .lm-search__input {
  min-block-size: 44px;
  font-size: var(--lm-text-md);
}

/* The lockup only appears in the header on a phone, where there is no
   navigation panel to carry it.

   The selector carries its parent for the same reason .lm-header__menu does:
   this element is also an .lm-brand, components.css loads after this file, and
   a bare class here would lose the cascade and leave the lockup visible at
   every width. */
.lm-header .lm-header__brand {
  display: none;
}

/* The drawer trigger belongs to the phone layout. Above that width the
   navigation panel is on screen and a second way into it is clutter, so the
   button is hidden here and revealed in responsive.css.

   The selector carries its parent deliberately. The button is also an
   .lm-icon-btn, and components.css loads after this file, so a bare
   .lm-header__menu would lose to .lm-icon-btn's display on equal specificity
   and the button would stay visible at every width. */
.lm-header .lm-header__menu {
  display: none;
}

.lm-header__end {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ==========================================================================
   Main navigation
   ========================================================================== */

.lm-nav {
  position: sticky;
  inset-block-start: 0;
  block-size: 100vh;
  max-block-size: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-1);
  padding: var(--lm-space-5) var(--lm-space-7) var(--lm-space-5);
  background-color: var(--lm-background);
  /* The line where the panel meets the content. inline-end is the edge that
     faces the page in both directions. */
  border-inline-end: 1px solid var(--lm-card-border);
  scrollbar-width: thin;
  scrollbar-color: var(--lm-border-strong) transparent;
}

/* Nothing in this column may be compressed to make the column fit.
   flex-shrink defaults to 1, so on a short window the browser squeezed every
   block a little and the promotional card, which has the least text holding
   it open, collapsed from about 150 pixels to 40 and swallowed its own
   button. The column overflows and scrolls instead, which is honest. */
.lm-nav > * {
  flex-shrink: 0;
}

/* The lockup sits at the top of the column rather than in the header, which
   is what gives the sidebar its own identity instead of making it a strip of
   links under a toolbar. */
.lm-nav__brand {
  padding: var(--lm-space-1) 0 var(--lm-space-7);
}

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

.lm-nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--lm-space-4);
  min-block-size: 48px;
  padding-inline: var(--lm-space-5);
  padding-block: var(--lm-space-2);
  border-radius: var(--lm-radius-md);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-lg);
  font-weight: var(--lm-weight-medium);
  transition: background-color var(--lm-fast), color var(--lm-fast);
}

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

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

/* The reference marks the active item with the pill alone: no bar, no
   hairline, nothing that competes with the coral of the icon. */

.lm-nav__item svg {
  inline-size: 24px;
  block-size: 24px;
  stroke-width: 1.7;
  flex-shrink: 0;
}

.lm-nav__item.is-active svg {
  stroke-width: 2.1;
}

.lm-nav__label {
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* A label that does not fit takes a second line rather than losing its end
   ("Notificatio…", "Gestionnaire de publi…"); a long word hyphenates by the
   page's language. A count sits 8px from its label, not the row's 16. The
   panel only: below 1120px the rail shows no labels. */
@media (min-width: 1120px) {
  .lm-nav__label {
    flex: 1 1 auto;
    white-space: normal;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
  }

  .lm-nav__label + .lm-nav__badge {
    margin-inline-start: calc(var(--lm-space-2) - var(--lm-space-4));
  }
}

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

.lm-nav__divider {
  block-size: 1px;
  margin-block: var(--lm-space-3);
  margin-inline: var(--lm-space-4);
  background-color: var(--lm-border);
}

/* An item whose feature is not built yet. Readable, plainly inert. */
.lm-nav__item[aria-disabled="true"] {
  color: var(--lm-subtle);
  cursor: default;
}

.lm-nav__item[aria-disabled="true"]:hover {
  background-color: transparent;
  color: var(--lm-subtle);
}

/* ---------------------------------------------------- navigation footer */

/* ------------------------------------------------------- promotional card
   The one place in the interface where the coral is allowed to be a whole
   surface rather than an accent. It is the last thing in the column, so it
   never competes with the feed for attention.
   -------------------------------------------------------------------- */

.lm-nav__promo {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-block-size: 200px;
  margin-block-start: var(--lm-space-3);
  padding: var(--lm-space-5);
  border-radius: var(--lm-radius-lg);
  background: var(--lm-promo);
  color: var(--lm-on-gradient);
  overflow: hidden;
  isolation: isolate;
}

/* Two ridges, drawn rather than photographed, so the card carries the
   reference's horizon without shipping an image. */
.lm-nav__promo::before,
.lm-nav__promo::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  z-index: -1;
}

.lm-nav__promo::before {
  inset-inline: -30% -10%;
  inset-block-end: -58%;
  block-size: 90%;
  background-color: rgb(120 30 40 / 26%);
}

.lm-nav__promo::after {
  inset-inline: 10% -40%;
  inset-block-end: -70%;
  block-size: 100%;
  background-color: rgb(80 20 30 / 30%);
}

.lm-nav__promo-title {
  margin: 0 0 var(--lm-space-6);
  font-size: var(--lm-text-lg);
  font-weight: var(--lm-weight-bold);
  line-height: var(--lm-leading-snug);
  max-inline-size: 12ch;
}

/* The title leads at the reading start; the button closes at the reading
   end, on the opposite corner. */
.lm-nav__promo .lm-btn {
  align-self: flex-end;
  min-block-size: 44px;
  padding-inline: var(--lm-space-5);
  font-size: var(--lm-text-base);
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-surface);
  color: var(--lm-text);
  border: 0;
  font-weight: var(--lm-weight-semibold);
  box-shadow: var(--lm-shadow-md);
}

.lm-nav__promo .lm-btn:hover {
  background-color: var(--lm-surface);
  color: var(--lm-text);
  transform: translateY(-1px);
}

.lm-nav__footer {
  margin-block-start: var(--lm-space-5);
  padding: 0 var(--lm-space-2);
  color: var(--lm-subtle);
  font-size: var(--lm-text-xs);
  line-height: 1.8;
  text-align: center;
}



/* ==========================================================================
   Contextual widgets
   ========================================================================== */

.lm-widgets {
  position: sticky;
  inset-block-start: calc(var(--lm-header-height) + var(--lm-space-5));
  max-block-size: calc(100vh - var(--lm-header-height) - var(--lm-space-8));
  min-inline-size: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-4);
  scrollbar-width: thin;
  scrollbar-color: var(--lm-border-strong) transparent;
}

/* Same reason as the navigation column: a card here must keep its height. */
.lm-widgets > * {
  flex-shrink: 0;
}

/* ==========================================================================
   Bottom navigation, phones only
   --------------------------------------------------------------------------
   Declared here, revealed in responsive.css. The inset keeps it clear of the
   home indicator on a modern phone.
   ========================================================================== */

.lm-bottom-nav {
  display: none;
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: var(--lm-z-header);
  background-color: color-mix(in srgb, var(--lm-surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-block-start: 1px solid var(--lm-border);
  padding-block-end: env(safe-area-inset-bottom, 0px);
}

@supports not (background-color: color-mix(in srgb, red 50%, blue)) {
  .lm-bottom-nav {
    background-color: var(--lm-surface);
  }
}

.lm-bottom-nav__list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: center;
  block-size: var(--lm-bottom-nav);
}

.lm-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  block-size: 100%;
  color: var(--lm-muted);
  font-size: 10px;
  font-weight: var(--lm-weight-medium);
  transition: color var(--lm-fast);
}

.lm-bottom-nav__item svg {
  inline-size: 22px;
  block-size: 22px;
  stroke-width: 1.8;
}

/* Every entry is either a link or a button; the button defaults are cleared
   once here so the two are indistinguishable. */
.lm-bottom-nav__item {
  inline-size: 100%;
  padding: 0;
  border: 0;
  background: none;
}

/* The icon is wrapped so an unread dot can be positioned against it. */
.lm-bottom-nav__icon {
  position: relative;
  display: grid;
  place-items: center;
}

.lm-bottom-nav__dot {
  position: absolute;
  inset-block-start: -1px;
  inset-inline-end: -2px;
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background-color: var(--lm-primary);
  border: 2px solid var(--lm-surface);
}

.lm-bottom-nav__label {
  max-inline-size: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-bottom-nav__item.is-active {
  color: var(--lm-primary-text);
}

.lm-bottom-nav__item.is-active svg {
  stroke-width: 2.2;
}

/* The compose action is the one thing raised out of the bar. */
.lm-bottom-nav__item--create {
  gap: 0;
}

.lm-bottom-nav__create {
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: var(--lm-radius-md);
  background: var(--lm-gradient);
  color: var(--lm-on-gradient);
  box-shadow: var(--lm-shadow-md);
}

.lm-bottom-nav__create svg {
  inline-size: 22px;
  block-size: 22px;
  stroke-width: 2.2;
}

/* Space so the last card is not hidden behind the bar. */
body.lm-has-bottom-nav .lm-shell {
  padding-block-end: calc(var(--lm-bottom-nav) + env(safe-area-inset-bottom, 0px) + var(--lm-space-6));
}

/* ==========================================================================
   Drawer, for the navigation on a phone
   --------------------------------------------------------------------------
   Present in the markup on every signed-in page and hidden here. It becomes a
   panel only below 768 pixels, in responsive.css. Hiding it with display:none
   rather than moving it off-screen keeps its links out of the tab order and
   out of the accessibility tree on a desktop, where the same links are
   already in the navigation column.
   ========================================================================== */

.lm-drawer {
  display: none;
}

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

.lm-drawer__search {
  padding-block: var(--lm-space-4);
}

.lm-drawer__nav {
  padding-block-end: var(--lm-space-4);
}

.lm-drawer__footer {
  padding-block-start: var(--lm-space-4);
  border-block-start: 1px solid var(--lm-border);
}

.lm-scrim {
  position: fixed;
  inset: 0;
  z-index: calc(var(--lm-z-drawer) - 1);
  background-color: var(--lm-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--lm-normal), visibility var(--lm-normal);
}

body.lm-drawer-open .lm-scrim {
  opacity: 1;
  visibility: visible;
}

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

/* ==========================================================================
   Footer
   ========================================================================== */

.lm-footer {
  margin-block-start: var(--lm-space-8);
  padding-block: var(--lm-space-5);
  border-block-start: 1px solid var(--lm-border);
}

.lm-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--lm-space-3);
  max-inline-size: var(--lm-shell-max);
  margin-inline: auto;
  padding-inline: var(--lm-space-5);
}

.lm-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-4);
}

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

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

/* Inside the shell the footer is part of the feed column, not the page. */
.lm-feed > .lm-footer {
  margin-block-start: var(--lm-space-4);
  padding-inline: 0;
}

.lm-feed > .lm-footer .lm-footer__inner {
  padding-inline: 0;
}

/* ==========================================================================
   The moderation queue
   ==========================================================================

   In layout.css rather than components.css because these rules describe the
   arrangement of a page in the admin panel, and because they must win over
   the panel's own card styles — components.css loads first, so a rule here
   needs no parent selector to take precedence. */

.lm-admin__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-2);
  margin-block-end: var(--lm-space-4);
}

.lm-admin__tab {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  padding: var(--lm-space-2) var(--lm-space-4);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-pill);
  font-size: var(--lm-text-sm);
  color: var(--lm-text-secondary);
  text-decoration: none;
}

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

.lm-admin__tab-count {
  font-weight: var(--lm-weight-bold);
}

.lm-admin__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2);
  margin-block-end: var(--lm-space-3);
}

.lm-admin__filter-label {
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
  color: var(--lm-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lm-admin__chip {
  padding: 4px var(--lm-space-3);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-pill);
  font-size: var(--lm-text-xs);
  color: var(--lm-text-secondary);
  text-decoration: none;
}

.lm-admin__chip.is-active {
  border-color: var(--lm-primary);
  color: var(--lm-primary-text);
}

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

.lm-admin__empty {
  margin: 0;
  padding: var(--lm-space-8);
  text-align: center;
  color: var(--lm-muted);
}

.lm-admin__more {
  margin-block-start: var(--lm-space-4);
  text-align: center;
}

.lm-report-row__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--lm-space-3);
  margin-block-end: var(--lm-space-3);
}

.lm-report-row__reason {
  font-weight: var(--lm-weight-semibold);
  color: var(--lm-text);
}

.lm-report-row__status {
  padding: 2px var(--lm-space-3);
  border-radius: var(--lm-radius-pill);
  font-size: var(--lm-text-xs);
  background: var(--lm-surface-2);
  color: var(--lm-text-secondary);
}

.lm-report-row__status--open {
  background: var(--lm-warning-soft);
  color: var(--lm-warning-text);
}

.lm-report-row__status--resolved {
  background: var(--lm-success-soft);
  color: var(--lm-success-text);
}

.lm-report-row__time {
  margin-inline-start: auto;
  font-size: var(--lm-text-xs);
  color: var(--lm-muted);
}

.lm-report-row__facts {
  display: grid;
  grid-template-columns: minmax(0, 10rem) minmax(0, 1fr);
  gap: var(--lm-space-2) var(--lm-space-4);
  margin: 0;
  font-size: var(--lm-text-sm);
}

.lm-report-row__facts dt {
  color: var(--lm-muted);
}

.lm-report-row__facts dd {
  margin: 0;
  color: var(--lm-text);
  overflow-wrap: anywhere;
}

.lm-report-row__open {
  margin-inline-start: var(--lm-space-2);
  color: var(--lm-primary-text);
}

.lm-report-row__others {
  margin: var(--lm-space-3) 0 0;
  font-size: var(--lm-text-xs);
  color: var(--lm-muted);
}

.lm-report-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-2);
  margin-block-start: var(--lm-space-4);
  padding-block-start: var(--lm-space-4);
  border-block-start: 1px solid var(--lm-card-border);
}

.lm-report-row__history {
  margin-block-start: var(--lm-space-3);
  font-size: var(--lm-text-xs);
  color: var(--lm-muted);
}

.lm-report-row__history-list {
  margin: var(--lm-space-2) 0 0;
  padding-inline-start: var(--lm-space-5);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lm-report-row__history-action {
  color: var(--lm-text-secondary);
}

@media (max-width: 640px) {
  .lm-report-row__facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 0 0;
  }

  .lm-report-row__facts dt {
    margin-block-start: var(--lm-space-2);
  }
}

/* ==========================================================================
   Messaging
   ==========================================================================

   In layout.css because this is an arrangement of a page rather than a
   component, and because these rules must win over the generic shell — which
   components.css sets first.

   ONE MARKUP, TWO LAYOUTS. On a desktop the conversation list sits beside the
   thread. On a phone they are two screens and the stylesheet hides whichever
   is not in use, rather than the markup differing — so there is one set of
   rows to keep correct, and a split pane crushed into 320px never happens. */

.lm-shell--messages {
  min-block-size: 0;
}

.lm-messages {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: var(--lm-space-4);
  min-block-size: 0;
  /* The thread scrolls inside itself rather than the page scrolling, so the
     composer stays put while a long conversation moves behind it.

     Which means this height has to be exact. Anything left over at the bottom
     is not a gap, it is the composer pushed off the screen. The shell adds
     --lm-space-5 above and below on a desktop, so both come off. */
  block-size: calc(100vh - var(--lm-header-height) - (var(--lm-space-5) * 2));
}

.lm-messages__list {
  display: flex;
  flex-direction: column;
  min-block-size: 0;
  overflow: hidden;
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-xl);
  background: var(--lm-surface);
}

.lm-messages__list-head {
  padding: var(--lm-space-4) var(--lm-space-5);
  border-block-end: 1px solid var(--lm-card-border);
}

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

.lm-convo-list {
  flex: 1 1 auto;
  min-block-size: 0;
  overflow-y: auto;
}

/* ------------------------------------------------------- one conversation */

.lm-convo {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-3) var(--lm-space-4);
  color: inherit;
  text-decoration: none;
  border-block-end: 1px solid var(--lm-card-border);
}

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

.lm-convo.is-active {
  background: var(--lm-primary-soft);
}

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

.lm-convo__top {
  display: flex;
  align-items: baseline;
  gap: var(--lm-space-2);
}

.lm-convo__name {
  flex: 1 1 auto;
  min-inline-size: 0;
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  color: var(--lm-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-convo__time {
  flex: 0 0 auto;
  font-size: var(--lm-text-xs);
  color: var(--lm-muted);
}

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

/* Unread is weight plus a badge, not colour alone. */
.lm-convo--unread .lm-convo__name,
.lm-convo--unread .lm-convo__preview {
  color: var(--lm-text);
  font-weight: var(--lm-weight-semibold);
}

/* --lm-primary-strong, not --lm-primary, and for a measurable reason: white
   on the plain accent is 2.97:1 where 4.5:1 is required. It is the same
   colour .lm-count already uses for the notification badge, so the two read
   as one thing rather than as two slightly different reds. */
.lm-convo__badge {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  min-inline-size: 20px;
  block-size: 20px;
  padding-inline: 6px;
  border-radius: var(--lm-radius-pill);
  background: var(--lm-primary-strong);
  color: var(--lm-on-primary);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-bold);
}

/* ------------------------------------------------------------- the thread */

.lm-messages__thread {
  display: flex;
  flex-direction: column;
  min-block-size: 0;
  overflow: hidden;
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-xl);
  background: var(--lm-surface);
}

.lm-messages__blank {
  display: grid;
  place-items: center;
  block-size: 100%;
}

.lm-thread__head {
  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);
}

/* The way back to the list. Only on a phone, where the list is not on screen
   beside the thread. */
.lm-thread__back {
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  inline-size: 34px;
  block-size: 34px;
  margin-inline-start: calc(var(--lm-space-1) * -1);
  border-radius: var(--lm-radius-pill);
  color: var(--lm-text-secondary);
}

/* The arrow has to be given a size here, and this is not a nicety.
   Lm_Icon() emits an <svg> with a viewBox and no width or height, and
   base.css gives every svg `max-inline-size: 100%; block-size: auto`. Inside
   a box whose own width comes from its only child, those two ask each other
   the question and the icon resolves to nothing: the link was on the page,
   focusable, clickable, and zero pixels wide. On a phone it is the only way
   out of a conversation, so it was missing in the one place it matters. The
   same wiring has gone the other way before — an unsized icon in a box with
   a definite width grew to 804px in Phase 7. */
.lm-thread__back > .lm-icon {
  inline-size: 22px;
  block-size: 22px;
}

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

.lm-thread__person {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  min-inline-size: 0;
  color: inherit;
  text-decoration: none;
}

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

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

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

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

.lm-thread__scroll {
  flex: 1 1 auto;
  min-block-size: 0;
  overflow-y: auto;
  padding: var(--lm-space-4);
}

.lm-thread__older {
  text-align: center;
  margin-block-end: var(--lm-space-4);
}

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

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

/* ------------------------------------------------------------- a bubble */

/* WHICH SIDE A BUBBLE SITS ON IS DECIDED BY WHO SENT IT, and flips with the
   interface direction like everything else — inline-start is the reading
   start. What does NOT flip is the message text: that carries dir="auto", so
   an Arabic message inside an English interface reads correctly and sits on
   the side its sender belongs on. The two are different questions and the
   bubble answers them separately. */
.lm-msg {
  display: flex;
  align-items: flex-end;
  gap: var(--lm-space-2);
  max-inline-size: 78%;
  margin-inline-end: auto;
}

.lm-msg--mine {
  flex-direction: row-reverse;
  margin-inline-start: auto;
  margin-inline-end: 0;
}

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

.lm-msg__body {
  min-inline-size: 0;
  padding: var(--lm-space-3) var(--lm-space-4);
  border-radius: var(--lm-radius-lg);
  background: var(--lm-surface-2);
  color: var(--lm-text);
}

/* Shape as well as colour: the corner nearest the sender is squared off, so
   the two are distinguishable without relying on hue. */
.lm-msg__body {
  border-start-start-radius: var(--lm-radius-xs);
}

/* The accent BEHIND TEXT is --lm-primary-strong. The plain accent is a light
   coral: white on it measures 2.97:1 where 4.5:1 is required, which is the
   exact fault --lm-primary-strong was added to the token set to prevent, and
   this bubble walked straight back into it. --lm-primary-strong is 4.86:1.
   In dark both tokens resolve to the same value, so only the light scheme
   changes. */
.lm-msg--mine .lm-msg__body {
  background: var(--lm-primary-strong);
  color: var(--lm-on-primary);
  border-start-start-radius: var(--lm-radius-lg);
  border-start-end-radius: var(--lm-radius-xs);
}

.lm-msg__text {
  margin: 0;
  font-size: var(--lm-text-sm);
  line-height: var(--lm-leading);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* The time and the Sent/Seen word. Quieter than the message by SIZE, not by
   opacity: 11px white at 75% over the coral measures 2.26:1, and it was still
   3.35:1 once the bubble itself was corrected. Opacity is a lovely way to
   make text quiet and a reliable way to make it unreadable, and nothing
   measures it — so these are two stated colours that were measured instead,
   5.04:1 and 4.54:1 on the received bubble, 4.86:1 and 7.40:1 on the sent
   one. */
.lm-msg__meta {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin-block-start: 4px;
  font-size: 11px;
  color: var(--lm-muted);
}

.lm-msg--mine .lm-msg__meta {
  color: var(--lm-on-primary);
}

/* "Sent" and "Seen". Never "Delivered" — see functions_messages.php for why
   that word is not available to this interface. */
.lm-msg__state {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lm-msg__hide {
  flex: 0 0 auto;
  padding: 2px;
  border: 0;
  background: none;
  color: var(--lm-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--lm-fast) var(--lm-ease);
}

.lm-msg__hide .lm-icon {
  inline-size: 14px;
  block-size: 14px;
}

.lm-msg:hover .lm-msg__hide,
.lm-msg__hide:focus-visible {
  opacity: 1;
}

/* PHASE 10. Somebody is typing.
   Outside the scrolling area on purpose: a line that appears and disappears
   inside the thread would shift the messages under the reader's eye every
   few seconds. Here it sits between the thread and the composer and moves
   nothing. Reserved height, so its arrival does not nudge the composer
   either — an empty line is invisible but still occupies its place. */
.lm-thread__typing {
  margin: 0;
  padding-inline: var(--lm-space-4);
  min-block-size: 18px;
  font-size: var(--lm-text-xs);
  color: var(--lm-muted);
}

.lm-thread__typing[hidden] {
  /* Not display:none: the space stays, only the words go. */
  display: block;
  visibility: hidden;
}

/* ---------------------------------------------------------- the composer */

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

.lm-thread__form {
  display: flex;
  align-items: flex-end;
  gap: var(--lm-space-2);
}

.lm-thread__input {
  flex: 1 1 auto;
  min-inline-size: 0;
  max-block-size: 140px;
  resize: none;
}

.lm-thread__send {
  flex: 0 0 auto;
}

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

/* ==========================================================================
   Messaging on a phone
   ==========================================================================

   Two screens, not a squeezed split pane. Which one is shown depends on
   whether a conversation is open, which the controller records on the
   container — so the same markup serves both without a second template. */

@media (max-width: 900px) {
  .lm-messages {
    grid-template-columns: minmax(0, 1fr);
  }

  /* No conversation open: the list is the screen. */
  .lm-messages:not(.lm-messages--thread-open) .lm-messages__thread {
    display: none;
  }

  /* One open: the thread is the screen, and the back link appears. */
  .lm-messages--thread-open .lm-messages__list {
    display: none;
  }

  .lm-messages--thread-open .lm-thread__back {
    display: inline-flex;
  }

  .lm-msg {
    max-inline-size: 88%;
  }
}

/* Below 768px the bottom bar appears, fixed over the page, and the shell pads
   itself by that much so the last card is not underneath it. This pane does
   not scroll with the page, so padding alone does not save it: a height of
   100vh minus the header puts the composer — the one control the screen
   exists for — squarely behind the bar, off the bottom of a pane that cannot
   be scrolled to reach it. Everything the shell spends above and below comes
   off here as well.

   100dvh second, for the browsers that have it: on a phone the URL bar is
   part of 100vh and is not part of the screen. */
@media (max-width: 767px) {
  .lm-messages {
    block-size: calc(100vh - var(--lm-header-height) - var(--lm-space-3)
      - var(--lm-bottom-nav) - env(safe-area-inset-bottom, 0px) - var(--lm-space-6));
    block-size: calc(100dvh - var(--lm-header-height) - var(--lm-space-3)
      - var(--lm-bottom-nav) - env(safe-area-inset-bottom, 0px) - var(--lm-space-6));
  }
}

/* ==========================================================================
   Attachments in a conversation (Phase 11)
   --------------------------------------------------------------------------
   A bubble carrying a picture, a video, a voice note or a file. The bubble
   keeps its shape and its side; only what sits inside it changes.
   ========================================================================== */

/* A bubble whose main content is a file has no padding around it: the
   picture goes to the bubble's own edge, which is what makes it read as a
   photograph rather than a photograph in a box. The caption underneath gets
   its padding back. */
.lm-msg__body--media {
  padding: 4px;
  overflow: hidden;
}

.lm-msg__body--media .lm-msg__text {
  padding: var(--lm-space-1) var(--lm-space-2) 0;
}

.lm-msg__body--media .lm-msg__meta {
  padding-inline: var(--lm-space-2);
  padding-block-end: 2px;
}

/* -------------------------------------------------------------- a picture */

.lm-msg__image {
  display: block;
  inline-size: 100%;
  max-inline-size: 320px;
  /* A very tall photograph is cropped rather than allowed to take over the
     whole thread; opening it shows the whole thing. */
  max-block-size: 420px;
  padding: 0;
  border: 0;
  border-radius: var(--lm-radius-md);
  overflow: hidden;
  background: var(--lm-surface-2);
  cursor: zoom-in;
}

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

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

/* ---------------------------------------------------------------- a video */

.lm-msg__video {
  display: block;
  inline-size: 100%;
  max-inline-size: 320px;
  max-block-size: 420px;
  border-radius: var(--lm-radius-md);
  background: var(--lm-media-bg);
}

.lm-msg__duration {
  display: block;
  padding: 2px var(--lm-space-2) 0;
  font-size: var(--lm-text-xs);
  color: var(--lm-muted);
}

.lm-msg--mine .lm-msg__duration {
  color: var(--lm-on-primary);
}

/* ----------------------------------------------------------- a voice note */

.lm-voice {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  min-inline-size: 190px;
  padding: var(--lm-space-2);
}

.lm-voice__button {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  inline-size: 36px;
  block-size: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--lm-radius-pill);
  background: var(--lm-primary-strong);
  color: var(--lm-on-primary);
  cursor: pointer;
}

.lm-voice__button > .lm-icon {
  inline-size: 16px;
  block-size: 16px;
}

/* Inside somebody's own bubble the disc would be coral on coral, so it
   borrows the bubble's text colour and goes the other way round. */
.lm-msg--mine .lm-voice__button {
  background: var(--lm-on-primary);
  color: var(--lm-primary-strong);
}

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

.lm-voice__label {
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
}

.lm-voice__time {
  font-size: 11px;
  color: var(--lm-muted);
}

.lm-msg--mine .lm-voice__time {
  color: var(--lm-on-primary);
}

.lm-voice__audio {
  display: none;
}

/* ----------------------------------------------------------------- a file */

.lm-msg__file {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  min-inline-size: 200px;
  max-inline-size: 320px;
  padding: var(--lm-space-2);
  color: inherit;
  text-decoration: none;
  border-radius: var(--lm-radius-md);
}

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

.lm-msg--mine .lm-msg__file:hover {
  /* A white wash rather than a grey one, because the bubble underneath is
     already coloured. */
  background: rgb(255 255 255 / 14%);
}

.lm-msg__file-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  inline-size: 36px;
  block-size: 36px;
  border-radius: var(--lm-radius-sm);
  background: var(--lm-surface-2);
  color: var(--lm-text-secondary);
}

.lm-msg--mine .lm-msg__file-icon {
  background: rgb(255 255 255 / 18%);
  color: var(--lm-on-primary);
}

.lm-msg__file-icon > .lm-icon,
.lm-msg__file-get > .lm-icon {
  inline-size: 18px;
  block-size: 18px;
}

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

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

.lm-msg__file-meta {
  font-size: 11px;
  color: var(--lm-muted);
}

.lm-msg--mine .lm-msg__file-meta {
  color: var(--lm-on-primary);
}

.lm-msg__file-get {
  flex: 0 0 auto;
  color: var(--lm-muted);
}

.lm-msg--mine .lm-msg__file-get {
  color: var(--lm-on-primary);
}

/* ==========================================================================
   Sending one
   ========================================================================== */

.lm-thread__attach,
.lm-thread__record {
  flex: 0 0 auto;
}

/* Hidden until the browser proves it can record. .lm-icon-btn sets its own
   display, which beats the hidden attribute, so without this the button was
   shown everywhere — including where pressing it can only say "no". */
.lm-thread__record[hidden] {
  display: none;
}

/* The attach menu opens upwards: the composer is at the bottom of the
   screen and a menu below it would be off it. */
.lm-dropdown__menu--up {
  inset-block-start: auto;
  inset-block-end: calc(100% + var(--lm-space-2));
}

/* -- what is in flight ------------------------------------------------- */

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

.lm-uploads {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-1);
  padding: var(--lm-space-2) var(--lm-space-4) 0;
}

.lm-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2);
  padding: var(--lm-space-2);
  border-radius: var(--lm-radius-sm);
  background: var(--lm-surface-2);
  font-size: var(--lm-text-xs);
}

.lm-upload__name {
  flex: 1 1 auto;
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--lm-text-secondary);
}

/* Uploading, Processing, Failed — said in words as well as by the bar. */
.lm-upload__state {
  flex: 0 0 auto;
  color: var(--lm-text-secondary);
  font-weight: var(--lm-weight-semibold);
}

/* Every byte has gone and the server is working; the bar is full and the
   words say so, rather than a full bar that looks stuck. */
.lm-upload--processing .lm-upload__fill {
  animation: lm-recording 1.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .lm-upload--processing .lm-upload__fill {
    animation: none;
  }
}

.lm-upload--failed .lm-upload__state {
  color: var(--lm-danger-text);
}

.lm-upload__bar {
  flex: 0 0 110px;
  block-size: 4px;
  border-radius: var(--lm-radius-pill);
  background: var(--lm-border);
  overflow: hidden;
}

.lm-upload__fill {
  display: block;
  block-size: 100%;
  inline-size: 0;
  border-radius: var(--lm-radius-pill);
  background: var(--lm-primary-strong);
  transition: inline-size 120ms linear;
}

/* Failed. The row stays, says why, and offers to try again — an upload that
   vanished would leave somebody wondering whether it was sent. */
.lm-upload--failed {
  background: var(--lm-danger-soft);
}

.lm-upload--failed .lm-upload__name {
  color: var(--lm-danger-text);
}

/* The reason goes on its own line under the controls, so a long one never
   squeezes Try again off a narrow phone. */
.lm-upload__error {
  order: 1;
  flex: 1 1 100%;
  color: var(--lm-danger-text);
}

.lm-upload__retry,
.lm-upload__cancel {
  flex: 0 0 auto;
  padding: 2px var(--lm-space-2);
  border: 0;
  border-radius: var(--lm-radius-xs);
  background: transparent;
  color: var(--lm-primary-text);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
  cursor: pointer;
}

.lm-upload__retry:hover,
.lm-upload__cancel:hover {
  text-decoration: underline;
}

/* -- recording ---------------------------------------------------------- */

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

.lm-recorder__dot {
  flex: 0 0 auto;
  inline-size: 10px;
  block-size: 10px;
  border-radius: var(--lm-radius-pill);
  background: var(--lm-danger-text);
  animation: lm-recording 1.4s ease-in-out infinite;
}

@keyframes lm-recording {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
  .lm-recorder__dot {
    animation: none;
  }
}

.lm-recorder__label {
  font-size: var(--lm-text-sm);
  color: var(--lm-text-secondary);
}

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

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

/* Two states in one bar: recording, then listening back before sending. */
.lm-recorder__live,
.lm-recorder__review {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: var(--lm-space-3);
  min-inline-size: 0;
}

.lm-recorder__stop {
  flex: 0 0 auto;
}

.lm-recorder__play {
  flex: 0 0 auto;
}

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

/* Every one of these sets its own display, which beats the hidden attribute;
   without these the recorder would sit under the composer all the time and
   the composer would never step aside for it. */
.lm-recorder[hidden],
.lm-recorder__live[hidden],
.lm-recorder__review[hidden],
.lm-thread__form[hidden] {
  display: none;
}

@media (max-width: 380px) {
  .lm-recorder__live,
  .lm-recorder__review {
    gap: var(--lm-space-2);
  }

  /* The words go, the controls stay: at 320px a label, a clock and three
     buttons do not fit on one line. */
  .lm-recorder__review .lm-recorder__label {
    display: none;
  }
}

/* ==========================================================================
   The viewer
   --------------------------------------------------------------------------
   One picture, the whole thing, over everything else. Deliberately small:
   no gallery, no next and previous, no zoom — those are a gallery, and this
   is a way to see one photograph properly.
   ========================================================================== */

.lm-lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--lm-z-modal);
  display: grid;
  place-items: center;
  padding: var(--lm-space-5);
  background: rgb(0 0 0 / 88%);
}

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

.lm-lightbox__image {
  max-inline-size: 100%;
  max-block-size: 100%;
  border-radius: var(--lm-radius-sm);
  object-fit: contain;
}

.lm-lightbox__close {
  position: absolute;
  inset-block-start: var(--lm-space-4);
  inset-inline-end: var(--lm-space-4);
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--lm-radius-pill);
  background: rgb(255 255 255 / 14%);
  color: var(--lm-on-scrim);
  cursor: pointer;
}

.lm-lightbox__close:hover {
  background: rgb(255 255 255 / 24%);
}

.lm-lightbox__close > .lm-icon {
  inline-size: 20px;
  block-size: 20px;
}

/* On a phone a picture in a bubble may use the full width of it. */
@media (max-width: 767px) {
  .lm-msg__image,
  .lm-msg__video {
    max-inline-size: 100%;
  }

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

/* ==========================================================================
   Groups (Phase 12)
   --------------------------------------------------------------------------
   A group is a conversation, so almost everything it shows is the messaging
   above. What is here is only what a group has and a direct conversation
   does not: a name above other people's bubbles, the lines the group writes
   about itself, a way to start one, and the panel that runs it.
   ========================================================================== */

/* The new-conversation button beside the inbox title. */
.lm-messages__list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lm-space-3);
}

/* A group's picture is a rounded square, so a list of people and groups can
   be told apart before a name is read. */
.lm-avatar--group,
.lm-avatar--group img {
  border-radius: 30%;
}

/* The group's name in the header is a button that opens its panel. */
.lm-thread__person--group {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.lm-thread__person--group:hover .lm-thread__name {
  text-decoration: underline;
}

/* -- who is speaking, and what the group says about itself ---------------- */

.lm-msg__sender {
  display: block;
  margin-block-end: 2px;
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
  color: var(--lm-primary-text);
  overflow-wrap: anywhere;
}

/* A system line spans the thread and belongs to nobody's side. */
.lm-msg--system {
  justify-content: center;
  max-inline-size: 100%;
  margin-inline: auto;
}

.lm-msg__system {
  max-inline-size: 36rem;
  margin: 0;
  padding: var(--lm-space-1) var(--lm-space-3);
  border-radius: var(--lm-radius-pill);
  background: var(--lm-surface-2);
  color: var(--lm-muted);
  font-size: var(--lm-text-xs);
  line-height: var(--lm-leading-snug);
  text-align: center;
  overflow-wrap: anywhere;
}

/* -- starting a conversation ---------------------------------------------- */

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

.lm-compose__modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--lm-space-2);
}

.lm-compose__mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--lm-space-2);
  min-block-size: 40px;
  padding: var(--lm-space-2) var(--lm-space-3);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-md);
  background: var(--lm-surface);
  color: var(--lm-text);
  font: inherit;
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-medium);
  cursor: pointer;
}

.lm-compose__mode svg {
  inline-size: 18px;
  block-size: 18px;
  flex: 0 0 auto;
}

.lm-compose__mode.is-active {
  border-color: var(--lm-primary);
  background: var(--lm-primary-soft);
  color: var(--lm-primary-text);
}

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

.lm-compose__photo {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  align-self: flex-start;
  font-size: var(--lm-text-sm);
  color: var(--lm-primary-text);
  cursor: pointer;
}

.lm-compose__photo svg {
  inline-size: 18px;
  block-size: 18px;
  flex: 0 0 auto;
}

.lm-compose__foot {
  display: flex;
  justify-content: flex-end;
}

/* Each of these sets its own display, which beats the hidden attribute. */
.lm-compose__group[hidden],
.lm-compose__foot[hidden],
.lm-pick-chips[hidden] {
  display: none;
}

/* -- the picker ----------------------------------------------------------- */

.lm-pick-list {
  display: flex;
  flex-direction: column;
  max-block-size: 18rem;
  overflow-y: auto;
}

.lm-pick-list:empty {
  display: none;
}

.lm-pick {
  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: transparent;
  color: var(--lm-text);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

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

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

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

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

.lm-pick__check {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  inline-size: 24px;
  block-size: 24px;
  border: 2px solid var(--lm-border-strong);
  border-radius: var(--lm-radius-pill);
  color: transparent;
}

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

.lm-pick.is-picked .lm-pick__check {
  border-color: var(--lm-primary-strong);
  background: var(--lm-primary-strong);
  color: var(--lm-on-primary);
}

/* Choosing somebody for a direct message opens it: no tick to show. */
[data-lm-compose-mode="direct"] .lm-pick__check {
  display: none;
}

.lm-pick__none {
  margin: 0;
  padding: var(--lm-space-3);
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
}

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

.lm-pick-chips:empty {
  display: none;
}

.lm-pick-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-1);
  max-inline-size: 100%;
  padding-block: 2px;
  padding-inline: var(--lm-space-3) var(--lm-space-1);
  border-radius: var(--lm-radius-pill);
  background: var(--lm-primary-soft);
  color: var(--lm-primary-text);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
}

.lm-pick-chip__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-pick-chip__remove {
  display: grid;
  place-items: center;
  inline-size: 22px;
  block-size: 22px;
  padding: 0;
  border: 0;
  border-radius: var(--lm-radius-pill);
  background: transparent;
  color: inherit;
  font-size: var(--lm-text-md);
  line-height: 1;
  cursor: pointer;
}

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

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

.lm-group-info__loading {
  margin: 0;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
  text-align: center;
}

.lm-group-info__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--lm-space-2);
  text-align: center;
}

.lm-group-info__name {
  margin: 0;
  max-inline-size: 100%;
  font-size: var(--lm-text-lg);
  font-weight: var(--lm-weight-semibold);
  color: var(--lm-text);
  overflow-wrap: anywhere;
}

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

.lm-group-info__photo-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--lm-space-2);
}

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

.lm-group-info__rename-row {
  display: flex;
  gap: var(--lm-space-2);
}

.lm-group-info__rename-row .lm-input {
  flex: 1 1 auto;
  min-inline-size: 0;
}

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

.lm-group-info__add [data-lm-group-add-submit] {
  align-self: flex-start;
}

.lm-group-info__label {
  margin: 0;
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--lm-muted);
}

.lm-group-members {
  display: flex;
  flex-direction: column;
  margin: var(--lm-space-2) 0 0;
  padding: 0;
  list-style: none;
}

.lm-group-member {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding-block: var(--lm-space-2);
  border-block-end: 1px solid var(--lm-card-border);
}

.lm-group-member:last-child {
  border-block-end: 0;
}

.lm-group-member__text {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--lm-space-1);
  min-inline-size: 0;
}

.lm-group-member__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-inline-size: 100%;
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  color: var(--lm-text);
  text-decoration: none;
}

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

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

.lm-group-member__role {
  flex: 0 0 auto;
  padding: 2px var(--lm-space-2);
  border-radius: var(--lm-radius-pill);
  background: var(--lm-surface-2);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
}

.lm-group-member__role--owner {
  background: var(--lm-primary-soft);
  color: var(--lm-primary-text);
}

.lm-group-member__menu {
  flex: 0 0 auto;
}

.lm-group-info__foot {
  display: flex;
  justify-content: center;
}

.lm-group-info__note {
  margin: 0;
  font-size: var(--lm-text-sm);
  color: var(--lm-muted);
  text-align: center;
}

.lm-group-info__leave {
  color: var(--lm-danger-text);
}

/* On a phone the dialog is the screen, so the lists get the height. */
@media (max-width: 480px) {
  .lm-pick-list {
    max-block-size: 45vh;
  }

  .lm-compose__mode {
    padding-inline: var(--lm-space-2);
  }
}

.lm-messages__new {
  flex: 0 0 auto;
}

/* Room for a name, a search and a list, without becoming a page. */
.lm-modal__dialog--compose {
  inline-size: min(32rem, 100%);
}

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

/* ==========================================================================
   Message interactions (Phase 13)
   --------------------------------------------------------------------------
   Replies, reactions, edits, tombstones, forwards and mentions — all of them
   parts of a bubble that already exists, drawn small, so a thread still
   reads as a conversation rather than a control panel.
   ========================================================================== */

/* The bubble and its reactions, stacked, on the sender's side. */
.lm-msg__main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-inline-size: 0;
}

.lm-msg--mine .lm-msg__main {
  align-items: flex-end;
}

/* The menu button. A real, always-present control: on a screen with no
   hover it is simply shown; with a pointer it appears as the pointer
   reaches the message, and whenever it has focus. */
.lm-msg__actions-btn {
  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: transparent;
  color: var(--lm-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--lm-fast) var(--lm-ease);
}

.lm-msg__actions-btn .lm-icon {
  inline-size: 18px;
  block-size: 18px;
}

.lm-msg:hover .lm-msg__actions-btn,
.lm-msg__actions-btn:focus-visible,
.lm-msg__actions-btn[aria-expanded="true"] {
  opacity: 1;
}

@media (hover: none) {
  .lm-msg__actions-btn {
    opacity: 1;
  }
}

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

/* Somebody pressed a quote that points here. */
.lm-msg.is-flash .lm-msg__body {
  box-shadow: 0 0 0 3px var(--lm-primary-ring);
  transition: box-shadow var(--lm-normal) var(--lm-ease);
}

/* -- forwarded, edited, deleted ------------------------------------------ */

.lm-msg__forwarded {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-block-end: 4px;
  font-size: var(--lm-text-xs);
  font-style: italic;
  color: var(--lm-muted);
}

.lm-msg__forwarded .lm-icon {
  inline-size: 14px;
  block-size: 14px;
}

.lm-msg--mine .lm-msg__forwarded {
  color: var(--lm-on-primary);
}

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

.lm-msg__text--deleted {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-style: italic;
  color: var(--lm-muted);
}

.lm-msg__text--deleted .lm-icon {
  inline-size: 14px;
  block-size: 14px;
  flex: 0 0 auto;
}

/* A tombstone is quiet on both sides: not the sender's colour any more. */
.lm-msg--mine.lm-msg--deleted .lm-msg__body {
  background: var(--lm-surface-2);
  color: var(--lm-text);
}

.lm-msg--mine.lm-msg--deleted .lm-msg__meta {
  color: var(--lm-muted);
}

/* -- the quote a reply carries -------------------------------------------- */

.lm-msg__quote {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  inline-size: 100%;
  min-inline-size: 0;
  margin-block-end: 6px;
  padding: 6px var(--lm-space-2);
  border: 0;
  border-inline-start: 3px solid var(--lm-primary);
  border-radius: var(--lm-radius-sm);
  background: var(--lm-surface);
  color: var(--lm-text);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.lm-msg--mine .lm-msg__quote {
  background: var(--lm-primary-soft);
  color: var(--lm-primary-text);
  border-inline-start-color: var(--lm-primary-text);
}

.lm-msg__quote-thumb {
  flex: 0 0 auto;
  inline-size: 40px;
  block-size: 40px;
  border-radius: var(--lm-radius-xs);
  object-fit: cover;
}

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

.lm-msg__quote-sender {
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-msg__quote-body {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--lm-text-xs);
  line-height: var(--lm-leading-snug);
  overflow-wrap: anywhere;
}

.lm-msg__quote-body--gone {
  font-style: italic;
  /* An italic's last letter leans past its box, and the clamp above clips
     at the box — "Message deleted" read "Message deletea". A little room at
     both ends, since the lean faces the other way in Arabic. */
  padding-inline: 0.2em;
}

/* A mention inside a message: the reader's own name stands out a little. */
.lm-msg__text .lm-mention {
  font-weight: var(--lm-weight-semibold);
  color: var(--lm-primary-text);
  text-decoration: none;
}

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

.lm-msg--mine .lm-msg__text .lm-mention {
  color: inherit;
  text-decoration: underline;
}

/* -- reactions ------------------------------------------------------------ */

.lm-msg__reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.lm-msg__reaction {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-block-size: 24px;
  padding: 1px 7px;
  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-xs);
  font-weight: var(--lm-weight-semibold);
  cursor: pointer;
}

.lm-msg__reaction .lm-rx {
  inline-size: 16px;
  block-size: 16px;
}

.lm-msg__reaction.is-mine {
  border-color: var(--lm-primary);
  background: var(--lm-primary-soft);
  color: var(--lm-primary-text);
}

.lm-msg__reaction:disabled {
  cursor: default;
}

/* -- the menu ------------------------------------------------------------- */

.lm-msg-menu {
  position: fixed;
  z-index: var(--lm-z-dropdown);
  min-inline-size: 220px;
  max-inline-size: calc(100vw - var(--lm-space-4));
  padding-block: var(--lm-space-2);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-md);
  background: var(--lm-surface);
  color: var(--lm-text);
  box-shadow: var(--lm-shadow-xl);
}

.lm-msg-menu__reactions {
  display: flex;
  justify-content: space-between;
  gap: 2px;
  padding: 0 var(--lm-space-2) var(--lm-space-2);
  margin-block-end: var(--lm-space-1);
  border-block-end: 1px solid var(--lm-border);
}

.lm-msg-menu__react {
  display: grid;
  place-items: center;
  inline-size: 38px;
  block-size: 38px;
  padding: 0;
  border: 0;
  border-radius: var(--lm-radius-pill);
  background: transparent;
  cursor: pointer;
  transition: transform var(--lm-fast) var(--lm-ease);
}

.lm-msg-menu__react .lm-rx {
  inline-size: 28px;
  block-size: 28px;
}

.lm-msg-menu__react:hover,
.lm-msg-menu__react:focus-visible {
  background: var(--lm-surface-2);
  transform: scale(1.12);
}

.lm-msg-menu__react.is-mine {
  background: var(--lm-primary-soft);
}

@media (prefers-reduced-motion: reduce) {
  .lm-msg-menu__react:hover,
  .lm-msg-menu__react:focus-visible {
    transform: none;
  }
}

/* -- replying to, editing ------------------------------------------------- */

.lm-compose-bar {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin-block-end: var(--lm-space-2);
  padding: 6px var(--lm-space-2);
  border-inline-start: 3px solid var(--lm-primary);
  border-radius: var(--lm-radius-sm);
  background: var(--lm-surface-2);
  color: var(--lm-text);
}

.lm-compose-bar__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--lm-primary-text);
}

.lm-compose-bar__icon .lm-icon {
  inline-size: 18px;
  block-size: 18px;
}

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

.lm-compose-bar__title {
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
  color: var(--lm-primary-text);
}

.lm-compose-bar__body {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--lm-text-xs);
  color: var(--lm-muted);
}

.lm-compose-bar__cancel {
  flex: 0 0 auto;
}

/* -- @mention suggestions ------------------------------------------------- */

.lm-mention-list {
  display: flex;
  flex-direction: column;
  max-block-size: 14rem;
  margin-block-end: var(--lm-space-2);
  padding-block: var(--lm-space-1);
  overflow-y: auto;
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-md);
  background: var(--lm-surface);
  color: var(--lm-text);
  box-shadow: var(--lm-shadow-md);
}

.lm-mention-option {
  display: flex;
  align-items: baseline;
  gap: var(--lm-space-2);
  inline-size: 100%;
  min-block-size: 40px;
  padding: var(--lm-space-2) var(--lm-space-3);
  border: 0;
  background: transparent;
  color: var(--lm-text);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.lm-mention-option.is-active,
.lm-mention-option:hover {
  background: var(--lm-surface-2);
}

.lm-mention-option__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
}

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

/* The forward chooser's "send" mark. */
.lm-pick__send {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--lm-primary-text);
}

.lm-pick__send .lm-icon {
  inline-size: 18px;
  block-size: 18px;
}

/* ==========================================================================
   Phase 15 — Stories: the viewer, the create dialog, the viewer list
   ========================================================================== */

/* -- the page at /stories/<username> ---------------------------------------- */

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

.lm-stories-page__text {
  display: grid;
  gap: 2px;
  min-inline-size: 0;
  flex: 1 1 auto;
}

.lm-stories-page__title {
  margin: 0;
  font-size: var(--lm-text-lg);
}

/* -- a profile picture with a story behind it ------------------------------- */

.lm-profile__story {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  box-shadow: 0 0 0 3px var(--lm-border-strong);
}

.lm-profile__story--unseen {
  box-shadow: 0 0 0 4px var(--lm-primary);
}

.lm-profile__story:focus-visible {
  outline: 3px solid var(--lm-primary);
  outline-offset: 4px;
}

/* -- the viewer ------------------------------------------------------------- */

/* Beneath the dialogs (a report, the viewer list), which sit at the modal
   layer over it; above everything else on the page. */
.lm-storyview {
  position: fixed;
  inset: 0;
  z-index: calc(var(--lm-z-modal) - 1);
  display: grid;
  place-items: center;
  background-color: color-mix(in srgb, var(--lm-media-bg) 94%, transparent);
}

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

.lm-storyview__frame {
  position: relative;
  display: flex;
  flex-direction: column;
  inline-size: min(100vw, calc(min(92vh, 880px) * 9 / 16));
  block-size: min(92vh, 880px);
  overflow: hidden;
  border-radius: var(--lm-radius-lg);
  background-color: var(--lm-media-bg);
  color: var(--lm-on-scrim);
  box-shadow: var(--lm-shadow-xl);
}

.lm-storyview__progress {
  position: absolute;
  inset-block-start: 10px;
  inset-inline: 10px;
  z-index: 3;
  display: flex;
  gap: 4px;
}

.lm-storyview__seg {
  flex: 1 1 0;
  block-size: 3px;
  overflow: hidden;
  border-radius: var(--lm-radius-pill);
  background-color: color-mix(in srgb, var(--lm-on-scrim) 35%, transparent);
}

.lm-storyview__segfill {
  display: block;
  block-size: 100%;
  inline-size: 0%;
  background-color: var(--lm-on-scrim);
}

.lm-storyview__head {
  position: absolute;
  inset-block-start: 20px;
  inset-inline: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lm-space-2);
  padding-inline: var(--lm-space-3);
  padding-block-end: var(--lm-space-6);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--lm-media-bg) 60%, transparent), transparent);
}

.lm-storyview__who {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  min-inline-size: 0;
  color: var(--lm-on-scrim);
  text-decoration: none;
}

.lm-storyview__avatar {
  display: grid;
  place-items: center;
  flex: none;
  inline-size: 34px;
  block-size: 34px;
  overflow: hidden;
  border-radius: 50%;
  background-color: var(--lm-primary-strong);
  color: var(--lm-on-primary);
  font-weight: var(--lm-weight-semibold);
}

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

.lm-storyview__meta {
  display: grid;
  min-inline-size: 0;
}

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

.lm-storyview__time {
  font-size: var(--lm-text-xs);
  opacity: 0.85;
}

.lm-storyview__actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}

.lm-storyview__btn {
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--lm-on-scrim);
  cursor: pointer;
}

.lm-storyview__btn svg,
.lm-storyview__btn span > svg {
  inline-size: 20px;
  block-size: 20px;
}

.lm-storyview__btn span {
  display: grid;
  place-items: center;
}

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

.lm-storyview__btn:hover,
.lm-storyview__btn:focus-visible {
  background-color: color-mix(in srgb, var(--lm-on-scrim) 16%, transparent);
}

.lm-storyview__btn:focus-visible,
.lm-storyview__nav:focus-visible {
  outline: 2px solid var(--lm-on-scrim);
  outline-offset: 2px;
}

/* The menu opens under its button, on the reading-end side, over the story. */
.lm-storyview__more {
  position: relative;
}

.lm-storyview__more .lm-storyview__menu {
  inset-inline-start: auto;
  inset-inline-end: 0;
  min-inline-size: 190px;
}

.lm-storyview__stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
}

.lm-storyview__media {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
  background-color: var(--lm-media-bg);
}

/* A third of the story on each side is a tap zone. */
.lm-storyview__nav {
  position: absolute;
  inset-block: 76px 72px;
  z-index: 2;
  display: flex;
  align-items: center;
  inline-size: 34%;
  padding: 0 var(--lm-space-2);
  border: 0;
  background: none;
  color: var(--lm-on-scrim);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.lm-storyview__nav--prev {
  inset-inline-start: 0;
  justify-content: flex-start;
}

.lm-storyview__nav--next {
  inset-inline-end: 0;
  justify-content: flex-end;
}

.lm-storyview__chevron {
  display: grid;
  place-items: center;
  inline-size: 36px;
  block-size: 36px;
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--lm-media-bg) 45%, transparent);
  opacity: 0;
  transition: opacity var(--lm-fast);
}

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

/* The back chevron points towards the reading start, whichever side that
   is: the icon already mirrors for Arabic, and this turns it round. */
.lm-storyview__nav--prev .lm-storyview__chevron {
  transform: scaleX(-1);
}

@media (hover: hover) {
  .lm-storyview__frame:hover .lm-storyview__chevron,
  .lm-storyview__nav:focus-visible .lm-storyview__chevron {
    opacity: 1;
  }
}

.lm-storyview__caption {
  position: absolute;
  inset-block-end: 64px;
  inset-inline: var(--lm-space-4);
  z-index: 3;
  margin: 0;
  padding: var(--lm-space-2) var(--lm-space-3);
  border-radius: var(--lm-radius-md);
  background-color: color-mix(in srgb, var(--lm-media-bg) 55%, transparent);
  font-size: var(--lm-text-sm);
  line-height: var(--lm-leading);
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: none;
}

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

.lm-storyview__foot {
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4);
  padding-block-end: calc(var(--lm-space-4) + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, color-mix(in srgb, var(--lm-media-bg) 60%, transparent), transparent);
}

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

.lm-storyview__views {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  padding: var(--lm-space-2) var(--lm-space-3);
  border: 0;
  border-radius: var(--lm-radius-pill);
  background-color: color-mix(in srgb, var(--lm-on-scrim) 16%, transparent);
  color: var(--lm-on-scrim);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-medium);
  cursor: pointer;
}

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

.lm-storyview__views:disabled {
  cursor: default;
}

.lm-storyview__audience {
  font-size: var(--lm-text-xs);
  opacity: 0.85;
}

.lm-storyview__frame.is-loading .lm-storyview__stage {
  opacity: 0.4;
}

/* On a phone the story is the whole screen, inside the safe area. */
@media (max-width: 600px) {
  .lm-storyview {
    background-color: var(--lm-media-bg);
  }

  .lm-storyview__frame {
    inline-size: 100vw;
    block-size: 100vh;
    block-size: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }

  .lm-storyview__progress {
    inset-block-start: calc(8px + env(safe-area-inset-top, 0px));
  }

  .lm-storyview__head {
    inset-block-start: calc(16px + env(safe-area-inset-top, 0px));
    padding-inline: var(--lm-space-2);
  }

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

/* -- creating one ----------------------------------------------------------- */

.lm-storycreate {
  max-inline-size: 520px;
}

.lm-storycreate__body {
  display: grid;
  gap: var(--lm-space-4);
}

.lm-storycreate__pick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--lm-space-3);
}

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

.lm-storycreate__choice {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-lg);
  background-color: var(--lm-surface);
  color: var(--lm-text);
  text-align: start;
  cursor: pointer;
  transition: border-color var(--lm-fast), background-color var(--lm-fast);
}

.lm-storycreate__choice:hover,
.lm-storycreate__choice:focus-visible {
  border-color: var(--lm-primary);
  background-color: var(--lm-primary-soft);
}

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

.lm-storycreate__choice-icon svg {
  inline-size: 22px;
  block-size: 22px;
}

.lm-storycreate__choice-text {
  display: grid;
  gap: 2px;
  min-inline-size: 0;
}

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

.lm-storycreate__preview {
  display: grid;
  justify-items: center;
  gap: var(--lm-space-3);
}

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

.lm-storycreate__media {
  display: grid;
  place-items: center;
  inline-size: 100%;
  overflow: hidden;
  border-radius: var(--lm-radius-lg);
  background-color: var(--lm-media-bg);
}

.lm-storycreate__media img,
.lm-storycreate__media video {
  display: block;
  max-inline-size: 100%;
  max-block-size: min(46vh, 420px);
  object-fit: contain;
}

.lm-storycreate__progress {
  display: grid;
  gap: var(--lm-space-2);
}

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

.lm-storycreate__bar {
  display: block;
  block-size: 6px;
  overflow: hidden;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-sunken);
}

.lm-storycreate__fill {
  display: block;
  block-size: 100%;
  inline-size: 0%;
  background-color: var(--lm-primary);
  transition: inline-size var(--lm-fast);
}

.lm-storycreate__progress.is-processing .lm-storycreate__fill {
  animation: lm-story-processing 1.2s var(--lm-ease) infinite alternate;
}

@keyframes lm-story-processing {
  from { opacity: 1; }
  to { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .lm-storycreate__progress.is-processing .lm-storycreate__fill {
    animation: none;
  }
}

/* -- who has seen it -------------------------------------------------------- */

.lm-modal--over-story {
  z-index: var(--lm-z-modal);
}

.lm-storyviewers {
  display: grid;
  gap: 2px;
  margin: 0 0 var(--lm-space-3);
  padding: 0;
  list-style: none;
}

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

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

.lm-storyviewers__name {
  overflow: hidden;
  font-weight: var(--lm-weight-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

/* -- a reported story, in the report queue ---------------------------------- */

.lm-report-row__story {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-3);
}

.lm-report-row__still {
  flex: none;
  inline-size: 54px;
  block-size: 96px;
  object-fit: cover;
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-media-bg);
}

.lm-report-row__caption {
  display: block;
  margin-block-start: var(--lm-space-1);
  overflow-wrap: anywhere;
}

/* ==========================================================================
   Phase 16 — Reels: the feed, one reel at a time; the comments panel; the
   create dialog; grids of reels on a profile and in the saved list
   --------------------------------------------------------------------------
   A reel is shown WHOLE inside a 9:16 frame — contained, never cropped and
   never stretched — so a landscape video has bars above and below rather
   than losing its sides. On a desktop the frame stands in the middle with
   its actions beside it; on a phone it fills the space between the header
   and the bottom bar, with the actions over its end edge.
   ========================================================================== */

.lm-shell--reels {
  padding-block: var(--lm-space-4);
}

body.lm-has-bottom-nav.lm-reels-page .lm-shell--reels {
  padding-block-end: var(--lm-space-4);
}

.lm-reels {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
  min-block-size: 0;
}

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

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

/* Phase 31. For You, Following, Latest: real links, one pill group. */
.lm-reels__tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-surface);
}

.lm-reels__tab {
  padding: 6px var(--lm-space-3);
  border-radius: var(--lm-radius-pill);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-medium);
  white-space: nowrap;
  text-decoration: none;
  transition: background-color var(--lm-fast), color var(--lm-fast);
}

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

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

.lm-reels__empty {
  padding: var(--lm-space-6);
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-xl);
  background-color: var(--lm-surface);
}

.lm-reels__body {
  display: flex;
  justify-content: center;
  gap: var(--lm-space-4);
  /* Exact, like the messages pane: the header, the shell's padding above
     and below, and the title row come off the window. */
  block-size: calc(100vh - var(--lm-header-height) - (var(--lm-space-4) * 2) - 48px);
  min-block-size: 460px;
}

.lm-reels__track {
  flex: 0 1 auto;
  min-inline-size: 0;
  block-size: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  outline: none;
}

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

.lm-reels__end {
  margin: 0;
  padding: var(--lm-space-6) var(--lm-space-4);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  text-align: center;
  scroll-snap-align: end;
}

.lm-reels__nav {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--lm-space-3);
}

.lm-reels__step {
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  border: 1px solid var(--lm-card-border);
  border-radius: 50%;
  background-color: var(--lm-surface);
  color: var(--lm-text);
  cursor: pointer;
}

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

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

/* -- one reel ---------------------------------------------------------------- */

.lm-reel {
  display: flex;
  align-items: flex-end;
  gap: var(--lm-space-3);
  block-size: 100%;
  padding-block: 2px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.lm-reel__stage {
  position: relative;
  block-size: 100%;
  aspect-ratio: 9 / 16;
  max-inline-size: calc(100vw - (var(--lm-space-4) * 2));
  overflow: hidden;
  border-radius: var(--lm-radius-xl);
  background-color: var(--lm-media-bg);
  color: var(--lm-on-scrim);
}

.lm-reel__video {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
  background-color: var(--lm-media-bg);
}

/* The whole picture is the play/pause button. */
.lm-reel__toggle {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--lm-on-scrim);
  cursor: pointer;
}

.lm-reel__toggle:focus-visible {
  outline: 3px solid var(--lm-on-scrim);
  outline-offset: -6px;
}

.lm-reel__state {
  display: grid;
  place-items: center;
  inline-size: 68px;
  block-size: 68px;
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--lm-media-bg) 50%, transparent);
  opacity: 0;
  transition: opacity var(--lm-fast);
}

.lm-reel__state svg { inline-size: 30px; block-size: 30px; }

.lm-reel__state-play { display: grid; }

.lm-reel__state-pause { display: none; }

.lm-reel.is-paused .lm-reel__state { opacity: 1; }

.lm-reel__sound {
  position: absolute;
  inset-block-start: var(--lm-space-3);
  inset-inline-end: var(--lm-space-3);
  z-index: 2;
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--lm-media-bg) 50%, transparent);
  color: var(--lm-on-scrim);
  cursor: pointer;
}

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

.lm-reel__sound-on,
.lm-reel__sound-off { display: grid; }

.lm-reel__sound-on[hidden],
.lm-reel__sound-off[hidden] { display: none; }

.lm-reel__progress {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 3;
  block-size: 3px;
  background-color: color-mix(in srgb, var(--lm-on-scrim) 25%, transparent);
}

.lm-reel__progress span {
  display: block;
  inline-size: 0;
  block-size: 100%;
  background-color: var(--lm-on-scrim);
}

/* Who, when, and the caption: over the foot of the picture, on a fade. */
.lm-reel__info {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 2;
  display: grid;
  gap: var(--lm-space-1);
  padding: 56px var(--lm-space-4) var(--lm-space-4);
  background: linear-gradient(to top, color-mix(in srgb, var(--lm-media-bg) 72%, transparent), transparent);
  pointer-events: none;
}

.lm-reel__who {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  justify-self: start;
  min-inline-size: 0;
  color: var(--lm-on-scrim);
  font-weight: var(--lm-weight-semibold);
  text-decoration: none;
  pointer-events: auto;
}

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

.lm-reel__avatar {
  flex-shrink: 0;
  border: 2px solid var(--lm-on-scrim);
}

.lm-reel__time {
  color: var(--lm-on-scrim);
  font-size: var(--lm-text-xs);
}

/* Phase 31. Why this reel is in For You, when that is worth saying. */
.lm-reel__reason {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  min-inline-size: 0;
  margin: 0;
  color: var(--lm-on-scrim);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-medium);
  text-shadow: 0 1px 2px var(--lm-media-bg);
}

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

.lm-reel__caption {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: var(--lm-text-sm);
  line-height: var(--lm-leading);
  overflow-wrap: anywhere;
  pointer-events: auto;
}

.lm-reel__caption a {
  color: var(--lm-on-scrim);
  font-weight: var(--lm-weight-semibold);
}

.lm-reel__info.is-expanded .lm-reel__caption {
  display: block;
  max-block-size: 40vh;
  overflow-y: auto;
}

.lm-reel__more-text {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--lm-on-scrim);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  cursor: pointer;
  pointer-events: auto;
}

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

/* -- the actions beside it -------------------------------------------------- */

.lm-reel__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--lm-space-3);
  padding-block-end: var(--lm-space-2);
}

/* Positioned, so the row of reactions and the menu open from it. */
.lm-reel__action--react,
.lm-reel__more { position: relative; }

.lm-reel__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.lm-reel__btn,
.lm-reel__rail .lm-reactor__main {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  inline-size: 44px;
  block-size: 44px;
  min-block-size: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
  cursor: pointer;
}

.lm-reel__btn svg,
.lm-reel__rail .lm-reactor__main svg { inline-size: 22px; block-size: 22px; }

.lm-reel__btn:hover,
.lm-reel__rail .lm-reactor__main:hover { background-color: var(--lm-border); }

/* The word under the thumb is read out, not shown: the count is. */
.lm-reel__rail .lm-reactor__label {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The row of reactions opens towards the picture, not off the screen. */
.lm-reel__rail .lm-reactor__menu {
  inset-block-end: 0;
  inset-inline-start: auto;
  inset-inline-end: calc(100% + 6px);
}

.lm-reel__count {
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
}

.lm-reel__save-on { display: none; }

.lm-reel__save[data-lm-saved="1"] .lm-reel__save-off { display: none; }

.lm-reel__save[data-lm-saved="1"] .lm-reel__save-on { display: grid; color: var(--lm-primary-text); }

.lm-reel__views {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
}

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

/* The menu is at the foot of the rail, so it opens upwards. */
.lm-reel__menu {
  inset-block-start: auto;
  inset-block-end: calc(100% + var(--lm-space-2));
  transform-origin: bottom right;
}

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

.lm-reelpanel {
  display: flex;
  flex: 0 0 360px;
  flex-direction: column;
  min-inline-size: 0;
  block-size: 100%;
  overflow: hidden;
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-xl);
  background-color: var(--lm-surface);
}

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

.lm-reelpanel__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);
}

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

.lm-reelpanel__body {
  flex: 1 1 auto;
  min-block-size: 0;
  overflow-y: auto;
  padding: var(--lm-space-3) var(--lm-space-4);
}

.lm-reelpanel__thread { min-block-size: 40px; }

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

/* With the panel open on a middling screen, the step buttons give way. */
@media (max-width: 1279px) {
  .lm-reels.has-panel .lm-reels__nav { display: none; }
}

/* -- the create dialog ------------------------------------------------------ */

.lm-reelcreate {
  max-inline-size: 520px;
}

.lm-reelcreate__body {
  display: grid;
  gap: var(--lm-space-4);
}

.lm-reelcreate__pick[hidden],
.lm-reelcreate__preview[hidden] { display: none; }

.lm-reelcreate__choose {
  display: grid;
  justify-items: center;
  gap: var(--lm-space-2);
  inline-size: 100%;
  padding: var(--lm-space-6) var(--lm-space-4);
  border: 2px dashed var(--lm-border);
  border-radius: var(--lm-radius-lg);
  background-color: var(--lm-sunken);
  color: var(--lm-text);
  text-align: center;
  cursor: pointer;
}

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

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

.lm-reelcreate__choose-icon svg { inline-size: 24px; block-size: 24px; }

.lm-reelcreate__preview {
  display: grid;
  justify-items: center;
  gap: var(--lm-space-2);
}

.lm-reelcreate__media {
  inline-size: 100%;
  max-block-size: 44vh;
  overflow: hidden;
  border-radius: var(--lm-radius-lg);
  background-color: var(--lm-media-bg);
}

.lm-reelcreate__media video {
  display: block;
  inline-size: 100%;
  max-block-size: 44vh;
  object-fit: contain;
}

.lm-reelcreate__caption { resize: vertical; }

.lm-reelcreate__count { margin: var(--lm-space-1) 0 0; text-align: end; }

.lm-reelcreate__progress {
  display: grid;
  gap: var(--lm-space-2);
}

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

.lm-reelcreate__bar {
  display: block;
  block-size: 6px;
  overflow: hidden;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-surface-secondary);
}

.lm-reelcreate__fill {
  display: block;
  inline-size: 0;
  block-size: 100%;
  background-color: var(--lm-primary-strong);
  transition: inline-size var(--lm-fast);
}

.lm-reelcreate__progress.is-processing .lm-reelcreate__fill {
  inline-size: 100%;
  animation: lm-story-processing 1.2s var(--lm-ease) infinite alternate;
}

/* -- grids of reels: a profile's tab, the saved list ------------------------- */

.lm-reelgrid {
  display: grid;
  gap: var(--lm-space-3);
}

.lm-reelgrid__count { margin: 0 0 var(--lm-space-2); }

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

.lm-reeltile {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-media-bg);
  color: var(--lm-on-scrim);
}

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

.lm-reeltile:hover .lm-reeltile__poster { transform: scale(1.03); }

.lm-reeltile__meta,
.lm-reeltile__audience {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px var(--lm-space-2);
  border-radius: var(--lm-radius-pill);
  background-color: color-mix(in srgb, var(--lm-media-bg) 55%, transparent);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
}

.lm-reeltile__meta { inset-block-end: var(--lm-space-2); inset-inline-start: var(--lm-space-2); }

.lm-reeltile__audience { inset-block-start: var(--lm-space-2); inset-inline-end: var(--lm-space-2); }

.lm-reeltile__meta svg,
.lm-reeltile__audience svg { inline-size: 14px; block-size: 14px; }

.lm-reelgrid__more { margin-block-start: var(--lm-space-1); }

/* Phase 57: five tabs now (Purchased joined). They keep their words whole and
   scroll inside the bar on a phone, as the profile's tabs do, rather than
   widen the page. */
.lm-saved__tabs { margin-block-start: var(--lm-space-3); overflow-x: auto; scrollbar-width: none; }
.lm-saved__tabs::-webkit-scrollbar { display: none; }
.lm-saved__tabs .lm-tab { flex: 1 0 auto; text-align: center; white-space: nowrap; }

.lm-saved__reels { padding: var(--lm-space-4); }

/* -- a phone ------------------------------------------------------------------ */

@media (max-width: 767px) {
  /* The feed runs edge to edge between the header and the bottom bar. */
  body.lm-reels-page .lm-shell--reels,
  body.lm-has-bottom-nav.lm-reels-page .lm-shell--reels {
    padding: 0;
  }

  .lm-reels { gap: 0; }

  .lm-reels__head {
    position: absolute;
    inset-block-start: var(--lm-space-2);
    inset-inline: var(--lm-space-3);
    z-index: 4;
    pointer-events: none;
  }

  .lm-reels__head > * { pointer-events: auto; }

  .lm-reels__title {
    color: var(--lm-on-scrim);
    font-size: var(--lm-text-lg);
    text-shadow: 0 1px 3px var(--lm-media-bg);
  }

  /* Phase 31. Over the picture the tabs are the heading's place: the title
     stays for screen readers, and Create keeps its icon and its name. */
  .lm-reels__title--tabs,
  .lm-reels__title--tabs ~ [data-lm-reel-create] span {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  /* Longer tab names (another language) scroll inside the pill rather than
     pushing Create off the screen. */
  .lm-reels__tabs {
    min-inline-size: 0;
    overflow-x: auto;
    scrollbar-width: none;
    border: 0;
    background-color: color-mix(in srgb, var(--lm-media-bg) 45%, transparent);
  }

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

  .lm-reels__head [data-lm-reel-create] { flex: none; }

  .lm-reels__tab {
    padding-inline: 10px;
    color: var(--lm-on-scrim);
    text-shadow: 0 1px 2px var(--lm-media-bg);
  }

  .lm-reels__tab:hover {
    background-color: color-mix(in srgb, var(--lm-media-bg) 30%, transparent);
    color: var(--lm-on-scrim);
  }

  .lm-reels__tab.is-active {
    background-color: var(--lm-on-scrim);
    color: var(--lm-media-bg);
    text-shadow: none;
  }

  .lm-reels__empty {
    margin: var(--lm-space-3);
    margin-block-start: 64px;
  }

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

  .lm-reels__body {
    gap: 0;
    block-size: calc(100dvh - var(--lm-header-height) - var(--lm-bottom-nav) - env(safe-area-inset-bottom, 0px));
    min-block-size: 0;
  }

  .lm-reels__track {
    flex: 1 1 auto;
    inline-size: 100%;
  }

  .lm-reels__nav { display: none; }

  .lm-reel {
    position: relative;
    display: block;
    padding: 0;
  }

  .lm-reel__stage {
    inline-size: 100%;
    max-inline-size: none;
    aspect-ratio: auto;
    border-radius: 0;
  }

  .lm-reel__sound { inset-block-start: 52px; }

  /* A portrait reel on a narrow phone is letterboxed: the picture starts
     (stage height − width × 16/9) / 2 below the stage's top — 77px at 320px
     wide — and the dark button half on that black bar all but vanished.
     Below the bar whenever the bar is taller than the usual place. */
  .lm-reel:not(.lm-reel--wide) .lm-reel__sound {
    inset-block-start: max(52px, calc((100% - 100vw * 16 / 9) / 2 + var(--lm-space-3)));
  }

  /* The caption keeps clear of the actions over the end edge. */
  .lm-reel__info {
    padding-inline-end: 76px;
    padding-block-end: var(--lm-space-5);
  }

  .lm-reel__rail {
    position: absolute;
    inset-inline-end: var(--lm-space-2);
    inset-block-end: var(--lm-space-6);
    z-index: 3;
    padding: 0;
  }

  .lm-reel__btn,
  .lm-reel__rail .lm-reactor__main {
    background-color: color-mix(in srgb, var(--lm-media-bg) 45%, transparent);
    color: var(--lm-on-scrim);
  }

  .lm-reel__btn:hover,
  .lm-reel__rail .lm-reactor__main:hover {
    background-color: color-mix(in srgb, var(--lm-media-bg) 60%, transparent);
  }

  .lm-reel__count,
  .lm-reel__views {
    color: var(--lm-on-scrim);
    text-shadow: 0 1px 2px var(--lm-media-bg);
  }

  /* Comments rise over the lower part of the reel, which keeps playing
     above them, and over the bottom bar. */
  .lm-reelpanel {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: var(--lm-z-drawer);
    block-size: 70dvh;
    padding-block-end: env(safe-area-inset-bottom, 0px);
    border-inline: 0;
    border-block-end: 0;
    border-radius: var(--lm-radius-xl) var(--lm-radius-xl) 0 0;
    box-shadow: var(--lm-shadow-xl);
  }

  .lm-reelgrid__tiles { gap: var(--lm-space-1); }
}

/* ==========================================================================
   Phase 17 — Communities: discovery, the community page, its tabs, the
   member and request lists, and the forms that start and change one.
   A community's picture is a rounded square, so a community is never
   mistaken for a person, whose picture is a circle.
   ========================================================================== */

/* -- The picture -------------------------------------------------------- */
.lm-community-pic {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  inline-size: 48px;
  block-size: 48px;
  border-radius: var(--lm-radius-md);
  font-weight: var(--lm-weight-bold);
  font-size: var(--lm-text-lg);
  line-height: 1;
}

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

.lm-community-pic svg { inline-size: 40%; block-size: 40%; }

.lm-community-pic--sm { inline-size: 32px; block-size: 32px; border-radius: var(--lm-radius-sm); font-size: var(--lm-text-sm); }
.lm-community-pic--lg { inline-size: 88px; block-size: 88px; border-radius: var(--lm-radius-lg); font-size: 2rem; }
.lm-community-pic--xl { inline-size: 120px; block-size: 120px; border-radius: var(--lm-radius-xl); font-size: 2.75rem; }

/* -- Discovery ---------------------------------------------------------- */
.lm-communities__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lm-space-4);
  padding: var(--lm-space-5);
  flex-wrap: wrap;
}

.lm-communities__intro { min-inline-size: 0; flex: 1 1 240px; }

.lm-communities__title {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  font-size: var(--lm-text-xl);
  font-weight: var(--lm-weight-bold);
}

.lm-communities__title svg { inline-size: 24px; block-size: 24px; color: var(--lm-primary-text); }

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

.lm-communities__note { margin: 0; padding-inline: var(--lm-space-2); }

.lm-communities__count { margin: 0 0 var(--lm-space-3); }

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

/* -- A card ------------------------------------------------------------- */
.lm-community-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.lm-community-card__cover {
  position: relative;
  display: block;
  block-size: 92px;
  background-color: var(--lm-surface-secondary);
}

.lm-community-card__cover img,
.lm-community-card__cover .lm-tile {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.lm-community-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: var(--lm-space-2);
  padding: 0 var(--lm-space-4) var(--lm-space-4);
}

/* Astride the cover's edge, like a profile's portrait — and above it: the
   cover comes first in the card and would otherwise be painted over it. */
.lm-community-card__pic { position: relative; z-index: 1; margin-block-start: -26px; }

.lm-community-card__pic .lm-community-pic {
  box-shadow: 0 0 0 3px var(--lm-surface);
}

.lm-community-card__name {
  margin: 0;
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-semibold);
  line-height: var(--lm-leading-snug);
  overflow-wrap: anywhere;
}

.lm-community-card__name a { color: var(--lm-text); }
.lm-community-card__name a:hover { color: var(--lm-primary-text); }

.lm-community-card__meta,
.lm-community__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--lm-space-1) var(--lm-space-2);
  margin: 0;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
}

.lm-community-card__meta svg,
.lm-community__meta svg { inline-size: 15px; block-size: 15px; flex-shrink: 0; }

.lm-community-card__desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.lm-community-card__actions {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin-block-start: auto;
  padding-block-start: var(--lm-space-2);
}

/* -- The community's header -------------------------------------------- */
/* Phase 38.1.1: the card no longer clips (it cut off the "more" menu that
   opens below the header's last row — on the event, community and Page
   headers). Only the cover needed clipping, to the card's rounded top
   corners, so the cover clips itself and takes the card's corners
   (inherit: the card's radius changes with the screen width). */
.lm-community { padding: 0; }

.lm-community__cover {
  position: relative;
  overflow: hidden;
  border-start-start-radius: inherit;
  border-start-end-radius: inherit;
  /* An explicit width: left auto, the height cap below is carried through the
     ratio into a width cap (768px), and a wider card shows a gap at its end. */
  inline-size: 100%;
  /* 1600 × 500, the cover's stored shape. */
  aspect-ratio: 16 / 5;
  max-block-size: 240px;
  background-color: var(--lm-surface-secondary);
}

.lm-community__cover img,
.lm-community__cover .lm-tile {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.lm-community__bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--lm-space-3);
  padding-inline: var(--lm-space-6) var(--lm-space-5);
}

.lm-community__pic { position: relative; z-index: 1; flex-shrink: 0; margin-block-start: -60px; }

.lm-community__pic .lm-community-pic { box-shadow: 0 0 0 4px var(--lm-surface); }

.lm-community__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--lm-space-2);
  padding-block-start: var(--lm-space-3);
}

.lm-community__body {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  padding: var(--lm-space-3) var(--lm-space-6) var(--lm-space-5);
}

.lm-community__name {
  margin: 0;
  font-size: 1.5rem;
  font-weight: var(--lm-weight-bold);
  letter-spacing: -0.01em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.lm-community__desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0;
  color: var(--lm-text-secondary);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

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

/* Five tabs do not fit a phone's width at a readable size, so they scroll
   sideways rather than squeezing their words. */
.lm-community__tabs {
  overflow-x: auto;
  scrollbar-width: none;
}

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

.lm-community__tabs .lm-tabs__tab { flex: 1 0 auto; padding-inline: var(--lm-space-4); white-space: nowrap; }

/* The community's own bar: no sideways scroll — the tabs that fit stay in one
   row and the rest wait in "More" (luma.js measures; while it measures, the
   tabs keep their natural width). Other bars sharing the class keep their
   scroll. */
.lm-community__tabs[data-lm-priority-tabs] { overflow: visible; align-items: stretch; }
.lm-community__tabs-row { display: flex; flex: 1 1 auto; gap: var(--lm-space-1); min-inline-size: 0; overflow: hidden; }
.lm-community__tabs[data-lm-priority-tabs].is-measuring .lm-tabs__tab { flex-grow: 0; }
.lm-community__more { display: flex; flex: none; }
.lm-community__more-btn { border: 0; background: none; font: inherit; cursor: pointer; }
.lm-community__more-btn svg { inline-size: 16px; block-size: 16px; flex: none; transition: transform var(--lm-fast) var(--lm-ease); }
.lm-community__more-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.lm-community__more .lm-dropdown__item.is-active { color: var(--lm-primary-text); font-weight: var(--lm-weight-semibold); }
.lm-community__more .lm-dropdown__item .lm-tabs__count { margin-inline-start: auto; }

.lm-community__hint {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  padding: var(--lm-space-3) var(--lm-space-4);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
  font-size: var(--lm-text-sm);
}

.lm-community__hint svg { inline-size: 18px; block-size: 18px; flex-shrink: 0; }

/* -- In a post's meta line: where it was written ------------------------- */
.lm-post__community {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-1);
  min-inline-size: 0;
  color: var(--lm-muted);
  font-weight: var(--lm-weight-medium);
}

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

.lm-post__community span {
  overflow: hidden;
  max-inline-size: 180px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

/* -- The composer, in a community --------------------------------------- */
.lm-composer__audience {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  min-inline-size: 0;
  margin-inline-end: auto;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
}

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

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

/* -- Members and requests ------------------------------------------------ */
.lm-community-members,
.lm-community-about {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
  padding: var(--lm-space-5);
}

.lm-community-members__heading {
  margin: var(--lm-space-2) 0 0;
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-semibold);
}

.lm-community-members__lead,
.lm-community-members__empty {
  margin: 0;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
}

.lm-community-members__list {
  display: flex;
  flex-direction: column;
}

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

.lm-member-row:last-child { border-block-end: 0; }

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

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

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

.lm-member-row__handle {
  display: flex;
  align-items: center;
  gap: var(--lm-space-1);
  overflow: hidden;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
  white-space: nowrap;
}

.lm-member-row__buttons {
  display: flex;
  flex-shrink: 0;
  gap: var(--lm-space-2);
}

/* -- About ---------------------------------------------------------------- */
.lm-community-about__text {
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.lm-community-about__facts {
  display: grid;
  gap: var(--lm-space-3);
  margin: 0;
}

.lm-community-about__fact dt {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  font-weight: var(--lm-weight-semibold);
}

.lm-community-about__fact dt svg { inline-size: 18px; block-size: 18px; color: var(--lm-muted); }

.lm-community-about__fact dd {
  margin: var(--lm-space-1) 0 0;
  padding-inline-start: 26px;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
}

.lm-community-about__actions { display: flex; justify-content: center; }

/* -- The forms ------------------------------------------------------------ */
.lm-community-form {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-4);
}

.lm-community-form__submit { display: flex; justify-content: flex-end; }

.lm-community-form__pic { flex-shrink: 0; }

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

/* The address: the fixed part of it, then what is typed. */
.lm-community-slug {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--lm-border-strong);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface);
}

.lm-community-slug__prefix {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-inline-size: 0;
  /* Never more than half: what is typed is the part that matters. */
  max-inline-size: 50%;
  overflow: hidden;
  padding-inline: var(--lm-space-3);
  background-color: var(--lm-surface-2);
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lm-community-slug .lm-input {
  flex: 1 1 140px;
  min-inline-size: 0;
  border: 0;
  border-radius: 0;
}

.lm-community-slug--fixed {
  margin: 0;
  padding: var(--lm-space-3);
  color: var(--lm-muted);
  overflow-wrap: anywhere;
}

.lm-community-privacy {
  display: grid;
  gap: var(--lm-space-3);
}

.lm-community-privacy__option {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-3);
  padding: var(--lm-space-3) var(--lm-space-4);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-lg);
  cursor: pointer;
}

.lm-community-privacy__option:has(input:checked) {
  border-color: var(--lm-primary);
  background-color: var(--lm-primary-soft);
}

.lm-community-privacy__option input { margin-block-start: 4px; accent-color: var(--lm-primary); }

.lm-community-privacy__mark svg { inline-size: 20px; block-size: 20px; color: var(--lm-primary-text); }

.lm-community-privacy__text { display: flex; flex-direction: column; gap: var(--lm-space-1); }

.lm-community-privacy__label { font-weight: var(--lm-weight-semibold); }

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

.lm-community-transfer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-3);
  margin-block-start: var(--lm-space-3);
}

.lm-community-transfer .lm-select { flex: 1 1 220px; min-inline-size: 0; }

/* -- Phones ---------------------------------------------------------------- */
@media (max-width: 767px) {
  .lm-community-grid { grid-template-columns: minmax(0, 1fr); gap: var(--lm-space-3); }

  .lm-communities__head { padding: var(--lm-space-4); }

  .lm-community__bar { padding-inline: var(--lm-space-4); }

  .lm-community__pic { margin-block-start: -44px; }

  .lm-community__pic .lm-community-pic--xl {
    inline-size: 88px;
    block-size: 88px;
    border-radius: var(--lm-radius-lg);
    font-size: 2rem;
  }

  .lm-community__body { padding: var(--lm-space-3) var(--lm-space-4) var(--lm-space-4); }

  .lm-community__name { font-size: 1.25rem; }

  .lm-community-members,
  .lm-community-about { padding: var(--lm-space-4); }

  .lm-member-row__buttons .lm-btn { padding-inline: var(--lm-space-3); }

  .lm-post__community span { max-inline-size: 120px; }
}

@media (max-width: 479px) {
  .lm-community-slug__host { display: none; }

  .lm-community-slug__prefix { max-inline-size: none; flex-shrink: 0; }
}

@media (max-width: 379px) {
  /* The button and the menu stay on one line beside the picture. */
  .lm-community__actions { flex-wrap: nowrap; }

  .lm-community__actions .lm-btn { padding-inline: var(--lm-space-3); }

  .lm-community__actions .lm-btn span { font-size: var(--lm-text-sm); }


  .lm-member-row { flex-wrap: wrap; }

  .lm-member-row__buttons { inline-size: 100%; justify-content: flex-end; }
}

/* The discovery tabs sit between the head card and the list with the
   feed's own spacing; the locked notice and the member search are cards
   laid out by their contents. Named so the templates' hooks have a rule. */
.lm-communities__tabs,
.lm-community__locked { margin: 0; }

.lm-community-members__search { margin: 0; }

.lm-member-row__menu { flex-shrink: 0; }

/* ==========================================================================
   Phase 39 — The community foundation: the mode, the 18+ label and the
   category as small marks; tags; links; the leadership seats; the
   invitation box. Every icon here has its own size: Lm_Icon's SVG is
   unsized (see the icon-sizing note at the top of components.css).
   ========================================================================== */

.lm-community-card__marks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-1);
  margin: 0;
}

.lm-community__marks { margin-block-start: var(--lm-space-2); }

.lm-community-mark { text-decoration: none; }

.lm-community-mark svg { inline-size: 13px; block-size: 13px; flex-shrink: 0; }

a.lm-community-mark:hover { color: var(--lm-primary-text); }

.lm-community-mark.is-active {
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
}

.lm-community__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-1) var(--lm-space-2);
  margin: var(--lm-space-3) 0 0;
}

.lm-community-adult { margin: 0; }

.lm-community-adult p { margin: 0; }

.lm-community-adult p + p { margin-block-start: var(--lm-space-1); }

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

.lm-communities__cats .lm-community-mark { padding-block: var(--lm-space-1); padding-inline: var(--lm-space-3); font-size: var(--lm-text-sm); }

.lm-communities__filter { flex-wrap: wrap; }

.lm-communities__filter > span { flex: 1 1 auto; min-inline-size: 0; overflow-wrap: anywhere; }

.lm-community-about__sub {
  margin: var(--lm-space-4) 0 var(--lm-space-2);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  color: var(--lm-text-secondary);
}

.lm-community-links {
  display: grid;
  gap: var(--lm-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-community-links li {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  min-inline-size: 0;
}

.lm-community-links svg { inline-size: 16px; block-size: 16px; flex-shrink: 0; color: var(--lm-muted); }

.lm-community-links a { min-inline-size: 0; overflow-wrap: anywhere; }

.lm-community-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0 var(--lm-space-4);
}

.lm-community-seats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: var(--lm-space-3);
  margin: 0 0 var(--lm-space-3);
}

.lm-community-seats > div {
  padding: var(--lm-space-3);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-md);
}

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

.lm-community-seats dd { margin: var(--lm-space-1) 0 0; font-size: var(--lm-text-lg); font-weight: var(--lm-weight-semibold); }

.lm-community-adult-field .lm-check input:disabled + span { color: var(--lm-muted); }

/* ==========================================================================
   Phase 18 — Pages. A Page reuses the community layout (the cover, the bar,
   the card grid, the member rows) and differs where it IS different: its
   picture is a circle, because a Page is the author of its posts the way a
   person is, and it wears a small flag with its category where a person's
   @handle would be.
   ========================================================================== */

/* -- The picture: always a sized class, never the parent's size ---------- */
/* Two classes, not one: .lm-avatar sets 40px in components.css, which loads
   AFTER this file, so a single class here lost and every Page header picture
   was drawn at 40px inside the cover (the first desktop screenshot). */
.lm-avatar.lm-page-pic--card   { inline-size: 52px;  block-size: 52px;  font-size: var(--lm-text-lg); }
.lm-avatar.lm-page-pic--header { inline-size: 132px; block-size: 132px; font-size: 3rem; }
.lm-avatar.lm-page-pic--row    { inline-size: 40px;  block-size: 40px;  font-size: var(--lm-text-base); }

/* The placeholder on the form carries an icon; Lm_Icon() has no size of
   its own, so it gets one here. */
.lm-page-pic svg { inline-size: 45%; block-size: 45%; }

/* Astride the cover, above it (the cover is painted first). */
.lm-page__pic { margin-block-start: -66px; }

.lm-page__pic .lm-page-pic,
.lm-page-card__pic .lm-page-pic { box-shadow: 0 0 0 4px var(--lm-surface); }

.lm-page-card__pic .lm-page-pic { box-shadow: 0 0 0 3px var(--lm-surface); }

.lm-page__handle {
  margin: 0;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
  overflow-wrap: anywhere;
}

/* The flag and the category, in a post's header, an embed, a card and the
   Page's own header. */
.lm-page-kind {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-1);
  min-inline-size: 0;
  color: var(--lm-muted);
}

.lm-page-kind svg {
  flex-shrink: 0;
  inline-size: 14px;
  block-size: 14px;
}

.lm-page-kind span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-page-card .lm-community-card__meta { flex-wrap: wrap; }

.lm-page-form__pic .lm-page-pic { box-shadow: 0 0 0 1px var(--lm-border); }

.lm-page-form__public { margin-block-start: var(--lm-space-3); color: var(--lm-text); }

.lm-pages__tabs { margin: 0; }

@media (max-width: 767px) {
  .lm-page__pic { margin-block-start: -48px; }

  .lm-page__pic .lm-avatar.lm-page-pic--header {
    inline-size: 88px;
    block-size: 88px;
    font-size: 2rem;
  }
}

/* A phone: staff have Follow, Manage Page and the menu — too wide to sit
   beside the picture at 320px (they ran off the card). They take a row of
   their own under it instead. */
@media (max-width: 479px) {
  .lm-page-profile .lm-community__bar { flex-wrap: wrap; }

  .lm-page-profile .lm-community__actions {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
}

/* The narrowest phones: Manage Page keeps its icon, and its words for a
   screen reader only (the visually-hidden pattern, by breakpoint). */
@media (max-width: 359px) {
  .lm-page-manage span {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* A Page's header: its meta line wraps on a phone rather than overflowing. */
.lm-page-profile .lm-community__meta { flex-wrap: wrap; }

/* ==========================================================================
   Phase 19 — Events. An event reuses the community layout (the cover, the
   card grid, the tabs, the member lists) and adds what only an event has: a
   date on the cover, the facts in a list — when, where, who organizes it,
   who may see it — and the Going and Interested buttons.
   ========================================================================== */

/* -- The date, on a cover ------------------------------------------------- */
.lm-event-date {
  position: absolute;
  z-index: 1;
  inset-block-end: var(--lm-space-3);
  inset-inline-start: var(--lm-space-3);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-inline-size: 48px;
  padding: var(--lm-space-1) var(--lm-space-2);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface);
  box-shadow: var(--lm-shadow-md);
  color: var(--lm-text);
  line-height: 1.1;
  text-align: center;
}

.lm-event-date__month {
  color: var(--lm-primary-text);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-bold);
  text-transform: uppercase;
}

.lm-event-date__day {
  font-size: var(--lm-text-lg);
  font-weight: var(--lm-weight-bold);
}

.lm-event-date--lg {
  inset-block-end: var(--lm-space-4);
  inset-inline-start: var(--lm-space-5);
  min-inline-size: 64px;
  padding: var(--lm-space-2) var(--lm-space-3);
}

.lm-event-date--lg .lm-event-date__month { font-size: var(--lm-text-sm); }
.lm-event-date--lg .lm-event-date__day { font-size: var(--lm-text-2xl); }

/* -- The event's header ---------------------------------------------------- */
.lm-event__head {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4) var(--lm-space-6) var(--lm-space-5);
}

.lm-event-profile .lm-community__meta { flex-wrap: wrap; }

.lm-event-state {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-1);
  margin: 0;
}

.lm-event-facts {
  display: grid;
  gap: var(--lm-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-event-line {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-2);
  min-inline-size: 0;
  margin: 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

/* Lm_Icon() has no size of its own: every icon here gets one. */
.lm-event-line > svg {
  flex-shrink: 0;
  inline-size: 18px;
  block-size: 18px;
  margin-block-start: 1px;
  color: var(--lm-muted);
}

.lm-event-line > span { min-inline-size: 0; overflow-wrap: anywhere; }

.lm-event-facts__text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--lm-space-2);
  min-inline-size: 0;
  color: var(--lm-text);
}

.lm-event-facts__yours { flex-basis: 100%; }

.lm-event-link {
  color: var(--lm-primary-text);
  font-weight: var(--lm-weight-medium);
  overflow-wrap: anywhere;
}

.lm-event-link:hover { text-decoration: underline; }

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

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

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

.lm-event__hint { margin: 0; }

/* -- Who organizes it -------------------------------------------------------- */
.lm-event-by {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  min-inline-size: 0;
}

/* Two classes, not one: .lm-avatar sets 40px in components.css, which loads
   after this file (the Phase 18 lesson). */
.lm-avatar.lm-event-by__pic       { inline-size: 28px; block-size: 28px; font-size: var(--lm-text-xs); }
.lm-avatar.lm-event-by__pic--lg   { inline-size: 40px; block-size: 40px; font-size: var(--lm-text-sm); }
.lm-avatar.lm-event-by__pic--square { border-radius: var(--lm-radius-sm); }

.lm-event-card .lm-avatar.lm-event-by__pic  { inline-size: 22px; block-size: 22px; }
.lm-event-about .lm-avatar.lm-event-by__pic { inline-size: 24px; block-size: 24px; }

.lm-event-by__text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--lm-space-1);
  min-inline-size: 0;
  font-size: var(--lm-text-sm);
}

.lm-event-by__label { color: var(--lm-muted); }

.lm-event-by__name {
  overflow: hidden;
  max-inline-size: 100%;
  color: var(--lm-text);
  font-weight: var(--lm-weight-semibold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.lm-event-by__name:hover { color: var(--lm-primary-text); }

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

/* -- A card ----------------------------------------------------------------- */
.lm-community-card__cover.lm-event-card__cover { block-size: 116px; }

/* A community card's body starts under a picture astride the cover; an
   event card has none, so it needs its own top. */
.lm-community-card__body.lm-event-card__body { padding-block-start: var(--lm-space-3); }

.lm-event-card .lm-event-line { font-size: var(--lm-text-sm); }
.lm-event-card .lm-event-line > svg { inline-size: 15px; block-size: 15px; }
.lm-event-card .lm-event-line > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lm-event-card .lm-event-respond { flex-wrap: nowrap; }

/* -- In a post's meta line: the event it was written in --------------------- */
.lm-post__community.lm-post__event svg { color: var(--lm-primary-text); }

/* -- About -------------------------------------------------------------------- */
.lm-event-about__text { margin: 0; }

.lm-event-about__facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--lm-space-3) var(--lm-space-5);
  margin: 0;
  font-size: var(--lm-text-sm);
}

.lm-event-about__facts dt { color: var(--lm-muted); font-weight: var(--lm-weight-medium); }

.lm-event-about__facts dd {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--lm-space-2);
  min-inline-size: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

/* -- The form ----------------------------------------------------------------- */
.lm-event-form .lm-select { max-inline-size: 100%; }

/* ==========================================================================
   Phase 38 — Professional events. The same event, told fully: a hero with
   the facts somebody deciding to go needs, the place with a map link, how
   people are admitted, an honest box where tickets will one day be, the
   gallery and promo video, similar events and more from the organizer, the
   discovery filters, the form in sections, and the organizer's own page.
   Every colour from the tokens; every icon given its size.
   ========================================================================== */

/* -- Chips: a category, a tag, admission ------------------------------------ */
.lm-event-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-1);
  padding: 2px var(--lm-space-2);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-surface);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-medium);
  line-height: 1.5;
  white-space: nowrap;
}

.lm-event-chip svg { inline-size: 13px; block-size: 13px; flex-shrink: 0; }

.lm-event-chip--category {
  border-color: transparent;
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
}

.lm-event-chip--tag { color: var(--lm-primary-text); }

a.lm-event-chip:hover { border-color: var(--lm-primary); }

.lm-event-chip--removable { gap: var(--lm-space-2); }

/* -- The verified-organizer mark: a word and an icon, never colour alone -- */
.lm-org-verified {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px var(--lm-space-2);
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-success-soft);
  color: var(--lm-success-text);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
  line-height: 1.5;
  white-space: nowrap;
}

.lm-org-verified svg { inline-size: 13px; block-size: 13px; flex-shrink: 0; }

.lm-org-verified__text { display: inline; }

.lm-org-verified--compact { padding: 2px; border-radius: 50%; }

/* -- A card ------------------------------------------------------------------ */
.lm-event-card__kicker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-1);
  margin: 0;
}

.lm-event-card__note { margin: 0; overflow-wrap: anywhere; }

/* -- The hero ------------------------------------------------------------------ */
.lm-event-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-1);
  margin: 0;
}

.lm-community__name.lm-event__title { margin: 0; }

.lm-event__organizer { margin: 0; }

.lm-event-keyfacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: var(--lm-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-event-keyfact {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-3);
  min-inline-size: 0;
  padding: var(--lm-space-3);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-lg);
  background-color: var(--lm-surface-secondary);
}

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

.lm-event-keyfact__icon svg { inline-size: 18px; block-size: 18px; }

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

.lm-event-keyfact__label {
  color: var(--lm-muted);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.lm-event-keyfact__value {
  color: var(--lm-text);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  overflow-wrap: anywhere;
}

.lm-event-keyfact__sub {
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  overflow-wrap: anywhere;
}

/* The zone's name and offset read left to right in every language; inside
   right-to-left text it keeps to its own side. */
.lm-event-zone { unicode-bidi: isolate; }

/* -- Where it stands (its managers only) -------------------------------------- */
.lm-event-lifecycle { align-items: flex-start; }

.lm-event-lifecycle__note {
  margin: var(--lm-space-2) 0 0;
  padding: var(--lm-space-2) var(--lm-space-3);
  border-inline-start: 3px solid currentColor;
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-surface);
  color: var(--lm-text);
  white-space: pre-line;
}

.lm-event-lifecycle__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-2);
  margin-block-start: var(--lm-space-3);
}

/* -- Where tickets will be ------------------------------------------------------ */
.lm-event-ticket {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-4);
  padding: var(--lm-space-4) var(--lm-space-5);
}

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

.lm-event-ticket__icon svg { inline-size: 22px; block-size: 22px; }

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

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

.lm-event-ticket__text { margin: 0; color: var(--lm-text-secondary); }

/* -- About ----------------------------------------------------------------------- */
.lm-event-about__subhead {
  margin: var(--lm-space-5) 0 var(--lm-space-3);
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-semibold);
}

.lm-event-about__address { flex-direction: column; }

.lm-event-about__tags { gap: var(--lm-space-1) var(--lm-space-3); }

.lm-event-about .lm-event-about__text { white-space: pre-line; }

/* -- The gallery and the video --------------------------------------------------- */
.lm-event-gallery { padding: var(--lm-space-5) var(--lm-space-6); }

.lm-event-gallery__video {
  overflow: hidden;
  margin-block-end: var(--lm-space-4);
  border-radius: var(--lm-radius-lg);
  background-color: var(--lm-media-bg);
}

.lm-event-gallery__video video,
.lm-event-media-field__video video {
  display: block;
  inline-size: 100%;
  max-block-size: 480px;
  background-color: var(--lm-media-bg);
}

.lm-event-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--lm-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-event-gallery__item {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-secondary);
}

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

.lm-event-gallery__item:focus-visible { outline: 2px solid var(--lm-focus-ring); outline-offset: 2px; }

/* -- Similar events, more from the organizer -------------------------------------- */
.lm-event-related { display: flex; flex-direction: column; gap: var(--lm-space-3); }

.lm-event-related__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--lm-space-3);
}

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

.lm-community-grid.lm-event-related__grid { margin: 0; }

/* -- History, for its managers ------------------------------------------------------ */
.lm-event-history { padding: var(--lm-space-5) var(--lm-space-6); }

.lm-event-history__list {
  display: grid;
  gap: var(--lm-space-3);
  margin: var(--lm-space-3) 0 0;
  padding: 0;
  list-style: none;
}

.lm-event-history__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--lm-space-1) var(--lm-space-3);
  padding-block-end: var(--lm-space-3);
  border-block-end: 1px solid var(--lm-border);
}

.lm-event-history__what { font-weight: var(--lm-weight-medium); }

.lm-event-history__note { flex-basis: 100%; color: var(--lm-text-secondary); white-space: pre-line; }

/* -- Discovery's filters -------------------------------------------------------- */
.lm-event-filters {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4);
}

.lm-event-filters__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: var(--lm-space-3);
}

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

.lm-event-filters__field .lm-select { inline-size: 100%; min-inline-size: 0; }

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

.lm-event-filters__search .lm-search__field { inline-size: 100%; }

/* -- The form, in sections ----------------------------------------------------------- */
.lm-event-section {
  min-inline-size: 0;
  margin: 0 0 var(--lm-space-5);
  padding: 0;
  border: 0;
}

.lm-event-section + .lm-event-section {
  padding-block-start: var(--lm-space-5);
  border-block-start: 1px solid var(--lm-border);
}

.lm-event-section__title {
  margin-block-end: var(--lm-space-3);
  padding: 0;
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-semibold);
}

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

.lm-event-place__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: var(--lm-space-3);
}

.lm-event-coords summary { cursor: pointer; color: var(--lm-primary-text); font-size: var(--lm-text-sm); }

.lm-event-coords[open] summary { margin-block-end: var(--lm-space-2); }

.lm-community-privacy.lm-event-choice--four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* A timezone name is Latin letters and a slash in every language. */
.lm-select.lm-event-select-ltr { direction: ltr; text-align: start; }

.lm-event-media-field { gap: var(--lm-space-2); }

.lm-event-media-field__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--lm-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-event-media-field__item { display: flex; flex-direction: column; gap: var(--lm-space-1); }

.lm-event-media-field__item img {
  inline-size: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--lm-radius-md);
  object-fit: cover;
}

.lm-event-media-field__remove {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-1);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

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

.lm-input.lm-event-file { padding-block: var(--lm-space-2); }

.lm-event-form__review { margin: 0 0 var(--lm-space-3); }

.lm-community-form__submit.lm-event-form__submit { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--lm-space-2); }

/* -- The organizer's page ------------------------------------------------------------- */
.lm-org-profile { overflow: visible; }

.lm-org-profile__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--lm-space-4);
  padding: 0 var(--lm-space-6) var(--lm-space-5);
}

.lm-org-profile__logo {
  position: relative;
  z-index: 1;
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  overflow: hidden;
  inline-size: 96px;
  block-size: 96px;
  margin-block-start: -40px;
  border: 4px solid var(--lm-surface);
  border-radius: var(--lm-radius-lg);
  background-color: var(--lm-surface);
}

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

/* Two classes: .lm-avatar is 40px in components.css, which loads later. */
.lm-avatar.lm-org-profile__avatar { inline-size: 88px; block-size: 88px; font-size: var(--lm-text-2xl); }

.lm-org-profile__intro {
  display: flex;
  flex: 1 1 240px;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--lm-space-1);
  min-inline-size: 0;
}

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

.lm-community__name.lm-org-profile__name { margin: 0; }

.lm-org-profile__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-1) var(--lm-space-4);
  margin: var(--lm-space-1) 0 0;
  padding: 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  list-style: none;
}

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

.lm-org-about { padding: var(--lm-space-5) var(--lm-space-6); }

.lm-org-about .lm-community__desc { white-space: pre-line; }

.lm-org-contact {
  display: grid;
  gap: var(--lm-space-2);
  margin: var(--lm-space-4) 0 0;
  padding: 0;
  list-style: none;
}

.lm-org-contact li {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  min-inline-size: 0;
  font-size: var(--lm-text-sm);
}

.lm-org-contact li > svg { inline-size: 16px; block-size: 16px; flex-shrink: 0; color: var(--lm-muted); }

.lm-org-edit__logo { inline-size: 96px; block-size: 96px; border-radius: var(--lm-radius-lg); object-fit: cover; }

.lm-org-edit__cover { inline-size: 100%; max-block-size: 160px; border-radius: var(--lm-radius-lg); object-fit: cover; }

@media (max-width: 599px) {
  .lm-org-profile__head { padding-inline: var(--lm-space-4); }
  .lm-event-gallery,
  .lm-event-history,
  .lm-org-about { padding-inline: var(--lm-space-4); }
  .lm-event-ticket { padding-inline: var(--lm-space-4); }
  .lm-event-keyfacts { grid-template-columns: minmax(0, 1fr); }
}

.lm-event-choice { margin: 0; }

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

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

.lm-event-when__pair .lm-input[type="date"] { flex: 1 1 140px; min-inline-size: 0; }
.lm-event-when__pair .lm-input[type="time"] { flex: 1 1 96px; min-inline-size: 0; }

/* -- Invitations --------------------------------------------------------------- */
.lm-event-invite__search { margin: var(--lm-space-4) 0 0; }

.lm-event-invite__none { margin: var(--lm-space-2) 0 0; }

.lm-event-invite .lm-user-row.is-done { opacity: 0.72; }

/* -- Discovery, and an organizer's tab ----------------------------------------- */
/* Seven tabs do not fit a phone: they scroll sideways, as a community's do. */
.lm-events__tabs {
  overflow-x: auto;
  scrollbar-width: none;
}

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

.lm-events__tabs .lm-tabs__tab { flex: 1 0 auto; padding-inline: var(--lm-space-4); white-space: nowrap; }

.lm-event-tab {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4);
}

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

.lm-event-tab__when {
  display: inline-flex;
  gap: var(--lm-space-1);
  padding: var(--lm-space-1);
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-surface-secondary);
}

.lm-event-tab__choice {
  padding: var(--lm-space-1) var(--lm-space-4);
  border-radius: var(--lm-radius-pill);
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-medium);
}

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

.lm-event-tab__choice.is-active {
  background-color: var(--lm-surface);
  box-shadow: var(--lm-shadow-sm);
  color: var(--lm-text);
}

@media (max-width: 767px) {
  .lm-event__head { padding-inline: var(--lm-space-4); }

  .lm-event-date--lg { inset-inline-start: var(--lm-space-4); min-inline-size: 56px; }
  .lm-event-date--lg .lm-event-date__day { font-size: var(--lm-text-xl); }
}

/* A phone: the two times stack, and the facts' labels sit above their
   values rather than beside them. */
@media (max-width: 479px) {
  .lm-event-when { grid-template-columns: minmax(0, 1fr); }

  .lm-event-about__facts { grid-template-columns: minmax(0, 1fr); gap: var(--lm-space-1); }
  .lm-event-about__facts dd { margin-block-end: var(--lm-space-2); }
}

/* The narrowest phones: Manage keeps its icon, and its words for a screen
   reader only (the visually-hidden pattern, by breakpoint). */
@media (max-width: 359px) {
  .lm-event-manage span {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* An event's cover: the community's shape, with the date in its corner. */
.lm-community__cover.lm-event__cover { overflow: hidden; }

/* ==========================================================================
   Phase 20 — Marketplace. Listing cards in a grid (two across on a phone,
   three on a desktop), a filter card, category chips, the listing's page
   with its gallery, the form, and My listings. Every icon has a size of its
   own (Lm_Icon() has none), and the avatars use two-class selectors so
   components.css, which loads later, does not win.
   ========================================================================== */

/* -- The grid and a card ----------------------------------------------------- */
.lm-market-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--lm-space-4);
}

.lm-market-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.lm-market-card__photo {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background-color: var(--lm-surface-secondary);
}

.lm-market-card__photo img,
.lm-market-card__photo .lm-tile {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

/* Two classes: .lm-tile (components.css) sets display: block, and with one
   class each the later stylesheet would decide. The icon is lifted over the
   tile's positioned highlight and shadow. */
.lm-tile.lm-market-card__none {
  display: grid;
  place-items: center;
  color: var(--lm-muted);
}

.lm-tile.lm-market-card__none svg { position: relative; z-index: 1; inline-size: 36px; block-size: 36px; opacity: 0.7; }

.lm-market-card.is-sold .lm-market-card__photo img { filter: grayscale(0.6); opacity: 0.75; }

.lm-market-flag {
  position: absolute;
  z-index: 1;
  inset-block-start: var(--lm-space-2);
  inset-inline-start: var(--lm-space-2);
  padding: 2px var(--lm-space-2);
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-danger);
  color: var(--lm-on-danger);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lm-market-flag--lg {
  inset-block-start: var(--lm-space-4);
  inset-inline-start: var(--lm-space-4);
  padding: var(--lm-space-1) var(--lm-space-3);
  font-size: var(--lm-text-sm);
}

/* The heart on a card's photo, painted above it. */
.lm-icon-btn.lm-market-fav {
  position: absolute;
  z-index: 1;
  inset-block-start: var(--lm-space-2);
  inset-inline-end: var(--lm-space-2);
  inline-size: 34px;
  block-size: 34px;
  background-color: var(--lm-surface);
  box-shadow: var(--lm-shadow-sm);
  color: var(--lm-text-secondary);
}

.lm-icon-btn.lm-market-fav svg { inline-size: 18px; block-size: 18px; }

.lm-icon-btn.lm-market-fav.is-on,
.lm-market-fav-btn.is-on { color: var(--lm-danger); }

.lm-market-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--lm-space-3);
  min-inline-size: 0;
}

.lm-market-card__price {
  margin: 0;
  color: var(--lm-text);
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-bold);
}

.lm-market-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0;
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-medium);
  line-height: var(--lm-leading-snug);
  overflow-wrap: anywhere;
}

.lm-market-card__title a { color: var(--lm-text-secondary); }
.lm-market-card__title a:hover { color: var(--lm-primary-text); }

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

.lm-market-card__meta > span:first-child { overflow: hidden; max-inline-size: 100%; text-overflow: ellipsis; white-space: nowrap; }

/* -- The head, the filters, the categories ------------------------------------ */
.lm-market-head__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2);
}

.lm-market-filters {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4);
}

.lm-market-filters__search .lm-search__field { inline-size: 100%; }

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

.lm-market-filters__grid .lm-field { margin-block-end: var(--lm-space-2); min-inline-size: 0; }

.lm-market-filters__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--lm-space-2);
}

/* The currency at its own width (a fixed one cut "Any currency" short), the
   two amounts as one pair that wraps under it when the line is too short. */
.lm-market-range {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-2);
}

.lm-market-range .lm-select { flex: 1 0 auto; inline-size: auto; min-inline-size: 0; max-inline-size: 100%; }

.lm-market-range__pair {
  display: flex;
  flex: 1 1 10rem;
  gap: var(--lm-space-2);
  min-inline-size: 0;
}

.lm-market-range__pair .lm-input { flex: 1 1 0; min-inline-size: 0; }

/* A select beside the input (salary "per month") may shrink too: a longer
   translation of its options must not push the pair off a phone. */
.lm-market-range__pair .lm-select { flex: 1 1 auto; min-inline-size: 0; }

.lm-market-cats {
  display: flex;
  gap: var(--lm-space-2);
  overflow-x: auto;
  padding-block-end: var(--lm-space-1);
  scrollbar-width: none;
}

.lm-market-cats::-webkit-scrollbar { display: none; }

.lm-market-cat {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--lm-space-1);
  padding: var(--lm-space-1) 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-secondary);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-medium);
  white-space: nowrap;
}

.lm-market-cat svg { inline-size: 16px; block-size: 16px; flex-shrink: 0; }
.lm-market-cat:hover { color: var(--lm-primary-text); }

.lm-market-cat.is-active {
  border-color: transparent;
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
}

.lm-market-seller-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4);
}

.lm-avatar.lm-market-seller-head__pic { inline-size: 56px; block-size: 56px; font-size: var(--lm-text-lg); }

.lm-market-seller-head__text {
  display: flex;
  flex: 1 1 12rem;
  flex-direction: column;
  min-inline-size: 0;
}

.lm-market-seller-head__profile { color: var(--lm-primary-text); font-size: var(--lm-text-sm); }

/* -- A listing's page ---------------------------------------------------------- */
.lm-market-item { overflow: hidden; padding: 0; }

.lm-market-gallery { display: flex; flex-direction: column; }

.lm-market-gallery__main {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  max-block-size: 520px;
  background-color: var(--lm-media-bg);
}

.lm-market-gallery__main img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
}

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

.lm-market-gallery__strip {
  display: flex;
  gap: var(--lm-space-2);
  overflow-x: auto;
  padding: var(--lm-space-3) var(--lm-space-4) 0;
  scrollbar-width: thin;
}

.lm-market-gallery__thumb {
  flex: 0 0 auto;
  overflow: hidden;
  inline-size: 64px;
  block-size: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-surface-secondary);
  cursor: pointer;
}

.lm-market-gallery__thumb img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.lm-market-gallery__thumb.is-active { border-color: var(--lm-primary); }

.lm-market-item__body {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4) var(--lm-space-6) var(--lm-space-5);
}

.lm-market-item__state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
}

.lm-market-item__price {
  margin: 0;
  font-size: var(--lm-text-2xl);
  font-weight: var(--lm-weight-bold);
}

.lm-market-item__title {
  margin: 0;
  font-size: var(--lm-text-xl);
  font-weight: var(--lm-weight-semibold);
  line-height: var(--lm-leading-snug);
  overflow-wrap: anywhere;
}

.lm-market-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--lm-space-2) var(--lm-space-5);
  margin: 0;
  padding: 0;
  font-size: var(--lm-text-sm);
  list-style: none;
}

.lm-market-facts li { display: contents; }
.lm-market-facts__label { color: var(--lm-muted); }

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

.lm-market-report { color: var(--lm-muted); }

.lm-market-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--lm-space-2);
  padding: var(--lm-space-4);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-secondary);
}

.lm-market-contact__text { inline-size: 100%; resize: vertical; }

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

.lm-market-about__text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }

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

.lm-market-seller__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-3);
}

.lm-avatar.lm-market-seller__pic { inline-size: 48px; block-size: 48px; font-size: var(--lm-text-md); }

.lm-market-seller__text {
  display: flex;
  flex: 1 1 10rem;
  flex-direction: column;
  min-inline-size: 0;
}

.lm-market-seller__name { color: var(--lm-text); font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }

/* -- The form ------------------------------------------------------------------- */
.lm-market-form .lm-select { max-inline-size: 100%; }

.lm-market-price {
  display: flex;
  gap: var(--lm-space-2);
}

.lm-market-price .lm-input { flex: 1 1 8rem; min-inline-size: 0; }
.lm-market-price .lm-select { flex: 0 0 auto; inline-size: 7.5rem; }

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

.lm-market-condition {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  padding: var(--lm-space-2) var(--lm-space-4);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-pill);
  cursor: pointer;
}

.lm-market-condition:has(input:checked) {
  border-color: var(--lm-primary);
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
}

.lm-market-photos {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-2);
  margin-block: var(--lm-space-2);
}

.lm-market-photos:empty { display: none; }

.lm-market-photo {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  inline-size: 96px;
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-surface-secondary);
}

.lm-market-photo img { inline-size: 96px; block-size: 96px; object-fit: cover; }

.lm-market-photo__remove {
  display: flex;
  align-items: center;
  gap: var(--lm-space-1);
  padding: var(--lm-space-1);
  font-size: var(--lm-text-xs);
  cursor: pointer;
}

.lm-market-photo--new { outline: 2px solid var(--lm-primary-soft-2); }

.lm-market-add-photos { align-self: flex-start; }

/* -- My listings --------------------------------------------------------------- */
.lm-market-mine { padding: var(--lm-space-2) var(--lm-space-4); }

.lm-market-rows { display: flex; flex-direction: column; }

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

.lm-market-row:last-child { border-block-end: 0; }

.lm-market-row__photo {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  inline-size: 64px;
  block-size: 64px;
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-surface-secondary);
}

.lm-market-row__photo img,
.lm-market-row__photo .lm-tile { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.lm-market-row__photo .lm-tile.lm-market-card__none svg { inline-size: 24px; block-size: 24px; }

.lm-market-row__body {
  display: flex;
  flex: 1 1 10rem;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-inline-size: 0;
}

.lm-market-row__title { color: var(--lm-text); font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }

.lm-market-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--lm-space-1);
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
}

.lm-market-row__price { color: var(--lm-text); font-weight: var(--lm-weight-semibold); }

.lm-market-row__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--lm-space-2);
}

@media (max-width: 767px) {
  .lm-market-item__body { padding-inline: var(--lm-space-4); }
  .lm-market-row { flex-wrap: wrap; }
  .lm-market-row__actions { flex: 1 1 100%; justify-content: flex-start; }
}

/* A phone: two cards across, one filter per row. */
@media (max-width: 599px) {
  .lm-market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lm-space-3); }
  .lm-market-filters__grid { grid-template-columns: minmax(0, 1fr); }
  .lm-market-card__body { padding: var(--lm-space-2) var(--lm-space-3) var(--lm-space-3); }
  .lm-market-card__price { font-size: var(--lm-text-base); }
  .lm-market-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .lm-market-facts__label { margin-block-start: var(--lm-space-2); }
}

/* =========================================================================
   Jobs (Phase 21)
   ========================================================================= */

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

.lm-job-card {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4);
}

.lm-job-card__head { display: flex; align-items: flex-start; gap: var(--lm-space-3); }
.lm-job-card__logo { flex: 0 0 auto; }

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

.lm-job-card__title {
  margin: 0;
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-semibold);
  line-height: var(--lm-leading-snug);
  overflow-wrap: anywhere;
}

.lm-job-card__title a { color: var(--lm-text); }
.lm-job-card__employer { margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); overflow-wrap: anywhere; }
.lm-job-card__salary { margin: 0; color: var(--lm-text); font-weight: var(--lm-weight-semibold); }
.lm-job-card__category { color: var(--lm-text-secondary); }

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

/* An employer's picture. Two classes: a bare .lm-avatar would otherwise
   decide the size (the Phase 18 cascade trap). A person round, a Page a
   rounded square — as a logo. */
.lm-avatar.lm-job-logo { inline-size: 44px; block-size: 44px; border-radius: 50%; font-size: var(--lm-text-md); }
.lm-avatar.lm-job-logo--page { border-radius: var(--lm-radius-sm); }
.lm-avatar.lm-job-logo--lg { inline-size: 64px; block-size: 64px; font-size: var(--lm-text-xl); }
.lm-avatar.lm-market-seller-head__pic.lm-job-logo--page,
.lm-avatar.lm-market-seller__pic.lm-job-logo--page { border-radius: var(--lm-radius-sm); }

.lm-job-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-job-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-1);
  max-inline-size: 100%;
  padding: 2px var(--lm-space-2);
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  overflow-wrap: anywhere;
}

.lm-job-chip svg { flex: 0 0 auto; inline-size: 14px; block-size: 14px; }
.lm-job-chip--text { padding-inline: var(--lm-space-2); }

.lm-job-skills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-job-skill {
  max-inline-size: 100%;
  padding: 2px var(--lm-space-3);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-pill);
  color: var(--lm-text);
  font-size: var(--lm-text-sm);
  overflow-wrap: anywhere;
}

.lm-job-skills--sm .lm-job-skill { padding-inline: var(--lm-space-2); font-size: var(--lm-text-xs); }

/* Saved, on a card and on the job's page. */
.lm-icon-btn.lm-job-save { flex: 0 0 auto; }
.lm-icon-btn.lm-job-save svg { inline-size: 20px; block-size: 20px; }
.lm-icon-btn.lm-job-save.is-on,
.lm-btn.lm-job-save-btn.is-on { color: var(--lm-primary-text); }
.lm-btn.lm-job-save-btn svg { inline-size: 18px; block-size: 18px; }

/* Where an application stands, and where a job is in its life. Two
   classes, so the badge's own neutral colours never win on load order. */
.lm-badge.lm-job-status--submitted   { background-color: var(--lm-info-soft);    color: var(--lm-info-text); }
.lm-badge.lm-job-status--reviewing   { background-color: var(--lm-warning-soft); color: var(--lm-warning-text); }
.lm-badge.lm-job-status--shortlisted { background-color: var(--lm-primary-soft); color: var(--lm-primary-text); }
.lm-badge.lm-job-status--rejected    { background-color: var(--lm-danger-soft);  color: var(--lm-danger-text); }
.lm-badge.lm-job-status--hired       { background-color: var(--lm-success-soft); color: var(--lm-success-text); }
.lm-badge.lm-job-status--withdrawn   { background-color: var(--lm-surface-secondary); color: var(--lm-text-secondary); }
.lm-badge.lm-job-phase--expired      { background-color: var(--lm-warning-soft); color: var(--lm-warning-text); }
.lm-badge.lm-job-phase--closed       { background-color: var(--lm-surface-secondary); color: var(--lm-text-secondary); }
.lm-job-status,
.lm-job-phase { white-space: nowrap; }

/* -- The job's page ------------------------------------------------------------- */
.lm-job {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-4);
  padding: var(--lm-space-5);
}

.lm-job__head { display: flex; align-items: center; gap: var(--lm-space-4); }
.lm-job__titles { display: flex; flex-direction: column; gap: var(--lm-space-1); min-inline-size: 0; }

.lm-job__title {
  margin: 0;
  font-size: var(--lm-text-xl);
  font-weight: var(--lm-weight-semibold);
  line-height: var(--lm-leading-snug);
  overflow-wrap: anywhere;
}

.lm-job__employer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  color: var(--lm-text-secondary);
}

.lm-job__salary { margin: 0; font-size: var(--lm-text-lg); font-weight: var(--lm-weight-bold); }
.lm-job__state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); margin: 0; }
.lm-job__actions { margin: 0; }
.lm-job-facts { margin: 0; }

.lm-job-mine,
.lm-job-apply {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-secondary);
}

.lm-job-apply { align-items: stretch; }
.lm-job-apply .lm-field { margin: 0; }
.lm-job-apply > .lm-btn { align-self: flex-start; }
.lm-job-apply__title { margin: 0; font-size: var(--lm-text-md); font-weight: var(--lm-weight-semibold); }

.lm-job-mine__line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); margin: 0; }
.lm-job-mine__line > svg { flex: 0 0 auto; inline-size: 18px; block-size: 18px; color: var(--lm-success-text); }
.lm-job-mine__all { font-size: var(--lm-text-sm); }

.lm-job-resume-pick { align-self: flex-start; }
.lm-job-resume-pick svg { inline-size: 18px; block-size: 18px; }

.lm-job-resume {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  font-size: var(--lm-text-sm);
  overflow-wrap: anywhere;
}

.lm-job-resume > svg { flex: 0 0 auto; inline-size: 16px; block-size: 16px; }
.lm-job-resume a { min-inline-size: 0; overflow-wrap: anywhere; }

.lm-job-about { display: flex; flex-direction: column; gap: var(--lm-space-3); }
.lm-job-employer-head { gap: var(--lm-space-3); }

/* -- The form -------------------------------------------------------------------- */
.lm-job-form { display: flex; flex-direction: column; gap: var(--lm-space-4); }
.lm-job-form__employer { margin: 0; font-weight: var(--lm-weight-semibold); }

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

.lm-job-salary .lm-field { margin: 0; min-inline-size: 0; }
.lm-job-filters .lm-market-filters__grid { align-items: start; }
.lm-job-filters__salary { grid-column: 1 / -1; }

/* -- Rows: My jobs, My applications ------------------------------------------------ */
.lm-job-mine-list,
.lm-job-apps { padding-block: var(--lm-space-2); }
.lm-job-row__logo { flex: 0 0 auto; }
.lm-job-row,
.lm-job-app { align-items: flex-start; }
.lm-job-app__badges { display: flex; flex-wrap: wrap; gap: var(--lm-space-1); }

/* -- A job's applications ------------------------------------------------------------ */
.lm-job-applicants__head .lm-communities__lead { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-1) var(--lm-space-2); }
/* Seven statuses: each tab keeps its words on one line, and the bar scrolls. */
.lm-job-applicants__tabs { overflow-x: auto; scrollbar-width: none; }
.lm-job-applicants__tabs .lm-tabs__tab { flex: 1 0 auto; padding-inline: var(--lm-space-4); white-space: nowrap; }
.lm-job-applicants__tabs::-webkit-scrollbar { display: none; }
.lm-job-applicants { padding: var(--lm-space-2) var(--lm-space-4); }
.lm-job-applicants__list { display: flex; flex-direction: column; }

.lm-job-applicant {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  padding-block: var(--lm-space-4);
  border-block-end: 1px solid var(--lm-border);
}

.lm-job-applicant:last-child { border-block-end: 0; }
.lm-job-applicant__head { display: flex; align-items: center; gap: var(--lm-space-3); }
.lm-job-applicant__who { display: flex; flex: 1 1 auto; flex-direction: column; min-inline-size: 0; }
.lm-job-applicant__name { color: var(--lm-text); font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }

.lm-job-applicant__note {
  margin: 0;
  padding: var(--lm-space-3);
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-surface-secondary);
  font-size: var(--lm-text-sm);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

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

/* -- A Page's Jobs tab ------------------------------------------------------------------- */
.lm-job-page-tab { padding: var(--lm-space-4); }

.lm-job-page-tab__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--lm-space-3);
}

.lm-job-page-tab__head .lm-community-members__heading { margin: 0; }

@media (max-width: 599px) {
  .lm-job { padding: var(--lm-space-4); }
  .lm-job__title { font-size: var(--lm-text-lg); }
  .lm-avatar.lm-job-logo--lg { inline-size: 56px; block-size: 56px; }
  .lm-job-salary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lm-job-card { padding: var(--lm-space-3) var(--lm-space-4); }
}

/* =======================================================================
   Phase 22. The wallet
   =======================================================================
   Money reads the same in both directions: every amount sits in its own
   isolate (Lm_WalletMoney), and here in a span that never breaks inside it.
   Money in and money out are told apart by the word, the sign and the
   colour together — never by colour alone. */

.lm-wallet-amount {
  display: inline-block;
  font-weight: var(--lm-weight-semibold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lm-wallet-amount--in { color: var(--lm-success-text); }
.lm-wallet-amount--out { color: var(--lm-text); }

.lm-wallet-ref {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: var(--lm-text-xs);
  letter-spacing: 0.02em;
  unicode-bidi: isolate;
}

.lm-avatar.lm-wallet-avatar { inline-size: 40px; block-size: 40px; font-size: var(--lm-text-md); }
.lm-avatar.lm-wallet-avatar--sm { inline-size: 32px; block-size: 32px; font-size: var(--lm-text-sm); }
.lm-avatar.lm-wallet-avatar--lg { inline-size: 64px; block-size: 64px; font-size: var(--lm-text-xl); }

/* -- The balance ------------------------------------------------------------------------ */
.lm-wallet-hero { padding: var(--lm-space-5); }

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

.lm-wallet-hero__title {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  font-size: var(--lm-text-xl);
}

.lm-wallet-hero__title svg { flex: 0 0 24px; inline-size: 24px; block-size: 24px; }

.lm-wallet-hero__currency { font-variant-numeric: tabular-nums; }

.lm-wallet-hero__label {
  margin: var(--lm-space-5) 0 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

.lm-wallet-hero__balance {
  margin: var(--lm-space-1) 0 0;
  font-size: var(--lm-text-2xl);
  font-weight: var(--lm-weight-bold);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.lm-wallet-hero__note {
  margin: var(--lm-space-2) 0 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
}

.lm-wallet-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-2);
  margin-block-start: var(--lm-space-4);
}

.lm-wallet-hero__actions .lm-btn svg { flex: 0 0 18px; inline-size: 18px; block-size: 18px; }

.lm-wallet-hero__limits {
  margin: var(--lm-space-3) 0 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
}

/* -- The list --------------------------------------------------------------------------- */
.lm-wallet-list { padding-block-end: var(--lm-space-2); }

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

.lm-wallet-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.lm-wallet-row__link {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-3);
  padding: var(--lm-space-3) var(--lm-space-4);
  color: inherit;
  text-decoration: none;
}

.lm-wallet-row__link:hover { background-color: var(--lm-surface-secondary); }

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

.lm-wallet-row__who {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
}

.lm-wallet-row__arrow {
  position: absolute;
  inset-block-end: -3px;
  inset-inline-end: -3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 20px;
  block-size: 20px;
  border: 2px solid var(--lm-surface);
  border-radius: 50%;
  background-color: var(--lm-surface-2);
  color: var(--lm-text);
}

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

.lm-wallet-row--in .lm-wallet-row__arrow,
.lm-wallet-detail--in .lm-wallet-row__arrow {
  background-color: var(--lm-success-soft);
  color: var(--lm-success-text);
}

.lm-wallet-detail .lm-wallet-row__arrow { inline-size: 26px; block-size: 26px; }
.lm-wallet-detail .lm-wallet-row__arrow svg { inline-size: 15px; block-size: 15px; }

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

.lm-wallet-row__label { font-weight: var(--lm-weight-semibold); }

.lm-wallet-row__party {
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  overflow-wrap: anywhere;
}

.lm-wallet-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-1) var(--lm-space-2);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
}

.lm-wallet-row__note {
  color: var(--lm-text);
  font-size: var(--lm-text-sm);
  overflow-wrap: anywhere;
}

.lm-wallet-row__end {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--lm-space-1);
  text-align: end;
}

/* -- Sending ---------------------------------------------------------------------------- */
.lm-wallet-send {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-4);
  padding: var(--lm-space-5);
}

.lm-wallet-send__available {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--lm-space-2);
  padding: var(--lm-space-3) var(--lm-space-4);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

.lm-wallet-send__available .lm-wallet-amount {
  color: var(--lm-text);
  font-size: var(--lm-text-lg);
}

.lm-wallet-send__actions { display: flex; justify-content: flex-end; }

.lm-wallet-recipient { position: relative; }

.lm-wallet-recipient__box,
.lm-wallet-amount-box {
  position: relative;
  display: flex;
  align-items: center;
}

/* The @ and the currency code belong to the value, which always reads left
   to right. The boxes are left to right in both languages, so their start
   and end are the same two sides in Arabic as in English. */
.lm-wallet-recipient__box { direction: ltr; }

.lm-wallet-recipient__at {
  position: absolute;
  inset-inline-start: var(--lm-space-3);
  color: var(--lm-text-secondary);
  pointer-events: none;
}

.lm-input.lm-wallet-recipient__input { padding-inline-start: calc(var(--lm-space-3) + 1.1em); }

.lm-wallet-amount-box { direction: ltr; }

.lm-input.lm-wallet-amount-box__input {
  padding-inline-end: 4.5em;
  font-variant-numeric: tabular-nums;
}

.lm-wallet-amount-box__code {
  position: absolute;
  inset-inline-end: var(--lm-space-3);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  pointer-events: none;
}

.lm-wallet-suggest {
  position: absolute;
  z-index: var(--lm-z-dropdown);
  inset-inline: 0;
  margin-block-start: var(--lm-space-1);
  padding: var(--lm-space-1);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface);
  box-shadow: var(--lm-shadow-md);
  color: var(--lm-text);
}

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

.lm-wallet-suggest__item {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  inline-size: 100%;
  padding: var(--lm-space-2);
  border: 0;
  border-radius: var(--lm-radius-sm);
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.lm-wallet-suggest__item:hover,
.lm-wallet-suggest__item:focus-visible {
  background-color: var(--lm-surface-secondary);
  outline: none;
}

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

.lm-wallet-suggest__name { font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-wallet-suggest__user { color: var(--lm-text-secondary); font-size: var(--lm-text-xs); text-align: start; }

/* -- Facts: the confirmation and one transaction ------------------------------------------- */
.lm-wallet-facts {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.lm-wallet-facts__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--lm-space-1) var(--lm-space-4);
  padding: var(--lm-space-3) 0;
}

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

.lm-wallet-facts__row dt { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }

.lm-wallet-facts__row dd {
  margin: 0;
  min-inline-size: 0;
  text-align: end;
  overflow-wrap: anywhere;
}

.lm-wallet-facts__row--main .lm-wallet-amount { font-size: var(--lm-text-lg); }

.lm-wallet-facts__sub {
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
}

.lm-wallet-confirm { display: flex; flex-direction: column; }

.lm-wallet-confirm__who {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  margin-block-end: var(--lm-space-2);
}

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

.lm-wallet-confirm__user { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); text-align: start; }

.lm-wallet-confirm__warn { margin: var(--lm-space-3) 0 0; }

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

.lm-wallet-detail__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--lm-space-2);
  padding-block-end: var(--lm-space-4);
  text-align: center;
}

.lm-wallet-detail__label {
  margin: var(--lm-space-2) 0 0;
  font-size: var(--lm-text-lg);
}

.lm-wallet-detail__amount {
  margin: 0;
  font-size: var(--lm-text-2xl);
}

.lm-wallet-detail__foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-2);
  margin-block-start: var(--lm-space-4);
}

@media (max-width: 599px) {
  .lm-wallet-hero,
  .lm-wallet-send,
  .lm-wallet-detail { padding: var(--lm-space-4); }
  .lm-wallet-hero__balance { font-size: var(--lm-text-xl); }
  .lm-wallet-row__link { padding: var(--lm-space-3); }
  .lm-wallet-detail__amount { font-size: var(--lm-text-xl); }
  /* The date and the reference wrap onto their own lines here: a dot left
     at the start of the second line would separate nothing. */
  .lm-wallet-row__meta .lm-post__dot { display: none; }
}

/* =======================================================================
   Phase 23. Funding
   =======================================================================
   Campaign cards in a grid (two across, one on a phone), the campaign's
   page, the progress bar, the contribution form and its review, the
   contributor list and the member's own lists. How far a campaign has come
   is said in words and numbers beside the bar — the bar never carries it
   alone. Every icon has a size of its own (Lm_Icon() has none), and the
   avatars use two-class selectors so components.css, which loads later,
   does not win. */

/* -- The model, said once --------------------------------------------------------------- */
.lm-fund-model {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-2);
  margin: 0;
  padding: var(--lm-space-3) var(--lm-space-4);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  line-height: var(--lm-leading-snug);
}

.lm-fund-model svg { flex: 0 0 18px; inline-size: 18px; block-size: 18px; margin-block-start: 1px; color: var(--lm-primary-text); }
.lm-fund-model--inline { padding: var(--lm-space-2) var(--lm-space-3); }

/* -- Discovery -------------------------------------------------------------------------- */
/* One line on a wide screen — the fields, then Search — wrapping on a
   narrow one. */
.lm-market-filters.lm-fund-filters {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-3);
}

.lm-fund-filters__row {
  display: flex;
  flex: 1 1 26rem;
  flex-wrap: wrap;
  gap: var(--lm-space-3);
  min-inline-size: 0;
}

.lm-fund-filters .lm-market-filters__actions { flex: 0 0 auto; }

.lm-fund-filters__row .lm-market-filters__search { flex: 1 1 16rem; min-inline-size: 0; }
.lm-fund-filters__category { flex: 0 1 14rem; margin: 0; min-inline-size: 0; }

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

/* -- A card ----------------------------------------------------------------------------- */
.lm-fund-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.lm-fund-card__cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background-color: var(--lm-surface-secondary);
}

.lm-fund-card__cover img,
.lm-fund-card__cover .lm-tile {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

/* Two classes: .lm-tile (components.css) sets display: block. */
.lm-tile.lm-fund-card__none {
  display: grid;
  place-items: center;
  color: var(--lm-muted);
}

.lm-tile.lm-fund-card__none svg { position: relative; z-index: 1; inline-size: 36px; block-size: 36px; opacity: 0.7; }

.lm-fund-card--ended .lm-fund-card__cover img,
.lm-fund-card--closed .lm-fund-card__cover img { filter: grayscale(0.5); opacity: 0.8; }

.lm-fund-flag {
  position: absolute;
  z-index: 1;
  inset-block-start: var(--lm-space-2);
  inset-inline-start: var(--lm-space-2);
  padding: 2px var(--lm-space-2);
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-surface);
  box-shadow: var(--lm-shadow-sm);
  color: var(--lm-text);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-bold);
}

.lm-fund-flag--lg {
  inset-block-start: var(--lm-space-4);
  inset-inline-start: var(--lm-space-4);
  padding: var(--lm-space-1) var(--lm-space-3);
  font-size: var(--lm-text-sm);
}

.lm-fund-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: var(--lm-space-2);
  padding: var(--lm-space-3) var(--lm-space-4) var(--lm-space-4);
  min-inline-size: 0;
}

.lm-fund-card__category {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-1);
  margin: 0;
  color: var(--lm-primary-text);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
}

.lm-fund-card__category svg { flex: 0 0 14px; inline-size: 14px; block-size: 14px; }
.lm-fund-card__category a { color: inherit; }

.lm-fund-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0;
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-semibold);
  line-height: var(--lm-leading-snug);
  overflow-wrap: anywhere;
}

.lm-fund-card__title a { color: var(--lm-text); }
.lm-fund-card__title a:hover { color: var(--lm-primary-text); }

.lm-fund-card__by {
  overflow: hidden;
  margin: 0;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-fund-card__left {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-1);
  margin: auto 0 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

.lm-fund-card__left svg { flex: 0 0 15px; inline-size: 15px; block-size: 15px; }

/* -- Progress --------------------------------------------------------------------------- */
.lm-fund-progress { display: flex; flex-direction: column; gap: var(--lm-space-2); }

.lm-fund-progress__money {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--lm-space-2);
  margin: 0;
}

.lm-fund-progress__raised {
  color: var(--lm-text);
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-bold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

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

.lm-fund-bar {
  position: relative;
  overflow: hidden;
  block-size: 8px;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-surface-secondary);
}

.lm-fund-bar__fill {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  max-inline-size: 100%;
  border-radius: inherit;
  background-color: var(--lm-primary);
}

.lm-fund-progress.is-reached .lm-fund-bar__fill { background-color: var(--lm-success); }

.lm-fund-progress__line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-1) var(--lm-space-2);
  margin: 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

.lm-fund-progress__percent { color: var(--lm-text); font-weight: var(--lm-weight-semibold); }

.lm-badge.lm-fund-reached { display: inline-flex; align-items: center; gap: 4px; }
.lm-badge.lm-fund-reached svg { flex: 0 0 13px; inline-size: 13px; block-size: 13px; }

.lm-fund-progress--lg .lm-fund-progress__raised { font-size: var(--lm-text-2xl); }
.lm-fund-progress--lg .lm-fund-progress__goal { font-size: var(--lm-text-md); }
.lm-fund-progress--lg .lm-fund-bar { block-size: 12px; }

/* -- The campaign's page ---------------------------------------------------------------- */
.lm-fund { overflow: hidden; padding: 0; }

.lm-fund__cover {
  position: relative;
  aspect-ratio: 16 / 9;
  max-block-size: 420px;
  inline-size: 100%;
  background-color: var(--lm-surface-secondary);
}

.lm-fund__cover img,
.lm-fund__cover .lm-tile {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.lm-fund__body {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-4);
  padding: var(--lm-space-4) var(--lm-space-6) var(--lm-space-5);
}

.lm-fund__title {
  margin: 0;
  font-size: var(--lm-text-xl);
  font-weight: var(--lm-weight-semibold);
  line-height: var(--lm-leading-snug);
  overflow-wrap: anywhere;
}

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

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

.lm-fund__creator-text {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  font-size: var(--lm-text-sm);
}

.lm-fund__creator-text .lm-help { margin: 0; font-size: var(--lm-text-xs); }
.lm-fund__creator-name { color: var(--lm-text); font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }

.lm-fund-facts { font-size: var(--lm-text-sm); }

.lm-fund__note { margin: 0; }

/* Good news reads as good news: the success colours, not the brand's. */
.lm-community__hint.lm-fund__note--good {
  background-color: var(--lm-success-soft);
  color: var(--lm-success-text);
}
.lm-fund__actions .lm-btn[hidden] { display: none; }
.lm-fund__model { margin: 0; }

/* -- The story ------------------------------------------------------------------------- */
.lm-fund-about .lm-market-about__text { line-height: var(--lm-leading); }

/* -- Who contributed --------------------------------------------------------------------- */
.lm-fund-people {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  padding: var(--lm-space-5);
}

.lm-fund-people .lm-community-members__heading { margin: 0; }
.lm-fund-people .lm-load-more { margin-block-start: var(--lm-space-2); }

.lm-fund-people__list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-fund-person {
  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-fund-person:last-child { border-block-end: 0; }

.lm-avatar.lm-fund-person__pic { flex: 0 0 auto; inline-size: 40px; block-size: 40px; font-size: var(--lm-text-md); }

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

.lm-fund-person__line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-1) var(--lm-space-2);
  margin: 0;
}

.lm-fund-person__name { color: var(--lm-text); font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-fund-person__message { margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); overflow-wrap: anywhere; }
.lm-fund-person__time { color: var(--lm-muted); font-size: var(--lm-text-xs); }
.lm-fund-person__amount { flex: 0 0 auto; align-self: center; }

.lm-fund-people__privacy { margin: var(--lm-space-3) 0 0; }

/* -- The form --------------------------------------------------------------------------- */
.lm-fund-form .lm-wallet-amount-box { max-inline-size: 22rem; }
.lm-fund-form .lm-imagefield__cover { aspect-ratio: 16 / 9; }

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

/* -- Contributing ----------------------------------------------------------------------- */
.lm-fund-summary {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-3) var(--lm-space-4);
}

.lm-fund-summary__cover {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  inline-size: 72px;
  block-size: 54px;
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-surface-secondary);
}

.lm-fund-summary__cover img,
.lm-fund-summary__cover .lm-tile { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.lm-fund-summary__cover .lm-tile.lm-fund-card__none svg { inline-size: 22px; block-size: 22px; }

.lm-fund-summary__text {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  font-size: var(--lm-text-sm);
}

.lm-fund-summary__text .lm-help { margin: 0; }
.lm-fund-summary__title { color: var(--lm-text); font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }

.lm-fund-give .lm-alert { margin: 0; }
.lm-fund-give .lm-alert__body p { margin: 0; }
.lm-fund-give .lm-alert__body p + p { margin-block-start: var(--lm-space-1); }

.lm-check.lm-fund-give__anon { align-items: flex-start; }
.lm-check.lm-fund-give__anon > span { display: flex; flex-direction: column; gap: 2px; }
.lm-check.lm-fund-give__anon .lm-help { margin: 0; }

.lm-fund-review .lm-wallet-confirm__names { min-inline-size: 0; }
.lm-fund-review .lm-wallet-confirm__names strong { overflow-wrap: anywhere; }

/* -- Given ------------------------------------------------------------------------------ */
.lm-fund-given {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-6) var(--lm-space-5);
  text-align: center;
}

.lm-fund-given__icon {
  display: grid;
  place-items: center;
  inline-size: 56px;
  block-size: 56px;
  border-radius: 50%;
  background-color: var(--lm-success-soft);
  color: var(--lm-success-text);
}

.lm-fund-given__icon svg { inline-size: 30px; block-size: 30px; }
.lm-fund-given__title { margin: 0; font-size: var(--lm-text-xl); }
.lm-fund-given__lead { margin: 0; color: var(--lm-text-secondary); overflow-wrap: anywhere; }
.lm-fund-given .lm-wallet-facts { inline-size: 100%; text-align: start; }
.lm-fund-given .lm-help { margin: 0; }

.lm-fund-given__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--lm-space-2);
}

/* -- My campaigns, My contributions ------------------------------------------------------- */
/* Five tabs do not fit 320 pixels: each keeps its words on one line and
   the row scrolls inside its pill. (Two classes: components.css, which
   loads later, gives every tab flex: 1 1 0.) */
.lm-fund-tabs { overflow-x: auto; scrollbar-width: none; }
.lm-fund-tabs::-webkit-scrollbar { display: none; }
.lm-fund-tabs .lm-tabs__tab { flex: 1 0 auto; padding-inline: var(--lm-space-4); white-space: nowrap; }

.lm-fund-mine { padding-block: var(--lm-space-1); }

.lm-fund-row__cover {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  inline-size: 72px;
  block-size: 54px;
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-surface-secondary);
}

.lm-fund-row__cover img,
.lm-fund-row__cover .lm-tile { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.lm-fund-row__cover .lm-tile.lm-fund-card__none svg { inline-size: 22px; block-size: 22px; }

.lm-fund-row__pic { flex: 0 0 auto; align-self: flex-start; }

.lm-fund-row__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-1);
  margin-block-start: 2px;
}

.lm-fund-phase { white-space: nowrap; }

.lm-fund-phase--ended,
.lm-fund-phase--closed,
.lm-fund-phase--hidden { background-color: var(--lm-surface-secondary); color: var(--lm-text-secondary); }

.lm-fund-row .lm-fund-person__amount { align-self: center; }

@media (max-width: 767px) {
  .lm-fund__body { padding-inline: var(--lm-space-4); }
}

@media (max-width: 599px) {
  .lm-fund-grid { grid-template-columns: minmax(0, 1fr); gap: var(--lm-space-3); }
  .lm-fund-filters__category { flex: 1 1 100%; }
  .lm-fund-progress--lg .lm-fund-progress__raised { font-size: var(--lm-text-xl); }
  .lm-fund-form__deadline { grid-template-columns: minmax(0, 1fr); }
  .lm-fund-given { padding: var(--lm-space-5) var(--lm-space-4); }
  .lm-fund-row .lm-fund-person__amount { order: 3; }
}

/* =======================================================================
   Phase 24. Card deposits
   =======================================================================
   Add funds, the payment page with Stripe's Payment Element inside Luma's
   card, where a deposit stands (waiting, credited, failed, cancelled), the
   deposit history and the hold banner. A state is said in words and a
   badge, never by colour alone. Every icon has a size of its own
   (Lm_Icon() has none). */

/* -- Add funds -------------------------------------------------------------------------- */
.lm-deposit-test {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-2);
  margin: 0;
  padding: var(--lm-space-3) var(--lm-space-4);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-warning-soft);
  color: var(--lm-warning-text);
  font-size: var(--lm-text-sm);
}

.lm-deposit-test svg { flex: 0 0 18px; inline-size: 18px; block-size: 18px; margin-block-start: 1px; }

.lm-deposit-steps {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

.lm-deposit-steps li {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-2);
}

.lm-deposit-steps svg { flex: 0 0 18px; inline-size: 18px; block-size: 18px; margin-block-start: 1px; color: var(--lm-primary-text); }

/* -- The payment page ------------------------------------------------------------------- */
.lm-deposit { padding: var(--lm-space-5); }

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

.lm-deposit__icon,
.lm-deposit-row__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: 50%;
  background-color: var(--lm-success-soft);
  color: var(--lm-success-text);
}

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

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

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

.lm-deposit__amount {
  margin: var(--lm-space-1) 0 0;
  font-size: var(--lm-text-2xl);
  font-weight: var(--lm-weight-bold);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.lm-deposit__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-1) var(--lm-space-2);
  margin: var(--lm-space-2) 0 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

.lm-deposit__pay {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-4);
  margin-block-start: var(--lm-space-5);
}

/* Stripe draws its own frame here; the space is kept while it loads so the
   page does not jump. */
.lm-deposit__element {
  min-block-size: 220px;
  min-inline-size: 0;
}

.lm-deposit__element[aria-busy="false"] { min-block-size: 0; }

.lm-deposit__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--lm-space-2);
  margin: 0;
  min-block-size: 220px;
  border: 1px dashed var(--lm-border);
  border-radius: var(--lm-radius-md);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

.lm-deposit__loading svg { flex: 0 0 18px; inline-size: 18px; block-size: 18px; }

.lm-deposit__privacy {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-2);
  margin: 0;
}

.lm-deposit__privacy svg { flex: 0 0 16px; inline-size: 16px; block-size: 16px; margin-block-start: 2px; }

.lm-deposit__actions,
.lm-deposit-done__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--lm-space-2);
}

.lm-deposit__state { margin-block-start: var(--lm-space-5); }

/* -- Where it stands -------------------------------------------------------------------- */
.lm-deposit-done {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--lm-space-3);
  text-align: center;
}

.lm-deposit-done__icon {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 56px;
  block-size: 56px;
  border-radius: 50%;
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text-secondary);
}

.lm-deposit-done__icon svg { inline-size: 28px; block-size: 28px; }

.lm-deposit-done__icon--good { background-color: var(--lm-success-soft); color: var(--lm-success-text); }
.lm-deposit-done__icon--wait { background-color: var(--lm-warning-soft); color: var(--lm-warning-text); }
.lm-deposit-done__icon--bad { background-color: var(--lm-danger-soft); color: var(--lm-danger-text); }

.lm-deposit-done__title {
  margin: 0;
  font-size: var(--lm-text-lg);
}

.lm-deposit-done__lead { margin: 0; }

.lm-deposit-done .lm-help { margin: 0; }

.lm-deposit-done .lm-wallet-facts { text-align: start; }

.lm-deposit-done__actions { justify-content: center; }

/* -- History ---------------------------------------------------------------------------- */
.lm-deposit-row__icon { inline-size: 40px; block-size: 40px; }
.lm-deposit-row__icon svg { inline-size: 20px; block-size: 20px; }

/* -- The hold --------------------------------------------------------------------------- */
.lm-wallet-hold {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
  padding: var(--lm-space-5);
  border: 1px solid var(--lm-danger);
  background-color: var(--lm-danger-soft);
}

.lm-wallet-hold__head {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-3);
}

.lm-wallet-hold__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: 50%;
  background-color: var(--lm-surface);
  color: var(--lm-danger-text);
}

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

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

.lm-wallet-hold__title {
  margin: 0;
  color: var(--lm-danger-text);
  font-size: var(--lm-text-md);
}

.lm-wallet-hold__owed {
  margin: var(--lm-space-1) 0 0;
  font-weight: var(--lm-weight-semibold);
  overflow-wrap: anywhere;
}

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

.lm-wallet-hold__list {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--lm-text-sm);
}

.lm-wallet-hold__list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--lm-space-1) var(--lm-space-2);
}

.lm-wallet-hold__list .lm-wallet-amount { margin-inline-start: auto; }

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

@media (max-width: 599px) {
  .lm-deposit,
  .lm-wallet-hold { padding: var(--lm-space-4); }
  .lm-deposit__amount { font-size: var(--lm-text-xl); }
  .lm-deposit__actions .lm-btn,
  .lm-deposit-done__actions .lm-btn { flex: 1 1 auto; }
  .lm-deposit__meta .lm-post__dot { display: none; }
}

/* -- How a deposit is paid (Phase 24, payment gateways) ------------------------------------ */
.lm-deposit-method {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

.lm-deposit-method svg,
.lm-deposit-methods__option svg { flex: 0 0 20px; inline-size: 20px; block-size: 20px; }

.lm-deposit-method strong { color: var(--lm-text); }

.lm-deposit-methods {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  margin: 0;
  padding: 0;
  border: 0;
}

.lm-deposit-methods__option {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  padding: var(--lm-space-3) var(--lm-space-4);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-md);
  cursor: pointer;
}

.lm-deposit-methods__option:has(input:checked) { border-color: var(--lm-primary); }

.lm-deposit-methods__option input { flex: 0 0 auto; margin: 0; }

.lm-deposit-methods__option .lm-badge { margin-inline-start: auto; }

/* =======================================================================
   Phase 25. Packages / Pro memberships
   =======================================================================
   The storefront (cards, the comparison), a package's page with its review
   and Confirm, My Membership (the receipt, the package, what the member has
   now, the history), and the membership badge on a profile.

   THE BADGE IS NOT A VERIFICATION MARK: a pill with a mark and a short
   label, never a check, never the verified blue. Its six colours are fixed
   pairs of text on a soft ground, each at least 4.5:1, in both schemes.
   ======================================================================= */

.lm-member-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  max-inline-size: 100%;
  padding: 3px 10px 3px 8px;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-badge-gold-bg);
  color: var(--lm-badge-gold-fg);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  letter-spacing: 0;
  line-height: 1.3;
  vertical-align: middle;
  white-space: nowrap;
}

.lm-member-badge__icon { flex: 0 0 15px; inline-size: 15px; block-size: 15px; }
.lm-member-badge__label { overflow: hidden; text-overflow: ellipsis; }

.lm-member-badge--sm { padding: 2px 8px 2px 6px; font-size: var(--lm-text-xs); }
.lm-member-badge--sm .lm-member-badge__icon { flex-basis: 13px; inline-size: 13px; block-size: 13px; }

/* Each colour is a pair of tokens (tokens.css), so the contrast check
   measures every one of them in both schemes. */
.lm-member-badge--gold   { background-color: var(--lm-badge-gold-bg);   color: var(--lm-badge-gold-fg); }
.lm-member-badge--violet { background-color: var(--lm-badge-violet-bg); color: var(--lm-badge-violet-fg); }
.lm-member-badge--blue   { background-color: var(--lm-badge-blue-bg);   color: var(--lm-badge-blue-fg); }
.lm-member-badge--teal   { background-color: var(--lm-badge-teal-bg);   color: var(--lm-badge-teal-fg); }
.lm-member-badge--rose   { background-color: var(--lm-badge-rose-bg);   color: var(--lm-badge-rose-fg); }
.lm-member-badge--slate  { background-color: var(--lm-badge-slate-bg);  color: var(--lm-badge-slate-fg); }

/* On a profile the name may wrap under a badge rather than push it out of
   the card at 320 pixels. Only a name WITH a badge: every other profile is
   drawn as before. */
.lm-profile__name:has(.lm-member-badge) { flex-wrap: wrap; row-gap: 4px; }
.lm-profile__name .lm-member-badge { font-size: var(--lm-text-sm); }

/* -- The storefront -------------------------------------------------------------------------- */
.lm-pkg-hero { padding: var(--lm-space-5); }

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

.lm-pkg-hero__title {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  font-size: var(--lm-text-xl);
}

.lm-pkg-hero__title svg { flex: 0 0 24px; inline-size: 24px; block-size: 24px; }

.lm-pkg-hero__lead { margin: var(--lm-space-2) 0 0; color: var(--lm-text-secondary); }

.lm-pkg-hero__current {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-2);
  margin: var(--lm-space-4) 0 0;
  padding: var(--lm-space-3) var(--lm-space-4);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-success-soft);
  color: var(--lm-success-text);
  font-weight: var(--lm-weight-medium);
  overflow-wrap: anywhere;
}

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

.lm-pkg-hero__closed { margin: var(--lm-space-4) 0 0; }

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

/* One package: the whole column. */
.lm-pkg-grid > .lm-pkg-card:only-child { grid-column: 1 / -1; }

.lm-pkg-card {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
  padding: var(--lm-space-5);
  border: 1px solid var(--lm-card-border);
}

.lm-pkg-card.is-current { border-color: var(--lm-success); box-shadow: 0 0 0 1px var(--lm-success); }

.lm-pkg-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--lm-space-2);
}

.lm-pkg-card__names,
.lm-pkg-detail__names {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2);
  min-inline-size: 0;
}

.lm-pkg-card__name {
  margin: 0;
  font-size: var(--lm-text-lg);
  font-weight: var(--lm-weight-bold);
  overflow-wrap: anywhere;
}

.lm-pkg-card__state { flex: 0 0 auto; }

.lm-pkg-card__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px var(--lm-space-2);
  margin: 0;
}

.lm-pkg-card__amount {
  font-size: 1.625rem;
  font-weight: var(--lm-weight-bold);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.lm-pkg-card__per { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }

.lm-pkg-card__description {
  margin: 0;
  color: var(--lm-text-secondary);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.lm-pkg-card__none { margin: 0; }

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

.lm-pkg-card__until { margin: 0; }

.lm-pkg-benefits {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-pkg-benefits__item {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-2);
  min-inline-size: 0;
}

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

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

.lm-pkg-benefits__text { align-self: center; overflow-wrap: anywhere; }

/* -- The comparison: a table that scrolls inside its own card on a phone,
      its first column held in place. -- */
.lm-pkg-compare { overflow: hidden; }
.lm-pkg-compare__scroll {
  /* The containing block of the cells' visually hidden words ("Included"),
     so none is placed against the page beyond a phone's edge. */
  position: relative;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

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

.lm-pkg-compare__table {
  inline-size: 100%;
  min-inline-size: 420px;
  border-collapse: collapse;
  font-size: var(--lm-text-sm);
}

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

.lm-pkg-compare__table thead th {
  color: var(--lm-text-secondary);
  font-weight: var(--lm-weight-semibold);
  overflow-wrap: anywhere;
}

.lm-pkg-compare__table th[scope="row"],
.lm-pkg-compare__table thead th:first-child {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  min-inline-size: 140px;
  background-color: var(--lm-surface);
  text-align: start;
}

.lm-pkg-compare__label { display: inline-flex; align-items: center; gap: var(--lm-space-2); font-weight: var(--lm-weight-medium); }
.lm-pkg-compare__label svg { flex: 0 0 16px; inline-size: 16px; block-size: 16px; color: var(--lm-text-secondary); }

.lm-pkg-compare__table td.is-better { color: var(--lm-success-text); font-weight: var(--lm-weight-semibold); }

.lm-pkg-compare__yes { display: inline-grid; place-items: center; color: var(--lm-success-text); }
.lm-pkg-compare__yes svg { inline-size: 18px; block-size: 18px; }
.lm-pkg-compare__no { color: var(--lm-subtle); }

.lm-pkg-compare__price td,
.lm-pkg-compare__price th { border-block-end: 0; }

.lm-pkg-compare__amount { display: block; font-weight: var(--lm-weight-bold); font-variant-numeric: tabular-nums; }
.lm-pkg-compare__duration { display: block; margin: 0; }

/* -- A package's page and its review ----------------------------------------------------------- */
.lm-pkg-detail {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
  padding: var(--lm-space-5);
}

.lm-pkg-detail__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--lm-space-2);
}

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

.lm-pkg-detail__name {
  margin: 0;
  font-size: var(--lm-text-xl);
  overflow-wrap: anywhere;
}

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

.lm-pkg-review .lm-alert,
.lm-pkg-review .lm-wallet-facts { margin: 0; }

.lm-pkg-review__note { margin: 0; }

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

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

/* -- My Membership --------------------------------------------------------------------------------- */
.lm-member-card {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
  padding: var(--lm-space-5);
}

.lm-member-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--lm-space-2);
}

.lm-member-card__title {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  font-size: var(--lm-text-xl);
}

.lm-member-card__title svg { flex: 0 0 24px; inline-size: 24px; block-size: 24px; }

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

.lm-member-card__name {
  margin: 0;
  font-size: var(--lm-text-lg);
  font-weight: var(--lm-weight-bold);
  overflow-wrap: anywhere;
}

.lm-member-card .lm-wallet-facts { margin: 0; }

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

.lm-member-card__actions .lm-help { margin: 0; flex: 1 1 100%; }

.lm-member-now,
.lm-member-history { overflow: hidden; }

.lm-member-now__list { padding: var(--lm-space-4) var(--lm-space-5) var(--lm-space-5); }
.lm-member-now__list .lm-pkg-benefits__item { align-items: center; }

.lm-member-now__value {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 2px var(--lm-space-2);
  margin-inline-start: auto;
  font-weight: var(--lm-weight-semibold);
  text-align: end;
}

.lm-member-now__value.is-better { color: var(--lm-success-text); }
.lm-member-now__value .lm-help { margin: 0; font-weight: var(--lm-weight-regular); }

.lm-member-history__empty { margin: 0; padding: 0 var(--lm-space-5) var(--lm-space-5); }

.lm-member-history__list { margin: 0; padding: 0; list-style: none; }

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

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

.lm-member-history__what {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px var(--lm-space-2);
  margin: 0;
  font-weight: var(--lm-weight-semibold);
}

.lm-member-history__package { overflow-wrap: anywhere; }

.lm-member-history__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  margin: 2px 0 0;
}

.lm-member-history__amount { flex: 0 0 auto; margin: 0; text-align: end; }

.lm-member-history__more { padding: var(--lm-space-3) var(--lm-space-5) var(--lm-space-5); }

@media (max-width: 599px) {
  .lm-pkg-grid { grid-template-columns: minmax(0, 1fr); gap: var(--lm-space-3); }
  .lm-pkg-hero,
  .lm-pkg-card,
  .lm-pkg-detail,
  .lm-member-card { padding: var(--lm-space-4); }
  .lm-member-now__list { padding: var(--lm-space-3) var(--lm-space-4) var(--lm-space-4); }
  .lm-member-history__row { flex-wrap: wrap; padding-inline: var(--lm-space-4); }
  .lm-member-history__amount { flex-basis: 100%; text-align: start; }
  .lm-member-history__empty,
  .lm-member-history__more { padding-inline: var(--lm-space-4); }
  .lm-pkg-card__amount { font-size: 1.375rem; }
}

/* ==========================================================================
   Phase 26. Self-serve ads
   --------------------------------------------------------------------------
   The ad card is a post card's shape — the same header, the same gutters —
   with "Sponsored" where a post has its time, one 16:9 picture, and a footer
   that says where it leads. It is never styled by an advertiser: every rule
   here is the site's.
   ========================================================================== */

.lm-ad { overflow: visible; }

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

.lm-ad__sponsored {
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
}

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

.lm-ad__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--lm-media-bg);
}

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

.lm-ad__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text-secondary);
}

.lm-ad__media--empty svg { inline-size: 32px; block-size: 32px; }

.lm-ad__footer {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-3) var(--lm-space-4) var(--lm-space-4);
  background-color: var(--lm-surface-secondary);
  border-end-start-radius: inherit;
  border-end-end-radius: inherit;
}

.lm-ad__link {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-inline-size: 0;
  color: var(--lm-text);
  text-decoration: none;
}

.lm-ad__link:hover .lm-ad__headline,
.lm-ad__link:focus-visible .lm-ad__headline { text-decoration: underline; }

.lm-ad__host {
  unicode-bidi: plaintext;
  overflow: hidden;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  text-overflow: ellipsis;
  text-transform: lowercase;
  white-space: nowrap;
}

.lm-ad__headline {
  font-size: var(--lm-text-base);
  font-weight: var(--lm-weight-semibold);
  line-height: var(--lm-leading-snug);
  overflow-wrap: anywhere;
}

.lm-ad__cta { flex: 0 0 auto; }
.lm-ad__cta svg { inline-size: 16px; block-size: 16px; }

/* In the side column: a narrower card, the button under the words. */
.lm-ad--sidebar .lm-ad__footer { flex-direction: column; align-items: stretch; }
.lm-ad--sidebar .lm-ad__cta { justify-content: center; }
.lm-ad--sidebar .lm-ad__body { font-size: var(--lm-text-sm); }

/* A preview inside a form or a dashboard: a card in a card. */
.lm-ad--preview { box-shadow: none; border: 1px solid var(--lm-border); }

.lm-dropdown__note {
  margin: 0;
  padding: var(--lm-space-2) var(--lm-space-3);
  max-inline-size: 260px;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  line-height: var(--lm-leading-snug);
}

/* -- Ads Manager --------------------------------------------------------- */
.lm-ads-list { display: flex; flex-direction: column; gap: var(--lm-space-3); }

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

.lm-ads-row__thumb {
  display: flex;
  flex: 0 0 112px;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text-secondary);
}

.lm-ads-row__thumb img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.lm-ads-row__glyph svg { inline-size: 24px; block-size: 24px; }

.lm-ads-row__body { flex: 1 1 auto; min-inline-size: 0; }
.lm-ads-row__body .lm-help { margin: 2px 0 0; }

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

.lm-ads-row__name {
  color: var(--lm-text);
  font-weight: var(--lm-weight-semibold);
  overflow-wrap: anywhere;
  text-decoration: none;
}

.lm-ads-row__name:hover { text-decoration: underline; }

.lm-ads-figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--lm-space-2) var(--lm-space-3);
  margin: var(--lm-space-3) 0 0;
}

.lm-ads-figures dt { color: var(--lm-text-secondary); font-size: var(--lm-text-xs); }
.lm-ads-figures dd { margin: 0; font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-ads-figures--wide { margin: 0 0 var(--lm-space-4); }
.lm-ads-figures--wide dd { font-size: var(--lm-text-lg); }

/* -- One campaign -------------------------------------------------------- */
.lm-ads-head {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
  padding: var(--lm-space-5);
}

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

.lm-ads-head__top .lm-btn { margin-inline-end: auto; }

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

.lm-ads-head .lm-help { margin: 0; }
.lm-ads-head .lm-alert { margin: 0; }
.lm-ads-head__reason { margin: var(--lm-space-1) 0 0; overflow-wrap: anywhere; }

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

.lm-ads-days { position: relative; margin-block-end: var(--lm-space-2); }
.lm-ads-days .lm-table { min-inline-size: 360px; }

.lm-ads-warn {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-2);
  margin: var(--lm-space-3) 0 0;
  color: var(--lm-warning-text);
}

.lm-ads-warn svg { flex: 0 0 18px; inline-size: 18px; block-size: 18px; }

.lm-ads-record { margin: 0; padding: 0; list-style: none; }

.lm-ads-record__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--lm-space-3);
  padding: var(--lm-space-2) 0;
  border-block-start: 1px solid var(--lm-border);
}

.lm-ads-record__row:first-child { border-block-start: 0; }

.lm-ads-record__what {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--lm-space-2);
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

.lm-ads-record__row time { flex: 0 0 auto; }

/* -- The form ------------------------------------------------------------ */
.lm-ad-form { display: flex; flex-direction: column; gap: var(--lm-space-4); }

/* The preview stays in view beside a long form on a wide screen. */
.lm-ad-form__preview .lm-card__body { padding-block-start: 0; }

.lm-ad-form__state {
  margin: 0 0 var(--lm-space-2);
  color: var(--lm-text);
  font-weight: var(--lm-weight-semibold);
}

.lm-ad-form__country-tools {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin-block-end: var(--lm-space-2);
}

.lm-ad-form__country-tools .lm-input { flex: 1 1 auto; min-inline-size: 0; }

.lm-ad-form__countries {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: var(--lm-space-2) var(--lm-space-4);
  max-block-size: 16rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--lm-space-3);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-md);
}

.lm-ad-form__countries .lm-check { min-inline-size: 0; }
.lm-ad-form__countries .lm-check span { overflow-wrap: anywhere; }
.lm-ad-form__countries .lm-check[hidden] { display: none; }
.lm-ad-form__countries input:disabled + span { color: var(--lm-text-secondary); }

.lm-ad-form__set { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.lm-ad-form__set legend { padding: 0; margin-block-end: var(--lm-space-2); }

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

.lm-ad-form__number { max-inline-size: 8rem; }

.lm-ad-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--lm-space-2);
}

/* -- Funding ------------------------------------------------------------- */
.lm-ad-fund { display: flex; flex-direction: column; gap: var(--lm-space-3); margin-block-start: var(--lm-space-4); }

.lm-ad-policy { margin: var(--lm-space-4) 0 var(--lm-space-3); }

.lm-ad-policy__list {
  margin: var(--lm-space-2) 0 0;
  padding-inline-start: var(--lm-space-5);
  line-height: var(--lm-leading-snug);
}

.lm-ad-policy__list li + li { margin-block-start: var(--lm-space-1); }

.lm-ad-policy__ack {
  align-items: flex-start;
  margin-block-end: var(--lm-space-4);
  font-weight: var(--lm-weight-semibold);
}

@media (max-width: 599px) {
  .lm-ads-row { flex-direction: column; }
  .lm-ads-row__thumb { flex-basis: auto; inline-size: 100%; }
  .lm-ads-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lm-ads-head { padding: var(--lm-space-4); }
  .lm-ad__footer { flex-wrap: wrap; }
  .lm-ad__cta { flex: 1 1 100%; justify-content: center; }
  .lm-ad-form__actions .lm-btn { flex: 1 1 auto; }
}

/* -- Phase 28: conversations between a member and a Page ----------------- */

/* Message, on a Page's profile: keeps its word and its size beside Follow. */
.lm-page-message { flex: 0 0 auto; }

/* "Page" beside a Page's name, in the inbox row and the thread header. */
.lm-badge.lm-convo__page-badge,
.lm-badge.lm-thread__page-badge {
  flex: 0 0 auto;
  padding-block: 0;
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
}

.lm-convo__top .lm-convo__page-badge { align-self: center; }

/* The Page inbox names its Page: a long name wraps, never widens the list. */
.lm-messages__title--page {
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

/* "Messages as LumaQode", under the heading of the Page's inbox. */
.lm-actor-note--block.lm-page-inbox__as { margin: var(--lm-space-3) var(--lm-space-5) 0; }

/* "Replying as LumaQode", over the composer. */
.lm-actor-note.lm-thread__as { margin: 0 0 var(--lm-space-2); }

/* The way back to the personal profile, under "not in this inbox". */
.lm-page-inbox-switch {
  display: flex;
  justify-content: center;
  padding-block-start: 0;
}

/* The switcher's message count: a soft pill with a speech bubble, so it is
   never read as the notification count beside it. */
.lm-identity__count.lm-identity__count--messages {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
}

.lm-identity__count--messages svg { inline-size: 12px; block-size: 12px; flex-shrink: 0; }

/* ==========================================================================
   Phase 29. The composer's parts, and what a post carries
   ========================================================================== */

/* -- the composer ------------------------------------------------------- */

/* Who it posts as, in words, over the text. */
.lm-composer__by {
  margin: 0 0 var(--lm-space-2);
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
}

.lm-composer__field { position: relative; }

.lm-composer__actions[hidden],
.lm-composer__tool[hidden],
.lm-composer__context[hidden],
.lm-composer__progress[hidden],
.lm-composer__suggest[hidden],
.lm-composer-activity__detail[hidden],
.lm-composer-poll__days[hidden] { display: none; }

.lm-composer__action--photos {
  background-color: var(--lm-success-soft);
  color: var(--lm-success-text);
}

.lm-composer__action--activity {
  background-color: var(--lm-warning-soft);
  color: var(--lm-warning-text);
}

/* Add to your post: the parts, as a row that wraps rather than scrolls. */
.lm-composer__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-1) var(--lm-space-2);
  margin-block: 0 var(--lm-space-3);
  padding: var(--lm-space-2) var(--lm-space-3);
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-sm);
}

.lm-composer__toolbar-label {
  margin-inline-end: auto;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
}

.lm-composer__tool-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-1);
  min-block-size: 36px;
  padding: 0 var(--lm-space-2);
  border: 0;
  border-radius: var(--lm-radius-pill);
  background: none;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  cursor: pointer;
  transition: background-color var(--lm-fast);
}

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

.lm-composer__tool-btn svg { inline-size: 20px; block-size: 20px; flex-shrink: 0; }
.lm-composer__tool-btn--photos svg { color: var(--lm-success-text); }
.lm-composer__tool-btn--video svg { color: var(--lm-primary-text); }
.lm-composer__tool-btn--poll svg { color: var(--lm-info-text); }
.lm-composer__tool-btn--activity svg { color: var(--lm-warning-text); }
.lm-composer__tool-btn--location svg { color: var(--lm-danger-text); }

/* The chips: a feeling, a place, each with a way out. */
.lm-composer__context {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-2);
  margin-block-end: var(--lm-space-3);
}

.lm-composer__chip {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  max-inline-size: 100%;
  padding: 2px 2px 2px 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);
}

.lm-composer__chip > span:nth-child(2) {
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-composer__chip .lm-composer__preview-remove {
  position: static;
  flex-shrink: 0;
  inline-size: 24px;
  block-size: 24px;
  background-color: var(--lm-sunken);
  color: var(--lm-text);
}

/* The chosen attachment. */
.lm-composer__previews--album { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }

.lm-composer__attach {
  position: relative;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  padding: var(--lm-space-3);
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-surface-secondary);
}

.lm-composer__attach video {
  inline-size: 100%;
  max-block-size: 320px;
  border-radius: var(--lm-radius-xs);
  background-color: var(--lm-media-bg);
}

.lm-composer__attach audio { inline-size: 100%; }

.lm-composer__attach-name {
  padding-inline-end: var(--lm-space-6);
  font-weight: var(--lm-weight-semibold);
  overflow-wrap: anywhere;
}

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

/* The panels for a poll, a feeling and a place. */
.lm-composer__tool {
  margin: 0 0 var(--lm-space-3);
  padding: var(--lm-space-3);
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-sm);
  min-inline-size: 0;
}

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

.lm-composer-activity { max-block-size: 22rem; overflow-y: auto; }

.lm-composer-poll__title,
.lm-composer-location__label {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  padding: 0;
  font-weight: var(--lm-weight-semibold);
}

.lm-composer-poll__title svg,
.lm-composer-location__label svg { inline-size: 18px; block-size: 18px; flex-shrink: 0; }

.lm-composer-poll__options {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-composer-poll__option { position: relative; display: flex; gap: var(--lm-space-2); align-items: center; }

.lm-composer-poll__option .lm-input { flex: 1 1 auto; min-inline-size: 0; }

.lm-composer-poll__option .lm-composer__preview-remove {
  position: static;
  flex-shrink: 0;
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
}

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

.lm-composer-poll__duration,
.lm-composer-poll__days {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin-inline-start: auto;
  font-size: var(--lm-text-sm);
  color: var(--lm-text-secondary);
}

.lm-composer-poll__days { margin-inline-start: 0; }
.lm-composer-poll__days .lm-input { inline-size: 5.5em; }

.lm-composer-activity__title,
.lm-composer-activity__group { margin: 0 0 var(--lm-space-2); font-size: var(--lm-text-sm); }
.lm-composer-activity__title { font-weight: var(--lm-weight-semibold); }
.lm-composer-activity__group { color: var(--lm-muted); }

.lm-composer-activity__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--lm-space-1);
  margin-block-end: var(--lm-space-3);
}

.lm-composer-activity__item {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  min-inline-size: 0;
  min-block-size: 40px;
  padding: var(--lm-space-1) var(--lm-space-2);
  border: 0;
  border-radius: var(--lm-radius-sm);
  background: none;
  color: var(--lm-text);
  font-size: var(--lm-text-sm);
  text-align: start;
  cursor: pointer;
}

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

.lm-composer-activity__emoji { font-size: 1.25em; line-height: 1; flex-shrink: 0; }

.lm-composer-activity__label { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lm-composer-activity__detail,
.lm-composer-location__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2);
}

.lm-composer-activity__detail label { flex: 1 1 100%; font-size: var(--lm-text-sm); color: var(--lm-text-secondary); }
.lm-composer-activity__detail .lm-input,
.lm-composer-location__row .lm-input { flex: 1 1 12rem; min-inline-size: 0; }

.lm-composer-location .lm-help { margin: var(--lm-space-2) 0 0; }

/* How far an upload has got. */
.lm-composer__progress {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  margin-block-end: var(--lm-space-3);
  font-size: var(--lm-text-sm);
  color: var(--lm-text-secondary);
}

.lm-composer__progress::before {
  content: "";
  flex: 1 1 auto;
  block-size: 6px;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-surface-secondary);
}

.lm-composer__progress-bar {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 50%;
  block-size: 6px;
  margin-block-start: -3px;
  max-inline-size: calc(100% - 9rem);
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-primary-strong);
  transition: inline-size var(--lm-fast);
}

.lm-composer__progress-text { flex: 0 0 8.5rem; text-align: end; }

/* The @ and # suggestions, under the text. */
.lm-composer__suggest {
  position: absolute;
  inset-inline: 0;
  inset-block-start: 100%;
  z-index: var(--lm-z-dropdown);
  max-block-size: 18rem;
  margin-block-start: var(--lm-space-1);
  overflow-y: auto;
  padding: var(--lm-space-1);
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-surface);
  box-shadow: var(--lm-shadow-lg);
}

.lm-composer__suggest-item {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  padding: var(--lm-space-2);
  border-radius: var(--lm-radius-xs);
  cursor: pointer;
}

.lm-composer__suggest-item.is-active,
.lm-composer__suggest-item:hover { background-color: var(--lm-surface-secondary); }

.lm-composer__suggest-item .lm-avatar { flex-shrink: 0; }

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

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

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

.lm-composer__suggest-kind { flex-shrink: 0; }

.lm-composer__suggest-empty { margin: 0; padding: var(--lm-space-2); color: var(--lm-muted); font-size: var(--lm-text-sm); }

/* -- a post's albums: five tiles, then a counter --------------------------- */

.lm-media__item--rest,
.lm-media__item[hidden] { display: none; }

.lm-media__item[data-lm-gallery-src] { cursor: zoom-in; }

.lm-media--5 { grid-template-columns: repeat(6, 1fr); }
.lm-media--5 .lm-media__item { grid-column: span 2; aspect-ratio: 1 / 1; }
.lm-media--5 .lm-media__item:nth-child(-n + 2) { grid-column: span 3; aspect-ratio: 4 / 3; }
.lm-media--5 .lm-media__item img { block-size: 100%; object-fit: cover; }

/* -- the viewer's previous, next and count ----------------------------- */

.lm-gallery__nav {
  position: absolute;
  inset-block-start: 50%;
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  margin-block-start: -22px;
  padding: 0;
  border: 0;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-overlay);
  color: var(--lm-on-scrim);
  cursor: pointer;
}

.lm-gallery__nav--prev { inset-inline-start: var(--lm-space-3); }
.lm-gallery__nav--next { inset-inline-end: var(--lm-space-3); }
.lm-gallery__nav > .lm-icon { inline-size: 22px; block-size: 22px; fill: none; stroke: currentColor; stroke-width: 2; }

[dir="rtl"] .lm-gallery__nav > .lm-icon { transform: scaleX(-1); }

.lm-gallery--single .lm-gallery__nav,
.lm-gallery--single .lm-gallery__count { display: none; }

.lm-gallery__count {
  position: absolute;
  inset-block-end: var(--lm-space-4);
  inset-inline: 0;
  margin: 0;
  text-align: center;
  color: var(--lm-on-scrim);
  font-size: var(--lm-text-sm);
}

/* -- a feeling, an activity, a place ------------------------------------- */

.lm-post__context {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lm-space-1) var(--lm-space-3);
  margin: 2px 0 0;
  font-size: var(--lm-text-sm);
  color: var(--lm-text-secondary);
  min-inline-size: 0;
}

.lm-post__chip {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-1);
  min-inline-size: 0;
  max-inline-size: 100%;
}

.lm-post__chip > span:last-child { overflow-wrap: anywhere; }
.lm-post__chip svg { inline-size: 14px; block-size: 14px; flex-shrink: 0; color: var(--lm-danger-text); }
.lm-post__emoji { font-size: 1.1em; line-height: 1; flex-shrink: 0; }

.lm-embed__context { padding-inline: var(--lm-space-4); margin-block-end: var(--lm-space-2); }

/* The feeling and the place each keep their own chip, for a test or a
   later style to find; they share the look above. */
.lm-post__chip--activity,
.lm-post__chip--location { color: var(--lm-text-secondary); }

/* -- a video --------------------------------------------------------------- */

.lm-attach { margin: 0; }

.lm-attach--video { background-color: var(--lm-media-bg); }

.lm-attach__video {
  display: block;
  inline-size: 100%;
  block-size: auto;
  max-block-size: 620px;
  background-color: var(--lm-media-bg);
}

/* -- an audio file ------------------------------------------------------- */

.lm-audio {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  margin: 0 var(--lm-space-5) var(--lm-space-3);
  padding: var(--lm-space-3);
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-surface-secondary);
}

.lm-audio__play {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-primary-strong);
  color: var(--lm-on-primary);
  cursor: pointer;
}

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

.lm-audio__icon { display: inline-grid; }
.lm-audio__icon svg { inline-size: 20px; block-size: 20px; }
.lm-audio__icon--pause,
.lm-audio.is-playing .lm-audio__icon--play { display: none; }
.lm-audio.is-playing .lm-audio__icon--pause { display: inline-grid; }

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

.lm-audio__title {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  min-inline-size: 0;
  font-weight: var(--lm-weight-semibold);
}

.lm-audio__title svg { inline-size: 16px; block-size: 16px; flex-shrink: 0; color: var(--lm-primary-text); }
.lm-audio__title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lm-audio__seek { inline-size: 100%; accent-color: var(--lm-primary-strong); }
.lm-audio__seek[hidden],
.lm-audio__time[hidden] { display: none; }

.lm-audio__time { display: inline-flex; gap: var(--lm-space-1); color: var(--lm-muted); font-size: var(--lm-text-xs); }

.lm-audio__native { inline-size: 100%; }
.lm-audio.is-enhanced .lm-audio__native { display: none; }

/* -- a document ---------------------------------------------------------- */

.lm-file-card {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  margin: 0 var(--lm-space-5) var(--lm-space-3);
  padding: var(--lm-space-3);
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-surface-secondary);
}

.lm-file-card__icon {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  inline-size: 48px;
  block-size: 48px;
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
}

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

.lm-file-card__ext {
  position: absolute;
  inset-block-end: 4px;
  inset-inline: 0;
  font-size: 9px;
  font-weight: var(--lm-weight-bold);
  text-align: center;
  letter-spacing: 0.02em;
}

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

.lm-file-card__name { font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }

.lm-file-card__meta { display: inline-flex; align-items: center; gap: var(--lm-space-1); color: var(--lm-muted); font-size: var(--lm-text-sm); }

.lm-file-card__download { flex-shrink: 0; }

/* -- a poll ------------------------------------------------------------------ */

.lm-poll {
  margin: 0 var(--lm-space-5) var(--lm-space-3);
  padding: var(--lm-space-4);
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-sm);
}

.lm-poll__question {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-2);
  margin: 0 0 var(--lm-space-3);
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-semibold);
  overflow-wrap: anywhere;
}

.lm-poll__question svg { inline-size: 20px; block-size: 20px; flex-shrink: 0; margin-block-start: 2px; color: var(--lm-info-text); }

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

.lm-poll__choice {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  inline-size: 100%;
  min-block-size: 44px;
  padding: var(--lm-space-2) var(--lm-space-3);
  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-sm);
  text-align: start;
  cursor: pointer;
  overflow-wrap: anywhere;
  transition: border-color var(--lm-fast), background-color var(--lm-fast);
}

.lm-poll__choice:hover { border-color: var(--lm-primary); background-color: var(--lm-primary-soft); }
.lm-poll__choice:disabled { cursor: progress; opacity: 0.7; }

.lm-poll__radio {
  flex-shrink: 0;
  inline-size: 18px;
  block-size: 18px;
  border: 2px solid var(--lm-border-strong);
  border-radius: 50%;
}

.lm-poll__result {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  min-block-size: 40px;
  padding: var(--lm-space-2) var(--lm-space-3);
  border-radius: var(--lm-radius-sm);
  background-color: var(--lm-surface-secondary);
  overflow: hidden;
  font-size: var(--lm-text-sm);
}

.lm-poll__bar {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  background-color: var(--lm-primary-soft-2);
}

.lm-poll__option.is-mine .lm-poll__bar { background-color: var(--lm-primary-soft); }

.lm-poll__label,
.lm-poll__share { position: relative; }

.lm-poll__label {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  flex: 1 1 auto;
  min-inline-size: 0;
  overflow-wrap: anywhere;
  color: var(--lm-text);
}

.lm-poll__label svg { inline-size: 16px; block-size: 16px; flex-shrink: 0; color: var(--lm-primary-text); }

.lm-poll__option.is-mine .lm-poll__label { font-weight: var(--lm-weight-semibold); }

.lm-poll__share { flex-shrink: 0; font-weight: var(--lm-weight-semibold); color: var(--lm-text); }

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

.lm-poll__ended { color: var(--lm-text-secondary); font-weight: var(--lm-weight-semibold); }

/* A reposted poll: voted on where it was asked. */
.lm-embed__poll {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0 var(--lm-space-4) var(--lm-space-3);
  padding: var(--lm-space-3);
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-sm);
  color: var(--lm-text);
  font-weight: var(--lm-weight-semibold);
}

.lm-embed__poll svg { inline-size: 18px; block-size: 18px; color: var(--lm-info-text); flex-shrink: 0; }
.lm-embed__poll-go { margin-inline-start: auto; color: var(--lm-primary-text); font-size: var(--lm-text-sm); }

/* -- the edit dialog (Phase 37.1.1: the composer's editor) --------------------- */

/* The form fills the editor's scrolling middle, section after section. */
.lm-post-edit {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-4);
  min-inline-size: 0;
}

/* WHO this post is by — the composer's identity row. */
.lm-post-edit__who {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
}

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

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

/* Under the title, the author as a caption — the composer's header. */
.lm-post-edit__who-name {
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-post-edit__who .lm-editor__title { margin: 0; }

.lm-post-edit__where {
  display: flex;
  align-items: center;
  gap: var(--lm-space-1);
  min-inline-size: 0;
  margin: 0;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
}

.lm-post-edit__where svg { inline-size: 14px; block-size: 14px; flex-shrink: 0; }

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

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

/* In a Share row, the choice is the row's own select, as a compact pill
   under the row's title. */
.lm-post-edit__pick .lm-select {
  align-self: flex-start;
  inline-size: auto;
  max-inline-size: 100%;
  min-block-size: 30px;
  margin-block-start: var(--lm-space-1);
  padding-block: 0;
  padding-inline-start: var(--lm-space-3);
  border-color: transparent;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-surface-secondary);
  font-size: var(--lm-text-sm);
}

.lm-post-edit__share { margin-block-start: var(--lm-space-1); }

/* The drawn preview waits here until the script moves it to its pane. */
.lm-post-edit__preview-src { display: none; }

/* The form's gap spaces its fields; .lm-field's own margin would double it. */
.lm-post-edit .lm-field { margin-block-end: 0; }

/* A feeling and its detail side by side. .lm-field (components.css, which
   loads after this sheet) is a column, and at equal specificity it won —
   which made the 12rem basis below a HEIGHT: two 190px-tall boxes. Two
   classes, so the row is a row. */
.lm-post-edit .lm-post-edit__row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--lm-space-2);
}

.lm-post-edit__row .lm-label { flex: 1 1 100%; }
.lm-post-edit__row .lm-input { flex: 1 1 12rem; min-inline-size: 0; }

.lm-post-edit__poll {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.lm-post-edit__locked { margin: 0; font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }

/* What is attached: a column — the tiles, the file, the way to add more. */
.lm-post-edit__media { min-inline-size: 0; }

/* How many more may be added, under what is attached. */
.lm-post-edit__left { margin: 0; }

/* The new ones chosen, as tiles of their own (filled by the script). */
.lm-post-edit__new .lm-post-edit__tile { cursor: default; }

/* The pictures as a gallery of square tiles, each with its way off. */
.lm-post-edit__tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: var(--lm-space-2);
}

.lm-post-edit__tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--lm-radius-md);
  overflow: hidden;
  background-color: var(--lm-surface-secondary);
  cursor: pointer;
}

.lm-post-edit__tile img,
.lm-post-edit__tile video { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }

.lm-post-edit__remove {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  display: flex;
  align-items: center;
  gap: var(--lm-space-1);
  padding: 2px var(--lm-space-2);
  background-color: var(--lm-overlay);
  color: var(--lm-on-scrim);
  font-size: var(--lm-text-xs);
}

.lm-post-edit__file {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2);
  flex: 1 1 100%;
  padding: var(--lm-space-2) var(--lm-space-3);
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-sm);
  overflow-wrap: anywhere;
}

.lm-post-edit__file svg { inline-size: 18px; block-size: 18px; flex-shrink: 0; }

.lm-post-edit__file .lm-post-edit__remove {
  position: static;
  margin-inline-start: auto;
  background: none;
  color: var(--lm-danger-text);
  font-size: var(--lm-text-sm);
}

/* -- a Page named in a post ------------------------------------------------- */

.lm-mention--page { font-weight: var(--lm-weight-semibold); }

/* -- phones ------------------------------------------------------------------ */

@media (max-width: 599px) {
  /* Phase 37.1.1: the editor's tiles keep their words on a phone (an icon
     over its name, four to a row), so nothing here hides them. */
  .lm-audio,
  .lm-file-card,
  .lm-poll { margin-inline: var(--lm-space-4); }
  .lm-composer-poll__duration { margin-inline-start: 0; }
  .lm-composer-activity__grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
}

@media (max-width: 359px) {
  .lm-file-card { flex-wrap: wrap; }
  .lm-file-card__download { flex: 1 1 100%; justify-content: center; }
}

/* ==========================================================================
   Phase 29.1 — mixed galleries, the video player, the media viewer
   ========================================================================== */

/* A video tile in the grid: its poster, a play disc, its length. */
.lm-media__item--video { background: var(--lm-media-bg); }
.lm-media__blank {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  min-block-size: 180px;
  background: var(--lm-media-bg);
}
.lm-media__play {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  inline-size: 52px;
  block-size: 52px;
  border-radius: var(--lm-radius-pill);
  background: color-mix(in srgb, var(--lm-media-bg) 55%, transparent);
  color: var(--lm-on-scrim);
  pointer-events: none;
}
[dir="rtl"] .lm-media__play { transform: translate(50%, -50%); }
.lm-media__play svg { inline-size: 24px; block-size: 24px; }
.lm-media__length {
  position: absolute;
  inset-block-end: var(--lm-space-2);
  inset-inline-end: var(--lm-space-2);
  padding: 2px 8px;
  border-radius: var(--lm-radius-pill);
  background: color-mix(in srgb, var(--lm-media-bg) 70%, transparent);
  color: var(--lm-on-scrim);
  font-size: var(--lm-text-xs);
  pointer-events: none;
}

/* A single video: the player fills the card's media slot. */
.lm-media--player { display: block; }

/* ---------------------------------------------------------- the player */
.lm-vp {
  position: relative;
  background: var(--lm-media-bg);
  border-radius: var(--lm-radius-md);
  overflow: hidden;
}
.lm-vp__video {
  display: block;
  inline-size: 100%;
  block-size: auto;
  max-block-size: 640px;
  background: var(--lm-media-bg);
}
/* Phase 38.0.1: within the stage, whole (the stage's padding taken off). */
.lm-viewer__media--video .lm-vp__video { max-block-size: calc(100vh - 2 * var(--lm-space-4)); }
.lm-vp__big {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  inline-size: 64px;
  block-size: 64px;
  border: 0;
  border-radius: var(--lm-radius-pill);
  background: color-mix(in srgb, var(--lm-media-bg) 55%, transparent);
  color: var(--lm-on-scrim);
  cursor: pointer;
  transition: background-color var(--lm-fast), opacity var(--lm-fast);
}
[dir="rtl"] .lm-vp__big { transform: translate(50%, -50%); }
.lm-vp__big svg { inline-size: 28px; block-size: 28px; }
.lm-vp__big:hover { background: color-mix(in srgb, var(--lm-media-bg) 75%, transparent); }
.lm-vp.is-playing .lm-vp__big { opacity: 0; pointer-events: none; }
.lm-vp__spin {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  margin-block-start: -14px;
  margin-inline-start: -14px;
  inline-size: 28px;
  block-size: 28px;
  border: 3px solid color-mix(in srgb, var(--lm-on-scrim) 35%, transparent);
  border-block-start-color: var(--lm-on-scrim);
  border-radius: var(--lm-radius-pill);
  animation: lm-vp-spin 0.8s linear infinite;
  pointer-events: none;
}
@keyframes lm-vp-spin { to { transform: rotate(360deg); } }
.lm-vp__bar {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  padding: var(--lm-space-2) var(--lm-space-3);
  background: linear-gradient(to top, color-mix(in srgb, var(--lm-media-bg) 78%, transparent), transparent);
  color: var(--lm-on-scrim);
}
.lm-vp__btn {
  display: grid;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  flex: 0 0 auto;
  border: 0;
  border-radius: var(--lm-radius-pill);
  background: transparent;
  color: var(--lm-on-scrim);
  cursor: pointer;
}
.lm-vp__btn:hover { background: color-mix(in srgb, var(--lm-on-scrim) 16%, transparent); }
.lm-vp__btn svg { inline-size: 18px; block-size: 18px; }
.lm-vp__icon { display: none; line-height: 0; }
.lm-vp:not(.is-playing) .lm-vp__icon--play,
.lm-vp.is-playing .lm-vp__icon--pause { display: block; }
.lm-vp:not(.is-muted) .lm-vp__icon--vol,
.lm-vp.is-muted .lm-vp__icon--vol-off { display: block; }
.lm-vp:not(.is-fullscreen) .lm-vp__icon--expand,
.lm-vp.is-fullscreen .lm-vp__icon--shrink { display: block; }
.lm-vp__time {
  flex: 0 0 auto;
  font-size: var(--lm-text-xs);
  color: var(--lm-on-scrim);
  display: inline-flex;
  gap: 3px;
}
.lm-vp__seek { flex: 1 1 auto; min-inline-size: 40px; accent-color: var(--lm-primary); }
.lm-vp__vol { flex: 0 0 64px; accent-color: var(--lm-primary); }
.lm-vp__quality { position: relative; flex: 0 0 auto; }
.lm-vp__btn--mute { flex: 0 0 auto; }
.lm-vp__btn--quality { inline-size: auto; padding-inline: var(--lm-space-2); gap: 4px; display: inline-flex; align-items: center; }
.lm-vp__quality-label { font-size: var(--lm-text-xs); font-weight: var(--lm-weight-semibold); }
.lm-vp__menu {
  position: absolute;
  inset-block-end: calc(100% + 6px);
  inset-inline-end: 0;
  display: flex;
  flex-direction: column;
  min-inline-size: 96px;
  padding: var(--lm-space-1);
  border-radius: var(--lm-radius-sm);
  background: color-mix(in srgb, var(--lm-media-bg) 88%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 3;
}
.lm-vp__menu[hidden] { display: none; }
.lm-vp__menu button {
  border: 0;
  background: transparent;
  color: var(--lm-on-scrim);
  font-size: var(--lm-text-sm);
  padding: 8px 12px;
  border-radius: var(--lm-radius-xs);
  cursor: pointer;
  text-align: start;
}
.lm-vp__menu button:hover { background: color-mix(in srgb, var(--lm-on-scrim) 16%, transparent); }
/* The chosen size: a mark, not a tinted word — the menu sits on the media's
   black in both schemes, where the light accent is a shape, never text. */
.lm-vp__menu button { position: relative; padding-inline-start: 26px; }
.lm-vp__menu button[aria-checked="true"] { font-weight: var(--lm-weight-semibold); }
.lm-vp__menu button[aria-checked="true"]::before {
  content: "";
  position: absolute;
  inset-inline-start: 10px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  inline-size: 7px;
  block-size: 7px;
  border-radius: var(--lm-radius-pill);
  background: var(--lm-primary);
}
.lm-vp.is-fullscreen { display: grid; place-items: center; border-radius: 0; }
.lm-vp.is-fullscreen .lm-vp__video { max-block-size: 100vh; inline-size: 100%; }

/* ------------------------------------------------------- the media viewer */
.lm-viewer {
  position: fixed;
  inset: 0;
  z-index: var(--lm-z-modal);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  /* Phase 38.0.1: solid, as the reference viewer is — the page no longer
     shows through behind the picture. */
  background: var(--lm-media-bg);
}
.lm-viewer[hidden] { display: none; }
.lm-viewer__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-inline-size: 0;
  min-block-size: 0;
  padding: var(--lm-space-4);
}
/* Phase 38.0.1. The frame is laid over the stage (inset by the stage's
   padding), so its size is DEFINITE and the picture's 100% caps below are
   real: before, a tall picture's max-block-size resolved against nothing,
   it was drawn at full height and the frame cut its bottom off. Now every
   picture is the largest that fits, whole, the way the reference viewer
   shows it; the space beside it is still the frame (a click there closes). */
.lm-viewer__frame {
  position: absolute;
  inset: var(--lm-space-4);
  display: grid;
  place-items: center;
  min-inline-size: 0;
  min-block-size: 0;
  overflow: hidden;
}
/* A flex box, not a grid: a grid's auto row is sized by the picture itself,
   so the picture's 100% cap referred to its own height and was ignored. */
.lm-viewer__media {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-block-size: 0;
}
.lm-viewer__media img {
  inline-size: auto;
  block-size: auto;
  max-inline-size: 100%;
  max-block-size: 100%;
  object-fit: contain;
  border-radius: var(--lm-radius-xs);
}
.lm-viewer__media--video .lm-vp { inline-size: min(100%, 1100px); }
.lm-viewer__close {
  position: absolute;
  inset-block-start: var(--lm-space-4);
  inset-inline-start: var(--lm-space-4);
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border: 0;
  border-radius: var(--lm-radius-pill);
  background: color-mix(in srgb, var(--lm-on-scrim) 14%, transparent);
  color: var(--lm-on-scrim);
  cursor: pointer;
  z-index: 2;
}
.lm-viewer__close:hover { background: color-mix(in srgb, var(--lm-on-scrim) 24%, transparent); }
.lm-viewer__nav {
  position: absolute;
  inset-block-start: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  inline-size: 48px;
  block-size: 48px;
  border: 0;
  border-radius: var(--lm-radius-pill);
  background: color-mix(in srgb, var(--lm-on-scrim) 14%, transparent);
  color: var(--lm-on-scrim);
  cursor: pointer;
  z-index: 2;
}
.lm-viewer__nav:hover { background: color-mix(in srgb, var(--lm-on-scrim) 24%, transparent); }
.lm-viewer__nav--prev { inset-inline-start: var(--lm-space-4); }
.lm-viewer__nav--next { inset-inline-end: var(--lm-space-4); }
.lm-viewer--single .lm-viewer__nav { display: none; }
.lm-viewer__count {
  position: absolute;
  inset-block-end: var(--lm-space-4);
  inset-inline-start: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 4px 12px;
  border-radius: var(--lm-radius-pill);
  background: color-mix(in srgb, var(--lm-on-scrim) 14%, transparent);
  color: var(--lm-on-scrim);
  font-size: var(--lm-text-sm);
}
[dir="rtl"] .lm-viewer__count { transform: translateX(50%); }
.lm-viewer__panel {
  background: var(--lm-surface);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.lm-viewer__panel .lm-post { border: 0; border-radius: 0; box-shadow: none; }
.lm-viewer.is-loading .lm-viewer__panel { display: grid; place-items: center; }
.lm-viewer.is-loading .lm-viewer__panel::after {
  content: "";
  inline-size: 28px;
  block-size: 28px;
  border: 3px solid var(--lm-border);
  border-block-start-color: var(--lm-primary);
  border-radius: var(--lm-radius-pill);
  animation: lm-vp-spin 0.8s linear infinite;
}

/* The composer's video preview tile. */
.lm-composer__preview--video video { inline-size: 100%; block-size: 100%; object-fit: cover; }
.lm-composer__preview-play {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  inline-size: 34px;
  block-size: 34px;
  border-radius: var(--lm-radius-pill);
  background: color-mix(in srgb, var(--lm-media-bg) 55%, transparent);
  pointer-events: none;
}
[dir="rtl"] .lm-composer__preview-play { transform: translate(50%, -50%); }
.lm-composer__preview-play::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  transform: translate(-40%, -50%);
  border-block: 7px solid transparent;
  border-inline-start: 11px solid var(--lm-on-scrim);
}

/* The edit dialog's video tile reuses the photo tile with a badge. */
.lm-post-edit__tile--video img { background: var(--lm-media-bg); }
.lm-post-edit__tile-kind {
  position: absolute;
  inset-block-start: var(--lm-space-1);
  inset-inline-start: var(--lm-space-1);
  padding: 1px 7px;
  border-radius: var(--lm-radius-pill);
  background: color-mix(in srgb, var(--lm-media-bg) 70%, transparent);
  color: var(--lm-on-scrim);
  font-size: var(--lm-text-xs);
}

/* ==========================================================================
   Phase 30 — For You
   ========================================================================== */

/* Why a card is in For You: quiet, above the author, only when true —
   laid out exactly as the repost line is (the same inset from the card's
   edge), so the header below keeps its place. */
.lm-post__reason {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  padding: var(--lm-space-3) var(--lm-space-5) 0;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
}
.lm-post__reason .lm-icon { inline-size: 15px; block-size: 15px; flex: 0 0 auto; }

/* The notice that stands where a card was, with its Undo. */
.lm-feed-hidden {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}
.lm-feed-hidden__text { min-inline-size: 0; }

/* A For You list past its time. */
.lm-feed-expired {
  margin: 0 0 var(--lm-space-3);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  text-align: center;
}

/* ==========================================================================
   Phase 32. Sensitive content in the reel player, the story viewer, the reel
   grid and the composer.
   ========================================================================== */

/* Above the picture, the play toggle and the sound button: a covered reel
   does not play until "View". The stage clips the blur. */
.lm-reel__safety {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: var(--lm-space-4);
  background-color: color-mix(in srgb, var(--lm-media-bg) 55%, transparent);
}

.lm-reel__safety .lm-safety-cover {
  inline-size: 100%;
  max-inline-size: 340px;
  margin: 0;
  box-shadow: var(--lm-shadow-lg);
}

.lm-reel[data-safety="cover"] .lm-reel__video { filter: blur(48px) saturate(0.5); }

/* On a phone the actions sit over the picture's end edge, and stay usable
   (a covered reel can still be reported): the warning keeps clear of them,
   as the caption does. */
@media (max-width: 767px) {
  .lm-reel__safety { padding-inline-end: 76px; }
}

/* A story's warning stands where the picture would, above the tap zones;
   a tap anywhere around it still moves on. Built by the script without an
   icon, so one column. Two classes: components.css (the cover's own rules)
   loads after this file. */
.lm-safety-cover.lm-storyview__safety {
  position: absolute;
  inset-inline: var(--lm-space-4);
  inset-block-start: 50%;
  z-index: 3;
  max-inline-size: 340px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr);
  text-align: center;
  transform: translateY(-50%);
  box-shadow: var(--lm-shadow-lg);
}

.lm-safety-cover.lm-storyview__safety .lm-safety-cover__actions {
  grid-column: 1 / -1;
  justify-content: center;
}

/* A sensitive reel in a grid: its still blurred, the words over it. The
   count and the audience badge stay on top. */
.lm-reeltile--sensitive .lm-reeltile__poster,
.lm-reeltile--sensitive:hover .lm-reeltile__poster {
  filter: blur(28px) saturate(0.5);
  transform: scale(1.12);
}

.lm-reeltile__sensitive {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  padding: var(--lm-space-2);
  background-color: color-mix(in srgb, var(--lm-media-bg) 35%, transparent);
  color: var(--lm-on-scrim);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
  text-align: center;
}

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

/* The composer's label: a small pill beside the tools; tinted once set. */
.lm-composer__safety { flex-shrink: 0; }

.lm-composer__safety-text {
  max-inline-size: 9em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lm-composer__safety.is-set > .lm-btn {
  background-color: var(--lm-warning-soft);
  color: var(--lm-warning-text);
}

/* ==========================================================================
   Phase 37. Live — redesigned in Phase 37.1
   --------------------------------------------------------------------------
   The live surfaces: discovery (a hero, two tabs, a grid of cover cards),
   the watch page (the stage beside a tabbed panel; on a phone the stage IS
   the page and the chat rides it), the studio (preview beside the set-up,
   then on air, then the ended summary), the feed card a live's post row
   draws, the "Live now" strip on home, and the LIVE chip on a profile.

   Everything over video is white on a dark scrim (--lm-on-scrim over
   --lm-media-bg), whatever the scheme: a video is not light or dark. The
   LIVE mark is the danger red everywhere — an alert, not a brand colour —
   and the coral gradient is kept for the one action that deserves it:
   Go live.
   ========================================================================== */

/* -- the two small marks: LIVE and how many are watching ------------------ */

.lm-live-badge,
.lm-live-count,
.lm-live-timer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  block-size: 24px;
  padding-inline: var(--lm-space-2);
  border-radius: var(--lm-radius-xs);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-bold);
  line-height: 1;
  white-space: nowrap;
}

.lm-live-badge {
  background-color: var(--lm-danger-strong);
  color: var(--lm-on-danger);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* The pulsing dot ahead of LIVE, drawn once as a pseudo-element so every
   pulsing badge is one class. */
.lm-live-badge--pulse svg { display: none; }

.lm-live-badge--pulse::before {
  content: "";
  inline-size: 7px;
  block-size: 7px;
  border-radius: 50%;
  background-color: currentColor;
  animation: lm-live-pulse 1.6s ease-out infinite;
}

.lm-live-badge--over {
  background-color: color-mix(in srgb, var(--lm-media-bg) 62%, transparent);
  color: var(--lm-on-scrim);
  text-transform: none;
  letter-spacing: 0;
}

@keyframes lm-live-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
  70%  { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.lm-live-count,
.lm-live-timer {
  background-color: color-mix(in srgb, var(--lm-media-bg) 60%, transparent);
  color: var(--lm-on-scrim);
}

.lm-live-badge svg,
.lm-live-count svg {
  inline-size: 14px;
  block-size: 14px;
  flex-shrink: 0;
}

/* -- the LIVE chip beside a name (profile, a Page) ------------------------ */

.lm-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  block-size: 22px;
  padding-inline: var(--lm-space-2);
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-danger-strong);
  color: var(--lm-on-danger);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.lm-live-chip:hover { background-color: var(--lm-danger); color: var(--lm-on-danger); }

.lm-live-chip__dot {
  inline-size: 6px;
  block-size: 6px;
  border-radius: 50%;
  background-color: currentColor;
  animation: lm-live-pulse 1.6s ease-out infinite;
}

/* -- the live ring: the story ring's idea, in the live red ---------------- */

.lm-live-card__ring,
.lm-live__host-ring,
.lm-live-post__portrait.has-ring {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--lm-danger), var(--lm-coral-400));
}

.lm-live-card__ring .lm-avatar,
.lm-live__host-ring .lm-avatar,
.lm-live-post__portrait.has-ring .lm-avatar {
  border: 2px solid var(--lm-media-bg);
}

.lm-live-post__portrait.has-ring .lm-avatar { border-color: var(--lm-surface); }

/* ==========================================================================
   Discovery
   ========================================================================== */

.lm-live-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--lm-space-4);
  padding: var(--lm-space-6);
  border-radius: var(--lm-radius-lg);
  background:
    radial-gradient(120% 180% at 12% 0%, color-mix(in srgb, var(--lm-primary) 16%, transparent), transparent 55%),
    var(--lm-surface);
  border: 1px solid var(--lm-card-border);
  box-shadow: var(--lm-shadow-sm);
}

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

.lm-live-hero__title {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  margin: 0;
  font-size: var(--lm-text-2xl);
}

.lm-live-hero__mark {
  display: inline-grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: var(--lm-radius-md);
  background: var(--lm-gradient);
  color: var(--lm-on-gradient);
}

.lm-live-hero__mark svg { inline-size: 22px; block-size: 22px; }

.lm-live-hero__lead {
  margin: 0;
  color: var(--lm-text-secondary);
}

.lm-live-hero__go {
  background: var(--lm-gradient);
  color: var(--lm-on-gradient);
  border: 0;
  box-shadow: var(--lm-shadow-md);
}

.lm-live-hero__go:hover {
  background: var(--lm-gradient);
  color: var(--lm-on-gradient);
  filter: brightness(1.06);
}

.lm-live-discover {
  gap: var(--lm-space-4);
}

.lm-live-empty { padding: var(--lm-space-2); }

.lm-live-discover__tabs {
  margin-block-end: 0;
  max-inline-size: 420px;
}

.lm-live-discover__note {
  margin: 0;
  padding-inline: var(--lm-space-2);
  color: var(--lm-subtle);
  font-size: var(--lm-text-sm);
}

.lm-live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: var(--lm-space-4);
}

/* -- one live on a card --------------------------------------------------- */

.lm-live-card {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  background-color: var(--lm-surface);
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-lg);
  box-shadow: var(--lm-shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--lm-normal), transform var(--lm-normal);
}

.lm-live-card:hover {
  box-shadow: var(--lm-shadow-lg);
  transform: translateY(-2px);
}

.lm-live-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--lm-gradient);
  overflow: hidden;
}

.lm-live-card__cover {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  transition: transform var(--lm-slow);
}

.lm-live-card:hover .lm-live-card__cover { transform: scale(1.04); }

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

.lm-live-card__marks {
  position: absolute;
  inset-block-start: var(--lm-space-2);
  inset-inline: var(--lm-space-2);
  display: flex;
  justify-content: space-between;
  gap: var(--lm-space-2);
}

.lm-live-card__scrim {
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  padding: var(--lm-space-5) var(--lm-space-3) var(--lm-space-2);
  background: linear-gradient(to top, color-mix(in srgb, var(--lm-media-bg) 78%, transparent), transparent);
  color: var(--lm-on-scrim);
}

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

.lm-live-card__name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
}

.lm-live-card__handle {
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--lm-text-xs);
  opacity: 0.85;
}

.lm-live-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-1);
  padding: var(--lm-space-3) var(--lm-space-4) var(--lm-space-4);
  min-inline-size: 0;
}

.lm-live-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--lm-text);
  font-weight: var(--lm-weight-bold);
  line-height: var(--lm-leading-snug);
  overflow-wrap: anywhere;
}

.lm-live-card__title:hover { color: var(--lm-primary-text); }

.lm-live-card__text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  margin: 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  overflow-wrap: anywhere;
}

/* The compact tile the home strip scrolls sideways. */
.lm-live-card--compact {
  inline-size: 150px;
  flex-shrink: 0;
  border-radius: var(--lm-radius-md);
}

.lm-live-card--compact .lm-live-card__media { aspect-ratio: 9 / 13; }

.lm-live-card--compact .lm-live-card__scrim { padding-block-end: var(--lm-space-2); }

.lm-live-card--compact .lm-live-card__ring { display: none; }

/* The skeleton the script shows while the next page loads. */
.lm-live-card--skeleton .lm-live-card__media {
  position: static;
  aspect-ratio: 16 / 9;
  border-radius: 0;
}

/* ==========================================================================
   The "Live now" strip on home
   ========================================================================== */

.lm-live-strip { overflow: hidden; }

.lm-live-strip__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-live-strip__title {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  font-size: var(--lm-text-lg);
}

.lm-live-strip__mark {
  inline-size: 10px;
  block-size: 10px;
  border-radius: 50%;
  background-color: var(--lm-danger);
  animation: lm-live-pulse 1.6s ease-out infinite;
}

.lm-live-strip__all {
  color: var(--lm-primary-text);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
}

.lm-live-strip__scroller {
  display: flex;
  gap: var(--lm-space-3);
  padding: var(--lm-space-2) var(--lm-space-5) var(--lm-space-4);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
}

.lm-live-strip__scroller > .lm-live-card { scroll-snap-align: start; }

/* ==========================================================================
   The live card in the FEED (a live's post row)
   ========================================================================== */

.lm-live-post { overflow: hidden; }

.lm-live-post__head { padding: var(--lm-space-4) var(--lm-space-5) var(--lm-space-3); }

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

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

.lm-live-post__dot {
  position: absolute;
  inset-block-end: -4px;
  inset-inline-start: 50%;
  translate: -50% 0;
  padding: 1px 5px;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-danger-strong);
  border: 2px solid var(--lm-surface);
  color: var(--lm-on-danger);
  font-size: 9px;
  font-weight: var(--lm-weight-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

html[dir="rtl"] .lm-live-post__dot { translate: 50% 0; }

.lm-live-post__name-block {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
}

.lm-live-post__name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-inline-size: 0;
  font-weight: var(--lm-weight-bold);
}

.lm-live-post__name:hover { color: var(--lm-primary-text); }

.lm-live-post__page-tag {
  padding: 1px 8px;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-surface-2);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-medium);
}

.lm-live-post__kicker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

.lm-live-post.is-live .lm-live-post__kicker { color: var(--lm-danger-text); font-weight: var(--lm-weight-semibold); }

.lm-live-post__privacy svg { inline-size: 14px; block-size: 14px; vertical-align: -2px; }

.lm-live-post__stage {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--lm-gradient);
  overflow: hidden;
}

.lm-live-post__cover {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  transition: transform var(--lm-slow);
}

.lm-live-post__stage:hover .lm-live-post__cover { transform: scale(1.03); }

.lm-live-post.is-over .lm-live-post__cover { filter: grayscale(0.35) brightness(0.75); }

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

.lm-live-post.is-over .lm-live-post__backdrop { filter: brightness(0.8); }

.lm-live-post__marks {
  position: absolute;
  inset-block-start: var(--lm-space-3);
  inset-inline: var(--lm-space-3);
  display: flex;
  justify-content: space-between;
  gap: var(--lm-space-2);
}

.lm-live-post__play {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  inline-size: 62px;
  block-size: 62px;
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--lm-media-bg) 45%, transparent);
  color: var(--lm-on-scrim);
  backdrop-filter: blur(4px);
  transition: transform var(--lm-fast), background-color var(--lm-fast);
}

html[dir="rtl"] .lm-live-post__play { translate: 50% -50%; }

.lm-live-post__stage:hover .lm-live-post__play {
  transform: scale(1.08);
  background-color: color-mix(in srgb, var(--lm-media-bg) 60%, transparent);
}

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

.lm-live-post__body {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-1);
  padding: var(--lm-space-3) var(--lm-space-5) 0;
  min-inline-size: 0;
}

.lm-live-post__title {
  color: var(--lm-text);
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-bold);
  line-height: var(--lm-leading-snug);
  overflow-wrap: anywhere;
}

.lm-live-post__title:hover { color: var(--lm-primary-text); }

.lm-live-post__text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0;
  color: var(--lm-text-secondary);
  overflow-wrap: anywhere;
}

.lm-live-post__foot { padding: var(--lm-space-3) var(--lm-space-5) var(--lm-space-4); }

.lm-live-post__cta {
  inline-size: 100%;
  justify-content: center;
}

.lm-live-post.is-live .lm-live-post__cta {
  background: var(--lm-gradient);
  color: var(--lm-on-gradient);
  border: 0;
}

.lm-live-post.is-live .lm-live-post__cta:hover { filter: brightness(1.06); }

/* ==========================================================================
   The watch page and the studio share the frame
   ========================================================================== */

.lm-live {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: var(--lm-space-5);
  align-items: start;
}

.lm-live__stage {
  position: relative;
  inline-size: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--lm-radius-lg);
  overflow: hidden;
  background-color: var(--lm-media-bg);
  color: var(--lm-on-scrim);
}

@media (min-width: 768px) {
  .lm-live__stage {
    position: sticky;
    inset-block-start: calc(var(--lm-header-height) + var(--lm-space-4));
  }
}

.lm-live__video,
.lm-live__poster {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
}

.lm-live__poster {
  z-index: 0;
  object-fit: cover;
  filter: blur(2px) brightness(0.7);
  transition: opacity var(--lm-slow);
}

.lm-live__video { z-index: 1; }

.lm-live__video video,
.lm-live__video > div {
  inline-size: 100% !important;
  block-size: 100% !important;
}

.lm-live.has-video .lm-live__poster { opacity: 0; }

/* The stage's standing states: what to do, waiting, connecting, over. */
.lm-live__placeholder,
.lm-live__cover-state {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-6);
  text-align: center;
}

.lm-live__state-disc {
  display: inline-grid;
  place-items: center;
  inline-size: 56px;
  block-size: 56px;
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--lm-on-scrim) 12%, transparent);
}

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

.lm-live__state-disc--spin svg { animation: lm-spin 1.2s linear infinite; }

.lm-live__placeholder p,
.lm-live__cover-state p {
  margin: 0;
  max-inline-size: 34ch;
  line-height: var(--lm-leading-snug);
}

.lm-live__cover-state {
  background-color: color-mix(in srgb, var(--lm-media-bg) 72%, transparent);
}

.lm-live__cover-state--soft {
  inset: auto 0 auto 0;
  inset-block-start: 50%;
  translate: 0 -50%;
  padding-block: var(--lm-space-4);
}

.lm-live__ended-title {
  font-size: var(--lm-text-xl);
  font-weight: var(--lm-weight-bold);
}

.lm-live__ended-text { opacity: 0.85; }

/* -- along the top --------------------------------------------------------- */

.lm-live__top {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  padding: var(--lm-space-3);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--lm-media-bg) 62%, transparent), transparent);
  pointer-events: none;
}

.lm-live__top > * { pointer-events: auto; }

.lm-live__top-marks {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin-inline-start: auto;
}

.lm-live__back,
.lm-live__action {
  display: inline-grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--lm-media-bg) 45%, transparent);
  color: var(--lm-on-scrim);
  cursor: pointer;
  transition: background-color var(--lm-fast), transform var(--lm-fast);
}

.lm-live__back:hover,
.lm-live__action:hover { background-color: color-mix(in srgb, var(--lm-media-bg) 65%, transparent); }

.lm-live__action:active { transform: scale(0.92); }

.lm-live__back svg,
.lm-live__action svg {
  inline-size: 20px;
  block-size: 20px;
}

.lm-live__action--heart { color: var(--lm-rx-red); }

.lm-live__back:focus-visible,
.lm-live__action:focus-visible {
  outline: 2px solid var(--lm-on-scrim);
  outline-offset: 2px;
}

.lm-live__host {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  min-inline-size: 0;
  color: inherit;
  font-weight: var(--lm-weight-semibold);
}

.lm-live__top .lm-live__host {
  flex: 0 1 auto;
  text-shadow: 0 1px 2px color-mix(in srgb, var(--lm-media-bg) 60%, transparent);
}

.lm-live__host-lines {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  line-height: var(--lm-leading-tight);
}

.lm-live__host-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-live__host-handle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-regular);
  opacity: 0.8;
}

.lm-live__host--plain { color: var(--lm-text); text-shadow: none; }

/* The top bar's follow: shown on a phone, where the panel is off-screen;
   the panel's copy serves a desktop. luma.js keeps the two in step. */
.lm-live__top-follow { display: none; }

/* -- down the end side ----------------------------------------------------- */

.lm-live__side-actions {
  position: absolute;
  inset-block-end: var(--lm-space-4);
  inset-inline-end: var(--lm-space-3);
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
}

.lm-live__sound {
  position: absolute;
  inset-block-end: var(--lm-space-4);
  inset-inline-start: 50%;
  translate: -50% 0;
  z-index: 4;
}

html[dir="rtl"] .lm-live__sound { translate: 50% 0; }

.lm-live__notice {
  position: absolute;
  inset-block-end: var(--lm-space-4);
  inset-inline: var(--lm-space-4);
  z-index: 5;
  margin: 0;
  margin-inline: auto;
  inline-size: fit-content;
  max-inline-size: calc(100% - var(--lm-space-8));
  padding: var(--lm-space-2) var(--lm-space-4);
  border-radius: var(--lm-radius-pill);
  background-color: color-mix(in srgb, var(--lm-media-bg) 72%, transparent);
  color: var(--lm-on-scrim);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  text-align: center;
}

/* Hearts rise from the heart button and fade. */
.lm-live__hearts {
  position: absolute;
  inset-block: 30% var(--lm-space-16);
  inset-inline-end: 0;
  z-index: 3;
  inline-size: 80px;
  pointer-events: none;
  overflow: hidden;
}

.lm-live-heart {
  position: absolute;
  inset-block-end: 0;
  color: var(--lm-rx-red);
  animation: lm-live-heart 2.3s var(--lm-ease-out) forwards;
}

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

@keyframes lm-live-heart {
  0%   { transform: translateY(0) scale(0.6); opacity: 0; }
  12%  { transform: translateY(-12%) scale(1.1); opacity: 1; }
  100% { transform: translateY(-420%) scale(0.9); opacity: 0; }
}

/* ==========================================================================
   The panel: tabs, chat, about
   ========================================================================== */

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

.lm-live-panel {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  overflow: hidden;
}

.lm-live-panel__tabs {
  padding-inline: var(--lm-space-2);
}

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

.lm-live-panel__tabs .lm-tab svg { inline-size: 16px; block-size: 16px; }

.lm-live-panel__pane {
  display: flex;
  flex-direction: column;
  min-block-size: 0;
}

/* Inside the panel the chat sheds its own card skin: the panel is the card,
   and the tab row is its header. */
.lm-live-panel .lm-live-chat {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  block-size: 460px;
}

.lm-live-panel .lm-live-chat__head { display: none; }

.lm-live-about {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4) var(--lm-space-5) var(--lm-space-5);
}

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

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

.lm-live-about__title {
  margin: 0;
  font-size: var(--lm-text-lg);
  line-height: var(--lm-leading-snug);
  overflow-wrap: anywhere;
}

.lm-live-about__text {
  margin: 0;
  color: var(--lm-text-secondary);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.lm-live-about__follow { flex-shrink: 0; }

.lm-live-about__facts {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  margin: 0;
  padding-block-start: var(--lm-space-3);
  border-block-start: 1px solid var(--lm-border);
}

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

.lm-live-about__fact dt {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

.lm-live-about__fact dt svg { inline-size: 16px; block-size: 16px; }

.lm-live-about__fact dd {
  margin: 0;
  font-weight: var(--lm-weight-semibold);
}

/* -- the chat -------------------------------------------------------------- */

.lm-live-chat {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  block-size: 440px;
  background-color: var(--lm-surface);
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-lg);
  box-shadow: var(--lm-shadow-sm);
  overflow: hidden;
}

.lm-live-chat__head {
  padding: var(--lm-space-3) var(--lm-space-4);
  border-block-end: 1px solid var(--lm-border);
}

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

.lm-live-chat__title svg {
  inline-size: 18px;
  block-size: 18px;
}

.lm-live-chat__list {
  flex: 1 1 auto;
  min-block-size: 0;
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  padding: var(--lm-space-3) var(--lm-space-4);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.lm-live-chat__empty,
.lm-live-chat__closed {
  margin: 0;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
}

.lm-live-chat__empty { margin-block: auto; text-align: center; }

.lm-live-chat__closed { padding: var(--lm-space-2) var(--lm-space-4); }

.lm-live-comment {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-2);
  min-inline-size: 0;
}

/* Parent-qualified: components.css (loaded after this file) sizes .lm-avatar,
   and an equally specific rule here would lose to it. */
.lm-live-comment .lm-live-comment__avatar {
  inline-size: 28px;
  block-size: 28px;
  flex-shrink: 0;
  font-size: var(--lm-text-xs);
}

/* The line is a quiet bubble, so a fast chat reads as turns rather than as
   one column of text. */
.lm-live-comment__body {
  flex: 1 1 auto;
  min-inline-size: 0;
  padding: var(--lm-space-1) var(--lm-space-3);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-2);
  font-size: var(--lm-text-sm);
  line-height: var(--lm-leading-snug);
  overflow-wrap: anywhere;
}

.lm-live-comment__name {
  margin-inline-end: 6px;
  font-weight: var(--lm-weight-bold);
}

.lm-live-comment__tools {
  display: inline-flex;
  flex-shrink: 0;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--lm-fast);
}

.lm-live-comment:hover .lm-live-comment__tools,
.lm-live-comment:focus-within .lm-live-comment__tools { opacity: 1; }

@media (hover: none) {
  .lm-live-comment__tools { opacity: 1; }
}

.lm-live-comment__tool {
  display: inline-grid;
  place-items: center;
  inline-size: 28px;
  block-size: 28px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--lm-muted);
  cursor: pointer;
}

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

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

.lm-live-chat__form {
  display: flex;
  gap: var(--lm-space-2);
  padding: var(--lm-space-3) var(--lm-space-4);
  border-block-start: 1px solid var(--lm-border);
}

.lm-live-chat__input {
  flex: 1 1 auto;
  min-inline-size: 0;
  border-radius: var(--lm-radius-pill);
}

/* Parent-qualified for the same reason: .lm-btn's own padding (components.css)
   would otherwise squeeze the icon to a sliver. */
.lm-live-chat__form .lm-live-chat__send {
  flex-shrink: 0;
  inline-size: 44px;
  padding-inline: 0;
  border-radius: 50%;
}

.lm-live-chat__form .lm-live-chat__send svg {
  inline-size: 18px;
  block-size: 18px;
  flex-shrink: 0;
}

/* ==========================================================================
   The studio
   ========================================================================== */

.lm-live--studio .lm-live-chat { block-size: 360px; }

/* The cover is chosen where it will sit. */
.lm-live__cover-pick {
  position: absolute;
  inset-block-end: var(--lm-space-3);
  inset-inline-start: var(--lm-space-3);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  padding: var(--lm-space-2) var(--lm-space-3);
  border-radius: var(--lm-radius-pill);
  background-color: color-mix(in srgb, var(--lm-media-bg) 55%, transparent);
  color: var(--lm-on-scrim);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  cursor: pointer;
  transition: background-color var(--lm-fast);
}

.lm-live__cover-pick:hover { background-color: color-mix(in srgb, var(--lm-media-bg) 75%, transparent); }

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

.lm-live__cover-thumb {
  display: inline-grid;
  inline-size: 34px;
  block-size: 22px;
  border-radius: var(--lm-radius-xs);
  overflow: hidden;
}

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

/* On air, and once over, the set-up chrome leaves the stage. */
.lm-live--studio.is-on-air .lm-live__cover-pick,
.lm-live--studio.is-over .lm-live__cover-pick { display: none; }

.lm-live-setup__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--lm-space-4) var(--lm-space-5) 0;
}

.lm-live-setup__head .lm-help { margin: 0; }

.lm-live-setup__title {
  margin: 0;
  font-size: var(--lm-text-xl);
}

.lm-live-setup__body {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-4);
  padding: var(--lm-space-4) var(--lm-space-5) var(--lm-space-5);
}

.lm-live-setup__group {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

/* Who is going live: portrait chips, one ticked. */
.lm-live-idpick {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
}

.lm-live-idpick__chip { display: block; cursor: pointer; }

.lm-live-idpick__chip input {
  position: absolute;
  opacity: 0;
}

.lm-live-idpick__face {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-2) var(--lm-space-3);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-md);
  transition: border-color var(--lm-fast), background-color var(--lm-fast);
}

.lm-live-idpick__chip:hover .lm-live-idpick__face { border-color: var(--lm-border-strong); }

.lm-live-idpick__chip input:checked + .lm-live-idpick__face {
  border-color: var(--lm-primary);
  background-color: var(--lm-primary-soft);
}

.lm-live-idpick__chip input:focus-visible + .lm-live-idpick__face {
  outline: 2px solid var(--lm-focus-ring);
  outline-offset: 2px;
}

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

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

.lm-live-idpick__kind {
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

.lm-live-idpick__tick {
  display: inline-grid;
  margin-inline-start: auto;
  color: var(--lm-primary-text);
  opacity: 0;
  transition: opacity var(--lm-fast);
}

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

.lm-live-idpick__chip input:checked + .lm-live-idpick__face .lm-live-idpick__tick { opacity: 1; }

/* Who may watch: the same chip idea, two choices. */
.lm-live-audience {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
}

.lm-live-audience__choice { display: block; cursor: pointer; }

.lm-live-audience__choice input {
  position: absolute;
  opacity: 0;
}

.lm-live-audience__face {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-3);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-md);
  transition: border-color var(--lm-fast), background-color var(--lm-fast);
}

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

.lm-live-audience__choice:hover .lm-live-audience__face { border-color: var(--lm-border-strong); }

.lm-live-audience__choice input:checked + .lm-live-audience__face {
  border-color: var(--lm-primary);
  background-color: var(--lm-primary-soft);
}

.lm-live-audience__choice input:checked + .lm-live-audience__face > svg { color: var(--lm-primary-text); }

.lm-live-audience__choice input:focus-visible + .lm-live-audience__face {
  outline: 2px solid var(--lm-focus-ring);
  outline-offset: 2px;
}

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

.lm-live-audience__name { font-weight: var(--lm-weight-semibold); }

.lm-live-audience__help {
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

/* Comments, hearts, mirror: a row each, the switch at its end. */
.lm-live-setup__switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lm-space-3);
  cursor: pointer;
}

.lm-live-setup__switch-text {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  min-inline-size: 0;
}

.lm-live-setup__switch-text svg {
  inline-size: 18px;
  block-size: 18px;
  color: var(--lm-text-secondary);
}

.lm-live-setup,
.lm-live-resume,
.lm-live-devices {
  min-inline-size: 0;
}

.lm-live-devices__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--lm-space-3);
}

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

.lm-live__go {
  flex: 1 1 auto;
  background: var(--lm-gradient);
  color: var(--lm-on-gradient);
  border: 0;
  box-shadow: var(--lm-shadow-md);
}

.lm-live__go:hover:not(:disabled) {
  background: var(--lm-gradient);
  color: var(--lm-on-gradient);
  filter: brightness(1.06);
}

.lm-live__go:disabled { box-shadow: none; }

.lm-live__note { margin: 0; }

/* -- the ended summary ------------------------------------------------------ */

.lm-live-summary {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-4);
  padding: var(--lm-space-5);
}

.lm-live-summary__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--lm-space-2);
  text-align: center;
}

.lm-live-summary__head .lm-live__state-disc {
  background-color: var(--lm-success-soft);
  color: var(--lm-success-text);
}

.lm-live-summary__head .lm-help { margin: 0; }

.lm-live-summary__title {
  margin: 0;
  font-size: var(--lm-text-xl);
}

.lm-live-summary__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--lm-space-2);
  margin: 0;
}

.lm-live-summary__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--lm-space-1);
  padding: var(--lm-space-3);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-2);
  text-align: center;
}

.lm-live-summary__stat dt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-medium);
}

.lm-live-summary__stat dt svg { inline-size: 14px; block-size: 14px; }

.lm-live-summary__stat dd {
  margin: 0;
  font-size: var(--lm-text-lg);
  font-weight: var(--lm-weight-bold);
}

.lm-live-summary__note {
  margin: 0;
  text-align: center;
}

.lm-live-summary > .lm-btn { align-self: center; }

/* ==========================================================================
   Tablets
   ========================================================================== */

@media (max-width: 1119px) {
  .lm-live { grid-template-columns: minmax(0, 1fr) minmax(280px, 330px); gap: var(--lm-space-4); }
}

/* ==========================================================================
   Phones
   ========================================================================== */

@media (max-width: 767px) {
  .lm-live {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--lm-space-3);
  }

  .lm-live__stage {
    border-radius: var(--lm-radius-md);
  }

  .lm-live-hero { padding: var(--lm-space-4); }

  .lm-live-hero__go { inline-size: 100%; justify-content: center; }

  /* The studio: a tall preview, the form under it. */
  .lm-live--studio .lm-live__stage {
    aspect-ratio: 3 / 4;
    max-block-size: 62dvh;
  }

  .lm-live--studio.is-on-air .lm-live__stage {
    aspect-ratio: auto;
    block-size: calc(100dvh - var(--lm-header-height) - var(--lm-bottom-nav) - var(--lm-space-12));
    min-block-size: 360px;
    max-block-size: none;
  }

  /* Watching: the video fills the screen and the chat lies over its lower
     part. The panel steps aside (display: contents) so the stage and the
     panel's card are one grid: stage and panel share the first row. */
  .lm-live--watch .lm-live__panel { display: contents; }

  .lm-live--watch .lm-live__stage {
    grid-row: 1;
    grid-column: 1;
    aspect-ratio: auto;
    block-size: calc(100dvh - var(--lm-header-height) - var(--lm-bottom-nav) - var(--lm-space-6));
    min-block-size: 440px;
  }

  .lm-live--watch .lm-live-panel {
    grid-row: 1;
    grid-column: 1;
    align-self: end;
    z-index: 2;
    background: none;
    border: 0;
    box-shadow: none;
    /* The box spans the video; only its own lines take a touch, so the
       heart and share beside them stay reachable. */
    pointer-events: none;
  }

  .lm-live--watch .lm-live-panel__tabs { display: none; }

  .lm-live--watch .lm-live-panel__pane[data-lm-live-panel="about"] { display: none; }

  /* The pane the phone shows is always the chat, whatever tab a desktop
     had chosen before the rotation. */
  .lm-live--watch .lm-live-panel__pane[data-lm-live-panel="chat"] { display: flex !important; }

  .lm-live--watch .lm-live-chat {
    block-size: auto;
    max-block-size: 46dvh;
    padding-inline-end: 60px;
    border: 0;
    border-radius: 0 0 var(--lm-radius-md) var(--lm-radius-md);
    box-shadow: none;
    background: linear-gradient(to top, color-mix(in srgb, var(--lm-media-bg) 70%, transparent), transparent);
    color: var(--lm-on-scrim);
    pointer-events: none;
  }

  .lm-live--watch .lm-live-chat__list,
  .lm-live--watch .lm-live-chat__form,
  .lm-live--watch .lm-live-chat__closed { pointer-events: auto; }

  .lm-live--watch .lm-live-chat__head { display: none; }

  .lm-live--watch .lm-live-chat__list {
    padding-block-start: var(--lm-space-8);
    mask-image: linear-gradient(to bottom, transparent, var(--lm-media-bg) 28%);
    -webkit-mask-image: linear-gradient(to bottom, transparent, var(--lm-media-bg) 28%);
  }

  .lm-live--watch .lm-live-chat__empty { display: none; }

  /* Over the video the bubbles carry their own scrim. */
  .lm-live--watch .lm-live-comment__body {
    background-color: color-mix(in srgb, var(--lm-media-bg) 45%, transparent);
    color: var(--lm-on-scrim);
  }

  .lm-live--watch .lm-live-chat__closed {
    color: var(--lm-on-scrim);
    text-shadow: 0 1px 2px color-mix(in srgb, var(--lm-media-bg) 80%, transparent);
  }

  .lm-live--watch .lm-live-chat__form { border: 0; }

  .lm-live--watch .lm-live-chat__input {
    border-color: transparent;
    background-color: color-mix(in srgb, var(--lm-on-scrim) 16%, transparent);
    color: var(--lm-on-scrim);
  }

  .lm-live--watch .lm-live-chat__input::placeholder { color: color-mix(in srgb, var(--lm-on-scrim) 75%, transparent); }

  /* The follow rides the top bar here; the panel's copy is off-screen.
     The host's name yields before the pills do. */
  .lm-live--watch .lm-live__top-follow { display: inline-flex; }

  .lm-live--watch .lm-live__top .lm-live__host { flex: 1 1 0; min-inline-size: 0; }

  .lm-live--watch .lm-live__top-marks { margin-inline-start: 0; flex-shrink: 0; }

  .lm-live--watch .lm-live__host-handle { display: none; }

  /* Over the chat's list, not under it: the actions sit above the form. */
  .lm-live--watch .lm-live__side-actions { inset-block-end: 76px; }

  .lm-live--watch .lm-live__hearts { inset-block-end: 200px; }

  .lm-live--watch .lm-live__notice { inset-block-end: auto; inset-block-start: 64px; }

  .lm-live-grid { grid-template-columns: minmax(0, 1fr); }

  .lm-live-strip__head { padding-inline: var(--lm-space-4); }

  .lm-live-strip__scroller { padding-inline: var(--lm-space-4); }

  .lm-live-post__head,
  .lm-live-post__body { padding-inline: var(--lm-space-4); }

  .lm-live-post__foot { padding-inline: var(--lm-space-4); }
}

@media (min-width: 480px) and (max-width: 767px) {
  .lm-live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .lm-live-heart { animation: none; opacity: 0; }

  .lm-live-badge--pulse::before,
  .lm-live-chip__dot,
  .lm-live-strip__mark { animation: none; }

  .lm-live-card:hover { transform: none; }
}

/* ==========================================================================
   Phase 37.2. Live Gifts — the layer over the video, the gift sheet, the
   supporters, the studio's strip and summary, and a creator's earnings
   --------------------------------------------------------------------------
   Money is always text (never a colour alone); a gift's price, a total and
   an amount sit in .lm-num. Animations stop with reduced motion.
   ========================================================================== */

/* -- a gift's icon: a re-encoded picture, or an emoji -------------------- */

.lm-gift-icon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  object-fit: contain;
}

.lm-gift-icon--sm { inline-size: 24px; block-size: 24px; font-size: 20px; line-height: 1; }
.lm-gift-icon--md { inline-size: 48px; block-size: 48px; font-size: 38px; line-height: 1; }
.lm-gift-icon--lg { inline-size: 160px; block-size: 160px; font-size: 128px; line-height: 1; }
.lm-gift-icon--glyph { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }

/* -- the rail's buttons --------------------------------------------------- */

.lm-live__action--gift { color: var(--lm-rx-yellow); }
.lm-live__action--supporters { display: none; color: var(--lm-rx-yellow); }

/* -- the layer over the video -------------------------------------------- */

.lm-live-gifts {
  position: absolute;
  inset-inline-start: var(--lm-space-3);
  inset-block-start: 72px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-2);
  max-inline-size: min(320px, calc(100% - 96px));
  pointer-events: none;
}

.lm-live-gift-toast {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  padding: 4px var(--lm-space-3) 4px 4px;
  border-radius: var(--lm-radius-pill);
  background: linear-gradient(90deg, color-mix(in srgb, var(--lm-media-bg) 78%, transparent), color-mix(in srgb, var(--lm-media-bg) 30%, transparent));
  color: var(--lm-on-scrim);
  box-shadow: var(--lm-shadow-sm);
  animation: lm-gift-in var(--lm-normal) var(--lm-ease-out) both;
}

.lm-live-gift-toast.is-leaving { animation: lm-gift-out 300ms var(--lm-ease) both; }
.lm-live-gift-toast.is-bump .lm-live-gift-toast__count { animation: lm-gift-bump 320ms var(--lm-ease-out); }

.lm-live-gift-toast__avatar { display: inline-flex; flex-shrink: 0; }

.lm-live-gift-toast .lm-live-gift-toast__face {
  inline-size: 32px;
  block-size: 32px;
  font-size: var(--lm-text-sm);
}

.lm-live-gift-toast__text {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  line-height: 1.15;
}

.lm-live-gift-toast__who {
  font-weight: var(--lm-weight-semibold);
  font-size: var(--lm-text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-live-gift-toast__what {
  font-size: var(--lm-text-xs);
  opacity: 0.9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-live-gift-toast__icon { display: inline-flex; }

.lm-live-gift-toast__count {
  font-weight: var(--lm-weight-bold);
  font-size: var(--lm-text-lg);
  color: var(--lm-rx-yellow);
  font-style: italic;
}

.lm-live-gift-stage {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.lm-live-gift-big {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--lm-space-2);
  animation: lm-gift-big-in 520ms var(--lm-ease-out) both;
}

.lm-live-gift-big.is-leaving { animation: lm-gift-out 420ms var(--lm-ease) both; }

.lm-live-gift-big__art {
  display: grid;
  place-items: center;
  inline-size: min(220px, 48vw);
  block-size: min(220px, 48vw);
}

.lm-live-gift-big__art img:not(.lm-gift-icon) {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
}

.lm-live-gift-big__line {
  padding: 4px var(--lm-space-3);
  border-radius: var(--lm-radius-pill);
  background-color: color-mix(in srgb, var(--lm-media-bg) 70%, transparent);
  color: var(--lm-on-scrim);
  font-weight: var(--lm-weight-semibold);
  font-size: var(--lm-text-sm);
}

@keyframes lm-gift-in {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: none; }
}

html[dir="rtl"] .lm-live-gift-toast { animation-name: lm-gift-in-rtl; }

@keyframes lm-gift-in-rtl {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: none; }
}

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

@keyframes lm-gift-bump {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.45); }
  100% { transform: scale(1); }
}

@keyframes lm-gift-big-in {
  0%   { opacity: 0; transform: scale(0.4); }
  70%  { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

/* -- the gift sheet -------------------------------------------------------- */

/* Qualified: components.css (loaded after this file) sizes every dialog. */
.lm-modal--sheet .lm-live-gift-sheet__dialog {
  display: flex;
  flex-direction: column;
  max-inline-size: 520px;
  padding: 0;
  overflow: hidden;
}

.lm-live-gift-sheet__head {
  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-live-gift-sheet__title {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  margin-inline-end: auto;
  font-size: var(--lm-text-lg);
  font-weight: var(--lm-weight-bold);
}

.lm-live-gift-sheet__title svg { inline-size: 22px; block-size: 22px; color: var(--lm-primary-text); }

.lm-live-gift-sheet__balance {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-1);
  padding: 2px 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-semibold);
}

.lm-live-gift-sheet__balance svg { inline-size: 16px; block-size: 16px; }

.lm-live-gift-sheet__close { flex-shrink: 0; }

.lm-live-gift-sheet__body {
  flex: 1 1 auto;
  min-block-size: 0;
  max-block-size: min(52vh, 420px);
  overflow-y: auto;
  padding: var(--lm-space-3) var(--lm-space-4);
}

/* Qualified: the segment's own margin (components.css) comes later. */
.lm-segment.lm-live-gift-sheet__tabs { margin-block-end: var(--lm-space-3); overflow-x: auto; }
.lm-live-gift-sheet__tabs .lm-segment__item { min-block-size: 36px; font-size: var(--lm-text-sm); }

.lm-live-gift-sheet__empty { margin: var(--lm-space-6) 0; color: var(--lm-muted); text-align: center; }

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

.lm-live-gift-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-inline-size: 0;
  padding: var(--lm-space-2) var(--lm-space-1);
  border: 2px solid transparent;
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text);
  cursor: pointer;
  transition: border-color var(--lm-fast), transform var(--lm-fast);
}

.lm-live-gift-tile:hover { transform: translateY(-2px); }

.lm-live-gift-tile.is-selected {
  border-color: var(--lm-primary);
  background-color: var(--lm-primary-soft);
}

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

.lm-live-gift-tile__art { display: grid; place-items: center; min-block-size: 52px; }

.lm-live-gift-tile__name {
  max-inline-size: 100%;
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lm-live-gift-tile__price { font-size: var(--lm-text-xs); color: var(--lm-text-secondary); }

.lm-live-gift-tile--large:not(.is-selected) { border-color: color-mix(in srgb, var(--lm-rx-yellow) 55%, transparent); }

.lm-live-gift-sheet__confirm {
  margin: 0 var(--lm-space-4) var(--lm-space-3);
  padding: var(--lm-space-3);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-secondary);
}

.lm-live-gift-sheet__confirm-title { margin: 0 0 var(--lm-space-1); font-weight: var(--lm-weight-bold); }
.lm-live-gift-sheet__confirm-text { margin: 0 0 var(--lm-space-3); }

.lm-live-gift-sheet__confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--lm-space-2);
}

.lm-live-gift-sheet__short {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0 var(--lm-space-4) var(--lm-space-3);
  color: var(--lm-danger-text);
  font-size: var(--lm-text-sm);
}

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

.lm-live-gift-sheet__foot {
  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-block-start: 1px solid var(--lm-card-border);
}

.lm-live-gift-sheet__qty { display: flex; flex-wrap: wrap; gap: 4px; }

.lm-live-gift-qty {
  min-inline-size: 44px;
  min-block-size: 32px;
  padding: 0 var(--lm-space-2);
  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;
}

.lm-live-gift-qty.is-active {
  border-color: var(--lm-primary);
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
}

.lm-live-gift-sheet__total {
  margin-inline-start: auto;
  font-weight: var(--lm-weight-bold);
}

.lm-live-gift-sheet .lm-live-gift-sheet__send { min-inline-size: 128px; justify-content: center; }

.lm-live-gift-sheet__combo {
  padding: 0 6px;
  border-radius: var(--lm-radius-pill);
  background-color: color-mix(in srgb, var(--lm-on-primary) 22%, transparent);
  font-weight: var(--lm-weight-bold);
}

/* -- the supporters ------------------------------------------------------- */

.lm-live-supporters { display: flex; flex-direction: column; gap: var(--lm-space-2); padding: var(--lm-space-2) 0; }

.lm-live-supporters__title {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-bold);
}

.lm-live-supporters__title svg { inline-size: 18px; block-size: 18px; color: var(--lm-badge-gold-fg); }
.lm-live-supporters__title--recent { margin-block-start: var(--lm-space-3); }

.lm-live-supporters__list,
.lm-live-gift-feed {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-live-supporters__empty { margin: 0; color: var(--lm-muted); font-size: var(--lm-text-sm); }
.lm-live-supporters__more { align-self: center; }

.lm-live-supporter {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  padding: 6px var(--lm-space-2);
  border-radius: var(--lm-radius-md);
}

.lm-live-supporter--top { background-color: var(--lm-surface-secondary); }

.lm-live-supporter__rank {
  flex-shrink: 0;
  inline-size: 26px;
  text-align: center;
  font-weight: var(--lm-weight-bold);
  color: var(--lm-text-secondary);
}

.lm-live-supporter--top .lm-live-supporter__rank { color: var(--lm-badge-gold-fg); }

.lm-live-supporter__who {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  flex: 1 1 auto;
  min-inline-size: 0;
  color: var(--lm-text);
  text-decoration: none;
}

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

.lm-live-supporter__figures {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  line-height: 1.2;
}

.lm-live-supporter__amount { font-weight: var(--lm-weight-bold); }
.lm-live-supporter__gifts { font-size: var(--lm-text-xs); color: var(--lm-muted); }

.lm-live-gift-feed__row {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  padding: 4px var(--lm-space-2);
  font-size: var(--lm-text-sm);
}

.lm-live-gift-feed__row .lm-live-gift-feed__face { inline-size: 24px; block-size: 24px; font-size: var(--lm-text-xs); }
.lm-live-gift-feed__who { font-weight: var(--lm-weight-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-inline-size: 40%; }
.lm-live-gift-feed__what { color: var(--lm-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-inline-size: 0; }
.lm-live-gift-feed__count { font-weight: var(--lm-weight-bold); }

/* -- the studio --------------------------------------------------------- */

/* A switch with a line of help under its name: the icon stays with the name. */
.lm-live-setup__switch-text--top { align-items: flex-start; }
.lm-live-setup__switch-text--top svg { margin-block-start: 2px; flex-shrink: 0; }
.lm-live-setup__switch-words { display: flex; flex-direction: column; gap: 2px; }
.lm-live-setup__switch-words .lm-help { margin: 0; font-size: var(--lm-text-xs); }

.lm-live-gift-totals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2) var(--lm-space-4);
  margin-block-end: var(--lm-space-3);
  padding: var(--lm-space-2) var(--lm-space-4);
}

.lm-live-gift-totals__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: var(--lm-weight-semibold);
}

.lm-live-gift-totals__item svg { inline-size: 18px; block-size: 18px; color: var(--lm-text-secondary); }
.lm-live-gift-totals__item--money { margin-inline-start: auto; color: var(--lm-success-text); }
.lm-live-gift-totals__item--money svg { color: var(--lm-success-text); }

.lm-live-summary__grid--gifts {
  margin-block-start: var(--lm-space-3);
  padding-block-start: var(--lm-space-3);
  border-block-start: 1px solid var(--lm-card-border);
}

.lm-live-summary__stat--strong dd { color: var(--lm-success-text); }

.lm-live-summary__earnings {
  display: inline-block;
  margin-block: var(--lm-space-2);
  color: var(--lm-primary-text);
  font-weight: var(--lm-weight-semibold);
}

/* -- a creator's earnings ------------------------------------------------- */

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

.lm-live-earnings__hero,
.lm-live-earnings__lives { padding: var(--lm-space-5); }

.lm-live-earnings__intro { min-inline-size: 0; }
.lm-live-earnings__intro .lm-help { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }

.lm-live-earnings__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0 0 var(--lm-space-1);
  font-size: var(--lm-text-xl);
}

.lm-live-earnings__title svg { inline-size: 26px; block-size: 26px; color: var(--lm-primary-text); }

.lm-live-earnings__figures {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--lm-space-3);
  margin: var(--lm-space-4) 0 0;
}

.lm-live-earnings__figure {
  padding: var(--lm-space-3);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-secondary);
}

.lm-live-earnings__figure dt { font-size: var(--lm-text-sm); color: var(--lm-text-secondary); }
.lm-live-earnings__figure dd { margin: 4px 0 0; font-size: var(--lm-text-lg); font-weight: var(--lm-weight-bold); }
.lm-live-earnings__figure--strong dd { color: var(--lm-success-text); }

.lm-live-earnings__note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2);
  margin: var(--lm-space-4) 0 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
}

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

.lm-live-earnings__subtitle {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0 0 var(--lm-space-3);
  font-size: var(--lm-text-lg);
}

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

.lm-live-earnings__list,
.lm-live-earnings__kinds { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }

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

.lm-live-earnings__link {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-3) 0;
  color: var(--lm-text);
  text-decoration: none;
}

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

.lm-live-earnings__row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2);
  font-weight: var(--lm-weight-semibold);
}

.lm-live-earnings__tag {
  padding: 0 var(--lm-space-2);
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-xs);
  font-weight: var(--lm-weight-semibold);
}

.lm-live-earnings__row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--lm-muted);
  font-size: var(--lm-text-sm);
}

.lm-live-earnings__row-money { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.lm-live-earnings__row-net { font-weight: var(--lm-weight-bold); color: var(--lm-success-text); }
.lm-live-earnings__row-gross { font-size: var(--lm-text-xs); color: var(--lm-muted); }

.lm-live-earnings__back {
  display: inline-flex;
  align-items: center;
  gap: var(--lm-space-2);
  color: var(--lm-text-secondary);
  font-weight: var(--lm-weight-semibold);
  text-decoration: none;
}

.lm-live-earnings__back svg { inline-size: 18px; block-size: 18px; }

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

.lm-live-earnings__kind + .lm-live-earnings__kind { border-block-start: 1px solid var(--lm-card-border); }
.lm-live-earnings__kind-art { display: inline-flex; }
.lm-live-earnings__kind-name { flex: 1 1 auto; font-weight: var(--lm-weight-semibold); }
.lm-live-earnings__kind-count { color: var(--lm-text-secondary); }
.lm-live-earnings__kind-gross { font-weight: var(--lm-weight-bold); }

/* -- phones: the gift sheet rises from the bottom, the video above it ---- */

@media (max-width: 767px) {
  /* Every dialog is already a bottom sheet here (responsive.css); this one
     stays short enough that the video keeps playing above it. */
  .lm-modal--sheet .lm-live-gift-sheet__dialog {
    max-inline-size: none;
    max-block-size: 72dvh;
  }

  .lm-live-gift-sheet__body { max-block-size: none; }

  .lm-live-gift-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .lm-live--watch .lm-live__action--supporters { display: inline-grid; }

  .lm-live-gifts { inset-block-start: 64px; max-inline-size: calc(100% - 84px); }

  .lm-live-gift-sheet__total { margin-inline-start: 0; }
  .lm-live-gift-sheet .lm-live-gift-sheet__send { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .lm-live-gift-toast,
  .lm-live-gift-toast.is-leaving,
  .lm-live-gift-big,
  .lm-live-gift-big.is-leaving,
  .lm-live-gift-toast.is-bump .lm-live-gift-toast__count { animation: none; }

  .lm-live-gift-tile:hover { transform: none; }
}

/* ==========================================================================
   Phase 38.0.1 — the home feed's modules: Reels, People you may know
   ========================================================================== */

.lm-feed-module { padding-block: var(--lm-space-3) var(--lm-space-2); }

.lm-feed-module__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lm-space-3);
  padding-inline: var(--lm-space-4) var(--lm-space-2);
  min-block-size: 40px;
}

.lm-feed-module__title {
  display: flex;
  align-items: center;
  gap: var(--lm-space-2);
  margin: 0;
  min-inline-size: 0;
  color: var(--lm-text);
  font-size: var(--lm-text-md);
  font-weight: var(--lm-weight-semibold);
  line-height: var(--lm-leading-tight);
}

.lm-feed-module__icon { display: inline-grid; place-items: center; inline-size: 22px; block-size: 22px; flex: none; }
.lm-feed-module__icon svg { inline-size: 20px; block-size: 20px; }
.lm-feed-module__more svg { inline-size: 20px; block-size: 20px; }

.lm-feed-module__foot {
  display: flex;
  justify-content: center;
  padding: var(--lm-space-1) var(--lm-space-4) var(--lm-space-2);
}

.lm-feed-module__all {
  padding: var(--lm-space-2) var(--lm-space-4);
  border-radius: var(--lm-radius-sm);
  color: var(--lm-primary-text);
  font-weight: var(--lm-weight-semibold);
  font-size: var(--lm-text-sm);
  text-decoration: none;
}

.lm-feed-module__all:hover { background: var(--lm-surface-secondary); text-decoration: none; }

/* -- a row that scrolls sideways ------------------------------------------ */

.lm-carousel { position: relative; }

.lm-carousel__track {
  display: flex;
  gap: var(--lm-space-2);
  padding: var(--lm-space-2) var(--lm-space-4) var(--lm-space-3);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--lm-space-4);
  scrollbar-width: none;
}

.lm-carousel__track::-webkit-scrollbar { display: none; }
.lm-carousel__track:focus-visible { outline: 2px solid var(--lm-focus-ring); outline-offset: -2px; border-radius: var(--lm-radius-md); }

.lm-carousel__nav {
  position: absolute;
  inset-block-start: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  margin-block-start: -30px;
  padding: 0;
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-pill);
  background: var(--lm-surface);
  color: var(--lm-text);
  box-shadow: var(--lm-shadow-md);
  cursor: pointer;
}

.lm-carousel__nav:hover { background: var(--lm-surface-secondary); }
.lm-carousel__nav:focus-visible { outline: 2px solid var(--lm-focus-ring); outline-offset: 2px; }
.lm-carousel__nav[hidden] { display: none; }
.lm-carousel__nav svg { inline-size: 22px; block-size: 22px; }
.lm-carousel__nav--next { inset-inline-end: var(--lm-space-3); }
.lm-carousel__nav--prev { inset-inline-start: var(--lm-space-3); }
/* "Previous" is the chevron turned round; in Arabic it already points the
   right way (the row starts at the right). */
.lm-carousel__nav--prev svg { transform: scaleX(-1); }
html[dir="rtl"] .lm-carousel__nav--prev svg { transform: none; }

/* A finger scrolls the row itself; the arrows are for a mouse or trackpad
   (a touch screen: no hover and a coarse pointer). */
@media (hover: none) and (pointer: coarse) {
  .lm-carousel__nav { display: none; }
}

/* -- People you may know: one card ---------------------------------------- */

.lm-pymk {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 156px;
  inline-size: 156px;
  overflow: hidden;
  border: 1px solid var(--lm-card-border);
  border-radius: var(--lm-radius-md);
  background: var(--lm-surface);
  scroll-snap-align: start;
}

.lm-pymk__photo-link { display: block; }

.lm-pymk .lm-avatar.lm-pymk__photo {
  display: grid;
  place-items: center;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 1 / 1;
  border-radius: 0;
  font-size: 56px;
  font-weight: var(--lm-weight-semibold);
}

.lm-pymk .lm-avatar.lm-pymk__photo img {
  inline-size: 100%;
  block-size: 100%;
  max-inline-size: none;
  object-fit: cover;
  border-radius: 0;
}

.lm-pymk__dismiss {
  position: absolute;
  inset-block-start: var(--lm-space-2);
  inset-inline-end: var(--lm-space-2);
  display: grid;
  place-items: center;
  inline-size: 32px;
  block-size: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--lm-radius-pill);
  background: color-mix(in srgb, #000 55%, transparent);
  color: #fff;
  cursor: pointer;
}

.lm-pymk__dismiss:hover { background: color-mix(in srgb, #000 70%, transparent); }
.lm-pymk__dismiss:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.lm-pymk__dismiss svg { inline-size: 18px; block-size: 18px; }

.lm-pymk__body {
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-1);
  flex: 1 1 auto;
  padding: var(--lm-space-2) var(--lm-space-3) var(--lm-space-3);
}

.lm-pymk__name {
  overflow: hidden;
  color: var(--lm-text);
  font-size: var(--lm-text-base);
  font-weight: var(--lm-weight-semibold);
  line-height: var(--lm-leading-tight);
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* Why they are here: up to two lines (a card is narrow, and "mutual
   connections" is longer than the reference's "mutual friends"), never cut
   mid-word; every card keeps the same height. */
.lm-pymk__why {
  display: flex;
  align-items: flex-start;
  gap: var(--lm-space-1);
  min-block-size: 2.5em;
  margin: 0 0 var(--lm-space-2);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  line-height: 1.25;
}

.lm-pymk__why-text {
  min-inline-size: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow-wrap: anywhere;
}

.lm-pymk__faces { display: inline-flex; flex: none; margin-block-start: 0.5px; }

.lm-pymk .lm-avatar.lm-pymk__face {
  inline-size: 18px;
  block-size: 18px;
  border: 1.5px solid var(--lm-surface);
  font-size: 9px;
}

.lm-pymk .lm-avatar.lm-pymk__face + .lm-avatar.lm-pymk__face { margin-inline-start: -6px; }

/* Follow: the site's button, drawn as the card's soft full-width one. */
.lm-pymk .lm-btn.lm-pymk__follow {
  inline-size: 100%;
  margin-block-start: auto;
  justify-content: center;
  gap: var(--lm-space-2);
  min-block-size: 36px;
  border-radius: var(--lm-radius-sm);
  background: var(--lm-primary-soft);
  color: var(--lm-primary-text);
  font-weight: var(--lm-weight-semibold);
}

.lm-pymk .lm-btn.lm-pymk__follow:hover { background: var(--lm-primary-soft-2); }
.lm-pymk .lm-btn.lm-pymk__follow.lm-follow--on { background: var(--lm-surface-secondary); color: var(--lm-text); }
/* The icon's own box is sized: a span sized by its content would squeeze an
   unsized svg (the Lm_Icon trap) — it drew 13 px here. */
.lm-pymk__icon { display: inline-grid; place-items: center; flex: none; inline-size: 18px; block-size: 18px; }
.lm-follow--on .lm-pymk__icon.lm-follow__on { display: inline-grid; }
.lm-follow--req .lm-pymk__icon.lm-follow__req { display: inline-grid; }
.lm-pymk__icon svg { inline-size: 18px; block-size: 18px; max-inline-size: none; }

/* -- Reels: one tile ------------------------------------------------------ */

.lm-reelcard {
  position: relative;
  flex: 0 0 156px;
  inline-size: 156px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: var(--lm-radius-md);
  background: var(--lm-media-bg);
  scroll-snap-align: start;
}

.lm-reelcard__link { position: absolute; inset: 0; display: block; }
.lm-reelcard__link:focus-visible { outline: 3px solid var(--lm-focus-ring); outline-offset: -3px; border-radius: var(--lm-radius-md); }

.lm-reelcard__poster {
  inline-size: 100%;
  block-size: 100%;
  max-inline-size: none;
  object-fit: cover;
  transition: transform var(--lm-normal) var(--lm-ease);
}

.lm-reelcard:hover .lm-reelcard__poster { transform: scale(1.03); }
.lm-reelcard--sensitive .lm-reelcard__poster { filter: blur(18px); transform: scale(1.1); }

.lm-reelcard__sensitive {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--lm-space-2);
  padding: var(--lm-space-3);
  color: #fff;
  font-size: var(--lm-text-sm);
  text-align: center;
}

.lm-reelcard__sensitive svg { inline-size: 24px; block-size: 24px; }

.lm-reelcard__more {
  position: absolute;
  inset-block-start: var(--lm-space-1);
  inset-inline-end: var(--lm-space-1);
  z-index: 1;
  display: grid;
  place-items: center;
  inline-size: 32px;
  block-size: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--lm-radius-pill);
  background: transparent;
  color: #fff;
  cursor: pointer;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.7));
}

.lm-reelcard__more:hover { background: color-mix(in srgb, #000 30%, transparent); }
.lm-reelcard__more:focus-visible { outline: 2px solid #fff; outline-offset: 0; }
/* The reference's dots stand upright on a tile. */
.lm-reelcard__more svg { inline-size: 20px; block-size: 20px; transform: rotate(90deg); }

.lm-reelcard-menu {
  position: absolute;
  z-index: var(--lm-z-dropdown);
  min-inline-size: 220px;
  max-inline-size: min(300px, calc(100% - var(--lm-space-4)));
  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);
}

.lm-reelcard-menu[hidden] { display: none; }
.lm-reelcard-menu .lm-dropdown__item[hidden] { display: none; }

/* -- /people: the same cards in a grid ------------------------------------ */

.lm-people-page { padding-block: var(--lm-space-3) var(--lm-space-5); }
.lm-people-page__lead { margin: 0; padding: 0 var(--lm-space-4) var(--lm-space-3); }

.lm-people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--lm-space-3);
  padding-inline: var(--lm-space-4);
}

.lm-people-grid .lm-pymk { inline-size: auto; flex: none; }

@media (max-width: 560px) {
  .lm-feed-module__head { padding-inline: var(--lm-space-3) var(--lm-space-1); }
  .lm-carousel__track { padding-inline: var(--lm-space-3); scroll-padding-inline: var(--lm-space-3); }
  .lm-pymk, .lm-reelcard { flex-basis: 140px; inline-size: 140px; }
  .lm-people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lm-space-2); padding-inline: var(--lm-space-3); }
}

/* =============================================================================
   Phase 38.1 — Tickets: the event's ticket section, the organizer's ticket
   types and attendees, My Tickets, an order, a ticket and its QR code.
   Status is always a word and an icon, never a colour alone. A QR code is
   dark on white in both themes: that is what a scanner reads.
   ============================================================================= */

.lm-tickets-box,
.lm-tickets-manage,
.lm-ticket-order,
.lm-ticket-pass { padding: var(--lm-space-4) var(--lm-space-5); }

.lm-tickets-box__head { display: flex; align-items: flex-start; gap: var(--lm-space-4); }
.lm-tickets-box__intro { display: flex; flex-direction: column; gap: var(--lm-space-1); min-inline-size: 0; }
.lm-tickets-box__mine { margin-block-start: var(--lm-space-4); }
.lm-tickets-box__mine .lm-alert__body p { margin: 0 0 var(--lm-space-1); }

.lm-tickets-box__notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lm-space-2);
  margin: var(--lm-space-3) 0 0;
  padding: var(--lm-space-3);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text-secondary);
}

.lm-tickets-box__notice > svg { inline-size: 18px; block-size: 18px; }
.lm-tickets-box__manage { margin: var(--lm-space-3) 0 0; }

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

.lm-ticket-type {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-md);
}

.lm-ticket-type.is-off { background-color: var(--lm-surface-secondary); }
.lm-ticket-type__main { display: flex; flex: 1 1 260px; flex-direction: column; gap: var(--lm-space-1); min-inline-size: 0; }
.lm-ticket-type__name { margin: 0; font-size: var(--lm-text-md); font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-ticket-type__price { margin: 0; font-weight: var(--lm-weight-semibold); }
.lm-ticket-type__state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); margin: 0; }
.lm-ticket-type__left { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-ticket-type__text { margin: 0; color: var(--lm-text-secondary); overflow-wrap: anywhere; }
.lm-ticket-type__window { display: flex; flex-direction: column; gap: 2px; margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }

.lm-ticket-type__perks { display: flex; flex-direction: column; gap: 2px; margin: var(--lm-space-1) 0 0; padding: 0; list-style: none; }
.lm-ticket-type__perks li { display: flex; align-items: flex-start; gap: var(--lm-space-2); overflow-wrap: anywhere; }
.lm-ticket-type__perks svg { inline-size: 16px; block-size: 16px; margin-block-start: 3px; color: var(--lm-success-text); }

.lm-ticket-type__pick { display: flex; flex-direction: column; align-items: flex-end; gap: var(--lm-space-1); }
.lm-ticket-type__limits { margin: 0; }

.lm-ticket-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
  white-space: nowrap;
}

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

.lm-ticket-state--on_sale,
.lm-ticket-state--valid,
.lm-ticket-state--active,
.lm-ticket-state--confirmed { background-color: var(--lm-success-soft); color: var(--lm-success-text); }

.lm-ticket-state--cancelled,
.lm-ticket-state--event_cancelled,
.lm-ticket-state--event_withdrawn { background-color: var(--lm-danger-soft); color: var(--lm-danger-text); }

.lm-ticket-state--sold_out,
.lm-ticket-state--event_unavailable { background-color: var(--lm-warning-soft); color: var(--lm-warning-text); }

/* The quantity: − [n] +, every part a 44px target. */
.lm-qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--lm-border-strong);
  border-radius: 999px;
  overflow: hidden;
}

.lm-qty__btn {
  display: inline-grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--lm-text);
  cursor: pointer;
}

.lm-qty__btn:hover { background-color: var(--lm-surface-secondary); }
.lm-qty__btn:focus-visible { outline: 2px solid var(--lm-primary); outline-offset: -2px; }
.lm-qty__btn svg { inline-size: 18px; block-size: 18px; }

.lm-qty__input {
  inline-size: 3.5rem;
  border: 0;
  border-inline: 1px solid var(--lm-border);
  background: transparent;
  color: var(--lm-text);
  font-size: var(--lm-text-md);
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.lm-qty__input::-webkit-outer-spin-button,
.lm-qty__input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.lm-qty__input:focus-visible { outline: 2px solid var(--lm-primary); outline-offset: -2px; }

.lm-ticket-attendees {
  margin: var(--lm-space-4) 0 0;
  padding: 0;
  border: 0;
}

.lm-ticket-attendees[hidden] { display: none; }
.lm-ticket-attendees__list { display: flex; flex-direction: column; gap: var(--lm-space-3); margin: var(--lm-space-3) 0 0; padding: 0; list-style: none; }
.lm-ticket-attendee { padding: var(--lm-space-3); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-md); }
.lm-ticket-attendee.is-self { background-color: var(--lm-surface-secondary); }
.lm-ticket-attendee__label { margin: 0 0 var(--lm-space-2); font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-ticket-attendee__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lm-space-3); }
.lm-ticket-attendee__fields .lm-field { min-inline-size: 0; margin: 0; }

.lm-tickets-form__foot { display: flex; flex-direction: column; align-items: flex-start; gap: var(--lm-space-2); margin-block-start: var(--lm-space-4); }
.lm-tickets-form__foot .lm-help,
.lm-tickets-form__policy { margin: 0; }
.lm-tickets-form__policy { margin-block-start: var(--lm-space-3); }

/* Numbers people read aloud or type at a door. */
.lm-ticket-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  unicode-bidi: isolate;
  overflow-wrap: anywhere;
}

.lm-ticket-code--big { font-size: var(--lm-text-xl); font-weight: var(--lm-weight-bold); letter-spacing: 0.08em; }

/* -- The organizer ---------------------------------------------------------- */
.lm-tickets-manage__head { display: flex; flex-direction: column; gap: var(--lm-space-1); margin-block-end: var(--lm-space-3); }
.lm-tickets-manage__head .lm-help { margin: 0; }
.lm-tickets-manage__title { margin: 0; font-size: var(--lm-text-md); font-weight: var(--lm-weight-semibold); }

.lm-tickets-settings { display: flex; flex-direction: column; gap: var(--lm-space-3); }
.lm-tickets-settings__switch > span { display: flex; flex-direction: column; gap: 2px; }
.lm-tickets-settings__label { font-weight: var(--lm-weight-semibold); }
.lm-tickets-settings__policy { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0; padding: 0; border: 0; }
.lm-tickets-settings__policy .lm-help { margin: 0; }

.lm-ticket-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--lm-space-2);
  margin: var(--lm-space-4) 0 0;
}

.lm-ticket-figures__item { padding: var(--lm-space-3); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); min-inline-size: 0; }
.lm-ticket-figures__item dt { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-ticket-figures__item dd { margin: 2px 0 0; font-size: var(--lm-text-lg); font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-ticket-figures--compact { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); margin-block-start: var(--lm-space-3); }
.lm-ticket-figures--compact .lm-ticket-figures__item { padding: var(--lm-space-2); }
.lm-ticket-figures--compact .lm-ticket-figures__item dd { font-size: var(--lm-text-md); }

.lm-ticket-admin-types { display: flex; flex-direction: column; gap: var(--lm-space-3); margin: 0; padding: 0; list-style: none; }
.lm-ticket-admin-type { padding: var(--lm-space-4); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-md); }
.lm-ticket-admin-type__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); }
.lm-ticket-admin-type__head .lm-ticket-type__name { flex: 1 1 200px; }
.lm-ticket-admin-type__actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); margin-block-start: var(--lm-space-3); }
.lm-ticket-admin-type__edit,
.lm-ticket-admin-new { margin-block-start: var(--lm-space-3); }
.lm-ticket-admin-type__edit > summary,
.lm-ticket-admin-new > summary { list-style: none; cursor: pointer; }
.lm-ticket-admin-type__edit > summary::-webkit-details-marker,
.lm-ticket-admin-new > summary::-webkit-details-marker { display: none; }
.lm-ticket-admin-archived { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0; padding: 0; list-style: none; }
.lm-ticket-admin-archived li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); }

.lm-ticket-type-form { display: flex; flex-direction: column; gap: var(--lm-space-2); margin-block-start: var(--lm-space-3); }
.lm-ticket-type-form__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--lm-space-3); }
.lm-ticket-type-form__row .lm-field { min-inline-size: 0; }
.lm-ticket-type-form__price { margin: 0; font-weight: var(--lm-weight-semibold); }
.lm-ticket-type-form__foot { display: flex; justify-content: flex-end; }

/* -- Attendees -------------------------------------------------------------- */
.lm-attendee-filters { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)) auto; align-items: end; gap: var(--lm-space-3); margin-block-end: var(--lm-space-3); }
.lm-attendee-filters .lm-field { margin: 0; min-inline-size: 0; }
.lm-attendee-filters .lm-input,
.lm-attendee-filters .lm-select { inline-size: 100%; min-inline-size: 0; }

.lm-attendee-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }

.lm-attendee-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--lm-space-3);
  padding-block: var(--lm-space-3);
  border-block-start: 1px solid var(--lm-border);
}

.lm-attendee-row:first-child { border-block-start: 0; }
.lm-attendee-row__main { min-inline-size: 0; }
.lm-attendee-row__name { margin: 0; font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-attendee-row__email { margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); overflow-wrap: anywhere; text-align: start; }
.lm-attendee-row__meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-attendee-row__codes { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: var(--lm-text-sm); min-inline-size: 0; }
.lm-attendee-row__codes div { display: flex; flex-wrap: wrap; gap: 6px; }
.lm-attendee-row__codes dt { color: var(--lm-text-secondary); }
.lm-attendee-row__codes dd { margin: 0; }
.lm-attendee-row__side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--lm-space-2); }
.lm-attendee-more { display: flex; justify-content: center; margin: var(--lm-space-3) 0 0; }

/* -- My Tickets ------------------------------------------------------------- */
.lm-ticket-orders { display: flex; flex-direction: column; gap: var(--lm-space-3); margin: 0; padding: 0; list-style: none; }
.lm-ticket-order-card { padding: 0; }

.lm-ticket-order-card__link {
  display: flex;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4);
  color: inherit;
  text-decoration: none;
}

.lm-ticket-order-card__link:hover { background-color: var(--lm-surface-secondary); }
.lm-ticket-order-card__link:focus-visible { outline: 2px solid var(--lm-primary); outline-offset: -2px; }

.lm-ticket-order-card__icon {
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: var(--lm-radius-lg);
  background-color: var(--lm-surface-secondary);
  color: var(--lm-text-secondary);
}

.lm-ticket-order-card__icon svg { inline-size: 22px; block-size: 22px; }
.lm-ticket-order-card__body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-inline-size: 0; }
.lm-ticket-order-card__event { font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-ticket-order-card__when { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-ticket-order-card__meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }

/* -- An order, and a ticket ------------------------------------------------- */
.lm-ticket-confirmed { margin-block-end: var(--lm-space-3); }
.lm-ticket-confirmed .lm-alert__body p { margin: 0 0 var(--lm-space-1); }
.lm-ticket-order__head,
.lm-ticket-pass__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2) var(--lm-space-3); }
.lm-ticket-order__kicker { flex-basis: 100%; margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); font-weight: var(--lm-weight-semibold); text-transform: uppercase; letter-spacing: 0.04em; }
.lm-ticket-order__title,
.lm-ticket-pass__title { margin: 0; font-size: var(--lm-text-xl); font-weight: var(--lm-weight-bold); overflow-wrap: anywhere; min-inline-size: 0; }

.lm-ticket-event { display: flex; flex-direction: column; gap: var(--lm-space-2); margin-block-start: var(--lm-space-4); }
.lm-ticket-event__name { margin: 0; font-size: var(--lm-text-lg); overflow-wrap: anywhere; }
.lm-ticket-event__line { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: 0; overflow-wrap: anywhere; }
.lm-ticket-event__line > svg { inline-size: 18px; block-size: 18px; margin-block-start: 2px; color: var(--lm-text-secondary); }
.lm-ticket-event__line > span { display: flex; flex-direction: column; min-inline-size: 0; }
.lm-ticket-event__sub { display: block; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-ticket-event__warn { display: flex; align-items: center; gap: var(--lm-space-2); margin: 0; color: var(--lm-danger-text); font-weight: var(--lm-weight-semibold); }
.lm-ticket-event__warn svg { inline-size: 18px; block-size: 18px; }

.lm-ticket-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--lm-space-3); margin: var(--lm-space-4) 0 0; }
.lm-ticket-facts > div { min-inline-size: 0; }
.lm-ticket-facts dt { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-ticket-facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }

.lm-ticket-lines { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0; padding: 0; list-style: none; }
.lm-ticket-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--lm-space-3); overflow-wrap: anywhere; }

.lm-ticket-order__foot,
.lm-ticket-pass__foot { display: flex; flex-direction: column; align-items: flex-start; gap: var(--lm-space-2); margin-block-start: var(--lm-space-4); }
.lm-ticket-order__foot .lm-help,
.lm-ticket-pass__foot .lm-help { margin: 0; }
.lm-ticket-pass__actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }

.lm-ticket-pass__body { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); align-items: start; gap: var(--lm-space-5); margin-block-start: var(--lm-space-4); }
.lm-ticket-pass__facts { margin: 0; grid-template-columns: minmax(0, 1fr); }

.lm-ticket-qr { inline-size: 100%; max-inline-size: 260px; }

.lm-ticket-qr__frame {
  display: block;
  margin: 0;
  padding: var(--lm-space-3);
  border-radius: var(--lm-radius-md);
  background-color: #fff;
  box-shadow: 0 0 0 1px var(--lm-border);
}

/* The code's own drawing: square, full width, no outline on its modules. */
.lm-ticket-qr__frame svg.lm-ticket-qr__svg { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 1 / 1; stroke: none; }
.lm-ticket-qr__frame svg.lm-ticket-qr__svg path { fill: #000; stroke: none; }

.lm-ticket-qr__void {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--lm-space-2);
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: var(--lm-space-4);
  border: 1px dashed var(--lm-border-strong);
  border-radius: var(--lm-radius-md);
  color: var(--lm-text-secondary);
  text-align: center;
}

.lm-ticket-qr__void svg { inline-size: 32px; block-size: 32px; }

/* -- Events: "My tickets" beside "Create event" ------------------------------ */
.lm-events__head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); }

/* -- AdminCP inventory (the admin page loads this theme's layout too) ------- */
.lm-cp-inventory__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); margin: 0; font-size: var(--lm-text-md); }

/* -- Phase 38.2: paid tickets — the review, the checkout, the receipt ------- */
.lm-ticket-money { display: flex; flex-direction: column; gap: var(--lm-space-1); margin: var(--lm-space-3) 0 0; padding: 0; }
.lm-ticket-money__row { display: flex; justify-content: space-between; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-ticket-money__row[hidden] { display: none; }
.lm-ticket-money__row dt { color: var(--lm-text-secondary); }
.lm-ticket-money__row dd { margin: 0; text-align: end; overflow-wrap: anywhere; min-inline-size: 0; }
.lm-ticket-money__row--total { margin-block-start: var(--lm-space-1); padding-block-start: var(--lm-space-2); border-block-start: 1px solid var(--lm-border); font-weight: var(--lm-weight-bold); }
.lm-ticket-money__row--total dt { color: var(--lm-text); }

.lm-ticket-review { margin-block-start: var(--lm-space-4); padding: var(--lm-space-4); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); }
.lm-ticket-review[hidden] { display: none; }
.lm-ticket-review:focus { outline: none; }
.lm-ticket-review:focus-visible { box-shadow: 0 0 0 3px var(--lm-focus-ring, var(--lm-primary)); }
.lm-ticket-review .lm-help { margin: var(--lm-space-3) 0 0; }
.lm-ticket-review__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--lm-space-2); margin-block-start: var(--lm-space-3); }

.lm-checkout { display: flex; flex-direction: column; gap: var(--lm-space-4); }
.lm-checkout-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--lm-space-2); margin: 0; padding: 0; list-style: none; counter-reset: none; }
.lm-checkout-steps__step { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--lm-space-1); min-inline-size: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); text-align: center; }
.lm-checkout-steps__dot { display: inline-flex; align-items: center; justify-content: center; inline-size: 28px; block-size: 28px; border-radius: 50%; border: 2px solid var(--lm-border-strong); background-color: var(--lm-surface); font-weight: var(--lm-weight-semibold); }
.lm-checkout-steps__dot svg { inline-size: 16px; block-size: 16px; }
.lm-checkout-steps__label { overflow-wrap: break-word; hyphens: auto; min-inline-size: 0; }
.lm-checkout-steps__step.is-done .lm-checkout-steps__dot { border-color: var(--lm-success-text, var(--lm-primary)); color: var(--lm-success-text, var(--lm-primary)); }
.lm-checkout-steps__step.is-current { color: var(--lm-text); font-weight: var(--lm-weight-semibold); }
.lm-checkout-steps__step.is-current .lm-checkout-steps__dot { border-color: var(--lm-primary); background-color: var(--lm-primary); color: var(--lm-on-primary, #fff); }

.lm-checkout__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-2) var(--lm-space-3); }
.lm-checkout__title { margin: 0; font-size: var(--lm-text-lg); font-weight: var(--lm-weight-bold); }
.lm-checkout__timer { display: inline-flex; align-items: center; gap: var(--lm-space-2); margin: 0; padding: var(--lm-space-1) var(--lm-space-3); border-radius: var(--lm-radius-pill, 999px); background-color: var(--lm-surface-secondary); font-weight: var(--lm-weight-semibold); font-variant-numeric: tabular-nums; }
.lm-checkout__timer svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-checkout__summary .lm-help,
.lm-checkout__pay .lm-help,
.lm-checkout__foot .lm-help { margin: 0; }
.lm-checkout__pay { display: flex; flex-direction: column; gap: var(--lm-space-3); }
.lm-checkout-method { display: flex; flex-direction: column; align-items: flex-start; gap: var(--lm-space-3); padding: var(--lm-space-4); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-md); min-inline-size: 0; }
.lm-checkout-method > .lm-deposit__pay,
.lm-checkout-method > form { align-self: stretch; }
.lm-checkout-method__head { display: flex; align-items: flex-start; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-checkout-method__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; inline-size: 40px; block-size: 40px; border-radius: 50%; background-color: var(--lm-surface-secondary); }
.lm-checkout-method__icon svg { inline-size: 20px; block-size: 20px; }
.lm-checkout-method__name { margin: 0; font-weight: var(--lm-weight-semibold); }
.lm-checkout-card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--lm-space-2); }
.lm-checkout-card__gateways { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0; padding: 0; border: 0; }
.lm-checkout__foot { display: flex; flex-direction: column; align-items: flex-start; gap: var(--lm-space-2); padding-block-start: var(--lm-space-3); border-block-start: 1px solid var(--lm-border); }
.lm-checkout__foot .lm-help { display: inline-flex; align-items: flex-start; gap: var(--lm-space-2); }
.lm-checkout__foot .lm-help > svg { inline-size: 16px; block-size: 16px; flex: none; margin-block-start: 2px; }

.lm-ticket-receipt .lm-help { margin: var(--lm-space-3) 0 0; }
.lm-ticket-type-form__money { display: flex; align-items: center; gap: var(--lm-space-2); max-inline-size: 240px; }
.lm-ticket-type-form__money .lm-input { flex: 1 1 auto; min-inline-size: 0; }
.lm-ticket-type-form__currency { color: var(--lm-text-secondary); font-weight: var(--lm-weight-semibold); }

.lm-ticket-sales__figures .lm-ticket-figures__item dd { font-size: var(--lm-text-md); }
.lm-ticket-figures__item--strong { box-shadow: inset 0 0 0 1px var(--lm-border-strong); }
.lm-ticket-sales__window { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--lm-space-3); margin-block-end: var(--lm-space-3); }
.lm-ticket-sales__window .lm-field { margin: 0; min-inline-size: 0; }
.lm-ticket-sales .lm-help { display: flex; align-items: flex-start; gap: var(--lm-space-2); }
.lm-ticket-sales .lm-help > svg { inline-size: 16px; block-size: 16px; flex: none; margin-block-start: 2px; }

@media (max-width: 640px) {
  .lm-checkout-steps { gap: var(--lm-space-1); }
  .lm-checkout-steps__label { font-size: var(--lm-text-xs, 11px); }

  /* A phone shows the current step's name; the others keep theirs for a
     screen reader (never cut in the middle of a word). */
  .lm-checkout-steps__step:not(.is-current) .lm-checkout-steps__label {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .lm-checkout-method { padding: var(--lm-space-3); }
  .lm-ticket-review { padding: var(--lm-space-3); }
  .lm-ticket-review__actions { justify-content: stretch; }
  .lm-ticket-review__actions .lm-btn { flex: 1 1 auto; }
}

@media (max-width: 640px) {
  .lm-tickets-box,
  .lm-tickets-manage,
  .lm-ticket-order,
  .lm-ticket-pass { padding-inline: var(--lm-space-4); }

  .lm-ticket-type { padding: var(--lm-space-3); }
  .lm-ticket-type__pick { align-items: flex-start; }
  .lm-ticket-attendee__fields,
  .lm-ticket-type-form__row { grid-template-columns: minmax(0, 1fr); }
  .lm-attendee-filters { grid-template-columns: minmax(0, 1fr); }
  .lm-attendee-row { grid-template-columns: minmax(0, 1fr); gap: var(--lm-space-2); }
  .lm-attendee-row__side { justify-content: flex-start; }
  .lm-ticket-pass__body { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .lm-ticket-pass__facts { inline-size: 100%; }
  .lm-ticket-order-card__link { flex-wrap: wrap; }
  .lm-ticket-lines li { grid-template-columns: minmax(0, 1fr) auto; }
  .lm-ticket-lines li > span:last-child { grid-column: 1 / -1; color: var(--lm-text-secondary); }
}

/* =========================================================================
   Phase 38.3 — The door: the scanner, the result card, the dashboard, the
   team. Phone first. Every icon here has its own size (an icon is an
   unsized SVG); logical properties only, so Arabic mirrors itself; the
   camera box takes its height from its width (never a max-height on an
   aspect-ratio box, which would cap the width instead).
   ========================================================================= */

.lm-door {
  display: grid;
  gap: var(--lm-space-4);
  inline-size: 100%;
  max-inline-size: 760px;
  margin-inline: auto;
  min-inline-size: 0;
}

.lm-door > * { min-inline-size: 0; }

.lm-door-head {
  display: grid;
  gap: var(--lm-space-3);
  padding: var(--lm-space-5);
}

.lm-door-head__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
}

.lm-door-head__kicker svg { inline-size: 16px; block-size: 16px; flex: none; }

.lm-door-head__role {
  padding: 1px 8px;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-primary-soft);
  color: var(--lm-primary-text);
  font-size: var(--lm-text-xs);
}

.lm-door-head__title {
  margin: 0;
  font-size: var(--lm-text-xl);
  line-height: var(--lm-leading-tight);
  overflow-wrap: anywhere;
}

.lm-door-head__when {
  margin: 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  overflow-wrap: anywhere;
}

.lm-door-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  margin: 0;
  padding: 6px 12px;
  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-semibold);
}

.lm-door-state svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-door-state--open { background-color: var(--lm-success-soft); color: var(--lm-success-text); }
.lm-door-state--too_early,
.lm-door-state--closed { background-color: var(--lm-warning-soft); color: var(--lm-warning-text); }
.lm-door-state--disabled,
.lm-door-state--off,
.lm-door-state--no_tickets,
.lm-door-state--cancelled,
.lm-door-state--unavailable { background-color: var(--lm-danger-soft); color: var(--lm-danger-text); }

.lm-door-figures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--lm-space-2);
  margin: 0;
}

.lm-door-figures__item {
  display: grid;
  gap: 2px;
  padding: var(--lm-space-3);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-secondary);
  min-inline-size: 0;
}

.lm-door-figures__item dt { color: var(--lm-text-secondary); font-size: var(--lm-text-xs); }
.lm-door-figures__item dd { margin: 0; font-size: var(--lm-text-xl); font-weight: var(--lm-weight-bold); }
.lm-door-figures__item--in dd { color: var(--lm-success-text); }

.lm-door-meter {
  display: block;
  block-size: 8px;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-surface-secondary);
  overflow: hidden;
}

.lm-door-meter--sm { block-size: 6px; }

.lm-door-meter__bar {
  display: block;
  block-size: 100%;
  border-radius: inherit;
  background-color: var(--lm-success);
}

.lm-door-tabs .lm-tabs__tab svg { inline-size: 16px; block-size: 16px; flex: none; }

.lm-door-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: var(--lm-space-3) var(--lm-space-4);
  border-radius: var(--lm-radius-md);
  font-weight: var(--lm-weight-semibold);
}

.lm-door-banner svg { inline-size: 20px; block-size: 20px; flex: none; }
.lm-door-banner--bad { background-color: var(--lm-danger-soft); color: var(--lm-danger-text); }

/* The scanner */

.lm-door-scan {
  display: grid;
  gap: var(--lm-space-5);
  padding: var(--lm-space-5);
}

.lm-door-camera { display: grid; gap: var(--lm-space-3); }

.lm-door-camera__view {
  position: relative;
  inline-size: min(100%, 480px);
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  border-radius: var(--lm-radius-lg);
  background-color: var(--lm-media-bg);
  overflow: hidden;
}

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

.lm-door-camera__frame {
  position: absolute;
  inset: 18%;
  border: 3px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--lm-radius-md);
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.lm-door-camera__idle {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  margin: 0;
  padding: var(--lm-space-4);
  color: #fff;
  text-align: center;
  font-weight: var(--lm-weight-semibold);
  z-index: 1;
}

.lm-door-camera__idle svg { inline-size: 36px; block-size: 36px; }

.lm-door-camera__status {
  min-block-size: 1.4em;
  margin: 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  text-align: center;
}

.lm-door-camera__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--lm-space-2);
}

.lm-door-camera__actions [aria-pressed="true"] { background-color: var(--lm-primary-soft); color: var(--lm-primary-text); }

.lm-door-manual { display: grid; gap: 6px; }

.lm-door-manual__row {
  display: flex;
  gap: var(--lm-space-2);
  min-inline-size: 0;
}

.lm-door-manual__input {
  flex: 1 1 auto;
  min-inline-size: 0;
  font-size: var(--lm-text-lg);
  letter-spacing: 0.04em;
}

.lm-door-manual__row .lm-btn { flex: none; }

.lm-door-search__results {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-door-search__result {
  display: grid;
  gap: 2px;
  inline-size: 100%;
  padding: var(--lm-space-3);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface);
  color: var(--lm-text);
  text-align: start;
  cursor: pointer;
}

.lm-door-search__result:hover,
.lm-door-search__result:focus-visible { border-color: var(--lm-primary); }
.lm-door-search__name { font-weight: var(--lm-weight-semibold); }
.lm-door-search__meta,
.lm-door-search__state { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); overflow-wrap: anywhere; }

/* The result card: the answer in words and an icon, never colour alone */

.lm-door-result:focus { outline: none; }

.lm-door-card {
  display: grid;
  gap: var(--lm-space-3);
  padding: var(--lm-space-5);
  border: 2px solid transparent;
  border-radius: var(--lm-radius-lg);
  background-color: var(--lm-surface);
  box-shadow: var(--lm-shadow-md);
}

.lm-door-card--ok { border-color: var(--lm-success); }
.lm-door-card--warn { border-color: var(--lm-warning); }
.lm-door-card--bad { border-color: var(--lm-danger); }

.lm-door-card__banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: var(--lm-space-3) var(--lm-space-4);
  border-radius: var(--lm-radius-md);
  font-size: var(--lm-text-xl);
  font-weight: var(--lm-weight-bold);
  line-height: var(--lm-leading-tight);
  text-transform: uppercase;
}

.lm-door-card__banner svg { inline-size: 32px; block-size: 32px; flex: none; }
.lm-door-card--ok .lm-door-card__banner { background-color: var(--lm-success-soft); color: var(--lm-success-text); }
.lm-door-card--warn .lm-door-card__banner { background-color: var(--lm-warning-soft); color: var(--lm-warning-text); }
.lm-door-card--bad .lm-door-card__banner { background-color: var(--lm-danger-soft); color: var(--lm-danger-text); }

.lm-door-card__detail { margin: 0; color: var(--lm-text-secondary); }

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

.lm-door-card__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--lm-space-2);
  margin: 0;
}

.lm-door-card__facts > div { min-inline-size: 0; }
.lm-door-card__facts dt { color: var(--lm-text-secondary); font-size: var(--lm-text-xs); }
.lm-door-card__facts dd { margin: 0; font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }

.lm-door-card__age {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: var(--lm-space-2) var(--lm-space-3);
  border-radius: var(--lm-radius-md);
  background-color: var(--lm-warning-soft);
  color: var(--lm-warning-text);
  font-weight: var(--lm-weight-semibold);
}

.lm-door-card__age svg { inline-size: 20px; block-size: 20px; flex: none; }
.lm-door-card__confirm { font-weight: var(--lm-weight-semibold); }

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

.lm-door-card__go {
  flex: 1 1 100%;
  justify-content: center;
  min-block-size: 56px;
  font-size: var(--lm-text-lg);
}

.lm-door-card__go svg { inline-size: 24px; block-size: 24px; }

.lm-door-undo {
  display: grid;
  gap: 6px;
  inline-size: 100%;
  grid-column: 1 / -1;
}

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

.lm-door-form-error {
  margin: 0;
  color: var(--lm-danger-text);
  font-size: var(--lm-text-sm);
  font-weight: var(--lm-weight-semibold);
}

/* The rows: the door's history */

.lm-door-recent,
.lm-door-history,
.lm-door-types,
.lm-door-settings,
.lm-door-team {
  display: grid;
  gap: var(--lm-space-3);
  padding: var(--lm-space-5);
}

.lm-door-section-title { margin: 0; font-size: var(--lm-text-lg); }

.lm-door-rows {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-door-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--lm-space-3);
  padding-block: var(--lm-space-3);
  border-block-end: 1px solid var(--lm-border);
}

.lm-door-row:last-child { border-block-end: 0; }

.lm-door-row__icon {
  display: grid;
  place-items: center;
  inline-size: 32px;
  block-size: 32px;
  border-radius: 50%;
  background-color: var(--lm-success-soft);
  color: var(--lm-success-text);
}

.lm-door-row__icon svg { inline-size: 18px; block-size: 18px; }
.lm-door-row--undo .lm-door-row__icon { background-color: var(--lm-warning-soft); color: var(--lm-warning-text); }
.lm-door-row.is-undone .lm-door-row__icon { background-color: var(--lm-surface-secondary); color: var(--lm-text-secondary); }
.lm-door-row__main { display: grid; gap: 2px; min-inline-size: 0; }

.lm-door-row__name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  font-weight: var(--lm-weight-semibold);
  overflow-wrap: anywhere;
}

.lm-door-row__action { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); font-weight: var(--lm-weight-regular); }

.lm-door-row__undone {
  padding: 0 8px;
  border-radius: var(--lm-radius-pill);
  background-color: var(--lm-warning-soft);
  color: var(--lm-warning-text);
  font-size: var(--lm-text-xs);
}

.lm-door-row__meta,
.lm-door-row__reason {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  color: var(--lm-text-secondary);
  font-size: var(--lm-text-sm);
  overflow-wrap: anywhere;
}

.lm-door-row__reason { font-style: italic; }
.lm-door-row .lm-door-undo { grid-column: 2 / -1; }
.lm-door-rows__empty { margin: 0; }
.lm-door-more { margin: 0; text-align: center; }

.lm-door-types__list { display: grid; gap: var(--lm-space-3); margin: 0; padding: 0; list-style: none; }

.lm-door-types__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px var(--lm-space-3);
}

.lm-door-types__name { font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-door-types__count { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-door-types__item .lm-door-meter { grid-column: 1 / -1; }

.lm-door-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--lm-space-3);
  align-items: end;
}

.lm-door-filters .lm-field { min-inline-size: 0; }
.lm-door-filters__actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }

/* The team and the settings */

.lm-door-settings__form { display: grid; gap: var(--lm-space-4); }

.lm-door-window {
  display: grid;
  gap: var(--lm-space-3);
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

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

.lm-door-settings__form > .lm-btn { justify-self: start; }

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

.lm-door-team__add .lm-door-form-error { grid-column: 1 / -1; }

.lm-door-team__roles { display: grid; gap: 6px; margin: 0; font-size: var(--lm-text-sm); }
.lm-door-team__roles div { display: flex; flex-wrap: wrap; gap: 6px; }
.lm-door-team__roles dt { font-weight: var(--lm-weight-semibold); }
.lm-door-team__roles dd { margin: 0; color: var(--lm-text-secondary); }
.lm-door-team__list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }

.lm-door-member {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--lm-space-3);
  padding-block: var(--lm-space-3);
  border-block-end: 1px solid var(--lm-border);
}

.lm-door-member:last-child { border-block-end: 0; }
.lm-door-member__avatar { inline-size: 40px; block-size: 40px; border-radius: 50%; object-fit: cover; }
.lm-door-member__main { min-inline-size: 0; }
.lm-door-member__name { margin: 0; font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-door-member__meta { margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); overflow-wrap: anywhere; }
.lm-door-member__side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--lm-space-2); }
.lm-door-member__role { inline-size: auto; }

/* /door: the events */

.lm-door-events { display: grid; gap: var(--lm-space-3); margin: 0; padding: 0; list-style: none; }

.lm-door-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--lm-space-3);
  padding: var(--lm-space-4);
}

.lm-door-event__main { display: grid; gap: 4px; min-inline-size: 0; }
.lm-door-event__name { margin: 0; font-weight: var(--lm-weight-bold); overflow-wrap: anywhere; }
.lm-door-event__meta { margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-door-back { margin: 0; text-align: center; }

/* A checked-in ticket, where its holder and its organizer see it */

.lm-ticket-state--checked_in { background-color: var(--lm-info-soft); color: var(--lm-info-text); }

@media (max-width: 599px) {
  .lm-door-head,
  .lm-door-scan,
  .lm-door-recent,
  .lm-door-history,
  .lm-door-types,
  .lm-door-settings,
  .lm-door-team { padding: var(--lm-space-4); }

  .lm-door-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lm-door-card__facts { grid-template-columns: minmax(0, 1fr); }
  .lm-door-team__add { grid-template-columns: minmax(0, 1fr); }
  .lm-door-team__add .lm-btn { justify-self: start; }
  .lm-door-member { grid-template-columns: auto minmax(0, 1fr); }
  .lm-door-member__side { grid-column: 1 / -1; justify-content: flex-start; }
  .lm-door-event { grid-template-columns: minmax(0, 1fr); }
  .lm-door-event .lm-btn { justify-self: start; }
  .lm-door-manual__row { flex-wrap: wrap; }
  .lm-door-manual__row .lm-btn { flex: 1 1 100%; justify-content: center; }
}

@media (max-width: 359px) {
  .lm-door-window__row { grid-template-columns: minmax(0, 1fr); }
}

/* Phase 38.4. The event's Tickets tab: emails and reminders — the contact
   note reads as one sentence with its link (not two flex items). Two
   classes: components.css (.lm-help, flex) loads after this file. */
.lm-help.lm-ticket-comms__contact { display: block; }
.lm-ticket-comms__contact .lm-event-link { margin-inline-start: var(--lm-space-2); }

/* Phase 38.5. Promo codes: their states (on is the ticket types' green),
   the code's own text, and the discount line of a price. */
.lm-ticket-state--promo-active { background-color: var(--lm-success-soft); color: var(--lm-success-text); }
.lm-ticket-state--promo-scheduled { background-color: var(--lm-info-soft); color: var(--lm-info-text); }
.lm-ticket-state--promo-expired,
.lm-ticket-state--promo-exhausted { background-color: var(--lm-warning-soft); color: var(--lm-warning-text); }
.lm-promo-code__text { font-weight: var(--lm-weight-bold); letter-spacing: 0.06em; }
.lm-promo-form__code { text-transform: uppercase; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.06em; max-inline-size: 320px; }
.lm-ticket-promo { margin-block-start: var(--lm-space-3); }
.lm-ticket-promo__input { text-transform: uppercase; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.06em; max-inline-size: 320px; }
.lm-ticket-money__row--discount dt { min-inline-size: 0; }
.lm-ticket-money__row--discount dd { flex: 0 0 auto; white-space: nowrap; color: var(--lm-success-text); font-weight: var(--lm-weight-semibold); }
.lm-ticket-money__row--discount dt .lm-help { display: inline; }


/* Phase 38.6. The waitlist: a member's entries (My Tickets → Waitlist),
   an offer's page, their own entry in an event's ticket box, a sold-out
   type's "Join waitlist", and the organizer's figures. Every icon has its
   own size (an icon is an unsized SVG). */
.lm-ticket-state--waitlist-waiting { background-color: var(--lm-info-soft); color: var(--lm-info-text); }
.lm-ticket-state--waitlist-offered { background-color: var(--lm-warning-soft); color: var(--lm-warning-text); }
.lm-ticket-state--waitlist-accepted { background-color: var(--lm-success-soft); color: var(--lm-success-text); }

.lm-waitlist-note { margin: 0 0 var(--lm-space-3); }
.lm-waitlist-card { display: flex; flex-direction: column; gap: var(--lm-space-3); padding: var(--lm-space-4); }
.lm-waitlist-card__main { display: flex; align-items: flex-start; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-waitlist-card__main .lm-ticket-state { flex: none; }
.lm-waitlist-card__line { margin-block-start: var(--lm-space-1); font-size: var(--lm-text-sm); overflow-wrap: anywhere; }
.lm-waitlist-card__line--offer { color: var(--lm-warning-text); font-weight: var(--lm-weight-semibold); }
.lm-waitlist-card__actions,
.lm-waitlist-mine__actions,
.lm-waitlist-offer__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); }
.lm-waitlist-card__actions { justify-content: flex-end; }
.lm-tickets-box__mine .lm-alert__body .lm-waitlist-mine__actions { margin-block-start: var(--lm-space-2); }

.lm-waitlist-back { margin: 0 0 var(--lm-space-3); }
.lm-waitlist-back a { display: inline-flex; align-items: center; gap: var(--lm-space-1); }
.lm-waitlist-back svg { inline-size: 18px; block-size: 18px; flex: none; }

.lm-waitlist-offer .lm-ticket-facts { margin-block-end: var(--lm-space-4); }
.lm-waitlist-offer__form { display: flex; flex-direction: column; gap: var(--lm-space-3); margin-block-start: var(--lm-space-2); }
.lm-waitlist-offer__form .lm-event-about__subhead { margin: 0; }
.lm-waitlist-offer__form .lm-help { margin: 0; }
.lm-waitlist-offer__promo { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); }
.lm-waitlist-offer__promo .lm-input { flex: 1 1 180px; }
.lm-waitlist-offer__actions { justify-content: flex-end; margin-block-start: var(--lm-space-2); }

.lm-ticket-type__wait { max-inline-size: 220px; }
.lm-ticket-type__wait .lm-help { margin: 0; text-align: end; }
.lm-ticket-type__wait .lm-btn svg { inline-size: 16px; block-size: 16px; }

.lm-waitlist-manage__types { margin-block-start: var(--lm-space-3); position: relative; }
.lm-waitlist-manage__types .lm-table td { font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .lm-waitlist-card { padding: var(--lm-space-3); }
  .lm-waitlist-card__main { flex-wrap: wrap; }
  .lm-waitlist-card__main .lm-ticket-order-card__body { flex: 1 1 calc(100% - 60px); }
  .lm-waitlist-card__actions { justify-content: flex-start; }
  .lm-waitlist-offer__actions { justify-content: stretch; }
  .lm-waitlist-offer__actions .lm-btn { flex: 1 1 auto; justify-content: center; }
  .lm-ticket-type__wait { max-inline-size: none; }
  .lm-ticket-type__wait .lm-help { text-align: start; }
}

/* Phase 38.7. Ticket transfers and attendee management: the transfer states,
   the Transfers tab, the other member's public identity, a ticket's
   transfer and attendee cards, the invitation page, the organizer's marks
   and details. Every icon here is given its own size (an icon is an unsized
   SVG). */
.lm-ticket-state--transfer-pending { background-color: var(--lm-warning-soft); color: var(--lm-warning-text); }
.lm-ticket-state--transfer-accepted { background-color: var(--lm-success-soft); color: var(--lm-success-text); }
.lm-ticket-state--transfer-accepted svg { inline-size: 14px; block-size: 14px; flex: none; }

.lm-transfer-group { margin: var(--lm-space-4) 0 var(--lm-space-2); font-size: var(--lm-text-base); font-weight: var(--lm-weight-semibold); color: var(--lm-text-secondary); }
.lm-transfer-group:first-child { margin-block-start: 0; }

.lm-transfer-card { display: flex; flex-direction: column; gap: var(--lm-space-3); padding: var(--lm-space-4); }
.lm-transfer-card__main { display: flex; align-items: flex-start; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-transfer-card__main .lm-ticket-state { flex: none; }
.lm-transfer-card__who { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); margin-block: var(--lm-space-1); min-inline-size: 0; }
.lm-transfer-card__dir { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }

.lm-transfer-person { display: inline-flex; align-items: center; gap: var(--lm-space-2); min-inline-size: 0; max-inline-size: 100%; }
.lm-transfer-person__body { display: flex; flex-direction: column; min-inline-size: 0; }
.lm-transfer-person__name { display: inline-flex; align-items: center; gap: 4px; font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-transfer-person__name .lm-verified svg { inline-size: 16px; block-size: 16px; }
.lm-transfer-person__handle { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); overflow-wrap: anywhere; }
.lm-transfer-person--sm .lm-transfer-person__body { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.lm-transfer-person--sm .lm-transfer-person__name { font-size: var(--lm-text-sm); }

.lm-transfer-origin { display: flex; align-items: center; gap: var(--lm-space-1); margin: var(--lm-space-2) 0 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); inline-size: 100%; }
.lm-transfer-origin svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-ticket-pass__body--away { display: flex; flex-direction: column; gap: var(--lm-space-4); }
.lm-transfer-away { margin: 0; }

.lm-transfer-box .lm-help,
.lm-attendee-box .lm-help { margin: 0 0 var(--lm-space-3); }
.lm-transfer-box .lm-btn svg,
.lm-attendee-box .lm-btn svg,
.lm-transfer-invite .lm-btn svg,
.lm-transfer-form__find .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-transfer-pending { margin: 0; }
.lm-transfer-pending .lm-transfer-person { margin-block: var(--lm-space-2); }
.lm-attendee-box .lm-ticket-facts { margin-block-end: var(--lm-space-3); }

.lm-transfer-form { display: flex; flex-direction: column; gap: var(--lm-space-3); }
.lm-transfer-form .lm-help { margin: 0; }
.lm-transfer-form__find { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }
.lm-transfer-form__find .lm-input { flex: 1 1 180px; min-inline-size: 0; }
.lm-transfer-form__confirm { display: flex; flex-direction: column; gap: var(--lm-space-2); padding: var(--lm-space-3); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); }
.lm-transfer-form__to { margin: 0; font-weight: var(--lm-weight-semibold); }
.lm-attendee-form { display: flex; flex-direction: column; gap: var(--lm-space-3); }
.lm-attendee-form .lm-help { margin: 0; }

.lm-transfer-history__list { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0; padding: 0; list-style: none; }
.lm-transfer-history__item { display: flex; flex-direction: column; gap: 4px; padding-block: var(--lm-space-2); border-block-start: 1px solid var(--lm-border); min-inline-size: 0; }
.lm-transfer-history__item:first-child { border-block-start: 0; padding-block-start: 0; }
.lm-transfer-history__who { overflow-wrap: anywhere; }
.lm-transfer-history__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }

.lm-transfer-invite__from { display: flex; flex-direction: column; gap: var(--lm-space-2); margin-block: var(--lm-space-3) var(--lm-space-4); }
.lm-transfer-invite__lead { margin: 0; color: var(--lm-text-secondary); }
.lm-transfer-invite .lm-ticket-facts { margin-block-end: var(--lm-space-4); }
.lm-transfer-invite .lm-help { margin: 0 0 var(--lm-space-3); }

.lm-attendee-row__transfer { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 2px 0 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-attendee-row__transfer svg { inline-size: 14px; block-size: 14px; flex: none; }
.lm-attendee-row__details { grid-column: 1 / -1; min-inline-size: 0; }
.lm-attendee-detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--lm-space-4); padding: var(--lm-space-3); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); }
.lm-attendee-detail__part { display: flex; flex-direction: column; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-attendee-detail__part p { margin: 0; }
.lm-attendee-detail__title { margin: 0; font-size: var(--lm-text-sm); font-weight: var(--lm-weight-semibold); }
.lm-attendee-detail__change { font-size: var(--lm-text-sm); overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .lm-transfer-card { padding: var(--lm-space-3); }
  .lm-transfer-card__main { flex-wrap: wrap; }
  .lm-transfer-card__main .lm-ticket-order-card__body { flex: 1 1 calc(100% - 60px); }
  .lm-transfer-invite .lm-waitlist-offer__actions .lm-btn { flex: 1 1 auto; justify-content: center; }
  .lm-attendee-detail { grid-template-columns: minmax(0, 1fr); padding: var(--lm-space-2); }
}

/* ==========================================================================
   Phase 38.8. Event analytics: the period form, the figures ("in the period"
   and "now" apart), the money rows, the ticket types, the lists — on the
   event's Analytics tab, the organizer's overview and the AdminCP.
   Every icon here has its size (an unsized one collapses or blows up).
   ========================================================================== */

.lm-analytics-period { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--lm-space-3); margin-block-end: var(--lm-space-3); }
.lm-analytics-period__choice { min-inline-size: 180px; flex: 1 1 180px; margin: 0; }
.lm-analytics-period__range { display: flex; flex-wrap: wrap; gap: var(--lm-space-3); flex: 2 1 280px; }
.lm-analytics-period__range .lm-field { flex: 1 1 130px; margin: 0; min-inline-size: 0; }
.lm-analytics-period__actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }
.lm-analytics-period__actions .lm-icon { inline-size: 16px; block-size: 16px; }
.lm-analytics-period__zone { flex-basis: 100%; margin: 0; }
.lm-analytics-period__error { flex-basis: 100%; display: flex; align-items: center; gap: var(--lm-space-2); margin: 0; color: var(--lm-danger-text); font-size: var(--lm-text-sm); }
.lm-analytics-period__error .lm-icon { inline-size: 16px; block-size: 16px; flex: none; }

.lm-analytics__heading { margin: var(--lm-space-4) 0 var(--lm-space-2); font-size: var(--lm-text-sm); font-weight: var(--lm-weight-semibold); color: var(--lm-text-secondary); }
.lm-analytics__figures { margin-block-end: var(--lm-space-2); }
.lm-analytics__hint { margin: 2px 0 0; font-size: var(--lm-text-xs); font-weight: var(--lm-weight-regular); }
.lm-analytics__charts { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--lm-space-5); }

.lm-analytics-money { display: flex; flex-direction: column; margin: 0; }
.lm-analytics-money__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--lm-space-3); padding-block: var(--lm-space-2);
  border-block-end: 1px solid var(--lm-border); min-inline-size: 0; }
.lm-analytics-money__row:last-child { border-block-end: 0; }
.lm-analytics-money__row dt { min-inline-size: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-analytics-money__row dd { margin: 0; font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }
.lm-analytics-money__row.is-strong dt, .lm-analytics-money__row.is-strong dd { color: var(--lm-text); font-weight: var(--lm-weight-semibold); }
.lm-analytics-money__row dt .lm-help { display: inline; margin: 0; }

.lm-analytics-types { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--lm-space-3); margin: 0; padding: 0; list-style: none; }
.lm-analytics-type { display: flex; flex-direction: column; gap: var(--lm-space-2); padding: var(--lm-space-3); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-md); min-inline-size: 0; }
.lm-analytics-type__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--lm-space-1) var(--lm-space-3); }
.lm-analytics-type__name { margin: 0; font-size: var(--lm-text-md); font-weight: var(--lm-weight-semibold); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-analytics-type__share { font-size: var(--lm-text-sm); color: var(--lm-text-secondary); }
.lm-analytics-type__bar { display: block; inline-size: 100%; block-size: 6px; border-radius: 3px; }
[dir="rtl"] .lm-analytics-type__bar { transform: scaleX(-1); }
.lm-analytics-type__track { fill: var(--lm-surface-secondary); }
.lm-analytics-type__fill { fill: var(--lm-primary); }
.lm-analytics-type__figures { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 110px), 1fr)); gap: var(--lm-space-2); margin: 0; }
.lm-analytics-type__figures div { min-inline-size: 0; }
.lm-analytics-type__figures dt { font-size: var(--lm-text-xs); color: var(--lm-text-secondary); }
.lm-analytics-type__figures dd { margin: 0; font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }

.lm-analytics-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.lm-analytics-list__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-1) var(--lm-space-3); padding-block: var(--lm-space-2);
  border-block-end: 1px solid var(--lm-border); min-inline-size: 0; font-size: var(--lm-text-sm); }
.lm-analytics-list__row:last-child { border-block-end: 0; }
.lm-analytics-list__name { flex: 1 1 120px; min-inline-size: 0; overflow-wrap: anywhere; }

.lm-analytics-defs summary { cursor: pointer; list-style-position: inside; }
.lm-analytics-defs summary h2 { display: inline; }
.lm-analytics-defs__list { display: flex; flex-direction: column; gap: var(--lm-space-3); margin: var(--lm-space-3) 0 0; }
.lm-analytics-defs__list dt { font-weight: var(--lm-weight-semibold); font-size: var(--lm-text-sm); }
.lm-analytics-defs__list dd { margin: 2px 0 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }

/* The event page's ticket box: a type this member may not book more of. */
.lm-ticket-type__limit { display: flex; align-items: center; gap: var(--lm-space-1); margin: var(--lm-space-1) 0 0; }
.lm-ticket-type__limit .lm-icon { inline-size: 14px; block-size: 14px; flex: none; }

@media (min-width: 900px) {
  .lm-analytics-types:not(.lm-analytics-events) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   Phase 40. Paid community entry: the checkout and receipt, the Main
   Admin's paid-entry tab (entry, revenue split, figures, removal requests).
   On the checkout's own classes (.lm-checkout*) wherever they fit.
   ========================================================================== */

.lm-community-entry { padding: var(--lm-space-5); }
.lm-community-entry .lm-event-about__subhead { margin-block: var(--lm-space-2) var(--lm-space-2); }
.lm-community-entry__mode { display: inline-flex; align-items: center; gap: var(--lm-space-2); margin: 0 0 var(--lm-space-2); font-weight: var(--lm-weight-semibold); }
.lm-community-entry__mode svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-community-entry__terms { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0; padding: 0; list-style: none; }
.lm-community-entry__terms li { display: flex; align-items: flex-start; gap: var(--lm-space-2); min-inline-size: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); overflow-wrap: anywhere; }
.lm-community-entry__terms li > svg { inline-size: 16px; block-size: 16px; flex: none; margin-block-start: 2px; color: var(--lm-success-text); }
.lm-community-entry__about { margin: 0; white-space: pre-line; overflow-wrap: anywhere; color: var(--lm-text-secondary); }
.lm-community-entry__money { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: var(--lm-space-3) 0 0; padding: var(--lm-space-3) var(--lm-space-4); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); }
.lm-community-entry__money > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--lm-space-1) var(--lm-space-3); min-inline-size: 0; }
.lm-community-entry__money dt { color: var(--lm-text-secondary); }
.lm-community-entry__money dd { margin: 0; text-align: end; overflow-wrap: anywhere; min-inline-size: 0; }
.lm-community-entry__total { padding-block-start: var(--lm-space-2); border-block-start: 1px solid var(--lm-border); font-weight: var(--lm-weight-bold); }
.lm-community-entry__total dt { color: var(--lm-text); }

.lm-community-entry--receipt { display: flex; flex-direction: column; gap: var(--lm-space-4); }
.lm-community-entry__state { display: flex; align-items: flex-start; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-community-entry__state .lm-help { margin: var(--lm-space-1) 0 0; }
.lm-community-entry__state-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; inline-size: 44px; block-size: 44px; border-radius: 50%; background-color: var(--lm-surface-secondary); color: var(--lm-text-secondary); }
.lm-community-entry__state-icon svg { inline-size: 22px; block-size: 22px; }
.lm-community-entry__state--confirmed .lm-community-entry__state-icon { background-color: var(--lm-success-soft); color: var(--lm-success-text); }
.lm-community-entry__state--failed .lm-community-entry__state-icon { background-color: var(--lm-danger-soft); color: var(--lm-danger-text); }
.lm-community-entry__actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }

.lm-community-paid .lm-card__header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-2); }
.lm-community-paid__form { display: flex; flex-direction: column; align-items: flex-start; gap: var(--lm-space-3); }
.lm-community-paid__form .lm-field { margin: 0; align-self: stretch; }
.lm-community-paid__form .lm-help { margin: 0; }
.lm-community-paid__price { max-inline-size: 220px; }
.lm-community-paid__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--lm-space-2); margin: 0 0 var(--lm-space-3); }
.lm-community-paid__stats > div { padding: var(--lm-space-3); border-radius: var(--lm-radius-sm); background-color: var(--lm-surface-secondary); min-inline-size: 0; }
.lm-community-paid__stats dt { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); overflow-wrap: anywhere; }
.lm-community-paid__stats dd { margin: var(--lm-space-1) 0 0; font-size: var(--lm-text-lg); font-weight: var(--lm-weight-bold); overflow-wrap: anywhere; }

.lm-community-split { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0 0 var(--lm-space-3); padding: 0; list-style: none; }
.lm-community-split__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); padding: var(--lm-space-2) var(--lm-space-3); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-sm); min-inline-size: 0; }
.lm-community-split__row.is-stale { border-color: var(--lm-warning); }
.lm-community-split__who { flex: 1 1 auto; min-inline-size: 0; overflow-wrap: anywhere; font-weight: var(--lm-weight-semibold); }
.lm-community-split__share { font-weight: var(--lm-weight-bold); }
.lm-community-split-form { display: flex; flex-direction: column; gap: var(--lm-space-3); padding-block-start: var(--lm-space-3); border-block-start: 1px solid var(--lm-border); }
.lm-community-split-form .lm-help { margin: 0; }
.lm-community-split-form__row { 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-community-split-form__who { display: flex; flex-direction: column; min-inline-size: 0; flex: 1 1 160px; overflow-wrap: anywhere; }
.lm-community-split-form__input { display: inline-flex; align-items: center; gap: var(--lm-space-2); flex: none; }
.lm-community-split-form__input .lm-input { inline-size: 96px; text-align: end; }
.lm-community-split-form__total { display: flex; justify-content: space-between; gap: var(--lm-space-3); margin: 0; padding-block-start: var(--lm-space-2); border-block-start: 1px dashed var(--lm-border-strong); font-weight: var(--lm-weight-semibold); }
.lm-community-split-form__total .is-ok { color: var(--lm-success-text); }
.lm-community-split-form__total .is-off { color: var(--lm-danger-text); }

.lm-community-kicks { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: var(--lm-space-3) 0 0; padding: 0; list-style: none; }
.lm-community-kicks__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2) var(--lm-space-3); padding: var(--lm-space-3); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-sm); min-inline-size: 0; }
.lm-community-kicks__text { flex: 1 1 200px; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-community-kicks__text p { margin: 0; }

@media (max-width: 640px) {
  .lm-community-entry { padding: var(--lm-space-4); }
  .lm-community-entry__actions .lm-btn { flex: 1 1 auto; justify-content: center; }
  .lm-community-paid__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lm-community-split-form__input .lm-input { inline-size: 84px; }
}
/* ==========================================================================
   Phase 41. Community subscriptions: the plan on the checkout, the member's
   automatic-renewal choice, the Main Admin's plan and subscribers, the
   member's Billing page. The checkout's and paid tab's own classes wherever
   they fit; every icon sized.
   ========================================================================== */

.lm-community-entry__plan { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: 0 0 var(--lm-space-2); font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; min-inline-size: 0; }
.lm-community-entry__plan svg { inline-size: 18px; block-size: 18px; flex: none; margin-block-start: 2px; }

.lm-community-auto { display: flex; flex-direction: column; align-items: flex-start; gap: var(--lm-space-2); margin: 0 0 var(--lm-space-3); padding: var(--lm-space-3); border: 1px dashed var(--lm-border-strong); border-radius: var(--lm-radius-md); min-inline-size: 0; }
.lm-community-auto__state { display: flex; align-items: center; gap: var(--lm-space-2); margin: 0; font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-community-auto__state svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-community-auto .lm-help { margin: 0; }

.lm-community-plan { display: flex; flex-wrap: wrap; gap: var(--lm-space-2) var(--lm-space-4); margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.lm-community-plan legend { padding: 0; margin-block-end: var(--lm-space-2); }
.lm-community-plan .lm-help { flex-basis: 100%; margin: 0; }
.lm-community-plan__choice { min-inline-size: 0; }

.lm-community-subs { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0 0 var(--lm-space-3); padding: 0; list-style: none; }
.lm-community-subs__row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--lm-space-1) var(--lm-space-3); padding: var(--lm-space-2) var(--lm-space-3); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-sm); min-inline-size: 0; }
.lm-community-subs__who { font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; min-inline-size: 0; }

.lm-community-sub-note { margin-block: 0 var(--lm-space-3); }
.lm-community-sub-note .lm-link { margin-inline-start: var(--lm-space-1); }
.lm-community-sub-note .lm-alert__body p { margin: 0; }

.lm-community-billing__back { margin: 0 0 var(--lm-space-3); }
.lm-community-billing__back .lm-link { display: inline-flex; align-items: center; gap: var(--lm-space-1); }
.lm-community-billing__back svg { inline-size: 16px; block-size: 16px; flex: none; }
[dir="rtl"] .lm-community-billing__back svg { transform: scaleX(-1); }
.lm-community-billing__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--lm-space-2); }
.lm-community-billing__head > div { min-inline-size: 0; overflow-wrap: anywhere; }
.lm-community-billing__head .lm-help { margin: var(--lm-space-1) 0 0; }
.lm-community-billing .lm-card__body > .lm-alert,
.lm-community-billing .lm-card__body > .lm-community__hint { margin-block-end: var(--lm-space-3); }
.lm-community-billing__facts { margin-block-start: 0; }
.lm-community-billing__actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); margin: var(--lm-space-4) 0 var(--lm-space-2); }
.lm-community-billing .lm-card__body > .lm-help { margin: var(--lm-space-2) 0 0; }
.lm-community-billing__note { margin: 0; padding: 0 var(--lm-space-4) var(--lm-space-2); }
.lm-community-billing__list,
.lm-community-billing__history { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.lm-community-billing__item { 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-block-start: 1px solid var(--lm-border); min-inline-size: 0; }
.lm-community-billing__item-main { flex: 1 1 220px; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-community-billing__item-main p { margin: 0; }
.lm-community-billing__name { font-weight: var(--lm-weight-semibold); }
.lm-community-billing__line { padding: var(--lm-space-3) 0; border-block-start: 1px solid var(--lm-border); min-inline-size: 0; }
.lm-community-billing__line:first-child { border-block-start: 0; padding-block-start: 0; }
.lm-community-billing__line-main { min-inline-size: 0; overflow-wrap: anywhere; }
.lm-community-billing__line-main p { margin: 0; }
.lm-community-billing__line[data-lm-sub-line="failed"] strong { color: var(--lm-text-secondary); }

/* A subscription's button says more ("Subscribe · $5.00 a month"): on the
   narrowest phones, where the header keeps the button and its menu on one
   line beside the picture, the line may shrink and the words wrap. */
@media (max-width: 379px) {
  .lm-community__actions { flex: 1 1 auto; min-inline-size: 0; }
  .lm-community__actions > .lm-btn { min-inline-size: 0; white-space: normal; text-align: center; }
  .lm-community__actions > .lm-btn span { overflow-wrap: anywhere; }
}

@media (max-width: 640px) {
  .lm-community-billing__actions .lm-btn { flex: 1 1 auto; justify-content: center; }
  .lm-community-billing__item { padding-inline: var(--lm-space-3); }
  .lm-community-billing__item .lm-btn { flex: 1 1 100%; justify-content: center; }
}
/* ==========================================================================
   Phase 42. Community packages: the selector's cards and the Main Admin's
   manager. Accents are NAMES of the design system's own colour pairs (a
   class each, theme-aware), never a colour from a form. Every icon sized.
   ========================================================================== */

.lm-pkg-page__head .lm-help { margin: var(--lm-space-1) 0 0; }
.lm-pkg-page__note { margin: var(--lm-space-4) 0 0; }
.lm-pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--lm-space-4); margin: 0; }

.lm-pkg { --lm-pkg-fg: var(--lm-badge-slate-fg); --lm-pkg-bg: var(--lm-badge-slate-bg);
  display: flex; flex-direction: column; gap: var(--lm-space-2); min-inline-size: 0; padding: var(--lm-space-4); border: 1px solid var(--lm-border); border-block-start: 4px solid var(--lm-pkg-fg);
  border-radius: var(--lm-radius-md); background-color: var(--lm-surface); }
.lm-pkg--coral  { --lm-pkg-fg: var(--lm-primary-text); --lm-pkg-bg: var(--lm-primary-soft); }
.lm-pkg--blue   { --lm-pkg-fg: var(--lm-badge-blue-fg); --lm-pkg-bg: var(--lm-badge-blue-bg); }
.lm-pkg--green  { --lm-pkg-fg: var(--lm-badge-teal-fg); --lm-pkg-bg: var(--lm-badge-teal-bg); }
.lm-pkg--amber  { --lm-pkg-fg: var(--lm-badge-gold-fg); --lm-pkg-bg: var(--lm-badge-gold-bg); }
.lm-pkg--violet { --lm-pkg-fg: var(--lm-badge-violet-fg); --lm-pkg-bg: var(--lm-badge-violet-bg); }
.lm-pkg--slate  { --lm-pkg-fg: var(--lm-badge-slate-fg); --lm-pkg-bg: var(--lm-badge-slate-bg); }
.lm-pkg.is-popular { box-shadow: 0 0 0 2px var(--lm-pkg-fg); }
.lm-pkg.is-current { background-color: var(--lm-pkg-bg); }
.lm-pkg.is-focus { outline: 3px solid var(--lm-primary-ring); outline-offset: 2px; }
.lm-pkg__head { display: flex; align-items: flex-start; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-pkg__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; inline-size: 40px; block-size: 40px; border-radius: 50%; background-color: var(--lm-pkg-bg); color: var(--lm-pkg-fg); }
.lm-pkg__icon svg { inline-size: 22px; block-size: 22px; }
.lm-pkg__title { min-inline-size: 0; flex: 1 1 auto; }
.lm-pkg__name { margin: 0; font-size: var(--lm-text-lg); overflow-wrap: anywhere; }
.lm-pkg__marks { display: flex; flex-wrap: wrap; gap: var(--lm-space-1); margin: var(--lm-space-1) 0 0; }
.lm-pkg__marks:empty { display: none; }
.lm-pkg__price { margin: var(--lm-space-2) 0 0; font-size: var(--lm-text-xl); font-weight: var(--lm-weight-bold); overflow-wrap: anywhere; }
.lm-pkg__plan { margin: 0; }
.lm-pkg__desc { margin: var(--lm-space-1) 0 0; color: var(--lm-text-secondary); white-space: pre-line; overflow-wrap: anywhere; }
.lm-pkg__benefits { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: var(--lm-space-2) 0 0; padding: 0; list-style: none; }
.lm-pkg__benefits li { display: flex; align-items: flex-start; gap: var(--lm-space-2); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-pkg__benefits svg { inline-size: 16px; block-size: 16px; flex: none; margin-block-start: 3px; color: var(--lm-success-text); }
.lm-pkg__foot { margin-block-start: auto; padding-block-start: var(--lm-space-3); }
.lm-pkg__foot .lm-help { margin: var(--lm-space-1) 0 0; }
.lm-pkg__foot .lm-help svg { inline-size: 14px; block-size: 14px; vertical-align: -2px; }
.lm-pkg__buy { inline-size: 100%; justify-content: center; }
[data-lm-pkg-locked] { margin-block-end: var(--lm-space-4); }
.lm-pkg__current { margin: 0; }
.lm-pkg__current .lm-badge { display: inline-flex; align-items: center; gap: var(--lm-space-1); }
.lm-pkg__current svg { inline-size: 14px; block-size: 14px; }

.lm-pkgm__list { display: flex; flex-direction: column; gap: var(--lm-space-3); margin: var(--lm-space-3) 0; padding: 0; list-style: none; }
.lm-pkgm__row { display: flex; flex-direction: column; gap: var(--lm-space-3); padding: var(--lm-space-3); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-sm); min-inline-size: 0; }
.lm-pkgm__row.is-archived { opacity: .8; }
.lm-pkgm__summary { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-pkgm__who { min-inline-size: 0; flex: 1 1 200px; overflow-wrap: anywhere; }
.lm-pkgm__who p, .lm-pkgm__marks { margin: 0; }
.lm-pkgm__marks { display: flex; flex-wrap: wrap; gap: var(--lm-space-1); }
.lm-pkgm__stats { margin: 0; }
.lm-pkgm__buttons { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }
.lm-pkgm__edit > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: var(--lm-space-1); }
.lm-pkgm__edit > summary::-webkit-details-marker { display: none; }
.lm-pkgm__edit > summary svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-pkgm__edit[open] > summary { margin-block-end: var(--lm-space-3); }
.lm-pkgm__form { display: flex; flex-direction: column; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-pkgm__form .lm-field { margin: 0; min-inline-size: 0; }
.lm-pkgm__form .lm-help { margin: 0; }
.lm-pkgm__pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--lm-space-3); }
.lm-pkgm__fixed { margin: 0; font-weight: var(--lm-weight-semibold); }
.lm-pkgm__new { margin-block-start: var(--lm-space-2); }

@media (max-width: 640px) {
  .lm-pkg-grid { grid-template-columns: minmax(0, 1fr); }
  .lm-pkgm__buttons .lm-btn { flex: 1 1 auto; justify-content: center; }
}
.lm-community-entry__package { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: 0 0 var(--lm-space-2); overflow-wrap: anywhere; min-inline-size: 0; }
.lm-community-entry__package svg { inline-size: 18px; block-size: 18px; flex: none; margin-block-start: 2px; }

/* ==========================================================================
   Phase 42.1. Package privileges: the locked card (a post, a capability),
   the access picker, what a package enforces on its card, and the manager's
   grants, inheritance, capabilities and audit. Every icon sized.
   ========================================================================== */

.lm-post--locked .lm-post__community svg { inline-size: 14px; block-size: 14px; }
.lm-post-lock { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--lm-space-3); margin: var(--lm-space-3) var(--lm-space-4) var(--lm-space-4);
  padding: var(--lm-space-4); border: 1px dashed var(--lm-border-strong); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); min-inline-size: 0; }
.lm-capability-lock .lm-post-lock { margin: var(--lm-space-4); }
.lm-post-lock__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; inline-size: 40px; block-size: 40px; border-radius: 50%;
  background-color: var(--lm-badge-gold-bg); color: var(--lm-badge-gold-fg); }
.lm-post-lock__icon svg { inline-size: 20px; block-size: 20px; }
.lm-post-lock__body { flex: 1 1 220px; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-post-lock__title { margin: 0; font-weight: var(--lm-weight-semibold); }
.lm-post-lock__text { margin: var(--lm-space-1) 0 0; color: var(--lm-text-secondary); }
.lm-post-lock__body .lm-help { margin: var(--lm-space-1) 0 0; }
.lm-post-lock__cta { flex: none; align-self: center; }

/* Compound: components.css (loaded after) sets .lm-editor__row's centring. */
.lm-editor__row.lm-access-picker { align-items: flex-start; }
.lm-editor__row.lm-access-picker > .lm-editor__row-icon { margin-block-start: var(--lm-space-1); }
.lm-access-picker .lm-editor__row-body { display: flex; flex-direction: column; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-access-picker__packages { display: flex; flex-direction: column; gap: var(--lm-space-1); min-inline-size: 0; }
.lm-access-picker__packages[hidden] { display: none !important; }
.lm-access-picker__packages .lm-switch-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); overflow-wrap: anywhere; }
.lm-access-picker .lm-help { margin: 0; }

.lm-pkg__enforced, .lm-pkg__described { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: var(--lm-space-2) 0 0; padding: var(--lm-space-3); border-radius: var(--lm-radius-sm); min-inline-size: 0; }
.lm-pkg__enforced { background-color: var(--lm-success-soft); color: var(--lm-success-text); }
.lm-pkg__described { border: 1px solid var(--lm-border); }
.lm-pkg__block-title { display: flex; align-items: center; gap: var(--lm-space-2); margin: 0; font-size: var(--lm-text-sm); font-weight: var(--lm-weight-semibold); }
.lm-pkg__block-title svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-pkg__described .lm-pkg__block-title { color: var(--lm-text-secondary); }
.lm-pkg__enforced-list { display: flex; flex-direction: column; gap: var(--lm-space-1); margin: 0; padding: 0; list-style: none; }
.lm-pkg__enforced-list li { display: flex; align-items: flex-start; gap: var(--lm-space-2); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-pkg__enforced-list svg { inline-size: 16px; block-size: 16px; flex: none; margin-block-start: 3px; }
.lm-pkg__described .lm-pkg__desc, .lm-pkg__described .lm-pkg__benefits { margin: 0; }

.lm-pkgm__grants { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: var(--lm-space-2); margin: 0; min-inline-size: 0; }
.lm-pkgm__grants > div { min-inline-size: 0; padding: var(--lm-space-2) var(--lm-space-3); border-radius: var(--lm-radius-sm); background-color: var(--lm-success-soft); }
.lm-pkgm__grants dt { margin: 0; font-size: var(--lm-text-xs); color: var(--lm-success-text); font-weight: var(--lm-weight-semibold); }
.lm-pkgm__grants dd { margin: var(--lm-space-1) 0 0; overflow-wrap: anywhere; }
.lm-pkgm__includes .lm-switch-line, .lm-pkgm__cap .lm-switch-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); overflow-wrap: anywhere; }
.lm-pkgm__cap + .lm-pkgm__cap { margin-block-start: var(--lm-space-4); padding-block-start: var(--lm-space-4); border-block-start: 1px solid var(--lm-border); }
.lm-pkgm__audit { display: flex; flex-direction: column; gap: var(--lm-space-3); margin: 0; padding: 0; list-style: none; }
.lm-pkgm__audit li { padding-block-end: var(--lm-space-3); border-block-end: 1px solid var(--lm-border); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-pkgm__audit li:last-child { border-block-end: 0; padding-block-end: 0; }
.lm-pkgm__audit p { margin: 0; }

@media (max-width: 640px) {
  .lm-post-lock__cta { inline-size: 100%; justify-content: center; }
}

/* ==========================================================================
   Phase 43. Community content: approval (the card's notice, the queue),
   pins, closed comments, search, the FAQ and the Media tab. Every icon sized.
   ========================================================================== */

.lm-post__reason.lm-post__pinned { color: var(--lm-primary-text); font-weight: var(--lm-weight-semibold); }
.lm-post__review { display: flex; align-items: flex-start; gap: var(--lm-space-3); margin: var(--lm-space-3) var(--lm-space-4) 0; padding: var(--lm-space-3);
  border-radius: var(--lm-radius-md); background-color: var(--lm-warning-soft); color: var(--lm-warning-text); min-inline-size: 0; }
.lm-post__review--rejected { background-color: var(--lm-danger-soft); color: var(--lm-danger-text); }
.lm-post__review > svg { inline-size: 18px; block-size: 18px; flex: none; margin-block-start: 2px; }
.lm-post__review-text { flex: 1 1 auto; min-inline-size: 0; overflow-wrap: anywhere; font-size: var(--lm-text-sm); }
.lm-post__review-text p { margin: 0; }
.lm-post__review-text p + p { margin-block-start: var(--lm-space-1); }
.lm-post__review-title { font-weight: var(--lm-weight-semibold); }
.lm-post__closed { display: flex; align-items: center; gap: var(--lm-space-2); margin: 0 0 var(--lm-space-2); color: var(--lm-muted); font-size: var(--lm-text-sm); }
.lm-post__closed svg { inline-size: 15px; block-size: 15px; flex: none; }
.lm-comment__pinned { display: flex; align-items: center; gap: var(--lm-space-1); margin: 0 0 var(--lm-space-1); color: var(--lm-primary-text); font-size: var(--lm-text-xs); font-weight: var(--lm-weight-semibold); }
.lm-comment__pinned svg { inline-size: 13px; block-size: 13px; flex: none; }
.lm-post-edit__review { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: var(--lm-space-2) 0 0; }
.lm-post-edit__review svg { inline-size: 15px; block-size: 15px; flex: none; margin-block-start: 2px; }

.lm-community-search { padding: var(--lm-space-3); }
.lm-community-search .lm-search__field svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-community-search__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-community-search__title { margin: 0; font-size: var(--lm-text-md); font-weight: var(--lm-weight-semibold); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-community-section-title { display: flex; align-items: center; gap: var(--lm-space-2); margin: 0; font-size: var(--lm-text-sm); font-weight: var(--lm-weight-semibold); color: var(--lm-muted); }
.lm-community-section-title svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-community-own-review, .lm-community-own-review__list, .lm-community-pinned, .lm-community-review__list { display: flex; flex-direction: column; gap: var(--lm-space-4); min-inline-size: 0; }
.lm-community-own-review[hidden] { display: none !important; }

.lm-review-item { display: flex; flex-direction: column; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-review-item__decide { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); padding: var(--lm-space-3); min-inline-size: 0; }
.lm-review-item__decide .lm-input { flex: 1 1 220px; min-inline-size: 0; }
.lm-review-item__buttons { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }
.lm-review-item__buttons svg { inline-size: 16px; block-size: 16px; flex: none; }

.lm-faq { display: flex; flex-direction: column; min-inline-size: 0; }
.lm-faq__item { border-block-end: 1px solid var(--lm-border); min-inline-size: 0; }
.lm-faq__item:last-child { border-block-end: 0; }
.lm-faq__question { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); padding: var(--lm-space-3) 0; cursor: pointer; list-style: none;
  font-weight: var(--lm-weight-semibold); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-faq__question::-webkit-details-marker { display: none; }
.lm-faq__question > span:first-child { flex: 1 1 200px; min-inline-size: 0; }
.lm-faq__question .lm-badge { display: inline-flex; align-items: center; gap: var(--lm-space-1); }
.lm-faq__question .lm-badge svg { inline-size: 12px; block-size: 12px; flex: none; }
.lm-faq__question > svg.lm-faq__chevron { inline-size: 18px; block-size: 18px; flex: none; transition: transform var(--lm-duration-fast, .15s) ease; }
.lm-faq__item[open] > .lm-faq__question > svg.lm-faq__chevron { transform: rotate(180deg); }
.lm-faq__answer { margin: 0 0 var(--lm-space-3); color: var(--lm-text-secondary); white-space: pre-line; overflow-wrap: anywhere; min-inline-size: 0; }
.lm-faq__manage { display: flex; flex-direction: column; gap: var(--lm-space-3); margin: 0 0 var(--lm-space-4); padding: var(--lm-space-3); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); min-inline-size: 0; }
.lm-faq__actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }
.lm-faq__actions svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-faq__locked.lm-post-lock { margin: var(--lm-space-2) 0 0; }
.lm-faq-form { display: flex; flex-direction: column; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-faq-form .lm-field { margin: 0; }
.lm-faq-form .lm-alert svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-faq-form__buttons { display: flex; justify-content: flex-end; }
.lm-community-faq { display: flex; flex-direction: column; gap: var(--lm-space-3); padding: var(--lm-space-5); min-inline-size: 0; }

.lm-community-media { display: flex; flex-direction: column; gap: var(--lm-space-3); padding: var(--lm-space-5); min-inline-size: 0; }
.lm-community-media__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--lm-space-1); min-inline-size: 0; }
.lm-media-tile { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--lm-radius-sm); background-color: var(--lm-surface-secondary); min-inline-size: 0; }
.lm-media-tile img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.lm-media-tile__veil { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--lm-space-1);
  padding: var(--lm-space-2); color: var(--lm-muted); font-size: var(--lm-text-xs); text-align: center; overflow-wrap: anywhere; }
.lm-media-tile__veil svg { inline-size: 22px; block-size: 22px; flex: none; }

@media (max-width: 640px) {
  .lm-community-faq, .lm-community-media { padding: var(--lm-space-4); }
  .lm-review-item__buttons { inline-size: 100%; }
  .lm-review-item__buttons .lm-btn { flex: 1 1 0; justify-content: center; }
}

/* ==========================================================================
   Phase 43.1. Community Chat: the community's Chat tab, and a community's
   chat in Messenger (its picture, a rounded square, and a badge — never a
   person's circle). Every icon sized.
   ========================================================================== */

.lm-community-chat { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-4); padding: var(--lm-space-5); min-inline-size: 0; }
.lm-community-chat__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; inline-size: 48px; block-size: 48px;
  border-radius: 50%; background-color: var(--lm-primary-soft); color: var(--lm-primary-text); }
.lm-community-chat__icon svg { inline-size: 24px; block-size: 24px; }
.lm-community-chat__body { flex: 1 1 240px; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-community-chat__title { margin: 0; font-size: var(--lm-text-md); font-weight: var(--lm-weight-semibold); }
.lm-community-chat__text { margin: var(--lm-space-1) 0 0; color: var(--lm-text-secondary); }
.lm-community-chat__body .lm-help { margin: var(--lm-space-1) 0 0; }
.lm-community-chat__open { flex: none; }
.lm-community-chat__open svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-community-chat__platform-off { display: flex; align-items: flex-start; gap: var(--lm-space-2); color: var(--lm-warning-text); }
.lm-community-chat__platform-off svg { inline-size: 15px; block-size: 15px; flex: none; margin-block-start: 2px; }

.lm-badge.lm-convo__community-badge,
.lm-badge.lm-thread__community-badge { flex: 0 0 auto; padding-block: 0; background-color: var(--lm-primary-soft); color: var(--lm-primary-text); }
.lm-convo__top .lm-convo__community-badge { align-self: center; flex: none; }
.lm-convo > .lm-community-pic { inline-size: 44px; block-size: 44px; }
.lm-thread__person--community { min-inline-size: 0; }
.lm-thread__person--community > .lm-community-pic { inline-size: 36px; block-size: 36px; }
.lm-pick > .lm-community-pic { inline-size: 36px; block-size: 36px; }

@media (max-width: 640px) {
  .lm-community-chat { padding: var(--lm-space-4); }
  .lm-community-chat__open { inline-size: 100%; justify-content: center; }
}

/* ==========================================================================
   Phase 44. Community announcements (their tab, the editor, the pinned
   banner above the feed), a member's notification choices for a community
   (the header's bell, its panel), ratings (the header line, the About tab's
   stars, the cards) and the AdminCP's lines. Logical properties only (RTL);
   colours from the tokens (light and dark); every icon sized.
   ========================================================================== */

.lm-community-announce { padding: var(--lm-space-5); min-inline-size: 0; }
.lm-community-announce--editor { border-block-start: 3px solid var(--lm-primary); }
.lm-announce-form { display: flex; flex-direction: column; gap: var(--lm-space-3); }
.lm-announce-form .lm-textarea { min-block-size: 140px; }
.lm-announce-form__buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--lm-space-2); }
.lm-announce-form__buttons svg { inline-size: 16px; block-size: 16px; flex: none; }

.lm-announce-list { display: flex; flex-direction: column; gap: var(--lm-space-4); }
.lm-announce { display: flex; flex-direction: column; gap: var(--lm-space-2); padding: var(--lm-space-4); border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-md); background-color: var(--lm-surface); min-inline-size: 0; scroll-margin-block-start: 80px; }
.lm-announce.is-pinned { border-color: var(--lm-primary); box-shadow: inset 3px 0 0 var(--lm-primary); }
[dir="rtl"] .lm-announce.is-pinned { box-shadow: inset -3px 0 0 var(--lm-primary); }
.lm-announce:target { outline: 2px solid var(--lm-primary); outline-offset: 2px; }
.lm-announce__head { display: flex; align-items: flex-start; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-announce__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; inline-size: 36px; block-size: 36px;
  border-radius: 50%; background-color: var(--lm-primary-soft); color: var(--lm-primary-text); }
.lm-announce__icon svg { inline-size: 18px; block-size: 18px; }
.lm-announce__meta { flex: 1 1 auto; min-inline-size: 0; }
.lm-announce__title { margin: 0; font-size: var(--lm-text-md); font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-announce__byline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-1) var(--lm-space-2); margin: var(--lm-space-1) 0 0;
  color: var(--lm-muted); font-size: var(--lm-text-sm); }
.lm-announce__marks { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); margin: 0; }
.lm-announce__marks .lm-badge { display: inline-flex; align-items: center; gap: var(--lm-space-1); }
.lm-announce__marks svg { inline-size: 13px; block-size: 13px; flex: none; }
.lm-announce__body { white-space: pre-line; overflow-wrap: anywhere; color: var(--lm-text); line-height: 1.6; }
.lm-announce__manage { display: flex; flex-direction: column; gap: var(--lm-space-2); padding-block-start: var(--lm-space-2); border-block-start: 1px solid var(--lm-border); }
.lm-announce__manage .lm-help { margin: 0; }
.lm-announce__actions svg { inline-size: 16px; block-size: 16px; flex: none; }

.lm-announce-banner { display: flex; align-items: center; gap: var(--lm-space-3); padding: var(--lm-space-3) var(--lm-space-4); color: var(--lm-text);
  text-decoration: none; border-inline-start: 4px solid var(--lm-primary); min-inline-size: 0; }
.lm-announce-banner:hover { background-color: var(--lm-surface-2); }
.lm-announce-banner__icon { display: inline-flex; flex: none; color: var(--lm-primary-text); }
.lm-announce-banner__icon svg { inline-size: 22px; block-size: 22px; }
.lm-announce-banner__text { display: flex; flex-direction: column; flex: 1 1 auto; min-inline-size: 0; }
.lm-announce-banner__label { color: var(--lm-muted); font-size: var(--lm-text-sm); }
.lm-announce-banner__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-announce-banner__go { display: inline-flex; flex: none; color: var(--lm-muted); }
.lm-announce-banner__go svg { inline-size: 18px; block-size: 18px; }
[dir="rtl"] .lm-announce-banner__go svg { transform: scaleX(-1); }

.lm-community-notify { padding: var(--lm-space-5); min-inline-size: 0; }
.lm-community-notify__mute { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-2) var(--lm-space-3);
  margin-block-end: var(--lm-space-4); }
.lm-community-notify__mute .lm-help { flex: 1 1 220px; margin: 0; }
.lm-community-notify__mute svg, .lm-community-notify__muted .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-community-notify__muted { margin-block-end: var(--lm-space-4); }
.lm-community-notify__form { display: flex; flex-direction: column; gap: var(--lm-space-4); }
.lm-community-notify__group { display: flex; flex-direction: column; gap: var(--lm-space-3); margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.lm-community-notify__group[data-lm-muted] { opacity: .6; }
.lm-community-notify__group > legend { margin-block-end: var(--lm-space-2); padding: 0; }
.lm-community-notify__line { display: flex; align-items: flex-start; gap: var(--lm-space-3); cursor: pointer; min-inline-size: 0; }
.lm-community-notify__line input[type="checkbox"] { flex: none; inline-size: 18px; block-size: 18px; margin-block-start: 2px; accent-color: var(--lm-primary); }
.lm-community-notify__text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-community-notify__text .lm-help { margin: 0; }
.lm-community-notify__override { color: var(--lm-warning-text); }
.lm-community-notify__fixed { display: flex; align-items: center; gap: var(--lm-space-2); margin: 0; color: var(--lm-text-secondary); }
.lm-community-notify__fixed svg { inline-size: 16px; block-size: 16px; flex: none; }

.lm-icon-btn.is-muted { color: var(--lm-muted); }
[data-lm-community-bell] .lm-dropdown__item svg { inline-size: 18px; block-size: 18px; flex: none; }

.lm-community__rating { display: inline-flex; align-items: center; gap: var(--lm-space-1); color: inherit; text-decoration: none; }
.lm-community__rating:hover { color: var(--lm-text); }
.lm-community__rating svg, .lm-community-card__rating svg { color: var(--lm-warning); fill: currentColor; }
.lm-community-card__rating { display: inline-flex; align-items: center; gap: 2px; }
.lm-community__rating-count { color: var(--lm-muted); }

.lm-community-rating { padding: var(--lm-space-5); min-inline-size: 0; }
.lm-community-rating__summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-1) var(--lm-space-2); margin: 0 0 var(--lm-space-2);
  font-size: var(--lm-text-md); }
.lm-community-rating__star { display: inline-flex; color: var(--lm-warning); }
.lm-community-rating__star svg { inline-size: 20px; block-size: 20px; fill: currentColor; }
.lm-stars { display: flex; flex-wrap: wrap; gap: var(--lm-space-1); margin-block: var(--lm-space-3) var(--lm-space-1); }
.lm-stars__star { display: inline-flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; padding: 0;
  border: 1px solid var(--lm-border); border-radius: var(--lm-radius-sm); background-color: var(--lm-surface); color: var(--lm-muted); cursor: pointer; }
.lm-stars__star svg { inline-size: 22px; block-size: 22px; }
.lm-stars__star.is-on { color: var(--lm-warning); border-color: var(--lm-warning); }
.lm-stars__star.is-on svg { fill: currentColor; }
.lm-stars__star:focus-visible { outline: 2px solid var(--lm-primary); outline-offset: 2px; }

.lm-cp-announce { display: flex; flex-direction: column; gap: var(--lm-space-3); margin: 0; padding: 0; list-style: none; }
.lm-cp-announce__item { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--lm-space-2) var(--lm-space-3);
  padding-block-end: var(--lm-space-3); border-block-end: 1px solid var(--lm-border); }
.lm-cp-announce__text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-cp-announce__body { margin: var(--lm-space-1) 0 0; white-space: pre-line; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }

@media (max-width: 640px) {
  .lm-community-announce, .lm-community-notify, .lm-community-rating { padding: var(--lm-space-4); }
  .lm-announce { padding: var(--lm-space-3); }
  .lm-announce-form__buttons .lm-btn { flex: 1 1 auto; justify-content: center; }
}

/* ==========================================================================
   Phase 45. Package trials: the offer line on a package card, the
   confirmation (terms, consent), the Main Admin's trial fields, and the
   trial on the billing page. Every icon sized.
   ========================================================================== */

.lm-pkg__trial { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: var(--lm-space-2) 0 0; padding: var(--lm-space-2) var(--lm-space-3);
  border-radius: var(--lm-radius-sm); background-color: var(--lm-pkg-bg); color: var(--lm-text); font-weight: var(--lm-weight-semibold);
  font-size: var(--lm-text-sm); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-pkg__trial svg { inline-size: 16px; block-size: 16px; flex: none; margin-block-start: 2px; color: var(--lm-pkg-fg); }
.lm-pkg__trial-start + .lm-pkg__buy, .lm-pkg__trial-start + .lm-help + .lm-pkg__buy { margin-block-start: var(--lm-space-2); }
.lm-pkg__foot > .lm-btn + .lm-btn { margin-block-start: var(--lm-space-2); }
[data-lm-pkg-trialing] { margin-block-end: var(--lm-space-4); }

.lm-community-trial__offer { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: var(--lm-space-1) 0 0; color: var(--lm-text);
  font-weight: var(--lm-weight-semibold); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-community-trial__offer svg { inline-size: 18px; block-size: 18px; flex: none; margin-block-start: 2px; color: var(--lm-primary-text); }
.lm-community-trial__terms { margin-block: var(--lm-space-3); }
.lm-community-trial__terms dd .lm-help { display: block; margin: 0; }
.lm-community-trial__consent { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: 0 0 var(--lm-space-3); padding: var(--lm-space-3);
  border: 1px solid var(--lm-border-strong); border-radius: var(--lm-radius-md); min-inline-size: 0; overflow-wrap: anywhere; cursor: pointer; }
.lm-community-trial__consent input { flex: none; margin-block-start: 3px; }
.lm-community-trial__card { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: var(--lm-space-3) 0 0; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-community-trial__card svg { inline-size: 16px; block-size: 16px; flex: none; margin-block-start: 2px; }
.lm-community-trial [data-lm-trial-start] svg, .lm-pkg__trial-start svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-community-trial .lm-alert { margin-block-end: var(--lm-space-3); }

.lm-pkgm__trial { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0; padding: var(--lm-space-3); border: 1px dashed var(--lm-border-strong);
  border-radius: var(--lm-radius-md); min-inline-size: 0; }
.lm-pkgm__trial legend { padding-inline: var(--lm-space-1); }
.lm-pkgm__trial .lm-help svg { inline-size: 14px; block-size: 14px; vertical-align: -2px; }
.lm-pkgm__trial-days { max-inline-size: 8rem; }
.lm-pkgm__trial-line svg { inline-size: 14px; block-size: 14px; vertical-align: -2px; }

@media (max-width: 640px) {
  .lm-community-trial__consent { padding: var(--lm-space-2); }
  .lm-community-trial [data-lm-trial-start] { inline-size: 100%; justify-content: center; }
}

/* Phase 46. Switching packages: the change (from → to), the money, the consent. */
.lm-community-switch__kind { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); margin: var(--lm-space-1) 0 0; min-inline-size: 0; }
.lm-community-switch__pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: var(--lm-space-3); margin: 0 0 var(--lm-space-3); }
.lm-community-switch__side { display: flex; flex-direction: column; gap: var(--lm-space-1); padding: var(--lm-space-3); border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-md); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-community-switch__side p { margin: 0; }
.lm-community-switch__side.is-target { border-color: var(--lm-primary-ring); background: var(--lm-primary-soft); }
.lm-community-switch__label { font-size: var(--lm-text-xs); color: var(--lm-text-secondary); text-transform: uppercase; letter-spacing: .04em; }
.lm-community-switch__name { font-weight: var(--lm-weight-semibold); color: var(--lm-text); }
.lm-community-switch__arrow { display: flex; align-items: center; color: var(--lm-text-secondary); }
.lm-community-switch__arrow svg { inline-size: 20px; block-size: 20px; flex: none; }
[dir="rtl"] .lm-community-switch__arrow svg { transform: scaleX(-1); }
.lm-community-switch__money { margin-block: var(--lm-space-3); }
.lm-community-switch__how { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: 0 0 var(--lm-space-3); color: var(--lm-text); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-community-switch__how svg { inline-size: 16px; block-size: 16px; flex: none; margin-block-start: 3px; color: var(--lm-primary-text); }
.lm-community-switch__consent { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: 0 0 var(--lm-space-3); padding: var(--lm-space-3);
  border: 1px solid var(--lm-border-strong); border-radius: var(--lm-radius-md); min-inline-size: 0; overflow-wrap: anywhere; cursor: pointer; }
.lm-community-switch__consent input { flex: none; margin-block-start: 3px; }
.lm-community-switch [data-lm-switch-start] svg, .lm-pkg__foot [data-lm-pkg-switch] svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-community-switch .lm-alert, .lm-community-switch__open { margin-block-end: var(--lm-space-3); }
.lm-community-switch__open .lm-alert__body p + p { margin-block-start: var(--lm-space-1); }
[data-lm-pkg-switching], [data-lm-pkg-switch-scheduled], [data-lm-pkg-switch-why] { margin-block-end: var(--lm-space-4); }
.lm-community-billing__line-main svg { inline-size: 14px; block-size: 14px; vertical-align: -2px; }
[dir="rtl"] .lm-community-billing__line-main svg { transform: scaleX(-1); }

@media (max-width: 640px) {
  .lm-community-switch__pair { grid-template-columns: minmax(0, 1fr); }
  .lm-community-switch__arrow { justify-content: center; }
  .lm-community-switch__arrow svg { transform: rotate(90deg); }
  [dir="rtl"] .lm-community-switch__arrow svg { transform: rotate(90deg); }
  .lm-community-switch__consent { padding: var(--lm-space-2); }
  .lm-community-switch [data-lm-switch-start] { inline-size: 100%; justify-content: center; }
}

/* Phase 47. A grace after a failed renewal, on the member's billing page:
   a warning panel (never a trial's look), its facts as label/value lines. */
.lm-community-grace { display: flex; flex-direction: column; gap: var(--lm-space-2); margin-block-end: var(--lm-space-4); padding: var(--lm-space-3) var(--lm-space-4);
  border: 1px solid var(--lm-border-strong); border-inline-start: 4px solid var(--lm-warning-text); border-radius: var(--lm-radius-md);
  background-color: var(--lm-warning-soft); color: var(--lm-text); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-community-grace__head { display: flex; align-items: flex-start; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-community-grace__head > svg { inline-size: 20px; block-size: 20px; flex: none; margin-block-start: 2px; color: var(--lm-warning-text); }
.lm-community-grace__title { margin: 0; font-weight: var(--lm-weight-bold); }
.lm-community-grace__why, .lm-community-grace__access, .lm-community-grace .lm-help { margin: 0; }
.lm-community-grace__access { font-weight: var(--lm-weight-bold); }
.lm-community-grace__facts { display: flex; flex-direction: column; gap: var(--lm-space-1); margin: 0; padding-block: var(--lm-space-2); border-block: 1px solid var(--lm-border); }
.lm-community-grace__facts > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--lm-space-1) var(--lm-space-3); min-inline-size: 0; }
.lm-community-grace__facts dt { color: var(--lm-text-secondary); }
.lm-community-grace__facts dd { margin: 0; text-align: end; overflow-wrap: anywhere; min-inline-size: 0; }
.lm-community-grace .lm-help svg { inline-size: 14px; block-size: 14px; vertical-align: -2px; }

/* Phase 47.1. A pause on the member's billing page: pending or in effect —
   an information panel (never the grace's warning look), its facts as
   label/value lines, the resume choice under them. */
.lm-community-pause { display: flex; flex-direction: column; gap: var(--lm-space-2); margin-block-end: var(--lm-space-4); padding: var(--lm-space-3) var(--lm-space-4);
  border: 1px solid var(--lm-border-strong); border-inline-start: 4px solid var(--lm-text-secondary); border-radius: var(--lm-radius-md);
  background-color: var(--lm-surface-2); color: var(--lm-text); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-community-pause__head { display: flex; align-items: flex-start; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-community-pause__head > svg { inline-size: 20px; block-size: 20px; flex: none; margin-block-start: 2px; color: var(--lm-text-secondary); }
.lm-community-pause__title { margin: 0; font-weight: var(--lm-weight-bold); }
.lm-community-pause .lm-help { margin: 0; }
.lm-community-pause .lm-help svg { inline-size: 14px; block-size: 14px; vertical-align: -2px; }
.lm-community-pause__facts { display: flex; flex-direction: column; gap: var(--lm-space-1); margin: 0; padding-block: var(--lm-space-2); border-block: 1px solid var(--lm-border); }
.lm-community-pause__facts > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--lm-space-1) var(--lm-space-3); min-inline-size: 0; }
.lm-community-pause__facts dt { color: var(--lm-text-secondary); }
.lm-community-pause__facts dd { margin: 0; text-align: end; overflow-wrap: anywhere; min-inline-size: 0; }
.lm-community-pause__resume { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0; min-inline-size: 0; }
.lm-community-pause .lm-community-billing__actions { margin: 0; }

/* Phase 48. Coupons: the code field and what is applied (a checkout, a
   trial, a running discount), the Main Admin's list and form. */
.lm-community-coupon { display: flex; flex-direction: column; gap: var(--lm-space-2); margin-block: var(--lm-space-3); padding: var(--lm-space-3);
  border: 1px dashed var(--lm-border-strong); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-2); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-community-coupon--live { border-style: solid; }
.lm-community-coupon .lm-help { margin: 0; }
.lm-community-coupon .lm-help svg { inline-size: 14px; block-size: 14px; vertical-align: -2px; }
.lm-community-coupon__applied { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: 0; font-weight: var(--lm-weight-bold); min-inline-size: 0; }
.lm-community-coupon__applied > svg { inline-size: 18px; block-size: 18px; flex: none; margin-block-start: 2px; color: var(--lm-success-text); }
.lm-community-coupon__form { display: flex; flex-direction: column; gap: var(--lm-space-1); margin: 0; min-inline-size: 0; }
.lm-community-coupon__row { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-community-coupon__row .lm-input { flex: 1 1 10rem; min-inline-size: 0; text-transform: uppercase; }
.lm-community-coupon__row .lm-btn { flex: none; }
/* Phase 49. Gifts of packages: the offer form, a gift's page (who, what it gives, the sender's
   message, the answer or the payment), the card's "give" link. Long names and messages wrap. */
.lm-community-gift { min-inline-size: 0; overflow-wrap: anywhere; }
.lm-community-gift__form { display: flex; flex-direction: column; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-community-gift__people { display: flex; align-items: center; gap: var(--lm-space-2); min-inline-size: 0; margin-block-end: var(--lm-space-2); }
.lm-community-gift__people p { margin: 0; min-inline-size: 0; }
.lm-community-gift__rule { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: var(--lm-space-2) 0; color: var(--lm-text); }
.lm-community-gift__rule svg { inline-size: 18px; block-size: 18px; flex: none; margin-block-start: 2px; color: var(--lm-primary-text); }
.lm-community-gift__message { margin: var(--lm-space-2) 0; padding: var(--lm-space-2) var(--lm-space-3); border-inline-start: 3px solid var(--lm-border-strong);
  background-color: var(--lm-surface-2); border-radius: var(--lm-radius-sm); color: var(--lm-text); white-space: pre-line; overflow-wrap: anywhere; }
.lm-community-gift__pay { display: flex; flex-direction: column; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-community-gift__pay > .lm-help svg { inline-size: 14px; block-size: 14px; vertical-align: -2px; }
.lm-pkg__gift { align-self: flex-start; }
.lm-pkg__gift svg { inline-size: 16px; block-size: 16px; }

/* The Main Admin's coupon section: a long code or package name wraps, never widens the card. */
.lm-community-coupons { min-inline-size: 0; overflow-wrap: anywhere; }
.lm-coupon-list { display: flex; flex-direction: column; gap: var(--lm-space-3); margin: var(--lm-space-3) 0; padding: 0; list-style: none; }
.lm-coupon-list__item { display: flex; flex-direction: column; gap: var(--lm-space-2); padding: var(--lm-space-3); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-md); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-coupon-list__head { display: flex; flex-direction: column; gap: var(--lm-space-1); min-inline-size: 0; }
.lm-coupon-list__head .lm-help { margin: 0; }
.lm-coupon-list__code { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); margin: 0; }
.lm-coupon-list .lm-community-billing__actions { margin: 0; }
.lm-coupon-list__edit > summary, .lm-coupon-new > summary { cursor: pointer; list-style: none; }
.lm-coupon-list__edit > summary::-webkit-details-marker, .lm-coupon-new > summary::-webkit-details-marker { display: none; }
.lm-coupon-new { margin-block-start: var(--lm-space-3); }
.lm-coupon-form { display: flex; flex-direction: column; gap: var(--lm-space-3); margin-block-start: var(--lm-space-3); min-inline-size: 0; }
.lm-coupon-form .lm-field { margin: 0; min-inline-size: 0; }
.lm-coupon-form__choice { display: flex; flex-wrap: wrap; gap: var(--lm-space-2) var(--lm-space-4); margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.lm-coupon-form__choice > .lm-label, .lm-coupon-form__choice > legend { inline-size: 100%; }
.lm-coupon-form__choice > .lm-help, .lm-coupon-form__choice > .lm-field { inline-size: 100%; }
.lm-coupon-form__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lm-space-3); }
@media (max-width: 479px) {
  .lm-coupon-form__pair { grid-template-columns: minmax(0, 1fr); }
}

/* -- Phase 50. Community courses ------------------------------------------
   The Courses tab: a list of courses, a course with its numbered lessons,
   one lesson to read. Plain text everywhere (line breaks kept). Every icon
   sits in a sized box (Lm_Icon draws an unsized SVG).
   -------------------------------------------------------------------- */
.lm-courses { display: flex; flex-direction: column; gap: var(--lm-space-3); padding: var(--lm-space-5); min-inline-size: 0; }
.lm-courses .lm-post-lock { margin: 0; }
.lm-courses .lm-community-members__heading { margin: 0; }
.lm-courses__list, .lm-course__lessons { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; min-inline-size: 0; }
.lm-courses__item, .lm-course__lesson { display: flex; flex-direction: column; gap: var(--lm-space-2); padding: var(--lm-space-3) 0; border-block-end: 1px solid var(--lm-border); min-inline-size: 0; }
.lm-courses__item:last-child, .lm-course__lesson:last-child { border-block-end: 0; }
.lm-courses__link { display: flex; align-items: flex-start; gap: var(--lm-space-3); color: inherit; text-decoration: none; min-inline-size: 0; }
.lm-courses__link:hover .lm-courses__title, .lm-courses__link:focus-visible .lm-courses__title { text-decoration: underline; }
.lm-courses__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; inline-size: 40px; block-size: 40px; border-radius: var(--lm-radius-sm);
  background-color: var(--lm-info-soft); color: var(--lm-info-text); }
.lm-courses__icon svg { inline-size: 20px; block-size: 20px; flex: none; }
.lm-courses__text { display: flex; flex-direction: column; gap: var(--lm-space-1); flex: 1 1 auto; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-courses__title { font-weight: var(--lm-weight-semibold); }
.lm-courses__desc { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); white-space: pre-line;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.lm-courses__meta { margin: 0; color: var(--lm-muted); font-size: var(--lm-text-xs); }
.lm-courses__link > .lm-badge { flex: none; }
.lm-courses__actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }
.lm-courses__actions svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-courses__delete { color: var(--lm-danger-text); }
.lm-courses__back { margin: 0; }
.lm-courses__back .lm-link { display: inline-flex; align-items: center; gap: var(--lm-space-1); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-courses__back svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-courses__edit { min-inline-size: 0; }
.lm-courses__edit-summary { display: flex; align-items: center; gap: var(--lm-space-2); cursor: pointer; font-weight: var(--lm-weight-semibold); list-style: none; }
.lm-courses__edit-summary::-webkit-details-marker { display: none; }
.lm-courses__edit-summary svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-courses__edit[open] > .lm-courses__edit-summary { margin-block-end: var(--lm-space-3); }

.lm-courses-config { padding: var(--lm-space-4) var(--lm-space-5); min-inline-size: 0; }
.lm-courses-config__summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-2); cursor: pointer; list-style: none; }
.lm-courses-config__summary::-webkit-details-marker { display: none; }
.lm-courses-config__label { display: inline-flex; align-items: center; gap: var(--lm-space-2); font-weight: var(--lm-weight-semibold); min-inline-size: 0; }
.lm-courses-config__label svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-courses-config[open] > .lm-courses-config__summary { margin-block-end: var(--lm-space-3); }

.lm-course__title, .lm-lesson__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); margin: 0; font-size: var(--lm-text-xl); font-weight: var(--lm-weight-bold);
  line-height: var(--lm-leading-snug); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-course__title > span:first-child, .lm-lesson__title > span:first-child { min-inline-size: 0; }
.lm-course__desc { margin: 0; color: var(--lm-text-secondary); white-space: pre-line; overflow-wrap: anywhere; }
.lm-course__lessons-title { margin: var(--lm-space-2) 0 0; font-size: var(--lm-text-md); font-weight: var(--lm-weight-semibold); }
.lm-course__lesson-link { display: flex; align-items: center; gap: var(--lm-space-3); color: inherit; text-decoration: none; min-inline-size: 0; }
.lm-course__lesson-link:hover .lm-course__lesson-title, .lm-course__lesson-link:focus-visible .lm-course__lesson-title { text-decoration: underline; }
.lm-course__lesson-no { display: inline-flex; align-items: center; justify-content: center; flex: none; inline-size: 28px; block-size: 28px; border-radius: 50%;
  background-color: var(--lm-surface-secondary); color: var(--lm-text-secondary); font-size: var(--lm-text-sm); font-weight: var(--lm-weight-semibold); }
.lm-course__lesson-title { flex: 1 1 auto; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-course__lesson-link > .lm-badge { flex: none; }

.lm-lesson__step { margin: 0; color: var(--lm-muted); font-size: var(--lm-text-sm); }
.lm-lesson__body { color: var(--lm-text); line-height: var(--lm-leading); white-space: pre-line; overflow-wrap: anywhere; min-inline-size: 0; }
.lm-lesson__nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--lm-space-2); padding-block-start: var(--lm-space-3); border-block-start: 1px solid var(--lm-border); }
.lm-lesson__prev svg, .lm-lesson__next svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-lesson__next { margin-inline-start: auto; }

/* A lesson reads with more air; a course's lessons sit closer to their
   heading; a manager's buttons under an editor are set apart from it. */
.lm-lesson { gap: var(--lm-space-4); }
.lm-course .lm-course__lessons { margin-block-start: calc(-1 * var(--lm-space-2)); }
.lm-courses--new .lm-courses__edit + .lm-courses__actions { padding-block-start: var(--lm-space-3); border-block-start: 1px solid var(--lm-border); }

.lm-course-form { display: flex; flex-direction: column; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-course-form .lm-field { margin: 0; }
.lm-course-form .lm-alert svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-course-form__body { min-block-size: 12rem; }
.lm-course-form__buttons { display: flex; justify-content: flex-end; }

@media (max-width: 640px) {
  .lm-courses { padding: var(--lm-space-4); }
  .lm-courses-config { padding: var(--lm-space-3) var(--lm-space-4); }
  .lm-course__title, .lm-lesson__title { font-size: var(--lm-text-lg); }
}

/* -- Phase 51. Community contests -----------------------------------------
   The Contests tab: a list of contests, a contest with its rules, taking part
   and its entries. Plain text everywhere (line breaks kept). No scores or
   winners anywhere. Every icon sits in a sized box.
   -------------------------------------------------------------------- */
.lm-contests { display: flex; flex-direction: column; gap: var(--lm-space-3); padding: var(--lm-space-5); min-inline-size: 0; }
.lm-contests .lm-post-lock { margin: 0; }
.lm-contests .lm-community-members__heading { margin: 0; }
.lm-contests__list, .lm-contest-entries, .lm-contest-people { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; min-inline-size: 0; }
.lm-contests__item { padding: var(--lm-space-3) 0; border-block-end: 1px solid var(--lm-border); min-inline-size: 0; }
.lm-contests__item:last-child { border-block-end: 0; }
.lm-contests__link { display: flex; align-items: flex-start; gap: var(--lm-space-3); color: inherit; text-decoration: none; min-inline-size: 0; }
.lm-contests__link:hover .lm-contests__title, .lm-contests__link:focus-visible .lm-contests__title { text-decoration: underline; }
.lm-contests__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; inline-size: 40px; block-size: 40px; border-radius: var(--lm-radius-sm);
  background-color: var(--lm-warning-soft); color: var(--lm-warning-text); }
.lm-contests__icon svg { inline-size: 20px; block-size: 20px; flex: none; }
.lm-contests__text { display: flex; flex-direction: column; gap: var(--lm-space-1); flex: 1 1 auto; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-contests__title { font-weight: var(--lm-weight-semibold); }
.lm-contests__desc { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); white-space: pre-line;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.lm-contests__meta { margin: 0; color: var(--lm-muted); font-size: var(--lm-text-xs); }
.lm-contests__badges { display: flex; flex-direction: column; align-items: flex-end; gap: var(--lm-space-1); flex: none; }
.lm-contests__badges .lm-badge, .lm-contest__take-part .lm-badge { display: inline-flex; align-items: center; gap: var(--lm-space-1); }
.lm-contests__badges .lm-badge svg, .lm-contest__take-part .lm-badge svg { inline-size: 12px; block-size: 12px; flex: none; }
.lm-contests__actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }
.lm-contests__actions svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-contests__danger { color: var(--lm-danger-text); }
.lm-contests__back { margin: 0; }
.lm-contests__back .lm-link { display: inline-flex; align-items: center; gap: var(--lm-space-1); min-inline-size: 0; }
.lm-contests__back svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-contests__edit { min-inline-size: 0; }
.lm-contests__edit-summary { display: flex; align-items: center; gap: var(--lm-space-2); cursor: pointer; font-weight: var(--lm-weight-semibold); list-style: none; }
.lm-contests__edit-summary::-webkit-details-marker { display: none; }
.lm-contests__edit-summary svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-contests__edit[open] > .lm-contests__edit-summary { margin-block-end: var(--lm-space-3); }
.lm-contests--new .lm-contests__edit + .lm-contests__actions { padding-block-start: var(--lm-space-3); border-block-start: 1px solid var(--lm-border); }

.lm-contests-config { padding: var(--lm-space-4) var(--lm-space-5); min-inline-size: 0; }
.lm-contests-config__summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-2); cursor: pointer; list-style: none; }
.lm-contests-config__summary::-webkit-details-marker { display: none; }
.lm-contests-config__label { display: inline-flex; align-items: center; gap: var(--lm-space-2); font-weight: var(--lm-weight-semibold); min-inline-size: 0; }
.lm-contests-config__label svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-contests-config[open] > .lm-contests-config__summary { margin-block-end: var(--lm-space-3); }

.lm-contest { gap: var(--lm-space-4); }
.lm-contest__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); margin: 0; font-size: var(--lm-text-xl); font-weight: var(--lm-weight-bold);
  line-height: var(--lm-leading-snug); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-contest__title > span:first-child { min-inline-size: 0; }
.lm-contest__rules { color: var(--lm-text); line-height: var(--lm-leading); white-space: pre-line; overflow-wrap: anywhere; min-inline-size: 0; }
.lm-contest__take-part { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); padding-block-start: var(--lm-space-3); border-block-start: 1px solid var(--lm-border); }
.lm-contest__take-part .lm-help { margin: 0; }

.lm-contest-entry { display: flex; flex-direction: column; gap: var(--lm-space-2); padding: var(--lm-space-3) 0; border-block-end: 1px solid var(--lm-border); min-inline-size: 0; }
.lm-contest-entry:last-child { border-block-end: 0; }
.lm-contest-entry--removed { opacity: .7; }
.lm-contest-entry__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); margin: 0; min-inline-size: 0; }
.lm-contest-entry__author { font-weight: var(--lm-weight-semibold); color: inherit; overflow-wrap: anywhere; }
.lm-contest-entry__ago { color: var(--lm-muted); font-size: var(--lm-text-xs); }
.lm-contest-entry__title { margin: 0; font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-contest-entry__body { color: var(--lm-text); white-space: pre-line; overflow-wrap: anywhere; min-inline-size: 0; }
.lm-contest-people__row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--lm-space-2); padding: var(--lm-space-2) 0; border-block-end: 1px solid var(--lm-border); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-contest-people__row:last-child { border-block-end: 0; }

.lm-contest-form { display: flex; flex-direction: column; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-contest-form .lm-field { margin: 0; }
.lm-contest-form .lm-alert svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-contest-form__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lm-space-3); }
.lm-contest-form__body { min-block-size: 9rem; }
.lm-contest-form__buttons { display: flex; justify-content: flex-end; }

@media (max-width: 640px) {
  .lm-contests { padding: var(--lm-space-4); }
  .lm-contests-config { padding: var(--lm-space-3) var(--lm-space-4); }
  .lm-contest__title { font-size: var(--lm-text-lg); }
  .lm-contest-form__pair { grid-template-columns: minmax(0, 1fr); }
}

/* -- Phase 52. Community live streaming ------------------------------------
   Live in this community: the Phase 37.1 strip and its compact cards, with a
   Go live action in its head; the Main Admin's setting; the studio's and the
   watch page's "in <community>" line. Every icon sits in a sized box.
   -------------------------------------------------------------------- */
.lm-community-live .lm-live-strip__head { flex-wrap: wrap; gap: var(--lm-space-2); }
.lm-community-live__go { flex: none; }
.lm-community-live__go svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-community-live__empty { margin: 0; padding: 0 var(--lm-space-4) var(--lm-space-4); }
.lm-community-live-form { display: flex; flex-direction: column; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-community-live-form .lm-alert svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-community-live-form__buttons { display: flex; justify-content: flex-end; }
.lm-live-setup__community { margin: 0; }
.lm-live-about__community { display: flex; align-items: center; gap: var(--lm-space-2); margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-live-about__community svg { inline-size: 16px; block-size: 16px; flex: none; }

/* -- Phase 53. Community fundraising ---------------------------------------
   The Fundraising tab: its fundraisers (raised, target, state, how the money
   is shared), one fundraiser with the payout disclosure and the amount
   field, the reader's checkout and receipts (the entry checkout's own
   classes, re-used), and the managers' tools. Classes are lm-cfund (Phase
   23's Funding owns lm-fund). Every icon sits in a sized box.
   -------------------------------------------------------------------- */
.lm-cfund { display: flex; flex-direction: column; gap: var(--lm-space-3); padding: var(--lm-space-5); min-inline-size: 0; }
.lm-cfund .lm-post-lock, .lm-cfund .lm-community-members__empty, .lm-cfund .lm-tickets-box__notice { margin: 0; }
.lm-cfund__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-cfund__head .lm-help { margin: var(--lm-space-1) 0 0; }
.lm-cfund__title, .lm-cfund__subtitle { display: flex; align-items: center; gap: var(--lm-space-2); margin: 0; font-weight: var(--lm-weight-bold); line-height: var(--lm-leading-snug); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-cfund__title { font-size: var(--lm-text-lg); }
.lm-cfund__subtitle { font-size: var(--lm-text-md); }
.lm-cfund__title svg, .lm-cfund__subtitle svg { inline-size: 20px; block-size: 20px; flex: none; color: var(--lm-primary-text, var(--lm-text-secondary)); }
.lm-cfund__new { display: flex; flex-direction: column; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-cfund__new > summary { align-self: flex-start; list-style: none; cursor: pointer; }
.lm-cfund__new > summary::-webkit-details-marker { display: none; }
.lm-cfund__new > summary svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-cfund__card { gap: var(--lm-space-2); }
.lm-cfund__card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-cfund__card-title { margin: 0; font-size: var(--lm-text-lg); font-weight: var(--lm-weight-bold); line-height: var(--lm-leading-snug); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-cfund__card-title a { color: inherit; text-decoration: none; }
.lm-cfund__card-title a:hover, .lm-cfund__card-title a:focus-visible { text-decoration: underline; }
.lm-cfund__card-head .lm-badge { flex: none; }
.lm-cfund__purpose { margin: 0; color: var(--lm-text); line-height: var(--lm-leading); white-space: pre-line; overflow-wrap: anywhere; min-inline-size: 0; }
.lm-cfund__progress { display: flex; flex-direction: column; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-cfund__amounts { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--lm-space-1) var(--lm-space-2); margin: 0; min-inline-size: 0; }
.lm-cfund__amounts strong { font-size: var(--lm-text-xl); font-weight: var(--lm-weight-bold); font-variant-numeric: tabular-nums; }
.lm-cfund__progress .lm-help { display: flex; align-items: center; gap: var(--lm-space-1); margin: 0; }
.lm-cfund__progress .lm-help svg { inline-size: 16px; block-size: 16px; flex: none; color: var(--lm-success-text); }
.lm-cfund__bar { position: relative; overflow: hidden; block-size: 8px; border-radius: var(--lm-radius-pill); background-color: var(--lm-surface-secondary); }
.lm-cfund__bar-fill { position: absolute; inset-block: 0; inset-inline-start: 0; max-inline-size: 100%; border-radius: inherit; background-color: var(--lm-success); }
.lm-cfund__mode { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: 0; min-inline-size: 0; }
.lm-cfund__mode svg { inline-size: 16px; block-size: 16px; flex: none; margin-block-start: 2px; }
.lm-cfund__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-cfund__actions svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-cfund__danger { color: var(--lm-danger-text); }
.lm-cfund__more { display: flex; justify-content: center; margin: 0; }
.lm-cfund__back { margin: 0; }
.lm-cfund__back .lm-link { display: inline-flex; align-items: center; gap: var(--lm-space-1); min-inline-size: 0; }
.lm-cfund__back svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-cfund__payout { display: flex; flex-direction: column; gap: var(--lm-space-2); padding: var(--lm-space-3) var(--lm-space-4); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); min-inline-size: 0; }
.lm-cfund__payout .lm-event-about__subhead, .lm-cfund__payout .lm-help { margin: 0; }
.lm-cfund__recipients { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; min-inline-size: 0; }
.lm-cfund__recipient { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--lm-space-1) var(--lm-space-3); padding: var(--lm-space-2) 0; border-block-end: 1px solid var(--lm-border); min-inline-size: 0; }
.lm-cfund__recipient:last-child { border-block-end: 0; }
.lm-cfund__recipient-name { flex: 1 1 8rem; font-weight: var(--lm-weight-semibold); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-cfund__recipient-role { flex: none; }
.lm-cfund__recipient-share, .lm-cfund__recipient-amount { flex: none; font-variant-numeric: tabular-nums; }
.lm-cfund__recipient-amount { min-inline-size: 5rem; text-align: end; }
.lm-cfund__note { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); min-inline-size: 0; }
.lm-cfund__note svg { inline-size: 16px; block-size: 16px; flex: none; margin-block-start: 2px; }
.lm-cfund__rows { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; min-inline-size: 0; }
.lm-cfund__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--lm-space-1) var(--lm-space-3); padding: var(--lm-space-2) 0; border-block-end: 1px solid var(--lm-border); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-cfund__row:last-child { border-block-end: 0; }
.lm-cfund__row .lm-help { flex: 1 1 100%; margin: 0; }
.lm-cfund__edit { min-inline-size: 0; }
.lm-cfund__edit > summary { cursor: pointer; font-weight: var(--lm-weight-semibold); }
.lm-cfund__edit[open] > summary { margin-block-end: var(--lm-space-3); }
.lm-cfund__give { padding-block-start: var(--lm-space-3); border-block-start: 1px solid var(--lm-border); }
.lm-cfund__modes { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.lm-cfund__modes .lm-help { margin: 0; margin-inline-start: var(--lm-space-6); }
.lm-cfund__shares { display: flex; flex-direction: column; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-cfund__share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-cfund__share-name { flex: 1 1 10rem; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-cfund__share-input { display: inline-flex; align-items: center; gap: var(--lm-space-1); flex: none; }
.lm-cfund__share-input .lm-input { inline-size: 6rem; text-align: end; }
.lm-cfund-form { display: flex; flex-direction: column; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-cfund-form .lm-field { margin: 0; }
.lm-cfund-form .lm-alert svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-cfund-form__body { min-block-size: 7rem; }
.lm-cfund-checkout .lm-cfund__recipients { margin-block-start: var(--lm-space-2); }
.lm-cfund-checkout .lm-cfund__note, .lm-cfund-receipt .lm-cfund__note { margin-block-start: var(--lm-space-3); }
.lm-cfund-checkout .lm-alert svg, .lm-cfund-receipt .lm-alert svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-cfund-receipt .lm-cfund__recipients { margin-block-end: var(--lm-space-2); }

@media (max-width: 640px) {
  .lm-cfund { padding: var(--lm-space-4); }
  .lm-cfund__card-title { font-size: var(--lm-text-md); }
  .lm-cfund__recipient-amount { min-inline-size: 0; }
}
.lm-cp-fund__part { display: block; white-space: nowrap; }

/* -- Phase 54. Community completion -----------------------------------------
   Inviting from outside (a link to copy or share, an email, the live links),
   the invitation page, the Media tab's videos and filter, the per-category
   notification channels, an announcement's channels. Every icon sits in a
   sized box.
   -------------------------------------------------------------------- */
.lm-invite-out { min-inline-size: 0; }
.lm-invite-out__body { display: flex; flex-direction: column; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-invite-out__body .lm-help { margin: 0; }
.lm-invite-out__note { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); min-inline-size: 0; }
.lm-invite-out__note svg { inline-size: 16px; block-size: 16px; flex: none; margin-block-start: 2px; }
.lm-invite-out__new { display: flex; flex-direction: column; align-items: flex-start; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-invite-out__new .lm-btn svg, .lm-invite-out__row .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-invite-out__made, .lm-invite-out__email { display: flex; flex-direction: column; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-invite-out__email .lm-alert svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-invite-out__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-invite-out__row .lm-input { flex: 1 1 14rem; min-inline-size: 0; }
.lm-invite-out__list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; min-inline-size: 0; }
.lm-invite-out__item { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); padding: var(--lm-space-2) 0; border-block-end: 1px solid var(--lm-border); min-inline-size: 0; }
.lm-invite-out__item:last-child { border-block-end: 0; }
.lm-invite-out__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; inline-size: 32px; block-size: 32px; border-radius: var(--lm-radius-pill); background-color: var(--lm-surface-secondary); color: var(--lm-text-secondary); }
.lm-invite-out__icon svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-invite-out__meta { display: flex; flex-direction: column; gap: 2px; flex: 1 1 10rem; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-invite-out__what { font-weight: var(--lm-weight-semibold); }
.lm-invite-out__meta .lm-help { margin: 0; }
.lm-invite-landing { min-inline-size: 0; overflow-wrap: anywhere; }
.lm-invite-landing__icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 56px; block-size: 56px; margin-block-end: var(--lm-space-2); border-radius: var(--lm-radius-pill); background-color: var(--lm-surface-secondary); color: var(--lm-text-secondary); }
.lm-invite-landing__icon svg { inline-size: 26px; block-size: 26px; flex: none; }
.lm-invite-landing__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--lm-space-2); }
.lm-community-media-mode { margin: 0; }
.lm-community-media__filter { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); margin-block-end: var(--lm-space-3); }
.lm-media-tile--video { background-color: var(--lm-surface-tertiary, var(--lm-surface-secondary)); }
.lm-media-tile__play { position: absolute; inset-block-start: 50%; inset-inline-start: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: var(--lm-radius-pill); background-color: var(--lm-overlay); color: var(--lm-on-scrim); pointer-events: none; }
.lm-media-tile__play svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-media-tile__time { position: absolute; inset-block-end: var(--lm-space-1); inset-inline-end: var(--lm-space-1); padding: 0 var(--lm-space-1); border-radius: var(--lm-radius-sm); background-color: var(--lm-overlay); color: var(--lm-on-scrim); font-size: var(--lm-text-xs); line-height: 1.5; pointer-events: none; }
[dir="rtl"] .lm-media-tile__play { transform: translate(50%, -50%); }
.lm-community-notify__category { display: flex; flex-direction: column; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-community-notify__channels { display: flex; flex-wrap: wrap; gap: var(--lm-space-2) var(--lm-space-4); padding-inline-start: calc(18px + var(--lm-space-3)); min-inline-size: 0; }
.lm-community-notify__channel { display: inline-flex; align-items: center; gap: var(--lm-space-2); font-size: var(--lm-text-sm); cursor: pointer; }
.lm-community-notify__channel input[type="checkbox"] { flex: none; inline-size: 16px; block-size: 16px; margin: 0; accent-color: var(--lm-primary); }
.lm-announce-form__channels { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2) var(--lm-space-4); margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.lm-announce-form__channels > legend { flex-basis: 100%; margin-block-end: var(--lm-space-1); padding: 0; }
.lm-announce-form__channels > .lm-help { flex-basis: 100%; margin: 0; }

/* -- Phase 55. Reusable reel sounds ------------------------------------------
   The sound line under a reel, the composer's chosen sound, a sound's page,
   saved sound cards, the AdminCP list. Every icon sits in a sized box.
   -------------------------------------------------------------------- */
.lm-reel__soundline { display: inline-flex; align-items: center; gap: 6px; justify-self: start; min-inline-size: 0; max-inline-size: 100%; margin: 0; color: var(--lm-on-scrim); font-size: var(--lm-text-xs); font-weight: var(--lm-weight-medium); text-shadow: 0 1px 2px var(--lm-media-bg); pointer-events: auto; }
.lm-reel__soundline svg { flex: none; inline-size: 14px; block-size: 14px; }
.lm-reel__soundname { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--lm-on-scrim); text-decoration: none; }
a.lm-reel__soundname:hover, a.lm-reel__soundname:focus-visible { text-decoration: underline; }
.lm-reelcreate__sound { display: grid; gap: var(--lm-space-2); padding: var(--lm-space-3); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); min-inline-size: 0; }
.lm-reelcreate__sound[hidden] { display: none; }
.lm-reelcreate__sound-head { display: flex; align-items: center; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-reelcreate__sound-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; inline-size: 36px; block-size: 36px; border-radius: var(--lm-radius-pill); background-color: var(--lm-surface); color: var(--lm-text-secondary); }
.lm-reelcreate__sound-icon svg, .lm-reelcreate__sound-head .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-reelcreate__sound-about { display: flex; flex-direction: column; flex: 1 1 auto; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-reelcreate__sound-player { inline-size: 100%; max-inline-size: 100%; }
.lm-reelcreate__sound-start { margin: 0; }
.lm-reelcreate__sound-start .lm-input { max-inline-size: 8rem; }
.lm-sound { display: grid; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-sound__head { display: flex; align-items: center; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-sound__art { display: inline-flex; align-items: center; justify-content: center; flex: none; inline-size: 72px; block-size: 72px; border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); color: var(--lm-text-secondary); }
.lm-sound__art svg { inline-size: 32px; block-size: 32px; flex: none; }
.lm-sound__about { display: grid; gap: 4px; flex: 1 1 auto; min-inline-size: 0; }
.lm-sound__name { margin: 0; font-size: var(--lm-text-lg); line-height: 1.3; overflow-wrap: anywhere; }
.lm-sound__owner { display: inline-flex; align-items: center; gap: var(--lm-space-2); justify-self: start; min-inline-size: 0; color: var(--lm-text); font-weight: var(--lm-weight-semibold); text-decoration: none; overflow-wrap: anywhere; }
.lm-sound__meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.lm-sound__player { inline-size: 100%; max-inline-size: 100%; }
.lm-sound__actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }
.lm-sound__actions .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-sound__save .lm-sound__save-on, .lm-sound__save.is-saved .lm-sound__save-off { display: none; }
.lm-sound__save.is-saved .lm-sound__save-on, .lm-sound__save-off { display: inline-flex; }
.lm-sound__note { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); min-inline-size: 0; }
.lm-sound__note svg { inline-size: 16px; block-size: 16px; flex: none; margin-block-start: 2px; }
.lm-sound__owner-tools { padding-block-start: var(--lm-space-3); border-block-start: 1px solid var(--lm-border); }
.lm-sound__owner-tools .lm-switch-line { display: flex; align-items: flex-start; gap: var(--lm-space-3); cursor: pointer; min-inline-size: 0; }
.lm-sound__owner-tools input[type="checkbox"] { flex: none; inline-size: 18px; block-size: 18px; margin-block-start: 2px; accent-color: var(--lm-primary); }
.lm-sound__owner-tools .lm-help { display: block; margin: 0; }
.lm-sound__subhead { margin: 0 0 var(--lm-space-3); font-size: var(--lm-text-base); }
.lm-sound__source, .lm-sound__reels { min-inline-size: 0; }
.lm-sound__source-tile { max-inline-size: 12rem; }
.lm-soundcards { display: flex; flex-direction: column; min-inline-size: 0; }
.lm-soundcard { display: flex; align-items: center; gap: var(--lm-space-2); padding: var(--lm-space-2) 0; border-block-end: 1px solid var(--lm-border); min-inline-size: 0; }
.lm-soundcard:last-child { border-block-end: 0; }
.lm-soundcard__link { display: flex; align-items: center; gap: var(--lm-space-3); flex: 1 1 auto; min-inline-size: 0; color: var(--lm-text); text-decoration: none; }
.lm-soundcard__art { display: inline-flex; align-items: center; justify-content: center; flex: none; inline-size: 44px; block-size: 44px; border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); color: var(--lm-text-secondary); }
.lm-soundcard__art svg { inline-size: 20px; block-size: 20px; flex: none; }
.lm-soundcard__about { display: flex; flex-direction: column; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-soundcard__name { font-weight: var(--lm-weight-semibold); }
.lm-soundcard .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-saved__sounds { display: grid; gap: var(--lm-space-3); }
.lm-cp-sounds, .lm-cp-sounds__checks { min-inline-size: 0; }
.lm-cp-sounds__table td { vertical-align: top; overflow-wrap: anywhere; }
.lm-cp-sounds__table .lm-help { display: block; }
.lm-cp-sounds__player { display: block; inline-size: 14rem; max-inline-size: 100%; margin-block-start: var(--lm-space-1); }
.lm-cp-sounds__actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-1); }
.lm-cp-sounds__check-list { display: grid; gap: var(--lm-space-1); margin: var(--lm-space-2) 0 0; padding: 0; list-style: none; }
.lm-cp-sounds__check-list li { display: flex; justify-content: space-between; gap: var(--lm-space-3); }

/* -- Phase 56. Reel series --------------------------------------------------
   The series line under a reel, the series-mode bar over it, a series's page
   and its episodes, series cards (a profile's tab, saved series), the form,
   the creator's manager, the AdminCP list. Every icon sits in a sized box.
   -------------------------------------------------------------------- */
.lm-reel__seriesline { display: inline-flex; align-items: center; gap: 6px; justify-self: start; min-inline-size: 0; max-inline-size: 100%; margin: 0; color: var(--lm-on-scrim); font-size: var(--lm-text-xs); font-weight: var(--lm-weight-medium); text-shadow: 0 1px 2px var(--lm-media-bg); pointer-events: auto; }
.lm-reel__seriesline svg { flex: none; inline-size: 14px; block-size: 14px; }
.lm-reel__seriesname { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--lm-on-scrim); text-decoration: none; }
.lm-reel__seriesname:hover, .lm-reel__seriesname:focus-visible { text-decoration: underline; }
.lm-reel__seriesbar { position: absolute; inset-block-start: var(--lm-space-3); inset-inline-start: var(--lm-space-3); inset-inline-end: 64px; z-index: 2; display: flex; align-items: center; gap: var(--lm-space-2); min-inline-size: 0; padding-block: 6px; padding-inline: var(--lm-space-3) 6px; border-radius: var(--lm-radius-pill); background-color: color-mix(in srgb, var(--lm-media-bg) 55%, transparent); color: var(--lm-on-scrim); }
.lm-reel__seriesbar-link { display: flex; align-items: center; gap: var(--lm-space-2); flex: 1 1 auto; min-inline-size: 0; color: var(--lm-on-scrim); text-decoration: none; }
.lm-reel__seriesbar-link > svg { flex: none; inline-size: 18px; block-size: 18px; }
.lm-reel__seriesbar-text { display: flex; flex-direction: column; min-inline-size: 0; line-height: 1.25; }
.lm-reel__seriesbar-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--lm-text-sm); font-weight: var(--lm-weight-semibold); }
.lm-reel__seriesbar-ep { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--lm-text-xs); opacity: 0.85; }
.lm-reel__seriesbar-nav { display: flex; gap: 4px; flex: none; }
.lm-reel__seriesbar-step { display: grid; place-items: center; inline-size: 32px; block-size: 32px; padding: 0; border: 0; border-radius: 50%; background-color: color-mix(in srgb, var(--lm-on-scrim) 16%, transparent); color: var(--lm-on-scrim); cursor: pointer; }
.lm-reel__seriesbar-step svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-reel__seriesbar-step:hover, .lm-reel__seriesbar-step:focus-visible { background-color: color-mix(in srgb, var(--lm-on-scrim) 28%, transparent); }
.lm-reels__end a { color: inherit; font-weight: var(--lm-weight-semibold); }
.lm-series { display: grid; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-series__note { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); min-inline-size: 0; }
.lm-series__note svg { inline-size: 16px; block-size: 16px; flex: none; margin-block-start: 2px; }
.lm-series__note--warn { color: var(--lm-danger-text); }
.lm-series__head { display: flex; align-items: flex-start; gap: var(--lm-space-4); min-inline-size: 0; }
.lm-series__cover { flex: none; inline-size: 9rem; aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); }
.lm-series__cover img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.lm-series__cover-blank { display: grid; place-items: center; inline-size: 100%; block-size: 100%; color: var(--lm-text-secondary); }
.lm-series__cover-blank svg { inline-size: 36px; block-size: 36px; flex: none; }
.lm-series__about { display: grid; gap: var(--lm-space-2); flex: 1 1 auto; min-inline-size: 0; }
.lm-series__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); font-weight: var(--lm-weight-semibold); }
.lm-series__kicker svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-series__kicker .lm-badge { display: inline-flex; align-items: center; gap: 4px; }
.lm-series__kicker .lm-badge svg { inline-size: 12px; block-size: 12px; }
.lm-series__title { margin: 0; font-size: var(--lm-text-xl); line-height: 1.25; overflow-wrap: anywhere; }
.lm-series__owner { display: inline-flex; align-items: center; gap: var(--lm-space-2); justify-self: start; min-inline-size: 0; color: var(--lm-text); font-weight: var(--lm-weight-semibold); text-decoration: none; overflow-wrap: anywhere; }
.lm-series__meta { margin: 0; }
.lm-series__description { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.lm-series__actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }
.lm-series__actions .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-series__play-ep { opacity: 0.85; font-weight: var(--lm-weight-medium); }
.lm-series__save .lm-series__save-on, .lm-series__save.is-saved .lm-series__save-off { display: none; }
.lm-series__save.is-saved .lm-series__save-on, .lm-series__save-off { display: inline-flex; }
.lm-series__subhead { margin: 0 0 var(--lm-space-3); font-size: var(--lm-text-base); }
.lm-series__episodes { min-inline-size: 0; }
.lm-series__list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; min-inline-size: 0; }
.lm-series-ep { border-block-end: 1px solid var(--lm-border); min-inline-size: 0; }
.lm-series-ep:last-child { border-block-end: 0; }
.lm-series-ep__link { display: flex; align-items: flex-start; gap: var(--lm-space-3); padding: var(--lm-space-2) 0; color: var(--lm-text); text-decoration: none; min-inline-size: 0; }
.lm-series-ep__link:hover .lm-series-ep__number, .lm-series-ep__link:focus-visible .lm-series-ep__number { text-decoration: underline; }
.lm-series-ep__thumb { position: relative; flex: none; inline-size: 64px; aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--lm-radius-sm); background-color: var(--lm-media-bg); }
.lm-series-ep__thumb img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.lm-series-ep__thumb--sensitive img { filter: blur(14px); }
.lm-series-ep__blank { display: grid; place-items: center; inline-size: 100%; block-size: 100%; color: var(--lm-on-scrim); }
.lm-series-ep__blank svg { inline-size: 20px; block-size: 20px; flex: none; }
.lm-series-ep__length { position: absolute; inset-block-end: 4px; inset-inline-end: 4px; padding: 0 4px; border-radius: var(--lm-radius-sm); background-color: color-mix(in srgb, var(--lm-media-bg) 70%, transparent); color: var(--lm-on-scrim); font-size: var(--lm-text-xs); }
.lm-series-ep__about { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-series-ep__label { font-weight: var(--lm-weight-medium); }
.lm-series-ep__caption { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lm-series-ep__views { display: inline-flex; align-items: center; gap: 4px; }
.lm-series-ep__views svg { inline-size: 14px; block-size: 14px; flex: none; }
.lm-seriescards { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: var(--lm-space-3); min-inline-size: 0; }
.lm-seriescard { min-inline-size: 0; }
.lm-seriescard__link { display: grid; gap: var(--lm-space-2); color: var(--lm-text); text-decoration: none; min-inline-size: 0; }
.lm-seriescard__cover { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); }
.lm-seriescard__cover img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.lm-seriescard__blank { display: grid; place-items: center; inline-size: 100%; block-size: 100%; color: var(--lm-text-secondary); }
.lm-seriescard__blank svg { inline-size: 32px; block-size: 32px; flex: none; }
.lm-seriescard__count { position: absolute; inset-inline: 0; inset-block-end: 0; display: flex; align-items: center; gap: 4px; padding: var(--lm-space-4) var(--lm-space-2) var(--lm-space-2); background: linear-gradient(to top, color-mix(in srgb, var(--lm-media-bg) 72%, transparent), transparent); color: var(--lm-on-scrim); font-size: var(--lm-text-xs); font-weight: var(--lm-weight-semibold); }
.lm-seriescard__count svg { inline-size: 14px; block-size: 14px; flex: none; }
.lm-seriescard__about { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-seriescard__title { font-weight: var(--lm-weight-semibold); }
.lm-seriescard__owner { max-inline-size: 100%; }
.lm-seriescard__link:hover .lm-seriescard__title, .lm-seriescard__link:focus-visible .lm-seriescard__title { text-decoration: underline; }
.lm-saved__series { display: grid; gap: var(--lm-space-3); }
.lm-series-tab__head { display: flex; justify-content: flex-end; margin-block-end: var(--lm-space-3); }
.lm-series-tab__head .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-series-form__pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--lm-space-3); }
.lm-series-form__pair .lm-field { margin: 0; }
/* Two classes: components.css (loaded after this file) sets a banner's 16:5. */
.lm-imagefield__cover.lm-series-form__cover-box { inline-size: 7.5rem; aspect-ratio: 9 / 16; }
.lm-series-form__cover-box .lm-tile { display: block; inline-size: 100%; block-size: 100%; }
.lm-series-form .lm-imagefield { margin-block-start: var(--lm-space-3); }
.lm-series-form__submit { display: flex; justify-content: flex-end; }
.lm-series-manage__state { display: grid; gap: var(--lm-space-2); }
.lm-series-manage__buttons { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-1); }
.lm-series-manage__buttons .lm-btn svg, .lm-series-manage__upload svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-series-manage__buttons .lm-icon-btn svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-series-manage__remove { margin-inline-start: auto; }
.lm-series-manage__edit { padding: 0; min-inline-size: 0; }
.lm-series-manage__summary { display: flex; align-items: center; gap: var(--lm-space-2); padding: var(--lm-space-4); font-weight: var(--lm-weight-semibold); cursor: pointer; }
.lm-series-manage__summary svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-series-manage__edit[open] > .lm-series-manage__summary { border-block-end: 1px solid var(--lm-border); }
.lm-series-manage__edit .lm-series-form { padding: var(--lm-space-3); }
.lm-series-manage__list { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: var(--lm-space-3) 0 0; padding: 0; list-style: none; min-inline-size: 0; }
.lm-series-manage__item { display: flex; align-items: flex-start; gap: var(--lm-space-3); padding: var(--lm-space-2); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-md); min-inline-size: 0; }
.lm-series-manage__thumb { display: grid; place-items: center; flex: none; inline-size: 56px; aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--lm-radius-sm); background-color: var(--lm-media-bg); color: var(--lm-on-scrim); }
.lm-series-manage__thumb img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.lm-series-manage__thumb svg { inline-size: 20px; block-size: 20px; flex: none; }
.lm-series-manage__body { display: grid; gap: var(--lm-space-2); flex: 1 1 auto; min-inline-size: 0; }
.lm-series-manage__line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; min-inline-size: 0; }
.lm-series-manage__caption { flex: 1 1 100%; overflow-wrap: anywhere; }
.lm-series-manage__label { display: flex; gap: var(--lm-space-1); min-inline-size: 0; }
.lm-series-manage__label .lm-input { flex: 1 1 auto; min-inline-size: 0; }
.lm-series-manage__order { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-2); margin-block-start: var(--lm-space-3); }
.lm-series-manage__order[hidden] { display: none; }
.lm-series-manage__order .lm-help { margin: 0; }
.lm-series-manage__upload { margin-block-end: var(--lm-space-3); }
.lm-series-manage__publish { margin-block: var(--lm-space-2); }
.lm-series-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: var(--lm-space-3); margin-block-start: var(--lm-space-2); min-inline-size: 0; }
.lm-series-pick__item { display: grid; gap: var(--lm-space-1); align-content: start; min-inline-size: 0; }
.lm-series-pick__thumb { display: grid; place-items: center; aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--lm-radius-md); background-color: var(--lm-media-bg); color: var(--lm-on-scrim); }
.lm-series-pick__thumb img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.lm-series-pick__thumb svg { inline-size: 24px; block-size: 24px; flex: none; }
.lm-series-pick__caption { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.lm-series-pick__item .lm-btn { justify-self: start; }
.lm-series-pick__item .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-cp-series, .lm-cp-series__checks { min-inline-size: 0; }
.lm-cp-series__table td { vertical-align: top; overflow-wrap: anywhere; }
.lm-cp-series__table .lm-help { display: block; }
.lm-cp-series__cover { display: block; inline-size: 36px; aspect-ratio: 9 / 16; object-fit: cover; margin-block-end: var(--lm-space-1); border-radius: var(--lm-radius-sm); }
.lm-cp-series__actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-1); }
.lm-cp-series__counts { white-space: nowrap; }

@media (max-width: 767px) {
  .lm-reel__seriesbar { inset-block-start: 52px; }
  .lm-reel:not(.lm-reel--wide) .lm-reel__seriesbar { inset-block-start: max(52px, calc((100% - 100vw * 16 / 9) / 2 + var(--lm-space-3))); }
  .lm-series__head { flex-direction: column; align-items: stretch; }
  .lm-series__cover { inline-size: 7.5rem; }
  .lm-series-manage__item { gap: var(--lm-space-2); }
  .lm-series-manage__thumb { inline-size: 44px; }
  .lm-series-manage__body { gap: var(--lm-space-1); }
}

/* -- Phase 57. Paid reel series ---------------------------------------------
   The locked episode card in the player, the episode list's access badges,
   the Full Series offer, the unlock dialog, the checkout, the Purchased
   library, the creator's sales controls, the AdminCP sales list. Every icon
   sits in a sized box.
   -------------------------------------------------------------------- */
.lm-reel__paywall { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--lm-space-2); padding: var(--lm-space-5) var(--lm-space-4); text-align: center; background: linear-gradient(to bottom, color-mix(in srgb, var(--lm-media-bg) 45%, transparent), color-mix(in srgb, var(--lm-media-bg) 82%, transparent)); color: var(--lm-on-scrim); }
.lm-reel__paywall-icon { display: grid; place-items: center; inline-size: 52px; block-size: 52px; border-radius: 50%; background-color: color-mix(in srgb, var(--lm-on-scrim) 16%, transparent); }
.lm-reel__paywall-icon svg { inline-size: 24px; block-size: 24px; flex: none; }
.lm-reel__paywall-series { margin: 0; max-inline-size: 100%; overflow-wrap: anywhere; font-size: var(--lm-text-base); font-weight: var(--lm-weight-semibold); }
.lm-reel__paywall-ep { margin: 0; font-size: var(--lm-text-sm); opacity: 0.9; }
.lm-reel__paywall-note { margin: 0; max-inline-size: 22rem; font-size: var(--lm-text-sm); opacity: 0.9; }
.lm-reel__paywall-actions { display: flex; flex-direction: column; align-items: stretch; gap: var(--lm-space-2); inline-size: min(100%, 18rem); margin-block-start: var(--lm-space-2); }
.lm-reel__paywall-actions .lm-btn { justify-content: center; }
.lm-reel__paywall-actions .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-reel__paywall-link { color: var(--lm-on-scrim); font-size: var(--lm-text-sm); font-weight: var(--lm-weight-semibold); }
.lm-reel[data-locked] .lm-reel__toggle { pointer-events: none; }
.lm-series-ep { display: flex; align-items: center; gap: var(--lm-space-2); }
.lm-series-ep__link { flex: 1 1 auto; }
.lm-series-ep__access { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; }
.lm-series-ep__access svg { inline-size: 12px; block-size: 12px; flex: none; }
.lm-series-ep__unlock { flex: none; }
.lm-series-ep__unlock svg { inline-size: 14px; block-size: 14px; flex: none; }
.lm-series__offer { display: grid; gap: var(--lm-space-1); justify-items: start; padding: var(--lm-space-3); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); }
.lm-series__offer .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-series__offer .lm-help { margin: 0; }
.lm-series__offer--owned { display: flex; align-items: center; gap: var(--lm-space-2); margin: 0; font-weight: var(--lm-weight-semibold); }
.lm-series__offer--owned svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-paid { inline-size: min(100%, 30rem); }
.lm-paid__body { display: grid; gap: var(--lm-space-3); }
.lm-paid__terms { display: grid; gap: var(--lm-space-2); margin: 0; }
.lm-paid__terms[hidden] { display: none; }
.lm-paid__terms > div { display: flex; justify-content: space-between; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-paid__terms dt { color: var(--lm-text-secondary); }
.lm-paid__terms dd { margin: 0; text-align: end; overflow-wrap: anywhere; font-weight: var(--lm-weight-semibold); }
.lm-paid__terms > div[hidden] { display: none; }
.lm-paid__promise { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: 0; font-size: var(--lm-text-sm); }
.lm-paid__promise[hidden] { display: none; }
.lm-paid__promise svg { inline-size: 16px; block-size: 16px; flex: none; margin-block-start: 2px; }
.lm-paid__footer { flex-wrap: wrap; }
.lm-paid__footer .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-paid__footer [hidden] { display: none; }
.lm-paid-checkout .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-purchases { min-inline-size: 0; }
.lm-purchases__list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.lm-purchase { display: flex; align-items: center; gap: var(--lm-space-3); padding: var(--lm-space-3) 0; border-block-end: 1px solid var(--lm-border); min-inline-size: 0; }
.lm-purchase:last-child { border-block-end: 0; }
.lm-purchase__icon { display: grid; place-items: center; flex: none; inline-size: 40px; block-size: 40px; border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); color: var(--lm-text-secondary); }
.lm-purchase__icon svg { inline-size: 20px; block-size: 20px; flex: none; }
.lm-purchase__about { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-purchase__about .lm-help { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.lm-purchase__title { font-weight: var(--lm-weight-semibold); }
.lm-purchase .lm-btn svg { inline-size: 14px; block-size: 14px; flex: none; }
.lm-series-sales { min-inline-size: 0; }
.lm-series-sales__body { display: grid; gap: var(--lm-space-3); }
.lm-series-sales__stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: var(--lm-space-2); margin: 0; }
.lm-series-sales__stats > div { display: grid; gap: 2px; padding: var(--lm-space-2); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); min-inline-size: 0; }
.lm-series-sales__stats dt { color: var(--lm-text-secondary); font-size: var(--lm-text-xs); }
.lm-series-sales__stats dd { margin: 0; font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-series-sales__form { display: grid; gap: var(--lm-space-2); }
.lm-series-sales__form .lm-btn { justify-self: start; }
.lm-series-sales__helper { display: grid; gap: var(--lm-space-1); padding-block-start: var(--lm-space-3); border-block-start: 1px solid var(--lm-border); }
.lm-series-sales__helper-row { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); align-items: center; }
.lm-series-sales__helper-row .lm-input { inline-size: 6rem; }
.lm-series-manage__access { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-1); min-inline-size: 0; }
.lm-series-manage__access .lm-select { inline-size: auto; min-inline-size: 7rem; }
.lm-series-manage__access .lm-input { inline-size: 7rem; }
.lm-cp-sales, .lm-cp-sales__summary { min-inline-size: 0; }

/* -- Phase 58: AdminCP → Reels ranking --------------------------------------- */
.lm-cp-rank { min-inline-size: 0; }
.lm-cp-rank__status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); }
.lm-cp-rank__version { font-size: var(--lm-text-sm); overflow-wrap: anywhere; }
.lm-cp-rank__figures { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: var(--lm-space-3); margin: 0 0 var(--lm-space-3); }
.lm-cp-rank__figures > div { min-inline-size: 0; }
.lm-cp-rank__figures dt { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-cp-rank__figures dd { margin: 0; font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-cp-rank__subtitle { margin: var(--lm-space-4) 0 var(--lm-space-2); font-size: var(--lm-text-base); }
.lm-cp-rank__bars { display: grid; gap: var(--lm-space-1); margin: 0; padding: 0; list-style: none; }
.lm-cp-rank__bars li { display: grid; grid-template-columns: 4rem minmax(0, 1fr) 3rem; align-items: center; gap: var(--lm-space-2); }
.lm-cp-rank__bar { display: block; block-size: 8px; border-radius: var(--lm-radius-pill); background-color: var(--lm-surface-secondary); overflow: hidden; }
.lm-cp-rank__bar > span { display: block; block-size: 100%; background-color: var(--lm-primary); }
.lm-cp-rank__bar-label { font-size: var(--lm-text-sm); color: var(--lm-text-secondary); }
.lm-cp-rank__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--lm-space-3); margin-block-end: var(--lm-space-3); }
.lm-cp-rank__form .lm-field { flex: 1 1 12rem; min-inline-size: 0; margin: 0; }
.lm-cp-rank__verdict { font-weight: var(--lm-weight-semibold); }
.lm-cp-rank__result .lm-table-wrap { position: relative; }
/* Each row's refund form has a visually-hidden label (position: absolute):
   with no positioned ancestor it is placed against the page at its column's
   far edge and widens a phone. Its scroller holds it. */
.lm-cp-sales .lm-table-wrap { position: relative; }
.lm-cp-sales__table td { vertical-align: top; overflow-wrap: anywhere; }
.lm-cp-sales__table .lm-help { display: block; }
.lm-cp-sales__money { white-space: nowrap; }
.lm-cp-sales__actions { min-inline-size: 12rem; }

/* -- Phase 59: Reels Search & Explore ---------------------------------------- */
.lm-explore { display: grid; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-explore > .lm-card { min-inline-size: 0; }
.lm-explore__head { padding: var(--lm-space-4); }
.lm-explore__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-2); margin-block-end: var(--lm-space-3); }
.lm-explore__title { display: inline-flex; align-items: center; gap: var(--lm-space-2); margin: 0; font-size: var(--lm-text-xl); }
.lm-explore__title svg { inline-size: 22px; block-size: 22px; flex: none; }
.lm-explore__top .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-explore__form { position: relative; display: flex; align-items: center; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-explore__icon { position: absolute; inset-inline-start: var(--lm-space-3); display: inline-flex; color: var(--lm-text-secondary); pointer-events: none; }
.lm-explore__icon svg { inline-size: 18px; block-size: 18px; }
/* Both ends padded: the box is dir="auto" (a query reads its own way), so its
   start can be either side of the page's icon; .lm-input (components.css)
   loads later, hence the form's class in front. */
.lm-explore__form .lm-explore__input { flex: 1 1 auto; min-inline-size: 0; padding-inline: calc(var(--lm-space-3) * 2 + 18px); }
.lm-explore__dropdown { position: absolute; inset-inline: 0; inset-block-start: calc(100% + var(--lm-space-1)); z-index: 30; max-block-size: 70vh; overflow-y: auto;
    background-color: var(--lm-surface); border: 1px solid var(--lm-card-border); border-radius: var(--lm-radius-lg); box-shadow: var(--lm-shadow-md); }
.lm-explore__dropdown[hidden] { display: none; }
.lm-explore__suggest { margin: 0; padding: var(--lm-space-1); list-style: none; }
.lm-explore__suggest-item { display: flex; align-items: center; gap: var(--lm-space-2); padding: var(--lm-space-2) var(--lm-space-3); border-radius: var(--lm-radius-md); color: var(--lm-text); text-decoration: none; min-inline-size: 0; }
.lm-explore__suggest-item:hover, .lm-explore__suggest-item:focus-visible { background-color: var(--lm-surface-secondary); }
.lm-explore__suggest-icon { display: inline-flex; flex: none; color: var(--lm-text-secondary); }
.lm-explore__suggest-icon svg { inline-size: 16px; block-size: 16px; }
.lm-explore__suggest-text { flex: 1 1 auto; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-explore__suggest-kind { flex: none; font-size: var(--lm-text-xs); color: var(--lm-text-secondary); }
.lm-explore__suggest-item--search .lm-explore__suggest-text { font-weight: var(--lm-weight-semibold); }
.lm-explore__recent { padding: var(--lm-space-2) var(--lm-space-3); border-block-start: 1px solid var(--lm-border); }
.lm-explore__recent[hidden] { display: none; }
.lm-explore__recent-head { display: flex; align-items: center; justify-content: space-between; gap: var(--lm-space-2); }
.lm-explore__recent-list { margin: var(--lm-space-1) 0 0; padding: 0; list-style: none; }
.lm-explore__recent-list li { display: flex; align-items: center; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-explore__recent-link { display: flex; flex: 1 1 auto; align-items: center; gap: var(--lm-space-2); min-inline-size: 0; padding-block: var(--lm-space-2); color: var(--lm-text); text-decoration: none; }
.lm-explore__recent-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-explore__recent-link svg, .lm-explore__recent-remove svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-explore__tabs { margin-block-start: var(--lm-space-3); overflow-x: auto; scrollbar-width: none; }
.lm-explore__tabs::-webkit-scrollbar { display: none; }
.lm-explore__tabs .lm-tab { flex: 1 0 auto; text-align: center; white-space: nowrap; }
.lm-explore__section { padding: var(--lm-space-4); }
.lm-explore__section-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--lm-space-2); margin-block-end: var(--lm-space-3); }
.lm-explore__section-title { margin: 0; font-size: var(--lm-text-lg); }
.lm-explore__section-head .lm-help { margin: 2px 0 0; }
.lm-explore__more { margin-block-start: var(--lm-space-3); }
.lm-explore__chips { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }
.lm-explore__chip { display: inline-flex; align-items: center; gap: var(--lm-space-2); max-inline-size: 100%; padding: var(--lm-space-1) var(--lm-space-3); border: 1px solid var(--lm-border);
    border-radius: var(--lm-radius-pill); color: var(--lm-text); text-decoration: none; overflow-wrap: anywhere; }
.lm-explore__chip:hover { background-color: var(--lm-surface-secondary); }
.lm-explore__chip-count { font-size: var(--lm-text-xs); color: var(--lm-text-secondary); }
.lm-explore__tiles { min-inline-size: 0; }
.lm-explore__sounds { display: grid; gap: var(--lm-space-2); }
.lm-explore__people { min-inline-size: 0; }
.lm-seriescard__access { display: inline-flex; align-items: center; gap: 4px; }
.lm-seriescard__access svg { inline-size: 12px; block-size: 12px; flex: none; }
.lm-reeltile__locked { position: absolute; inset-block-start: var(--lm-space-2); inset-inline-start: var(--lm-space-2); display: inline-flex; align-items: center; gap: 4px;
    padding: 2px var(--lm-space-2); border-radius: var(--lm-radius-pill); background-color: color-mix(in srgb, var(--lm-media-bg) 55%, transparent); font-size: var(--lm-text-xs); font-weight: var(--lm-weight-semibold); }
.lm-reeltile__locked svg { inline-size: 12px; block-size: 12px; flex: none; }
.lm-reels__explore svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-search__reels { margin: 0 0 var(--lm-space-3); padding: var(--lm-space-3) var(--lm-space-4); }
.lm-search__reels .lm-search__more { display: inline-flex; align-items: center; gap: var(--lm-space-2); }
.lm-search__reels svg { inline-size: 16px; block-size: 16px; flex: none; }

/* -- Phase 60: Reel Duet, Stitch & Visual Remix -------------------------------
   A derivative's credit under the reel (as its sound and series lines), the
   composer's source panel and Stitch fields, the creator's say, the settings
   dialog, a source's list of derivatives, the AdminCP list. Every icon sits
   in a sized box.
   -------------------------------------------------------------------- */
.lm-reel__remixline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-self: start; min-inline-size: 0; max-inline-size: 100%; margin: 0; color: var(--lm-on-scrim); font-size: var(--lm-text-xs); font-weight: var(--lm-weight-medium); text-shadow: 0 1px 2px var(--lm-media-bg); pointer-events: auto; }
.lm-reel__remixline svg { flex: none; inline-size: 14px; block-size: 14px; }
.lm-reel__remixname { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--lm-on-scrim); text-decoration: none; }
a.lm-reel__remixname:hover, a.lm-reel__remixname:focus-visible { text-decoration: underline; }
.lm-reel__remixgone { opacity: 0.85; font-weight: var(--lm-weight-regular); }

.lm-reelcreate__remix { display: grid; gap: var(--lm-space-2); padding: var(--lm-space-3); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); min-inline-size: 0; }
.lm-reelcreate__remix[hidden], .lm-reelcreate__stitch[hidden], .lm-reelcreate__allow[hidden] { display: none; }
.lm-reelcreate__remix-head { display: flex; align-items: center; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-reelcreate__remix-poster { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; inline-size: 48px; block-size: 85px; overflow: hidden; border-radius: var(--lm-radius-sm); background-color: var(--lm-media-bg); color: var(--lm-on-scrim); }
.lm-reelcreate__remix-poster svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-reelcreate__remix-poster img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.lm-reelcreate__remix-about { display: flex; flex-direction: column; flex: 1 1 auto; gap: 2px; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-reelcreate__stitch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lm-space-2); }
.lm-reelcreate__stitch .lm-field { margin: 0; min-inline-size: 0; }
.lm-reelcreate__stitch-help { grid-column: 1 / -1; margin: 0; }
.lm-reelcreate__allow { display: grid; gap: var(--lm-space-2); margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.lm-reelcreate__allow-warning { margin: 0; }

.lm-remixsettings { max-inline-size: 30rem; }
.lm-remixsettings__body { display: grid; gap: var(--lm-space-3); }
.lm-remixsettings__body .lm-alert svg { inline-size: 18px; block-size: 18px; flex: none; }

.lm-remixes { display: grid; gap: var(--lm-space-4); min-inline-size: 0; }
.lm-remixes__head { display: grid; gap: var(--lm-space-3); padding: var(--lm-space-4); min-inline-size: 0; }
.lm-remixes__source { display: flex; align-items: center; gap: var(--lm-space-3); min-inline-size: 0; color: inherit; text-decoration: none; }
.lm-remixes__poster { display: inline-flex; align-items: center; justify-content: center; flex: none; inline-size: 56px; block-size: 100px; border-radius: var(--lm-radius-sm); background-color: var(--lm-media-bg); color: var(--lm-on-scrim); object-fit: cover; }
.lm-remixes__poster--empty svg { inline-size: 20px; block-size: 20px; flex: none; }
.lm-remixes__about { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-remixes__title { font-size: var(--lm-text-lg); }
.lm-remixes__tabs { min-inline-size: 0; overflow-x: auto; }
.lm-remixes__list { padding: var(--lm-space-3); min-inline-size: 0; }
.lm-tab__count { margin-inline-start: 6px; color: var(--lm-text-secondary); font-size: var(--lm-text-xs); }

.lm-report-row__remix { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-1); color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }

.lm-cp-remix__filter-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--lm-space-3); }
.lm-cp-remix__filter-row .lm-field { margin: 0; min-inline-size: 10rem; flex: 1 1 10rem; }
.lm-cp-remix__filter-row .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-cp-remix__filters { margin: 0 0 var(--lm-space-3); }
.lm-cp-remix__table td { vertical-align: top; }
.lm-cp-remix__table .lm-help { display: block; }
.lm-cp-remix__mode { display: inline-flex; align-items: center; gap: 6px; margin-inline-end: var(--lm-space-1); font-weight: var(--lm-weight-medium); }
.lm-cp-remix__mode svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-cp-remix__actions { white-space: nowrap; }
.lm-cp-remix, .lm-cp-remix__checks { margin: 0 0 var(--lm-space-3); }

/* -- Phase 61: Creator memberships --------------------------------------------
   A creator's tiers on their profile, the member chip in the profile bar, a
   member's own memberships, the checkout's notes, the creator's setup (tiers,
   members, dashboard) and the AdminCP filters. Accents are the design
   system's own pairs (as the community packages'); every icon sits in a
   sized box.
   -------------------------------------------------------------------- */
.lm-pro-accent--coral  { --lm-pro-fg: var(--lm-primary-text); --lm-pro-bg: var(--lm-primary-soft); }
.lm-pro-accent--blue   { --lm-pro-fg: var(--lm-badge-blue-fg); --lm-pro-bg: var(--lm-badge-blue-bg); }
.lm-pro-accent--green  { --lm-pro-fg: var(--lm-badge-teal-fg); --lm-pro-bg: var(--lm-badge-teal-bg); }
.lm-pro-accent--amber  { --lm-pro-fg: var(--lm-badge-gold-fg); --lm-pro-bg: var(--lm-badge-gold-bg); }
.lm-pro-accent--violet { --lm-pro-fg: var(--lm-badge-violet-fg); --lm-pro-bg: var(--lm-badge-violet-bg); }
.lm-pro-accent--slate  { --lm-pro-fg: var(--lm-badge-slate-fg); --lm-pro-bg: var(--lm-badge-slate-bg); }

.lm-pro-tiers { scroll-margin-block-start: calc(var(--lm-header-height) + var(--lm-space-4)); }
.lm-pro-tiers__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--lm-space-4); min-inline-size: 0; }
.lm-pro-tiers__note { margin: var(--lm-space-4) 0 0; }
.lm-pro-tier { display: flex; flex-direction: column; gap: var(--lm-space-3); min-inline-size: 0; padding: var(--lm-space-4); border: 1px solid var(--lm-card-border); border-radius: var(--lm-radius-md); background-color: var(--lm-surface); }
.lm-pro-tier.is-popular { border-color: var(--lm-pro-fg, var(--lm-primary)); box-shadow: 0 0 0 1px var(--lm-pro-fg, var(--lm-primary)); }
.lm-pro-tier.is-current { border-color: var(--lm-success); box-shadow: 0 0 0 1px var(--lm-success); }
.lm-pro-tier__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-pro-tier__icon { display: inline-grid; place-items: center; flex: 0 0 32px; inline-size: 32px; block-size: 32px; border-radius: 50%; background-color: var(--lm-pro-bg, var(--lm-primary-soft)); color: var(--lm-pro-fg, var(--lm-primary-text)); }
.lm-pro-tier__icon svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-pro-tier__name { flex: 1 1 auto; min-inline-size: 0; margin: 0; font-size: var(--lm-text-lg); font-weight: var(--lm-weight-bold); overflow-wrap: anywhere; }
.lm-pro-tier__badge { flex: 0 0 auto; }
.lm-pro-tier__price { margin: 0; font-size: 1.5rem; font-weight: var(--lm-weight-bold); line-height: 1.2; font-variant-numeric: tabular-nums; }
.lm-pro-tier__monthly, .lm-pro-tier__renews { margin: 0; }
.lm-pro-tier__description { margin: 0; color: var(--lm-text-secondary); white-space: pre-line; overflow-wrap: anywhere; }
.lm-pro-tier__benefits { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0; padding: 0; list-style: none; }
.lm-pro-tier__benefits li { display: flex; align-items: flex-start; gap: var(--lm-space-2); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-pro-tier__benefits svg { flex: 0 0 16px; inline-size: 16px; block-size: 16px; margin-block-start: 3px; color: var(--lm-pro-fg, var(--lm-primary-text)); }
.lm-pro-tier__foot { display: flex; flex-direction: column; gap: var(--lm-space-2); margin-block-start: auto; padding-block-start: var(--lm-space-2); }
.lm-pro-tier__foot .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-pro-tier__auto { font-size: var(--lm-text-sm); }

.lm-pro-member-chip { max-inline-size: 100%; min-inline-size: 0; }
.lm-pro-member-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-inline-size: 0; }
.lm-profile__actions [data-lm-pro-manage] svg, .lm-profile__actions [data-lm-pro-join-jump] svg, .lm-pro-member-chip svg { inline-size: 18px; block-size: 18px; flex: none; }

.lm-pro-mine { padding: 0; }
.lm-pro-mine__list { margin: 0; padding: 0; list-style: none; }
.lm-pro-mine__item { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--lm-space-3); padding: var(--lm-space-4); min-inline-size: 0; }
.lm-pro-mine__item + .lm-pro-mine__item { border-block-start: 1px solid var(--lm-card-border); }
.lm-pro-mine__who { display: flex; align-items: flex-start; gap: var(--lm-space-3); flex: 1 1 16rem; min-inline-size: 0; }
.lm-pro-mine__text { display: flex; flex-direction: column; gap: 4px; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-pro-mine__text p { margin: 0; }
.lm-pro-mine__creator { font-weight: var(--lm-weight-semibold); }
.lm-pro-mine__creator a { color: inherit; text-decoration: none; }
.lm-pro-mine__creator a:hover, .lm-pro-mine__creator a:focus-visible { text-decoration: underline; }
.lm-pro-mine__tier { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-pro-mine__error { color: var(--lm-danger-text); }
.lm-pro-mine__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); flex: 0 1 auto; min-inline-size: 0; }
.lm-pro-mine__auto { font-size: var(--lm-text-sm); }
.lm-pro-mine + .lm-btn { margin-block-start: var(--lm-space-3); }

.lm-pro-checkout__note { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: var(--lm-space-3) 0 0; overflow-wrap: anywhere; }
.lm-pro-checkout__note svg { flex: 0 0 18px; inline-size: 18px; block-size: 18px; margin-block-start: 2px; color: var(--lm-text-secondary); }
.lm-pro-checkout .lm-checkout-method__icon svg, .lm-pro-checkout .lm-btn svg, .lm-pro-checkout .lm-tickets-box__notice svg, .lm-pro-checkout .lm-alert svg { inline-size: 18px; block-size: 18px; flex: none; }

.lm-pro-setup { display: flex; flex-direction: column; gap: var(--lm-space-4); min-inline-size: 0; }
.lm-pro-setup > .lm-card { margin: 0; }
.lm-pro-setup__tabs { padding-inline: var(--lm-space-4); overflow-x: auto; scrollbar-width: none; }
.lm-pro-setup__tabs::-webkit-scrollbar { display: none; }
.lm-pro-setup__tabs .lm-tab { white-space: nowrap; }
.lm-pro-setup__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--lm-space-3); }
.lm-pro-setup__head > div { min-inline-size: 0; }
.lm-pro-setup__head .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-pro-setup__list { margin: 0 0 var(--lm-space-3); padding: 0; list-style: none; }
.lm-pro-setup__tier { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-3); padding-block: var(--lm-space-3); min-inline-size: 0; }
.lm-pro-setup__tier + .lm-pro-setup__tier { border-block-start: 1px solid var(--lm-card-border); }
.lm-pro-setup__tier.is-archived { opacity: 0.75; }
.lm-pro-setup__tier-text { display: flex; flex-direction: column; gap: 4px; flex: 1 1 12rem; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-pro-setup__tier-text p { margin: 0; }
.lm-pro-setup__tier-name { display: flex; align-items: center; gap: var(--lm-space-2); font-weight: var(--lm-weight-semibold); min-inline-size: 0; }
.lm-pro-setup__badges { display: flex; flex-wrap: wrap; gap: var(--lm-space-1); }
.lm-pro-setup__badges:empty { display: none; }
.lm-pro-setup__tier-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-1); }
.lm-pro-setup__tier-actions .lm-icon-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-pro-setup .lm-alert svg { inline-size: 18px; block-size: 18px; flex: none; }

.lm-pro-tier-form { display: grid; gap: var(--lm-space-3); }
.lm-pro-tier-form .lm-field { margin: 0; min-inline-size: 0; }
.lm-pro-tier-form__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lm-space-3); }
.lm-pro-tier-form .lm-alert svg { inline-size: 18px; block-size: 18px; flex: none; }

.lm-pro-members, .lm-pro-dashboard { min-inline-size: 0; }
.lm-pro-members__which { display: flex; flex-wrap: wrap; gap: var(--lm-space-1); }
.lm-pro-members__list { margin: 0 0 var(--lm-space-3); padding: 0; list-style: none; }
.lm-pro-members__row { display: flex; align-items: flex-start; gap: var(--lm-space-3); padding-block: var(--lm-space-3); min-inline-size: 0; }
.lm-pro-members__row + .lm-pro-members__row { border-block-start: 1px solid var(--lm-card-border); }
.lm-pro-members__text { display: flex; flex-direction: column; gap: 4px; min-inline-size: 0; overflow-wrap: anywhere; }
.lm-pro-members__text p { margin: 0; }

.lm-pro-dashboard__figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: var(--lm-space-3); margin: 0; }
.lm-pro-dashboard__figures > div { display: flex; flex-direction: column; gap: 4px; padding: var(--lm-space-3); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); min-inline-size: 0; }
.lm-pro-dashboard__figures dt { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-pro-dashboard__figures dd { margin: 0; font-size: var(--lm-text-lg); font-weight: var(--lm-weight-bold); overflow-wrap: anywhere; }
.lm-pro-dashboard__sub { margin: var(--lm-space-4) 0 var(--lm-space-2); font-size: var(--lm-text-md); }
.lm-pro-dashboard__tiers { margin: 0; padding: 0; list-style: none; }
.lm-pro-dashboard__tiers li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); padding-block: var(--lm-space-2); min-inline-size: 0; overflow-wrap: anywhere; }
.lm-pro-dashboard__tiers li strong { margin-inline-start: auto; }

.lm-cp-pro__filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--lm-space-3); }
.lm-cp-pro__filters .lm-field { margin: 0; min-inline-size: 10rem; flex: 1 1 10rem; }

@media (max-width: 560px) {
  .lm-pro-tier-form__pair { grid-template-columns: minmax(0, 1fr); }
  .lm-pro-mine__actions { flex-basis: 100%; }
}

/* -- Phase 62: Page Studio and post insights ---------------------------------
   A Page's dashboard: a header, a section menu (a sidebar beside the content
   on a wide screen, a row of tabs on a phone), the range switch, metric
   cards, day-by-day bar charts (always left to right in time), the posts
   table (rows become stacked cards on a phone), and a post's insights.
   Every icon sits in a sized box.
   -------------------------------------------------------------------- */
.lm-page-studio-link svg { inline-size: 18px; block-size: 18px; flex: none; }

.lm-studio { display: flex; flex-direction: column; gap: var(--lm-space-4); min-inline-size: 0; }
.lm-studio__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-3); padding: var(--lm-space-4); margin: 0; }
.lm-studio__head .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-studio__identity { display: flex; align-items: center; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-studio__names { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.lm-studio__kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); font-weight: var(--lm-weight-semibold); }
.lm-studio__kicker svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-studio__title { margin: 0; font-size: var(--lm-text-xl); font-weight: var(--lm-weight-bold); overflow-wrap: anywhere; }

.lm-studio__layout { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); gap: var(--lm-space-4); align-items: start; }
.lm-studio__nav { position: sticky; inset-block-start: calc(var(--lm-header-height) + var(--lm-space-4)); margin: 0; padding: var(--lm-space-2); }
.lm-studio__menu { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.lm-studio__menu-title { margin: var(--lm-space-3) var(--lm-space-3) var(--lm-space-1); color: var(--lm-text-secondary); font-size: var(--lm-text-xs); font-weight: var(--lm-weight-semibold); text-transform: uppercase; letter-spacing: 0.04em; }
.lm-studio__link { display: flex; align-items: center; gap: var(--lm-space-2); padding: var(--lm-space-2) var(--lm-space-3); border-radius: var(--lm-radius-md); color: var(--lm-text); text-decoration: none; font-weight: var(--lm-weight-medium); white-space: nowrap; }
.lm-studio__link svg { inline-size: 18px; block-size: 18px; flex: none; color: var(--lm-text-secondary); }
.lm-studio__link:hover, .lm-studio__link:focus-visible { background-color: var(--lm-surface-secondary); }
.lm-studio__link.is-active { background-color: var(--lm-primary-soft); color: var(--lm-primary-text); }
.lm-studio__link.is-active svg { color: var(--lm-primary-text); }

.lm-studio__main { display: flex; flex-direction: column; gap: var(--lm-space-4); min-inline-size: 0; }
.lm-studio__main > .lm-card { margin: 0; }
.lm-studio__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-3); }
.lm-studio__bar .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-studio__section-title { margin: 0; font-size: var(--lm-text-lg); font-weight: var(--lm-weight-bold); }
.lm-studio__ranges { display: inline-flex; padding: 3px; border-radius: var(--lm-radius-pill); background-color: var(--lm-surface-secondary); }
.lm-studio__range { padding: 6px var(--lm-space-3); border-radius: var(--lm-radius-pill); color: var(--lm-text-secondary); font-size: var(--lm-text-sm); font-weight: var(--lm-weight-medium); text-decoration: none; white-space: nowrap; }
.lm-studio__range.is-active { background-color: var(--lm-surface); color: var(--lm-text); box-shadow: var(--lm-shadow-sm); }
.lm-studio__notice { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: 0; padding: var(--lm-space-3); border-radius: var(--lm-radius-md); background-color: var(--lm-info-soft); color: var(--lm-info-text); font-size: var(--lm-text-sm); overflow-wrap: anywhere; }
.lm-studio__notice svg { flex: 0 0 18px; inline-size: 18px; block-size: 18px; }

.lm-studio-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: var(--lm-space-3); margin: 0; }
.lm-studio-card { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: var(--lm-space-3) var(--lm-space-4); min-inline-size: 0; }
.lm-studio-card__label { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); font-weight: var(--lm-weight-medium); }
.lm-studio-card__value { margin: 0; font-size: 1.5rem; font-weight: var(--lm-weight-bold); line-height: 1.2; font-variant-numeric: tabular-nums; }
.lm-studio-card__note { margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-xs); overflow-wrap: anywhere; }

.lm-studio__panel { padding: var(--lm-space-4); min-inline-size: 0; }
.lm-studio__panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--lm-space-2); margin-block-end: var(--lm-space-3); }
.lm-studio__panel-title { margin: 0 0 var(--lm-space-2); font-size: var(--lm-text-md); font-weight: var(--lm-weight-semibold); }
.lm-studio__panel-head .lm-studio__panel-title { margin: 0; }
.lm-studio__empty { margin: 0; }

.lm-studio-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lm-space-5) var(--lm-space-4); }
.lm-studio-charts--one { grid-template-columns: minmax(0, 1fr); }
.lm-studio-chart { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0; min-inline-size: 0; }
.lm-studio-chart__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--lm-space-2); }
.lm-studio-chart__title { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); font-weight: var(--lm-weight-medium); }
.lm-studio-chart__total { font-size: var(--lm-text-lg); font-weight: var(--lm-weight-bold); }
.lm-studio-chart__plot { display: flex; align-items: flex-end; gap: 2px; block-size: 7.5rem; padding-block-end: 1px; border-block-end: 1px solid var(--lm-border); }
.lm-studio-chart__bar { display: flex; align-items: flex-end; flex: 1 1 0; block-size: 100%; min-inline-size: 1px; }
.lm-studio-chart__fill { display: block; inline-size: 100%; border-radius: 3px 3px 0 0; background-color: var(--lm-primary); opacity: 0.85; }
.lm-studio-chart__bar:hover .lm-studio-chart__fill { opacity: 1; }
.lm-studio-chart__axis { display: flex; justify-content: space-between; gap: var(--lm-space-2); color: var(--lm-text-secondary); font-size: var(--lm-text-xs); }
.lm-studio-chart__empty { display: grid; place-items: center; block-size: 7.5rem; margin: 0; border: 1px dashed var(--lm-border); border-radius: var(--lm-radius-md); color: var(--lm-text-secondary); font-size: var(--lm-text-sm); text-align: center; padding: var(--lm-space-3); }
.lm-studio-chart__note { margin: 0; }

.lm-studio__filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); margin-block-end: var(--lm-space-3); }
.lm-studio__filters .lm-label { margin: 0; }
.lm-studio__filters .lm-select { inline-size: auto; min-inline-size: 10rem; }
.lm-studio__count { margin-inline-start: auto; }
/* The positioning box of the visually hidden header labels: without it an
   absolutely placed label escapes the scrolling box at the far end of a wide
   table and stretches the page (the Phase 25 trap). */
.lm-studio-table-wrap { position: relative; overflow-x: auto; min-inline-size: 0; }
.lm-studio-table { inline-size: 100%; border-collapse: collapse; font-size: var(--lm-text-sm); }
.lm-studio-table th { padding: var(--lm-space-2); border-block-end: 1px solid var(--lm-border); color: var(--lm-text-secondary); font-weight: var(--lm-weight-semibold); text-align: start; white-space: nowrap; }
.lm-studio-table td { padding: var(--lm-space-2); border-block-end: 1px solid var(--lm-card-border); vertical-align: middle; }
.lm-studio-table td.lm-num, .lm-studio-table th:not(:first-child) { text-align: end; }
.lm-studio-table td .lm-help { display: block; font-size: var(--lm-text-xs); }
.lm-studio-table__post { min-inline-size: 14rem; }
.lm-studio-table__action { text-align: end; white-space: nowrap; }
.lm-studio-table__action .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-studio-post { display: flex; align-items: center; gap: var(--lm-space-3); min-inline-size: 0; color: inherit; text-decoration: none; }
.lm-studio-post__thumb { flex: 0 0 48px; inline-size: 48px; block-size: 48px; border-radius: var(--lm-radius-sm); object-fit: cover; background-color: var(--lm-surface-secondary); }
.lm-studio-post__thumb--none { display: grid; place-items: center; color: var(--lm-text-secondary); }
.lm-studio-post__thumb--none svg { inline-size: 20px; block-size: 20px; flex: none; }
.lm-studio-post--large .lm-studio-post__thumb { flex-basis: 72px; inline-size: 72px; block-size: 72px; }
.lm-studio-post__text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.lm-studio-post__preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: var(--lm-weight-medium); overflow-wrap: anywhere; }
.lm-studio__legend { margin: var(--lm-space-2) 0 0; }
.lm-studio__pager { display: flex; justify-content: space-between; gap: var(--lm-space-2); margin-block-start: var(--lm-space-3); }
.lm-studio-kinds { display: flex; flex-wrap: wrap; gap: var(--lm-space-2) var(--lm-space-4); margin: 0; padding: 0; list-style: none; }
.lm-studio-kinds li { display: inline-flex; align-items: center; gap: var(--lm-space-2); }
.lm-studio-kinds__icon { display: inline-grid; place-items: center; inline-size: 24px; block-size: 24px; }
.lm-studio-kinds__icon svg { inline-size: 20px; block-size: 20px; flex: none; }

@media (max-width: 900px) {
  .lm-studio__layout { grid-template-columns: minmax(0, 1fr); }
  .lm-studio__nav { position: static; padding: var(--lm-space-1); overflow-x: auto; scrollbar-width: none; }
  .lm-studio__nav::-webkit-scrollbar { display: none; }
  .lm-studio__menu, .lm-studio__menu--tools { flex-direction: row; display: inline-flex; }
  .lm-studio__menu-title { display: none; }
  .lm-studio__nav { display: flex; gap: 2px; }
}

@media (max-width: 640px) {
  .lm-studio-charts { grid-template-columns: minmax(0, 1fr); }
  .lm-studio-table thead { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lm-studio-table, .lm-studio-table tbody, .lm-studio-table tr, .lm-studio-table td { display: block; inline-size: 100%; }
  .lm-studio-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--lm-space-1) var(--lm-space-2); padding-block: var(--lm-space-3); border-block-end: 1px solid var(--lm-card-border); }
  .lm-studio-table td { padding: 0; border: 0; }
  .lm-studio-table td.lm-num { text-align: start; }
  .lm-studio-table td.lm-num::before { content: attr(data-label); display: block; color: var(--lm-text-secondary); font-size: var(--lm-text-xs); }
  .lm-studio-table__post, .lm-studio-table__action { grid-column: 1 / -1; }
  .lm-studio-table__post { min-inline-size: 0; }
  .lm-studio-table__action { text-align: start; }
  .lm-studio__count { margin-inline-start: 0; inline-size: 100%; }
}

/* -- Phase 63: Page content manager and calendar -------------------------------
   The header's quick actions, the scheduler's status line, the Content
   sub-tabs, the content list (each item a row on a wide screen, stacked on
   a phone), the month calendar (a grid of days on a wide screen, a list of
   the days that have something on a phone) and the composer dialog.
   -------------------------------------------------------------------- */
.lm-studio__actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }
.lm-studio__actions .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }

.lm-studio-scheduler { display: flex; align-items: flex-start; gap: var(--lm-space-2); margin: 0; padding: var(--lm-space-2) var(--lm-space-3); border-radius: var(--lm-radius-md); font-size: var(--lm-text-sm); overflow-wrap: anywhere; }
.lm-studio-scheduler svg { flex: 0 0 18px; inline-size: 18px; block-size: 18px; }
.lm-studio-scheduler--cron { background-color: var(--lm-success-soft); color: var(--lm-success-text); }
.lm-studio-scheduler--traffic { background-color: var(--lm-info-soft); color: var(--lm-info-text); }
.lm-studio-scheduler--stalled { background-color: var(--lm-warning-soft); color: var(--lm-warning-text); }

.lm-studio-subtabs { display: flex; gap: var(--lm-space-1); overflow-x: auto; scrollbar-width: none; padding-block-end: 2px; }
.lm-studio-subtabs::-webkit-scrollbar { display: none; }
.lm-studio-subtab { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 6px var(--lm-space-3); border-radius: var(--lm-radius-pill); background-color: var(--lm-surface); border: 1px solid var(--lm-card-border); color: var(--lm-text-secondary); font-size: var(--lm-text-sm); font-weight: var(--lm-weight-medium); text-decoration: none; white-space: nowrap; }
.lm-studio-subtab svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-studio-subtab.is-active { background-color: var(--lm-primary-soft); border-color: transparent; color: var(--lm-primary-text); }
.lm-studio-subtab__count { min-inline-size: 1.4em; padding: 0 6px; border-radius: var(--lm-radius-pill); background-color: var(--lm-surface-secondary); color: var(--lm-text); font-size: var(--lm-text-xs); text-align: center; }

.lm-content-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.lm-content-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: var(--lm-space-3); padding-block: var(--lm-space-3); border-block-end: 1px solid var(--lm-card-border); min-inline-size: 0; }
.lm-content-item:last-child { border-block-end: 0; }
.lm-content-item.is-focus { background-color: var(--lm-primary-soft); border-radius: var(--lm-radius-md); padding-inline: var(--lm-space-2); }
.lm-content-item__thumb { inline-size: 64px; block-size: 64px; border-radius: var(--lm-radius-md); object-fit: cover; background-color: var(--lm-surface-secondary); }
.lm-content-item__thumb--none { display: grid; place-items: center; color: var(--lm-text-secondary); }
.lm-content-item__thumb--none svg { inline-size: 22px; block-size: 22px; flex: none; }
.lm-content-item__body { display: flex; flex-direction: column; gap: 4px; min-inline-size: 0; }
.lm-content-item__text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-weight: var(--lm-weight-medium); overflow-wrap: anywhere; }
.lm-content-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--lm-space-2); margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-content-item__when { display: inline-flex; align-items: center; gap: 4px; color: var(--lm-text); }
.lm-content-item__when svg { inline-size: 14px; block-size: 14px; flex: none; }
.lm-content-item__error { display: flex; align-items: flex-start; gap: 6px; margin: 0; color: var(--lm-danger-text); font-size: var(--lm-text-sm); }
.lm-content-item__error svg { flex: 0 0 16px; inline-size: 16px; block-size: 16px; }
.lm-content-item__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--lm-space-1); }
.lm-content-item__actions .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }

.lm-calendar { min-inline-size: 0; }
.lm-calendar__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); margin-block-end: var(--lm-space-3); }
.lm-calendar__head .lm-icon-btn svg { inline-size: 18px; block-size: 18px; flex: none; }
html[dir="rtl"] .lm-calendar__head .lm-icon-btn svg { transform: scaleX(-1); }
.lm-calendar__title { margin: 0; min-inline-size: 9rem; font-size: var(--lm-text-lg); font-weight: var(--lm-weight-bold); text-align: center; }
.lm-calendar__zone { margin-inline-start: auto; }
.lm-calendar__legend { display: flex; flex-wrap: wrap; gap: var(--lm-space-3); margin: 0 0 var(--lm-space-3); padding: 0; list-style: none; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-calendar__legend li { display: inline-flex; align-items: center; gap: 6px; }
.lm-calendar__dot { display: inline-block; inline-size: 10px; block-size: 10px; border-radius: 50%; }
.lm-calendar__dot--published { background-color: var(--lm-success); }
.lm-calendar__dot--scheduled { background-color: var(--lm-primary); }
.lm-calendar__dot--failed { background-color: var(--lm-danger); }
.lm-calendar__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--lm-border); border-radius: var(--lm-radius-md); overflow: hidden; background-color: var(--lm-border); }
.lm-calendar__weekday { padding: var(--lm-space-2) 4px; background-color: var(--lm-surface-secondary); color: var(--lm-text-secondary); font-size: var(--lm-text-xs); font-weight: var(--lm-weight-semibold); text-align: center; }
.lm-calendar__cell { display: flex; flex-direction: column; gap: 3px; min-block-size: 6rem; min-inline-size: 0; padding: 4px; background-color: var(--lm-surface); }
.lm-calendar__cell--blank { background-color: var(--lm-surface-secondary); }
.lm-calendar__cell.is-today .lm-calendar__day { background-color: var(--lm-primary-strong); color: var(--lm-on-primary); }
.lm-calendar__day { align-self: flex-start; min-inline-size: 1.6rem; padding: 1px 6px; border-radius: var(--lm-radius-pill); font-size: var(--lm-text-xs); font-weight: var(--lm-weight-semibold); text-align: center; }
.lm-calendar__item { display: flex; gap: 4px; min-inline-size: 0; padding: 2px 4px; border-radius: var(--lm-radius-sm); border-inline-start: 3px solid var(--lm-border); background-color: var(--lm-surface-secondary); color: var(--lm-text); font-size: var(--lm-text-xs); text-decoration: none; }
.lm-calendar__item--published { border-inline-start-color: var(--lm-success); }
.lm-calendar__item--scheduled { border-inline-start-color: var(--lm-primary); }
.lm-calendar__item--failed { border-inline-start-color: var(--lm-danger); }
.lm-calendar__time { flex: none; color: var(--lm-text-secondary); }
.lm-calendar__text { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-calendar__empty { margin: var(--lm-space-3) 0 0; }

.lm-content-dialog { max-inline-size: 38rem; }
.lm-content-form { display: flex; flex-direction: column; gap: var(--lm-space-3); }
.lm-content-form .lm-field { margin: 0; }
.lm-content-form .lm-alert svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-content-form__as { margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); font-weight: var(--lm-weight-medium); }
.lm-content-form__text { min-block-size: 8rem; resize: vertical; }
.lm-content-form__media { display: flex; flex-direction: column; gap: var(--lm-space-2); }
.lm-content-form__media[hidden], .lm-content-form__schedule[hidden] { display: none; }
.lm-content-form__thumbs { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); margin: 0; padding: 0; list-style: none; }
.lm-content-form__thumb img { display: block; inline-size: 64px; block-size: 64px; border-radius: var(--lm-radius-sm); object-fit: cover; }
.lm-content-form__schedule { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0; padding: var(--lm-space-3); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-md); min-inline-size: 0; }
.lm-content-form__when { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lm-space-2); }
.lm-content-dialog__footer { flex-wrap: wrap; }
.lm-content-dialog__footer .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-content-dialog__footer [hidden] { display: none; }

@media (max-width: 640px) {
  .lm-content-item { grid-template-columns: 48px minmax(0, 1fr); }
  .lm-content-item__thumb { inline-size: 48px; block-size: 48px; }
  .lm-content-item__actions { grid-column: 1 / -1; justify-content: flex-start; }
  .lm-calendar__grid { display: flex; flex-direction: column; gap: 0; border: 0; background: none; }
  .lm-calendar__weekday, .lm-calendar__cell--blank, .lm-calendar__cell.is-empty:not(.is-today) { display: none; }
  .lm-calendar__cell { min-block-size: 0; padding: var(--lm-space-2) 0; border-block-end: 1px solid var(--lm-card-border); }
  .lm-calendar__zone { margin-inline-start: 0; inline-size: 100%; }
  .lm-content-form__when { grid-template-columns: minmax(0, 1fr); }
}

/* -- Phase 64: Page Inbox ----------------------------------------------------
   The conversations beside the open one on a wide screen; on a phone one
   at a time (the list, or the conversation with a way back). The Page's
   own messages on the end side, the member's on the start side. Every
   icon sits in a sized box; every visually hidden label sits inside a
   positioned wrapper (it must not widen a scrolled area).
   -------------------------------------------------------------------- */
.lm-studio__link-count { margin-inline-start: auto; min-inline-size: 1.5em; padding: 0 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-semibold); line-height: 1.5; text-align: center; }
.lm-studio__inbox-summary { display: flex; flex-wrap: wrap; gap: var(--lm-space-1) var(--lm-space-3); margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }

.lm-inbox { display: flex; flex-direction: column; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-inbox .lm-card { margin: 0; }
.lm-inbox .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-inbox__layout { display: grid; grid-template-columns: minmax(12.5rem, 15rem) minmax(0, 1fr); gap: var(--lm-space-3); align-items: start; }

.lm-inbox__list { display: flex; flex-direction: column; gap: var(--lm-space-2); padding: var(--lm-space-2); min-inline-size: 0; }
.lm-inbox__search { position: relative; min-inline-size: 0; }
.lm-inbox__search .lm-input { inline-size: 100%; }
.lm-inbox__items { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; max-block-size: 34rem; overflow-y: auto; }
.lm-inbox__item { display: flex; align-items: center; gap: var(--lm-space-2); padding: var(--lm-space-2); border-radius: var(--lm-radius-md); color: var(--lm-text); text-decoration: none; min-inline-size: 0; }
.lm-inbox__item:hover, .lm-inbox__item:focus-visible { background-color: var(--lm-surface-secondary); }
.lm-inbox__item.is-active { background-color: var(--lm-primary-soft); }
.lm-inbox__item .lm-avatar { flex: none; }
.lm-inbox__avatar-none { display: inline-grid; place-items: center; flex: none; inline-size: 40px; block-size: 40px; border-radius: 50%; background-color: var(--lm-surface-secondary); color: var(--lm-text-secondary); }
.lm-inbox__avatar-none svg { inline-size: 20px; block-size: 20px; }
.lm-inbox__item-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-inline-size: 0; }
.lm-inbox__item-top { display: flex; align-items: baseline; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-inbox__name { flex: 1 1 auto; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--lm-weight-medium); }
.lm-inbox__time { flex: none; color: var(--lm-text-secondary); font-size: var(--lm-text-xs); }
.lm-inbox__preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-inbox__item.is-unread .lm-inbox__name, .lm-inbox__item.is-unread .lm-inbox__preview { color: var(--lm-text); font-weight: var(--lm-weight-semibold); }
.lm-inbox__dot { flex: none; inline-size: 10px; block-size: 10px; border-radius: 50%; background-color: var(--lm-primary-strong); }
.lm-inbox__empty { margin: 0; padding: var(--lm-space-4) var(--lm-space-2); color: var(--lm-text-secondary); text-align: center; }

.lm-inbox__thread { display: flex; flex-direction: column; min-inline-size: 0; padding: 0; overflow: hidden; }
.lm-inbox__placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--lm-space-2); min-block-size: 20rem; padding: var(--lm-space-5); color: var(--lm-text-secondary); text-align: center; }
.lm-inbox__placeholder svg { inline-size: 40px; block-size: 40px; }
.lm-inbox__placeholder p { margin: 0; }
.lm-inbox__thread-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); padding: var(--lm-space-2) var(--lm-space-3); border-block-end: 1px solid var(--lm-card-border); }
.lm-inbox .lm-inbox__back { display: none; flex: none; }
.lm-inbox__back svg { inline-size: 20px; block-size: 20px; }
html[dir="rtl"] .lm-inbox__back svg { transform: scaleX(-1); }
.lm-inbox__thread-who { display: flex; flex-direction: column; flex: 1 1 8rem; min-inline-size: 0; }
.lm-inbox__thread-name { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--lm-weight-semibold); }
.lm-inbox__thread-actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-1); }
.lm-inbox__messages { display: flex; flex-direction: column; gap: var(--lm-space-2); block-size: clamp(12rem, calc(100vh - 36rem), 26rem); overflow-y: auto; padding: var(--lm-space-3); }
.lm-inbox__older { align-self: center; }
.lm-inbox__msg { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; max-inline-size: 80%; }
.lm-inbox__msg.is-page { align-self: flex-end; align-items: flex-end; }
.lm-inbox__bubble { padding: var(--lm-space-2) var(--lm-space-3); border-radius: var(--lm-radius-lg); background-color: var(--lm-surface-secondary); color: var(--lm-text); min-inline-size: 0; max-inline-size: 100%; }
.lm-inbox__msg.is-page .lm-inbox__bubble { background-color: var(--lm-primary-soft); }
.lm-inbox__bubble p { margin: 0; }
.lm-inbox__body { white-space: pre-wrap; overflow-wrap: anywhere; }
.lm-inbox__deleted { color: var(--lm-text-secondary); font-style: italic; }
.lm-inbox__attachment { display: inline-flex; align-items: center; gap: 6px; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-inbox__attachment svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-inbox__msg-time { color: var(--lm-text-secondary); font-size: var(--lm-text-xs); }
.lm-inbox__composer { position: relative; display: flex; flex-direction: column; gap: var(--lm-space-2); padding: var(--lm-space-3); border-block-start: 1px solid var(--lm-card-border); }
.lm-inbox__saved { align-self: flex-start; max-inline-size: 100%; }
.lm-inbox__compose-row { display: flex; align-items: flex-end; gap: var(--lm-space-2); }
.lm-inbox__input { flex: 1 1 0; inline-size: 100%; min-inline-size: 0; resize: vertical; }
.lm-inbox__send { flex: none; }
.lm-inbox__note { margin: 0; }

.lm-inbox__comment-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-2); margin-block-end: var(--lm-space-3); }
.lm-inbox__filters { display: flex; flex-wrap: wrap; gap: var(--lm-space-1); }
.lm-inbox__comment-bar .lm-inbox__search { flex: 0 1 18rem; }
.lm-inbox__comments { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.lm-inbox__comment { display: flex; flex-direction: column; gap: var(--lm-space-2); padding-block: var(--lm-space-3); border-block-start: 1px solid var(--lm-card-border); min-inline-size: 0; }
.lm-inbox__comment:first-child { border-block-start: 0; padding-block-start: 0; }
.lm-inbox__comment-post { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); min-inline-size: 0; }
.lm-inbox__comment-post svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-inbox__comment-post span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-inline-size: 0; }
.lm-inbox__comment-main { display: flex; align-items: flex-start; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-inbox__comment-main .lm-avatar, .lm-inbox__comment-main .lm-inbox__avatar-none { flex: none; inline-size: 36px; block-size: 36px; }
.lm-inbox__comment-text { display: flex; flex-direction: column; gap: var(--lm-space-1); flex: 1 1 auto; min-inline-size: 0; }
.lm-inbox__comment-text > p { margin: 0; }
.lm-inbox__comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--lm-space-2); }
.lm-inbox__comment-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.lm-inbox__comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-1) var(--lm-space-2); color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-inbox__comment-actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-1); }
.lm-inbox__comment-form { position: relative; display: flex; flex-direction: column; gap: var(--lm-space-2); }
.lm-inbox__comment-form[hidden] { display: none; }
.lm-inbox__comment-form-actions { display: flex; justify-content: flex-end; }

[data-lm-inbox-settings] .lm-switch { position: relative; }
.lm-inbox__saved-list { display: flex; flex-direction: column; margin: 0 0 var(--lm-space-3); padding: 0; list-style: none; }
.lm-inbox__saved-item { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--lm-space-2); padding-block: var(--lm-space-2); border-block-end: 1px solid var(--lm-card-border); }
.lm-inbox__saved-text { flex: 1 1 14rem; min-inline-size: 0; }
.lm-inbox__saved-text p { margin: 2px 0 0; color: var(--lm-text-secondary); white-space: pre-wrap; overflow-wrap: anywhere; }
.lm-inbox__saved-actions { display: flex; gap: var(--lm-space-1); }
.lm-inbox__saved-form { position: relative; display: flex; flex-direction: column; gap: var(--lm-space-2); align-items: flex-start; }
.lm-inbox__saved-form .lm-field { inline-size: 100%; }

@media (max-width: 720px) {
  .lm-inbox__layout { grid-template-columns: minmax(0, 1fr); }
  .lm-inbox.has-thread .lm-inbox__list { display: none; }
  .lm-inbox:not(.has-thread) .lm-inbox__thread { display: none; }
  .lm-inbox .lm-inbox__back { display: inline-flex; }
  .lm-inbox__items { max-block-size: none; }
  .lm-inbox__messages { block-size: auto; min-block-size: 16rem; max-block-size: 62vh; }
  .lm-inbox__msg { max-inline-size: 90%; }
  .lm-inbox__thread-actions { inline-size: 100%; }
  .lm-inbox__comment-bar .lm-inbox__search { flex: 1 1 100%; }
}

/* -- Phase 65: Page settings, Page access, the business profile ---------------
   Page Studio's settings (each part a card of its own), Page access (the
   permission matrix scrolls inside its own box on a phone), and on the
   public Page the action button, "open now", the contact details and the
   week. Every icon in a sized box; visually hidden text inside positioned
   cells.
   -------------------------------------------------------------------- */
.lm-psettings, .lm-paccess { display: flex; flex-direction: column; gap: var(--lm-space-4); min-inline-size: 0; }
.lm-psettings .lm-card, .lm-paccess .lm-card { margin: 0; }
.lm-psettings__jump { position: sticky; inset-block-start: calc(var(--lm-header-height) + var(--lm-space-2)); z-index: 2; padding-block: var(--lm-space-1); background-color: var(--lm-bg); }
.lm-psettings__anchor, .lm-psettings__card { scroll-margin-block-start: calc(var(--lm-header-height) + 4rem); }
.lm-psettings__anchor > .lm-community-form { display: flex; flex-direction: column; gap: var(--lm-space-4); }
.lm-psettings__card .lm-card__body { display: flex; flex-direction: column; gap: var(--lm-space-3); align-items: stretch; }
.lm-psettings__card .lm-card__body > .lm-btn { align-self: flex-start; }
.lm-psettings__sublabel { font-size: var(--lm-text-sm); }
.lm-psettings__group { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.lm-psettings__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lm-space-2) var(--lm-space-3); }
.lm-psettings__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lm-psettings__grid .lm-field { margin: 0; min-inline-size: 0; }
.lm-psettings__slug { display: flex; align-items: center; gap: var(--lm-space-1); min-inline-size: 0; }
.lm-psettings__slug-base { flex: none; max-inline-size: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-psettings__slug .lm-input { flex: 1 1 auto; min-inline-size: 0; }
.lm-psettings__switch { position: relative; flex: none; }
.lm-psettings__hours[hidden] { display: none; }
.lm-psettings__hours { display: flex; flex-direction: column; gap: var(--lm-space-3); }
.lm-psettings__days { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.lm-psettings__day { display: grid; grid-template-columns: 8rem minmax(8rem, 11rem) minmax(0, 1fr); align-items: center; gap: var(--lm-space-2); padding-block: var(--lm-space-2); border-block-end: 1px solid var(--lm-card-border); }
.lm-psettings__day:last-child { border-block-end: 0; }
.lm-psettings__day-name { font-weight: var(--lm-weight-medium); }
.lm-psettings__day-state { min-inline-size: 0; }
.lm-psettings__day .lm-error-text { grid-column: 1 / -1; margin: 0; }
.lm-psettings__times { display: flex; align-items: center; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-psettings__times[hidden] { display: none; }
.lm-psettings__times .lm-input { inline-size: 7.5rem; min-inline-size: 0; }
.lm-psettings__ctas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lm-space-2); }
.lm-psettings__cta { position: relative; display: flex; align-items: flex-start; gap: var(--lm-space-2); padding: var(--lm-space-3); border: 1px solid var(--lm-card-border); border-radius: var(--lm-radius-md); cursor: pointer; min-inline-size: 0; }
.lm-psettings__cta:has(input:checked) { border-color: var(--lm-primary-strong); background-color: var(--lm-primary-soft); }
.lm-psettings__cta input { flex: none; margin-block-start: 3px; }
.lm-psettings__cta.is-unavailable { cursor: not-allowed; opacity: 0.7; }
.lm-psettings__cta-icon { display: inline-grid; place-items: center; flex: none; inline-size: 24px; block-size: 24px; color: var(--lm-text-secondary); }
.lm-psettings__cta-icon svg { inline-size: 20px; block-size: 20px; }
.lm-psettings__cta-text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.lm-psettings__cta-text span { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-psettings__cta-text strong { font-weight: var(--lm-weight-semibold); }
.lm-psettings__sections { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border: 1px solid var(--lm-card-border); border-radius: var(--lm-radius-md); }
.lm-psettings__section { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2) var(--lm-space-3); padding: var(--lm-space-2) var(--lm-space-3); border-block-end: 1px solid var(--lm-card-border); }
.lm-psettings__section:last-child { border-block-end: 0; }
.lm-psettings__section.is-fixed { background-color: var(--lm-surface-secondary); }
.lm-psettings__section.is-off .lm-psettings__section-name { color: var(--lm-text-secondary); text-decoration: line-through; }
.lm-psettings__section-name { flex: 1 1 8rem; font-weight: var(--lm-weight-medium); min-inline-size: 0; }
.lm-psettings__section-show { display: inline-flex; align-items: center; gap: 6px; font-size: var(--lm-text-sm); }
.lm-psettings__section-move { display: inline-flex; gap: var(--lm-space-1); }
.lm-psettings__section-move svg { inline-size: 18px; block-size: 18px; }
.lm-psettings__danger { display: flex; flex-direction: column; gap: var(--lm-space-4); }
.lm-psettings__danger:empty { display: none; }

.lm-paccess__you-text { display: flex; align-items: center; gap: var(--lm-space-2); margin: 0; font-weight: var(--lm-weight-semibold); }
.lm-paccess__you-text svg { inline-size: 18px; block-size: 18px; flex: none; color: var(--lm-primary-text); }
.lm-paccess__you .lm-help { margin: var(--lm-space-1) 0 0; }
.lm-paccess__table-wrap { position: relative; overflow-x: auto; min-inline-size: 0; }
.lm-paccess__table { inline-size: 100%; border-collapse: collapse; font-size: var(--lm-text-sm); }
.lm-paccess__table th, .lm-paccess__table td { position: relative; padding: var(--lm-space-2); border-block-end: 1px solid var(--lm-card-border); text-align: center; }
.lm-paccess__table th[scope="row"] { text-align: start; font-weight: var(--lm-weight-medium); min-inline-size: 12rem; }
.lm-paccess__table thead th { color: var(--lm-text-secondary); font-weight: var(--lm-weight-semibold); white-space: nowrap; }
.lm-paccess__table .is-you { background-color: var(--lm-primary-soft); }
.lm-paccess__yes { display: inline-grid; place-items: center; inline-size: 22px; block-size: 22px; color: var(--lm-success-text); }
.lm-paccess__yes svg { inline-size: 18px; block-size: 18px; }
.lm-paccess__no { color: var(--lm-text-secondary); }
.lm-paccess__history { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.lm-paccess__event { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--lm-space-1) var(--lm-space-3); padding-block: var(--lm-space-2); border-block-end: 1px solid var(--lm-card-border); }
.lm-paccess__event:last-child { border-block-end: 0; }
.lm-paccess__event-text { flex: 1 1 14rem; min-inline-size: 0; overflow-wrap: anywhere; }

.lm-page-cta svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-page-open { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-page-open svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-page-open.is-open { color: var(--lm-success-text); font-weight: var(--lm-weight-semibold); }
.lm-page-about__long { white-space: pre-wrap; overflow-wrap: anywhere; }
.lm-page-contact, .lm-page-hours { min-inline-size: 0; }
.lm-page-contact__list { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0; padding: 0; list-style: none; }
.lm-page-contact__list li { display: flex; align-items: flex-start; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-page-contact__list li > svg { inline-size: 18px; block-size: 18px; flex: none; margin-block-start: 2px; color: var(--lm-text-secondary); }
.lm-page-contact__list a { overflow-wrap: anywhere; min-inline-size: 0; }
.lm-page-contact__place { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.lm-page-contact__directions { font-size: var(--lm-text-sm); }
.lm-page-contact__social { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); margin: var(--lm-space-3) 0 0; padding: 0; list-style: none; }
.lm-page-contact__social svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-page-hours__week { display: flex; flex-direction: column; margin: var(--lm-space-2) 0; }
.lm-page-hours__day { display: flex; justify-content: space-between; gap: var(--lm-space-3); padding: 6px var(--lm-space-2); border-radius: var(--lm-radius-sm); }
.lm-page-hours__day dt, .lm-page-hours__day dd { margin: 0; }
.lm-page-hours__day dd { color: var(--lm-text-secondary); text-align: end; }
.lm-page-hours__day.is-today { background-color: var(--lm-surface-secondary); font-weight: var(--lm-weight-semibold); }
.lm-page-hours__day.is-today dd { color: var(--lm-text); }

@media (max-width: 640px) {
  .lm-psettings__grid, .lm-psettings__grid--3, .lm-psettings__ctas { grid-template-columns: minmax(0, 1fr); }
  .lm-psettings__day { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .lm-psettings__times { grid-column: 1 / -1; }
  .lm-psettings__times .lm-input { flex: 1 1 0; inline-size: auto; }
  .lm-psettings__jump { position: static; }
}

/* Phase 65. A Page's header on a phone: its buttons wrap to a second line
   rather than squeezing their words, and the action button takes a row of
   its own, full width. */
@media (max-width: 479px) {
  .lm-page-profile .lm-community__actions { flex-wrap: wrap; }
  .lm-page-profile .lm-community__actions > .lm-btn { white-space: nowrap; }
  .lm-page-profile .lm-community__actions > .lm-page-cta { flex: 1 1 100%; justify-content: center; order: -1; }
}

/* -- Phase 66: Page analytics -------------------------------------------------
   A figure's change against the previous period (arrow and words, never
   colour alone), the interactions broken down, the video cards and the
   content-type table. Every icon in a sized box.
   -------------------------------------------------------------------- */
.lm-studio-change { display: inline-flex; align-items: center; gap: 4px; margin: 2px 0 0; font-size: var(--lm-text-xs); font-weight: var(--lm-weight-semibold); color: var(--lm-text-secondary); }
.lm-studio-change svg { inline-size: 14px; block-size: 14px; flex: none; }
.lm-studio-change--up { color: var(--lm-success-text); }
.lm-studio-change--down { color: var(--lm-danger-text); }
.lm-studio__panel-title svg { inline-size: 18px; block-size: 18px; flex: none; vertical-align: -3px; margin-inline-end: 6px; }
.lm-studio-parts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--lm-space-2); margin: 0; }
.lm-studio-parts__item { display: flex; flex-direction: column; gap: 2px; padding: var(--lm-space-2) var(--lm-space-3); border-radius: var(--lm-radius-md); background-color: var(--lm-surface-secondary); min-inline-size: 0; }
.lm-studio-parts__item dt { color: var(--lm-text-secondary); font-size: var(--lm-text-xs); }
.lm-studio-parts__item dd { margin: 0; font-size: var(--lm-text-md); font-weight: var(--lm-weight-semibold); }
.lm-studio__panel .lm-studio-parts { margin-block: var(--lm-space-2); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lm-studio-cards--video { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--lm-space-2); margin: var(--lm-space-2) 0; }
.lm-studio-vcard { display: flex; flex-direction: column; gap: 2px; padding: var(--lm-space-3); border: 1px solid var(--lm-card-border); border-radius: var(--lm-radius-md); min-inline-size: 0; }
.lm-studio-vcard dt { color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-studio-vcard dd { margin: 0; font-size: var(--lm-text-lg); font-weight: var(--lm-weight-bold); overflow-wrap: anywhere; }
.lm-studio-table--types th[scope="row"] { text-align: start; font-weight: var(--lm-weight-medium); }

@media (max-width: 640px) {
  .lm-studio-parts, .lm-studio__panel .lm-studio-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lm-studio-cards--video { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lm-studio-table--types tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lm-studio-table--types th[scope="row"] { grid-column: 1 / -1; padding: 0; }
}

/* -- Phase 67: Page reviews and recommendations -------------------------------
   The figures (a share, never stars), the composer's yes/no choice, the
   review cards with the Page's official reply indented beneath, and Page
   Studio's list. The verdict is said in words and an icon, never colour
   alone. Every icon in a sized box.
   -------------------------------------------------------------------- */
.lm-page-rec { display: inline-flex; align-items: center; gap: 6px; color: var(--lm-text-secondary); font-size: var(--lm-text-sm); font-weight: var(--lm-weight-semibold); text-decoration: none; }
.lm-page-rec:hover, .lm-page-rec:focus-visible { color: var(--lm-text); text-decoration: underline; }
.lm-page-rec svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-reviews-summary, .lm-review-compose { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0; padding: var(--lm-space-5); }
.lm-reviews-summary__figure { display: flex; flex-direction: column; gap: var(--lm-space-2); }
.lm-reviews-summary__percent { display: flex; align-items: baseline; gap: var(--lm-space-2); margin: 0; font-size: var(--lm-text-md); }
.lm-reviews-summary__percent .lm-num { font-size: var(--lm-text-2xl); font-weight: var(--lm-weight-bold); }
.lm-reviews-summary__bar { position: relative; block-size: 8px; border-radius: var(--lm-radius-pill); background-color: var(--lm-surface-secondary); overflow: hidden; }
.lm-reviews-summary__bar span { display: block; block-size: 100%; border-radius: inherit; background-color: var(--lm-success); }
.lm-reviews-summary__none { margin: 0; color: var(--lm-text-secondary); font-weight: var(--lm-weight-medium); }
.lm-review-compose--guest { align-items: flex-start; }
.lm-review-compose--guest p { margin: 0; }
.lm-review-compose__title { margin: 0; font-size: var(--lm-text-md); font-weight: var(--lm-weight-semibold); }
.lm-review-compose__choice { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.lm-review-compose__choice legend { inline-size: 100%; margin-block-end: var(--lm-space-1); }
.lm-review-choice { position: relative; display: inline-flex; align-items: center; gap: var(--lm-space-2); padding: var(--lm-space-2) var(--lm-space-4); border: 1px solid var(--lm-card-border); border-radius: var(--lm-radius-pill); cursor: pointer; font-weight: var(--lm-weight-medium); }
.lm-review-choice input { position: absolute; opacity: 0; inline-size: 1px; block-size: 1px; }
.lm-review-choice svg { inline-size: 18px; block-size: 18px; flex: none; }
.lm-review-choice--yes svg { color: var(--lm-success-text); }
.lm-review-choice--no svg { color: var(--lm-danger-text); }
.lm-review-choice:has(input:checked) { border-color: var(--lm-primary-strong); background-color: var(--lm-primary-soft); }
.lm-review-choice:has(input:focus-visible) { outline: 2px solid var(--lm-primary-strong); outline-offset: 2px; }
.lm-reviews__list { display: flex; flex-direction: column; gap: var(--lm-space-3); }
.lm-review { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0; padding: var(--lm-space-4); min-inline-size: 0; }
.lm-review.is-mine { border-color: var(--lm-primary-strong); }
.lm-review__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-1) var(--lm-space-3); min-inline-size: 0; }
.lm-review__who { display: inline-flex; align-items: center; gap: var(--lm-space-2); color: var(--lm-text); text-decoration: none; min-inline-size: 0; }
.lm-review__name { font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-review__verdict { display: inline-flex; align-items: center; gap: 4px; font-size: var(--lm-text-sm); font-weight: var(--lm-weight-semibold); }
.lm-review__verdict svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-review__verdict--yes { color: var(--lm-success-text); }
.lm-review__verdict--no { color: var(--lm-danger-text); }
.lm-review__when { margin-inline-start: auto; }
.lm-review__text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.lm-review__reply { display: flex; flex-direction: column; gap: var(--lm-space-1); margin-inline-start: var(--lm-space-4); padding: var(--lm-space-2) var(--lm-space-3); border-inline-start: 3px solid var(--lm-primary-strong); border-radius: var(--lm-radius-sm); background-color: var(--lm-surface-secondary); min-inline-size: 0; }
.lm-review__reply-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-review__reply-who { font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; }
.lm-review__actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-1); }
.lm-review__actions svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-review__reply-form { position: relative; display: flex; flex-direction: column; gap: var(--lm-space-2); }
.lm-review__reply-form[hidden] { display: none; }
.lm-review__form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--lm-space-2); }
.lm-reviews__sort { margin-block: var(--lm-space-1); }
.lm-studio-reviews { display: flex; flex-direction: column; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-studio-reviews__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-2); }
.lm-studio-reviews__search { position: relative; flex: 0 1 18rem; min-inline-size: 0; }
.lm-studio-reviews__search .lm-input { inline-size: 100%; }
.lm-studio-review { display: flex; flex-direction: column; gap: var(--lm-space-1); align-items: flex-start; }
.lm-studio-review > .lm-review { align-self: stretch; }

@media (max-width: 640px) {
  .lm-reviews-summary, .lm-review-compose { padding: var(--lm-space-4); }
  .lm-review__when { margin-inline-start: 0; inline-size: 100%; }
  .lm-review__reply { margin-inline-start: 0; }
  .lm-studio-reviews__search { flex: 1 1 100%; }
  .lm-studio-reviews .lm-studio-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* -- Phase 68: Page-owned reels -------------------------------------------------
   The Page's Reels tab (the Reels grid, as on a profile) and Page Studio →
   Reels: a list of the Page's reels with their figures. Every icon sits in a
   box of its own size (an unsized SVG collapses or blows up otherwise). */
.lm-page-reels__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-2); }
.lm-page-reels__head .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-page-reels .lm-card__body { padding-block-start: 0; }
.lm-reelcreate__as-page { margin-block-end: var(--lm-space-3); }
.lm-studio-reels { display: flex; flex-direction: column; gap: var(--lm-space-3); min-inline-size: 0; }
.lm-studio-reels__top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); margin: 0; font-size: var(--lm-text-sm); min-inline-size: 0; }
.lm-studio-reels__top svg { flex: 0 0 18px; inline-size: 18px; block-size: 18px; color: var(--lm-text-secondary); }
.lm-studio-reels__top-link { font-weight: var(--lm-weight-semibold); overflow-wrap: anywhere; min-inline-size: 0; }
.lm-studio-reels__list { display: flex; flex-direction: column; gap: var(--lm-space-2); margin: 0; padding: 0; list-style: none; }
.lm-studio-reel { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: var(--lm-space-3); align-items: start; padding: var(--lm-space-3); border: 1px solid var(--lm-border); border-radius: var(--lm-radius-md); background-color: var(--lm-surface); }
.lm-studio-reel__thumb { position: relative; display: grid; place-items: center; inline-size: 72px; block-size: 128px; border-radius: var(--lm-radius-sm); overflow: hidden; background-color: var(--lm-surface-2); color: var(--lm-text-secondary); }
.lm-studio-reel__thumb img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.lm-studio-reel__thumb > svg { inline-size: 24px; block-size: 24px; }
.lm-studio-reel__length { position: absolute; inset-block-end: 4px; inset-inline-end: 4px; padding: 0 4px; border-radius: var(--lm-radius-sm); background-color: var(--lm-overlay); color: var(--lm-on-scrim); font-size: var(--lm-text-xs); }
.lm-studio-reel__body { display: flex; flex-direction: column; gap: var(--lm-space-2); min-inline-size: 0; }
.lm-studio-reel__caption { margin: 0; font-weight: var(--lm-weight-medium); overflow-wrap: anywhere; }
.lm-studio-reel__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lm-space-2); margin: 0; font-size: var(--lm-text-sm); color: var(--lm-text-secondary); }
.lm-studio-reel__figures { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: var(--lm-space-1) var(--lm-space-3); margin: 0; }
.lm-studio-reel__figures > div { display: flex; flex-direction: column; min-inline-size: 0; }
.lm-studio-reel__figures dt { font-size: var(--lm-text-xs); color: var(--lm-text-secondary); }
.lm-studio-reel__figures dd { margin: 0; font-weight: var(--lm-weight-semibold); }
.lm-studio-reel__actions { display: flex; flex-direction: column; gap: var(--lm-space-1); align-items: stretch; }
.lm-studio-reel__actions .lm-btn svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-studio-reel[data-state="deleted"] { opacity: 0.75; }

@media (max-width: 640px) {
  .lm-studio-reel { grid-template-columns: 64px minmax(0, 1fr); }
  .lm-studio-reel__thumb { inline-size: 64px; block-size: 112px; }
  .lm-studio-reel__actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .lm-studio-reels .lm-studio-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* -- Phase 69: Page reel comments in Page Studio → Inbox -------------------------
   A reel comment carries its reel: the still, the Page, the caption — one
   link to the reel with the thread open. */
.lm-inbox__comment-reel { display: flex; align-items: center; gap: var(--lm-space-2); color: inherit; text-decoration: none; }
.lm-inbox__comment-reel:hover .lm-inbox__reel-caption { text-decoration: underline; }
.lm-inbox__comment-reel .lm-inbox__reel-thumb { display: grid; place-items: center; flex: 0 0 40px; inline-size: 40px; block-size: 64px; border-radius: 8px; overflow: hidden; background-color: var(--lm-surface-2); color: var(--lm-text-secondary); }
.lm-inbox__comment-reel .lm-inbox__reel-thumb img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.lm-inbox__comment-reel .lm-inbox__reel-thumb > svg { inline-size: 20px; block-size: 20px; }
.lm-inbox__comment-reel .lm-inbox__reel-about { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; overflow: visible; white-space: normal; }
.lm-inbox__comment-reel .lm-inbox__reel-kind { display: inline-flex; align-items: center; gap: 4px; font-size: var(--lm-text-xs); font-weight: var(--lm-weight-semibold); color: var(--lm-primary-text); }
.lm-inbox__comment-reel .lm-inbox__reel-kind svg { inline-size: 14px; block-size: 14px; flex: none; }
.lm-inbox__comment-reel .lm-inbox__reel-caption { color: var(--lm-text); }

/* -- Phase 70: attachments in Page Studio → Inbox, and its live update ------------
   The Messenger's own attachment partial inside the Inbox bubble, given a
   definite width so a picture or a video never collapses or overflows. */
.lm-inbox__msg.has-media { inline-size: min(20rem, 80%); }
.lm-inbox__msg.has-media .lm-inbox__bubble { inline-size: 100%; padding: 4px; }
.lm-inbox__msg.has-media .lm-inbox__body { padding: var(--lm-space-1) var(--lm-space-2); }
.lm-inbox__media { display: flex; flex-direction: column; gap: 4px; min-inline-size: 0; }
.lm-inbox__media .lm-msg__image, .lm-inbox__media .lm-msg__video { max-inline-size: 100%; }
.lm-inbox__media .lm-msg__file { max-inline-size: 100%; }
.lm-inbox__media-gone { display: flex; align-items: center; gap: 6px; padding: var(--lm-space-2); color: var(--lm-text-secondary); font-size: var(--lm-text-sm); }
.lm-inbox__media-gone svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-inbox__attach svg { inline-size: 20px; block-size: 20px; }
.lm-inbox__attached { display: flex; align-items: center; gap: 6px; margin: 0 0 var(--lm-space-2); color: var(--lm-text-secondary); font-size: var(--lm-text-sm); min-inline-size: 0; }
.lm-inbox__attached > svg { inline-size: 16px; block-size: 16px; flex: none; }
.lm-inbox__attached-name { flex: 1 1 auto; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-inbox__attached .lm-icon-btn svg { inline-size: 16px; block-size: 16px; }
.lm-inbox__fresh { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--lm-space-2); margin: 0 0 var(--lm-space-2); padding: var(--lm-space-2) var(--lm-space-3); border-radius: var(--lm-radius-md); background-color: var(--lm-info-soft); color: var(--lm-info-text); font-size: var(--lm-text-sm); }

/* -- Phase 71: private accounts, follow requests, the privacy center -----------
   A private profile's notice in place of its tabs; the requests list; the
   privacy page's notes and links. Every icon in a box of its own size. */
.lm-profile-private { display: flex; flex-direction: column; align-items: center; gap: var(--lm-space-2); padding: var(--lm-space-6) var(--lm-space-4); text-align: center; }
.lm-profile-private__icon { display: grid; place-items: center; inline-size: 56px; block-size: 56px; border-radius: 50%; background-color: var(--lm-surface-2); color: var(--lm-text-secondary); }
.lm-profile-private__icon svg { inline-size: 26px; block-size: 26px; }
.lm-profile-private__title { margin: 0; font-size: var(--lm-text-lg); font-weight: var(--lm-weight-semibold); }
.lm-profile-private__text { margin: 0; max-inline-size: 28rem; color: var(--lm-text-secondary); }
.lm-follow-requests__head { display: flex; align-items: center; gap: var(--lm-space-2); }
.lm-follow-request { align-items: center; }
.lm-follow-request__actions { display: flex; flex-wrap: wrap; gap: var(--lm-space-1); justify-content: flex-end; }
.lm-privacy__note { display: flex; align-items: flex-start; gap: 6px; margin: var(--lm-space-2) 0 0; }
.lm-privacy__note svg { flex: 0 0 16px; inline-size: 16px; block-size: 16px; margin-block-start: 2px; }
.lm-privacy__links { display: flex; flex-direction: column; gap: var(--lm-space-2); }
.lm-privacy__link { display: flex; align-items: center; gap: var(--lm-space-3); padding: var(--lm-space-2); border-radius: var(--lm-radius-md); color: inherit; text-decoration: none; }
.lm-privacy__link:hover { background-color: var(--lm-surface-2); }
.lm-privacy__link > svg { flex: 0 0 20px; inline-size: 20px; block-size: 20px; color: var(--lm-text-secondary); }
.lm-privacy__link > span { display: flex; flex-direction: column; min-inline-size: 0; }
.lm-pymk .lm-btn.lm-pymk__follow.lm-follow--req { background: var(--lm-surface-secondary); color: var(--lm-text); }

/* -- Phase 72: muting, and the privacy center's new sections ------------------
   The profile menu's Mute / Unmute labels (one hidden at a time) and the
   muted accounts' rows. */
.lm-mute__on, .lm-mute__off { display: inline; }
.lm-muted-row { align-items: center; }
