/* ═══════════════════════════════════════════════════════════════════════════
   lane-messages.css: the messages lane family (desktop fan-out unit MESSAGES;
   docs/plans/desktop/audit/account-messaging.md). Linked by the layout.

   Three pages: the inbox (desktop/pages/Messages.php, Browse), the conversation
   (Messages-View.php, Focus) and what it is about (Messages-Info.php, Act).
   Built from the kit (kit.css, prefix k-); this sheet adds the lfm- parts and
   styles the phone's own bubble markup (.mvb-*, .mvc-*, .mva-*, rendered by the
   shared bubble renderer the send and poll endpoints answer with), scoped to
   the thread, because the phone's app.css is never loaded here.

   Rules (kit.css): every selector starts .desktop-surface; no font-weight for
   emphasis (swap the family); fills are full background shorthands; no viewport
   media queries (the lane's own width decides, @container lane); nothing is
   fixed or floats over anything: the drop target, the report form, an open
   photo and an open PDF are states that push the content around them.

   Contents
     1  Colour names the phone's markup uses
     2  The inbox: head, filters, Hoku door, the board, rows
     3  The conversation: head, report, chat, days, bubbles, cards, composer, recorder
     4  The context lane: who, listing, booking sections
     5  Reduced motion
   ═══════════════════════════════════════════════════════════════════════════ */


/* ─── 1. COLOUR NAMES ──────────────────────────────────────────────────────── */
/* Bubble and card html uses the phone's colour utilities. Bootstrap brings
   text-white / -muted / -success / -warning; the rest are mapped to desktop inks. */

.desktop-surface .lfm-thread .text-brand { color: var(--ink-pink) !important; }
.desktop-surface .lfm-thread .text-warning-dk { color: var(--ink-amber) !important; }
.desktop-surface .lfm-thread .text-success { color: var(--ink-green) !important; }
.desktop-surface .lfm-thread .text-primary { color: var(--ink-blue) !important; }
.desktop-surface .lfm-thread .text-warn { color: var(--ink-purple) !important; }
.desktop-surface .lfm-thread .text-xs { font-size: var(--type-meta); }
.desktop-surface .lfm-thread .text-sm { font-size: var(--type-meta); }
.desktop-surface .lfm-thread :is(._600, .font-weight-bolder) { font-family: var(--font-head); font-weight: normal; }
.desktop-surface .lfm-thread .flex { display: flex; align-items: center; gap: 0.4em; }

/* State pages (signed out, not available, a support ticket, nothing to show) */
.desktop-surface .lfm-msg-state { min-height: 60%; align-content: center; }
.desktop-surface .lfm-msg-state .k-meta { max-width: 38ch; text-align: center; }
.desktop-surface .lfm-msg-state--quiet .k-empty-art { width: 5.5rem; font-size: 2rem; }


/* ─── 1b. THREE LANES AT A 1440 WINDOW ────────────────────────────────────── */
/* ONE rule that reaches outside the lanes, the same move lane-hoku.css section 1b makes: while
   the messages journey is on the stage (the inbox, a conversation or what it is about), the List
   basis is a little slimmer (18rem: an inbox row still shows the whole first name, the time and
   the first words of the subject; the context lane's parts fold to their narrow forms under
   24rem), so the inbox, the conversation at Stage and the context beside it all stay open at a
   1440 window instead of the context folding to a Spine. A value for the foundation's
   --lane-list token, not a width: the fit rule measures it, so nothing folds that would not.
   Keyed on the pages being in their lanes (present before the fit runs on a click in the inbox
   and on a cold load), and not while Hoku holds the Ask lane (its own rule sizes that List). */
.desktop-surface .desktop-stage:has(> .lane > .lane-body > :is(.lfm-inbox, .lfm-thread, .lfm-info)):not(:has(> .lane[data-lane="ask"] > .lane-body > .lf-hoku)) {
    --lane-list: clamp(18rem, 22cqi, 28rem);
}


/* ─── 2. THE INBOX ─────────────────────────────────────────────────────────── */

.desktop-surface .lfm-inbox {
    display: grid;
    gap: var(--space-md);
    align-content: start;
}

.desktop-surface .lfm-inbox-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: var(--space-sm) var(--space-md);
}

.desktop-surface .lfm-inbox-title { color: var(--ink-blue); }
.desktop-surface .lfm-inbox-count { margin-top: 0.15rem; }
.desktop-surface .lfm-inbox-acts { justify-self: end; }
.desktop-surface .lfm-filters { grid-column: 1 / -1; }
.desktop-surface .lfm-filters .k-chip-count {
    min-width: 1.4em;
    padding: 0 0.35em;
    border-radius: 1em;
    background: rgba(255, 255, 255, 0.55);
    text-align: center;
}
.desktop-surface .lfm-filters .k-chip[aria-pressed="true"] .k-chip-count { background: rgba(255, 255, 255, 0.25); }

/* The Hoku door: the phone's .laleh-pin, a glass row washed in Hoku's colours */
.desktop-surface .lfm-hoku-door {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 0.85rem var(--pad-panel);
    border-radius: var(--r-panel);
    background: linear-gradient(100deg, rgba(255, 228, 238, 0.95), rgba(232, 223, 255, 0.92) 60%, rgba(224, 237, 255, 0.9));
    outline: var(--glass-outline);
    box-shadow: var(--shadow-cont-sm-lt);
    color: var(--text);
    text-decoration: none;
    transition: transform var(--dur-base) var(--ease-spring);
}
.desktop-surface .lfm-hoku-icon { color: var(--rt-pink-deep); font-size: 1.35rem; }
.desktop-surface .lfm-hoku-text { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.2rem 1rem; }
.desktop-surface .lfm-hoku-title { font-family: var(--font-head); font-size: var(--type-body); }
.desktop-surface .lfm-hoku-unread { color: var(--ink-pink); }
.desktop-surface .lfm-hoku-door.is-unread .lfm-hoku-icon { animation: lfm-bounce 1.6s var(--ease-out) 2; }

/* The board: one column per group at Stage, the groups stacked at List. A lone
   group (a filter that keeps one bucket) spreads its rows across the width.
   A column is never under 20rem: a row then shows the person's whole first name
   and the first words of the subject and the last line, so a 1440 window gets
   three columns, 1100 two, a wide one all four (only four groups exist).
   Groups of different lengths pack like masonry, each into the shortest column,
   so no group leaves a hole under a shorter neighbour: Messages.js measures each
   group and gives it a span of the 4px rows (data-masonry). Until it has, the
   board is a plain grid with gaps, right but not packed. */
