/* Где это?: демо ежедневной игры для городского издания.
   Тёмный экран под фото, карта светлая (подложка CARTO Voyager), пин цвета
   бренда. Колонка до 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: #35d1c2;        /* бренд издания; в демо бирюза, как маркер на карте */
  --accent-ink: #062321;
  --ok: #3ddc84;
  --warn: #ffc24b;
  --no: #ff5a5f;
  --bg: #12151c;
  --ink: #f4f6fa;
  --ink-2: #aeb6c4;
  --ink-3: #737d8f;
  --glass: rgba(28, 33, 44, .82);
  --glass-2: rgba(36, 42, 56, .9);
  --edge: rgba(255, 255, 255, .1);
  --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: #e9eef6; --accent-ink: #0b1a2e; }
:root[data-accent="orange"] { --accent: #ff7a1a; --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: var(--bg); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--ink-2); }
svg { 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; }

/* полоса прогресса и счёт */
.bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--edge); }
.segs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; flex: 1; }
.seg { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .14); transition: background .3s; }
.seg.cur { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.seg.g { background: var(--ok); } .seg.y { background: var(--warn); } .seg.o { background: #ff8a3d; } .seg.r { background: var(--no); }
.bar__score { font: 700 22px/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar__score small { display: block; font: 500 10px var(--sans); color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; text-align: right; }

/* фото */
.photo { position: relative; margin: 12px 0 0; border-radius: var(--r); overflow: hidden; background: #0a0c11; aspect-ratio: 16 / 10; cursor: zoom-in;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .8); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; animation: fade .5s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.photo__n { position: absolute; top: 10px; left: 10px; padding: 5px 10px; border-radius: 999px; background: rgba(10, 12, 17, .72); font: 600 12px var(--display);
  text-transform: uppercase; letter-spacing: .1em; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.photo__zoom { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 10px; background: rgba(10, 12, 17, .72); color: var(--ink); display: grid; place-items: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.photo__by { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 6px; font-size: 11px; color: rgba(255, 255, 255, .78);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* карта */
.map-wrap { position: relative; isolation: isolate; margin-top: 10px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--edge); background: #e9e5dc; }
#map { height: clamp(250px, 40vh, 380px); width: 100%; background: #e9e5dc; z-index: 0; }
.map-wrap.is-locked #map { cursor: default; }
.map__hint { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 400; padding: 7px 12px; border-radius: 999px; pointer-events: none;
  background: rgba(18, 21, 28, .86); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.map__ctl { position: absolute; right: 10px; bottom: 26px; z-index: 400; display: grid; gap: 6px; }
.map__ctl button { width: 36px; height: 36px; border-radius: 10px; background: rgba(18, 21, 28, .9); color: var(--ink); font: 700 20px/1 var(--display); box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.leaflet-container { font: 11px var(--sans); }
.leaflet-control-attribution { background: rgba(255, 255, 255, .7) !important; color: #555; font-size: 10px; }
.leaflet-control-attribution a { color: #555; }

/* пины: капля цвета бренда и капля с камерой на месте съёмки */
.pin { background: none; border: 0; }
.pin i { position: absolute; left: 4px; top: 0; width: 20px; height: 20px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent);
  border: 2px solid #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, .35); }
.pin i::after { content: ""; position: absolute; left: 5px; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.pin--guess { animation: drop .35s var(--ease); }
.pin--truth i { background: #1f8f5f; }
.pin--truth i::after { width: 8px; height: 8px; left: 4px; top: 4px; border-radius: 2px; }
@keyframes drop { from { transform: translateY(-16px); opacity: 0; } }
.line-guess { filter: drop-shadow(0 0 2px rgba(255, 255, 255, .9)); }

/* действия и результат места */
.acts { display: grid; gap: 8px; margin-top: 10px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 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 -8px var(--accent); }
.btn--main:hover:not(:disabled) { filter: brightness(1.06); }
.btn--main:disabled { opacity: .45; cursor: default; box-shadow: none; }
.btn--ghost { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); }
.btn--ghost:hover { background: rgba(255, 255, 255, .14); }
.btn small { display: block; font-weight: 500; font-size: 12px; color: var(--ink-2); }

.res { margin-top: 10px; 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: baseline; gap: 12px; flex-wrap: wrap; }
.res__dist { font: 700 40px/1 var(--display); font-variant-numeric: tabular-nums; }
.res__dist.g { color: var(--ok); } .res__dist.y { color: var(--warn); } .res__dist.o { color: #ff8a3d; } .res__dist.r { color: var(--no); }
.res__pts { margin-left: auto; font: 700 24px/1 var(--display); color: var(--ink); }
.res__pts small { font: 500 11px var(--sans); color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; margin-left: 4px; }
.res__cap { color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.res__name { margin: 8px 0 2px; font: 700 20px/1.2 var(--sans); }
.res__about { margin: 0; color: var(--ink-2); font-size: 14px; }
.crowd { margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(255, 255, 255, .16); font-size: 13px; color: var(--ink-2); }
.crowd b { color: var(--ink); }
.crowd__bar { height: 8px; margin-top: 6px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.crowd__bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; animation: grow .7s var(--ease); }
@keyframes grow { from { width: 0; } }

.sponsor { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: 10px 14px; border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, .22); color: var(--ink-2); font-size: 13px; background: rgba(18, 21, 28, .6); }
.tag { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, .3); color: var(--ink-2); }

/* итог дня */
.final { margin-top: 12px; padding: 18px 16px 16px; border-radius: var(--r); background: var(--glass-2); border: 1px solid var(--edge); }
.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); }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.row { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.row__img { width: 56px; height: 42px; border-radius: 8px; object-fit: cover; display: block; }
.row__name { font-weight: 600; font-size: 14px; }
.row__d { color: var(--ink-2); font-size: 12px; }
.row__p { font: 700 18px var(--display); text-align: right; font-variant-numeric: tabular-nums; }
.row__p i { display: block; font: 500 11px var(--sans); font-style: normal; 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; }

.partner { margin-top: 12px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--accent); background: rgba(18, 21, 28, .6); }
.partner__top { display: flex; justify-content: space-between; align-items: center; 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(5, 6, 9, .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); }

/* правила */
.modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(2, 4, 8, .7);
  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: #1b2030; 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: #f4f7fb; color: #0b1a2e; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); white-space: nowrap; }

@media (max-width: 360px) {
  .top__crumb { display: none; }
  .title h1 { font-size: 32px; }
  .res__dist { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
