@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600;700;800;900&display=swap');

:root { --blue:#0098db; --orange:#ff6600; --ice:#eaf7fd; --off:#f7fbfe; --deep:#064a70; --graphite:#1c3040; --success:#16815d; --danger:#c73d42; --warning:#f5b400; }
* { box-sizing: border-box; }
html { font-family: 'Nunito Sans', system-ui, sans-serif; color: var(--graphite); background: var(--off); }
body { margin: 0; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.brand-logo { width: min(220px, 54vw); height: auto; display: block; }
.page-shell { min-height: 100vh; background: radial-gradient(circle at 12% 0%, #dff5ff 0, transparent 35%), var(--off); }
.topbar { min-height: 76px; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:14px clamp(20px,5vw,72px); background:white; border-bottom:1px solid #dcebf2; }
.topbar .brand-logo { width: 126px; }
.card { background:#fff; border:1px solid #dcebf2; border-radius:24px; box-shadow:0 18px 50px rgba(6,74,112,.08); }
.btn { border:0; border-radius:14px; padding:13px 20px; min-height:48px; font-weight:800; transition:transform .15s, box-shadow .15s, background .15s; display:inline-flex; align-items:center; justify-content:center; gap:8px; text-decoration:none; }
.btn:hover { transform:translateY(-1px); }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline:4px solid rgba(0,152,219,.24); outline-offset:2px; }
.btn-primary { color:#fff; background:var(--deep); box-shadow:0 8px 18px rgba(6,74,112,.2); }
.btn-blue { color:#fff; background:var(--blue); }
.btn-orange { color:var(--graphite); background:var(--orange); }
.btn-soft { color:var(--deep); background:var(--ice); }
.btn-danger { color:#fff; background:var(--danger); }
.field { width:100%; border:2px solid #d4e6ef; background:#fff; border-radius:14px; padding:13px 15px; min-height:50px; color:var(--graphite); }
.field::placeholder { color:#728795; }
.label { display:block; font-weight:800; margin:0 0 7px; color:var(--deep); }
.eyebrow { color:var(--blue); font-weight:900; letter-spacing:.09em; text-transform:uppercase; font-size:.82rem; }
.muted { color:#617783; }
.notice { border-radius:14px; padding:12px 15px; font-weight:700; background:var(--ice); color:var(--deep); }
.notice.error { background:#fff0f1; color:var(--danger); }
.hidden { display:none !important; }
.shape { width:34px; height:34px; display:inline-block; background:currentColor; flex:0 0 auto; }
.shape.triangle { clip-path:polygon(50% 5%, 96% 92%, 4% 92%); }
.shape.diamond { transform:rotate(45deg) scale(.72); border-radius:3px; }
.shape.circle { border-radius:50%; }
.shape.square { border-radius:4px; }
.answer-red { background:#d93b45; } .answer-blue { background:#147bcc; } .answer-yellow { background:#f5b400; color:#1c3040; } .answer-green { background:#16815d; }
.shape-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.answer-tile { border:0; border-radius:18px; min-height:120px; padding:18px; color:white; font-weight:900; font-size:clamp(1rem,2vw,1.35rem); display:flex; align-items:center; gap:16px; box-shadow:inset 0 -6px rgba(0,0,0,.12); }
.answer-yellow .shape, .answer-yellow { color:#1c3040; }
.answer-tile .shape { color:white; }
.answer-yellow .shape { color:#1c3040; }
#host-options .answer-tile { padding:clamp(24px,3vw,48px); gap:clamp(20px,2vw,36px); font-size:clamp(1.5rem,2.6vw,2.75rem); line-height:1.12; }
#host-options .shape { width:clamp(52px,4vw,80px); height:clamp(52px,4vw,80px); }
#host-options .result-count { font-size:clamp(1.25rem,2vw,2rem); white-space:nowrap; }
#start { background:var(--orange); color:#fff; min-width:190px; box-shadow:0 10px 26px rgba(255,102,0,.35); }
#start:hover { background:#ff7a22; box-shadow:0 13px 30px rgba(255,102,0,.45); }

.host-theme-dark { background:var(--graphite) !important; color:#fff; }
.host-theme-dark main { background:radial-gradient(circle at 10% 0%, #0b608b 0, transparent 34%), linear-gradient(145deg, var(--graphite), #052f49); }
.host-theme-dark header > img { background:transparent; border-radius:0; padding:0; }
.host-theme-dark .card { background:#083d5c; border-color:#1473a3; box-shadow:0 18px 50px rgba(0,0,0,.28); }
.host-theme-dark #lobby > div:first-child { background:var(--deep) !important; }
.host-theme-dark #pin { color:#fff !important; }
.host-theme-dark .eyebrow { color:#38c1ff; }
.host-theme-dark .muted { color:#c8e7f5; }
.host-theme-dark .btn-soft { background:#0b6d9d; color:#fff; }
.host-theme-dark #player-list span { background:var(--blue) !important; color:#fff !important; }
.host-theme-dark #ranking li { color:#fff; border:1px solid rgba(255,255,255,.2); }
.host-theme-dark #ranking .ranking-position-1 { background:var(--orange) !important; }
.host-theme-dark #ranking .ranking-position-2 { background:#147bcc !important; }
.host-theme-dark #ranking .ranking-position-3 { background:var(--success) !important; }
.host-theme-dark #ranking .ranking-position-4 { background:var(--warning) !important; color:var(--graphite); }
.host-theme-dark #ranking .ranking-position-5 { background:#d93b45 !important; }
.host-theme-dark #ranking li > span:first-child { background:rgba(6,74,112,.72) !important; color:#fff; }
@media (max-width:640px) { .shape-grid { gap:10px; } .answer-tile { min-height:145px; flex-direction:column; justify-content:center; padding:12px; } }
