/* «Сырная ярмарка» — страница события /event.
   Параллельная реальность Шпаковграда: тот же мир, но праздник — сиреневые
   сумерки, тёплые гирлянды, сырно-жёлтый свет. Страница — прогулка по улице
   ярмарки: вертикальная прокрутка ведёт камеру вдоль фудтраков, каждый
   фудтрак — глава события, его окно открывается прилавком. Шрифт вывесок —
   Unbounded (селф-хост), текст — Golos Text сайта. */
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("fonts/unbounded-var-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("fonts/unbounded-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: "Old Standard"; font-weight: 400; font-display: swap; src: url("fonts/oldstandard-400-cyrillic.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Old Standard"; font-weight: 400; font-display: swap; src: url("fonts/oldstandard-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2191-2193; }
@font-face { font-family: "Old Standard"; font-weight: 700; font-display: swap; src: url("fonts/oldstandard-700-cyrillic.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Old Standard"; font-weight: 700; font-display: swap; src: url("fonts/oldstandard-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2191-2193; }
@font-face { font-family: "Old Standard"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/oldstandard-400i-cyrillic.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Old Standard"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/oldstandard-400i-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Neucha"; font-weight: 400; font-display: swap; src: url("fonts/neucha-cyrillic.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Neucha"; font-weight: 400; font-display: swap; src: url("fonts/neucha-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Unifraktur"; font-weight: 400; font-display: swap; src: url("fonts/unifraktur-latin.woff2") format("woff2"); }
:root {
  --f-night: #1b1233;
  --f-violet: #493977;
  --f-plum: #6b2f73;
  --f-sunset: #d0673e;
  --f-amber: #ffb43a;
  --f-cheese: #ffd24d;
  --f-cream: #fff3d9;
  --f-ink: #22163f;
  --f-display: "Unbounded", "Golos Text", sans-serif;
}
/* наезд камеры на фургон и рейв масштабируют сцену — не даём им раздуть ширину
   страницы (на телефоне раздутая страница уменьшается целиком) */
html:has(body.fair-body), body.fair-body { overflow-x: clip; }
html:has(body.fair-body) { background: var(--f-night); }
body.fair-body { background: var(--f-night); color: var(--f-cream); }
body.fair-body ::selection { background: var(--f-cheese); color: var(--f-ink); }
body.fair-body :focus-visible { outline: 3px solid var(--f-cheese); outline-offset: 3px; }
html.fair-locked, html.fair-locked body, html.fg-open, html.fg-open body { overflow: hidden; }

/* ── Занавес загрузки ── */
.fair-loader { position: fixed; inset: 0; z-index: 500; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px;
  text-align: center; background: radial-gradient(120% 80% at 50% 110%, #7a3b7f 0%, #3a2466 45%, var(--f-night) 80%);
  transition: opacity .7s ease, visibility .7s; }
.fair-loader.gone { opacity: 0; visibility: hidden; }
/* прилёт с главной: золотая вспышка из сыра тает в сумерки ярмарки */
.fair-loader.from-portal { background: #f2b640; }
.fair-loader.from-portal > * { opacity: 0; }
.fair-loader.from-portal::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, #fff4cc 0%, #ffd24d 16%, #f09a3e 32%, #b0487a 58%, #3a2466 80%, #1b1233 100%);
  animation: fair-flash-out 1.1s ease-out forwards; }
@keyframes fair-flash-out { to { opacity: 0; } }
.fl-wheel { position: relative; width: 132px; height: 132px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 210, 77, .08) 0 58%, transparent 59%), rgba(255, 243, 217, .08);
  box-shadow: inset 0 0 0 2px rgba(255, 210, 77, .35); }
.fl-wheel i { position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--f-cheese) calc(var(--p, 0) * 1turn), transparent 0);
  -webkit-mask: radial-gradient(circle, transparent 0 57%, #000 58%); mask: radial-gradient(circle, transparent 0 57%, #000 58%);
  transition: --p .3s; filter: drop-shadow(0 0 14px rgba(255, 190, 60, .55)); }
.fl-title { margin: 12px 0 0; font-family: var(--f-display); font-weight: 900; font-size: clamp(30px, 6vw, 56px); letter-spacing: -.02em; line-height: 1;
  color: var(--f-cheese); text-shadow: 0 6px 30px rgba(255, 170, 40, .35); }
.fl-note { margin: 0; font-size: 15px; color: rgba(255, 243, 217, .75); min-height: 1.4em; }
.fl-enter { margin-top: 10px; min-height: 58px; padding: 0 30px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--f-cheese); color: var(--f-ink); font-family: var(--f-display); font-weight: 800; font-size: 18px; letter-spacing: -.01em;
  box-shadow: 0 14px 40px -12px rgba(255, 190, 60, .8), inset 0 -3px 0 rgba(0, 0, 0, .12);
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.3), opacity .3s; }
.fl-enter:disabled { opacity: .35; cursor: progress; }
.fl-enter:not(:disabled):hover { transform: translateY(-2px) scale(1.03); }
.fl-quiet { border: 0; background: none; color: rgba(255, 243, 217, .6); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ── Верхняя строка ── */
.fair-bar { position: fixed; z-index: 60; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) clamp(14px, 3vw, 28px) 12px; pointer-events: none;
  background: linear-gradient(rgba(27, 18, 51, .7), rgba(27, 18, 51, 0)); }
.fair-bar > * { pointer-events: auto; }
/* Сырная замочная скважина: сквозь большую дырку ломтя виден кабинет с
   барсуками; наведение — ломоть крутится, дырка расширяется. */
.fb-home { display: inline-flex; align-items: center; gap: 10px; color: var(--f-cream); text-decoration: none; }
.kh { position: relative; width: 58px; height: 57px; flex: 0 0 auto; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .45));
  transition: transform .6s cubic-bezier(.2, 1.4, .4, 1); }
.kh-cheese { width: 100%; height: auto; display: block; }
.kh-cab { position: absolute; left: calc(46% - var(--hr)); top: calc(64.5% - var(--hr)); width: calc(var(--hr) * 2); height: calc(var(--hr) * 2); --hr: 6.4px;
  border-radius: 50%; background: url("../public/brand/shpakovgrad-hero-cheese.webp") 68% 60% / 260px auto; box-shadow: inset 0 0 4px rgba(0, 0, 0, .8);
  transition: --hr .5s, width .5s cubic-bezier(.2, 1.4, .4, 1), height .5s cubic-bezier(.2, 1.4, .4, 1), left .5s cubic-bezier(.2, 1.4, .4, 1), top .5s cubic-bezier(.2, 1.4, .4, 1); }
.fb-home:hover .kh, .fb-home:focus-visible .kh { transform: rotate(-20deg) scale(1.12); }
.fb-home:hover .kh-cab, .fb-home:focus-visible .kh-cab { --hr: 13px; }
.kh-label { display: grid; line-height: 1.05; }
.kh-label b { font-family: var(--f-display); font-weight: 800; font-size: 14px; }
.kh-label small { font-size: 11.5px; color: rgba(255, 243, 217, .7); }
.fb-home.going .kh { animation: kh-go .4s ease-in forwards; }
@keyframes kh-go { to { transform: scale(1.4) rotate(-40deg); opacity: 0; } }
.fb-sample { margin: 0; font-size: 12px; letter-spacing: .06em; color: rgba(255, 243, 217, .7); text-align: center; }
.fb-actions { display: flex; gap: 8px; }
.fb-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 0; cursor: pointer;
  background: rgba(255, 243, 217, .12); color: var(--f-cheese); backdrop-filter: blur(8px); }
.fb-btn svg { width: 22px; height: 22px; }
.fb-btn .off, .fb-btn[aria-pressed="false"] .on { display: none; }
.fb-btn[aria-pressed="false"] .off { display: block; }
.fb-btn[aria-pressed="false"] { color: rgba(255, 243, 217, .55); }

/* ── Улица ── */
.street { position: relative; height: 400vh; }
.street-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #221638;
  transition: transform 1.3s cubic-bezier(.5, 0, .75, .3), filter 1.3s ease-in; }