.desktop-surface .lfm-board {
    --lfm-gap: var(--space-md);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    align-items: start;
    gap: var(--lfm-gap);
}
.desktop-surface .lfm-board[data-masonry] {
    grid-auto-rows: 4px;
    row-gap: 0;
}
.desktop-surface .lfm-board[data-masonry] > .lfm-group { margin-bottom: var(--lfm-gap); }

.desktop-surface .lfm-board[data-groups="1"] { grid-template-columns: minmax(0, 1fr); }
.desktop-surface .lfm-board[data-groups="1"] .lfm-group-rows {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
}
.desktop-surface .lfm-board[data-groups="1"] .lfm-row { border-top: 0; box-shadow: inset 0 -1px 0 var(--glass-rule); }

.desktop-surface .lfm-group {
    min-width: 0;
    border-radius: var(--r-panel);
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    outline: var(--glass-outline);
    box-shadow: var(--shadow-cont-sm);
    overflow: hidden;
}
.desktop-surface .lfm-group[hidden] { display: none; }

.desktop-surface .lfm-group-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem var(--pad-panel);
    background: var(--tone-head, var(--head-blue));
    color: #fff;
}
.desktop-surface .lfm-group-icon { font-size: 1.05rem; opacity: 0.92; }
.desktop-surface .lfm-group-title {
    flex: 1 1 auto;
    margin: 0;
    font-family: var(--font-head);
    font-weight: normal;
    font-size: var(--type-lead);
    letter-spacing: var(--track-snug);
    color: #fff;
}
.desktop-surface .lfm-group-count {
    min-width: 1.8em;
    padding: 0.1em 0.5em;
    border-radius: 1em;
    background: rgba(255, 255, 255, 0.24);
    font-family: var(--font-head);
    font-size: var(--type-meta);
    text-align: center;
}

/* A row: the phone's .category-item.messages, re-set for a lane */
.desktop-surface .lfm-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.85rem var(--pad-panel) 0.85rem calc(var(--pad-panel) - 0.15rem);
    border-top: 1px solid var(--glass-rule);
    color: var(--text);
    text-decoration: none;
    transition: background var(--dur-fast) var(--ease-out);
}
.desktop-surface .lfm-row:first-child { border-top: 0; }
.desktop-surface .lfm-row[hidden] { display: none; }
.desktop-surface .lfm-row:hover { color: var(--text); }

.desktop-surface .lfm-row-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 1.6rem;
    margin-top: 0.1rem;
    color: var(--tone-ink, var(--ink-blue));
    font-size: 1.05rem;
}
.desktop-surface .lfm-row-icon.is-bouncing { animation: lfm-bounce 1.6s var(--ease-out) 2; }

.desktop-surface .lfm-row-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 0.15rem; }
/* The name comes first: when the name and the type and time do not fit on one line,
   the type and time wrap under the name instead of the name being cut. */
.desktop-surface .lfm-row-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 0.6rem; min-width: 0; }
.desktop-surface .lfm-row-name {
    flex: 0 1 auto;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-text);   /* a read row rests in buch; unread is the bold one (below) */
    font-size: var(--type-body);
    color: var(--text);
}
.desktop-surface .lfm-row-when { flex: 0 0 auto; font-size: var(--type-meta); color: var(--text-faint); white-space: nowrap; }
.desktop-surface .lfm-row-type { font-family: var(--font-head); color: var(--tone-ink, var(--text-soft)); }
.desktop-surface .lfm-row-subject {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    font-family: var(--font-head);
    font-size: var(--type-meta);
    line-height: 1.35;
    color: var(--tone-ink, var(--text));
}
.desktop-surface .lfm-row-subject.k-tone-slate { color: var(--text); }
.desktop-surface .lfm-row-preview {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: var(--type-meta);
    line-height: 1.4;
    color: var(--text-soft);
}
.desktop-surface .lfm-row-chips { display: flex; flex-wrap: wrap; gap: 0.15rem 0.75rem; margin-top: 0.15rem; }
.desktop-surface .lfm-row-chip {
    font-family: var(--font-head);
    font-size: var(--type-meta);
    color: var(--text-soft);
    white-space: nowrap;
}
.desktop-surface .lfm-row-chip > i { color: var(--tone, var(--rt-blue)); font-size: 0.7em; vertical-align: 0.1em; }
.desktop-surface .lfm-row-chev { flex: none; align-self: center; color: var(--rt-slate); transition: transform var(--dur-base) var(--ease-out); }

/* Read rows recede; unread rows carry the brand edge and a fuller name */
.desktop-surface .lfm-row:not(.is-unread) .lfm-row-preview { color: var(--text-faint); }
.desktop-surface .lfm-row.is-unread { background: linear-gradient(90deg, rgba(255, 228, 238, 0.7), rgba(255, 228, 238, 0) 70%); }
.desktop-surface .lfm-row.is-unread::before {
    content: "";
    position: absolute;
    inset: 0.7rem auto 0.7rem 0;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--rt-pink);
}
.desktop-surface .lfm-row.is-unread .lfm-row-name { font-family: var(--font-head); letter-spacing: var(--track-snug); }
.desktop-surface .lfm-row.is-unread .lfm-row-preview { color: var(--text); }

/* The open conversation */
.desktop-surface .lfm-row.is-on {
    background: linear-gradient(90deg, var(--rt-blue-slt), rgba(224, 237, 255, 0.35));
    box-shadow: inset 4px 0 0 var(--rt-blue);
}
.desktop-surface .lfm-row.is-on::before { display: none; }
.desktop-surface .lfm-row.is-on .lfm-row-chev { color: var(--rt-blue); transform: translateX(0.25rem); }
.desktop-surface .lfm-row:focus-visible { outline: 3px solid var(--rt-blue); outline-offset: -3px; }

@media (hover: hover) and (pointer: fine) {
    .desktop-surface .lfm-row:hover { background-color: rgba(224, 237, 255, 0.55); }
    .desktop-surface .lfm-row:hover .lfm-row-chev { transform: translateX(0.3rem); }
    .desktop-surface .lfm-hoku-door:hover { transform: translateY(-2px); }
}

