/* SPDX-FileCopyrightText: 2026 David Behnke
 * SPDX-License-Identifier: GPL-3.0-or-later WITH AdditionRef-Mutara-AppStore-exception */

/* The station layout (ADR 0033), the only layout of the dashboard.
   layout.js builds it and moves the parts of index.html into it, then
   marks body.lay-new. The colors are the tokens of app.css, in light and
   dark (§9). */

/* Until layout.js has built the layout, the page stays blank, so it does
   not show the parts unplaced for a moment. If the script fails, the
   page shows anyway after 2 seconds. */
body:not(.lay-new) { visibility: hidden; animation: ly-show 0s 2s forwards; }
@keyframes ly-show { to { visibility: visible; } }

body.lay-new { min-height: 0; height: 100vh; height: 100dvh; overflow: hidden; }
/* The Transceiver card's round PTT and Listen: the talk bar has them. */
body.lay-new :is(#txcard .ptt, #listen-btn, #oa-ptt) { display: none !important; }
body.lay-new #txcard .tx-body { display: block; }

.ly {
  display: grid; height: 100%;
  grid-template-columns: 290px minmax(0, 1fr) 300px;
}

/* ---------- the modules column (§2) ---------- */
.ly-mods {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--surface); border-right: 1px solid var(--line);
}
.ly-mods-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ly-station { padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.ly-st-top { display: flex; align-items: flex-start; gap: 8px; }
.ly-st-id { flex: 1; min-width: 0; }
.ly-st-call { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-st-name { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-st-name:empty { display: none; }
.ly-st-facts { margin: 6px 0 0; color: var(--muted); font-size: 12px; font-family: var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ly-st-facts:empty { display: none; }
.ly-st-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ly-st-chips:not(:has(> :not([hidden]))) { display: none; }
.ly-st-ver { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.ly-st-menu-box { position: relative; flex: none; }
.ly-menu {
  position: absolute; left: auto; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 200px;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: var(--shadow), 0 12px 32px rgba(0, 0, 0, .22);
}
.ly-menu[hidden] { display: none; }
.ly-menu .more-item:not([hidden]) { display: flex; }
.ly-close { display: none; }

.ly-modlist { padding: 8px 8px 16px; }
.ly-scan {
  display: flex; align-items: center; gap: 10px; padding: 10px 10px; margin: 4px 0 8px; min-height: 52px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--raised); color: var(--text); text-decoration: none;
}
.ly-scan[hidden] { display: none; }
.ly-scan:hover { border-color: var(--line-strong); }
.ly-scan[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); }
.ly-scan:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.ly-scan.on { border-color: var(--rx); background: var(--rx-box); }
.ly-scan-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.ly-scan.on .ly-scan-ic { color: var(--rx); border-color: var(--rx); }
.ly-scan-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ly-scan-sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-scan.on .ly-scan-sub { color: var(--rx); }

.ly-group { margin-top: 10px; }
.ly-group > .overline { margin: 0 10px 4px; font-size: 10.5px; }
.ly-mod-list, .ly-people { list-style: none; margin: 0; padding: 0; }
.ly-mod {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; min-height: 48px;
  border-radius: 12px; text-decoration: none; color: var(--text);
  border: 1px solid transparent;
}
.ly-mod:hover { background: var(--raised); }
.ly-mod[aria-current="page"] { background: var(--raised); border-color: var(--line); box-shadow: inset 3px 0 0 var(--accent); }
.ly-mod:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.ly-mod-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ly-mod-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-mod-id { color: var(--muted); font-weight: 500; font-size: 12px; }
.ly-mod-info { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-mod[data-stopped] .ly-mod-info { color: var(--busy); }
.ly-talker { display: inline-flex; align-items: center; gap: 6px; flex: none; max-width: 45%; font-size: 12px; color: var(--muted); }
.ly-talker .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-talker.live { color: var(--rx); font-weight: 600; }
.ly-ring { width: 9px; height: 9px; border-radius: 50%; flex: none; border: 2px solid currentColor; }
.ly-talker.live .ly-ring { background: currentColor; box-shadow: 0 0 0 3px var(--rx-box); animation: ly-pulse 1.4s ease-in-out infinite; }
@keyframes ly-pulse { 50% { box-shadow: 0 0 0 6px transparent; } }
.ly-n { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ly-n .ic { width: 14px; height: 14px; }

/* Your own row, at the foot of the column. */
.ly-me { flex: none; border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); display: grid; gap: 8px; }
.ly-me-row { display: flex; align-items: center; gap: 10px; }
.ly-me-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ly-me-txt b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-me-txt small { color: var(--muted); font-size: 12px; }
#ly-mute[aria-pressed="true"] { background: var(--warn-box); border-color: var(--warn); color: var(--warn); }
.ly-me-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ly-me-acts:not(:has(> :not([hidden]))) { display: none; }
.ly-me-acts .user { flex-wrap: wrap; }
.ly-me-tools { display: flex; gap: 6px; }
.ly-me-tools .icon-btn { display: inline-grid; place-items: center; padding: 0; }
.ly-me-tools .icon-btn[hidden] { display: none; }
/* The desktop app's power button: at the far end of the row, apart from
   the everyday tools, and red only when the pointer or focus is on it. */
.ly-me-tools .quit-btn { margin-left: auto; color: var(--muted); transition: color .15s ease-out, background-color .15s ease-out, border-color .15s ease-out; }
.ly-me-tools .quit-btn:is(:hover, :focus-visible):not(:disabled) { color: var(--busy); border-color: var(--busy); background: var(--busy-box); }
.ly-me-tools .quit-btn:disabled { opacity: .5; cursor: progress; }

/* Avatars: initials, with the connection mark (§6.2). */
.ly-av {
  position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line);
  font: 700 12px var(--sans); color: var(--muted); letter-spacing: .02em;
}
.ly-mark {
  position: absolute; right: -6px; bottom: -4px; padding: 0 3px; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--line); font: 700 8.5px/13px var(--sans); color: var(--muted);
}

/* ---------- the center (§3) ---------- */
.ly-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.ly-head {
  flex: none; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.ly-title { min-width: 0; flex: 1 1 200px; display: flex; flex-direction: column; }
.ly-title h2 { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-title small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-title small:empty { display: none; }
.ly-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); }
.ly-tab {
  appearance: none; border: 0; background: none; color: var(--muted); cursor: pointer;
  font: 600 13px var(--sans); padding: 0 14px; min-height: 30px; border-radius: 999px; white-space: nowrap;
}
.ly-tab:hover { color: var(--text); }
.ly-tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.ly-tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.ly-head-acts { display: flex; gap: 8px; align-items: center; }
.ly-open { display: none; }
#ly-open-roster { gap: 6px; font-variant-numeric: tabular-nums; }

.ly-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ly-bars { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px 0; }
.ly-bars:not(:has(> :not([hidden]))) { display: none; }
/* The dashboard, one column: the cards of the rail are in it. */
body.lay-new main#app { display: block; padding: 16px 20px 24px; max-width: 1100px; margin: 0 auto; }
/* With no modules, only the bar shows, as today. */
body.lay-new.no-nodes #ly-p-dash { display: none !important; }
body.lay-new main#app .main-col .log-card { min-height: 0; }
body.lay-new #ly-p-act { padding: 16px 20px 24px; max-width: 1100px; margin: 0 auto; }
body.lay-new #ly-p-act .log-card { min-height: calc(100% - 8px); }
/* The reconnect and listener line bars sit with the other bars. */
body.lay-new .ly-bars .offline { position: static; transform: none; width: auto; max-width: none; align-self: flex-start; }

/* The hero (§3, §11): the room's and the Parrot's notices above the
   talker, the On air button, and the stats as a strip at its foot. */
body.lay-new #hero > :is(.room-line, .room-visitors, .room-hold) { flex: 1 1 100%; margin: 0; }
/* The talk bar's copy of "Visitors can hear this room": the hero has it. */
body.lay-new #ptt-visitors { display: none !important; }
.ly-hero-acts { flex: none; display: flex; gap: 8px; align-items: center; }
.ly-hero-acts:not(:has(> :not([hidden]))) { display: none; }
body.lay-new #hero .hero-stats { flex: 1 1 100%; padding-top: 10px; border-top: 1px solid var(--line); }
body.lay-new #links-card #quick-fold { margin-top: 12px; }

/* The room's members are rows of the roster (§5). */
body.lay-new #room-list { display: none; }
.ly-room-note { margin: 0; }
.ly-room-note [hidden] { display: none; }

/* The scan view (§2): the Dashboard of all the modules. Idle, it has
   the mode, the options, the modules and Start scan; running, today's
   scan bar on top. Picking a module stops the scan (u215), so a
   module's page never shows the scan. */
body.lay-new:not(.scan-all) #scan-bar { display: none !important; }
body.lay-new:not(.all-view) #ly-scan-ctl { display: none !important; }
body.lay-new.listen-all #hero { display: none !important; }
body.lay-new :is(.scan-prio-line, #nodes-prio) { display: none !important; }
.ly-scan-ctl { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.ly-scan-ctl[hidden] { display: none; }
.ly-scan-ctl .card-head { margin: 0; }
.ly-scan-ctl > .note { margin: 0; }
.ly-seg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ly-seg { grid-template-columns: repeat(2, minmax(110px, auto)); }
.ly-scan-go { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ly-scan-go[hidden] { display: none; }
.ly-scan-go .note { margin: 0; }
body.lay-new #scan-bar { margin-bottom: 16px; }

/* The On air view sits in its tab, not over the page. */
body.lay-new .onair { position: static; inset: auto; z-index: auto; min-height: 100%; overflow: visible; }
body.lay-new.oa-open { overflow: hidden; }

/* ---------- the talk bar (§4) ---------- */
.ly-talk {
  flex: none; display: grid; gap: 6px; padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(16, 24, 40, .06);
}
.ly-talk .room-stop { margin: 0; }
.ly-talk-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ly-where { flex: 0 1 260px; min-width: 0; display: flex; flex-direction: column; }
.ly-now { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-now[data-state="rx"] { color: var(--rx); }
.ly-now[data-state="tx"] { color: var(--talk-live); }
.ly-where-sub { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; }
.ly-where-sub > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-chips { display: inline-flex; gap: 4px; }
.ly-chips .chip { font-size: 11px; padding: 0 8px; }
.ly-talk-ctl { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.ly-talk-ctl .interrupt-box { flex: none; margin: 0 0 0 12px; }
.ly-talk-ctl #dock-ptt { max-width: 420px; }
.ly-talk .dock-lbl { display: inline; }
.ly-talk #dock-listen { width: auto; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 14px var(--sans); }
/* The Interrupt hint stays for screen readers (aria-describedby). */
.ly-talk #interrupt-hint { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ly-audio-btn[aria-expanded="true"] { background: var(--rx-box); border-color: var(--rx); color: var(--rx); }
.ly-signin { margin: 0; color: var(--muted); font-size: 13px; }
/* A narrow talk bar (a desktop window just wide enough for the roster
   column) puts the talk controls on their own row, as on a tablet: in
   one row Talk was squeezed under the volume slider. */
.ly-talk { container: ly-talk / inline-size; }
@container ly-talk (max-width: 940px) {
  .ly-talk-row { flex-wrap: wrap; row-gap: 8px; }
  .ly-where { flex: 1 1 0; }
  .ly-talk-ctl { order: 5; flex: 1 1 100%; }
  .ly-talk-ctl #dock-ptt { max-width: none; }
}

/* The Audio sheet: today's Transceiver card, over the talk bar. */
.ly-sheet {
  position: fixed; z-index: 24; right: 316px; bottom: calc(var(--ly-talk-h, 72px) + 8px);
  width: min(400px, calc(100vw - 32px)); max-height: calc(100dvh - var(--ly-talk-h, 72px) - 32px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow), 0 16px 40px rgba(0, 0, 0, .25); padding: 12px;
}
.ly-sheet-h { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 8px; }
.ly-sheet #txcard { border: 0; box-shadow: none; padding: 4px; }

/* The toasts stay above the talk bar. */
body.lay-new .toast, body.lay-new:has(#slot-bar:not([hidden])) .toast { bottom: calc(var(--ly-talk-h, 72px) + 12px); }
body.lay-new .drawer { top: 0; }

/* ---------- the roster (§5) ---------- */
.ly-roster {
  display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-left: 1px solid var(--line); padding: 14px 12px 20px;
}
.ly-roster-h { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 4px; }
.ly-roster-h h2 { font-size: 15px; }
.ly-roster .ly-group > .overline { margin: 0 4px 4px; display: block; }
.ly-roster .ly-group.here > .overline { color: var(--accent-ink); }
.ly-person { display: flex; align-items: center; gap: 10px; padding: 6px 4px; min-height: 44px; }
.ly-person-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ly-person-txt b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-person-txt small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-person.talking .ly-person-txt b { color: var(--rx); }
.ly-person.talking .ly-av { border-color: var(--rx); box-shadow: 0 0 0 2px var(--rx-box); color: var(--rx); }
.ly-person.you.talking .ly-person-txt b { color: var(--tx); }
.ly-person.you.talking .ly-av { border-color: var(--tx); box-shadow: 0 0 0 2px var(--tx-box); color: var(--tx); }
.ly-you { color: var(--muted); font-weight: 500; font-family: var(--sans); }
.ly-fn { color: var(--muted); font-weight: 400; font-family: var(--sans); }
.ly-time { flex: none; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--rx); }
.ly-time.muted { color: var(--muted); font-family: var(--sans); }
.ly-person-txt small.ly-detail { font-variant-numeric: tabular-nums; }
.ly-person.ly-extra .ly-av { border-style: dashed; }
.ly-row-btn { flex: none; display: inline-grid; place-items: center; padding: 0; }
.ly-row-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent-ink); }
.ly-row-menu { position: fixed; top: 0; left: 0; right: auto; z-index: 40; }
.ly-heard { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.ly-heard > .overline { margin: 0 4px 4px; }
.ly-heard .empty { padding: 0 4px; font-size: 13px; }
.ly-roster .empty { padding: 0 4px; font-size: 13px; }
.ly-roster-foot { margin-top: auto; padding: 14px 4px 0; font-size: 12px; }

.ly-scrim { position: fixed; inset: 0; z-index: 23; background: rgba(10, 12, 18, .45); }

/* ---------- tablet: the roster is a drawer (§7) ---------- */
@media (max-width: 1199px) {
  .ly { grid-template-columns: 290px minmax(0, 1fr); }
  .ly-roster {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 88vw); z-index: 24;
    transform: translateX(100%); visibility: hidden;
    box-shadow: -12px 0 32px rgba(0, 0, 0, .18);
  }
  body.ly-roster-open .ly-roster { transform: none; visibility: visible; }
  /* Only a drawer that opens or closes slides, not a window crossing
     the width (layout.js sets ly-anim for the move). */
  body.ly-anim .ly-roster { transition: transform .2s ease, visibility 0s .2s; }
  body.ly-anim.ly-roster-open .ly-roster { transition: transform .2s ease; }
  #ly-open-roster { display: inline-flex; }
  /* The talk controls take their own row under the where label. */
  .ly-talk-row { flex-wrap: wrap; row-gap: 8px; }
  .ly-where { flex: 1 1 0; }
  .ly-talk-ctl { order: 5; flex: 1 1 100%; }
  .ly-talk-ctl #dock-ptt { max-width: none; }
  .ly-roster .ly-close { display: inline-block; }
  .ly-sheet { right: 16px; }
}

/* ---------- phone: the modules are a drawer too (§7) ---------- */
@media (max-width: 760px) {
  .ly { grid-template-columns: minmax(0, 1fr); }
  .ly-mods {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 88vw); z-index: 24;
    transform: translateX(-100%); visibility: hidden;
    box-shadow: 12px 0 32px rgba(0, 0, 0, .18); border-right: 0;
  }
  body.ly-mods-open .ly-mods { transform: none; visibility: visible; }
  body.ly-anim .ly-mods { transition: transform .2s ease, visibility 0s .2s; }
  body.ly-anim.ly-mods-open .ly-mods { transition: transform .2s ease; }
  #ly-open-mods { display: inline-block; }
  .ly-mods .ly-close { display: inline-block; }
  .ly-head { padding: 8px 12px; gap: 8px; }
  .ly-title { flex: 1 1 0; }
  .ly-title h2 { font-size: 16px; }
  /* The tabs become chips on their own row. */
  .ly-tabs { order: 5; flex: 1 1 100%; background: none; border: 0; padding: 0; gap: 6px; overflow-x: auto; }
  .ly-tab { border: 1px solid var(--line); background: var(--surface); min-height: 44px; }
  .ly-tab[aria-selected="true"] { background: var(--rx-box); border-color: var(--rx); color: var(--rx); box-shadow: none; }
  body.lay-new main#app, body.lay-new #ly-p-act { padding: 12px; }
  .ly-bars { padding: 12px 12px 0; }
  .ly-talk { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .ly-talk-row { flex-wrap: wrap; row-gap: 8px; }
  .ly-where { flex: 1 1 0; }
  .ly-talk-ctl { order: 5; flex: 1 1 100%; }
  .ly-talk-ctl #dock-ptt { max-width: none; }
  /* Listen keeps its word at phone width (F25); a long one shortens. */
  .ly-talk #dock-listen:not(.wide) { padding: 0 12px; max-width: 45%; min-width: 48px; }
  .ly-talk #dock-listen .dock-lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ly-sheet { left: 0; right: 0; bottom: 0; width: auto; max-height: 85dvh; border-radius: 20px 20px 0 0; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .ly-mods, .ly-roster { transition: none !important; }
}

/* Chat drawer tabs (§3): Station and the page's module, each a panel of
   today's drawer parts. */
.ly-chat-tabs { display: flex; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--line); flex: none; overflow-x: auto; }
.ly-chat-tabs[hidden] { display: none; }
.ly-chat-tab {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer;
  font: 600 13px var(--sans); padding: 0 12px; min-height: 32px; border-radius: 999px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; max-width: 60%;
}
.ly-chat-tab-t { overflow: hidden; text-overflow: ellipsis; }
.ly-chat-tab:hover { color: var(--text); }
.ly-chat-tab[aria-selected="true"] { background: var(--rx-box); border-color: var(--rx); color: var(--rx); }
.ly-chat-tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.ly-chat-tab[hidden] { display: none; }
.ly-chat-tab .badge { position: static; box-shadow: none; }
.ly-chat-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ly-chat-panel[hidden] { display: none; }
.ly-chat-panel .chat-list { flex: 1; min-height: 0; padding: 4px 16px; }
.ly-chat-panel > .empty { padding: 0 16px; flex: 1; }
.ly-chat-on { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* The talk bar's volume (§4): the Audio sheet's slider, both ways. On a
   phone it stays in the sheet only. */
.ly-vol { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); flex: 0 1 140px; min-width: 96px; }
.ly-vol[hidden] { display: none; }
.ly-vol input { flex: 1; min-width: 0; accent-color: var(--accent); }
/* The sheet has its own title: the card's is not needed. */
#ly-audio #txcard-title { display: none; }
@media (max-width: 760px) {
  .ly-vol { display: none; }
}

/* Reflector letters are destinations, visible without opening a selector. */
.ly-reflector + .ly-reflector { margin-top: 14px; }
.ly-reflector-heading { margin: 10px 10px 4px; font-size: 12px; color: var(--muted); }
.ly-reflector-letter { flex: 0 0 26px; text-align: center; font-size: 16px; font-weight: 700; }
.ly-reflector .ly-talker.live { color: var(--talk-live); }
.ly-reflector .ly-talker.live .ly-ring { box-shadow: 0 0 0 3px var(--talk-live-box); }

/* Shared-shell controls move out of .topbar when the layout is built. */
@media (pointer: coarse) {
  .ly .icon-btn, .ly-sheet .icon-btn { min-width: 44px; min-height: 44px; }
  .ly-menu .more-item { min-height: 44px; }
}
