/* ==========================================================================
   Empire Meet: hardware-panel design system
   The interface is drawn as a physical unit: a warm grey enclosure, printed
   labels, mechanical keys, LEDs, an amber dot-matrix display and a black
   glass screen for video. One signal colour (orange), no glows or gradients
   beyond what a real moulded surface would show.
   Fonts: Archivo (UI, expanded for the wordmark), IBM Plex Mono (printed
   labels), Doto (dot-matrix display). System fallbacks keep it usable offline.
   ========================================================================== */

:root {
  /* Enclosure */
  --desk: #d8d5ce;
  --case: #efede8;
  --case-2: #e6e3dc;
  --case-3: #dcd8d0;
  --edge: #bfbab0;
  --edge-2: #a9a398;
  --hi: #ffffff;

  /* Print */
  --ink: #1c1c1a;
  --ink-2: #3b3a36;
  --print-solid: #77736a;
  --print-2: #9b968c;

  /* Signal */
  --orange: #ff5a1a;
  --orange-face: #ff6a2e;
  --orange-edge: #c94310;
  --led-green: #2ccf6a;
  --led-red: #ff3b2f;
  --led-amber: #ffb02e;
  --led-off: #9c978d;

  /* Display + screen */
  --lcd: #191a16;
  --lcd-fg: #ffb547;
  --lcd-dim: #5b4a2c;
  --screen: #0d0e0c;
  --screen-2: #161714;

  --r-key: 9px;
  --r-mod: 14px;
  --r-unit: 22px;

  --f-ui: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-print: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-dot: "Doto", "IBM Plex Mono", ui-monospace, monospace;

  --unit-shadow: 0 1px 0 var(--hi) inset, 0 -1px 0 rgba(0, 0, 0, 0.06) inset, 0 2px 0 var(--edge), 0 30px 60px -34px rgba(52, 45, 32, 0.45);
}

* { box-sizing: border-box; }
/* The hidden attribute must always win over the display rules below. */
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--f-ui);
  font-size: 14px;
  color: var(--ink);
  background: var(--desk);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
button, input { font-family: inherit; color: inherit; }
a { color: inherit; }
::selection { background: var(--orange); color: #fff; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.ico { width: 20px; height: 20px; display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ── Primitives ──────────────────────────────────────────────────────────── */

/* A printed label, as silk-screened onto the case */
.print, .field-label, .auth-field label {
  display: block;
  font-family: var(--f-print); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--print-solid);
}
.print b { color: var(--ink); font-weight: 600; }

/* Enclosure with four corner screws */
.unit {
  position: relative; border-radius: var(--r-unit);
  background:
    radial-gradient(circle at 15px 15px, #8f8a80 0 1.4px, #c9c4ba 1.6px 3.6px, transparent 4px),
    radial-gradient(circle at calc(100% - 15px) 15px, #8f8a80 0 1.4px, #c9c4ba 1.6px 3.6px, transparent 4px),
    radial-gradient(circle at 15px calc(100% - 15px), #8f8a80 0 1.4px, #c9c4ba 1.6px 3.6px, transparent 4px),
    radial-gradient(circle at calc(100% - 15px) calc(100% - 15px), #8f8a80 0 1.4px, #c9c4ba 1.6px 3.6px, transparent 4px),
    var(--case);
  border: 1px solid var(--edge);
  box-shadow: var(--unit-shadow);
}
/* Recessed module inside a unit */
.module {
  position: relative; border-radius: var(--r-mod);
  background: var(--case-2);
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07), 0 1px 0 var(--hi);
}
.module-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Speaker grille */
.grille {
  border-radius: 10px;
  background-color: var(--case-3);
  background-image: radial-gradient(circle, #3c3a35 1.5px, transparent 1.9px);
  background-size: 9px 9px; background-position: 4px 4px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), 0 1px 0 var(--hi);
}

/* LEDs */
.led {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--led-off);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.35), 0 1px 0 var(--hi);
}
.led.green { background: var(--led-green); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), 0 0 7px rgba(44, 207, 106, 0.8); }
.led.red { background: var(--led-red); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), 0 0 7px rgba(255, 59, 47, 0.8); }
.led.amber { background: var(--led-amber); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), 0 0 7px rgba(255, 176, 46, 0.8); }
.led.orange { background: var(--orange); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), 0 0 7px rgba(255, 90, 26, 0.8); }
.led.blink { animation: blink 1.4s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.led-row { display: inline-flex; align-items: center; gap: 14px; }
.led-item { display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-print); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--print-solid); }

/* Dot-matrix display */
.lcd {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  background: var(--lcd); color: var(--lcd-fg);
  font-family: var(--f-dot); font-weight: 700; font-size: 20px; letter-spacing: 0.06em; line-height: 1;
  text-shadow: 0 0 6px rgba(255, 181, 71, 0.35);
  border: 1px solid #000;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8), 0 1px 0 var(--hi);
  overflow: hidden; white-space: nowrap;
}
.lcd .dim { color: var(--lcd-dim); text-shadow: none; }
.lcd small { font-family: var(--f-print); font-size: 9.5px; font-weight: 500; letter-spacing: 0.14em; color: var(--lcd-dim); text-shadow: none; }
.cursor::after { content: "_"; animation: blink 1s steps(2, jump-none) infinite; }