.desktop-surface .lfm-inbox-note:empty { display: none; }

/* A List-width inbox: tighter rows, one line of preview, the type word goes */
@container lane (width < 30rem) {
    .desktop-surface .lfm-inbox-head { grid-template-columns: minmax(0, 1fr); }
    .desktop-surface .lfm-inbox-acts { justify-self: start; }
    .desktop-surface .lfm-filters { gap: 0.35rem; }
    .desktop-surface .lfm-filters .k-chip { min-height: 2rem; padding-inline: 0.75em; }
    .desktop-surface .lfm-row { gap: 0.6rem; padding-block: 0.7rem; }
    .desktop-surface .lfm-row-preview { -webkit-line-clamp: 1; }
    .desktop-surface .lfm-row-type, .desktop-surface .lfm-row-when > span[aria-hidden] { display: none; }
    .desktop-surface .lfm-group-head { padding-block: 0.6rem; }
}


/* ─── 3. THE CONVERSATION ──────────────────────────────────────────────────── */
/* The page owns its lane (data-bleed="lane"): head, chat (the one scroller), composer. */

.desktop-surface .lfm-thread:not(.lfm-thread--state) {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}
.desktop-surface .lfm-thread--state { padding: var(--lane-pad-now, 1rem); height: 100%; display: grid; }

.desktop-surface .lfm-thread-head {
    flex: none;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--pad-panel);
    /* A solid surface the full width of the lane with a hairline under it: the chat scrolls in its
       own box below, and nothing ever shows through or slides under the head. */
    background: linear-gradient(110deg, rgb(226, 238, 255), rgb(255, 255, 255) 55%, rgb(255, 232, 241));
    border-bottom: 1px solid var(--glass-rule);
    box-shadow: 0 1px 0 rgba(21, 56, 105, 0.06);
    position: relative;
    z-index: 1;
}
.desktop-surface .lfm-thread-avatar { --k-size: clamp(3rem, 2.6rem + 1.4cqi, 4rem); }
.desktop-surface .lfm-thread-who { flex: 1 1 auto; min-width: 0; display: grid; gap: 0.3rem; }
.desktop-surface .lfm-thread-name {
    margin: 0;
    font-family: var(--font-head);
    font-weight: normal;
    font-size: clamp(1.5rem, 1.2rem + 1.1cqi, 2.25rem);
    line-height: 1.05;
    letter-spacing: var(--track-tight);
    color: var(--text);
}
.desktop-surface .lfm-thread-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0; }
/* What the thread is about: up to two lines, so a narrow lane wraps the title at a word instead of
   cutting it mid-word ("Flexible Scheduli..."). */
.desktop-surface .lfm-thread-about {
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    overflow-wrap: break-word;
    font-size: var(--type-meta);
    line-height: 1.35;
    color: var(--text-soft);
}
.desktop-surface .lfm-thread-about a { font-family: var(--font-head); color: var(--ink-blue); }
.desktop-surface .lfm-thread-acts { flex: none; align-self: flex-start; }

/* Report: an expansion under the head that pushes the chat down */
.desktop-surface .lfm-report {
    flex: none;
    display: grid;
    gap: var(--space-sm);
    padding: var(--space-md) var(--pad-panel);
    background: linear-gradient(180deg, rgba(254, 195, 102, 0.22), rgba(255, 255, 255, 0.6));
    border-bottom: 1px solid var(--glass-rule);
}
.desktop-surface .lfm-report[hidden] { display: none; }
.desktop-surface .lfm-report > * { margin: 0; }
.desktop-surface .lfm-report-note { min-height: 3.5rem; }
.desktop-surface .lfm-ack {
    flex: none;
    margin: 0;
    padding: 0 var(--pad-panel);
    max-height: 0;
    overflow: hidden;
    font-family: var(--font-head);
    font-size: var(--type-meta);
    color: var(--ink-green);
    transition: max-height var(--dur-base) var(--ease-out), padding var(--dur-base) var(--ease-out);
}
.desktop-surface .lfm-ack.is-on { max-height: 3rem; padding-block: 0.55rem; background: var(--rt-success-slt); }

/* The chat: the scroller. Reading width grows with the lane but stays a column. */
.desktop-surface .lfm-chat {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden auto;
    overscroll-behavior: contain;
    padding: var(--space-md) clamp(0.75rem, 3cqi, 2.5rem) var(--space-lg);
    outline: none;
}
.desktop-surface .lfm-chat-list {
    max-width: min(100%, 70rem);
    margin-inline: auto;
    display: flex;
    flex-direction: column;
}

.desktop-surface .lfm-chat-intro {
    display: grid;
    justify-items: center;
    gap: var(--space-sm);
    margin: clamp(2rem, 8cqi, 6rem) auto 0;
    max-width: 34rem;
    text-align: center;
}
.desktop-surface .lfm-chat-intro > * { margin: 0; }
.desktop-surface .lfm-chat-intro-avatar { --k-size: 5.5rem; }

.desktop-surface .lfm-day,
.desktop-surface .lfm-new {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.1rem 0 0.4rem;
    font-family: var(--font-head);
    font-size: var(--type-meta);
    color: var(--text-soft);
}
.desktop-surface .lfm-day::before, .desktop-surface .lfm-day::after,
.desktop-surface .lfm-new::before, .desktop-surface .lfm-new::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--line);
}
.desktop-surface .lfm-day > span {
    padding: 0.2rem 0.75rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-ctl);
}
.desktop-surface .lfm-new { color: var(--ink-pink); }
.desktop-surface .lfm-new::before, .desktop-surface .lfm-new::after { background: var(--rt-pink-lt); }
.desktop-surface .lfm-new.is-read { opacity: 0.55; }

/* Bubbles (the phone's B-G2: mine = blues, theirs = clear glass, stamps outside) */
.desktop-surface .lfm-thread .mvb-run { display: flex; flex-direction: column; margin: 0.45rem 0; }
.desktop-surface .lfm-thread .mvb-mine { align-items: flex-end; }
.desktop-surface .lfm-thread .mvb-theirs { align-items: flex-start; }
.desktop-surface .lfm-thread .mvb-center { align-items: center; text-align: center; }

