/* Averato Conference: readable from a phone held at arm's length, or a
   projector at the back of a hall. Averato's colours; light, dark and high
   contrast. No framework: tokens, then shared parts, then each page's. */
@import url('fonts.css?v=8a588167d0');

:root {
  --bg: #f4f6fb; --surface: #ffffff; --surface-2: #eef1f8; --text: #13213f; --muted: #66738f; --line: #e2e7f0;
  --accent: #5b5ef0; --accent-ink: #ffffff; --accent-soft: #e9e9fe; --teal: #1fb5b5;
  --live: #e5484d; --live-soft: #fde8e8; --ok: #12a150; --ok-soft: #e3f6ea; --warn: #c27a0a; --warn-soft: #fff3dc;
  --grad: linear-gradient(120deg, #33c4c4, #6c6ff0);
  --shadow: 0 1px 2px rgba(19, 33, 63, .06), 0 8px 24px rgba(19, 33, 63, .08);
  --radius: 18px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="contrast"]) {
    --bg: #0a1224; --surface: #111b33; --surface-2: #18243f; --text: #eef2fa; --muted: #93a0bd; --line: #24345a;
    --accent: #8f92ff; --accent-ink: #0a1224; --accent-soft: #23295a; --live-soft: #3a1820; --ok-soft: #0f2e22; --warn-soft: #33270f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1224; --surface: #111b33; --surface-2: #18243f; --text: #eef2fa; --muted: #93a0bd; --line: #24345a;
  --accent: #8f92ff; --accent-ink: #0a1224; --accent-soft: #23295a; --live-soft: #3a1820; --ok-soft: #0f2e22; --warn-soft: #33270f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35); color-scheme: dark;
}
:root[data-theme="contrast"] {
  --bg: #000; --surface: #000; --surface-2: #111; --text: #fff; --muted: #ffd84d; --line: #fff; --accent: #ffd84d;
  --accent-ink: #000; --accent-soft: #332b00; --teal: #7cf; --live: #ff6b6b; --live-soft: #300; --ok-soft: #032; --warn-soft: #320;
  --grad: linear-gradient(120deg, #ffd84d, #ffd84d); --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
             -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body { min-height: 100dvh; display: flex; flex-direction: column; }
button, input, select { font-family: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }

/* ---- Shared parts --------------------------------------------------------- */
.brandmark { font: 800 13px var(--font); letter-spacing: .08em; text-transform: uppercase;
             background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.note { color: var(--muted); font-size: 14px; line-height: 1.45; }
.error { color: var(--live); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 16px var(--font);
       padding: 12px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
       cursor: pointer; text-decoration: none; transition: transform .08s, background .15s, box-shadow .15s; user-select: none; -webkit-user-select: none; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.grad { background: var(--grad); color: #fff; border: 0; box-shadow: 0 6px 18px rgba(91, 94, 240, .35); }
.btn.danger { color: var(--live); border-color: currentColor; background: transparent; }
.btn.big { font-size: 19px; padding: 16px 22px; border-radius: 16px; width: 100%; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line);
            background: var(--surface); color: var(--text); cursor: pointer; font: 700 15px var(--font); padding: 0; }
.icon-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line);
        background: var(--surface); color: var(--text); font: 600 15px var(--font); cursor: pointer; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 700 12px var(--font); letter-spacing: .03em;
        padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.pill.live { background: var(--live-soft); color: var(--live); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.dot.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.field small { font-weight: 500; color: var(--muted); }
input, select, textarea { font: 16px var(--font); padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
                          background: var(--surface); color: var(--text); width: 100%; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line);
                position: relative; cursor: pointer; padding: 0; border: 0; flex: none; transition: background .15s; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
                       background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--text); font: 600 14px var(--font); padding: 9px 6px; border-radius: 9px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow); }
input[type="range"] { padding: 0; accent-color: var(--accent); }

/* Bottom sheet (a <dialog>). */
dialog.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 90dvh; background: var(--surface);
               color: var(--text); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); }
