@font-face { font-family: "Unbounded"; src: url("fonts/Unbounded.ttf") format("truetype"); font-weight: 200 900; font-display: block; }
@font-face { font-family: "Montserrat"; src: url("fonts/Montserrat.ttf") format("truetype"); font-weight: 100 900; font-display: block; }

:root {
  --ink: #15121A; --cream: #FFF3DF; --yellow: #FCCC4D; --pink: #E107C3;
  --red: #D3263A; --purple: #7B2CC9; --blue: #1679D0; --green: #0F6B57;
  --rc: var(--red);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #000; overflow: hidden; }
body { font-family: "Montserrat", sans-serif; color: var(--cream); }

#viewport { position: fixed; inset: 0; display: grid; place-items: center; }
#stage { width: 1920px; height: 1080px; position: absolute; left: 50%; top: 50%; overflow: hidden; transform-origin: center center; }

/* ---------- slide base ---------- */
.slide { position: absolute; inset: 0; background: var(--rc); overflow: hidden; }
.slide.dark { background: var(--ink); }
.slide .grain { position: absolute; inset: 0; pointer-events: none; opacity: .09; mix-blend-mode: overlay;
  background-image: radial-gradient(rgba(255,255,255,.9) 1px, transparent 1.2px); background-size: 6px 6px; }
.deco-circle { position: absolute; border-radius: 50%; }
.deco-bar { position: absolute; }

.topbar { position: absolute; left: 96px; right: 96px; top: 64px; height: 64px; display: flex; align-items: center; justify-content: space-between; z-index: 5; }
.chip { font-family: "Unbounded"; font-weight: 700; font-size: 26px; letter-spacing: .04em; text-transform: uppercase;
  background: var(--ink); color: var(--cream); padding: 16px 26px 14px; line-height: 1; }
.chip b { color: var(--yellow); font-weight: 800; }
.logo-plate { background: var(--cream); padding: 12px 18px; }
.logo { height: 58px; width: auto; display: block; }
.logo-big { height: 120px; }

h1, h2, h3, .display { font-family: "Unbounded", sans-serif; font-weight: 800; line-height: 1.02; letter-spacing: -.01em; }

/* ---------- title ---------- */
.s-title .left { position: absolute; left: 120px; top: 230px; width: 980px; z-index: 3; }
.s-title .kicker { font-family: "Unbounded"; font-weight: 600; font-size: 30px; color: var(--yellow); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 36px; }
.s-title h1 { font-size: 122px; text-transform: uppercase; }
.s-title h1 span { display: block; color: var(--yellow); }
.s-title .sub { font-size: 40px; font-weight: 600; margin-top: 44px; max-width: 880px; line-height: 1.25; }
.s-title .meta { margin-top: 40px; display: inline-block; font-family: "Unbounded"; font-weight: 600; font-size: 28px; background: var(--red); padding: 18px 28px 16px; }
.art { position: absolute; right: 40px; top: 150px; width: 860px; height: 860px; object-fit: cover; z-index: 2; }
.art-frame { position: absolute; right: 40px; top: 150px; width: 860px; height: 860px; z-index: 1; }

/* ---------- rules ---------- */
.s-rules h2 { position: absolute; left: 120px; top: 190px; font-size: 96px; text-transform: uppercase; }
.s-rules ol { position: absolute; left: 120px; right: 120px; top: 360px; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 40px 70px; counter-reset: r; }
.s-rules li { counter-increment: r; display: flex; gap: 28px; align-items: flex-start; font-size: 38px; font-weight: 600; line-height: 1.3; }
.s-rules li::before { content: counter(r); flex: none; width: 76px; height: 76px; display: grid; place-items: center; background: var(--ink); color: var(--yellow);
  font-family: "Unbounded"; font-weight: 800; font-size: 34px; }

/* ---------- round cover ---------- */
.s-cover .left { position: absolute; left: 120px; top: 190px; bottom: 80px; width: 900px; z-index: 3; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.s-cover .rn { font-family: "Unbounded"; font-weight: 800; font-size: 40px; text-transform: uppercase; letter-spacing: .1em; color: var(--yellow); }
.s-cover .bignum { font-family: "Unbounded"; font-weight: 900; font-size: 300px; line-height: .8; color: var(--ink); margin: 18px 0 34px -10px; }
.s-cover h2 { font-size: 88px; text-transform: uppercase; }
.s-cover .about { font-size: 34px; font-weight: 600; line-height: 1.3; margin-top: 28px; max-width: 840px; }
.s-cover .score { display: inline-block; margin-top: 30px; background: var(--ink); color: var(--yellow); font-family: "Unbounded"; font-weight: 700; font-size: 28px; padding: 16px 26px 14px; }

/* ---------- question ---------- */
.s-q .qnum { position: absolute; left: 96px; top: 200px; width: 230px; height: 230px; background: var(--ink); display: grid; place-items: center;
  font-family: "Unbounded"; font-weight: 900; font-size: 120px; color: var(--yellow); z-index: 3; }
.s-q .qnum small { position: absolute; top: 18px; left: 0; right: 0; text-align: center; font-size: 20px; font-weight: 600; color: var(--cream); letter-spacing: .12em; text-transform: uppercase; }
.s-q .qbody { position: absolute; left: 390px; right: 120px; top: 200px; bottom: 210px; display: flex; flex-direction: column; justify-content: center; z-index: 3; }
.s-q .qtext { font-weight: 700; font-size: 64px; line-height: 1.22; text-wrap: balance; }
.s-q .qtext.long { font-size: 54px; }
.s-q .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 28px; margin-top: 54px; }
.opt { background: var(--cream); color: var(--ink); display: flex; align-items: center; gap: 26px; padding: 22px 28px; min-height: 118px; font-size: 38px; font-weight: 700; line-height: 1.15; }
.opt .l { flex: none; width: 70px; height: 70px; display: grid; place-items: center; background: var(--rc); color: var(--cream); font-family: "Unbounded"; font-weight: 800; font-size: 34px; }
.opt.right { background: var(--yellow); outline: 8px solid var(--ink); }
.opt.dim { opacity: .45; }

/* timer */
.timer { position: absolute; left: 96px; right: 96px; bottom: 70px; height: 96px; display: flex; align-items: stretch; gap: 22px; z-index: 4; }
.timer .track { flex: 1; background: rgba(21,18,26,.35); position: relative; overflow: hidden; }
.timer .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--yellow); transition: width .25s linear; }
.timer .ticks { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 4px), rgba(21,18,26,.35) calc(10% - 4px) 10%); }
.timer .sec { flex: none; width: 200px; background: var(--ink); color: var(--yellow); display: grid; place-items: center; font-family: "Unbounded"; font-weight: 800; font-size: 56px; }
.timer.warn .fill { background: var(--cream); }
.timer.warn .sec { color: var(--ink); background: var(--cream); }
.timer.done .sec { background: var(--yellow); color: var(--ink); font-size: 40px; }
.timer.paused .sec::after { content: "пауза"; position: absolute; transform: translateY(46px); font-size: 16px; letter-spacing: .1em; text-transform: uppercase; }