.desktop-surface .lfm-thread .mvb-bubble {
    max-width: min(72%, 40rem);
    margin-top: 0.2rem;
    padding: 0.65rem 1rem;
    border-radius: 1.25rem;
    font-family: var(--font-text);
    font-size: var(--type-body);
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.desktop-surface .lfm-thread .mvb-mine .mvb-bubble {
    background: linear-gradient(160deg, var(--rt-blue-lt) -10%, var(--rt-blue) 55%, var(--rt-blue-dk) 140%);
    color: #fff;
    box-shadow: 0 0.375rem 1rem rgba(44, 117, 222, 0.32), 0 0.125rem 0.375rem rgba(44, 117, 222, 0.2);
}
.desktop-surface .lfm-thread .mvb-mine .mvb-bubble.mvb-last { border-bottom-right-radius: 0.375rem; }
.desktop-surface .lfm-thread .mvb-theirs .mvb-bubble {
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: var(--text);
    box-shadow: 0 0.375rem 1rem rgba(21, 56, 105, 0.12);
}
.desktop-surface .lfm-thread .mvb-theirs .mvb-bubble.mvb-last { border-bottom-left-radius: 0.375rem; }
.desktop-surface .lfm-thread :is(.mvb-mine, .mvb-theirs) .mvb-bubble.mvb-here {
    background: linear-gradient(160deg, var(--rt-success-lt) -10%, var(--rt-success) 55%, var(--rt-green) 140%);
    color: #fff;
    border: 0;
    font-family: var(--font-head);
}
.desktop-surface .lfm-thread .mvb-stamp {
    margin: 0.3rem 0.75rem 0;
    padding: 0.1rem 0.6rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.5);
    font-size: var(--type-meta);
    color: var(--text-faint);
}

/* A message on its way, and one that did not go */
.desktop-surface .lfm-thread .lfm-pending .mvb-bubble { opacity: 0.72; }
.desktop-surface .lfm-thread .lfm-pending.is-failed .mvb-bubble {
    opacity: 1;
    background: #fff;
    color: var(--text);
    box-shadow: inset 0 0 0 2px var(--rt-pink);
}
.desktop-surface .lfm-thread .lfm-pending.is-failed .lfm-pending-stamp { color: var(--ink-pink); background: var(--rt-pink-slt); }
.desktop-surface .lfm-thread .lfm-resend {
    border: 0;
    padding: 0;
    background: none;
    font-family: var(--font-head);
    color: var(--ink-pink);
    text-decoration: underline;
    cursor: pointer;
}