dialog.sheet::backdrop { background: rgba(10, 18, 36, .45); backdrop-filter: blur(2px); }
dialog.sheet[open] { animation: rise .22s ease-out; }
@media (min-width: 700px) { dialog.sheet { margin: auto; border-radius: 22px; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-in { padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); display: grid; gap: 16px; }
.sheet-in::before { content: ''; justify-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h2 { margin: 0; font-size: 20px; }

/* Speaker badge: initials on a colour from the name. */
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
          font: 800 13px var(--font); color: #fff; background: hsl(var(--h, 240) 62% 52%); }
.avatar.q { background: var(--teal); }

/* Level meter. */
.meter { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.meter > div { height: 100%; width: 0; background: var(--grad); border-radius: 6px; transition: width 80ms linear; }

/* ---- Participant: choosing a language ------------------------------------ */
.pick { flex: 1; display: flex; flex-direction: column; gap: 22px; padding: calc(28px + env(safe-area-inset-top)) 20px 28px;
        max-width: 760px; width: 100%; margin: 0 auto; }
.pick h1 { font-size: clamp(26px, 6vw, 38px); line-height: 1.15; margin: 6px 0 0; letter-spacing: -.01em; }
.pick .prompt { font-size: 18px; color: var(--muted); min-height: 1.4em; transition: opacity .3s; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { display: grid; gap: 2px; text-align: left; padding: 18px 18px 16px; border-radius: var(--radius); border: 1px solid var(--line);
        background: var(--surface); color: var(--text); cursor: pointer; box-shadow: var(--shadow); transition: transform .08s, border-color .15s; }
.tile:active { transform: scale(.98); }
.tile b { font-size: 21px; }
.tile span { font-size: 13px; color: var(--muted); }
.tile[aria-pressed="true"] { border: 2px solid var(--accent); }
.pick .foot { margin-top: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }

/* ---- Participant: reading -------------------------------------------------- */
.read { flex: none; display: flex; flex-direction: column; min-height: 0; height: 100dvh; }   /* exactly the screen: the feed scrolls */
.bar { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
       background: var(--surface); border-bottom: 1px solid var(--line); }
.bar .what { flex: 1; min-width: 0; }
.bar .what h1 { margin: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .what .sub { display: flex; gap: 8px; align-items: center; margin-top: 3px; font-size: 12px; color: var(--muted); }
.banner { text-align: center; font: 600 13px var(--font); padding: 6px; background: var(--warn-soft); color: var(--warn); }
.feed { flex: 1; min-height: 0; overflow-y: auto;   /* min-height: scroll inside, never grow past the screen */
         padding: 18px 16px 150px; display: flex; flex-direction: column; gap: 22px;
        max-width: 860px; width: 100%; margin: 0 auto; overscroll-behavior: contain; }
.block { display: grid; grid-template-columns: 34px 1fr; gap: 4px 12px; }
.block .avatar { grid-row: 1; }
.block .who { grid-column: 2; font: 700 13px var(--font); color: var(--muted); display: flex; gap: 8px; align-items: center; min-height: 34px; }
.block .lines { grid-column: 2; display: grid; gap: 10px; }
.line { font-size: calc(clamp(19px, 4.6vw, 30px) * var(--scale, 1)); line-height: 1.38; color: var(--muted); transition: color .3s; }
.line.now { color: var(--text); font-weight: 500; }
.line .o { display: block; font-size: .56em; color: var(--muted); margin-top: 3px; font-weight: 400; }
.line.pending .t { color: var(--muted); }
.line.pending .t::after { content: ' ⋯'; animation: pulse 1.2s infinite; }
.line .fail { font-size: .5em; color: var(--warn); }
.empty { margin: auto; text-align: center; display: grid; justify-items: center; gap: 12px; padding: 30px 10px; max-width: 360px; }
.empty .halo { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--grad);
               animation: halo 2.2s infinite; }
.empty .halo svg { width: 36px; height: 36px; }
.empty h2 { margin: 6px 0 0; font-size: 21px; }
@keyframes halo { 0% { box-shadow: 0 0 0 0 rgba(91, 94, 240, .45); } 100% { box-shadow: 0 0 0 26px rgba(91, 94, 240, 0); } }
.typing { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom)); width: min(820px, calc(100% - 32px));
          display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 16px;
          background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 15px; color: var(--muted); }
.typing .txt { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dots { display: inline-flex; gap: 3px; flex: none; } .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
.jump { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(160px + env(safe-area-inset-bottom)); box-shadow: var(--shadow); }
.fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); height: 56px; padding: 0 22px; border-radius: 18px; font-size: 17px; }
.talk { width: 128px; height: 128px; border-radius: 50%; border: 0; justify-self: center; display: grid; place-items: center;
        background: var(--grad); color: #fff; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none;
        box-shadow: 0 10px 30px rgba(91, 94, 240, .4); transition: transform .1s; }
.talk svg { width: 44px; height: 44px; }
.talk.on { background: var(--live); transform: scale(1.06); animation: halo-red 1.4s infinite; }
@keyframes halo-red { 0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .5); } 100% { box-shadow: 0 0 0 28px rgba(229, 72, 77, 0); } }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.or:empty { gap: 0; }
.chip .short { display: none; }
@media (max-width: 440px) { .chip .long { display: none; } .chip .short { display: inline; } .chip { padding: 0 12px; } }
.row { display: flex; gap: 8px; align-items: center; }
.center { text-align: center; }
.ended-screen { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.ended-screen .card { max-width: 420px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.ended-screen h2 { margin: 0; }

/* ---- Speaker ------------------------------------------------------------- */
.stage { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 16px 28px; display: grid; gap: 16px; align-content: start; }
.stage-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stage-head h1 { margin: 2px 0 0; font-size: clamp(20px, 4vw, 28px); }
.setup { display: grid; gap: 16px; max-width: 560px; width: 100%; justify-self: center; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices button { font: 600 15px var(--font); padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.choices button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.onair { display: grid; gap: 16px; }
.onair-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.onair-bar .state { display: inline-flex; align-items: center; gap: 10px; font: 800 18px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--live); }
.onair-bar .state .dot { width: 14px; height: 14px; }
.onair-bar .state.paused { color: var(--warn); }
.onair-bar .clock { font: 700 18px var(--font); font-variant-numeric: tabular-nums; color: var(--muted); }
.onair-bar .spacer { flex: 1; }
.meter.big { height: 18px; border-radius: 10px; }
.hint { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.panels { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .panels { grid-template-columns: 1fr 1fr; } }
.panel { display: grid; gap: 10px; align-content: start; }
.panel h2 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.panel .list { display: grid; gap: 8px; max-height: 46dvh; overflow-y: auto; }
.said { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 17px; line-height: 1.4; }
.said:first-child { background: var(--accent-soft); }
.qcard { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 4px; }
.qcard .who { font: 700 13px var(--font); color: var(--teal); }
.qcard .t { font-size: 18px; line-height: 1.4; }
.qcard.new { animation: rise .3s ease-out; border-color: var(--teal); }
.aud { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- Kept for the pages not yet redone (console, hall, start) ------------- */
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px;
         border-bottom: 1px solid var(--line); background: var(--surface); }
header h1 { font-size: 17px; margin: 0; font-weight: 700; }
header .brand { font-size: 12px; color: var(--muted); }
main { flex: 1; display: flex; flex-direction: column; padding: 12px 16px; gap: 10px; max-width: 980px; width: 100%; margin: 0 auto; }
.langs { display: flex; flex-wrap: wrap; gap: 8px; }
.langs button { font: 600 16px var(--font); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line);
                background: var(--surface); color: var(--text); cursor: pointer; }
.langs button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.primary { font: 700 16px var(--font); padding: 12px 18px; border-radius: 12px; border: 0; cursor: pointer;
                 background: var(--accent); color: var(--accent-ink); }
label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
