/* Квартал по квартал — визия „състезателен номер“: хартия, мастило, тартан, неон. */
:root {
  --ink: #14130f;
  --ink-2: #26241e;
  --paper: #efebe3;
  --paper-2: #e3ded2;
  --paper-3: #d6d0c2;
  --white: #fbfaf7;
  --track: #e0452b;
  --track-d: #b5331b;
  --volt: #d4f53c;
  --muted: #6e695e;
  --line: rgba(20, 19, 15, .14);
  --f-display: 'Unbounded', 'Arial Black', sans-serif;
  --f-body: 'Golos Text', 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tabbar: calc(62px + var(--safe-b));
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--ink); font-family: var(--f-body); font-size: 15px; -webkit-font-smoothing: antialiased; }
body { overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input { font: inherit; }
img { display: block; }
.mono { font-family: var(--f-mono); }
.hide { display: none !important; }

/* шум / зърно върху хартиените повърхности */
.grain { position: relative; isolation: isolate; }
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.07 0 0 0 0 0.05 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ ВХОД (номер) ============ */
.join {
  position: fixed; inset: 0; overflow-y: auto; background: var(--ink); color: var(--white);
  display: flex; flex-direction: column; padding: calc(18px + var(--safe-t)) 16px calc(24px + var(--safe-b));
}
.join__lanes {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), rgba(251,250,247,.07) calc(25% - 1px) 25%);
}
/* „ЯМБОЛ“ тече отгоре надолу в четвъртото поле */
.join__lane { position: absolute; top: 0; bottom: 0; left: 75%; width: 25%; overflow: hidden; pointer-events: none; }
.join__run { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; align-items: center; animation: laneDown 22s linear infinite; will-change: transform; }
.join__run span {
  writing-mode: vertical-rl; font: 900 min(19vw, 190px)/1 var(--f-display); letter-spacing: .04em; padding: .25em 0;
  color: transparent; -webkit-text-stroke: 1px rgba(251,250,247,.16);
}
.join__run span:nth-child(even) { -webkit-text-stroke-color: rgba(224,69,43,.45); }
@keyframes laneDown { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.join__top { position: relative; display: flex; justify-content: space-between; align-items: center; font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(251,250,247,.6); }
.join__top b { color: var(--volt); font-weight: 700; }
.join__title { position: relative; margin: 26px 0 6px; font: 900 clamp(34px, 11vw, 64px)/.88 var(--f-display); letter-spacing: -.035em; text-transform: uppercase; }
.join__title em { font-style: normal; color: var(--track); display: block; }
.join__lead { position: relative; margin: 10px 0 26px; max-width: 30ch; color: rgba(251,250,247,.7); line-height: 1.45; }

.bib {
  position: relative; width: 100%; max-width: 420px; margin: 0 auto; background: var(--paper); color: var(--ink);
  border-radius: 6px; transform: rotate(-1.6deg); box-shadow: 0 30px 60px -20px rgba(0,0,0,.7), 0 2px 0 rgba(0,0,0,.2);
  animation: bibIn .7s cubic-bezier(.2,.9,.25,1.15) both .1s;
}
@keyframes bibIn { from { transform: translateY(40px) rotate(4deg); opacity: 0; } }
.bib__pin { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #8d887c 0 2px, #2a2822 3px 6px); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.bib__pin:nth-child(1) { top: 10px; left: 10px; } .bib__pin:nth-child(2) { top: 10px; right: 10px; }
.bib__pin:nth-child(3) { bottom: 10px; left: 10px; } .bib__pin:nth-child(4) { bottom: 10px; right: 10px; }
.bib__band { margin: 0; background: var(--track); color: var(--white); padding: 12px 34px; border-radius: 6px 6px 0 0; display: flex; justify-content: space-between; font: 700 11px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; }
.bib__body { padding: 18px 22px 8px; display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: end; }
.bib__photo {
  position: relative; width: 112px; height: 132px; border: 2px dashed var(--ink); border-radius: 4px; overflow: hidden; display: grid; place-items: center;
  background: repeating-linear-gradient(-45deg, transparent 0 7px, rgba(20,19,15,.06) 7px 8px);
}
.bib__photo img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.05) saturate(.95); }
.bib__photo.has { border-style: solid; }
.bib__photo span { font: 700 11px/1.2 var(--f-mono); text-align: center; letter-spacing: .08em; text-transform: uppercase; padding: 0 6px; }
.bib__photo span i { display: block; font: 900 30px/1 var(--f-display); font-style: normal; margin-bottom: 6px; color: var(--track); }
.bib__photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.bib__num { font: 900 clamp(54px, 19vw, 86px)/.8 var(--f-display); letter-spacing: -.05em; }
.bib__num small { display: block; font: 700 10px/1 var(--f-mono); letter-spacing: .16em; color: var(--muted); margin-bottom: 8px; }
.bib__name { padding: 6px 22px 16px; }
.bib__name label { display: block; font: 700 10px/1 var(--f-mono); letter-spacing: .16em; color: var(--muted); margin-bottom: 4px; }
.bib__name input {
  width: 100%; border: 0; border-bottom: 2px solid var(--ink); background: transparent; padding: 6px 0 8px;
  font: 700 26px/1.1 var(--f-body); color: var(--ink); outline: none; text-transform: uppercase; letter-spacing: -.01em; border-radius: 0;
}
.bib__name input::placeholder { color: rgba(20,19,15,.25); }
.bib__chip { height: 34px; margin: 0 22px 26px; transition: background .15s; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 7px, transparent 7px 9px, var(--ink) 9px 10px, transparent 10px 13px); opacity: .85; }
.bib .bib__chip#chip { margin-bottom: 6px; }
.bib__cap { margin: 0 22px 24px; font: 700 10px/1 var(--f-mono); letter-spacing: .16em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bib__num { transition: color .3s; }
.bib.is-ready .bib__num { color: var(--track); }
.bib__num.tick { animation: tick .22s ease-out; }
@keyframes tick { 40% { transform: translateY(-5px) rotate(-2deg); } }
.bib__chip.scan { animation: scan .35s ease-out; }
@keyframes scan { from { opacity: .25; transform: scaleX(.97); } }
.bib.flip { animation: flip .8s cubic-bezier(.3,.7,.2,1.1); }
@keyframes flip { from { transform: perspective(1100px) rotate(-1.6deg) rotateY(0); } to { transform: perspective(1100px) rotate(-1.6deg) rotateY(360deg); } }
.bib.flip .bib__photo img { animation: develop 1.6s ease-out; }
@keyframes develop { from { filter: brightness(2.4) contrast(.35) sepia(1) blur(3px); } }
.bib__stamp {
  position: absolute; right: 26px; bottom: 74px; padding: 8px 12px; border: 3px solid var(--track); border-radius: 4px; color: var(--track);
  font: 900 15px/1.05 var(--f-display); text-transform: uppercase; text-align: center; letter-spacing: .02em; pointer-events: none;
  transform: rotate(-12deg) scale(2.2); opacity: 0; transition: transform .25s cubic-bezier(.3,1.6,.5,1), opacity .2s; mix-blend-mode: multiply;
}
.bib.is-ready .bib__stamp { opacity: .9; transform: rotate(-12deg) scale(1); }
.join__err { position: relative; min-height: 22px; margin: 18px auto 0; max-width: 420px; width: 100%; color: var(--volt); font-weight: 600; }
.join__go { position: relative; max-width: 420px; width: 100%; margin: 6px auto 0; }

/* бутон с твърда сянка */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px; padding: 0 18px;
  background: var(--track); color: var(--white); font: 800 15px/1 var(--f-display); letter-spacing: .02em; text-transform: uppercase;
  border-radius: 4px; box-shadow: 4px 4px 0 var(--ink); transition: transform .08s, box-shadow .08s, background .2s;
  border: 2px solid var(--ink);
}
.join .btn { box-shadow: 5px 5px 0 var(--volt); border-color: var(--track); }
.btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { background: var(--paper-3); color: var(--muted); box-shadow: none; border-color: var(--paper-3); cursor: default; }
.btn--volt { background: var(--volt); color: var(--ink); }
.btn--ink { background: var(--ink); color: var(--white); box-shadow: 4px 4px 0 var(--track); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: none; border: 2px solid var(--ink); min-height: 46px; font-size: 12px; }
.btn .arr { font-family: var(--f-body); font-size: 22px; line-height: 0; }