/* L1 status line, L2 call to action, L3 RedTulip speaking */
.desktop-surface .lfm-thread .mvb-status {
    display: inline-block;
    max-width: min(86%, 40rem);
    padding: 0.45rem 0.95rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 0.25rem 0.75rem rgba(21, 56, 105, 0.08);
    font-size: var(--type-meta);
    color: var(--text-soft);
}
.desktop-surface .lfm-thread .mvb-cta {
    width: min(100%, 34rem);
    padding: 0.9rem 1.1rem;
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 0.5rem 1.5rem rgba(21, 56, 105, 0.14);
    font-size: var(--type-meta);
    color: var(--text);
}
.desktop-surface .lfm-thread .mvb-cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 0.75rem; }
.desktop-surface .lfm-thread .mvb-cta-btn {
    display: inline-block;
    padding: 0.5rem 1.15rem;
    border-radius: 2rem;
    background: var(--fill-blue);
    box-shadow: 0 0.375rem 0.875rem var(--glow-blue);
    font-family: var(--font-head);
    font-size: var(--type-meta);
    color: #fff;
    text-decoration: none;
}
.desktop-surface .lfm-thread .mvb-cta-btn--ghost { background: rgba(255, 255, 255, 0.7); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
.desktop-surface .lfm-thread .mvb-admin {
    width: min(100%, 34rem);
    padding: 0.9rem 1.1rem;
    border-radius: 1.1rem;
    background: var(--fill-pink);
    box-shadow: 0 0.5rem 1.5rem var(--glow-pink);
    color: #fff;
    text-align: left;
}
.desktop-surface .lfm-thread .mvb-admin-label { display: block; margin-bottom: 0.25rem; font-family: var(--font-head); font-size: var(--type-meta); opacity: 0.9; }

/* A reduced outcome pill (the whole pill opens the booking) */
.desktop-surface .lfm-thread .mvb-resolved {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    max-width: min(90%, 34rem);
    padding: 0.45rem 1rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 0.25rem 0.75rem rgba(21, 56, 105, 0.1);
    font-family: var(--font-head);
    font-size: var(--type-meta);
    color: var(--text);
    text-decoration: none;
}
.desktop-surface .lfm-thread .mvb-resolved .flex > i:first-child { font-size: 0.6em; }
.desktop-surface .lfm-thread .mvb-resolved .flex > i:last-child { font-size: 0.75em; color: var(--rt-slate); }
.desktop-surface .lfm-thread .mvb-resolved .text-warn { color: var(--rt-purple) !important; }
.desktop-surface .lfm-thread .mvb-resolved .text-success { color: var(--rt-success) !important; }
.desktop-surface .lfm-thread .mvb-resolved .text-primary { color: var(--rt-blue) !important; }
.desktop-surface .lfm-thread .mvb-resolved .text-brand { color: var(--rt-pink) !important; }
.desktop-surface .lfm-thread .mvb-resolved .mvb-stamp { margin-top: 0.15rem; background: none; padding: 0; }

/* The live booking and invoice cards (gradient strip, dark details, the buttons) */
.desktop-surface .lfm-thread .mvb-card {
    width: min(100%, 30rem);
    margin-top: 0.2rem;
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0.6rem 1.6rem rgba(21, 56, 105, 0.16);
    overflow: hidden;
    text-align: left;
}
.desktop-surface .lfm-thread .mvb-card .rbox-header { display: block; padding: 0.45rem 0.9rem; }
.desktop-surface .lfm-thread .mvb-card .mvc-strip {
    background: var(--fill-blue);
    font-family: var(--font-head);
    font-size: var(--type-meta);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.desktop-surface .lfm-thread .mvb-card .mvc-strip p { margin: 0; color: #fff; }
.desktop-surface .lfm-thread .mvb-card .mvc-strip--warn { background: var(--fill-purple); }
.desktop-surface .lfm-thread .mvb-card .mvc-strip--success { background: var(--fill-green); }
.desktop-surface .lfm-thread .mvb-card .mvc-strip--brand { background: var(--fill-pink); }
.desktop-surface .lfm-thread .mvb-card .mvc-strip--primary { background: var(--fill-blue); }
.desktop-surface .lfm-thread .mvb-card .mvc-header {
    position: relative;
    margin: 0.5rem;
    padding: 0.6rem;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, var(--rt-navy-1) 0%, var(--rt-navy-2) 45%, var(--rt-navy-3) 100%);
    color: #fff;
    text-decoration: none;
}
.desktop-surface .lfm-thread .mvb-card .mvc-row { align-items: center; margin: 0; }
.desktop-surface .lfm-thread .mvb-card .mvc-cube { max-width: 5rem; text-align: center; }
.desktop-surface .lfm-thread .mvb-card .mvc-cube p { margin: 0; font-family: var(--font-head); font-size: var(--type-meta); color: rgba(255, 255, 255, 0.85); }
.desktop-surface .lfm-thread .mvb-card .mvc-cube h3 { margin: -0.1rem 0 0; font-family: var(--font-head); font-size: 1.9rem; color: #fff; }
.desktop-surface .lfm-thread .mvb-card .mvc-cube sup { font-size: 0.45em; }
.desktop-surface .lfm-thread .mvb-card .mvc-lines { font-family: var(--font-head); font-size: var(--type-meta); color: rgba(255, 255, 255, 0.92); }
.desktop-surface .lfm-thread .mvb-card .mvc-lines p { margin: 0; line-height: 1.55; }
.desktop-surface .lfm-thread .mvb-card .mvc-lines i { width: 1.25rem; text-align: center; color: rgba(255, 255, 255, 0.55); }
.desktop-surface .lfm-thread .mvb-card .mvc-go { color: rgba(255, 255, 255, 0.7); padding-right: 0.35rem; }
.desktop-surface .lfm-thread .mvb-card .rbox-body { padding: 0.25rem 0.6rem 0.7rem; }
.desktop-surface .lfm-thread .mvb-card .rbox-body .row { row-gap: 0.4rem; margin-inline: -0.25rem; }
.desktop-surface .lfm-thread .mvb-card .rbox-body [class*="col"] { padding-inline: 0.25rem; }
.desktop-surface .lfm-thread .mvb-card .mvc-confirmed p { margin: 0; }
.desktop-surface .lfm-thread .mvb-card .mvc-countdown { font-family: var(--font-head); font-size: var(--type-lead); color: var(--ink-blue); }

/* The phone's thread buttons, as kit pills */
.desktop-surface .lfm-thread .mvc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    width: 100%;
    min-height: 2.5rem;
    padding: 0.4em 1em;
    border: 0;
    border-radius: var(--r-pill);
    background: var(--fill-blue);
    box-shadow: 0 0.3rem 0.8rem var(--glow-blue);
    font-family: var(--font-head);
    font-weight: normal;
    font-size: var(--type-meta);
    color: #fff;
    cursor: pointer;
}
.desktop-surface .lfm-thread .mvc-btn--success { background: var(--fill-green); box-shadow: 0 0.3rem 0.8rem var(--glow-green); }
.desktop-surface .lfm-thread .mvc-btn--warn { background: var(--fill-purple); box-shadow: 0 0.3rem 0.8rem var(--glow-purple); }
.desktop-surface .lfm-thread .mvc-btn--warning { background: var(--fill-amber); color: var(--rt-navy-2); }
.desktop-surface .lfm-thread .mvc-btn--brand { background: var(--fill-pink); box-shadow: 0 0.3rem 0.8rem var(--glow-pink); }
.desktop-surface .lfm-thread .mvc-btn--ghost { background: rgba(255, 255, 255, 0.75); box-shadow: inset 0 0 0 2px var(--line); color: var(--text); }
.desktop-surface .lfm-thread .mvc-btn--ghost-brand { box-shadow: inset 0 0 0 2px var(--ink-pink); color: var(--ink-pink); }
.desktop-surface .lfm-thread .mvc-btn--ghost-success { box-shadow: inset 0 0 0 2px var(--ink-green); color: var(--ink-green); }
.desktop-surface .lfm-thread .mvc-btn--ghost-primary { box-shadow: inset 0 0 0 2px var(--ink-blue); color: var(--ink-blue); }
.desktop-surface .lfm-thread .mvc-btn--report { color: var(--text-soft); }
.desktop-surface .lfm-thread .locked .mvc-btn,
.desktop-surface .lfm-thread .mvc-btn.locked { opacity: 0.55; pointer-events: none; }

/* Photos grow inside their own bubble; a PDF opens under its row */
.desktop-surface .lfm-thread .mvb-photo {
    display: block;
    max-width: min(60%, 18rem);
    margin-top: 0.2rem;
    border-radius: 1.1rem;
    overflow: hidden;
    box-shadow: 0 0.4rem 1.1rem rgba(21, 56, 105, 0.16);
    cursor: zoom-in;
    transition: max-width var(--lane-dur, 520ms) var(--lane-ease, ease);
}
.desktop-surface .lfm-thread .mvb-photo-img { display: block; width: 100%; height: auto; }
.desktop-surface .lfm-thread .mvb-photo.is-open { max-width: min(100%, 52rem); cursor: zoom-out; }
.desktop-surface .lfm-thread .mvb-photo:focus-visible { outline: 3px solid var(--rt-blue); outline-offset: 2px; }

.desktop-surface .lfm-thread :is(.mvb-file, .mvb-loc) {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: min(80%, 24rem);
    margin-top: 0.2rem;
    padding: 0.7rem 0.9rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0.35rem 1rem rgba(21, 56, 105, 0.12);
    color: var(--text);
    text-decoration: none;
}
.desktop-surface .lfm-thread :is(.mvb-file-icon, .mvb-loc-icon) { font-size: 1.6rem; color: var(--ink-pink); }
.desktop-surface .lfm-thread .mvb-loc-icon { color: var(--ink-blue); }
.desktop-surface .lfm-thread :is(.mvb-file-meta, .mvb-loc-meta) { display: grid; min-width: 0; text-align: left; }
.desktop-surface .lfm-thread :is(.mvb-file-name, .mvb-loc-title) { font-family: var(--font-head); font-size: var(--type-meta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desktop-surface .lfm-thread :is(.mvb-file-size, .mvb-loc-sub) { font-size: var(--type-meta); color: var(--text-faint); }
.desktop-surface .lfm-thread .lfm-doc { width: min(100%, 52rem); margin-top: 0.5rem; display: grid; gap: 0.35rem; }
.desktop-surface .lfm-thread .mvb-mine .lfm-doc { justify-items: end; }
.desktop-surface .lfm-thread .lfm-doc-frame {
    width: 100%;
    height: clamp(22rem, 60cqi, 44rem);
    border: 0;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 0.5rem 1.4rem rgba(21, 56, 105, 0.16);
}

/* Uploading, voice notes */
.desktop-surface .lfm-thread .mvb-uploading { display: inline-flex; align-items: center; gap: 0.6rem; opacity: 0.85; }
.desktop-surface .lfm-thread .mvb-uploading--photo { min-width: 10rem; min-height: 7rem; justify-content: center; }
.desktop-surface .lfm-thread .lfm-upload-label { font-size: var(--type-meta); }
.desktop-surface .lfm-thread .mvb-audio { display: flex; align-items: center; gap: 0.7rem; min-width: min(18rem, 72%); white-space: normal; }
.desktop-surface .lfm-thread .mva-play {
    display: grid;
    place-items: center;
    flex: none;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink-blue);
    cursor: pointer;
}
.desktop-surface .lfm-thread .mvb-theirs .mva-play { background: var(--fill-blue); color: #fff; }
.desktop-surface .lfm-thread .mva-track { flex: 1 1 auto; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.45); overflow: hidden; }
.desktop-surface .lfm-thread .mvb-theirs .mva-track { background: var(--rt-blue-slt); }
.desktop-surface .lfm-thread .mva-fill { width: 0; height: 100%; background: currentColor; }
.desktop-surface .lfm-thread .mva-time { font-family: var(--font-mono); font-size: var(--type-meta); }
.desktop-surface .lfm-thread .mva-transcript {
    max-width: min(72%, 40rem);
    margin-top: 0.25rem;
    padding: 0.4rem 0.8rem;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.7);
    font-size: var(--type-meta);
    color: var(--text-soft);
    text-align: left;
}

/* The unverified-Keeper note, under the chat when a send was refused for it */
.desktop-surface .lfm-unverified { flex: none; margin: 0 var(--pad-panel) var(--space-sm); }
.desktop-surface .lfm-unverified[hidden] { display: none; }

/* The composer: a glass dock at the foot of the lane */
.desktop-surface .lfm-composer {
    flex: none;
    display: grid;
    gap: 0.45rem;
    margin: 0 clamp(0.5rem, 2cqi, 1.5rem) clamp(0.5rem, 1.5cqi, 1rem);
    padding: 0.6rem 0.75rem 0.5rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    outline: var(--glass-outline);
    box-shadow: 0 -0.25rem 1.5rem rgba(21, 56, 105, 0.1), var(--shadow-cont-sm-lt);
    transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-spring);
}
.desktop-surface .lfm-composer-alert { align-items: center; padding-block: 0.55rem; }
.desktop-surface .lfm-composer-alert[hidden] { display: none; }
.desktop-surface .lfm-composer-alert > div { flex: 1 1 auto; min-width: 0; }
.desktop-surface .lfm-composer-row { display: flex; align-items: flex-end; gap: 0.5rem; }
.desktop-surface .lfm-composer-row[hidden] { display: none; }
.desktop-surface .lfm-attach { display: flex; gap: 0.3rem; padding-bottom: 0.2rem; }
.desktop-surface .lfm-attach .k-iconbtn[aria-disabled="true"] { opacity: 0.45; }
.desktop-surface .lfm-composer-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 2.75rem;
    max-height: 13.75rem;
    padding: 0.6rem 1rem;
    border: 2px solid rgba(30, 40, 53, 0.12);
    border-radius: 1.4rem;
    background: #fff;
    font-family: var(--font-text);
    font-size: var(--type-body);
    line-height: 1.4;
    color: var(--text);
    resize: none;
    outline: none;
}
.desktop-surface .lfm-composer-input:focus { border-color: var(--rt-blue); box-shadow: 0 0 0 4px rgba(44, 117, 222, 0.16); }
.desktop-surface .lfm-send { flex: none; min-height: 2.75rem; padding-inline: 1.25em; }
/* Send rests as a ringed secondary and fills pink once there is something to send (the phone's
   send button appears with the text), so an empty composer never competes with the one primary
   the screen has (a Keeper's Accept beside the thread). */
