﻿* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  --bg: #141119;
  --panel: #211b29;
  --stroke: #42354a;
  --text: #fff6e8;
  --muted: #c7b9cd;
  --gold: #ffcf72;
  --green: #9ce4bc;
}
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 1rem/1.5 system-ui, sans-serif; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, [tabindex="-1"]:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { width: min(1080px, calc(100% - 40px)); margin: auto; }
.top { border-bottom: 1px solid var(--stroke); }
.top-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; gap: 10px; align-items: center; background: none; border: 0; padding: 0; color: var(--text); text-align: left; font-size: .8rem; font-weight: 900; line-height: 1.15; letter-spacing: .08em; }
.brand-icon { display: grid; place-items: center; width: 36px; height: 36px; background: var(--gold); color: #271827; border-radius: 9px; }
.top-tag { color: var(--gold); font-size: 1rem; }
.hero { margin-top: 25px; position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; align-items: center; border-radius: 24px; border: 1px solid #584153; background: radial-gradient(ellipse at 85% 35%, #673349, transparent 65%), linear-gradient(125deg, #27192c, #372237); min-height: 376px; }
.hero-copy { padding: 37px 0 40px 44px; position: relative; z-index: 1; }
.eyebrow { margin: 0; color: var(--gold); font-size: .875rem; font-weight: 800; letter-spacing: .12em; }
h1, h2 { font-family: Georgia, serif; }
h1 { margin: 8px 0 15px; font-size: clamp(3.4rem, 7.4vw, 6.4rem); line-height: .92; letter-spacing: -.065em; }
h1 em { color: var(--gold); font-weight: inherit; }
.hero-copy > p:not(.eyebrow) { max-width: 34ch; margin: 0 0 21px; color: #eadbe8; }
.hero-art { position: relative; display: grid; place-items: center; min-height: 320px; }
.orbit { position: absolute; width: min(88%, 410px); aspect-ratio: 1; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 27px, #ffd69e25 28px 29px, transparent 30px 49px); }
.ticket { z-index: 1; display: flex; color: #391e29; transform: rotate(-12deg); width: min(80%, 340px); min-height: 153px; border-radius: 12px; background: repeating-linear-gradient(0deg, #ffce78 0 2px, #ffd488 2px 4px); box-shadow: 0 22px 40px #19091795; font-weight: 900; letter-spacing: .08em; }
.ticket-main { flex: 1; padding: 14px; margin: 9px 0 9px 9px; border: 2px solid #a86d54; border-radius: 6px 0 0 6px; }
.ticket-main span, .ticket-main b { display: block; font-size: .73rem; }
.ticket-main strong { display: block; font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.25; letter-spacing: 0; }
.ticket-stub { display: flex; justify-content: center; align-items: center; gap: 7px; width: 58px; border-left: 2px dashed #a86d54; }
.ticket-stub span { writing-mode: vertical-rl; font-size: .72rem; }
.ticket-stub i { height: 60px; width: 10px; background: repeating-linear-gradient(#573039 0 2px, transparent 2px 5px); }
.spark { position: absolute; color: var(--gold); font-size: 2rem; }
.one { top: 10%; right: 16%; }.two { bottom: 9%; left: 17%; font-size: 1.25rem; }
.primary, .quiet { min-height: 44px; border-radius: 9px; padding: 8px 15px; font-weight: 800; }
.primary { color: #2c1a21; background: var(--gold); border: 1px solid var(--gold); }
.primary:hover:enabled { background: #ffe1a6; }
.quiet { color: var(--text); background: #ffffff08; border: 1px solid var(--stroke); }
.quiet:hover:enabled { border-color: var(--gold); }
.primary:disabled, .quiet:disabled { color: var(--muted); background: #ffffff08; border-color: var(--stroke); }
.levels { padding: 33px 0 10px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h2 { font-size: clamp(1.8rem, 4vw, 2.85rem); line-height: 1.12; margin: 4px 0 0; }
.progress-text { color: var(--gold); font-weight: 800; text-align: right; }
progress { display: block; width: 100%; height: 7px; margin: 14px 0; border: 0; border-radius: 10px; overflow: hidden; background: #382d42; accent-color: var(--gold); }
progress::-webkit-progress-bar { background: #382d42; }
progress::-webkit-progress-value { background: var(--gold); }
progress::-moz-progress-bar { background: var(--gold); }
.subtle { color: var(--muted); }
.rule { margin: 0 0 15px; }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.level { min-height: 59px; padding: 8px 11px; display: flex; justify-content: space-between; align-items: center; gap: 5px; background: var(--panel); border: 1px solid var(--stroke); border-radius: 9px; color: var(--muted); text-align: left; }
.level strong { font-size: 1.15rem; }
.level span { font-size: .875rem; }
.level:enabled:hover { border-color: var(--gold); }
.level.ready { background: var(--gold); color: #2c1a21; border-color: var(--gold); }
.level.done { color: var(--green); }
.pagination, .footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pagination { margin-top: 14px; color: var(--muted); }
.footer { padding: 16px 0 21px; margin-top: 24px; border-top: 1px solid var(--stroke); font-size: .875rem; color: var(--muted); }
.play { width: min(770px, 100%); margin: 34px auto 0; }
.game-head { color: var(--muted); }
.panel { padding: clamp(18px, 4vw, 32px); background: var(--panel); border-radius: 19px; border: 1px solid var(--stroke); box-shadow: 0 18px 38px #0004; }
.panel h2 { margin: 13px 0 21px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 61px; text-align: left; padding: 9px 12px; border-radius: 9px; color: var(--text); border: 1px solid var(--stroke); background: #2b2334; font-weight: 650; }
.choice:hover:enabled { border-color: var(--gold); }
.choice b { display: grid; place-items: center; flex: 0 0 30px; height: 30px; background: #161219; color: var(--muted); border-radius: 6px; }
.choice.correct { background: #233a32; border-color: var(--green); }
.choice.wrong { background: #492631; border-color: #fb9ca1; }
.question-foot, .result-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 19px; }
.question-foot p { margin: 0; }
.question-foot button { flex: none; }
.result { text-align: center; }
.result p { margin: 0; }
.result-actions { justify-content: center; flex-wrap: wrap; }
.keyboard { font-size: .875rem; }
kbd { display: inline-block; border: 1px solid var(--stroke); border-radius: 4px; padding: 0 5px; }
@media (max-width: 750px) {
  .hero-copy { padding-left: 27px; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .level { align-items: start; flex-direction: column; }
}
@media (max-width: 530px) {
  .shell { width: calc(100% - 28px); }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 25px 21px 8px; }
  .hero-art { min-height: 188px; }
  .ticket { width: min(72%, 258px); min-height: 110px; }
  .ticket-main { padding: 8px; }
  .orbit { width: 69%; }
  .grid { gap: 6px; }
  .level { min-height: 58px; padding: 6px; }
  .choices { grid-template-columns: 1fr; }
  .question-foot { align-items: stretch; flex-direction: column; }
  .top-tag { display: none; }
}
