/* Какой год?: демо ежедневной игры для городского издания.
   Тёплая тёмная комната: фото лежит отпечатком с белым полем, год набран
   крупно, как на счётчике, после ответа на снимок падает архивный штамп.
   Колонка до 480 px, на десктопе по центру. ?accent= меняет цвет бренда
   издания: метка бренда, ползунок, главная кнопка. */

@font-face {
  font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/fonts/golos-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/fonts/golos-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+2122;
}
@font-face {
  font-family: "Oswald"; font-style: normal; font-weight: 200 700; font-display: swap;
  src: url(/fonts/oswald-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Oswald"; font-style: normal; font-weight: 200 700; font-display: swap;
  src: url(/fonts/oswald-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+2116;
}

:root {
  --accent: #e8a33d;        /* бренд издания; в демо янтарь старой фотобумаги */
  --accent-ink: #1d1206;
  --ok: #58c98a;
  --warn: #f2c14e;
  --mid: #f08a45;
  --no: #ec5b4f;
  --bg: #16120e;
  --bg-2: #1f1913;
  --paper: #f1e8d8;
  --ink: #f6efe4;
  --ink-2: #bfb2a0;
  --ink-3: #85786a;
  --glass: rgba(38, 31, 24, .86);
  --glass-2: rgba(44, 36, 28, .92);
  --edge: rgba(255, 236, 210, .11);
  --sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Oswald", "Arial Narrow", sans-serif;
  --r: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}
:root[data-accent="red"] { --accent: #e0263f; --accent-ink: #fff; }
:root[data-accent="green"] { --accent: #1fa463; --accent-ink: #fff; }
:root[data-accent="ink"] { --accent: #f1e8d8; --accent-ink: #1d1206; }
:root[data-accent="blue"] { --accent: #3b82f6; --accent-ink: #fff; }

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; font: 15px/1.45 var(--sans); color: var(--ink);
  background: radial-gradient(120% 60% at 50% 0%, #2a2118 0%, var(--bg) 60%) fixed, var(--bg); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--ink-2); }
svg[viewBox="0 0 24 24"] { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { position: relative; max-width: 480px; margin: 0 auto; padding: calc(10px + var(--sat)) 14px calc(24px + var(--sab)); }

/* шапка издания */
.top { display: flex; align-items: center; gap: 10px; padding: 6px 4px 12px; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand__mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font: 700 17px var(--display); }
.brand__name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.top__crumb { color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.top__tools { margin-left: auto; display: flex; gap: 2px; }
.icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); }
.icon:hover { background: rgba(255, 255, 255, .08); color: var(--ink); }
.embed .top { display: none; }

.title { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 12px; margin: 6px 4px 10px; }
.title h1 { margin: 0; font: 700 38px/1 var(--display); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.title span { color: var(--accent); font: 500 15px var(--display); text-transform: uppercase; letter-spacing: .08em; }

/* вызов от друга */
.vs { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 10px 14px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(232, 163, 61, .2), rgba(232, 163, 61, .06)); border: 1px solid rgba(232, 163, 61, .45); font-size: 14px; }
.vs svg { color: var(--accent); }
.vs b { color: var(--accent); font: 700 17px var(--display); }

/* плёнка: пять кадров дня и счёт */
.film { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--edge); }
.frames { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; flex: 1; }
.frame { height: 30px; border-radius: 6px; display: grid; place-items: center; font: 600 13px var(--display); font-style: normal; color: var(--ink-3);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .07); position: relative; transition: background .3s, color .3s; }
.frame::before, .frame::after { content: ""; position: absolute; left: 3px; right: 3px; height: 2px;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .45) 0 3px, transparent 3px 6px); }
.frame::before { top: 2px; } .frame::after { bottom: 2px; }
.frame.cur { color: var(--accent-ink); background: var(--accent); box-shadow: 0 0 14px -2px var(--accent); }
.frame.g { background: rgba(88, 201, 138, .22); color: var(--ok); }
.frame.y { background: rgba(242, 193, 78, .2); color: var(--warn); }
.frame.o { background: rgba(240, 138, 69, .2); color: var(--mid); }
.frame.r { background: rgba(236, 91, 79, .2); color: var(--no); }
.film__score { font: 700 22px/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.film__score small { display: block; font: 500 10px var(--sans); color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; }

/* отпечаток: фото на белом поле, чуть повёрнут */
.print { margin: 14px 0 0; padding: 10px 10px 12px; border-radius: 4px; background: var(--paper); color: #2b2218;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 22px 40px -18px rgba(0, 0, 0, .85); transform: rotate(-.6deg); animation: deal .5s var(--ease); }
.print.is-shown { transform: rotate(.4deg); }
@keyframes deal { from { transform: translateY(14px) rotate(-2deg); opacity: 0; } }
.print__img { position: relative; overflow: hidden; border-radius: 2px; background: #0e0c0a; aspect-ratio: 4 / 3; cursor: zoom-in; }
.print__img img { width: 100%; height: 100%; object-fit: contain; display: block; filter: sepia(.12) contrast(1.03); }
.print__zoom { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 10px; background: rgba(14, 12, 10, .7); color: #fff;
  display: grid; place-items: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.print__cap { display: grid; gap: 1px; padding: 9px 2px 0; }
.print__cap b { font: 600 16px/1.25 var(--sans); }
.print__cap span { font-size: 11.5px; color: #75685a; }

/* архивный штамп с годом */
.stamp { position: absolute; right: 12px; bottom: 12px; padding: 4px 12px 6px; border: 3px solid currentColor; border-radius: 8px;
  font: 700 38px/1 var(--display); letter-spacing: .04em; text-align: center; transform: rotate(-9deg); background: rgba(14, 12, 10, .35);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .4); mix-blend-mode: normal; animation: stamp .45s cubic-bezier(.3, 1.6, .5, 1) both; }
.stamp small { display: block; font: 600 10px var(--sans); letter-spacing: .3em; text-transform: uppercase; margin-bottom: 1px; }
.stamp.g { color: #7ef0ac; } .stamp.y { color: #ffd66b; } .stamp.o { color: #ffa262; } .stamp.r { color: #ff7b6e; }
@keyframes stamp { from { transform: scale(2.2) rotate(-18deg); opacity: 0; } 60% { opacity: 1; } }

/* выбор года */
.pick { margin-top: 14px; padding: 12px 14px 8px; border-radius: var(--r); background: var(--glass-2); border: 1px solid var(--edge); }
.year { display: flex; align-items: center; justify-content: center; gap: 10px; }
.year__big { display: flex; gap: 4px; font: 700 64px/1 var(--display); font-variant-numeric: tabular-nums; }
.year__big b { display: grid; place-items: center; width: .66em; height: 1.12em; border-radius: 8px; background: #0f0c09; color: var(--ink);
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, .05), inset 0 10px 18px rgba(0, 0, 0, .5); position: relative; font-weight: 700; }
.year__big b::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, .55); }
.year__big b.dim { color: var(--ink-3); }
.year__step { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .07); border: 1px solid var(--edge); }
.year__step:hover { background: rgba(255, 255, 255, .13); }
.year__era { text-align: center; margin-top: 6px; color: var(--accent); font: 500 13px var(--display); text-transform: uppercase; letter-spacing: .12em; }
.track { position: relative; margin: 12px 2px 0; padding-bottom: 20px; }
.track input { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.track input::-webkit-slider-runnable-track { height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, #5a4633, #8a6b47 40%, #b08c5c 70%, #d0b78e); }
.track input::-moz-range-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #5a4633, #8a6b47 40%, #b08c5c 70%, #d0b78e); }
.track input::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%;
  background: var(--accent); border: 4px solid #fff3df; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.track input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 4px solid #fff3df; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.ticks { position: absolute; left: 15px; right: 15px; top: 30px; height: 18px; pointer-events: none; }
.ticks i { position: absolute; top: 0; width: 1px; height: 5px; background: var(--ink-3); }
.ticks span { position: absolute; top: 6px; left: 0; transform: translateX(-50%); font: 500 11px var(--display); color: var(--ink-3); white-space: nowrap; }

/* действия */
.acts { display: grid; gap: 8px; margin-top: 10px; }
.acts--2 { grid-template-columns: 1fr 1.4fr; }
.btn { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: 8px; min-height: 54px; padding: 8px 14px; border-radius: 14px;
  font-weight: 700; text-align: center; line-height: 1.2; transition: transform .12s, filter .2s, opacity .2s; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn--main { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 28px -10px var(--accent); font-size: 17px; }
.btn--main:hover:not(:disabled) { filter: brightness(1.06); }
.btn--ghost { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 236, 210, .2); }
.btn--ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .13); }
.btn--ghost:disabled { opacity: .6; cursor: default; }
.btn small { flex-basis: 100%; font-weight: 500; font-size: 11.5px; color: var(--ink-2); }
.btn--main small { color: inherit; opacity: .75; }

.sponsor { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 14px; border-radius: 12px;
  border: 1px dashed rgba(255, 236, 210, .22); color: var(--ink-2); font-size: 13px; background: rgba(22, 18, 14, .6); }
.tag { flex: none; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 5px; border: 1px solid rgba(255, 236, 210, .3); color: var(--ink-2); }

/* результат фото */
.res { margin-top: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--glass-2); border: 1px solid var(--edge); animation: rise .4s var(--ease); }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.res__row { display: flex; align-items: flex-end; gap: 12px; }
.res__cap { color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.res__d { font: 700 30px/1.1 var(--display); }
.res__d.g { color: var(--ok); } .res__d.y { color: var(--warn); } .res__d.o { color: var(--mid); } .res__d.r { color: var(--no); }
.res__pts { margin-left: auto; font: 700 26px/1 var(--display); white-space: nowrap; }
.res__pts small { font: 500 11px var(--sans); color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; margin-left: 4px; }

/* гистограмма ответов читателей */
.crowd { margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(255, 236, 210, .16); font-size: 13px; color: var(--ink-2); }
.crowd b { color: var(--ink); }
.crowd__head { font: 600 12px var(--display); text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); margin-bottom: 8px; }
.crowd p { margin: 8px 0 0; }
.hist { display: flex; align-items: flex-end; gap: 1px; height: 74px; }
.hist i { flex: 1; min-width: 0; border-radius: 2px 2px 0 0; background: rgba(255, 236, 210, .2); transform-origin: bottom; animation: bar .6s var(--ease) both; }
.hist i.u { background: var(--accent); position: relative; }
.hist i.u::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 2px; height: 74px; margin-left: -1px; background: var(--accent); opacity: .8; }
.hist i.t { background: var(--ok); box-shadow: 0 0 10px rgba(88, 201, 138, .6); }
.hist i.t.u { background: linear-gradient(180deg, var(--ok) 50%, var(--accent) 50%); }
@keyframes bar { from { transform: scaleY(0); } }
.hist__axis { display: flex; justify-content: space-between; margin-top: 4px; font: 500 11px var(--display); color: var(--ink-3); }
.crowd__legend { display: flex; gap: 14px; margin-top: 6px; font-size: 12px; }
.crowd__legend span { display: flex; align-items: center; gap: 6px; }
.crowd__legend i { width: 10px; height: 10px; border-radius: 2px; }
.crowd__legend i.t { background: var(--ok); } .crowd__legend i.u { background: var(--accent); }

/* тогда и сейчас */
.cmp { margin-top: 12px; }
.cmp__head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin: 0 2px 6px; font: 600 13px var(--display);
  text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.cmp__head span { font: 400 12px var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink-3); text-align: right; }
.cmp__box { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: #0e0c0a; border: 1px solid var(--edge); }
.cmp__box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cmp__then { clip-path: inset(0 calc(100% - var(--x)) 0 0); filter: sepia(.2); }
.cmp__line { position: absolute; top: 0; bottom: 0; left: var(--x); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, .6); pointer-events: none; }
.cmp__line::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: #2b2218; display: grid; place-items: center; font: 700 16px var(--display); box-shadow: 0 4px 14px rgba(0, 0, 0, .45); }
.cmp__l, .cmp__r { position: absolute; bottom: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(14, 12, 10, .75); font: 600 12px var(--display);
  letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
.cmp__l { left: 10px; } .cmp__r { right: 10px; }
.cmp__box input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; touch-action: pan-y; }

/* итог дня */
.final { margin-top: 12px; padding: 18px 16px 16px; border-radius: var(--r); background: var(--glass-2); border: 1px solid var(--edge); animation: rise .4s var(--ease); }
.final__label { color: var(--ink-2); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; text-align: center; }
.final__pts { text-align: center; font: 700 64px/1.05 var(--display); color: var(--accent); font-variant-numeric: tabular-nums; }
.final__pts small { font: 500 13px var(--sans); color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; display: block; }
.final__title { margin: 6px 0 2px; text-align: center; font: 700 26px/1.15 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.final__sub { margin: 0 0 14px; text-align: center; color: var(--ink-2); }
.strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.strip__it { display: grid; gap: 2px; text-align: center; }
.strip__it img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; border: 3px solid var(--paper); filter: sepia(.15); display: block; }
.strip__it b { font: 700 16px var(--display); }
.strip__it b.g { color: var(--ok); } .strip__it b.y { color: var(--warn); } .strip__it b.o { color: var(--mid); } .strip__it b.r { color: var(--no); }
.strip__it span { font-size: 11px; color: var(--ink-3); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; text-align: center; }
.stats div { padding: 10px 6px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.stats b { display: block; font: 700 24px var(--display); color: var(--accent); }
.stats span { color: var(--ink-2); font-size: 12px; line-height: 1.25; display: block; }
.demo-note { color: var(--ink-3); font-size: 12px; text-align: center; margin: 10px 0 0; }
.next-day { text-align: center; color: var(--ink-2); font-size: 13px; margin: 12px 0 0; }
.next-day span { font: 600 15px var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }

/* альбом читателей и место партнёра */
.album { margin-top: 12px; padding: 14px 14px 12px; border-radius: 14px; background: var(--paper); color: #2b2218; position: relative;
  box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .8); transform: rotate(.3deg); }
.album::before { content: ""; position: absolute; top: -8px; left: 50%; width: 70px; height: 18px; margin-left: -35px; background: rgba(232, 163, 61, .55); transform: rotate(-3deg); }
.album__top { font: 600 13px var(--display); text-transform: uppercase; letter-spacing: .12em; color: #9a6a24; }
.album__q { margin: 4px 0; font-weight: 700; font-size: 16px; }
.album__p { margin: 0; font-size: 13px; color: #5d5043; }
.partner { margin-top: 12px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--accent); background: rgba(22, 18, 14, .6); }
.partner__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--accent); font: 600 13px var(--display); text-transform: uppercase; letter-spacing: .1em; }
.partner__q { margin: 6px 0 4px; font-weight: 600; }
.partner__p { margin: 0; color: var(--ink-2); font-size: 13px; }