.desktop-surface .lfm-send:not(.is-ready) {
    background: var(--_ghost);
    box-shadow: inset 0 0 0 2px var(--_ink);
    color: var(--_ink);
}
.desktop-surface .lfm-send.is-shaking { animation: lfm-shake 0.42s var(--ease-out); }
.desktop-surface .lfm-composer-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.2rem 1rem; margin: 0; padding: 0 0.4rem; }
/* Dropping files: the hint is the composer's own quiet line, which changes its words while a file
   is over the lane; the composer gains an inset outline. Nothing grows, moves or covers. */
.desktop-surface .lfm-drop-now { display: none; font-family: var(--font-head); color: var(--ink-pink); }
.desktop-surface .lfm-thread.is-dropping .lfm-drop-idle { display: none; }
.desktop-surface .lfm-thread.is-dropping .lfm-drop-now { display: inline; }
.desktop-surface .lfm-thread.is-dropping .lfm-composer { outline: 2px dashed var(--rt-pink); outline-offset: -2px; }

/* One primary per screen (Messages-View.js _mirror). A card's own buttons are the only ones
   while the context lane is folded or gone: then Accept is the brand pink and Decline the quiet
   one. With the context lane on screen the card keeps its state and one quiet line instead. */
.desktop-surface .lfm-thread .mvc-btn.AcceptBTN { background: var(--fill-pink); box-shadow: 0 0.3rem 0.8rem var(--glow-pink); }
.desktop-surface .lfm-thread .mvc-btn.RejectBTN { background: rgba(255, 255, 255, 0.6); box-shadow: none; color: var(--ink-pink); }
.desktop-surface .lfm-thread .lfm-card-answer { display: none; }
.desktop-surface .lfm-thread.has-context .mvb-card.lfm-card--mirrored > .rbox-body { display: none; }
.desktop-surface .lfm-thread.has-context .lfm-card-answer {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0.2rem 0.9rem 0.75rem;
}
.desktop-surface .lfm-thread .lfm-card-answer-go {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    padding: 0.35rem 0.5rem;
    border: 0;
    border-radius: var(--r-pill);
    background: none;
    font-family: var(--font-head);
    font-weight: normal;
    font-size: var(--type-meta);
    color: var(--ink-blue);
    cursor: pointer;
}
.desktop-surface .lfm-thread .lfm-card-answer-go > i { transition: transform var(--dur-base) var(--ease-out); }
.desktop-surface .lfm-thread .lfm-card-answer-go:focus-visible { outline: 3px solid var(--rt-blue); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) {
    .desktop-surface .lfm-thread .lfm-card-answer-go:hover { background: var(--rt-blue-slt); }
    .desktop-surface .lfm-thread .lfm-card-answer-go:hover > i { transform: translateX(0.2rem); }
}