.street-stage.fair-dive { transform: scale(1.8); filter: brightness(1.2) saturate(1.2); }
/* дальний план: площадь ярмарки и город в сумерках (картинка + зеркало — без шва) */
.st-sky { position: absolute; top: 0; left: 0; height: 100%; width: 400vw; will-change: transform;
  background: url("fair/art/fair-sky.webp") left center / auto 100% repeat-x, linear-gradient(180deg, #1b1233, #3a2466 34%, #7a3b7f 60%, #d0673e 82%, #2c1d40 83%); }
.st-track { position: absolute; left: 0; top: 0; bottom: 0; will-change: transform; }
/* ближняя брусчатка едет вместе с фудтраками — между ней и дальней площадью видна глубина */
.st-ground { position: absolute; left: -20vw; right: -20vw; bottom: 0; height: 24svh;
  background: url("fair/art/fair-ground.webp") left bottom / auto 100% repeat-x;
  -webkit-mask: linear-gradient(transparent, #000 45%); mask: linear-gradient(transparent, #000 45%); }

.st-gate { position: absolute; bottom: 7svh; height: 80svh; }
.st-gate-art { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 30px 40px rgba(10, 4, 30, .6)); }
/* вывески пишутся по пустым доскам арта: место и кегль ставит fair.js */
.st-title { position: absolute; margin: 0; display: grid; place-content: center; text-align: center;
  font-family: var(--f-display); font-weight: 900; line-height: .94; letter-spacing: -.02em; text-transform: uppercase;
  color: #ffe39a; text-shadow: 0 0 18px rgba(255, 180, 60, .85), 0 0 3px rgba(255, 230, 160, .9), 0 3px 0 #3b1a08; }
.st-title span { display: block; }

.st-trucks { position: absolute; inset: 0; }
.truck { position: absolute; bottom: 8svh; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; font: inherit;
  -webkit-tap-highlight-color: transparent; transform-origin: 50% 100%; transition: transform .5s cubic-bezier(.2, .9, .3, 1.25), filter .35s ease; }
.truck img { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 26px 26px rgba(10, 4, 30, .6)); }
.truck:hover, .truck:focus-visible { transform: translateY(-1.2svh) scale(1.015); filter: brightness(1.1) saturate(1.08); }
.truck:focus-visible { outline: none; }
/* вывеска: золочёные буквы на доске — заливка градиентом по тексту, тень и
   тёмная кромка через drop-shadow (text-shadow с прозрачной заливкой просвечивал бы) */
.truck-board { position: absolute; display: grid; place-items: center; pointer-events: none; text-align: center;
  font-family: var(--f-display); font-weight: 900; line-height: 1.1; letter-spacing: .015em; text-transform: uppercase; white-space: nowrap;
  color: #ffd766; background: linear-gradient(180deg, #fff3c4 0%, #ffd85e 42%, #e3a12a 56%, #ffe27a 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 #3a1a06) drop-shadow(0 2px 2px rgba(20, 6, 0, .7)) drop-shadow(0 0 6px rgba(255, 190, 80, .35)); transition: filter .3s; }
.truck-board b { font-weight: inherit; }
.truck:hover .truck-board, .truck:focus-visible .truck-board { filter: drop-shadow(0 1px 0 #3a1a06) drop-shadow(0 2px 2px rgba(20, 6, 0, .7)) drop-shadow(0 0 14px rgba(255, 200, 90, .85)) brightness(1.12); }
.truck:focus-visible .truck-board { outline: 3px solid var(--f-cheese); outline-offset: 4px; border-radius: 6px; }
/* шатёр клана без доски: табличка висит над ним */
.truck-sign { position: absolute; left: 50%; top: -7svh; transform: translateX(-50%); display: grid; justify-items: center; pointer-events: none;
  animation: fair-swing 5s ease-in-out infinite; transform-origin: 50% -30px; }
.truck-sign::before { content: ""; width: 60%; height: 4svh; border-left: 2px solid rgba(255, 243, 217, .55); border-right: 2px solid rgba(255, 243, 217, .55); }
.truck-sign b { display: block; padding: 10px 18px 11px; border-radius: 10px; background: #2b1a10; color: #ffe39a;
  font-family: var(--f-display); font-weight: 800; font-size: clamp(15px, 2.2svh, 22px); text-transform: uppercase;
  box-shadow: 0 0 0 2px #b8862f, 0 14px 30px -10px rgba(0, 0, 0, .6); text-shadow: 0 0 12px rgba(255, 180, 60, .75); }
@keyframes fair-swing { 0%, 100% { rotate: -1.6deg; } 50% { rotate: 1.6deg; } }
.truck-ph { position: absolute; inset: 20% 6% 0; border-radius: 18px 18px 8px 8px; background: linear-gradient(#ffcf4a, #f39b2f); }
.st-vendor { position: absolute; bottom: 7svh; height: 40svh; pointer-events: none; filter: drop-shadow(0 18px 18px rgba(10, 4, 30, .55));
  animation: fair-bob 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes fair-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-.6svh) rotate(-.8deg); } }

.st-front { position: absolute; inset: 0; pointer-events: none; }
.st-garland { position: absolute; left: 0; top: calc(-1svh + env(safe-area-inset-top, 0px)); height: 16svh; width: 600vw; will-change: transform;
  background: url("fair/art/garland.webp") left top / auto 100% repeat-x; filter: drop-shadow(0 8px 12px rgba(10, 4, 30, .5)); }
.st-crowd { position: absolute; left: 0; bottom: -1svh; height: 27svh; width: 600vw; will-change: transform; }
.crowd-group { position: absolute; bottom: 0; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto;
  -webkit-tap-highlight-color: transparent; transform-origin: 50% 100%; }
.crowd-group img { display: block; height: 100%; width: auto; filter: brightness(.82) saturate(.95) drop-shadow(0 -6px 20px rgba(10, 4, 30, .4)); }
.crowd-group.flip img { transform: scaleX(-1); }
.crowd-group:hover img { filter: brightness(.95) saturate(1.05) drop-shadow(0 -6px 20px rgba(10, 4, 30, .4)); }
.st-vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(130% 100% at 50% 40%, transparent 55%, rgba(16, 8, 34, .55) 100%); }

/* Карта ярмарки внизу — бумажный билет с крошечными фудтраками; сырный
   маркер едет по верёвке вместе с прогулкой, текущий фудтрак подпрыгивает. */
.st-map { position: absolute; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 5;
  padding: 10px 16px 8px; background: #fff3d9; color: var(--f-ink); border-radius: 6px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7), inset 0 0 0 2px rgba(34, 22, 63, .08);
  -webkit-mask: radial-gradient(circle 7px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 7px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 7px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 7px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat; }
.st-map-rope { position: relative; height: 10px; margin: 0 20px 4px; border-bottom: 2px dashed rgba(34, 22, 63, .25); }
.st-map-rope i { position: absolute; top: -6px; left: 0; width: 18px; height: 16px; margin-left: -9px;
  background: url("fair/art/sprite-cheese.webp") center / contain no-repeat; transition: left .15s linear; }
.st-map-items { display: flex; gap: 4px; }
.st-map-items button { display: grid; justify-items: center; gap: 1px; width: 74px; padding: 2px 0 0; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: rgba(34, 22, 63, .7); font-family: var(--f-display); font-weight: 700; font-size: 10.5px; letter-spacing: .02em;
  transition: background .25s, color .25s; }
.st-map-items img { width: 58px; height: 38px; object-fit: contain; transition: transform .45s cubic-bezier(.2, .9, .3, 1.6); }
.st-map-items button:hover { background: rgba(34, 22, 63, .06); color: var(--f-ink); }
.st-map-items button:hover img { transform: translateY(-3px) rotate(-3deg); }
.st-map-items button[aria-current="true"] { color: #c2451f; }
.st-map-items button[aria-current="true"] img { transform: translateY(-5px) scale(1.12); animation: fair-hop 1.4s ease-in-out infinite; }
@keyframes fair-hop { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
.st-legal { position: absolute; right: 14px; bottom: 6px; z-index: 4; margin: 0; max-width: 42ch; font-size: 10.5px; line-height: 1.35; text-align: right;
  color: rgba(255, 243, 217, .6); opacity: 0; transition: opacity .4s; pointer-events: none; }
.st-legal.on { opacity: 1; }
body.fair-body #site-footer { display: none; }
.st-hint { position: absolute; left: 50%; bottom: 112px; transform: translateX(-50%); margin: 0; padding: 9px 16px; border-radius: 12px;
  background: rgba(27, 18, 51, .62); backdrop-filter: blur(8px); color: var(--f-cream); font-size: 14px; transition: opacity .5s; pointer-events: none;
  animation: fair-nudge 1.8s ease-in-out infinite; }
@keyframes fair-nudge { 0%, 100% { translate: 0 0; } 50% { translate: 0 4px; } }
.st-hint.gone { opacity: 0; }

/* ── Прилёт и отлёт (assets/fair.js + fair-fly.js) ──
   Постер полёта — площадь ярмарки; под ним улица собирается из-за кадра:
   арка, торговец, фургоны (по очереди), гости — снизу, гирлянда — сверху,
   билет-карта и подсказка — последними. Перед обратным полётом всё
   разлетается тем же путём, и сквозь улицу проявляется первый кадр ролика.
   Движение — свойством translate: transform у этих слоёв занят параллаксом. */
.street-stage.arriving .st-gate, .street-stage.arriving .truck, .street-stage.arriving .st-vendor, .street-stage.arriving .crowd-group { translate: 0 42svh; opacity: 0; }
.street-stage.arriving .st-garland { translate: 0 -24svh; opacity: 0; }
.street-stage.arriving .st-map, .street-stage.arriving .st-hint, .street-stage.arriving .st-neon { translate: 0 30svh; opacity: 0; }
.street-stage.landing .st-gate, .street-stage.landing .truck, .street-stage.landing .st-vendor, .street-stage.landing .crowd-group, .street-stage.landing .st-garland,
.street-stage.landing .st-map, .street-stage.landing .st-hint, .street-stage.landing .st-neon { transition: translate 1s cubic-bezier(.2, .8, .2, 1), opacity .6s ease-out; }
.street-stage.landing .truck { transition-delay: calc(.14s + var(--i, 0) * .07s); }
.street-stage.landing .st-vendor { transition-delay: .08s; }
.street-stage.landing .crowd-group { transition-delay: .05s; }
.street-stage.landing .st-map, .street-stage.landing .st-hint { transition-delay: .6s; }
.street-stage.leaving .st-gate, .street-stage.leaving .truck, .street-stage.leaving .st-vendor, .street-stage.leaving .crowd-group { translate: 0 45svh; opacity: 0; }
.street-stage.leaving .st-garland { translate: 0 -24svh; opacity: 0; }
.street-stage.leaving .st-map, .street-stage.leaving .st-hint, .street-stage.leaving .st-neon { translate: 0 30svh; opacity: 0; }
.street-stage.leaving .st-gate, .street-stage.leaving .truck, .street-stage.leaving .st-vendor, .street-stage.leaving .crowd-group, .street-stage.leaving .st-garland,
.street-stage.leaving .st-map, .street-stage.leaving .st-hint, .street-stage.leaving .st-neon { transition: translate .6s cubic-bezier(.55, 0, .85, .4), opacity .45s ease-in; }
html.fair-flying .fair-bar { opacity: 0; transition: opacity .35s; }
/* посадка с ролика вылета: камера садится на площадь с ударом — кадр встряхивает,
   чуть наезжает и подсвечивается, пока постер растворяется в страницу; постер и
   улица трясутся вместе (класс ставит fair.js на обоих) */
.street-stage.touchdown, .fair-arrive-fly.touchdown { animation: fair-touchdown .7s cubic-bezier(.2, .6, .3, 1) both; }
@keyframes fair-touchdown {
  0% { transform: translate(0, -16px) scale(1.045); filter: brightness(1.35) blur(2.5px); }
  10% { transform: translate(7px, 12px) scale(1.04); filter: brightness(1.15) blur(1.5px); }
  22% { transform: translate(-8px, -6px) scale(1.032); filter: brightness(1.05) blur(.6px); }
  36% { transform: translate(6px, 4px) scale(1.022); filter: none; }
  52% { transform: translate(-3px, -2px) scale(1.012); }
  72% { transform: translate(1.5px, 1px) scale(1.005); }
  100% { transform: none; filter: none; }
}

/* ── Сюрпризы (assets/fair-fun.js) ── */
.st-fw { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* танец торговца: удар на каждую долю, шлейф из двух копий, диско-лучи */
.st-vendor { cursor: pointer; pointer-events: auto; }
.st-vendor.dancing { animation: none; scale: 1.25; transform-origin: 50% 100%; z-index: 2;
  filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 22px rgba(255, 90, 200, .75)) drop-shadow(0 18px 18px rgba(10, 4, 30, .55)); }
.vendor-ghost { scale: 1.25; transform-origin: 50% 100%; }
.st-vendor.hit { animation: vendor-hit .4s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes vendor-hit {
  0% { transform: translateY(0) scale(1, 1) rotate(0); }
  30% { transform: translateY(calc(var(--jump, 1) * -5svh)) scale(.92, 1.1) rotate(calc(var(--jump, 1) * 9deg)); }
  70% { transform: translateY(0) scale(1.1, .9) rotate(calc(var(--jump, 1) * -4deg)); }
  100% { transform: translateY(0) scale(1, 1) rotate(0); } }
.vendor-ghost { pointer-events: none; opacity: .4; translate: -2.2svh 0; filter: blur(1.5px) drop-shadow(0 0 12px #ff3ea5); animation: none !important; }
.vendor-ghost.g2 { opacity: .2; translate: -4.4svh 0; filter: blur(3px) drop-shadow(0 0 14px #1bd7ff); }
.st-disco { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; }
.st-disco i { position: absolute; left: 50%; top: -30%; width: 160vmax; height: 160vmax; margin-left: -80vmax; opacity: .5;
  background: conic-gradient(from 0deg, transparent 0 8deg, hsl(var(--hue, 300deg) 100% 60% / .55) 8deg 13deg, transparent 13deg 40deg,
    hsl(calc(var(--hue, 300deg) + 120deg) 100% 60% / .5) 40deg 45deg, transparent 45deg 80deg, hsl(calc(var(--hue, 300deg) + 240deg) 100% 60% / .5) 80deg 85deg, transparent 85deg 360deg);
  animation: disco-spin 3.2s linear infinite; }
.st-disco i + i { animation-direction: reverse; animation-duration: 4.4s; opacity: .35; }
@keyframes disco-spin { to { transform: rotate(1turn); } }
.st-disco b { position: absolute; inset: 0; background: hsl(var(--hue, 300deg) 100% 55% / .0); animation: strobe .4s steps(2) infinite; }
@keyframes strobe { 50% { background: hsl(var(--hue, 300deg) 100% 60% / .12); } }
.street-stage.kick .st-track, .street-stage.kick .st-sky { animation: bass-kick .18s ease-out; }
@keyframes bass-kick { 30% { translate: 0 4px; scale: 1.006; } }
/* гости: прыжок и реплика */
.crowd-group.jump img { animation: crowd-jump .7s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes crowd-jump { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-3.5svh); } 60% { transform: translateY(-1svh); } }
.crowd-group.flip.jump img { animation-name: crowd-jump-flip; }
@keyframes crowd-jump-flip { 0%, 100% { transform: scaleX(-1) translateY(0); } 40% { transform: scaleX(-1) translateY(-3.5svh); } 60% { transform: scaleX(-1) translateY(-1svh); } }
.crowd-bubble { position: absolute; bottom: 92%; padding: 8px 12px; border-radius: 14px; background: #fff3d9; color: var(--f-ink); white-space: nowrap;
  font-family: var(--f-display); font-weight: 800; font-size: clamp(12px, 1.6svh, 16px); box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .6);
  animation: bubble-pop 2.2s cubic-bezier(.2, 1.4, .4, 1) forwards; pointer-events: none; }
.crowd-bubble::after { content: ""; position: absolute; left: 18px; bottom: -8px; border: 8px solid transparent; border-top-color: #fff3d9; border-bottom: 0; }
@keyframes bubble-pop { 0% { opacity: 0; transform: translateY(10px) scale(.6); } 12% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
.st-countdown { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); z-index: 8; pointer-events: none; font-family: var(--f-display); font-weight: 900;
  font-size: clamp(64px, 18svh, 190px); color: #fff3d9; text-shadow: 0 0 30px rgba(255, 180, 60, .9), 0 6px 0 #b3551f; }
.st-countdown.pop { animation: count-pop .7s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes count-pop { from { transform: translate(-50%, -50%) scale(2.2); opacity: 0; } 40% { opacity: 1; } to { transform: translate(-50%, -50%) scale(1); } }
.st-flash { position: absolute; inset: 0; z-index: 9; background: #fff; pointer-events: none; animation: flash .7s ease-out forwards; }
@keyframes flash { to { opacity: 0; } }
.st-polaroid { position: fixed; left: 50%; top: 50%; z-index: 250; width: min(420px, 86vw); padding: 0; border-radius: 6px; background: #fbf7ee;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .8); transform: translate(-50%, 120%) rotate(8deg); transition: transform .7s cubic-bezier(.2, 1.2, .3, 1); }
.st-polaroid.on { transform: translate(-50%, -50%) rotate(-3deg); }
.st-polaroid img { display: block; width: 100%; height: auto; border-radius: 6px 6px 0 0; }
.sp-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; justify-content: center; }
.sp-actions button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 11px; cursor: pointer; background: var(--f-ink); color: var(--f-cheese);
  font-family: var(--f-display); font-weight: 700; font-size: 13px; }
.sp-actions button[data-a="close"] { background: rgba(34, 22, 63, .08); color: var(--f-ink); }
/* кучи сыра у арки */
.gate-pile { position: absolute; bottom: 12%; width: 17%; height: 34%; padding: 0; border: 0; background: none; cursor: grab; border-radius: 40%; }
.gate-pile.left { left: 8%; } .gate-pile.right { right: 8%; }
.gate-pile:hover { background: radial-gradient(closest-side, rgba(255, 220, 130, .25), transparent); }
.rolling-cheese { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; filter: drop-shadow(0 8px 10px rgba(10, 4, 30, .5)); transition: opacity .5s; }
.rolling-cheese.gone { opacity: 0; }
/* мышонок */
.mouse-runner { position: absolute; left: -12vw; bottom: 2.5svh; z-index: 4; width: clamp(64px, 9svh, 110px); padding: 0; border: 0; background: none; cursor: pointer;
  animation: mouse-run 4s linear forwards; }
.mouse-runner img { display: block; width: 100%; height: auto; animation: mouse-bob .18s ease-in-out infinite alternate; }
@keyframes mouse-run { to { left: 112vw; } }
@keyframes mouse-bob { to { transform: translateY(-4px) rotate(-3deg); } }
.mouse-runner.caught { animation-play-state: paused; }
.mouse-runner.caught img { animation: mouse-caught .8s ease-in forwards; }
@keyframes mouse-caught { 30% { transform: translateY(-30px) scale(1.2) rotate(20deg); } to { transform: translateY(-90px) scale(.4) rotate(360deg); opacity: 0; } }
.mouse-runner.caught::after { content: attr(data-n); position: absolute; left: 50%; bottom: 110%; transform: translateX(-50%); white-space: nowrap;
  padding: 6px 10px; border-radius: 10px; background: var(--f-cheese); color: var(--f-ink); font-family: var(--f-display); font-weight: 800; font-size: 13px; }

/* ── Рейв: улица трясётся от баса трека (переменные ставит fair-fun.js) ── */
.street-stage.rave { transition: none; transform: translate(var(--sx, 0), var(--sy, 0)) rotate(var(--sr, 0deg)) scale(var(--sz, 1)); }
.street-stage.rave .st-sky { filter: brightness(calc(.75 + var(--glow, 0) * .6)) saturate(1.3) hue-rotate(calc(var(--glow, 0) * 30deg)); }
.street-stage.rave.kick .st-track { animation: rgb-split .16s steps(2); }
@keyframes rgb-split { 0% { filter: drop-shadow(calc(var(--kick, 1) * 9px) 0 0 rgba(255, 0, 170, .8)) drop-shadow(calc(var(--kick, 1) * -9px) 0 0 rgba(0, 220, 255, .8)); }
  100% { filter: none; } }
.street-stage.rave.kick::after { content: ""; position: absolute; inset: 0; z-index: 6; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle at 50% 60%, hsl(var(--hue, 300deg) 100% 60% / calc(var(--kick, 1) * .35)), transparent 70%); animation: flash .25s ease-out forwards; }
.street-stage.rave .st-garland { animation: garland-shake .2s ease-in-out infinite alternate; }
@keyframes garland-shake { to { translate: 0 1.4svh; rotate: .5deg; } }
.truck.bounce { animation: truck-bounce .35s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes truck-bounce { 0% { transform: none; } 35% { transform: translateY(-2.6svh) scaleY(1.04); } 70% { transform: translateY(0) scaleY(.96); } 100% { transform: none; } }
.vendor-puff { position: absolute; z-index: 5; pointer-events: none; aspect-ratio: 1; animation: puff 1.2s ease-out forwards;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .9), rgba(255, 180, 90, .5) 45%, transparent 75%); border-radius: 50%; }
img.vendor-puff { background: none; border-radius: 0; aspect-ratio: auto; }
@keyframes puff { 0% { transform: scale(.3); opacity: 0; } 15% { opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
/* Неоновая вывеска над городом */
.st-neon { position: absolute; left: 70vw; top: 17svh; display: flex; gap: .06em; font-family: var(--f-display); font-weight: 900;
  font-size: clamp(26px, 6svh, 70px); letter-spacing: .02em; color: #fff3c4; pointer-events: none;
  text-shadow: 0 0 6px #ffd24d, 0 0 18px #ffb43a, 0 0 42px #ff7a1a, 0 0 80px rgba(255, 90, 20, .6); transform: perspective(600px) rotateY(-8deg); }
.st-neon i { font-style: normal; animation: neon-on 5s var(--d) infinite; }
.st-neon i.flick { animation: neon-flick 3.3s var(--d) infinite; }
@keyframes neon-on { 0%, 88%, 100% { opacity: 1; } 90% { opacity: .75; } }
@keyframes neon-flick { 0%, 40%, 44%, 48%, 100% { opacity: 1; } 42%, 46% { opacity: .15; text-shadow: none; } }
.street-stage.rave .st-neon { color: hsl(var(--hue, 300deg) 100% 85%); text-shadow: 0 0 8px hsl(var(--hue, 300deg) 100% 60%), 0 0 30px hsl(var(--hue, 300deg) 100% 55%), 0 0 70px hsl(var(--hue, 300deg) 100% 50%); }

/* ── Сцены фургонов (assets/fair-scenes.js) ── */
.fair-scene { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; opacity: 0; transition: opacity .45s ease;
  background: radial-gradient(90% 80% at 50% 45%, rgba(20, 10, 40, .55), rgba(8, 4, 18, .94)); }
.fair-scene.on { opacity: 1; }
.scene-body { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: auto; }
.scene-close { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); top: calc(16px + env(safe-area-inset-top, 0px)); z-index: 5;
  width: 50px; height: 50px; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  background: rgba(255, 243, 217, .14); color: #fff3d9; backdrop-filter: blur(8px); transition: transform .3s cubic-bezier(.2, 1.6, .4, 1), background .2s; }
.scene-close:hover { transform: rotate(90deg) scale(1.08); background: rgba(255, 243, 217, .24); }
.scene-close svg { width: 24px; height: 24px; }

/* Телевизор в шатре клана: комната-агитплакат — красные лучи из-за телевизора,
   типографский растр, лозунг-пародия на плакат «Ты записался добровольцем?»,
   тёмный паркет с отсветом кинескопа. Всё — CSS, картинок нет. */
.scene-clan { background: radial-gradient(60% 70% at 50% 58%, #7a1b1b 0%, #4d1012 45%, #240708 100%); overflow: hidden; }
.tv-agit { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.tv-rays { position: absolute; left: 50%; top: 56%; width: 260vmax; height: 260vmax; transform: translate(-50%, -50%); opacity: .55;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 150, 80, .22) 0 5deg, rgba(255, 150, 80, 0) 5deg 12deg);
  -webkit-mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .6) 30%, transparent 62%); mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .6) 30%, transparent 62%);
  animation: tv-rays 90s linear infinite; }
@keyframes tv-rays { to { transform: translate(-50%, -50%) rotate(1turn); } }
/* растр — как на печатном плакате */
.tv-agit::before { content: ""; position: absolute; inset: 0; opacity: .35; mix-blend-mode: multiply;
  background: radial-gradient(circle at 50% 50%, rgba(20, 0, 0, .9) .9px, transparent 1.6px) 0 0 / 5px 5px; }
.tv-floor { position: absolute; left: -10%; right: -10%; bottom: 0; height: 30%; transform: perspective(600px) rotateX(58deg); transform-origin: 50% 100%;
  background: repeating-linear-gradient(90deg, #2b120c 0 46px, #24100a 46px 92px), #24100a; opacity: .95;
  box-shadow: 0 -40px 80px rgba(0, 0, 0, .55) inset; }
.tv-floor::after { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 60% at 50% 0%, rgba(255, 210, 140, .22), transparent 70%); }
.tv-slogan { position: absolute; left: 4vw; top: calc(28px + env(safe-area-inset-top, 0px)); display: grid; transform: rotate(-3deg); transform-origin: 0 0;
  font-family: var(--f-display); font-weight: 900; line-height: .95; letter-spacing: -.02em; text-transform: uppercase; color: #ffe8c2;
  font-size: clamp(30px, 5.6vw, 84px); text-shadow: 0 3px 0 #5a0d0d, 0 10px 30px rgba(0, 0, 0, .5); }
.tv-slogan span:first-child { font-size: .5em; letter-spacing: .06em; color: #ff8a5b; }
.scene-clan .tv-room { z-index: 1; }
.tv-room { position: relative; width: min(92vw, 150svh); aspect-ratio: 16 / 10; display: grid; place-items: center; }
.tv-set { position: relative; height: min(86svh, 78vw); aspect-ratio: 869 / 900; transform: scale(.4) translateY(40%); opacity: 0;
  transition: transform .8s cubic-bezier(.2, 1.3, .4, 1), opacity .4s; filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .8)); }
.fair-scene.on .tv-set { transform: none; opacity: 1; }
.tv-body { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tv-video { position: absolute; object-fit: cover; object-position: 60% 40%; background: #111; border-radius: 9%;
  filter: contrast(1.15) brightness(1.05) sepia(.15); }
.tv-noise, .tv-scan { position: absolute; pointer-events: none; border-radius: 9%; }
.tv-scan { background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .22) 0 2px, transparent 2px 4px); mix-blend-mode: multiply; }
.tv-noise { background: radial-gradient(120% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, .55)); animation: tv-flicker .12s steps(2) infinite; }
@keyframes tv-flicker { 50% { opacity: .85; } }
/* включение кинескопа: белая полоса раскрывается в картинку */
.tv-set.warming .tv-video { animation: tv-on .9s ease-out; }
@keyframes tv-on { 0% { clip-path: inset(49.5% 0 49.5% 0); filter: brightness(4); } 45% { clip-path: inset(49% 0 49% 0); filter: brightness(3); }
  100% { clip-path: inset(0 0 0 0); filter: contrast(1.15) brightness(1.05) sepia(.15); } }
.tv-join { position: absolute; right: 2%; bottom: 6%; display: grid; justify-items: center; padding: 16px 26px 18px; border-radius: 20px; text-decoration: none;
  background: linear-gradient(135deg, #ff3b3b, #ffb43a 45%, #ffd24d); color: #2a0a00; transform: rotate(-4deg);
  box-shadow: 0 0 0 4px #fff3d9, 0 18px 40px -8px rgba(255, 80, 40, .8), 0 0 60px rgba(255, 180, 60, .6);
  animation: join-pulse 1.1s ease-in-out infinite; transition: transform .25s; }
.tv-join span { font-family: "Golos Text", sans-serif; font-weight: 700; font-size: clamp(13px, 1.6vw, 18px); text-transform: uppercase; letter-spacing: .12em; }
.tv-join b { font-family: var(--f-display); font-weight: 900; font-size: clamp(22px, 3.2vw, 44px); line-height: 1; letter-spacing: -.02em; text-transform: uppercase; }
.tv-join:hover { transform: rotate(-2deg) scale(1.08); animation-play-state: paused; }
@keyframes join-pulse { 0%, 100% { transform: rotate(-4deg) scale(1); } 50% { transform: rotate(-3deg) scale(1.06); filter: brightness(1.12) saturate(1.2); } }
@media (max-width: 760px) {
  .tv-room { width: 100%; aspect-ratio: auto; height: 100%; }
  .tv-set { height: auto; width: 92vw; }
  .tv-join { right: 50%; bottom: 7svh; transform: translateX(50%) rotate(-3deg); }
  .tv-slogan { left: 16px; top: calc(66px + env(safe-area-inset-top, 0px)); font-size: clamp(26px, 8.5vw, 40px); }
  @keyframes join-pulse { 0%, 100% { transform: translateX(50%) rotate(-3deg) scale(1); } 50% { transform: translateX(50%) rotate(-2deg) scale(1.06); } }
}

/* Газета Shpak News: пародия на большую утреннюю газету, в пятнах сыра */
.scene-news { background: radial-gradient(80% 70% at 50% 40%, rgba(40, 24, 12, .6), rgba(10, 6, 3, .95)); }
.sn-wrap { position: relative; width: min(920px, 72vw); padding: 5svh 0; margin-left: 20vw; }
.sn-paper { position: relative; padding: 26px clamp(16px, 3vw, 40px) 30px; color: #1d1a16; font-family: "Old Standard", Georgia, serif;
  background: url("fair/art/newsprint.webp") center / cover, #efe6d0; box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .8), inset 0 0 60px rgba(120, 90, 40, .25);
  transform: rotate(-1.2deg); }
.fair-scene.on .sn-paper { animation: sn-spin 1s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes sn-spin { from { transform: scale(.05) rotate(-1080deg); opacity: .4; } 80% { transform: scale(1.03) rotate(1deg); opacity: 1; } to { transform: rotate(-1.2deg); } }
.sn-stains { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; opacity: .85; pointer-events: none; }
.sn-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid #1d1a16; }
.sn-title { margin: 0; font-family: "Unifraktur", "Old Standard", serif; font-weight: 400; font-size: clamp(44px, 8vw, 104px); line-height: 1; letter-spacing: .01em; text-align: center; white-space: nowrap; }
.sn-ear { justify-self: start; max-width: 190px; padding: 6px 8px; border: 1px solid #1d1a16; font-size: 12px; line-height: 1.3; font-style: italic; }
.sn-ear b { display: block; font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.sn-ear.r { justify-self: end; }
.sn-dateline { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 3px double #1d1a16; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; }
.sn-kicker { margin: 0 0 4px; font-family: "Golos Text", sans-serif; font-weight: 600; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #8a2f1d; }
.sn-lead { padding: 16px 0 14px; border-bottom: 1px solid #1d1a16; }
.sn-lead h1 { margin: 0 0 12px; font-weight: 700; font-size: clamp(26px, 4vw, 50px); line-height: 1.05; letter-spacing: -.01em; }
.sn-lead-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.sn-drop { margin: 0; font-size: 17px; line-height: 1.55; column-count: 1; }
.sn-drop::first-letter { float: left; margin: 4px 8px 0 0; font-weight: 700; font-size: 58px; line-height: .8; }
.sn-photo { position: relative; margin: 0; filter: grayscale(1) contrast(1.35) brightness(1.05); }
.sn-photo img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
/* полутон: точечный растр поверх фото */
.sn-photo::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(0, 0, 0, .35) 30%, transparent 32%) 0 0 / 4px 4px; mix-blend-mode: multiply; pointer-events: none; }
.sn-photo figcaption { margin-top: 4px; font-size: 11px; font-style: italic; }
.sn-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; padding-top: 12px; }
.sn-story, .sn-side { padding: 0 14px; border-left: 1px solid rgba(29, 26, 22, .6); }
.sn-story:first-child { border-left: 0; padding-left: 0; }
.sn-story h3 { margin: 0 0 6px; font-weight: 700; font-size: 20px; line-height: 1.15; }
.sn-story p, .sn-side p { margin: 0; font-size: 14.5px; line-height: 1.5; text-align: justify; hyphens: auto; }
.sn-side h4 { margin: 0 0 6px; font-family: "Golos Text", sans-serif; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid #1d1a16; }
.sn-side table { width: 100%; margin-bottom: 12px; font-size: 13.5px; border-collapse: collapse; }
.sn-side td { padding: 3px 0; border-bottom: 1px dotted rgba(29, 26, 22, .5); }
.sn-side td + td { text-align: right; font-weight: 700; }
.sn-ad { padding: 8px; border: 2px solid #1d1a16; font-style: italic; }
.sn-boy { position: absolute; left: -30%; bottom: -2svh; max-width: none; z-index: 2; height: min(58svh, 520px); pointer-events: none; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .6));
  transform: translateX(-60%); opacity: 0; transition: transform .6s cubic-bezier(.2, 1.4, .4, 1) .5s, opacity .3s .5s; }
.fair-scene.on .sn-boy { transform: none; opacity: 1; }
@media (max-width: 760px) {
  .sn-head { grid-template-columns: 1fr; } .sn-ear { display: none; }
  .sn-dateline { flex-wrap: wrap; font-size: 11px; }
  .sn-lead-body { grid-template-columns: 1fr; }
  .sn-story { border-left: 0; padding: 10px 0; border-top: 1px solid rgba(29, 26, 22, .5); }
  .sn-side { border-left: 0; padding: 10px 0; }
  .sn-boy { display: none; }
  .sn-wrap { width: 94vw; margin-left: 0; }
  .scene-news .scene-body { place-items: start center; }
}

/* Урок у доски */
.scene-quests { background: radial-gradient(70% 60% at 40% 40%, #3b2a1c, #120b06 80%); }
.cl-room { position: relative; width: min(1180px, 96vw); display: grid; grid-template-columns: minmax(0, 1fr) min(32%, 340px); align-items: end; gap: 0; }
.cl-board { position: relative; padding: 28px 34px 30px; border: 18px solid #7a4e28; border-radius: 10px; color: #f3f1e4; font-family: "Neucha", "Golos Text", sans-serif;
  background: radial-gradient(120% 90% at 30% 20%, rgba(255, 255, 255, .07), transparent 60%), repeating-radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .025) 0 2px, transparent 2px 5px), #1f2f28;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, .55), 0 40px 80px -20px rgba(0, 0, 0, .8); text-shadow: 0 0 1px rgba(255, 255, 255, .7), 0 0 8px rgba(255, 255, 255, .15); }
.cl-board::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: -30px; height: 12px; border-radius: 3px; background: #5c3a1c; box-shadow: 0 4px 8px rgba(0, 0, 0, .5); }
.cl-board h2 { margin: 0; font-weight: 400; font-size: clamp(34px, 4vw, 54px); line-height: 1; }
.cl-note { margin: 4px 0 18px; opacity: .7; font-size: 18px; }
.cl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cl-row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 6px 4px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  border-radius: 8px; transition: background .2s; }
.cl-row:hover { background: rgba(255, 255, 255, .05); }
.cl-text { font-size: clamp(20px, 2.1vw, 28px); line-height: 1.1; clip-path: inset(0 100% 0 0); animation: chalk-write .7s steps(24) forwards; animation-delay: calc(.5s + var(--i) * .42s); }
.cl-list li { --i: 0; }
.cl-text small { display: block; font-size: .62em; opacity: .7; }
@keyframes chalk-write { to { clip-path: inset(0 0 0 0); } }
.cl-box { flex: 0 0 auto; width: 36px; height: 36px; }
.cl-box rect { fill: none; stroke: #f3f1e4; stroke-width: 2.2; stroke-dasharray: 3 2; opacity: .8; }
.cl-tick { fill: none; stroke: #ffe39a; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 50; stroke-dashoffset: 50; transition: stroke-dashoffset .35s ease-out; }
.cl-row.done .cl-tick { stroke-dashoffset: 0; }
.cl-row.done .cl-text { text-decoration: line-through; text-decoration-color: rgba(255, 227, 154, .85); text-decoration-thickness: 3px; opacity: .75; }
.cl-star { position: absolute; right: 26px; top: 20px; font-style: normal; font-size: 90px; line-height: 1; color: #ffd24d; filter: drop-shadow(0 0 16px rgba(255, 200, 60, .9));
  transform: scale(0) rotate(-180deg); transition: transform .7s cubic-bezier(.2, 1.6, .4, 1); }
.cl-room.star .cl-star { transform: scale(1) rotate(-12deg); }
.cl-teacher { position: relative; height: min(80svh, 640px); }
.cl-teacher img { position: absolute; right: 0; bottom: -4svh; height: 100%; max-width: none; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .6)); transition: opacity .2s; }
.cl-teacher .t-happy { opacity: 0; }
.cl-room.happy .t-happy { opacity: 1; } .cl-room.happy .t-base { opacity: 0; }
.cl-bubble { position: absolute; left: -12%; top: 6%; max-width: 220px; padding: 10px 14px; border-radius: 16px; background: #fff3d9; color: #22163f;
  font-family: var(--f-display); font-weight: 800; font-size: 15px; opacity: 0; transform: scale(.6); }
.cl-bubble::after { content: ""; position: absolute; right: 24px; bottom: -9px; border: 9px solid transparent; border-top-color: #fff3d9; border-bottom: 0; }
.cl-bubble.on { animation: bubble-pop 2.4s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@media (max-width: 760px) {
  .cl-room { grid-template-columns: 1fr; padding-top: 70px; }
  .cl-teacher { position: absolute; right: 0; bottom: -2svh; height: 34svh; pointer-events: none; }
  .cl-bubble { left: -40%; }
  .cl-board { padding: 18px 16px 22px; border-width: 12px; margin-bottom: 30svh; }
}

/* Билетный автомат */
.scene-pass { background: radial-gradient(70% 60% at 30% 50%, #2e1f3f, #0e0816 80%); }
.tm-room { position: relative; width: min(1180px, 96vw); height: min(90svh, 760px); }
.tm-machine { position: absolute; left: 2%; bottom: 4%; height: 86%; aspect-ratio: 593 / 900; transform-origin: 50% 100%; }
.tm-body { width: 100%; height: 100%; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .7)); }
.tm-room.printing .tm-machine { animation: tm-shake .09s linear infinite; }
@keyframes tm-shake { 50% { transform: translateX(2px) rotate(.4deg); } }
.tm-room.pulled .tm-machine { animation: tm-pull .45s cubic-bezier(.3, 1.6, .4, 1); }
@keyframes tm-pull { 40% { transform: scaleY(.97) rotate(-1deg); } }
/* рычаг — слой поверх корпуса; место и ось ставит fair-scenes.js (LEVER),
   угол — переменная --a: тянется указателем, по клику уходит вниз сам */
.tm-lever { position: absolute; padding: 0; border: 0; background: none; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent;
  transform: rotate(var(--a, 0deg)); will-change: transform; }
.tm-lever img { display: block; width: 100%; height: auto; pointer-events: none; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .6)); transition: filter .25s; }
.tm-lever:hover img, .tm-lever:focus-visible img { filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .6)) brightness(1.12); }
.tm-lever:focus-visible { outline: none; }
.tm-lever.held { cursor: grabbing; }
/* ход тяжёлый: вниз с разгоном, назад — пружиной с перелётом */
.tm-lever.pulling { transition: transform .56s cubic-bezier(.6, 0, .9, .5); }
.tm-lever.spring { transition: transform .95s cubic-bezier(.2, 1.9, .35, 1); }
/* подсказка «потяните»: рычаг покачивается и рядом стрелка, пока его ни разу не трогали */
.tm-room:not(.touched) .tm-lever:not(.held):not(.pulling):not(.spring) { animation: tm-nudge 2.6s ease-in-out infinite; }
@keyframes tm-nudge { 0%, 64%, 100% { transform: rotate(var(--a, 0deg)); } 74% { transform: rotate(calc(var(--a, 0deg) + 11deg)); } 86% { transform: rotate(calc(var(--a, 0deg) - 2deg)); } }
/* подсказка над шаром рычага: стрелка дугой вниз к ручке */
.tm-hint { position: absolute; left: 66%; bottom: 101%; display: grid; justify-items: center; gap: 2px; transform: translateX(-50%); color: #ffe39a; pointer-events: none;
  font-family: var(--f-display); font-weight: 800; font-size: clamp(12px, 1.1vw, 15px); line-height: 1.15; text-align: center; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .8); opacity: 0; transition: opacity .4s; }
.tm-hint svg { width: 40px; height: 40px; order: 2; transform: rotate(60deg); }
.tm-hint b { font-weight: inherit; }
.tm-room:not(.touched) .tm-hint { opacity: 1; animation: tm-hint 2.6s ease-in-out infinite; }
@keyframes tm-hint { 0%, 64%, 100% { translate: 0 0; } 74% { translate: 0 8px; } }
.tm-plate { position: absolute; left: 18%; right: 26%; top: 36%; display: grid; gap: 4px; padding: 8px 10px; border-radius: 8px; text-align: center;
  background: linear-gradient(#f6e2a6, #c99a3a); box-shadow: inset 0 2px 3px rgba(255, 255, 255, .6), 0 4px 10px rgba(0, 0, 0, .5); }
.tm-plate span { font-family: "Golos Text", sans-serif; font-weight: 700; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #4a2a08; }
.tm-plate input { width: 100%; min-height: 40px; border: 2px solid #6b4410; border-radius: 6px; background: #1b1206; color: #ffd24d; text-align: center;
  font-family: var(--f-display); font-weight: 900; font-size: 20px; }
.tm-side { position: absolute; left: 52%; right: 2%; top: 6%; color: #fff3d9; }   /* правее хода рычага */
.tm-side h2 { margin: 0 0 8px; font-family: var(--f-display); font-weight: 900; font-size: clamp(28px, 3.6vw, 48px); color: #ffe39a; text-transform: uppercase; letter-spacing: -.02em; }
.tm-side p { margin: 0 0 16px; font-size: 16px; line-height: 1.5; max-width: 44ch; color: rgba(255, 243, 217, .85); }
.tm-pull { min-height: 56px; padding: 0 26px; border: 0; border-radius: 16px; cursor: pointer; font-family: var(--f-display); font-weight: 900; font-size: 17px; text-transform: uppercase;
  background: linear-gradient(#ffe39a, #e2ad37); color: #4a1206; box-shadow: 0 6px 0 #8a5a14, 0 14px 30px rgba(0, 0, 0, .5); }
.tm-pull:active { transform: translateY(5px); box-shadow: 0 1px 0 #8a5a14; }
/* лента билетов выезжает из щели автомата вправо */
.tm-strip { position: absolute; left: 44%; right: 0; top: 58%; overflow-x: auto; overflow-y: visible; padding: 10px 0 40px; scrollbar-width: thin; }
.tm-roll { display: flex; gap: 0; width: max-content; }
.tm-t { position: relative; width: 128px; min-height: 132px; padding: 12px 8px; display: grid; align-content: start; justify-items: center; gap: 2px; text-align: center; color: #3a1d06;
  background: linear-gradient(#fff6de, #f1dfae); border-left: 2px dashed rgba(90, 50, 10, .45); box-shadow: 0 8px 14px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateX(-60px) rotate(-3deg); animation: tm-out .35s cubic-bezier(.2, .9, .3, 1.2) forwards; }
@keyframes tm-out { to { opacity: 1; transform: none; } }
.tm-t small { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.tm-t b { font-family: var(--f-display); font-weight: 900; font-size: 34px; line-height: 1; }
.tm-t b.wide { font-size: 17px; line-height: 1.1; letter-spacing: -.01em; padding: 6px 0 4px; }
.tm-t em { font-style: normal; font-size: 11px; line-height: 1.2; }
.tm-t.gift { background: linear-gradient(#ffe39a, #f0b940); }
.tm-t.final { width: 170px; background: linear-gradient(#ffd24d, #ff9f2a); color: #2a0a00; }
.tm-t.final b { font-size: 30px; }
.tm-stamp { position: absolute; right: 6px; bottom: 8px; padding: 3px 6px; border: 2px solid #b3261e; border-radius: 4px; color: #b3261e; font-style: normal;
  font-family: var(--f-display); font-weight: 900; font-size: 10px; text-transform: uppercase; transform: rotate(-14deg) scale(2.4); opacity: 0; }
.tm-room.printed .tm-stamp { animation: stamp-hit .4s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes stamp-hit { to { transform: rotate(-14deg) scale(1); opacity: .9; } }
@media (max-width: 760px) {
  .tm-room { height: 100svh; }
  /* телефон: текст сверху компактно, автомат ниже и левее — рычагу нужно место справа */
  .tm-machine { height: 42%; left: 42%; transform: translateX(-50%); bottom: 23%; }
  /* телефон: над шаром места нет (кнопка сверху) — только стрелка у ручки */
  .tm-hint { left: 74%; bottom: 96%; }
  .tm-hint b { display: none; }
  .tm-hint svg { width: 30px; height: 30px; }
  .tm-side { left: 16px; right: 16px; top: calc(62px + env(safe-area-inset-top, 0px)); }
  .tm-side h2 { font-size: 26px; margin-bottom: 6px; }
  .tm-side p { font-size: 14px; line-height: 1.4; margin-bottom: 10px; max-width: 32ch; }
  .tm-pull { min-height: 46px; padding: 0 18px; font-size: 14px; }
  .tm-strip { left: 0; top: auto; bottom: 2%; }
}

/* ── Прилавок (окно фудтрака) ── */
/* Камера въезжает в фудтрак: сцена растёт к окну, остальное гаснет */
.street-stage.truck-zoom { transition: transform .75s cubic-bezier(.25, .9, .3, 1), filter .5s; transform: scale(1.55); }
.street-stage.truck-zoom .truck:not(.is-open), .street-stage.truck-zoom .st-vendor, .street-stage.truck-zoom .st-gate { filter: brightness(.35) saturate(.6); transition: filter .5s; }
.street-stage.truck-zoom .truck.is-open { filter: brightness(1.15) saturate(1.1); }
.counter { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; perspective: 1400px;
  background: radial-gradient(80% 70% at 50% 50%, rgba(16, 9, 36, .15), rgba(16, 9, 36, .55)); opacity: 0; transition: opacity .35s ease; }
.counter.on { opacity: 1; }
.counter-card { position: relative; width: min(880px, 100%); max-height: calc(100svh - 40px); overflow: auto; overscroll-behavior: contain;
  padding: 58px clamp(18px, 4vw, 44px) 32px; border-radius: 22px; background: var(--f-cream); color: var(--f-ink);
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .7);
  transform: translate(var(--fx, 0), var(--fy, 40px)) scale(.06) rotate(-6deg); opacity: .4;
  transition: transform .62s cubic-bezier(.2, .95, .25, 1.12), opacity .25s ease; }
.counter.on .counter-card { transform: none; opacity: 1; }
/* У каждого фургона свой выход:
   газета влетает с кручением, как в старом кино; билет печатается из окна;
   доска откидывается на петлях сверху; автомат выезжает снизу; будка
   выпрыгивает; свиток разворачивается (ниже, у темы клана). */
.counter[data-theme="news"].on .counter-card { animation: in-newspaper .9s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes in-newspaper { from { transform: translate(var(--fx), var(--fy)) scale(.05) rotate(-1080deg); opacity: .5; }
  80% { transform: scale(1.04) rotate(4deg); opacity: 1; } to { transform: none; } }
.counter[data-theme="pass"].on .counter-card { animation: in-ticket .85s cubic-bezier(.3, .9, .3, 1) both; }
@keyframes in-ticket { from { clip-path: inset(0 0 100% 0); transform: translate(calc(var(--fx) * .4), calc(var(--fy) * .4)) rotate(-4deg); }
  70% { clip-path: inset(0 0 0 0); transform: rotate(2deg); } to { clip-path: inset(0 0 0 0); transform: none; } }
.counter[data-theme="quests"].on .counter-card { transform-origin: 50% 0; animation: in-board 1s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes in-board { from { transform: translateY(-40vh) rotateX(-95deg); opacity: 0; } 25% { opacity: 1; } to { transform: none; } }
.counter[data-theme="wheel"].on .counter-card { animation: in-booth .75s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes in-booth { from { transform: translate(var(--fx), var(--fy)) scale(.1) rotate(15deg); } to { transform: none; } }
.counter[data-theme="game"].on .counter-card { animation: in-arcade .8s cubic-bezier(.3, 1.3, .5, 1) both; }
@keyframes in-arcade { from { transform: translateY(80vh) scaleY(1.2); } 60% { transform: translateY(-3vh) scaleY(.95); } to { transform: none; } }

/* Газета «Сырный вестник» */
.counter[data-theme="news"] .counter-card { border-radius: 4px; background:
  repeating-linear-gradient(0deg, rgba(60, 40, 20, .035) 0 1px, transparent 1px 4px), #f2e8d2; color: #2a2118;
  font-family: Georgia, "Times New Roman", serif; }
.counter[data-theme="news"] .counter-awning { display: none; }
.counter[data-theme="news"] .counter-title { margin-top: -26px; padding-bottom: 12px; border-bottom: 4px double #2a2118; text-align: center;
  font-family: "Yeseva One", Georgia, serif; font-weight: 400; font-size: clamp(34px, 5vw, 58px); letter-spacing: 0; }
.counter[data-theme="news"] .counter-title::after { content: "Ярмарочный выпуск · Шпаковград · цена — один сырный жетон"; display: block; margin-top: 8px;
  font-family: "Golos Text", sans-serif; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(42, 33, 24, .7); }
.counter[data-theme="news"] .c-list { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; margin-top: 14px; }
.counter[data-theme="news"] .c-list li { background: none; border-radius: 0; padding: 14px 16px; border-left: 1px solid rgba(42, 33, 24, .25); }
.counter[data-theme="news"] .c-list li:nth-child(odd) { border-left: 0; }
.counter[data-theme="news"] .c-list li > b { color: #8a2f1d; }
.counter[data-theme="news"] .c-list h3 { font-family: "Yeseva One", Georgia, serif; font-weight: 400; font-size: 20px; }

/* Меловая доска заданий */
.counter[data-theme="quests"] .counter-card { border-radius: 10px; border: 14px solid #7a4e28; color: #f3f1e4;
  background: radial-gradient(120% 90% at 30% 20%, rgba(255, 255, 255, .06), transparent 60%),
    repeating-radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .02) 0 2px, transparent 2px 5px), #20302a;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .5), 0 40px 90px -20px rgba(0, 0, 0, .7); }
.counter[data-theme="quests"] .counter-awning { display: none; }
.counter[data-theme="quests"] .counter-card { padding-top: 30px; }
.counter[data-theme="quests"] .counter-close { top: 16px; background: rgba(255, 255, 255, .08); color: #f3f1e4; }
.counter[data-theme="quests"] .counter-title, .counter[data-theme="quests"] .counter-body { text-shadow: 0 0 1px rgba(255, 255, 255, .6), 0 0 6px rgba(255, 255, 255, .15); }
.counter[data-theme="quests"] .quest { background: transparent; border-bottom: 1px dashed rgba(243, 241, 228, .3); border-radius: 0; }
.counter[data-theme="quests"] .quest span small { color: rgba(243, 241, 228, .6); }
.counter[data-theme="quests"] .quest input { accent-color: #f3f1e4; }
.counter[data-theme="quests"] .quest.done span { text-decoration-color: #ffe39a; text-decoration-thickness: 3px; }

/* Билет боевого пропуска */
.counter[data-theme="pass"] .counter-card { border-radius: 8px; background:
  linear-gradient(90deg, transparent 0 78%, rgba(34, 22, 63, .06) 78% 78.3%, transparent 78.3%), #ffe9ae;
  -webkit-mask: radial-gradient(circle 12px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 12px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 12px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 12px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat; }
.counter[data-theme="pass"] .counter-title::before { content: "Сезон ярмарки · вход по пропуску"; display: block; margin-bottom: 6px;
  font-family: "Golos Text", sans-serif; font-weight: 600; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #b3551f; }
.counter[data-theme="pass"] .pass-rewards span.got { background: #d0673e; color: #fff; }

/* Лотерейная будка: лампочки по краю бегут огоньком */
.counter[data-theme="wheel"] .counter-card { background: #2a1846; color: var(--f-cream); border: 3px solid #ffb43a; }
.counter[data-theme="wheel"] .counter-card::before { content: ""; position: absolute; inset: 8px; border-radius: 16px; pointer-events: none;
  background: radial-gradient(circle, #ffe39a 0 3px, transparent 4px) 0 0 / 22px 22px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 6px; animation: fair-marquee .8s steps(2) infinite; filter: drop-shadow(0 0 4px #ffb43a); }
@keyframes fair-marquee { to { background-position: 11px 11px; } }
.counter[data-theme="wheel"] .counter-awning { display: none; }
.counter[data-theme="wheel"] .counter-card { padding-top: 34px; }
.counter[data-theme="wheel"] .counter-close { top: 18px; background: rgba(255, 255, 255, .1); color: var(--f-cream); }
.counter[data-theme="wheel"] .counter-title { color: #ffd24d; }
.counter[data-theme="wheel"] .f-btn { background: #ffd24d; color: var(--f-ink); }
.counter[data-theme="wheel"] .f-btn.alt { background: rgba(255, 255, 255, .12); color: var(--f-cream); }
.counter[data-theme="wheel"] .wheel-result small, .counter[data-theme="wheel"] .counter-body p { color: rgba(255, 243, 217, .8); }
.counter[data-theme="wheel"] .wheel-sum li { background: rgba(255, 255, 255, .08); }

/* Игровой автомат */
.counter[data-theme="game"] .counter-card { background: #0d0a1c; color: #e8f7ff; border: 3px solid #ff3ea5;
  box-shadow: 0 0 0 3px #1bd7ff, 0 0 40px rgba(255, 62, 165, .5), 0 40px 90px -20px rgba(0, 0, 0, .7); }
.counter[data-theme="game"] .counter-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px); }
.counter[data-theme="game"] .counter-awning { display: none; }
.counter[data-theme="game"] .counter-card { padding-top: 34px; }
.counter[data-theme="game"] .counter-close { top: 18px; background: rgba(255, 255, 255, .1); color: #e8f7ff; }
.counter[data-theme="game"] .counter-title { color: #ffe14d; text-shadow: 0 0 12px rgba(255, 225, 77, .7), 3px 3px 0 #ff3ea5; }
.counter[data-theme="game"] .game-card .f-btn { border-radius: 50%; width: 120px; height: 120px; padding: 0; background: radial-gradient(circle at 40% 35%, #ff7cc4, #ff1f8e 60%, #b10060);
  box-shadow: 0 8px 0 #7a0043, 0 0 30px rgba(255, 62, 165, .7); font-size: 18px; }
.counter[data-theme="game"] .game-card .f-btn:active { transform: translateY(6px); box-shadow: 0 2px 0 #7a0043, 0 0 30px rgba(255, 62, 165, .7); }

/* Свиток клана: разворачивается сверху вниз */
.counter[data-theme="clan"] .counter-card { border-radius: 6px; color: #3a2512;
  background: radial-gradient(120% 90% at 50% 50%, #f3e2bb 55%, #d8b97e 100%); }
.counter[data-theme="clan"] .counter-awning { height: 22px; background: linear-gradient(#6b3f1c, #9a6634); -webkit-mask: none; mask: none; border-radius: 6px 6px 0 0; }
.counter[data-theme="clan"] .counter-title { font-family: "Yeseva One", Georgia, serif; font-weight: 400; letter-spacing: 0; }
.counter[data-theme="clan"].on .counter-body::before { animation: stamp-hit .45s cubic-bezier(.3, 1.6, .5, 1) .7s both; }
@keyframes stamp-hit { from { transform: scale(2.6); opacity: 0; } 60% { opacity: 1; } to { transform: none; } }
.counter[data-theme="clan"] .counter-body::before { content: ""; float: right; width: 92px; height: 92px; margin: -6px 0 8px 12px;
  background: url("../public/brand/shpakovgrad-stamp.png") center / contain no-repeat; rotate: 12deg; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .3)); }
.counter[data-theme="clan"] .clan-tips blockquote { background: transparent; color: #3a2512; border-left: 3px solid #8a2f1d; border-radius: 0; }
.counter[data-theme="clan"] .clan-tips blockquote b { color: #8a2f1d; }
.counter[data-theme="clan"].on .counter-card { animation: fair-unroll .7s cubic-bezier(.3, .8, .3, 1) both; }
@keyframes fair-unroll { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
/* навес над окном: полосы сыра и сливок с фестоном */
.counter-awning { position: absolute; left: 0; right: 0; top: 0; height: 40px; border-radius: 22px 22px 0 0;
  background: repeating-linear-gradient(90deg, var(--f-cheese) 0 44px, #fff8e8 44px 88px);
  -webkit-mask: radial-gradient(22px 12px at 22px 100%, transparent 98%, #000) 0 0 / 44px 100% repeat-x;
  mask: radial-gradient(22px 12px at 22px 100%, transparent 98%, #000) 0 0 / 44px 100% repeat-x; }
.counter-close { position: absolute; right: 12px; top: 48px; width: 44px; height: 44px; border: 0; border-radius: 12px; cursor: pointer;
  background: rgba(34, 22, 63, .08); color: var(--f-ink); display: grid; place-items: center; }
.counter-close svg { width: 22px; height: 22px; }
.counter-title { margin: 0 52px 18px 0; font-family: var(--f-display); font-weight: 900; font-size: clamp(26px, 3.4vw, 42px); line-height: 1; letter-spacing: -.03em; }
.counter-body { font-size: 15.5px; line-height: 1.55; }
.counter-body p { margin: 0 0 12px; }

.c-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.c-list li { display: grid; grid-template-columns: 44px 1fr; gap: 4px 14px; align-items: start; padding: 14px 16px; border-radius: 14px; background: rgba(34, 22, 63, .05); }
.c-list li > b { grid-row: span 2; font-family: var(--f-display); font-weight: 900; font-size: 26px; line-height: 1; color: #d0673e; }
.c-list h3 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.c-list p { margin: 0; color: rgba(34, 22, 63, .75); }

/* пропуск */
.pass-in { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 18px; margin-bottom: 16px; }
.pass-in label { display: grid; gap: 6px; font-size: 13px; color: rgba(34, 22, 63, .7); }
.pass-in input { width: 180px; min-height: 52px; padding: 0 14px; border-radius: 12px; border: 2px solid rgba(34, 22, 63, .15); background: #fff;
  font-family: var(--f-display); font-weight: 800; font-size: 22px; color: var(--f-ink); }
.pass-in input:focus { outline: none; border-color: #d0673e; }
.pass-level { font-family: var(--f-display); font-weight: 900; font-size: clamp(40px, 6vw, 64px); line-height: .9; color: #d0673e; }
.pass-level small { display: block; margin-top: 6px; font-family: "Golos Text", sans-serif; font-weight: 400; font-size: 14px; color: rgba(34, 22, 63, .7); }
.pass-track { position: relative; height: 18px; border-radius: 9px; background: rgba(34, 22, 63, .1); overflow: hidden; margin: 8px 0 10px; }
.pass-track i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 9px; background: linear-gradient(90deg, #ffb43a, #ffd24d);
  transition: width .6s cubic-bezier(.2, .9, .3, 1); }
.pass-verdict { margin: 0 0 14px; font-weight: 600; }
.pass-rewards { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.pass-rewards span { flex: 0 0 auto; padding: 10px 12px; border-radius: 12px; background: rgba(34, 22, 63, .06); font-size: 13px; }
.pass-rewards span b { display: block; font-family: var(--f-display); font-weight: 800; font-size: 15px; }
.pass-rewards span.got { background: #ffd24d; }

/* задания */
.quest { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px;
  background: rgba(34, 22, 63, .05); cursor: pointer; }
.quest + .quest { margin-top: 8px; }
.quest input { width: 24px; height: 24px; accent-color: #d0673e; }
.quest span small { display: block; color: rgba(34, 22, 63, .6); font-size: 12.5px; }
.quest em { font-style: normal; font-weight: 600; font-size: 13px; white-space: nowrap; }
.quest.done span { text-decoration: line-through; opacity: .55; }

/* рулетка */
.wheel-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 28px; align-items: center; }
.wheel { position: relative; width: min(100%, 360px); aspect-ratio: 1; margin: 0 auto; }
.wheel svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 16px 30px rgba(34, 22, 63, .35)); }
.wheel-rot { transform-origin: 50% 50%; }
.wheel-pin { position: absolute; left: 50%; top: -8px; transform: translateX(-50%); width: 26px; height: 34px;
  background: #d0673e; clip-path: polygon(50% 100%, 0 0, 100% 0); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .3)); }
.wheel-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.f-btn { min-height: 50px; padding: 0 20px; border: 0; border-radius: 13px; cursor: pointer; background: var(--f-ink); color: var(--f-cheese);
  font-family: var(--f-display); font-weight: 800; font-size: 15px; transition: transform .25s cubic-bezier(.2, .9, .3, 1.3); }
.f-btn:hover { transform: translateY(-2px); }
.f-btn.alt { background: rgba(34, 22, 63, .08); color: var(--f-ink); }
.f-btn:disabled { opacity: .45; transform: none; cursor: default; }
.wheel-result { min-height: 3.2em; margin: 14px 0 0; font-family: var(--f-display); font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.wheel-result small { display: block; font-family: "Golos Text", sans-serif; font-weight: 400; font-size: 13.5px; color: rgba(34, 22, 63, .65); }
.wheel-sum { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.wheel-sum li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 9px; background: rgba(34, 22, 63, .05); }
.wheel-sum b { font-family: var(--f-display); font-weight: 800; }

/* игра */
.game-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.game-card .f-btn { min-height: 60px; font-size: 18px; padding: 0 28px; background: #d0673e; color: #fff; }

/* клан */
.clan-tips { display: grid; gap: 10px; }
.clan-tips blockquote { margin: 0; padding: 16px 18px; border-radius: 14px; background: var(--f-ink); color: var(--f-cream); }
.clan-tips blockquote b { display: block; margin-bottom: 4px; font-family: var(--f-display); font-weight: 800; color: var(--f-cheese); }

/* ── Мини-игра ── */
.fg { position: fixed; inset: 0; z-index: 300; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  background: radial-gradient(120% 90% at 50% 120%, #c2553a 0%, #6b2f73 38%, #2a1b52 70%, var(--f-night) 100%);
  opacity: 0; transition: opacity .35s ease; }
.fg.on { opacity: 1; }
.fg::before { content: ""; position: absolute; inset: 0; background: url("fair/art/fair-sky.webp") center / cover; opacity: .35; filter: blur(3px); }
.fg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fg-hud { position: absolute; left: 0; right: 0; top: calc(14px + env(safe-area-inset-top, 0px)); display: flex; align-items: center; gap: 14px;
  padding: 0 70px 0 20px; opacity: 0; transition: opacity .3s; pointer-events: none; }
.fg.playing .fg-hud { opacity: 1; }
.fg-score { font-family: var(--f-display); font-weight: 900; font-size: clamp(36px, 7vw, 64px); line-height: 1; color: var(--f-cheese);
  font-variant-numeric: tabular-nums; text-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.fg-mult { font-family: var(--f-display); font-weight: 800; font-size: 22px; color: var(--f-cream); }
.fg-time { flex: 1; max-width: 320px; height: 12px; margin-left: auto; border-radius: 6px; background: rgba(255, 243, 217, .18); overflow: hidden; }
.fg-time i { display: block; height: 100%; background: linear-gradient(90deg, #ffb43a, #ffd24d); transform-origin: left; }
.fg-fever { position: absolute; left: 50%; top: 18%; transform: translate(-50%, -20px) rotate(-4deg); font-family: var(--f-display); font-weight: 900;
  font-size: clamp(34px, 8vw, 80px); color: var(--f-cheese); text-transform: uppercase; letter-spacing: -.03em;
  text-shadow: 0 0 30px rgba(255, 160, 40, .8), 0 5px 0 #b3551f; opacity: 0; transition: opacity .3s, transform .4s cubic-bezier(.2, .9, .3, 1.4); pointer-events: none; }
.fg.fever .fg-fever { opacity: 1; transform: translate(-50%, 0) rotate(-4deg); animation: fair-pulse .6s ease-in-out infinite alternate; }
.fg.fever::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px rgba(255, 170, 40, .55); }
@keyframes fair-pulse { to { scale: 1.06; } }
.fg-screen { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100% - 32px)); z-index: 2;
  padding: 28px clamp(18px, 4vw, 34px); border-radius: 22px; background: var(--f-cream); color: var(--f-ink); text-align: center;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .7); }
.fg-screen[hidden] { display: none; }
.fg-screen h2 { margin: 0 0 10px; font-family: var(--f-display); font-weight: 900; font-size: clamp(28px, 5vw, 42px); line-height: 1; letter-spacing: -.03em; color: #d0673e; }
.fg-screen p { margin: 0 0 14px; font-size: 15px; line-height: 1.5; }
.fg-legend { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.fg-legend span { display: grid; justify-items: center; gap: 2px; width: 74px; padding: 6px 0 8px; border-radius: 12px; background: rgba(34, 22, 63, .06);
  font-family: var(--f-display); font-weight: 800; font-size: 14px; }
.fg-legend canvas { width: 44px; height: 44px; }
.fg-btn { min-height: 54px; padding: 0 24px; border: 0; border-radius: 14px; cursor: pointer; background: #d0673e; color: #fff;
  font-family: var(--f-display); font-weight: 800; font-size: 17px; transition: transform .25s cubic-bezier(.2, .9, .3, 1.3); }
.fg-btn:hover { transform: translateY(-2px); }
.fg-btn.fg-quiet { background: rgba(34, 22, 63, .08); color: var(--f-ink); }
.fg-best, .fg-best2 { display: block; margin-top: 10px; font-size: 13.5px; color: rgba(34, 22, 63, .65); }
.fg-rank { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 18px; }
.fg-final { display: block; font-family: var(--f-display); font-weight: 900; font-size: clamp(72px, 16vw, 128px); line-height: .9; color: #d0673e; letter-spacing: -.04em; }
.fg-result.record .fg-best2 { color: #d0673e; font-weight: 700; }
.fg-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.fg-close { position: absolute; right: 14px; top: calc(14px + env(safe-area-inset-top, 0px)); z-index: 3; width: 46px; height: 46px; border: 0; border-radius: 13px;
  background: rgba(255, 243, 217, .14); color: var(--f-cream); cursor: pointer; display: grid; place-items: center; }
.fg-close svg { width: 22px; height: 22px; }

@media (max-width: 760px) {
  .fb-sample { display: none; }
  .kh-label { display: none; }
  .st-gate { bottom: 14svh; }
  .truck, .st-vendor { bottom: 13svh; }
  .st-crowd { height: 20svh; }
  .st-map { left: 8px; right: 8px; transform: none; padding: 8px 10px 6px; }
  .st-map-items { overflow-x: auto; scrollbar-width: none; }
  .st-map-items::-webkit-scrollbar { display: none; }
  .st-map-items button { flex: 0 0 auto; width: 62px; }
  .st-map-items img { width: 48px; height: 32px; }
  .st-hint { bottom: auto; top: calc(74px + env(safe-area-inset-top, 0px)); }
  .st-legal { display: none; }
  .counter { padding: 0; place-items: end stretch; }
  .counter-card { width: 100%; max-height: 88svh; border-radius: 22px 22px 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .wheel-wrap, .game-card { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .truck-sign, .fg.fever .fg-fever, .st-vendor, .st-hint, .st-map-items img, .counter-card::before, .st-neon i, .truck.bounce, .street-stage.rave .st-garland, .tm-lever, .tm-hint, .tv-rays, .street-stage.touchdown, .fair-arrive-fly.touchdown { animation: none !important; }
  .street-stage.rave { transform: none; }
  .truck, .counter-card, .fl-enter { transition: none; }
}