.foot { margin: 18px 4px 0; color: var(--ink-3); font-size: 12px; text-align: center; }

/* фото на весь экран */
.light { position: fixed; inset: 0; z-index: 1100; background: rgba(8, 6, 4, .96); display: grid; place-items: center; cursor: zoom-out; }
.light img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.light__x { position: absolute; top: calc(10px + var(--sat)); right: 10px; background: rgba(255, 255, 255, .12); color: #fff; }

/* правила */
.modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(6, 4, 2, .72);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal__box { position: relative; width: 100%; max-width: 420px; padding: 20px 20px 18px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--edge); }
.modal__box h2 { margin: 0 0 10px; font: 700 26px var(--display); text-transform: uppercase; }
.modal__box ul { margin: 0 0 10px; padding-left: 18px; }
.modal__box li { margin-bottom: 6px; }
.modal__box p { color: var(--ink-2); margin: 0 0 14px; }
.modal__box .btn { width: 100%; }
.modal__x { position: absolute; top: 10px; right: 10px; }

.toast { position: fixed; left: 50%; bottom: calc(22px + var(--sab)); transform: translateX(-50%); z-index: 1200; padding: 12px 16px; border-radius: 12px;
  background: var(--paper); color: #2b2218; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); white-space: nowrap; }

@media (max-width: 380px) {
  .top__crumb { display: none; }
  .title h1 { font-size: 32px; }
  .year__big { font-size: 52px; }
  .year__step { width: 40px; height: 40px; }
  .res__d { font-size: 26px; }
}
@media (max-width: 330px) {
  .acts--2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