/* ONE BOOKING PER SCREEN (Messages-View.js _summarize). With the context lane on screen a booking
   card is ONE line: its state in the strip's colour, its date, and where the rest is; the whole
   line calls that booking's block in the context lane. Folded or gone, the card is whole again. */
.desktop-surface .lfm-thread .lfm-card-sum { display: none; }
.desktop-surface .lfm-thread.has-context .mvb-card.lfm-card--sum {
    width: fit-content;
    max-width: 100%;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0.3rem 0.9rem rgba(21, 56, 105, 0.12);
}
.desktop-surface .lfm-thread.has-context .mvb-card.lfm-card--sum > :not(.lfm-card-sum) { display: none; }
.desktop-surface .lfm-thread.has-context .lfm-card-sum {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    width: 100%;
    padding: 0.45rem 0.6rem 0.45rem 0.45rem;
    border: 0;
    border-radius: inherit;
    background: none;
    font-family: var(--font-head);
    font-weight: normal;
    font-size: var(--type-meta);
    line-height: 1.3;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}
.desktop-surface .lfm-thread .lfm-card-sum-state {
    padding: 0.3rem 0.8rem;
    border-radius: var(--r-pill);
    background: var(--tone-fill, var(--fill-blue));
    color: #fff;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.desktop-surface .lfm-thread .lfm-card-sum-when { color: var(--text); }
.desktop-surface .lfm-thread .lfm-card-sum-when > i { color: var(--tone-ink, var(--ink-blue)); margin-right: 0.15rem; }
.desktop-surface .lfm-thread .lfm-card-sum-go { margin-left: auto; color: var(--ink-blue); white-space: nowrap; }
.desktop-surface .lfm-thread .lfm-card-sum-go > i { transition: transform var(--dur-base) var(--ease-out); }
.desktop-surface .lfm-thread .lfm-card-sum:focus-visible { outline: 3px solid var(--rt-blue); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
    .desktop-surface .lfm-thread .lfm-card-sum:hover .lfm-card-sum-go > i { transform: translateX(0.2rem); }
}

/* The recorder strip: it takes the composer row's place */
.desktop-surface .lfm-rec { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.desktop-surface .lfm-rec[hidden] { display: none; }
.desktop-surface .lfm-rec-meter { flex: 1 1 8rem; min-width: 6rem; height: 2.5rem; }
.desktop-surface .lfm-rec-time { font-family: var(--font-mono); font-size: var(--type-meta); color: var(--ink-pink); }
.desktop-surface .lfm-rec-cap { color: var(--text-faint); }
.desktop-surface .lfm-rec-review { display: none; flex: 1 1 10rem; align-items: center; gap: 0.5rem; }
.desktop-surface .lfm-rec-track { flex: 1 1 auto; height: 4px; border-radius: 4px; background: var(--rt-blue-slt); overflow: hidden; }
.desktop-surface .lfm-rec-fill { display: block; width: 0; height: 100%; background: var(--rt-blue); }
.desktop-surface .lfm-rec-denied { display: none; flex: 1 1 auto; }
.desktop-surface .lfm-rec[data-state="idle"] .lfm-rec-meter,
.desktop-surface .lfm-rec[data-state="review"] .lfm-rec-meter,
.desktop-surface .lfm-rec[data-state="denied"] .lfm-rec-meter,
.desktop-surface .lfm-rec[data-state="review"] .lfm-rec-time,
.desktop-surface .lfm-rec[data-state="denied"] .lfm-rec-time { display: none; }
.desktop-surface .lfm-rec[data-state="idle"] .lfm-rec-time { flex: 1 1 auto; }
.desktop-surface .lfm-rec[data-state="review"] .lfm-rec-review { display: flex; }
.desktop-surface .lfm-rec[data-state="denied"] .lfm-rec-denied { display: block; }

/* A List-width thread: the attach row folds to two buttons a line under, the keys hint goes */
@container lane (width < 34rem) {
    .desktop-surface .lfm-composer-row { flex-wrap: wrap; }
    .desktop-surface .lfm-attach { order: 3; flex-basis: 100%; }
    .desktop-surface .lfm-composer-keys { display: none; }
    .desktop-surface .lfm-thread .mvb-bubble { max-width: 86%; }
    .desktop-surface .lfm-thread-tags .lfm-thread-state { display: none; }
}


/* ─── 4. THE CONTEXT LANE ──────────────────────────────────────────────────── */

.desktop-surface .lfm-info { display: grid; gap: var(--space-md); align-content: start; }

.desktop-surface .lfm-who { padding: var(--pad-panel); gap: var(--space-sm); }
.desktop-surface .lfm-who-row { display: flex; align-items: center; gap: var(--space-md); }
.desktop-surface .lfm-who-avatar { --k-size: clamp(3.5rem, 3rem + 1.5cqi, 4.5rem); }
.desktop-surface .lfm-who-id { min-width: 0; display: grid; gap: 0.25rem; }
.desktop-surface .lfm-who-id > * { margin: 0; }
.desktop-surface .lfm-who-name {
    font-family: var(--font-head);
    font-weight: normal;
    font-size: var(--type-section);
    line-height: 1.1;
    letter-spacing: var(--track-snug);
    color: var(--text);
}
.desktop-surface .lfm-who-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.desktop-surface .lfm-who-meta { margin: 0; }
.desktop-surface .lfm-info-alert[hidden] { display: none; }
.desktop-surface .lfm-verify { text-decoration: none; }

.desktop-surface .lfm-listing { padding: 0; }
.desktop-surface .lfm-listing-photo {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    background: center / cover no-repeat;
}
.desktop-surface .lfm-listing-swatches { position: absolute; left: 0.75rem; bottom: 0.75rem; display: flex; gap: 0.3rem; }
.desktop-surface .lfm-listing-swatches > i { width: 0.9rem; height: 0.9rem; border-radius: 50%; outline: 2px solid rgba(255, 255, 255, 0.85); }
.desktop-surface .lfm-listing-body { display: grid; gap: 0.35rem; }
.desktop-surface .lfm-listing-body > * { margin: 0; }
.desktop-surface .lfm-listing .k-meta { color: rgba(255, 255, 255, 0.92); }
.desktop-surface .lfm-listing-facts { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; }
.desktop-surface .lfm-listing-title { font-family: var(--font-head); font-weight: normal; font-size: var(--type-section); line-height: 1.1; letter-spacing: var(--track-snug); }
.desktop-surface .lfm-listing-title a { color: #fff; text-decoration: none; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3); }
.desktop-surface .lfm-listing-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 1rem; }
.desktop-surface .lfm-listing-foot a { color: #fff; font-family: var(--font-head); }

.desktop-surface .lfm-bk-sec .k-panel-head { padding-block: 0.75rem; }
.desktop-surface .lfm-bk-sec-title { font-size: var(--type-lead); }
.desktop-surface .lfm-bk-sec-title i { width: auto !important; margin-right: 0.35rem; }
.desktop-surface .lfm-bk {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 0.6rem var(--space-md);
    padding: var(--space-md) var(--pad-panel);
    border-top: 1px solid var(--glass-rule);
}
.desktop-surface .lfm-bk:first-child { border-top: 0; }
/* Called from the thread ("Accept or decline on the right"): the booking glows once */
.desktop-surface .lfm-bk.is-called { animation: lfm-called 1.3s var(--ease-out); }
.desktop-surface .lfm-bk-cube { display: grid; justify-items: center; align-content: start; text-align: center; color: var(--tone-ink, var(--ink-blue)); }
.desktop-surface .lfm-bk-dow { font-family: var(--font-head); font-size: var(--type-meta); }
.desktop-surface .lfm-bk-day { font-family: var(--font-head); font-size: 2.1rem; line-height: 1; letter-spacing: var(--track-tight); }
.desktop-surface .lfm-bk-day sup { font-size: max(0.42em, 0.8125rem); top: -0.9em; }   /* never under 13px, the narrow cube included */
.desktop-surface .lfm-bk-time { font-family: var(--font-head); font-size: var(--type-meta); }
.desktop-surface .lfm-bk-lines { display: grid; gap: 0.15rem; min-width: 0; font-size: var(--type-meta); color: var(--text); }
.desktop-surface .lfm-bk-lines > p { margin: 0; line-height: 1.45; }
.desktop-surface .lfm-bk-lines i { width: 1.25rem; text-align: center; color: var(--tone, var(--rt-blue)); opacity: 0.75; }
.desktop-surface .lfm-bk-lead { font-family: var(--font-head); font-size: var(--type-body) !important; color: var(--tone-ink, var(--text)); }
.desktop-surface .lfm-bk-status { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; margin: 0; font-size: var(--type-meta); }
.desktop-surface .lfm-bk-btns {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.desktop-surface .lfm-bk-btns > .k-btn { flex: 1 1 9.5rem; min-height: 2.6rem; padding-inline: 1em; }
/* A destructive action (Cancel, Decline): a quiet text button on its own line under the others,
   never the brightest thing in the lane. Its words stay plain ink; focus still rings it. */
.desktop-surface .lfm-bk-btns > .k-btn.lfm-quiet {
    flex: 1 0 100%;
    min-height: 2.25rem;
    padding: 0.25em 0.9em;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
    outline: 0;
    color: var(--text-soft);
    font-size: var(--type-meta);
    text-decoration: underline;
    text-decoration-color: rgba(30, 40, 53, 0.25);
    text-underline-offset: 0.25em;
}
@media (hover: hover) and (pointer: fine) {
    .desktop-surface .lfm-bk-btns > .k-btn.lfm-quiet:hover { background: none; box-shadow: none; color: var(--text); text-decoration-color: currentColor; transform: none; filter: none; }
}
.desktop-surface .lfm-bk-btns > .k-btn.lfm-quiet:focus-visible { outline: 3px solid var(--rt-blue); outline-offset: 1px; box-shadow: none; }
.desktop-surface .lfm-bk-more { grid-column: 1 / -1; justify-self: end; padding-block: 0.2rem; color: var(--ink-blue); font-family: var(--font-head); text-decoration: none; }
.desktop-surface .lfm-bk-none .k-panel-body { display: grid; gap: 0.4rem; }
.desktop-surface .lfm-bk-none .k-panel-body > * { margin: 0; }

@container lane (width < 24rem) {
    .desktop-surface .lfm-bk { grid-template-columns: 3.6rem minmax(0, 1fr); }
    .desktop-surface .lfm-bk-day { font-size: 1.7rem; }
}


/* ─── 5. MOTION ────────────────────────────────────────────────────────────── */

@keyframes lfm-bounce {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(-0.3rem); }
    55% { transform: translateY(0); }
    75% { transform: translateY(-0.12rem); }
}

@keyframes lfm-called {
    0%, 100% { background-color: transparent; }
    25% { background-color: var(--rt-pink-slt); }
}

@keyframes lfm-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
}

@media (prefers-reduced-motion: reduce) {
    .desktop-surface .lfm-row-icon.is-bouncing,
    .desktop-surface .lfm-hoku-door.is-unread .lfm-hoku-icon,
    .desktop-surface .lfm-send.is-shaking,
    .desktop-surface .lfm-bk.is-called { animation: none; }
    .desktop-surface .lfm-thread .mvb-photo,
    .desktop-surface .lfm-composer,
    .desktop-surface .lfm-ack { transition: none; }
}
