/* Seat UI styles (docs/design/README.md). Hand-written, no framework.
   Logical properties only (inline/block, start/end), so Arabic (dir="rtl") needs no per-component overrides.
   Sections: fonts, tokens, base, layout, components, light screens (0, 1, 2, 3/10, 6), live screens (dark).
   The admin page has its own admin.css (handoff 37). */

/* --- Fonts: self-hosted for offline kiosks, committed in apps/ui/public/fonts (setup re-downloads missing) -- */

@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("noto-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("noto-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("noto-sans-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("noto-sans-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("noto-sans-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("noto-sans-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Noto Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("noto-sans-arabic-arabic-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans Arabic"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("noto-sans-arabic-arabic-600-normal.woff2") format("woff2"); }

/* --- Tokens ------------------------------------------------------------------------------------------------ */

:root {
  --font: "Noto Sans", "Noto Sans Arabic", system-ui, sans-serif;

  /* Light theme: screens 0, 1, 2, 3, 6, 10 */
  --page: #F5F5F5;
  --surface: #FFFFFF;
  --border: #D1D1D1;
  --divider: #E0E0E0;
  --text: #242424;
  --text-secondary: #616161;
  --text-body: #424242;
  --fill-muted: #EBEBEB;
  --taken-border: #8A8A8A;
  --off-dot: #A0A0A0;
  --accent: #5B5FC7;
  --accent-hover: #4F52B2;
  --accent-tint: #E8EBFA;
  --accent-ink: #3D3E78;
  --on-accent: #FFFFFF;
  --success: #0E7A0B;
  --success-bright: #13A10E;
  --success-tint: #F1FAF1;
  --success-border: #9FD89F;
  --success-ink: #0E700E;
  --error: #C4314B;
  --error-ink: #B10E1C;
  --error-tint: #FDF3F4;
  --error-border: #EEACB2;

  /* Live screens in the light theme (the dark values are in .theme-dark) */
  --raised: #EBEBEB;
  --accent-light: #5B5FC7;
  --accent-text: #4F52B2;
  --own-row: #E8EBFA;
  --border-strong: #757575;
  --text-soft: #424242;
  --mic-live: #C4314B;
  --danger: #C4314B;
  --go: #13A10E;
  --go-strong: #0E7A0B;
  --go-light: #13A10E;
  --warning-tint: #FFF4CE;
  --warning-ink: #835B00;
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.16);
  --shadow-float: 0 4px 12px rgba(0, 0, 0, 0.16);

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.14), 0 0 2px rgba(0, 0, 0, 0.12);
  --shadow-raised: 0 2px 4px rgba(0, 0, 0, 0.14), 0 0 2px rgba(0, 0, 0, 0.12);
  --shadow-hero: 0 4px 12px rgba(0, 0, 0, 0.14);
  --radius-card: 8px;
  --radius-control: 6px;
  --touch: 44px;
}

/* Dark theme: live screens 4, 5, 7, 8, 9 by default (the live theme switch, prefs.ts). Set on the screen root
   (.live.theme-dark). */
.theme-dark {
  --page: #141414;
  --surface: #1F1F1F;
  --raised: #292929;
  --border: #3D3D3D;
  --divider: #333333;
  --text: #FFFFFF;
  --text-secondary: #ADADAD;
  --text-body: #ADADAD;
  --fill-muted: #292929;
  --accent: #5B5FC7;
  --accent-light: #7F85F5;
  --accent-text: #A5A9F8;
  --accent-tint: #3D3E78;
  --own-row: #2B2B45;
  --border-strong: #616161;
  --text-soft: #D6D6D6;
  --mic-live: #F1707B;
  --danger: #C4314B;
  --go: #13A10E;
  --go-strong: #0E7A0B;
  --go-light: #54B054;
  --warning-tint: #4A3B12;
  --warning-ink: #FFE8A3;
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-float: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* --- Base -------------------------------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[dir="rtl"] .icon-directional { transform: scaleX(-1); }
.visually-hidden {
  position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* --- Layout: header, page body, footer --------------------------------------------------------------------- */

.screen { min-block-size: 100vh; display: flex; flex-direction: column; }

.app-header {
  flex: none;
  block-size: 64px;
  padding-inline: 32px;
  background: var(--surface);
  border-block-end: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.app-header__brand { display: flex; align-items: center; gap: 12px; flex: none; }
.app-header__logo {
  inline-size: 36px; block-size: 36px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
}
.app-header__name { font-size: 16px; font-weight: 600; white-space: nowrap; }
/* The app's wordmark (handoff 41): "Marka Tarjuman" set in capitals; the text stays mixed case for screen readers. */
.wordmark { text-transform: uppercase; letter-spacing: 0.08em; }
.app-header__end {
  min-inline-size: 0;
  font-size: 15px;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.page {
  flex: 1;
  inline-size: 100%;
  max-inline-size: 1600px;
  margin-inline: auto;
  padding-block: 28px 0;
  padding-inline: 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.page__heading { display: flex; flex-direction: column; gap: 4px; }
.page__title { font-size: 28px; font-weight: 600; line-height: 1.25; }
.page__subtitle { font-size: 16px; color: var(--text-secondary); }

.page-footer {
  flex: none;
  inline-size: 100%;
  max-inline-size: 1600px;
  margin-inline: auto;
  block-size: 96px;
  padding-inline: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.page-footer__group { display: flex; align-items: center; gap: 12px; }
.page-footer__note { font-size: 14px; color: var(--text-secondary); }

.two-columns { display: flex; gap: 24px; align-items: flex-start; }
.two-columns__side { flex: none; inline-size: 420px; }
.two-columns__side--narrow { inline-size: 380px; }
.two-columns__main { flex: 1; min-inline-size: 0; }

/* --- Components -------------------------------------------------------------------------------------------- */

.surface {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.surface__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.surface__title { font-size: 16px; font-weight: 600; }
.divider { block-size: 1px; background: var(--divider); }
.small-label { font-size: 14px; color: var(--text-secondary); }

.btn {
  min-block-size: var(--touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.btn:disabled { cursor: default; opacity: 0.45; }
.btn--md { block-size: 44px; padding-inline: 16px; font-size: 15px; }
.btn--lg { block-size: 56px; padding-inline: 28px; font-size: 18px; }
.btn--hero { block-size: 72px; padding-inline: 56px; font-size: 24px; border-radius: 8px; box-shadow: var(--shadow-hero); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary.btn--lg { padding-inline: 40px; }
.btn--primary:not(:disabled):hover { background: var(--accent-hover); }
.btn--secondary { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn--outline { background: var(--surface); border-color: var(--accent); color: var(--accent-hover); }
.btn--text { background: transparent; color: var(--accent-hover); padding-inline: 24px; }
.btn--toggle { background: var(--surface); border-color: var(--border); color: var(--text); font-weight: 400; }
.btn--toggle[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-ink); font-weight: 600; }
.btn--full { inline-size: 100%; }
.btn--answer { block-size: 52px; min-inline-size: 96px; padding-inline: 20px; font-size: 17px; font-weight: 600; }
.btn--answer[aria-pressed="true"] { border-width: 2px; }

.chip {
  flex: none;
  min-inline-size: 40px;
  block-size: 40px;
  padding-inline: 6px;
  border-radius: var(--radius-control);
  background: var(--fill-muted);
  color: var(--text-body);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chip--selected { background: var(--accent); color: var(--on-accent); }
.chip--large { min-inline-size: 48px; block-size: 48px; padding-inline: 8px; font-size: 16px; }

.avatar {
  flex: none;
  border-radius: 50%;
  color: #FFFFFF;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 16px; font-weight: 600; }
.field__hint { font-size: 14px; color: var(--text-secondary); line-height: 1.45; }
.text-input {
  inline-size: 100%;
  block-size: 56px;
  padding-inline: 16px;
  border: 1px solid var(--border);
  border-block-end: 2px solid var(--accent);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  font-size: 20px;
}
.text-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.search {
  inline-size: 300px;
  max-inline-size: 50%;
  block-size: 48px;
  padding-inline: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}
.search:focus-within { border-color: var(--accent); }
.search__input {
  flex: 1;
  min-inline-size: 0;
  block-size: var(--touch);
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.combobox { position: relative; }
.combobox__list {
  position: absolute;
  inset-inline: 0;
  inset-block-start: calc(100% + 4px);
  z-index: 10;
  max-block-size: 280px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-raised);
}
.combobox__option {
  min-block-size: 48px;
  padding-inline: 12px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 18px;
  cursor: pointer;
}
.combobox__option[aria-selected="true"] { background: var(--accent-tint); }
.combobox__meta { font-size: 14px; color: var(--text-secondary); }

.alert {
  padding-block: 14px;
  padding-inline: 16px;
  border-radius: var(--radius-control);
  background: var(--error-tint);
  border: 1px solid var(--error-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.alert__title { color: var(--error-ink); display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; }
.alert__text { color: var(--error-ink); font-size: 15px; }
.alert__list { margin: 0; padding-inline-start: 20px; font-size: 15px; line-height: 1.6; color: var(--text-body); }

.status-box {
  block-size: 56px;
  padding-inline: 16px;
  border-radius: var(--radius-control);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
}
.status-box--ok { background: var(--success-tint); border: 1px solid var(--success-border); color: var(--success-ink); font-weight: 600; }
.status-box--neutral { background: var(--page); border: 1px solid var(--divider); color: var(--text-secondary); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  padding: 24px;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal {
  inline-size: min(520px, 100%);
  padding: 28px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal__title { font-size: 22px; font-weight: 600; }
.modal__body { font-size: 16px; line-height: 1.5; color: var(--text-body); }
.modal__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-block-start: 8px; }

.round-icon {
  flex: none;
  inline-size: 52px;
  block-size: 52px;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.round-icon--error { background: var(--error-tint); color: var(--error-ink); }
.round-icon--large { inline-size: 72px; block-size: 72px; }

.range { inline-size: 100%; block-size: var(--touch); margin: 0; accent-color: var(--accent); }

/* --- Screen 0: device setup -------------------------------------------------------------------------------- */

.seat-preview {
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--page);
  border: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}
.seat-preview__room { font-size: 16px; color: var(--text-secondary); }
.seat-preview__seat { font-size: 48px; line-height: 1.1; font-weight: 600; letter-spacing: -1px; }
.seat-preview__empty { font-size: 18px; color: var(--text-secondary); padding-block: 14px; }

.legend { font-size: 14px; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.legend__swatch {
  flex: none; inline-size: 14px; block-size: 14px; border-radius: 3px;
  background: var(--fill-muted); border: 1px dashed var(--taken-border);
}

.seat-grid {
  display: grid;
  grid-template-columns: repeat(var(--seat-columns, 5), minmax(0, 1fr));
  gap: 10px;
  max-block-size: calc(100vh - 330px);
  min-block-size: 160px;
  overflow-y: auto;
  padding: 2px;
}
.seat {
  block-size: 76px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.seat[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent); color: var(--on-accent); }
.seat:disabled { border: 1px dashed var(--taken-border); background: var(--fill-muted); color: var(--text-secondary); cursor: not-allowed; }
.seat-grid--dense .seat { block-size: 56px; font-size: 20px; }

.pin-card { inline-size: 420px; max-inline-size: 100%; }

/* --- Screen 1: idle ---------------------------------------------------------------------------------------- */

.idle {
  flex: 1;
  padding-inline: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: center;
}
.idle__seat-group { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.idle__room { font-size: 20px; color: var(--text-secondary); }
.idle__seat { font-size: 104px; line-height: 1.05; font-weight: 600; letter-spacing: -2px; }
.idle__intro { max-inline-size: 560px; font-size: 20px; line-height: 1.4; color: var(--text-body); }
.status-line { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--text-secondary); }
.status-dot { flex: none; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--success-bright); }
.status-dot--off { background: var(--off-dot); }
.idle-footer {
  position: relative;
  flex: none;
  block-size: 56px;
  padding-inline: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-secondary);
}
.idle-footer__hint { display: flex; align-items: center; gap: 8px; }
.idle-footer__setup {
  position: absolute;
  inset-inline-end: 16px;
  min-block-size: var(--touch);
  padding-inline: 12px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
}
.language-switcher { display: flex; align-items: center; gap: 8px; }

/* Negative letter-spacing would break Arabic letter joining. */
[dir="rtl"] .idle__seat, [dir="rtl"] .seat-preview__seat { letter-spacing: 0; }

/* --- Screen 2: join (name and language) -------------------------------------------------------------------- */

.lang-summary { display: flex; align-items: center; gap: 12px; }
.lang-summary__name { font-size: 22px; font-weight: 600; }
.lang-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lang-option {
  block-size: 68px;
  padding-inline: 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-align: start;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.lang-option[aria-pressed="true"] { border: 2px solid var(--accent); padding-inline: 13px; background: var(--accent-tint); }
.lang-option__names { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: 2px; }
.lang-option__native { font-size: 17px; font-weight: 600; }
.lang-option__english { font-size: 13px; color: var(--text-secondary); }
/* Voice for the translation (handoff 22): optional, in the side column under the language summary. */
.voice-choice { display: flex; flex-direction: column; gap: 10px; }
.voice-choice__label { font-size: 15px; font-weight: 600; }
.voice-choice__optional { margin-inline-start: 6px; font-weight: 400; color: var(--text-secondary); }
.voice-choice__options { display: flex; gap: 10px; }
.voice-option {
  min-block-size: var(--touch);
  flex: 1 1 0;
  min-inline-size: 0;
  padding-inline: 12px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.voice-option[aria-pressed="true"] { border: 2px solid var(--accent); padding-inline: 11px; background: var(--accent-tint); }
.lang-option__check { flex: none; color: var(--accent); }
.empty-note { font-size: 15px; color: var(--text-secondary); padding-block: 8px; }

/* --- Screens 3 and 10: device check ------------------------------------------------------------------------ */

.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.check-card { padding: 28px; gap: 24px; min-block-size: 400px; }
.check-card--failed { gap: 20px; min-block-size: 420px; }
.check-card__head { display: flex; align-items: center; gap: 14px; }
.check-card__titles { display: flex; flex-direction: column; gap: 2px; }
.check-card__title { font-size: 20px; font-weight: 600; }
.check-card__hint { font-size: 15px; color: var(--text-secondary); }
.check-card__bottom { margin-block-start: auto; }
.meter-group { display: flex; flex-direction: column; gap: 10px; }
.meter { display: flex; align-items: flex-end; gap: 6px; block-size: 72px; }
.meter--flat { block-size: 40px; }
.meter__bar { flex: 1; min-block-size: 8px; border-radius: 3px; background: var(--divider); }
.meter__bar--on { background: var(--success-bright); }
.question-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.question-row__text { font-size: 17px; font-weight: 600; }
.question-row__answers { display: flex; gap: 10px; }

/* --- Screen 6: meeting ended ------------------------------------------------------------------------------- */

.center-stage { flex: 1; padding: 24px; display: flex; align-items: center; justify-content: center; }
.ended-card {
  inline-size: min(560px, 100%);
  padding: 40px;
  box-shadow: var(--shadow-raised);
  align-items: center;
  text-align: center;
}
.ended-card__heading { display: flex; flex-direction: column; gap: 8px; }
.ended-card__title { font-size: 32px; font-weight: 600; line-height: 1.25; }
.ended-card__thanks { font-size: 18px; color: var(--text-body); }
.ended-card__note { font-size: 16px; line-height: 1.5; color: var(--text-secondary); }
.ended-card__countdown { font-size: 16px; color: var(--text-secondary); }
.ended-card__countdown strong { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.ended-card .divider { inline-size: 100%; }
/* Meeting summary on screen 6 (handoff 42) */
.ended-card--summary { inline-size: min(880px, 100%); padding: 24px 40px; gap: 16px; }
.ended-card--summary .round-icon { display: none; }
.ended-card__preparing { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; color: var(--text); }
.seat-spinner {
  inline-size: 20px; block-size: 20px; flex: none; border-radius: 50%;
  border: 3px solid var(--border); border-block-start-color: var(--accent); animation: seat-spin 0.9s linear infinite;
}
@keyframes seat-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .seat-spinner { animation: none; } }
.seat-summary { inline-size: 100%; text-align: start; display: flex; flex-direction: column; gap: 8px; }
.seat-summary__title { font-size: 20px; font-weight: 600; }
.seat-summary__note { font-size: 14px; color: var(--text-secondary); }
.seat-summary__body {
  max-block-size: max(200px, calc(100vh - 470px)); overflow-y: auto; padding: 16px 20px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--page); font-size: 16px; line-height: 1.55; text-align: start; color: var(--text-body);
}
.seat-summary__section + .seat-summary__section { margin-block-start: 14px; }
.seat-summary__section h3 { font-size: 15px; font-weight: 600; color: var(--text-secondary); margin-block-end: 4px; }
.seat-summary__section ul { margin: 0; padding-inline-start: 22px; }
.seat-summary__section li + li { margin-block-start: 4px; }

/* --- Smaller viewports (1024x768 must stay usable) --------------------------------------------------------- */

@media (max-width: 1150px) {
  .page, .page-footer { padding-inline: 32px; }
  .two-columns__side { inline-size: 360px; }
  .two-columns__side--narrow { inline-size: 330px; }
  .search { inline-size: 240px; }
}
@media (max-height: 800px) {
  .page { padding-block-start: 22px; gap: 16px; }
  .page-footer { block-size: 88px; }
  .idle { gap: 22px; }
  .idle__seat { font-size: 92px; }
  .check-card { min-block-size: 360px; }
  .check-card--failed { min-block-size: 380px; }
}

/* --- Live screens 4, 5, 7, 8, 9 (.live.theme-dark, or light) --------------------------------------------- */

.tabular { font-variant-numeric: tabular-nums; }

.live {
  position: relative;
  block-size: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--page);
  color: var(--text);
}

.live-header {
  flex: none;
  block-size: 56px;
  padding-inline: 20px;
  background: var(--surface);
  border-block-end: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.live-header__meeting { display: flex; align-items: center; gap: 16px; min-inline-size: 0; }
.live-header__room { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-header__clock { font-size: 15px; color: var(--text-secondary); }
/* Recording (handoff 36): a red dot and a label, in both themes. */
.rec-badge { display: inline-flex; align-items: center; gap: 8px; padding-block: 4px; padding-inline: 10px; border-radius: 999px;
  background: rgba(220, 38, 38, 0.14); color: #DC2626; font-size: 14px; font-weight: 600; white-space: nowrap; }
.theme-dark .rec-badge { color: #F87171; background: rgba(248, 113, 113, 0.16); }
.recorder .caption-panel__head .switch-button { visibility: hidden; }   /* no seat controls in a recording */
.recorder__language { font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.rec-badge__dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: currentColor; animation: rec-pulse 1.6s ease-in-out infinite; }
@keyframes rec-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .rec-badge__dot { animation: none; } }
.live-header__end { display: flex; align-items: center; gap: 8px; flex: none; }
.live-header__people {
  block-size: var(--touch);
  padding-inline: 14px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.live-header__people[aria-pressed="true"] { background: var(--accent-tint); }
/* Assistance (handoff 38): Help in the header; amber while the seat's request is open (#FFF9F0 / #F4BF7A, the admin's
   assistance colours; a dark amber on the dark theme). */
.live-header__help {
  block-size: var(--touch);
  padding-inline: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.live-header__help--open { background: #FFF9F0; border-color: #F4BF7A; color: #6B4700; font-weight: 600; }
.theme-dark .live-header__help--open { background: rgba(244, 191, 122, 0.16); border-color: #F4BF7A; color: #F4BF7A; }
@media (max-width: 1150px) { .live-header__help:not(.live-header__help--open) span { display: none; } }
.assist__reasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-block-start: 16px; }
.live-header__divider { inline-size: 1px; block-size: 24px; background: var(--border); }
.live-header__me { display: flex; align-items: center; gap: 10px; padding-inline: 8px; font-size: 15px; white-space: nowrap; }
.live-header__seat { color: var(--text-secondary); }

.live-reconnecting {
  position: absolute;
  z-index: 15;
  inset-block-start: 66px;
  inset-inline: 0;
  margin-inline: auto;
  inline-size: fit-content;
  max-inline-size: calc(100% - 32px);
  padding-block: 10px;
  padding-inline: 18px;
  border-radius: 20px;
  background: var(--warning-tint);
  color: var(--warning-ink);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-float);
}

.live-body { flex: 1; min-block-size: 0; display: flex; }
.live-main {
  position: relative;
  flex: 1;
  min-inline-size: 0;
  padding-block: 28px 20px;
  padding-inline: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Screen sharing (handoff 35). Another seat's share fills the area between the header and the bottom bar (the side
   panel hides unless opened from the header): one compact speaker line, then the share, fitted without cropping. The
   current caption shows as subtitles over its bottom: the seat's text size, capped so two lines and the band stay within
   about a quarter of the share's height (container query units), newest text kept. */
.live-main.live-main--share { padding-block: 10px 12px; padding-inline: 16px; gap: 10px; }   /* over the max-width and max-height rules */
.share-line, .share-line.speaker { flex: none; min-block-size: 44px; display: flex; align-items: center; justify-content: flex-start; gap: 12px; min-inline-size: 0; white-space: nowrap; }
.share-line .speaker__ring.share-line__ring { inline-size: 42px; block-size: 42px; padding: 2px; border-width: 2px; }
.share-line .speaker__placeholder svg { inline-size: 18px; block-size: 18px; }
.share-line__eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }
.share-line__name { font-size: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.share-line__detail { font-size: 14px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; }
.share-line__muted { display: inline-flex; color: var(--warning-ink); }
.share-line__end { margin-inline-start: auto; display: flex; align-items: center; min-inline-size: 0; }
.share-line__note .caption-panel__note { margin: 0; padding: 0; border: 0; font-size: 14px; white-space: normal; }
.share-view {
  position: relative;
  flex: 1 1 0;
  min-block-size: 0;
  border-radius: 10px;
  background: #000000;
  overflow: hidden;
  container-type: size;
  cursor: zoom-in;
}
.share-view:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; }
.share-view:fullscreen { border-radius: 0; cursor: zoom-out; }
.share-view__video { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: contain; display: block; }
.share-view__label {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  max-inline-size: calc(100% - 20px);
  padding-block: 5px;
  padding-inline: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  pointer-events: none;
  animation: share-label-out 600ms ease 3s forwards;   /* fades after 3 s */
}
@keyframes share-label-out { to { opacity: 0; } }
.share-subtitle {
  position: absolute;
  inset-block-end: 2cqh;
  inset-inline: 0;
  margin-inline: auto;
  inline-size: fit-content;
  max-inline-size: 92%;
  padding-block: 0.25em;
  padding-inline: 0.6em;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.66);
  color: #FFFFFF;
  font-size: min(var(--cap-px, 38px), 8cqh);
  text-align: center;
  pointer-events: none;
}
.share-subtitle .caption-text { line-height: 1.25; max-block-size: 2.5em; overflow: hidden; }
.share-subtitle .caption-text__final { color: #FFFFFF; }
.share-subtitle .caption-text__partial { color: rgba(255, 255, 255, 0.75); }
.tool-btn--captions[aria-pressed="true"] { background: var(--accent-tint); }
.live-bar--busy .tool-btn--captions .tool-btn__label, .live-bar--busy .tool-btn--share .tool-btn__label,
.live-bar--busy .tool-btn--camera .tool-btn__label { display: none; }
/* The sharer's own seat: the normal view under this bar. */
.sharing-bar {
  flex: none;
  min-block-size: 44px;
  padding-block: 6px;
  padding-inline: 16px 6px;
  border-radius: 10px;
  background: var(--accent-tint);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sharing-bar__stop {
  margin-inline-start: auto;
  min-block-size: 36px;
  padding-inline: 14px;
  border: 0;
  border-radius: 8px;
  background: var(--danger);
  color: var(--on-accent);
  font: inherit;
  cursor: pointer;
}
@media (max-width: 1150px) {
  .share-line__detail { display: none; }
}

/* Who is speaking */
.speaker { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.speaker__who { display: flex; align-items: center; gap: 18px; min-inline-size: 0; }
.speaker__ring {
  flex: none;
  inline-size: 76px;
  block-size: 76px;
  padding: 3px;
  border-radius: 50%;
  border: 3px solid var(--accent-light);
  display: flex;
}
.speaker__ring--live { border-color: var(--mic-live); }
.speaker__ring--muted { border-color: var(--warning-ink); }
.speaker__ring--empty { border-color: var(--border); }
.speaker__placeholder {
  flex: 1;
  border-radius: 50%;
  background: var(--raised);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.speaker__text { display: flex; flex-direction: column; gap: 4px; min-inline-size: 0; }
.speaker__name { font-size: 26px; font-weight: 600; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.speaker__line { font-size: 16px; color: var(--text-secondary); }
.speaker__side { flex: none; display: flex; align-items: center; gap: 16px; }
.eyebrow-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow-label--live { color: var(--mic-live); }
.eyebrow-label--muted { color: var(--warning-ink); }
[dir="rtl"] .eyebrow-label { letter-spacing: 0; }

/* Speaking indicator (handoff 22, screens/live/level.tsx): a halo and a ripple behind the avatar ring and level bars,
   driven by --level, --peak and --b (0..1) that the meter writes. With reduced motion nothing scales or moves: only
   --on (above the speech threshold) shows a steady glow and raised bars. --ring is the colour of the meter. */
.speaker { --ring: var(--accent-light); }
.speaker--live { --ring: var(--mic-live); }
.level-ring { position: relative; flex: none; display: flex; }
.level-ring .speaker__ring { position: relative; background: var(--page); }
.level-ring__halo, .level-ring__ripple { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.level-ring__halo { background: var(--ring); opacity: calc(var(--level, 0) * 0.32); transform: scale(calc(1 + var(--level, 0) * 0.2)); }
.level-ring__ripple { border: 2px solid var(--ring); opacity: calc(var(--peak, 0) * 0.55); transform: scale(calc(1.04 + var(--peak, 0) * 0.3)); }
.level-bars { flex: none; display: flex; align-items: center; gap: 4px; block-size: 36px; }
.level-bars i {
  inline-size: 4px;
  block-size: calc(4px + var(--b, 0) * 32px);
  border-radius: 2px;
  background: var(--ring, currentColor);
  opacity: calc(0.45 + var(--b, 0) * 0.55);
}
.level-bars--mini { block-size: 14px; gap: 2px; }
.level-bars--mini i { inline-size: 3px; block-size: calc(3px + var(--b, 0) * 11px); background: currentColor; }
.speaker__ring--off { border-color: var(--border); }
.speaker__muted { display: flex; color: var(--text-secondary); }
@media (prefers-reduced-motion: reduce) {
  .level-ring__halo { transform: none; opacity: calc(var(--on, 0) * 0.3); transition: opacity 0.25s; }
  .level-ring__ripple { opacity: 0; }
  .level-bars i { block-size: calc(4px + var(--on, 0) * 14px); opacity: calc(0.45 + var(--on, 0) * 0.55); }
  .level-bars--mini i { block-size: calc(3px + var(--on, 0) * 6px); }
}

.lang-pill {
  flex: none;
  block-size: 36px;
  min-inline-size: 44px;
  padding-inline: 14px;
  border-radius: 18px;
  background: var(--raised);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.lang-pill svg { color: var(--text-secondary); }
.lang-pill--small { block-size: 32px; min-inline-size: 40px; padding-inline: 10px; border-radius: 16px; font-size: 13px; }
.pill-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill-row--center { justify-content: center; }
.pill-row__label { font-size: 14px; color: var(--text-secondary); }

/* Caption panel */
/* Cameras (handoff 40). The speaker's camera replaces the speaker card: fitted (never cropped), rounded, with their name
   and language over its bottom; the caption panel below keeps a little less than half of the height. */
.speaker-video {
  position: relative;
  flex: 1.25 1 0;
  min-block-size: 0;
  border-radius: 12px;
  background: #000000;
  overflow: hidden;
}
.speaker-video__video { display: block; inline-size: 100%; block-size: 100%; object-fit: contain; }
.speaker-video__label {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 18px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
  color: #FFFFFF;
}
.speaker-video__live { flex: none; inline-size: 10px; block-size: 10px; border-radius: 50%; background: #F1707B; }
.speaker-video__text { display: flex; flex-direction: column; min-inline-size: 0; flex: 1; }
.speaker-video__name { font-size: 20px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.speaker-video__line { font-size: 14px; opacity: 0.85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.speaker-video .lang-pill { background: rgba(255, 255, 255, 0.16); color: #FFFFFF; }
.video--mirror { transform: scaleX(-1); }
/* Over a shared screen: the speaker's camera in the top corner (the subtitles are at the bottom); a tap hides it. */
.camera-pip {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 12px;
  z-index: 2;
  inline-size: clamp(160px, 22%, 320px);
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  background: #000000;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}
.camera-pip__video { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.camera-pip__name {
  position: absolute; inset-inline-start: 0; inset-block-end: 0; max-inline-size: 100%;
  padding: 2px 8px; border-start-end-radius: 6px; background: rgba(0, 0, 0, 0.6); color: #FFFFFF; font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.camera-pip--hidden {
  inline-size: var(--touch); block-size: var(--touch); aspect-ratio: auto; display: grid; place-items: center;
  border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #FFFFFF;
}
/* My live camera: a small mirrored picture in the bottom corner of the main area, always labelled "Camera on". */
.self-view {
  position: absolute;
  inset-block-end: 12px;
  inset-inline-end: 16px;
  z-index: 3;
  inline-size: 184px;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--mic-live);
  border-radius: 10px;
  background: #000000;
  overflow: hidden;
  box-shadow: var(--shadow-float);
}
.self-view__video { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.self-view__label {
  position: absolute; inset-block-start: 6px; inset-inline-start: 6px; display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.62); color: #FFFFFF; font-size: 12px; font-weight: 600;
}
.self-view__dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: #F1707B; }
.tool-btn--camera-live { color: var(--mic-live); }
/* The device check's optional camera row */
.camera-check { display: flex; align-items: center; gap: 20px; padding-block: 16px; padding-inline: 24px; }
.camera-check__text { flex: 1; min-inline-size: 0; }
.camera-check__preview { flex: none; inline-size: 160px; aspect-ratio: 16 / 9; border-radius: 8px; background: #000000; object-fit: cover; }

.caption-panel {
  flex: 1;
  min-block-size: 0;
  padding-block: 28px;
  padding-inline: 32px;
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.caption-panel__head { flex: none; min-block-size: var(--touch); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.caption-panel__label { font-size: 14px; color: var(--text-secondary); }
.caption-text { flex: 0 1 auto; min-block-size: 0; overflow: hidden; line-height: 1.3; overflow-wrap: anywhere; }
.caption-text__final { font-weight: 600; }
.caption-text__partial { font-weight: 400; color: var(--text-secondary); }
.caption-text--empty { font-size: 20px; color: var(--text-secondary); }
/* Caption animation (Settings, handoffs 33, 34; AnimatedCaption.tsx): only new tokens animate, with a delay fixed when
   they are scheduled (--d); a token waiting for its sentence's audio stays hidden (--wait). Hidden tokens already take
   their place, so nothing shifts while the text appears. Fade slides in from the reading start (--cap-x). */
.cap-tok--wait, .cap-ch--wait { opacity: 0; }
.cap-tok { display: inline-block; }   /* a word: a transform needs a box */
.cap--fade .cap-tok--new { animation: cap-rise 220ms ease-out var(--d, 0ms) both; }
.cap--word .cap-tok--new { animation: cap-fade-in 180ms ease-out var(--d, 0ms) both; }
.cap--typing .cap-ch { position: relative; }
.cap--typing .cap-ch--new { opacity: 0; animation: cap-show 1ms linear var(--d, 0ms) forwards; }
/* The cursor: visible while its character is the newest one (--s), a little longer after the last one. Positioned, so it
   takes no space and does not break the joining of Arabic letters. */
.cap--typing .cap-ch--new::after {
  content: ""; position: absolute; inset-block: 0.12em; inset-inline-end: -0.06em; border-inline-end: 0.07em solid currentColor;
  opacity: 0; animation: cap-caret var(--s, 60ms) step-end var(--d, 0ms);
}
.cap--typing .cap-ch--last::after { animation-duration: calc(var(--s, 60ms) + 500ms); }
.cap--done .cap-tok--new, .cap--done .cap-ch--new, .cap--done .cap-tok--wait, .cap--done .cap-ch--wait { animation: none; opacity: 1; }
.cap--done .cap-ch--new::after { content: none; }
@keyframes cap-rise { from { opacity: 0; transform: translateX(var(--cap-x, -0.4em)); } to { opacity: 1; transform: none; } }
@keyframes cap-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cap-show { to { opacity: 1; } }
@keyframes cap-caret { 0%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .cap-tok--new, .cap-ch--new, .cap-tok--wait, .cap-ch--wait { animation: none !important; opacity: 1 !important; transform: none !important; }
  .cap-ch--new::after { content: none !important; }
}
.caption-text--clipped { mask-image: linear-gradient(to bottom, transparent 0, #000 0.9em); }   /* earlier lines scrolled away */
/* Earlier finals above the current caption (handoff 21): smaller (font size set inline), dimmed, newest at the
   bottom; the panel shows as many as fit and fades the oldest out at the top. */
.caption-stack { flex: 1 1 auto; min-block-size: 0; display: flex; flex-direction: column; gap: 14px; }
.caption-history {
  flex: 1 1 0;
  min-block-size: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  mask-image: linear-gradient(to bottom, transparent 0, #000 56px);
}
.caption-past { flex: none; line-height: 1.4; color: var(--text-secondary); overflow-wrap: anywhere; }
.caption-past__who { display: block; font-size: 13px; font-weight: 600; color: var(--accent-text); margin-block-end: 2px; }
.caption-stack .caption-text { flex: none; max-block-size: 70%; }
.caption-panel__original, .caption-panel__note {
  flex: none;
  margin-block-start: auto;
  padding-block-start: 16px;
  border-block-start: 1px solid var(--divider);
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.caption-panel__original { max-block-size: 34%; overflow: hidden; }
.caption-panel__note { font-size: 16px; display: flex; align-items: center; gap: 10px; }
.caption-panel__note--warning { color: var(--warning-ink); }   /* screen 5: silence release is near */

.switch-button {
  block-size: var(--touch);
  padding-inline: 12px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.switch { flex: none; inline-size: 40px; block-size: 22px; padding: 3px; border-radius: 11px; background: var(--border); display: flex; justify-content: flex-start; }
.switch__knob { inline-size: 16px; block-size: 16px; border-radius: 50%; background: #FFFFFF; }
.switch-button[aria-pressed="true"] .switch { background: var(--accent); justify-content: flex-end; }

/* Strip and notice below the panel */
.strip { flex: none; min-block-size: 32px; display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--text-secondary); overflow: hidden; white-space: nowrap; }
.strip__label { font-weight: 600; color: var(--text); }
.person-chip {
  block-size: 32px;
  padding-inline: 4px 12px;
  border-radius: 16px;
  background: var(--raised);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.notice {
  flex: none;
  min-block-size: 56px;
  padding-inline: 16px;
  border-radius: var(--radius-card);
  background: var(--own-row);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
}
.notice svg { flex: none; color: var(--accent-text); }
.notice strong { font-weight: 600; }

/* Screen 8: your turn */
.turn-card {
  flex: 1;
  min-block-size: 0;
  padding: 32px;
  border-radius: 12px;
  border: 2px solid var(--go-light);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
}
.turn-card__text { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.turn-card__title { font-size: 40px; font-weight: 600; line-height: 1.15; }
.turn-card__hint { max-inline-size: 560px; font-size: 20px; line-height: 1.4; color: var(--text-soft); }
.countdown { position: relative; flex: none; inline-size: 112px; block-size: 112px; }
.countdown svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; transform: rotate(-90deg); }
.countdown__track, .countdown__arc { fill: none; stroke-width: 5; }
.countdown__track { stroke: var(--raised); }
.countdown__arc { stroke: var(--go-light); stroke-linecap: round; transition: stroke-dashoffset 0.25s linear; }
.countdown__number { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 44px; font-weight: 600; }

/* Right panel */
.side {
  flex: none;
  inline-size: 380px;
  min-block-size: 0;
  background: var(--surface);
  border-inline-start: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
}
.tabs { flex: none; block-size: 56px; padding-inline: 12px; border-block-end: 1px solid var(--divider); display: flex; align-items: stretch; gap: 4px; }
.tab {
  padding-inline: 12px;
  border: 0;
  border-block-end: 3px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.tab[aria-selected="true"] { color: var(--text); border-block-end-color: var(--accent-light); }
.side__body { position: relative; flex: 1; min-block-size: 0; display: flex; flex-direction: column; }
.empty-line { font-size: 14px; color: var(--text-secondary); }

.transcript { flex: 1; min-block-size: 0; overflow-y: auto; padding-block: 16px; padding-inline: 20px; }
.transcript__inner { min-block-size: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; }
.entry { display: flex; gap: 12px; }
.entry__body { display: flex; flex-direction: column; gap: 4px; min-inline-size: 0; }
.entry__head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.entry__name { font-size: 14px; font-weight: 600; }
.entry__meta { font-size: 12px; color: var(--text-secondary); }
.entry__text { font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.entry--partial .entry__text { color: var(--text-secondary); }
.new-pill {
  position: absolute;
  inset-block-end: 16px;
  inset-inline: 0;
  margin-inline: auto;
  inline-size: fit-content;
  block-size: 40px;
  padding-inline: 16px;
  border: 0;
  border-radius: 20px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-float);
  cursor: pointer;
}

.queue-tab { flex: 1; min-block-size: 0; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.section-label { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-secondary); }
.section-label--spaced { margin-block-start: 12px; }
[dir="rtl"] .section-label { letter-spacing: 0; }
.row-card {
  flex: none;
  min-block-size: 64px;
  padding-inline: 14px 10px;
  border-radius: var(--radius-card);
  border: 1px solid transparent;
  background: var(--raised);
  display: flex;
  align-items: center;
  gap: 12px;
}
.row-card--mine { background: var(--own-row); border-color: var(--accent); }
.row-card__pos { inline-size: 24px; text-align: center; font-size: 16px; font-weight: 600; color: var(--text-secondary); }
.row-card--mine .row-card__pos { color: var(--accent-text); }
.row-card__who { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: 2px; }
.row-card__name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-card__line { font-size: 13px; color: var(--text-secondary); }
.row-card__status { font-size: 13px; font-weight: 600; color: var(--accent-text); white-space: nowrap; }
.row-card__aside { font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.row-card__aside--missing { color: var(--mic-live); font-weight: 600; }
.small-outline-btn {
  block-size: var(--touch);
  padding-inline: 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.queue-tab__note { margin-block-start: auto; padding-block-start: 12px; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }

.people-tab { flex: 1; min-block-size: 0; overflow-y: auto; padding-block: 14px; padding-inline: 12px; display: flex; flex-direction: column; gap: 6px; }
.people-tab__summary { padding-inline: 8px; min-block-size: 24px; font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.people-tab__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.person-row { min-block-size: 42px; padding-inline: 8px; border-radius: var(--radius-control); display: flex; align-items: center; gap: 10px; }
.person-row--mine { background: var(--own-row); }
.person-row__seat { inline-size: 26px; font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.person-row__name { flex: 1; min-inline-size: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-row__status { font-size: 12px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.person-row__status--active { color: var(--accent-text); }
.person-row__status--missing { color: var(--mic-live); }
.code-tag {
  flex: none;
  min-inline-size: 34px;
  block-size: 24px;
  padding-inline: 6px;
  border-radius: 4px;
  background: var(--divider);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bottom bar */
.live-bar {
  flex: none;
  block-size: 96px;
  padding-inline: 24px;
  background: var(--surface);
  border-block-start: 1px solid var(--divider);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.live-bar__start { display: flex; align-items: center; gap: 14px; min-inline-size: 0; }
.live-bar__center { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.live-bar__actions { display: flex; align-items: center; gap: 10px; }
.live-bar__note { max-inline-size: 380px; font-size: 12px; line-height: 1.3; color: var(--text-secondary); text-align: center; }
.live-bar__end { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.square-btn {
  flex: none;
  inline-size: 56px;
  block-size: 56px;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--raised);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.square-btn[aria-pressed="true"] { background: var(--accent-tint); color: var(--text); }
.square-btn:disabled { cursor: default; }
.volume { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.volume__label { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.volume input { inline-size: 180px; block-size: 28px; margin: 0; accent-color: var(--accent-light); }
.pill-btn {
  block-size: 64px;
  padding-inline: 32px;
  border: 0;
  border-radius: 32px;
  color: var(--on-accent);
  font-size: 20px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
}
.pill-btn:disabled { cursor: default; opacity: 0.45; }
.pill-btn--request { min-inline-size: 300px; background: var(--accent); }
.pill-btn--finish { min-inline-size: 300px; background: var(--danger); }
.pill-btn--go { padding-inline: 28px; background: var(--go-strong); }
.pill-btn--requested { padding-inline: 24px; background: var(--own-row); color: var(--text); border: 2px solid var(--accent-light); font-size: 18px; cursor: default; }
.pill-btn--requested svg { color: var(--accent-text); }
.pill-btn--mute { padding-inline: 22px; background: var(--raised); color: var(--text); border: 1px solid var(--border-strong); font-size: 17px; }
.pill-btn--muted { padding-inline: 22px; background: var(--warning-tint); border: 2px solid var(--warning-ink); color: var(--warning-ink); font-size: 17px; }
.pill-btn--secondary { padding-inline: 22px; background: var(--raised); color: var(--text); border: 1px solid var(--border-strong); font-size: 17px; }
.tool-btn {
  flex: none;
  block-size: 56px;
  min-inline-size: 52px;
  padding-inline: 16px;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--raised);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}
.tool-btn:disabled { cursor: default; opacity: 0.45; }
.tool-btn--settings[aria-expanded="true"] { background: var(--accent-tint); }
.tool-btn--share[aria-pressed="true"] { background: var(--accent-tint); }
.tool-btn--share .tool-btn__label { max-inline-size: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-btn--camera .tool-btn__label { max-inline-size: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The Settings panel (handoff 22): theme, languages, voice. */
.settings-sheet {
  position: absolute;
  z-index: 20;
  inset-block-end: 104px;
  inset-inline-end: 140px;
  inline-size: min(640px, calc(100% - 32px));   /* wide enough for 6 language columns (handoff 33) */
  max-block-size: calc(100% - 120px);   /* may cover the header while open */
  overflow-y: auto;
  padding: 20px;
  border-radius: 12px;
  background: var(--raised);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-pop);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.settings-sheet__title { font-size: 13px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-secondary); }
[dir="rtl"] .settings-sheet__title { letter-spacing: 0; }
.settings-sheet__section { display: flex; flex-direction: column; gap: 10px; }
.settings-sheet__section + .settings-sheet__section { padding-block-start: 14px; border-block-start: 1px solid var(--divider); }
.settings-sheet__label { margin: 0; font-size: 15px; font-weight: 600; color: var(--text); }
.settings-sheet__hint { font-size: 14px; line-height: 1.4; color: var(--text-secondary); }
.settings-sheet__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.settings-sheet__grid--four { grid-template-columns: repeat(4, 1fr); }   /* text sizes, caption animations */
.settings-sheet__grid--six { grid-template-columns: repeat(6, 1fr); }    /* 11 meeting languages in 2 rows */
.settings-sheet__note { font-size: 14px; line-height: 1.4; color: var(--warning-ink); }
.settings-opt {
  min-block-size: var(--touch);
  padding-inline: 8px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
.settings-opt[aria-pressed="true"] { border: 2px solid var(--accent-light); background: var(--own-row); font-weight: 600; }
.settings-opt:disabled { cursor: default; opacity: 0.45; }
.tool-btn--leave { padding-inline: 22px; background: var(--danger); color: var(--on-accent); }
.tool-btn--leave-quiet { padding-inline: 22px; background: var(--raised); border: 1px solid var(--danger); }

.btn--danger { background: var(--danger, var(--error)); color: #FFFFFF; }

@media (max-width: 1150px) {
  .side { inline-size: 320px; }
  .live-main { padding-inline: 24px; }
  .live-bar { display: flex; justify-content: space-between; gap: 12px; padding-inline: 16px; }
  .volume input { inline-size: 110px; }
  .pill-btn { font-size: 18px; padding-inline: 22px; }
  .pill-btn--request, .pill-btn--finish { min-inline-size: 220px; }
  .pill-btn--secondary, .pill-btn--mute, .pill-btn--muted { font-size: 16px; padding-inline: 16px; }
  .tool-btn__label { display: none; }
  .tool-btn--leave, .tool-btn--leave-quiet { padding-inline: 16px; }
  .speaker__name { font-size: 22px; }
  .turn-card__title { font-size: 34px; }
}
@media (max-height: 800px) {
  .live-main { padding-block: 20px 16px; gap: 16px; }
  /* Theme, Text size, Languages and Voice each in their own section (handoff 31): tighter spacing fits 1024x768. */
  .settings-sheet { padding: 16px; gap: 6px; }
  .settings-sheet__section + .settings-sheet__section { padding-block-start: 8px; }
  .settings-sheet__section { gap: 8px; }   /* with Caption animation (handoff 33) */
  .caption-panel { padding-block: 20px; }
}