/* Wordmark */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.wordmark {
  font-family: var(--f-ui); font-weight: 800; font-stretch: 125%;
  font-size: 17px; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1; white-space: nowrap;
}
.model { font-family: var(--f-print); font-size: 10.5px; letter-spacing: 0.1em; color: var(--print-solid); padding: 3px 6px; border: 1px solid var(--edge-2); border-radius: 4px; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--ink); color: var(--orange); flex-shrink: 0; box-shadow: 0 2px 0 #000; }
.brand-mark .ico { width: 20px; height: 20px; }

/* ── Keys (buttons) ──────────────────────────────────────────────────────── */
.btn {
  appearance: none; position: relative; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--r-key);
  font-family: var(--f-ui); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  background: linear-gradient(180deg, #fbfaf7, #ebe9e3);
  border: 1px solid var(--edge-2); border-bottom-width: 4px;
  box-shadow: inset 0 1px 0 var(--hi), 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: transform .06s, border-bottom-width .06s, background .12s;
}
.btn:hover { background: linear-gradient(180deg, #ffffff, #f0eee9); }
.btn:active { transform: translateY(3px); border-bottom-width: 1px; box-shadow: inset 0 1px 0 var(--hi); }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: default; transform: none; }
.btn .ico { width: 16px; height: 16px; }
.btn-sm { padding: 6px 10px; font-size: 10.5px; border-bottom-width: 3px; gap: 6px; }
.btn-sm:active { transform: translateY(2px); }
.btn-sm .ico { width: 14px; height: 14px; }
.btn-lg { width: 100%; padding: 16px 20px; font-size: 13px; letter-spacing: 0.1em; }
.btn-primary { color: #fff; background: var(--orange-face); border-color: var(--orange-edge); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(0, 0, 0, 0.18); }
.btn-primary:hover { background: #ff7840; }
.btn-dark { color: #f1efe9; background: #2a2a27; border-color: #000; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.btn-dark:hover { background: #343430; }
.btn-ghost { background: transparent; border: 0; box-shadow: none; padding: 6px 8px; color: var(--print-solid); }
.btn-ghost:hover { background: transparent; color: var(--ink); }
.btn-ghost:active { transform: none; }

/* ── Inputs (recessed slots) ─────────────────────────────────────────────── */
.input {
  width: 100%; padding: 13px 14px; border-radius: 8px; outline: none;
  font-family: var(--f-print); font-size: 13.5px; color: var(--ink);
  background: #f8f7f4; border: 1px solid var(--edge-2);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.1);
  transition: border-color .12s, background .12s;
}
.input::placeholder { color: var(--print-2); }
.input:focus { border-color: var(--orange); background: #fff; box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.08), 0 0 0 3px rgba(255, 90, 26, 0.18); }
.input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px #fff inset; -webkit-text-fill-color: var(--ink); }

.err { margin: 0; font-family: var(--f-print); font-size: 12px; color: #b3260f; }
.foot { margin: 0; font-family: var(--f-print); font-size: 10.5px; letter-spacing: 0.06em; color: var(--print-solid); text-align: center; }

/* ── Page shell (landing, auth, download) ────────────────────────────────── */
body.landing { overflow-x: hidden; overflow-y: auto; }
.page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 22px 24px 30px; gap: 22px; }
.page.center { justify-content: center; }
/* The main unit grows to fill the viewport, so there is no empty band below it */
.page > .unit { flex: 1 0 auto; }
.landing-unit, .auth-unit { align-content: stretch; }
.control .grille { flex: 1; min-height: 54px; max-height: 130px; }
.auth-side .grille { flex: 1; min-height: 54px; }
.strip {
  width: 100%; max-width: 1180px; display: flex; align-items: center; gap: 16px;
  padding: 10px 12px 10px 10px; border-radius: 14px;
  background: var(--case); border: 1px solid var(--edge); box-shadow: var(--unit-shadow);
}
.strip .spacer { flex: 1; }
.strip .divider { width: 1px; align-self: stretch; background: var(--edge); margin: 2px 0; }
.account-bar { display: flex; align-items: center; gap: 10px; }
.account-bar .lcd { font-size: 14px; padding: 7px 10px; }
.account-bar .avatar { display: none; }

.foot-plate {
  width: 100%; max-width: 1180px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px;
  padding: 12px 16px; border-radius: 10px; border: 1px dashed var(--edge-2);
  font-family: var(--f-print); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--print-solid);
}
.foot-plate .spacer { flex: 1; }
.foot-plate span { display: inline-flex; align-items: center; gap: 8px; }

/* ── Landing ─────────────────────────────────────────────────────────────── */
.landing-unit { width: 100%; max-width: 1180px; padding: 30px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; }
.about { padding: 30px; display: flex; flex-direction: column; gap: 26px; }
.headline {
  margin: 0; font-family: var(--f-ui); font-weight: 800; font-stretch: 112%;
  font-size: clamp(40px, 5.2vw, 72px); line-height: 0.95; letter-spacing: -0.02em; color: var(--ink);
}
.headline .hl { color: var(--orange); }
.lede { margin: 0; max-width: 480px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.spec { width: 100%; border-collapse: collapse; margin-top: auto; font-family: var(--f-print); font-size: 12px; }
.spec td { padding: 11px 0; border-top: 1px solid var(--edge); vertical-align: middle; }
.spec tr:last-child td { border-bottom: 1px solid var(--edge); }
.spec td:first-child { width: 38%; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--print-solid); }
.spec td:last-child { color: var(--ink); font-weight: 500; }
.spec .led { margin-right: 8px; vertical-align: 0; }

.control { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.control .lcd { height: 64px; font-size: 26px; justify-content: space-between; }
.actions { display: grid; gap: 14px; }
.divider-or { display: flex; align-items: center; gap: 12px; font-family: var(--f-print); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--print-solid); }
.divider-or::before, .divider-or::after { content: ""; flex: 1; border-top: 1px dashed var(--edge-2); }
.join-row { display: flex; gap: 8px; }
.join-row .input { flex: 1; min-width: 0; }

.link-panel { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: var(--case-3); border: 1px solid var(--edge); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); }
.link-label { margin: 0; display: flex; align-items: center; gap: 8px; font-family: var(--f-print); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.link-row { display: flex; gap: 8px; }
.link-input { flex: 1; min-width: 0; background: var(--lcd) !important; color: var(--lcd-fg) !important; border-color: #000 !important; font-family: var(--f-print); font-size: 12.5px; box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.7) !important; }

.feature-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.feature { display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-print); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.feature::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--led-green); box-shadow: 0 0 5px rgba(44, 207, 106, 0.7); }

.download-cta {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; text-decoration: none;
  background: var(--case); border: 1px solid var(--edge); box-shadow: 0 1px 0 var(--hi), inset 0 -2px 0 var(--case-3);
  transition: border-color .12s;
}
.download-cta:hover { border-color: var(--ink); }
.download-cta .port { width: 42px; height: 26px; border-radius: 5px; background: #2a2a27; box-shadow: inset 0 0 0 3px #1a1a18, inset 0 0 0 5px #3d3d39; flex-shrink: 0; }
.download-cta .cta-text { flex: 1; display: grid; gap: 3px; font-size: 13px; font-weight: 700; }
.download-cta .cta-text small { font-family: var(--f-print); font-size: 10.5px; font-weight: 400; color: var(--print-solid); letter-spacing: 0.02em; }
.download-cta > .ico { width: 16px; height: 16px; color: var(--print-solid); }
.control .grille { margin-top: auto; }

/* ── Auth ────────────────────────────────────────────────────────────────── */
.auth-unit { width: 100%; max-width: 980px; padding: 30px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.auth-side { padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.auth-side .grille { flex: 1; min-height: 160px; }
.auth-side .headline { font-size: clamp(36px, 4vw, 54px); }
.auth-card { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.auth-card .lcd { height: 58px; font-size: 24px; justify-content: space-between; }
.auth-tag { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
/* Two-position slide switch */
.auth-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 10px; background: #2a2a27; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5); }
.auth-tab {
  position: relative; z-index: 1; padding: 10px; border: 0; border-radius: 7px; background: transparent; cursor: pointer;
  font-family: var(--f-print); font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #8b877e;
  transition: color .15s;
}
.auth-tab.active { color: var(--ink); background: linear-gradient(180deg, #fbfaf7, #e4e1da); box-shadow: inset 0 1px 0 var(--hi), 0 2px 0 #000; }
.auth-field { margin-bottom: 14px; }
.auth-field label { margin-bottom: 7px; }
.auth-card form .btn-primary { margin-top: 6px; }
.auth-err { display: none; margin: 0; padding: 10px 12px; border-radius: 8px; background: #2a1a17; color: #ff8a73; font-family: var(--f-print); font-size: 12px; box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.6); }
.auth-err::before { content: "ERR  "; color: var(--led-red); font-weight: 600; }
.auth-err.show { display: block; }
.auth-foot { margin: 0; text-align: center; font-size: 12.5px; color: var(--ink-2); }
.auth-switch { color: var(--orange-edge); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
form[hidden] { display: none; }

/* ── Download ────────────────────────────────────────────────────────────── */
.dl-unit { width: 100%; max-width: 1180px; padding: 30px; display: grid; gap: 22px; }
.dl-hero { padding: 30px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 30px; align-items: end; }
.dl-hero .headline { font-size: clamp(38px, 4.6vw, 64px); }
.dl-sub { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.dl-sub b { color: var(--ink); }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.dl-card { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.dl-card.recommended { border-color: var(--ink); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07), 0 1px 0 var(--hi), 0 0 0 1px var(--ink); }
.dl-os { display: flex; align-items: center; gap: 14px; }
.dl-os .os-badge { width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--ink); color: #f1efe9; box-shadow: 0 3px 0 #000; }
.dl-card.recommended .os-badge { color: var(--orange); }
.dl-os .ico { width: 26px; height: 26px; }
.dl-os h3 { margin: 0; font-weight: 800; font-stretch: 112%; font-size: 22px; letter-spacing: -0.01em; }
.dl-os .note { margin-top: 4px; font-family: var(--f-print); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--print-solid); }
.dl-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-print); font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.dl-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--led-green); box-shadow: 0 0 7px rgba(44, 207, 106, 0.8); }
.dl-btns { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.dl-btns .btn { width: 100%; white-space: normal; text-align: center; line-height: 1.35; }
.dl-card:not(.recommended) .dl-btns .btn-primary { color: var(--ink); background: linear-gradient(180deg, #fbfaf7, #ebe9e3); border-color: var(--edge-2); box-shadow: inset 0 1px 0 var(--hi), 0 1px 2px rgba(0, 0, 0, 0.12); }
.dl-soon { padding: 12px; border-radius: 8px; border: 1px dashed var(--edge-2); font-family: var(--f-print); font-size: 11px; color: var(--print-solid); text-align: center; }
.dl-why { padding: 26px 30px; display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 30px; }
.dl-why h4 { margin: 0; font-weight: 800; font-stretch: 112%; font-size: 26px; line-height: 1.05; }
.dl-why h4 + p { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.dl-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.dl-steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--edge); font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.dl-steps li:last-child { border-bottom: 1px solid var(--edge); }
.dl-steps li::before { content: counter(step, decimal-leading-zero); display: grid; place-items: center; height: 26px; border-radius: 5px; background: var(--lcd); color: var(--lcd-fg); font-family: var(--f-dot); font-weight: 700; font-size: 15px; }
.dl-steps b { color: var(--ink); }
.dl-why code { font-family: var(--f-print); font-size: 12px; padding: 1px 6px; border-radius: 4px; background: var(--case); border: 1px solid var(--edge-2); color: var(--ink); }
.dl-note { margin: 14px 0 0; font-family: var(--f-print); font-size: 11.5px; line-height: 1.6; color: var(--print-solid); }

/* ── Room: pre-join ──────────────────────────────────────────────────────── */
body.room { background: var(--desk); }
/* A fixed-height scroller (the page itself doesn't scroll): the card is centred
   when it fits, and scrolls when the window or an embedding frame is shorter. */
.prejoin { height: 100vh; height: 100dvh; display: grid; padding: 24px; overflow: auto; }
.prejoin > .prejoin-card { margin: auto; }
.prejoin-card { width: min(1060px, 100%); padding: 26px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; }
.prejoin-stage { display: grid; gap: 16px; align-content: start; }
.bezel { padding: 12px; border-radius: 18px; background: #232320; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 0 #000, 0 18px 30px -20px rgba(0, 0, 0, 0.6); }
.preview-wrap { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--screen); box-shadow: inset 0 0 0 1px #000; }
.preview { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.preview-off { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--lcd-fg); font-family: var(--f-dot); font-weight: 700; font-size: 22px; letter-spacing: 0.06em; text-transform: uppercase; text-shadow: 0 0 6px rgba(255, 181, 71, 0.35); background: var(--screen); }
.preview-off::after { content: "NO SIGNAL"; font-family: var(--f-print); font-size: 10px; font-weight: 500; letter-spacing: 0.2em; color: var(--lcd-dim); text-shadow: none; }
.preview-corner { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-print); font-size: 10px; letter-spacing: 0.16em; color: #c9c5bc; text-transform: uppercase; }
.preview-corner::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--led-red); box-shadow: 0 0 6px var(--led-red); animation: blink 1.4s steps(2, jump-none) infinite; }
.prejoin-controls { display: flex; gap: 10px; justify-content: center; }
.devices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.devices select { width: 100%; min-width: 0; text-overflow: ellipsis; }
@media (max-width: 520px) { .devices { grid-template-columns: 1fr; } }
/* Toggle keys with an LED that follows aria-pressed */
.pill {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  padding: 11px 16px; border-radius: var(--r-key);
  font-family: var(--f-ui); font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink);
  background: linear-gradient(180deg, #fbfaf7, #ebe9e3); border: 1px solid var(--edge-2); border-bottom-width: 4px;
  box-shadow: inset 0 1px 0 var(--hi), 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: transform .06s, border-bottom-width .06s;
}
.pill:active { transform: translateY(3px); border-bottom-width: 1px; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--led-green); box-shadow: 0 0 7px rgba(44, 207, 106, 0.8); }
.pill[aria-pressed="false"]::before { background: var(--led-red); box-shadow: 0 0 7px rgba(255, 59, 47, 0.8); }
.pill .ico { width: 16px; height: 16px; }

.prejoin-side { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.prejoin-side .headline { font-size: 40px; }
.prejoin-side .sub { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.room-tag { height: 56px; justify-content: space-between; font-size: 22px; }
.prejoin-card code, .room-tag code { font-family: var(--f-dot); font-weight: 700; color: var(--lcd-fg); }
.prejoin-side .err { padding: 10px 12px; border-radius: 8px; background: #2a1a17; color: #ff8a73; box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.6); line-height: 1.5; }
.prejoin-side .grow { flex: 1; }

/* ── Room: call ──────────────────────────────────────────────────────────── */
.call { display: grid; grid-template-rows: auto 1fr auto; height: 100vh; padding: 12px; gap: 12px; background: var(--desk); }
.call-header {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; min-width: 0;
  background: var(--case); border: 1px solid var(--edge); box-shadow: var(--unit-shadow);
}
.call-header .lcd { font-size: 17px; padding: 8px 12px; gap: 14px; }
.call-header .lcd .seg { display: inline-flex; align-items: baseline; gap: 8px; }
.meeting-code code { font-family: var(--f-dot); font-weight: 700; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--led-red); box-shadow: 0 0 7px rgba(255, 59, 47, 0.8); animation: blink 1.4s steps(2, jump-none) infinite; }
.spacer { flex: 1; }
.chip { display: inline-flex; align-items: baseline; gap: 8px; }
.timer { font-variant-numeric: tabular-nums; }

.stage { display: flex; min-height: 0; gap: 12px; }
.screen-bezel { flex: 1; min-width: 0; display: flex; padding: 12px; border-radius: 20px; background: #232320; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 0 #000, 0 24px 40px -28px rgba(0, 0, 0, 0.7); }
.grid-wrap { flex: 1; min-width: 0; display: grid; place-items: safe center; padding: 12px; overflow: auto; border-radius: 10px; background: var(--screen); box-shadow: inset 0 0 0 1px #000, inset 0 0 60px rgba(0, 0, 0, 0.6); }
.grid { display: grid; gap: 10px; width: 100%; grid-template-columns: repeat(var(--cols, 1), 1fr); align-content: center; }
.grid:has(> .tile:only-child) { max-width: min(1200px, calc((100vh - 260px) * 16 / 9)); margin: 0 auto; }
.tile { position: relative; aspect-ratio: 16 / 9; min-height: 0; overflow: hidden; border-radius: 6px; background: var(--screen-2); box-shadow: inset 0 0 0 1px #262722; }
.tile.speaking { box-shadow: inset 0 0 0 2px var(--orange); }
.tile.sharing-tile { box-shadow: inset 0 0 0 1px #3a3b35; }
.tile video { width: 100%; height: 100%; object-fit: contain; background: transparent; display: block; position: relative; z-index: 1; }
.tile.is-camera video { object-fit: cover; }
.tile-avatar { position: absolute; inset: 0; display: grid; place-items: center; z-index: 0; }
.tile-avatar span { font-family: var(--f-dot); font-weight: 800; font-size: clamp(40px, 7vw, 120px); letter-spacing: 0.04em; color: var(--lcd-fg); opacity: 0.85; text-shadow: 0 0 10px rgba(255, 181, 71, 0.3); }
.tile.speaking .tile-avatar span { color: var(--orange); }
.tile.sharing-tile .tile-avatar { display: none; }
.tile-name, .tile-badges, .rc-layer { z-index: 2; }
.tile-name {
  position: absolute; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 7px;
  padding: 5px 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.7);
  font-family: var(--f-print); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #e8e5de;
}
.tile-name::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #4a4a44; }
.tile.speaking .tile-name::before { background: var(--orange); box-shadow: 0 0 6px var(--orange); }
.tile-badges { position: absolute; left: 8px; top: 8px; display: flex; gap: 6px; }
.tile-badge { width: 26px; height: 26px; border-radius: 4px; display: grid; place-items: center; color: var(--lcd-fg); background: rgba(0, 0, 0, 0.7); }
.tile-badge .ico { width: 15px; height: 15px; }
.tile-badge.danger { background: var(--led-red); color: #fff; }
.rc-layer { position: absolute; inset: 0; pointer-events: none; }
.rc-cursor { position: absolute; width: 22px; height: 22px; transform: translate(-2px, -2px); transition: left .05s linear, top .05s linear; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.rc-label { position: absolute; transform: translate(14px, 10px); background: var(--orange); color: #fff; font-family: var(--f-print); font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 3px; white-space: nowrap; }
.rc-ripple { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); transform: translate(-50%, -50%); animation: ripple .6s ease-out forwards; }
@keyframes ripple { from { box-shadow: 0 0 0 0 rgba(255, 90, 26, 0.6); opacity: 1; } to { box-shadow: 0 0 0 24px rgba(255, 90, 26, 0); opacity: 0; } }
.controllable { cursor: crosshair; }
.tile-ctrl-btn { position: absolute; right: 8px; bottom: 8px; z-index: 6; }
.tile-fs-btn { position: absolute; right: 8px; top: 8px; z-index: 6; width: 30px; height: 30px; border-radius: 4px; border: 0; display: grid; place-items: center; color: #e8e5de; background: rgba(0, 0, 0, 0.7); cursor: pointer; opacity: 0; transition: opacity .15s; }
.tile-fs-btn .ico { width: 15px; height: 15px; }
.tile:hover .tile-fs-btn { opacity: 1; }
.tile:fullscreen { border-radius: 0; }

/* Side panel: a separate module beside the screen */
.panel { width: 340px; max-width: 86vw; display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; background: var(--case); border: 1px solid var(--edge); box-shadow: var(--unit-shadow); }
.panel[hidden] { display: none; }
.panel-tabs { display: grid; grid-template-columns: 1fr 1fr auto; margin: 12px; padding: 4px; border-radius: 10px; background: #2a2a27; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5); }
.panel-tab { padding: 9px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; font-family: var(--f-print); font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #8b877e; }
.panel-tab.active { color: var(--ink); background: linear-gradient(180deg, #fbfaf7, #e4e1da); box-shadow: inset 0 1px 0 var(--hi), 0 2px 0 #000; }
.panel-body { flex: 1; overflow-y: auto; padding: 0 12px 12px; }
.p-person { display: flex; align-items: center; gap: 11px; padding: 10px 4px; border-bottom: 1px dashed var(--edge); }
.avatar { width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; font-family: var(--f-print); font-size: 11px; font-weight: 600; color: #fff; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25); }
.p-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.p-meta { font-family: var(--f-print); font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange-edge); }
.p-hand { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.p-hand::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--led-amber); box-shadow: 0 0 7px rgba(255, 176, 46, 0.8); }
.p-hand .ico { width: 16px; height: 16px; }

/* Chat as a thermal-printer roll */
.chat-msgs { display: flex; flex-direction: column; gap: 0; margin: 0 12px; padding: 4px 14px 14px !important; border-radius: 4px 4px 0 0; background: #fbfaf6; box-shadow: inset 0 0 0 1px var(--edge), inset 0 8px 10px -8px rgba(0, 0, 0, 0.15); }
.chat-msg { padding: 10px 0; border-bottom: 1px dashed #d6d2c9; font-family: var(--f-print); }
.chat-msg .who { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--print-solid); margin-bottom: 4px; }
.chat-msg .txt { font-size: 12.5px; line-height: 1.55; color: var(--ink); word-break: break-word; }
.chat-msg.mine .who { color: var(--orange-edge); }
.chat-msg.mine .who::before { content: "> "; }
.chat-input-row { display: flex; gap: 8px; padding: 12px; }
.chat-input-row .input { flex: 1; padding: 11px 12px; }
.chat-input-row .btn { color: #fff; background: var(--orange-face); border-color: var(--orange-edge); }

/* Control deck */
.controls {
  justify-self: center; display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; justify-content: center;
  padding: 14px 18px 30px; border-radius: 18px;
  background: var(--case); border: 1px solid var(--edge); box-shadow: var(--unit-shadow);
}
.dock-sep { width: 1px; align-self: stretch; margin: 0 4px; background: var(--edge); }
.ctrl {
  position: relative; display: grid; place-items: center; cursor: pointer; padding: 0;
  width: 58px; height: 48px; border-radius: var(--r-key); color: var(--ink);
  background: linear-gradient(180deg, #fbfaf7, #ebe9e3); border: 1px solid var(--edge-2); border-bottom-width: 4px;
  box-shadow: inset 0 1px 0 var(--hi), 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: transform .06s, border-bottom-width .06s;
}
.ctrl:hover { background: linear-gradient(180deg, #ffffff, #f0eee9); }
.ctrl:active { transform: translateY(3px); border-bottom-width: 1px; }
.ctrl .ico { width: 20px; height: 20px; }
/* Printed label below each key */
.ctrl .lbl {
  position: absolute; top: calc(100% + 9px); left: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font-family: var(--f-print); font-size: 9.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--print-solid);
}
.ctrl:active .lbl { transform: translate(-50%, -3px); }
/* Status LED in the key's corner */
.ctrl::before { content: ""; position: absolute; top: 6px; left: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--led-off); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.3); }
#mic::before, #cam::before { background: var(--led-green); box-shadow: 0 0 6px rgba(44, 207, 106, 0.8); }
.ctrl.off::before { background: var(--led-red) !important; box-shadow: 0 0 6px rgba(255, 59, 47, 0.8) !important; }
.ctrl.off { background: linear-gradient(180deg, #2f2f2c, #232320); color: #f1efe9; border-color: #000; }
.ctrl.on::before { background: var(--orange) !important; box-shadow: 0 0 6px rgba(255, 90, 26, 0.9) !important; }
.ctrl.on { background: linear-gradient(180deg, #ffffff, #f3f1ec); }
/* Unread chat counter as a tiny display on the key */
.ctrl[data-unread]::after {
  content: attr(data-unread); position: absolute; top: -9px; right: -9px; min-width: 22px; height: 18px; padding: 0 5px; border-radius: 4px;
  display: grid; place-items: center; background: var(--lcd); color: var(--lcd-fg); font-family: var(--f-dot); font-weight: 800; font-size: 12px;
  box-shadow: 0 0 0 2px var(--case);
}
.ctrl-danger { width: auto; padding: 0 18px 0 14px; grid-auto-flow: column; gap: 8px; color: #fff; background: var(--led-red); border-color: #a3170e; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3); margin-left: 6px; }
.ctrl-danger:hover { background: #ff5247; }
.ctrl-danger::before { display: none; }
.ctrl-danger .lbl { position: static; transform: none; color: #fff; font-family: var(--f-ui); font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; }
.ctrl-danger:active .lbl { transform: none; }

/* Reactions */
.reactions-bar { position: absolute; }
.react-pop { align-items: flex-end !important; padding-bottom: 120px !important; background: transparent !important; }
.react-tray { width: auto !important; display: flex; gap: 6px; padding: 10px !important; }
.react-emoji { font-size: 22px; width: 50px; height: 46px; padding: 0; letter-spacing: 0; text-transform: none; }
.floater { position: fixed; bottom: 130px; font-size: 36px; pointer-events: none; animation: floatUp 2.6s ease-out forwards; z-index: 60; }
@keyframes floatUp { 0% { opacity: 0; transform: translateY(0) scale(.6); } 15% { opacity: 1; transform: translateY(-12px) scale(1.1); } 100% { opacity: 0; transform: translateY(-240px) scale(1); } }

/* Modal, banner, toast */
.modal-scrim { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(40, 36, 28, 0.45); }
.modal {
  width: min(420px, 100%); padding: 24px; border-radius: 16px;
  background: var(--case); border: 1px solid var(--edge); box-shadow: var(--unit-shadow), 0 30px 80px -20px rgba(0, 0, 0, 0.5);
}
.modal h3 { margin: 0 0 10px; font-weight: 800; font-stretch: 112%; font-size: 20px; }
.modal p { margin: 0 0 18px; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.modal .input { margin-bottom: 16px; letter-spacing: 0.2em; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.control-banner { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; border-radius: 10px; background: var(--lcd); color: var(--lcd-fg); font-family: var(--f-print); font-size: 12px; box-shadow: 0 2px 0 #000, 0 20px 40px -20px rgba(0, 0, 0, 0.6); }
.control-banner b { color: #fff; }
.control-banner small { margin-left: 6px; }
.control-banner .ico { width: 16px; height: 16px; color: var(--led-red); }
.toast {
  position: fixed; bottom: 130px; left: 50%; transform: translateX(-50%); z-index: 90;
  padding: 10px 16px; border-radius: 8px; background: var(--lcd); color: var(--lcd-fg);
  font-family: var(--f-dot); font-weight: 700; font-size: 17px; letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: 0 2px 0 #000, 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .landing-unit, .auth-unit, .prejoin-card { grid-template-columns: 1fr; }
  .dl-hero, .dl-why { grid-template-columns: 1fr; gap: 18px; }
  .auth-side .grille { display: none; }
}
@media (max-width: 720px) {
  .page { padding: 12px 12px 20px; gap: 12px; }
  .strip { gap: 10px; padding: 8px; }
  .strip .model, .strip .divider, .strip .led-row, .nav-text { display: none; }
  .account-bar .lcd { display: none; }
  .landing-unit, .auth-unit, .dl-unit, .prejoin-card { padding: 14px; gap: 14px; border-radius: 18px; }
  .about, .control, .auth-side, .auth-card, .dl-hero, .dl-why, .prejoin-side { padding: 18px; }
  .auth-side { display: none; }
  .prejoin { padding: 12px; }
  .call { padding: 8px; gap: 8px; }
  .call-header { gap: 8px; padding: 6px; }
  .call-header .brand-mark, .call-header .label, .call-header .lcd .chip-time { display: none; }
  .grid { grid-template-columns: 1fr; }
  .call-header .btn-sm { padding: 6px 9px; }
  .call-header .lcd { font-size: 14px; padding: 7px 9px; gap: 10px; min-width: 0; }
  .screen-bezel { padding: 6px; border-radius: 14px; }
  .grid-wrap { padding: 6px; }
  .panel { position: fixed; inset: 8px; width: auto; max-width: none; z-index: 100; } /* a full-screen sheet on phones: above the AI / recording banners (94) */
  .controls { gap: 4px; padding: 10px 8px 26px; max-width: 100%; flex-wrap: nowrap; }
  .ctrl { width: 38px; height: 40px; flex-shrink: 0; }
  .ctrl::before { top: 4px; left: 5px; width: 5px; height: 5px; }
  .ctrl .ico { width: 18px; height: 18px; }
  .ctrl .lbl { font-size: 8px; letter-spacing: 0.06em; }
  .dock-sep { display: none; }
  .ctrl-danger { width: 46px; padding: 0; margin-left: 2px; }
  .ctrl-danger .lbl { display: none; }
}

/* ── Connection state ────────────────────────────────────────────────────── */
/* Signalling dropped: shown while the page reconnects on its own. */
.net-status {
  position: fixed; top: 122px; left: 50%; transform: translateX(-50%); z-index: 95;
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 8px;
  background: var(--lcd); color: var(--lcd-fg); font-family: var(--f-dot); font-weight: 700; font-size: 16px;
  letter-spacing: 0.06em; text-transform: uppercase; box-shadow: 0 2px 0 #000, 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}
.net-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--led-amber); box-shadow: 0 0 7px rgba(255, 176, 46, 0.8); animation: blink 1s steps(2, jump-none) infinite; }
.alone-hint {
  position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%); z-index: 40;
  padding: 8px 16px; border-radius: 999px; pointer-events: none;
  background: rgba(15, 23, 42, 0.78); color: #fff; font-size: 13px; font-weight: 500;
  backdrop-filter: blur(8px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
/* A peer's media link dropped and is being recovered. */
.tile.link-lost video { opacity: 0.35; filter: grayscale(1); }
.tile.link-lost::before {
  content: "RECONNECTING"; position: absolute; z-index: 3; top: 50%; left: 50%; transform: translate(-50%, -50%);
  padding: 8px 12px; border-radius: 6px; background: rgba(0, 0, 0, 0.75); color: var(--lcd-fg);
  font-family: var(--f-dot); font-weight: 700; font-size: 16px; letter-spacing: 0.06em; animation: blink 1.4s steps(2, jump-none) infinite;
}

/* SFU: camera turned off -> show the monogram instead of a frozen frame
   (a screen share still shows; the camera track is what's off). */
.tile.cam-off.is-camera video { visibility: hidden; }

/* ── AI notes ─────────────────────────────────────────────────────────────── */
#notes.unavailable { opacity: 0.55; }
#notes.on::before { background: var(--led-red) !important; box-shadow: 0 0 6px rgba(255, 59, 47, 0.9) !important; animation: blink 1.4s steps(2, jump-none) infinite; }
.notes-banner {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 94; max-width: calc(100vw - 24px);
  display: inline-flex; align-items: center; gap: 12px; padding: 7px 8px 7px 14px; border-radius: 10px;
  background: var(--lcd); color: #e9e4d8; font-family: var(--f-print); font-size: 12px; line-height: 1.4;
  box-shadow: 0 2px 0 #000, 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}
.notes-banner b { color: var(--lcd-fg); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.notes-banner .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--led-red); box-shadow: 0 0 7px rgba(255, 59, 47, 0.8); animation: blink 1.4s steps(2, jump-none) infinite; }
.notes-banner.ready .dot { background: var(--led-green); box-shadow: 0 0 7px rgba(44, 207, 106, 0.8); animation: none; }
.notes-banner .btn { flex-shrink: 0; }
.notes-banner { flex-wrap: wrap; justify-content: center; width: max-content; max-width: min(760px, calc(100vw - 24px)); }
.notes-banner > span:nth-child(2) { flex: 1 1 280px; min-width: 0; }
@media (max-width: 720px) { .notes-banner { top: 64px; font-size: 11px; flex-wrap: wrap; justify-content: center; } }
.notes-banner .lang-heard { display: inline-flex; white-space: nowrap; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lcd-dim); }
.notes-banner .lang-heard b { color: var(--lcd-fg); }
/* ── AI key menu, live translation ──────────────────────────────────────── */
.ai-menu {
  position: fixed; z-index: 120; width: min(400px, calc(100vw - 16px)); padding: 6px; border-radius: 12px;
  background: var(--case); border: 1px solid var(--edge); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08), 0 24px 48px -20px rgba(0, 0, 0, 0.45);
}
.ai-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border-radius: 8px; }
.ai-row + .ai-row { border-top: 1px solid var(--edge); border-radius: 0; }
.ai-row > .ico { width: 20px; height: 20px; color: var(--ink-2); }
.ai-row b { display: block; font-size: 14px; font-weight: 700; }
.ai-row .sub { display: block; margin-top: 2px; font-size: 12px; line-height: 1.4; color: var(--print-solid); }
.ai-row .lvl { font-family: var(--f-print); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--print-solid); }
.ai-row .btn[disabled] { opacity: 0.5; pointer-events: none; }
.ai-off { padding: 8px 10px 4px; font-family: var(--f-print); font-size: 11px; color: var(--print-solid); }
.translate-banner .dot { background: var(--led-green); box-shadow: 0 0 7px rgba(44, 207, 106, 0.8); animation: none; }
.translate-banner .hear { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lcd-dim); }
.translate-banner select {
  font: inherit; font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--lcd-fg); background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 6px; padding: 4px 6px; max-width: 46vw;
}
.translate-banner select option { color: #111; }
.tile-caption {
  position: absolute; left: 8px; right: 8px; bottom: 40px; z-index: 3; padding: 7px 10px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.74); color: #f4f1ea; font-size: 13.5px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tile-caption .cap-lang { margin-right: 8px; font-family: var(--f-print); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange); }

/* Detected language on each tile while AI notes are on */
.tile-name[data-lang]::after { content: "· " attr(data-lang); margin-left: 2px; color: var(--lcd-fg); }

/* Narrow phones: nine keys must fit on one row. Icons + LEDs stay; the
   printed labels (which would overlap) give way to the keys' aria-labels. */
@media (max-width: 420px) {
  .controls { gap: 3px; padding: 8px 8px 10px; }
  .ctrl { width: 33px; height: 38px; }
  .ctrl .ico { width: 16px; height: 16px; }
  .ctrl .lbl { display: none; }
  .ctrl-danger { width: 40px; }
}

/* ── Embedded in a partner's page (room?embed=1) ───────────────────────── */
.left-screen { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.left-screen .module { padding: 28px 32px; display: grid; gap: 18px; justify-items: center; text-align: center; }

/* Pre-join: "AI notes are on in this meeting" + opt out before entering */
.ai-notice { display: grid; gap: 8px; padding: 12px 14px; border-radius: 10px; background: var(--lcd); color: #e9e4d8; font-size: 13px; line-height: 1.5; box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5); }
.ai-notice b { color: var(--lcd-fg); }
.ai-notice label { display: flex; gap: 8px; align-items: center; font-family: var(--f-print); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }

/* ── Host controls ───────────────────────────────────────────────────────── */
.btn-danger { background: var(--led-red); color: #fff; border-color: #b91c1c; }
.knock-card { position: fixed; right: 16px; top: 76px; z-index: 110; width: min(340px, calc(100vw - 32px)); padding: 12px; border-radius: 12px;
  background: var(--case); border: 1px solid var(--edge); box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.5); display: grid; gap: 8px; }
.knock-head { font-family: var(--f-print); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--print-solid); }
.knock-row { display: flex; align-items: center; gap: 8px; }
.knock-row > span { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 12px; margin-bottom: 8px; border-bottom: 1px solid var(--edge); }
.host-note { flex-basis: 100%; margin: 2px 0 0; font-size: 12px; color: var(--print-solid); }
.host-waiting { flex-basis: 100%; display: grid; gap: 6px; margin-top: 6px; font-size: 13px; }
.p-person .btn-sm { padding: 4px 8px; }
.host-screen { position: fixed; inset: 0; z-index: 130; background: var(--desk); }
.host-screen .sub { margin: 0; max-width: 36ch; font-size: 14px; line-height: 1.55; color: var(--ink-2); }

.panel-close { display: grid; place-items: center; width: 34px; border: 0; border-radius: 7px; background: transparent; color: #c9c5bb; cursor: pointer; }
.panel-close:hover { background: rgba(255, 255, 255, 0.08); }
.panel-close .ico { width: 16px; height: 16px; }

/* ── v38 Presets, Quiet Entry, Gallery Pager & Viewer Mode ──────────────── */
.preset-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--edge); color: inherit; white-space: nowrap; }
.quiet-notice { padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.45; background: rgba(59, 130, 246, 0.08); border: 1px solid rgba(59, 130, 246, 0.28); color: var(--ink-2); }
.viewer-banner { text-align: center; padding: 6px 14px; font-size: 12.5px; font-weight: 600; background: rgba(245, 158, 11, 0.14); border-bottom: 1px solid rgba(245, 158, 11, 0.35); color: #f59e0b; }
.gallery-pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 12px; }
.gallery-pager .page-label { font-size: 12px; font-weight: 600; opacity: 0.85; }
.local-time { font-variant-numeric: tabular-nums; font-size: 12px; }
.p-recorder { color: #f59e0b; font-weight: 600; }