/* ============ ОСНОВЕН ЕКРАН ============ */
.shell { position: fixed; inset: 0; background: var(--paper); }
#map { position: absolute; inset: 0; bottom: var(--tabbar); background: var(--paper-2); }
.leaflet-container { font-family: var(--f-body); background: var(--paper-2); }
.leaflet-control-attribution { font: 9px/1.3 var(--f-mono) !important; background: rgba(239,235,227,.8) !important; }
.leaflet-tile-pane { filter: grayscale(1) sepia(.22) contrast(.92) brightness(1.06); }

/* тикер */
.ticker {
  position: absolute; z-index: 600; top: 0; left: 0; right: 0; padding-top: var(--safe-t); background: var(--ink); color: var(--volt);
  height: calc(30px + var(--safe-t)); overflow: hidden; display: flex; align-items: center;
}
.ticker__wrap { flex: 1; min-width: 0; overflow: hidden; }
.ticker__live { position: relative; z-index: 1; flex: none; height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: var(--track); color: var(--white); font: 700 10px/1 var(--f-mono); letter-spacing: .16em; }
.ticker__live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--white); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ticker__track { display: flex; white-space: nowrap; animation: marquee var(--dur, 40s) linear infinite; }
.ticker__track span { font: 500 11px/30px var(--f-mono); letter-spacing: .04em; padding-right: 36px; }
.ticker__track span::before { content: "◆ "; color: var(--track); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* навигационен банер */
.nav {
  position: absolute; z-index: 610; left: 10px; right: 10px; top: calc(40px + var(--safe-t));
  display: grid; grid-template-columns: 72px 1fr auto; background: var(--ink); color: var(--white); border-radius: 6px; overflow: hidden;
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.55); animation: drop .35s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes drop { from { transform: translateY(-16px); opacity: 0; } }
.nav__ico { background: var(--track); display: grid; place-items: center; }
.nav__ico svg { width: 44px; height: 44px; }
.nav__main { padding: 10px 12px 10px 14px; min-width: 0; }
.nav__dist { white-space: nowrap; text-transform: uppercase; font: 900 26px/1 var(--f-display); letter-spacing: -.03em; }
.nav__dist small { font: 600 13px var(--f-body); letter-spacing: 0; margin-left: 2px; opacity: .7; }
.nav__txt { margin-top: 4px; font-weight: 600; font-size: 15px; line-height: 1.25; }
.nav__sub { margin-top: 6px; font: 500 11px/1.2 var(--f-mono); color: rgba(251,250,247,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav__side { display: flex; flex-direction: column; border-left: 1px solid rgba(251,250,247,.12); }
.nav__side button { flex: 1; width: 46px; display: grid; place-items: center; color: rgba(251,250,247,.75); }
.nav__side button + button { border-top: 1px solid rgba(251,250,247,.12); }
.nav__side button.on { color: var(--volt); }
.nav__side svg { width: 20px; height: 20px; }
.nav--here .nav__ico { background: var(--volt); color: var(--ink); }

.fab {
  position: absolute; z-index: 600; right: 12px; width: 46px; height: 46px; border-radius: 50%; background: var(--white); border: 2px solid var(--ink);
  display: grid; place-items: center; box-shadow: 3px 3px 0 var(--ink);
}
.fab svg { width: 22px; height: 22px; }
.fab.on { background: var(--volt); }

/* долен лист */
.sheet {
  position: absolute; z-index: 620; left: 0; right: 0; bottom: var(--tabbar); background: var(--paper); border-top: 2px solid var(--ink);
  border-radius: 14px 14px 0 0; max-height: 52vh; overflow-y: auto; overscroll-behavior: contain; transition: max-height .35s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 -18px 40px -24px rgba(0,0,0,.45);
}
.sheet--full { max-height: calc(100% - var(--tabbar) - 34px - var(--safe-t)); min-height: 60vh; }
.sheet__grip { position: sticky; top: 0; z-index: 2; height: 18px; display: grid; place-items: center; background: inherit; }
.sheet__grip::before { content: ""; width: 38px; height: 4px; border-radius: 2px; background: var(--paper-3); }
.sheet__in { padding: 0 16px 18px; }

.stage__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.stage__no { font: 900 44px/.8 var(--f-display); letter-spacing: -.05em; }
.stage__no small { font-size: 18px; color: var(--muted); letter-spacing: -.02em; }
.stage__lbl { font: 700 10px/1 var(--f-mono); letter-spacing: .16em; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1.5px solid var(--ink); border-radius: 3px; font: 700 10px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.tag--bars { background: var(--ink); color: var(--volt); }
.tag--spot { background: var(--track); color: var(--white); border-color: var(--track); }
.tag svg { width: 14px; height: 14px; }
.stage__name { margin: 12px 0 4px; font: 800 24px/1.1 var(--f-body); letter-spacing: -.02em; }
.stage__note { color: var(--muted); font-size: 13px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; margin: 14px 0; border: 1.5px solid var(--ink); border-radius: 4px; }
.stats > div { padding: 10px 12px; }
.stats > div + div { border-left: 1.5px solid var(--ink); }
.stats b { text-transform: uppercase; display: block; font: 800 18px/1.1 var(--f-display); letter-spacing: -.02em; }
.stats span { font: 700 9.5px/1 var(--f-mono); letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.stats .pts { color: var(--track); }

.crew { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; }
.crew__stack { display: flex; }
.crew__stack .av { margin-left: -8px; }
.crew__stack .av:first-child { margin-left: 0; }
.crew__txt { font-size: 13px; line-height: 1.3; }
.crew__txt b { font-family: var(--f-display); }
.av { display: block; position: relative; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--paper); background: var(--paper-3); flex: none; }
.av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.av.is-ready::after { content: "✓"; position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--volt); border: 1.5px solid var(--ink); font: 900 9px/13px var(--f-body); text-align: center; }
.av.is-here { box-shadow: 0 0 0 2px var(--track); }
.av.is-off img { filter: grayscale(1); opacity: .5; }

.waitlist { margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center; }
.waitlist b { color: var(--ink); }
.hint { margin: 10px 0 0; padding: 10px 12px; background: var(--paper-2); border-left: 3px solid var(--track); font-size: 13px; line-height: 1.4; }

/* лобито */
.lobby__big { font: 900 34px/.9 var(--f-display); letter-spacing: -.04em; text-transform: uppercase; margin: 6px 0 10px; }
.lobby__big em { font-style: normal; color: var(--track); }

/* табове */
.tabs {
  position: absolute; z-index: 700; left: 0; right: 0; bottom: 0; height: var(--tabbar); padding-bottom: var(--safe-b);
  background: var(--ink); display: grid; grid-template-columns: repeat(4, 1fr);
}
.tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: rgba(251,250,247,.5); font: 700 9.5px/1 var(--f-mono); letter-spacing: .12em; position: relative; }
.tabs button svg { width: 22px; height: 22px; }
.tabs button.on { color: var(--white); }
.tabs button.on::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; background: var(--volt); }

/* етапи — релса */
.h2 { font: 900 26px/1 var(--f-display); letter-spacing: -.04em; text-transform: uppercase; margin: 4px 0 14px; display: flex; align-items: baseline; justify-content: space-between; }
.h2 small { font: 700 11px/1 var(--f-mono); letter-spacing: .12em; color: var(--muted); }
.rail { list-style: none; margin: 0; padding: 0; position: relative; }
.rail::before { content: ""; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 2px; background: repeating-linear-gradient(var(--ink) 0 6px, transparent 6px 10px); }
.rail li { position: relative; display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; }
.rail .n { position: relative; z-index: 1; width: 36px; height: 36px; display: grid; place-items: center; background: var(--paper); border: 2px solid var(--ink); border-radius: 3px; font: 700 12px var(--f-mono); }
.rail .t b { display: block; font-weight: 700; line-height: 1.2; }
.rail .t span { font-size: 12px; color: var(--muted); }
.rail .r { font: 700 11px var(--f-mono); color: var(--muted); text-align: right; }
.rail li.done .n { background: var(--ink); color: var(--volt); }
.rail li.done .t b { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--track); }
.rail li.cur .n { background: var(--track); color: var(--white); border-color: var(--track); box-shadow: 0 0 0 4px rgba(224,69,43,.22); }
.rail li.cur .t b { font-weight: 800; font-size: 16px; }
.rail li.lock .t, .rail li.lock .r { opacity: .55; }
.rail li.lock .n { color: var(--muted); border-color: var(--muted); }