/* photos (film stills / answer photos) */
.has-pic .qbody { right: 830px; }
.has-pic.s-q .qtext { font-size: 50px; }
.has-pic.s-q .qtext:has(+ .opts) { font-size: 44px; }
.has-pic.s-q .qtext.long { font-size: 46px; }
.has-pic .opts { grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.has-pic .opt { min-height: 84px; font-size: 30px; padding: 12px 18px; }
.has-pic .opt .l { width: 58px; height: 58px; font-size: 28px; }
.photo { position: absolute; right: 110px; top: 220px; width: 660px; height: 600px; background: var(--cream); padding: 16px; z-index: 3;
  box-shadow: 20px 20px 0 var(--ink); transform: rotate(1.5deg); display: flex; flex-direction: column; }
.photo img { width: 100%; flex: 1; min-height: 0; object-fit: cover; object-position: center 30%; display: block; background: #222; }
.photo figcaption { color: var(--ink); font-size: 22px; font-weight: 700; padding: 12px 4px 0; line-height: 1.2; }
.photo .credit { position: absolute; right: 22px; top: 22px; font-size: 13px; font-weight: 600; color: #fff; background: rgba(21,18,26,.55); padding: 3px 8px; }
.photo-q { top: 210px; height: 560px; transform: rotate(-1.5deg); }
.s-a.has-pic .qtext { font-size: 34px; }
.s-a.has-pic .ans { font-size: 60px; }
.s-a.has-pic .fact { font-size: 32px; margin-top: 44px; }
.live .slide .photo-a { animation: photoin .8s cubic-bezier(.2,1.2,.4,1) both .7s; }
.live .slide .photo-q { animation: rise .6s cubic-bezier(.2,.8,.2,1) both .2s; }
@keyframes photoin { from { opacity: 0; transform: scale(.86) rotate(-4deg); } to { opacity: 1; transform: rotate(1.5deg); } }

/* ---------- collect / intro ---------- */
.s-center { display: grid; place-items: center; text-align: center; }
.s-center .box { position: relative; z-index: 3; max-width: 1500px; }
.s-center .k { font-family: "Unbounded"; font-weight: 700; font-size: 36px; color: var(--yellow); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 30px; }
.s-center h2 { font-size: 130px; text-transform: uppercase; }
.s-center p { font-size: 42px; font-weight: 600; margin-top: 36px; line-height: 1.3; }

/* ---------- answer ---------- */
.s-a .qbody { bottom: 110px; justify-content: center; }
.s-a .qtext { font-size: 40px; font-weight: 600; opacity: .9; }
.s-a .anslabel { font-family: "Unbounded"; font-weight: 700; font-size: 26px; text-transform: uppercase; letter-spacing: .14em; color: var(--yellow); margin: 46px 0 18px; }
.s-a .ans { display: inline-block; align-self: flex-start; background: var(--yellow); color: var(--ink); font-family: "Unbounded"; font-weight: 800; font-size: 72px; line-height: 1.1; padding: 30px 40px 26px; box-shadow: 18px 18px 0 var(--ink); }
.s-a .opts { margin-top: 40px; }
.s-a .opt { min-height: 104px; font-size: 36px; }
.s-a .fact { margin-top: 56px; font-size: 36px; font-weight: 600; line-height: 1.35; max-width: 1300px; padding-left: 34px; border-left: 10px solid var(--ink); }
.s-a .opts + .fact { margin-top: 40px; }

/* ---------- scores ---------- */
.s-scores h2 { position: absolute; left: 120px; top: 190px; font-size: 92px; text-transform: uppercase; }
.s-scores .hint { position: absolute; left: 120px; top: 310px; font-size: 32px; font-weight: 600; }
table.score { position: absolute; left: 120px; right: 120px; top: 400px; border-collapse: separate; border-spacing: 14px; margin-left: -14px; font-size: 44px; }
table.score th { font-family: "Unbounded"; font-weight: 700; font-size: 26px; text-transform: uppercase; letter-spacing: .06em; text-align: center; padding: 8px; }
table.score th:first-child { text-align: left; }
table.score td { background: rgba(21,18,26,.85); height: 120px; text-align: center; font-family: "Unbounded"; font-weight: 800; color: var(--yellow); outline: none; }
table.score td.team { text-align: left; padding: 0 34px; color: var(--cream); font-family: "Montserrat"; font-weight: 700; width: 560px; }
table.score td.total { background: var(--yellow); color: var(--ink); }
table.score td:focus { box-shadow: inset 0 0 0 6px var(--yellow); }

/* ---------- final ---------- */
.s-final .left { position: absolute; left: 120px; top: 250px; width: 900px; z-index: 3; }
.s-final h1 { font-size: 130px; text-transform: uppercase; }
.s-final h1 span { color: var(--yellow); display: block; }
.s-final p { font-size: 40px; font-weight: 600; margin-top: 40px; line-height: 1.3; }

/* ---------- animations (live mode only) ---------- */
.live .slide .anim { animation: rise .55s cubic-bezier(.2,.8,.2,1) both; }
.live .slide .anim.d1 { animation-delay: .08s; } .live .slide .anim.d2 { animation-delay: .16s; } .live .slide .anim.d3 { animation-delay: .24s; } .live .slide .anim.d4 { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.live .slide .pop { animation: pop .5s cubic-bezier(.2,1.4,.4,1) both .2s; }
@keyframes pop { from { opacity: 0; transform: scale(.7) rotate(-3deg); } to { opacity: 1; transform: none; } }

/* ---------- hud ---------- */
.hud { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 6px; align-items: center; background: rgba(21,18,26,.92); padding: 8px; z-index: 50;
  font: 600 14px "Montserrat", sans-serif; transition: opacity .3s; border: 1px solid rgba(255,243,223,.15); }
.hud button { font: inherit; color: var(--cream); background: transparent; border: 1px solid rgba(255,243,223,.25); padding: 8px 12px; cursor: pointer; }
.hud button:hover { background: rgba(255,243,223,.1); }
.hud button.on { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.hud #hud-pos { min-width: 80px; text-align: center; }
body.idle .hud { opacity: 0; pointer-events: none; }
body.idle { cursor: none; }
.help { position: fixed; right: 20px; bottom: 80px; width: 380px; background: var(--cream); color: var(--ink); padding: 22px 24px; z-index: 60; font-size: 15px; line-height: 1.5; }
.help h3 { font-family: "Unbounded"; font-size: 20px; margin-bottom: 10px; }
.help p { margin: 4px 0; }
.render .hud, .render .help { display: none !important; }

@media (max-width: 700px) { .hud { flex-wrap: wrap; width: calc(100% - 20px); justify-content: center; } .hud button { padding: 6px 8px; } }
