@font-face { font-family: 'Baloo 2'; src: url(/fonts/baloo2.woff2) format('woff2'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: Nunito; src: url(/fonts/nunito.woff2) format('woff2'); font-weight: 200 1000; font-display: swap; }
:root { --navy: #1B2559; --navy2: #24306E; --sky: #EAF4FF; --blue: #1D4ED8; --yellow: #FFD166; --yellow-sh: #E0A82E; --orange: #C2410C; --green: #15803D; --purple: #7E22CE; --muted: #475489; --line: #C9DCF5; }
* { box-sizing: border-box; }
body { margin: 0; font-family: Nunito, sans-serif; font-weight: 700; color: var(--navy); background: var(--sky); }
.h { font-family: 'Baloo 2', sans-serif; font-weight: 800; line-height: 1.05; }
.card { background: #fff; border-radius: 32px; box-shadow: 0 8px 0 var(--line); }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--sky); border-radius: 999px; padding: 6px 18px; font-weight: 800; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 22px; border-radius: 16px; border: none; cursor: pointer;
  font: 800 20px 'Baloo 2', sans-serif; color: var(--navy); background: #fff; box-shadow: 0 5px 0 var(--line); text-decoration: none; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.btn.yellow { background: var(--yellow); box-shadow: 0 5px 0 var(--yellow-sh); }
.btn.danger { color: #B91C1C; }
.btn.sm { height: 42px; font-size: 17px; padding: 0 16px; }
.tile { border-radius: 24px; background: var(--bg); box-shadow: 0 7px 0 var(--sh); color: #fff; font-family: 'Baloo 2'; font-weight: 800; display: flex; align-items: center; gap: 16px; padding: 0 28px; transition: opacity .3s; }
.tile.dim { opacity: .3; }
.tile.right { outline: 8px solid var(--yellow); outline-offset: 4px; }

/* ---- dashboard: a 1920x1080 stage scaled to the TV/projector ---- */
body.dash { background: var(--navy); overflow: hidden; height: 100vh; }
#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; background: var(--sky); overflow: hidden; }
.d-head { height: 120px; background: var(--navy); color: #fff; display: flex; align-items: center; gap: 24px; padding: 0 48px; font-size: 30px; }
.d-head .logo { font-size: 48px; flex: 1; }
.d-head .pill { color: var(--navy); font-size: 30px; }
.d-head .pinpill { background: var(--yellow); }
.d-main { position: absolute; top: 120px; left: 0; right: 0; bottom: 0; padding: 40px 48px; display: flex; gap: 40px; }
.d-q { flex: 1; padding: 36px 44px; display: flex; flex-direction: column; gap: 26px; }
.d-qtop { display: flex; justify-content: space-between; font-size: 30px; color: var(--muted); }
.d-qtext { display: flex; align-items: center; gap: 28px; font-size: 64px; min-height: 200px; }
.d-qtext .qemoji { font-size: 120px; }
.bar { height: 22px; border-radius: 999px; background: var(--sky); overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: var(--green); border-radius: 999px; }
.d-tiles { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.d-tiles .tile { font-size: 52px; }
.d-tiles .ico { font-size: 44px; }
.d-tiles .cnt { margin-left: auto; background: rgba(255, 255, 255, .25); border-radius: 999px; padding: 0 22px; font-size: 40px; }
.d-board { width: 680px; padding: 30px 34px; display: flex; flex-direction: column; gap: 14px; }
.d-board > .h { font-size: 48px; }
.d-board.wide { flex: 1; }
.d-board ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.d-board li { display: flex; align-items: center; gap: 16px; height: 62px; padding: 0 16px; border-radius: 18px; background: var(--sky); font-size: 30px; transition: background .3s; }
.d-board li.first { background: var(--yellow); font-size: 34px; }
.d-board li.quit { opacity: .45; }
.d-lang { position: absolute; inset-inline-end: 24px; top: 24px; }
.d-head .d-lang { position: static; }
.d-list { position: relative; }
.d-board .rk { width: 52px; text-align: center; font-family: 'Baloo 2'; font-size: 34px; }
.d-board .bn { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-board .bt { color: var(--muted); font-size: 22px; }
.d-board .plus { color: var(--green); font-size: 24px; }
.d-board .bs { font-family: 'Baloo 2'; font-weight: 800; font-size: 36px; min-width: 90px; text-align: right; }
.name-img { height: 44px; max-width: 300px; object-fit: contain; vertical-align: middle; }
.d-lobby { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; text-align: center; }
.d-lobby .sub { font-size: 44px; color: var(--muted); }
.giant { font-size: 260px; letter-spacing: 30px; background: #fff; border-radius: 48px; padding: 10px 70px 0; box-shadow: 0 12px 0 var(--line); }
.d-joined { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; max-width: 1600px; font-size: 30px; }
.d-joined .pill { background: #fff; font-size: 30px; padding: 10px 22px; }
.d-joined small { color: var(--muted); font-size: 20px; }
.podium { width: 820px; display: flex; align-items: flex-end; justify-content: center; gap: 24px; }
.podium > div { width: 250px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; font-size: 34px; }
.podium .medal { font-size: 110px; line-height: 1; }
.podium .step { width: 100%; border-radius: 28px 28px 0 0; background: var(--navy); color: #fff; font-family: 'Baloo 2'; font-size: 60px; display: grid; place-items: center; }
.d-list { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; text-align: center; }
.d-title { font-size: 90px; }
.d-list .sub { font-size: 36px; color: var(--muted); }
.d-rooms { display: flex; flex-wrap: wrap; gap: 30px; justify-content: center; max-width: 1700px; }
.d-room { width: 380px; padding: 30px; display: flex; flex-direction: column; gap: 10px; align-items: center; text-decoration: none; color: inherit; font-size: 26px; }
.d-room .temoji { font-size: 90px; }
.d-room .pin { font-family: 'Baloo 2'; font-size: 52px; letter-spacing: 6px; background: var(--yellow); border-radius: 16px; padding: 0 18px; }

/* ---- admin page ---- */
.adminpg main { max-width: 1100px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 24px; }
.adminpg header { display: flex; align-items: center; gap: 16px; }
.adminpg header .h { font-size: 36px; flex: 1; }
.adminpg section { padding: 24px 28px; }
.adminpg h2 { font-family: 'Baloo 2'; margin: 0 0 14px; }
.adminpg form { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.adminpg label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.adminpg input, .adminpg select { font: inherit; height: 48px; border: 3px solid var(--line); border-radius: 14px; padding: 0 12px; color: var(--navy); background: #fff; }
.room { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 0; border-bottom: 2px solid var(--sky); }
.room .pin { font-family: 'Baloo 2'; font-size: 34px; letter-spacing: 4px; background: var(--yellow); border-radius: 12px; padding: 0 14px; }
.room .grow { flex: 1; }
.msg { color: var(--green); min-height: 24px; margin: 12px 0 0; }
.msg.err { color: #B91C1C; }
.adminpg main { max-width: 1300px; }
.row-btns { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.editor { display: flex; gap: 24px; align-items: flex-start; }
.ed-topics { width: 380px; display: flex; flex-direction: column; gap: 8px; }
.ed-topic { display: flex; justify-content: space-between; gap: 8px; text-align: start; padding: 12px 16px; border: none; border-radius: 14px; background: var(--sky); font: inherit; color: inherit; cursor: pointer; }
.ed-topic.on { background: var(--yellow); }
.ed-topic small { color: var(--muted); }
.ed-main { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ed-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ed-row input:not([type=radio]):not(.emoji-in) { flex: 1; min-width: 120px; }
.ed-row input[type=radio] { width: 24px; height: 24px; accent-color: var(--green); }
.emoji-in { width: 70px; text-align: center; }
.dot { width: 40px; height: 40px; border-radius: 10px; color: #fff; display: grid; place-items: center; flex: none; }
.q-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 2px solid var(--sky); }
.q-item span { flex: 1; }
.q-item small { color: var(--green); margin-inline-start: 8px; }
.q-form { display: flex; flex-direction: column; gap: 10px; }
.comp { padding: 14px 0; border-bottom: 2px solid var(--sky); }
.comp-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.comp-head .grow { flex: 1; color: var(--muted); }
.comp-results { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.comp-results li { display: flex; gap: 10px; align-items: center; background: var(--sky); border-radius: 12px; padding: 6px 12px; }
.comp-results .grow { flex: 1; }
.comp-results small { color: var(--muted); }
.comp-results .name-img { height: 32px; }
@media (max-width: 900px) { .editor { flex-direction: column; } .ed-topics { width: 100%; } }
.adminpg fieldset.gifts { border: 3px solid var(--line); border-radius: 16px; padding: 8px 14px 12px; display: flex; gap: 12px; flex-wrap: wrap; }
.adminpg fieldset.gifts legend { color: var(--muted); padding: 0 6px; }
.pill.gift { background: var(--yellow); }
.kind-pill { font-size: 26px; }
.gifts-list { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; font-size: 30px; background: #FFF8E6; border-radius: 24px; padding: 12px 28px; }
.podium .gift { font-size: 24px; background: var(--yellow); border-radius: 999px; padding: 4px 14px; }
.login { max-width: 460px; margin: 15vh auto; padding: 36px; display: flex; flex-direction: column; gap: 16px; text-align: center; }