/* класиране */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; align-items: end; margin-bottom: 16px; }
.pod { text-align: center; }
.pod .av { width: 58px; height: 58px; margin: 0 auto 8px; border: 2.5px solid var(--ink); }
.pod:nth-child(2) .av { width: 74px; height: 74px; }
.pod__name { font-weight: 700; font-size: 13px; line-height: 1.15; min-height: 30px; overflow: hidden; }
.pod__block { margin-top: 8px; background: var(--ink); color: var(--white); border-radius: 3px 3px 0 0; padding: 10px 4px 8px; }
.pod:nth-child(1) .pod__block { height: 74px; }
.pod:nth-child(2) .pod__block { height: 100px; background: var(--track); }
.pod:nth-child(3) .pod__block { height: 58px; }
.pod__place { font: 900 22px/1 var(--f-display); }
.pod__pts { font: 700 11px var(--f-mono); opacity: .8; margin-top: 4px; }
.board { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.board li { display: grid; grid-template-columns: 30px 38px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.board .pl { font: 700 13px var(--f-mono); }
.board .nm b { display: block; font-weight: 700; }
.board .nm span { font: 500 11px var(--f-mono); color: var(--muted); }
.board .pt { font: 800 17px var(--f-display); letter-spacing: -.02em; }
.board li.me { background: linear-gradient(90deg, rgba(212,245,60,.55), transparent); }
.feed { list-style: none; margin: 18px 0 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 46px 1fr; gap: 8px; padding: 7px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.feed time { font: 500 11px var(--f-mono); color: var(--muted); padding-top: 1px; }

/* аз */
.me-bib { transform: rotate(-1deg); margin: 6px 4px 18px; animation: none; box-shadow: 6px 6px 0 var(--ink); border: 2px solid var(--ink); }
.me-bib .bib__photo { border-style: solid; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); border: 2px solid var(--ink); border-radius: 4px; overflow: hidden; }
.trio > div { padding: 12px 8px; text-align: center; }
.trio > div + div { border-left: 2px solid var(--ink); }
.trio b { display: block; font: 900 24px/1 var(--f-display); letter-spacing: -.04em; }
.trio span { font: 700 9px/1 var(--f-mono); letter-spacing: .14em; color: var(--muted); }
.trio > div:first-child { background: var(--volt); }
.link { display: block; margin: 22px auto 0; font: 700 11px var(--f-mono); letter-spacing: .12em; color: var(--muted); text-decoration: underline; }

/* задача по пътя — изскачаща карта */
.toast {
  position: absolute; z-index: 640; left: 10px; right: 10px; bottom: calc(var(--tabbar) + 12px); background: var(--volt); border: 2px solid var(--ink);
  border-radius: 6px; padding: 12px 12px 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
  box-shadow: 5px 5px 0 var(--ink); animation: pop .4s cubic-bezier(.2,.9,.3,1.3);
}
@keyframes pop { from { transform: translateY(30px) scale(.96); opacity: 0; } }
.toast small { display: block; font: 700 10px/1 var(--f-mono); letter-spacing: .16em; margin-bottom: 5px; }
.toast b { text-transform: uppercase; font: 800 17px/1.1 var(--f-display); letter-spacing: -.02em; }
.toast .btn { min-height: 46px; width: auto; font-size: 12px; box-shadow: 3px 3px 0 var(--ink); }

/* упражнение — цял екран */
.ex {
  position: fixed; inset: 0; z-index: 2000; background: var(--track); color: var(--white); display: flex; flex-direction: column;
  padding: calc(16px + var(--safe-t)) 16px calc(18px + var(--safe-b)); user-select: none; -webkit-user-select: none; animation: exIn .3s ease-out;
}
@keyframes exIn { from { opacity: 0; transform: scale(1.04); } }
.ex::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, transparent 0 calc(12.5% - 2px), rgba(255,255,255,.12) calc(12.5% - 2px) 12.5%); }
.ex__top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; }
.ex__lbl { font: 700 11px/1 var(--f-mono); letter-spacing: .16em; opacity: .8; }
.ex__name { font: 900 clamp(26px, 8vw, 40px)/.95 var(--f-display); letter-spacing: -.04em; text-transform: uppercase; margin-top: 8px; max-width: 14ch; }
.ex__x { width: 44px; height: 44px; border: 2px solid var(--white); border-radius: 50%; display: grid; place-items: center; font-size: 20px; }
.ex__pad { position: relative; flex: 1; display: grid; place-items: center; }
.ex__ring { position: relative; width: min(78vw, 46vh, 360px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; touch-action: manipulation; }
.ex__ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ex__ring circle { fill: none; stroke-width: 12; }
.ex__ring .bg { stroke: rgba(20,19,15,.25); }
.ex__ring .fg { stroke: var(--volt); stroke-linecap: butt; transition: stroke-dashoffset .25s cubic-bezier(.2,.8,.2,1); }
.ex__count { font: 900 clamp(84px, 30vw, 150px)/.8 var(--f-display); letter-spacing: -.06em; text-align: center; }
.ex__count small { display: block; font: 700 13px/1 var(--f-mono); letter-spacing: .14em; margin-top: 14px; opacity: .85; }
.ex__ring.bump .ex__count { animation: bump .18s; }
@keyframes bump { 50% { transform: scale(1.08); } }
.ex__hint { position: relative; text-align: center; font: 500 12px var(--f-mono); letter-spacing: .08em; opacity: .85; margin-bottom: 12px; }
.ex__row { position: relative; display: grid; grid-template-columns: 70px 1fr; gap: 10px; }
.ex__row .btn--ghost { color: var(--white); border-color: var(--white); min-height: 58px; font-size: 18px; }
.ex .btn--volt { box-shadow: 4px 4px 0 var(--ink); }
.ex.ex--done { background: var(--ink); }
.ex.ex--done .ex__ring .fg { stroke: var(--volt); }

/* маркери на картата */
.cp { width: 30px; height: 30px; display: grid; place-items: center; background: var(--white); border: 2px solid var(--ink); border-radius: 3px; font: 700 11px var(--f-mono); color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.cp--bars { background: var(--ink); color: var(--volt); }
.cp--done { background: var(--paper-3); color: var(--muted); border-color: var(--muted); box-shadow: none; }
.cp--cur { width: 40px; height: 40px; font-size: 14px; background: var(--track); color: var(--white); border-color: var(--ink); position: relative; }
.cp--cur::after { content: ""; position: absolute; inset: -9px; border: 2px solid var(--track); border-radius: 6px; animation: ping 1.6s ease-out infinite; }
@keyframes ping { to { inset: -22px; opacity: 0; } }
.pm { width: 36px; height: 36px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--paper-3); overflow: hidden; box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.pm img { width: 100%; height: 100%; object-fit: cover; }
.pm--me { border-color: var(--volt); box-shadow: 0 0 0 2.5px var(--ink), 0 4px 10px rgba(0,0,0,.4); width: 42px; height: 42px; }
.chm { width: 26px; height: 26px; background: var(--volt); border: 2px solid var(--ink); transform: rotate(45deg); display: grid; place-items: center; box-shadow: 2px 2px 0 var(--ink); }
.chm span { transform: rotate(-45deg); font: 900 12px/1 var(--f-display); }
.chm--done { background: var(--paper-3); border-color: var(--muted); box-shadow: none; }

.flash { position: fixed; z-index: 3000; left: 50%; top: calc(46px + var(--safe-t)); transform: translateX(-50%); background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: 4px; font-weight: 600; font-size: 14px; max-width: calc(100% - 32px); box-shadow: 4px 4px 0 var(--track); animation: drop .3s; }

.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--ink); color: var(--volt); font: 700 12px var(--f-mono); letter-spacing: .2em; }

@media (min-width: 760px) {
  .sheet { left: auto; right: 16px; bottom: calc(var(--tabbar) + 16px); width: 400px; border: 2px solid var(--ink); border-radius: 8px; max-height: 70vh; box-shadow: 6px 6px 0 var(--ink); }
  .sheet--full { max-height: calc(100% - var(--tabbar) - 70px); }
  .nav { right: auto; width: 420px; left: 16px; }
  .toast { left: auto; right: 16px; width: 400px; bottom: calc(var(--tabbar) + 16px + 70vh + 10px); }
  .tabs { left: 50%; right: auto; width: 440px; transform: translateX(-50%); bottom: 12px; border-radius: 8px; height: 62px; padding: 0; }
  #map { bottom: 0; }
  .sheet { bottom: 88px; }
  .toast { bottom: auto; top: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.osm { margin: 16px 0 0; font: 500 10px/1.3 var(--f-mono); color: var(--muted); text-align: center; }
.osm a { color: inherit; }

/* Unbounded само с главни букви — малките имат български курсивни форми, които тук се четат трудно */
.board .pt, .trio b, .stage__no, .pod__place, .crew__txt b, .ex__count, .nav__dist small { text-transform: uppercase; }
