@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800;900&display=swap');
:root {
  --bg: #0d1714; --bg2: #13221d; --panel: #182b24; --line: #2a4238;
  --text: #f4efe6; --muted: #a9b8b0; --gold: #f2b544; --leaf: #5fbf8a; --bad: #ef6b5b;
  --c0: #ef6b5b; --c1: #f2b544; --c2: #3fb8a6; --c3: #9a7ff0; --c4: #e86fb0; --c5: #6fa8e8;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif; }
body { min-height: 100vh; background: radial-gradient(1200px 600px at 10% -10%, #1d3a2e 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #1b3328 0%, transparent 55%), var(--bg); }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.15; }
a { color: var(--gold); }
.muted { color: var(--muted); } .small { font-size: .85em; }
.logo { display: inline-flex; align-items: center; gap: .35em; vertical-align: middle; }
.logo img { height: 1.6em; width: auto; }
.logo img + .wordmark { display: none; }
.wordmark { font-weight: 900; letter-spacing: .08em; color: var(--gold); }
.btn { text-decoration: none; display: inline-block; text-align: center; appearance: none; border: 0; border-radius: 12px; background: var(--gold); color: #1b1408; font: inherit; font-weight: 800; padding: .7em 1.1em; cursor: pointer; font-size: 1rem; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.ghost { background: transparent; color: var(--text); border: 2px solid var(--line); }
.btn.green { background: var(--leaf); color: #06140d; }
.btn.red { background: var(--bad); color: #fff; }
.btn.big { font-size: 1.25rem; padding: .9em 1.3em; width: 100%; }
.btn.small { font-size: .85rem; padding: .45em .7em; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg2); border: 2px solid var(--line); border-radius: 10px; padding: .6em .7em; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
label { display: block; font-weight: 600; margin: .6em 0; }
label > input, label > select, label > textarea { margin-top: .3em; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1em; }
.row { display: flex; gap: .6em; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px); background: #000c; color: #fff; padding: .7em 1.1em; border-radius: 12px; transition: transform .25s; z-index: 99; max-width: 90vw; text-align: center; }
#toast.show { transform: translateX(-50%) translateY(0); }
.login { max-width: 420px; margin: 10vh auto; }
.pill { display: inline-block; padding: .2em .7em; border-radius: 99px; background: var(--bg2); border: 1px solid var(--line); font-size: .85em; font-weight: 600; }
.pill.gold { background: var(--gold); color: #1b1408; border-color: var(--gold); }

/* ---------- Player phone ---------- */
.phone { max-width: 520px; margin: 0 auto; padding: 16px 16px 40px; min-height: 100vh; display: flex; flex-direction: column; }
.phone header { display: flex; justify-content: space-between; align-items: center; padding: 4px 0 14px; font-size: 1.1rem; }
.phone .me { text-align: right; font-size: .9rem; color: var(--muted); }
.phone .me b { color: var(--text); }
.phone .center { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 14px; }
.phone .big-msg { font-size: 1.8rem; font-weight: 800; }
.phone .q-text { font-size: 1.25rem; font-weight: 600; text-align: left; margin-bottom: 4px; }
.choices { display: grid; gap: 12px; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 64px; border-radius: 14px; border: 0; padding: 12px 14px; font: inherit; font-size: 1.15rem; font-weight: 700; color: #111; text-align: left; cursor: pointer; }
.choice .let { width: 36px; height: 36px; border-radius: 10px; background: #0003; color: #fff; display: grid; place-items: center; flex: none; }
.choice.picked { outline: 4px solid #fff; }
.c0 { background: var(--c0); } .c1 { background: var(--c1); } .c2 { background: var(--c2); } .c3 { background: var(--c3); } .c4 { background: var(--c4); } .c5 { background: var(--c5); }
.timerbar { height: 10px; border-radius: 99px; background: var(--bg2); overflow: hidden; margin: 6px 0 14px; }
.timerbar > i { display: block; height: 100%; background: var(--gold); transition: width .25s linear; }
.order-list { display: grid; gap: 10px; }
.order-item { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 10px; font-weight: 700; text-align: left; }
.order-item .n { width: 32px; height: 32px; border-radius: 9px; background: var(--gold); color: #1b1408; display: grid; place-items: center; flex: none; }
.order-item .t { flex: 1; }
.order-item button { width: 44px; height: 44px; border-radius: 10px; border: 0; background: var(--bg2); color: var(--text); font-size: 1.2rem; }
.result-ok { color: var(--leaf); } .result-bad { color: var(--bad); }
.team-list { display: grid; gap: 8px; max-height: 40vh; overflow: auto; }
.team-btn { text-align: left; padding: 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; font-weight: 700; }
.team-btn.sel { border-color: var(--gold); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg button { padding: 12px 6px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; font-weight: 700; }
.seg button.sel { border-color: var(--gold); background: #f2b54422; }

/* ---------- TV ---------- */
.tv { width: 100vw; height: 100vh; overflow: hidden; display: flex; flex-direction: column; padding: 3vh 4vw; font-size: 2.2vh; }
.tv .top { display: flex; justify-content: space-between; align-items: center; font-size: 3vh; color: var(--muted); }
.tv .top .logo { font-size: 4vh; }
.tv .stage { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.tv h1.huge { font-size: 9vh; font-weight: 900; }
.tv .eyebrow { color: var(--gold); font-weight: 800; letter-spacing: .12em; font-size: 3vh; text-transform: uppercase; }
.tv .q { font-size: 6vh; font-weight: 800; line-height: 1.15; margin: 1.5vh 0 3vh; }
.tv .tv-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 2vh 2vw; }
.tv .tv-choice { border-radius: 2vh; padding: 2.2vh 2vw; font-size: 4.2vh; font-weight: 800; color: #111; display: flex; gap: 1.5vw; align-items: center; transition: opacity .3s, transform .3s; }
.tv .tv-choice .let { background: #0003; color: #fff; border-radius: 1.2vh; width: 6vh; height: 6vh; display: grid; place-items: center; flex: none; }
.tv .tv-choice .cnt { margin-left: auto; font-size: 3vh; background: #0003; color: #fff; padding: .3vh 1.2vw; border-radius: 99px; }
.tv .tv-choice.dim { opacity: .25; }
.tv .tv-choice.win { transform: scale(1.03); box-shadow: 0 0 0 .6vh #fff; }
.tv .split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3vw; align-items: center; min-height: 0; }
.tv .pic { width: 100%; max-height: 72vh; object-fit: contain; border-radius: 2vh; }
.tv .pic.full { max-height: 80vh; }
.tv .bar { height: 1.6vh; border-radius: 99px; background: var(--bg2); overflow: hidden; margin-top: 3vh; }
.tv .bar > i { display: block; height: 100%; background: var(--gold); transition: width .25s linear; }
.tv .foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 3vh; margin-top: 2vh; }
.tv .lobby { display: grid; grid-template-columns: auto 1fr; gap: 5vw; align-items: center; }
.tv .qr { background: #fff; padding: 2vh; border-radius: 3vh; width: 52vh; height: 52vh; }
.tv .qr svg { width: 100%; height: 100%; display: block; }
.tv .code { font-size: 12vh; font-weight: 900; letter-spacing: .15em; color: var(--gold); }
.tv .names { display: flex; flex-wrap: wrap; gap: 1vh 1vw; margin-top: 2vh; max-height: 26vh; overflow: hidden; }
.tv .names span { background: var(--panel); border: 1px solid var(--line); padding: .6vh 1.2vw; border-radius: 99px; font-size: 2.6vh; }
.tv .board { display: grid; gap: 1.2vh; }
.tv .board .r { display: grid; grid-template-columns: 7vh 1fr auto; align-items: center; gap: 2vw; background: var(--panel); border: 1px solid var(--line); border-radius: 1.6vh; padding: 1.3vh 2vw; font-size: 3.6vh; font-weight: 700; }
.tv .board .r .rk { color: var(--gold); font-weight: 900; }
.tv .board .r .mem { display: block; font-size: 2.2vh; color: var(--muted); font-weight: 400; }
.tv .board .r.top1 { border-color: var(--gold); }
.tv .podium { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 2vw; align-items: end; margin-top: 3vh; }
.tv .pod { background: var(--panel); border: 2px solid var(--line); border-radius: 2vh 2vh 0 0; text-align: center; padding: 3vh 1vw; }
.tv .pod .place { font-size: 8vh; font-weight: 900; color: var(--gold); }
.tv .pod .nm { font-size: 4.2vh; font-weight: 800; }
.tv .pod .prize { margin-top: 1.5vh; font-size: 3.4vh; color: var(--leaf); font-weight: 800; }
.tv .pod.p1 { min-height: 46vh; border-color: var(--gold); } .tv .pod.p2 { min-height: 36vh; } .tv .pod.p3 { min-height: 30vh; }
.tv .fact { margin-top: 3vh; font-size: 3.4vh; color: var(--muted); }
.tv .answer-big { font-size: 8vh; font-weight: 900; color: var(--leaf); }
.tv .count { font-size: 14vh; font-weight: 900; color: var(--gold); }
.tv .ordered { display: grid; gap: 1.4vh; }
.tv .ordered div { background: var(--panel); border-radius: 1.6vh; padding: 1.6vh 2vw; font-size: 4vh; font-weight: 800; }
.tv .ordered b { color: var(--gold); margin-right: 1.5vw; }
.tv .overlay { position: fixed; inset: 0; background: var(--bg); padding: 4vh 6vw; display: flex; flex-direction: column; z-index: 5; }

/* ---------- Host ---------- */
.host { max-width: 1100px; margin: 0 auto; padding: 16px; }
.host .topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.host .grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
@media (max-width: 860px) { .host .grid { grid-template-columns: 1fr; } }
.host .nextbtn { font-size: 1.6rem; padding: 1em; width: 100%; border-radius: 16px; }
.host .qbox .q { font-size: 1.3rem; font-weight: 700; margin: .3em 0; }
.host .ans { color: var(--leaf); font-weight: 800; font-size: 1.15rem; }
.host .notes { background: var(--bg2); border-radius: 10px; padding: .6em .8em; margin-top: .6em; }
.host .tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.host .plist { max-height: 70vh; overflow: auto; display: grid; gap: 6px; }
.host .prow { display: flex; gap: 6px; align-items: center; background: var(--bg2); border-radius: 10px; padding: 6px 8px; }
.host .prow .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host .accept-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.host .accept-row input { width: auto; }
.host .stat { font-size: 2rem; font-weight: 900; color: var(--gold); }
.host .games { display: grid; gap: 8px; }
.host .gamerow { display: flex; align-items: center; gap: 10px; background: var(--bg2); border-radius: 12px; padding: 10px 12px; }

/* ---------- Editor ---------- */
.editor { max-width: 1000px; margin: 0 auto; padding: 16px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.tabs button { border: 2px solid var(--line); background: var(--bg2); color: var(--text); border-radius: 10px; padding: .55em .9em; font: inherit; font-weight: 700; cursor: pointer; }
.tabs button.on { border-color: var(--gold); background: #f2b54422; }
.tabs button .badge { background: var(--bad); color: #fff; border-radius: 99px; padding: 0 .45em; margin-left: .35em; font-size: .8em; }
.qcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-bottom: 12px; }
.qcard.warn { border-color: var(--bad); }
.qcard .qhead { display: flex; gap: 8px; align-items: center; }
.qcard .qnum { font-weight: 900; color: var(--gold); width: 2.2em; }
.choice-edit { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; margin: 6px 0; }
.choice-edit input[type=radio] { width: 22px; height: 22px; accent-color: var(--leaf); }
.thumb { max-width: 220px; max-height: 160px; border-radius: 10px; display: block; margin: 6px 0; }
.problems { color: var(--bad); font-weight: 600; font-size: .9em; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .two { grid-template-columns: 1fr; } }

/* ---------- Survey ---------- */
.survey { max-width: 560px; margin: 0 auto; padding: 18px 16px 60px; }
.sq { margin: 18px 0; }
.sq .t { font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--bg2); font-weight: 600; cursor: pointer; }
.opt.sel { border-color: var(--gold); background: #f2b54422; }
.stars { display: flex; gap: 8px; }
.stars button { flex: 1; padding: 12px 0; border-radius: 12px; border: 2px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; font-size: 1.2rem; font-weight: 800; }
.stars button.sel { background: var(--gold); color: #1b1408; border-color: var(--gold); }
.barrow { display: grid; grid-template-columns: minmax(120px, 34%) 1fr 3.5em; gap: 8px; align-items: center; margin: 5px 0; font-size: .95rem; }
.barrow .b { background: var(--bg2); height: 18px; border-radius: 99px; overflow: hidden; }
.barrow .b i { display: block; height: 100%; background: var(--gold); }
.textans { background: var(--bg2); border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
.textans .when { color: var(--muted); font-size: .8em; }
@media print { body { background: #fff; color: #000; } }

/* ---------- Real or Fake ---------- */
.creal { background: #4cc38a; color: #062014; justify-content: center; }
.cfake { background: #ef6b5b; color: #2a0804; justify-content: center; }
.choices.rf { grid-template-columns: 1fr 1fr; }
.choices.rf .choice { min-height: 140px; font-size: 1.6rem; justify-content: center; text-align: center; }
.tv .tv-choice.creal, .tv .tv-choice.cfake { justify-content: center; font-size: 7vh; padding: 5vh 2vw; }

/* ---------- Themes (picked per game in the editor) ---------- */
html[data-theme="fall"] { --bg: #1c1210; --bg2: #2a1a15; --panel: #2e1d17; --line: #4a2f24; --text: #fbefe2; --muted: #d4b9a6; --gold: #f39a3d; --leaf: #9ccf6a; --c0: #e2643b; --c1: #f2b544; --c2: #b8862f; --c3: #b2533d; }
html[data-theme="fall"] body { background: radial-gradient(1200px 600px at 10% -10%, #4a2615 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #3b1d12 0%, transparent 55%), var(--bg); }
html[data-theme="holiday"] { --bg: #0e1a16; --bg2: #152620; --panel: #1a2e27; --line: #2d4a3f; --text: #fbf7f2; --muted: #b9c9c2; --gold: #e8c46a; --leaf: #6fd19a; --c0: #d9463d; --c1: #e8c46a; --c2: #3fae7c; --c3: #c9d6e3; }
html[data-theme="holiday"] body { background: radial-gradient(1000px 520px at 0% -10%, #5a1a1a 0%, transparent 55%), radial-gradient(900px 500px at 110% 110%, #134b33 0%, transparent 55%), var(--bg); }
html[data-theme="throwback"] { --bg: #120f24; --bg2: #1c1838; --panel: #221d44; --line: #3b3470; --text: #f5f2ff; --muted: #b6addb; --gold: #ff4fd8; --leaf: #3ff0c8; --c0: #ff4fd8; --c1: #ffe156; --c2: #3ff0c8; --c3: #6aa8ff; }
html[data-theme="throwback"] body { background: radial-gradient(1000px 520px at 0% -10%, #3a1a6a 0%, transparent 55%), radial-gradient(900px 500px at 110% 110%, #0f4a6a 0%, transparent 55%), var(--bg); }
html[data-theme="spooky"] { --bg: #120e16; --bg2: #1b1522; --panel: #211a2a; --line: #3a2e48; --text: #f6efe7; --muted: #bdb0c8; --gold: #ff7a1a; --leaf: #8be36a; --c0: #ff7a1a; --c1: #b77cff; --c2: #8be36a; --c3: #e8e0d0; }
html[data-theme="spooky"] body { background: radial-gradient(1000px 520px at 0% -10%, #3a1d4a 0%, transparent 55%), radial-gradient(900px 500px at 110% 110%, #3a1d0a 0%, transparent 55%), var(--bg); }
html[data-theme="throwback"] .wordmark, html[data-theme="throwback"] .eyebrow { text-shadow: 0 0 12px #ff4fd8aa; }
