/* Vaern palette: Primary sage, Paper, Ink, Signal, Deep. One accent (Signal) per screen at most. */
:root {
  --sage: #B8CEC8; --paper: #F9F7EA; --ink: #373924; --signal: #E6653E; --deep: #044545;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: var(--font); color: var(--ink); background: var(--sage); }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { color: var(--deep); margin: 0 0 .4em; line-height: 1.15; }
.kicker { color: var(--signal); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .8em; margin-bottom: .5em; }
.muted { opacity: .75; }
.hidden { display: none !important; }

/* Round portraits everywhere */
.face { border-radius: 50%; object-fit: cover; border: 3px solid var(--deep); background: var(--paper); flex: none; }
.dark .face { border-color: var(--sage); }
.face.thomas { object-position: 50% 43%; }

/* Footer bar (every screen) */
.footer { position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 1em; background: var(--deep); color: var(--paper); padding: .35em 1em; font-size: 14px; }
.footer .brand b { font-size: 1.2em; }
.footer .brand span { opacity: .85; margin-left: .6em; font-size: .85em; }
.footer .privacy { flex: 1; font-size: .78em; opacity: .85; }
.footer .url { color: var(--sage); }
.footer img { width: 42px; height: 42px; background: #fff; padding: 2px; border-radius: 3px; }

/* ---------- Projector (/screen) ---------- */
.screen { position: fixed; inset: 0 0 56px 0; padding: 4vh 5vw; display: flex; gap: 4vw; font-size: 2.1vw; }
.screen.dark { background: var(--deep); color: var(--paper); }
.screen.dark h1, .screen.dark h2 { color: var(--paper); }
.screen .main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.screen .side { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .6em; padding-top: 2vh; }
.screen h1 { font-size: 3.4vw; }
.screen h1.big { font-size: 5vw; }
.screen .sub { font-size: 1.5em; color: var(--deep); }
.screen ul, .screen ol { margin: .4em 0 0; padding-left: 1.2em; }
.screen li { margin: .35em 0; }
.qrbox { background: #fff; padding: .6vw; border-radius: .5vw; }
.qrbox img { display: block; width: 18vw; height: 18vw; }
.qrcap { font-weight: 700; color: var(--deep); text-align: center; font-size: .7em; max-width: 19vw; overflow-wrap: anywhere; }
.dark .qrcap { color: var(--paper); }
.speaker-name { font-weight: 700; text-align: center; font-size: .8em; }

.cards { display: grid; gap: 1vw; margin-top: 1.5vh; }
.card { background: var(--paper); border: 2px solid var(--deep); padding: 1vw 1.2vw; border-radius: .4vw; display: flex; flex-direction: column; }
.card b { color: var(--deep); display: block; margin-bottom: .3em; }
.card .t { font-size: .82em; flex: 1; }
.card .faces { display: flex; gap: .4vw; margin-top: .6vw; }
.card .faces .face { width: 3vw; height: 3vw; border-width: 2px; }

.quotes-label { font-weight: 700; color: var(--deep); margin-top: 2vh; }
.dark .quotes-label { color: var(--sage); }
.quotes { display: grid; gap: 1.2vh 2vw; margin-top: 1vh; }
.quote { display: flex; align-items: center; gap: 1vw; }
.quote .face { width: 5vw; height: 5vw; }
.quote .who { color: var(--signal); font-weight: 700; font-size: .7em; }
.dark .quote .who { color: var(--sage); }
.quote .q { font-style: italic; font-size: .85em; }

.votebtns { display: flex; gap: 2vw; margin-top: 3vh; }
.votebtns div { padding: 1.2vw 3vw; border-radius: .8vw; color: var(--paper); font-weight: 800; font-size: 1.6em; }
.yes { background: var(--deep); } .no { background: var(--signal); }
.counter { margin-top: 2vh; font-size: 1.1em; }

.bars { margin: 1.5vh 0; }
.bar { display: flex; height: 4vh; border-radius: .4vw; overflow: hidden; background: var(--paper); }
.bar div { transition: width .8s ease; display: flex; align-items: center; padding: 0 .8vw; color: var(--paper); font-weight: 700; font-size: .8em; white-space: nowrap; }
.bar .y { background: var(--deep); } .bar .n { background: var(--signal); justify-content: flex-end; }
.bar-legend { display: flex; justify-content: space-between; font-size: .75em; margin-top: .4vh; }

.stars { display: flex; gap: 1.5vw; margin-top: 3vh; }
.stars div { width: 7vw; height: 7vw; border-radius: 50%; background: var(--paper); border: 3px solid var(--deep); display: flex; align-items: center; justify-content: center; font-size: 2em; font-weight: 800; color: var(--deep); position: relative; }
.stars div small { position: absolute; bottom: -1.6em; font-size: .35em; color: var(--ink); }
.avg { margin-top: 5vh; font-size: 1.2em; }

.answer { background: var(--paper); border: 2px solid var(--deep); border-radius: .5vw; padding: 1.5vw; margin-top: 2vh; font-size: .95em; min-height: 10vh; }
.answer .qtext { font-weight: 700; color: var(--deep); margin-bottom: .6em; }
.answer .atext { white-space: pre-wrap; }

.team-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1vw; margin-top: 1vh; }
.tcard { background: var(--paper); border: 2px solid var(--deep); border-radius: .4vw; padding: .8vw; font-size: .6em; display: flex; flex-direction: column; gap: .3em; }
.tcard.human { background: var(--deep); color: var(--paper); }
.tcard.human .name, .tcard.human .role { color: var(--paper); }
.tcard .top { display: flex; align-items: center; gap: .6vw; }
.tcard .face { width: 4.6vw; height: 4.6vw; }
.tcard .name { font-weight: 800; color: var(--deep); font-size: 1.15em; }
.tcard .role { font-weight: 700; }
.tcard .model { color: var(--signal); }
.tcard.human .model { color: var(--sage); }
.tcard .line { font-style: italic; }

.stopped { position: fixed; inset: 0 0 56px 0; background: var(--sage); display: flex; align-items: center; justify-content: center; font-size: 3vw; color: var(--deep); font-weight: 700; }

/* ---------- Phone (/) ---------- */
.phone { max-width: 520px; margin: 0 auto; padding: 18px 18px 90px; min-height: 100%; font-size: 18px; }
.phone .panel { background: var(--paper); border-radius: 14px; padding: 20px; margin-top: 14px; box-shadow: 0 1px 0 rgba(0,0,0,.05); }
.phone h1 { font-size: 26px; }
.phone .big-btns { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.phone .big-btns button { padding: 22px; border: 0; border-radius: 14px; color: var(--paper); font-size: 24px; font-weight: 800; }
.phone .big-btns button:disabled { opacity: .4; }
.phone .chosen { outline: 5px solid var(--signal); }
.phone .rate { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; }
.phone .rate button { width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--deep); background: var(--paper); color: var(--deep); font-size: 22px; font-weight: 800; }
.phone .rate button.on { background: var(--deep); color: var(--paper); }
.phone textarea { width: 100%; min-height: 96px; font: inherit; padding: 10px; border-radius: 10px; border: 2px solid var(--deep); background: #fff; }
.phone .send { margin-top: 10px; width: 100%; padding: 14px; border: 0; border-radius: 12px; background: var(--deep); color: var(--paper); font-weight: 700; font-size: 18px; }
.phone .note { font-size: 13px; opacity: .8; margin-top: 8px; }
.phone .watch { text-align: center; font-size: 22px; padding: 40px 10px; }
.phone .watch .eyes { font-size: 54px; }
.phone .quote { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.phone .quote .face { width: 40px; height: 40px; border-width: 2px; }
.phone .quote .who { font-size: 12px; } .phone .quote .q { font-size: 15px; }
.phone .bar { height: 34px; border-radius: 8px; }
.phone .bar div { font-size: 14px; padding: 0 8px; }
.phone-footer { font-size: 12px; }
.phone-footer img { display: none; }
.conn { position: fixed; top: 6px; right: 10px; font-size: 12px; opacity: .7; }

/* ---------- Team page (/team) ---------- */
.teampage { max-width: 1100px; margin: 0 auto; padding: 24px 18px 90px; }
.teampage .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 16px; }
.teampage .tcard { font-size: 15px; padding: 14px; border-radius: 10px; cursor: pointer; }
.teampage .tcard .face { width: 72px; height: 72px; }
.teampage .tcard .more { display: none; border-top: 1px solid var(--sage); margin-top: 8px; padding-top: 8px; font-size: 14px; }
.teampage .tcard.open .more { display: block; }
.teampage .tcard .more b { color: var(--deep); }
.teampage .tcard.human .more b { color: var(--sage); }

/* ---------- Presenter (/present) ---------- */
.present { padding: 14px; max-width: 1400px; margin: 0 auto 80px; font-size: 15px; }
.present .row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.present .col { flex: 1; min-width: 320px; }
.present .box { background: var(--paper); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.present .nav button, .present .act button { padding: 12px 18px; margin: 4px 4px 4px 0; border-radius: 8px; border: 2px solid var(--deep); background: #fff; color: var(--deep); font-weight: 700; }
.present .nav button.primary { background: var(--deep); color: var(--paper); font-size: 20px; padding: 14px 30px; }
.present .act button.stop { background: var(--signal); border-color: var(--signal); color: #fff; }
.present .notes { white-space: pre-wrap; font-size: 17px; line-height: 1.4; }
.present .cur { font-size: 20px; font-weight: 800; color: var(--deep); }
.present select { font: inherit; padding: 6px; max-width: 100%; }
.present .q { border-bottom: 1px solid var(--sage); padding: 8px 0; display: flex; gap: 8px; align-items: flex-start; }
.present .q span { flex: 1; }
.present .q button { padding: 4px 10px; border-radius: 6px; border: 1px solid var(--deep); background: #fff; }
.present textarea { width: 100%; min-height: 110px; font: inherit; padding: 8px; }
.present .stat { font-size: 18px; }
.present .preview { width: 100%; aspect-ratio: 16/9; border: 2px solid var(--deep); border-radius: 6px; background: var(--sage); }
.login { max-width: 360px; margin: 12vh auto; background: var(--paper); padding: 24px; border-radius: 12px; }
.login input { width: 100%; padding: 10px; margin: 6px 0 12px; font: inherit; border: 2px solid var(--deep); border-radius: 8px; }
.login button { width: 100%; padding: 12px; background: var(--deep); color: var(--paper); border: 0; border-radius: 8px; font-weight: 700; }
.err { color: var(--signal); font-weight: 700; min-height: 1.2em; }
