/* «Папа спорта». Цвета взяты из логотипа: жёлтый фон, чёрный шрифт, красный мяч.
   Главный образ — стартовый номер: белая бумага с дырочками под булавки и жирные
   узкие цифры, как «ПАПА» в логотипе. Всё остальное спокойное. */
:root {
  --sky: #f3f3ef;        /* фон страниц */
  --paper: #ffffff;      /* бумага номера */
  --navy: #1a1a18;       /* чёрный из логотипа: текст, кнопки */
  --navy-2: #4a4a44;
  --muted: #85857c;
  --line: #e2e2da;
  --cobalt: #1a1a18;     /* основные кнопки — чёрные, как буквы логотипа */
  --cobalt-dark: #000000;
  --sun: #f3e215;        /* жёлтый логотипа */
  --ball: #d92f00;       /* красный мяч: только для самого важного */
  --hole: var(--sky);
  --grass: #1f9d5c;
  --coral: #e2484f;
  --font-num: "Oswald", "Arial Narrow", sans-serif;
  --font-head: "Montserrat", "Golos Text", sans-serif;
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 400 16px/1.55 var(--font); color: var(--navy); background: var(--sky);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy); text-decoration-color: var(--ball); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ball); }
:focus-visible { outline: 3px solid var(--ball); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.1; font-family: var(--font-head); font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(30px, 5.2vw, 54px); }
h2 { font-size: clamp(22px, 3vw, 28px); }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 1em; max-width: 68ch; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.space { height: 20px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.inline { display: inline; }

/* ---- шапка ---- */
.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand img { height: 44px; width: 44px; display: block; border-radius: 4px; }
.brand .word { font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand .badge { font-family: var(--font-num); font-weight: 700; font-size: 15px; background: var(--cobalt); color: #fff;
  border-radius: 6px; padding: 2px 7px; line-height: 1.2; }
.top nav { margin-left: auto; display: flex; gap: 18px; font-size: 15px; flex-wrap: wrap; }
.top nav a { color: var(--navy-2); text-decoration: none; font-weight: 600; }
.top nav a:hover { color: var(--ball); }

main { padding: 40px 0 72px; }
.stage + main { padding-top: 48px; }

/* ---- стартовый номер ---- */
.bib {
  position: relative; background: var(--paper); border-radius: 10px; padding: 34px 34px 26px;
  box-shadow: 0 2px 0 var(--line), 0 18px 40px -18px rgba(26, 26, 24, .35);
}
.bib::before, .bib::after {     /* дырочки под булавки */
  content: ""; position: absolute; top: 14px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--hole); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35);
}
.bib::before { left: 14px; }
.bib::after { right: 14px; }
.bib .pins { position: absolute; left: 14px; right: 14px; bottom: 14px; height: 11px; pointer-events: none; }
.bib .pins::before, .bib .pins::after { content: ""; position: absolute; width: 11px; height: 11px; border-radius: 50%;
  background: var(--hole); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35); }
.bib .pins::before { left: 0; }
.bib .pins::after { right: 0; }
.bib-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  border-bottom: 3px solid var(--navy); padding-bottom: 10px; margin-bottom: 14px; }
.bib-head b { font-size: 15px; }
.bib-head span { font-size: 14px; color: var(--muted); }
.bib input.bib-number {
  width: 100%; border-radius: 0; border: 0; background: transparent; text-align: center; color: var(--navy);
  font: 700 clamp(72px, 13vw, 132px)/1 var(--font-num); letter-spacing: .02em; padding: 4px 0 10px;
}
.bib input.bib-number::placeholder { color: #d8d8d0; }
.bib input.bib-number:focus { outline: none; border: 0; }
.bib-number:focus-visible { outline: none; }
.bib:focus-within { box-shadow: 0 0 0 3px var(--ball), 0 18px 40px -18px rgba(26, 26, 24, .35); }
.bib select { font-weight: 600; }
.bib-foot { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.bib-foot .btn { flex: 1; }
.bib .face-btn { margin-top: 10px; background: var(--paper); }
#selfie { scroll-margin-top: 16px; }

/* ---- главная ---- */
.stage { background: var(--sun); --hole: var(--sun); }
.stage .wrap { padding-top: 44px; padding-bottom: 56px; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; grid-template-areas: "title bib" "text bib"; column-gap: 48px; align-items: center; }
.hero-title { grid-area: title; align-self: end; }
.hero-text { grid-area: text; align-self: start; }
.hero-bib { grid-area: bib; }
.hero h1 { font-family: var(--font-num); font-weight: 700; font-size: clamp(48px, 8vw, 96px); line-height: .95;
  letter-spacing: -.01em; text-transform: uppercase; }
.hero h1 .dot { display: inline-block; width: .32em; height: .32em; border-radius: 50%; background: var(--ball);
  vertical-align: .62em; margin-left: .06em; }
.hero h1 { max-width: 9ch; }
.hero p { font-size: 19px; color: var(--navy); }
.hero .ways { display: flex; gap: 22px; margin-top: 18px; color: var(--navy-2); font-size: 15px; flex-wrap: wrap; }
.hero .ways { color: var(--navy); font-weight: 600; }
.hero .ways span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ball); margin-right: 8px; vertical-align: 1px; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; grid-template-areas: "title" "bib" "text"; row-gap: 22px; }
  .hero h1 { font-size: clamp(42px, 12vw, 64px); margin: 0; max-width: none; }
  .hero p { font-size: 17px; }
}

/* расписание стартов — строками, как табло */
.schedule { background: var(--paper); border-radius: 12px; border: 1px solid var(--line); overflow: hidden; }
.schedule a { display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; align-items: center; padding: 16px 20px;
  text-decoration: none; color: var(--navy); border-top: 1px solid var(--line); }
.schedule a:first-child { border-top: 0; }
.schedule a:hover { background: #fbf9df; }
.schedule .date { font: 700 26px/1 var(--font-num); color: var(--navy); }
.schedule .date small { display: block; font: 500 13px var(--font); color: var(--muted); margin-top: 4px; }
.schedule .title b { display: block; font-size: 17px; }
.schedule .title span { color: var(--muted); font-size: 14px; }
@media (max-width: 560px) { .schedule a { grid-template-columns: 70px 1fr; } .schedule .count { grid-column: 2; } }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 56px; }
.how div { border-top: 3px solid var(--navy); padding-top: 14px; }
.how b { font: 700 40px/1 var(--font-num); color: var(--ball); display: block; margin-bottom: 8px; }
.how p { color: var(--navy-2); font-size: 15px; }
@media (max-width: 760px) { .how { grid-template-columns: 1fr; gap: 18px; } }

/* ---- страница забега ---- */
.event-stage .wrap { padding-top: 32px; padding-bottom: 36px; }
.event-stage h1 { font-family: var(--font-num); font-weight: 700; text-transform: uppercase; font-size: clamp(40px, 6.5vw, 76px); line-height: .95; margin-bottom: 10px; }
.event-stage .meta { font-size: 17px; font-weight: 600; }
.event-stage .back { font-size: 14px; font-weight: 600; text-decoration: none; display: inline-block; margin-bottom: 14px; }
.find { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .find { grid-template-columns: 1fr; } }
.selfie-box { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.selfie-box h2 { font-size: 22px; }
.price-note { margin-top: 18px; color: var(--navy-2); font-size: 15px; }
.price-note b { font-family: var(--font-num); font-size: 18px; color: var(--navy); }

/* ---- поля и кнопки ---- */
label { display: block; font-size: 14px; color: var(--navy-2); margin: 14px 0 6px; font-weight: 600; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=datetime-local], textarea, select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 9px; font: inherit; background: #fff; color: var(--navy);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--cobalt); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--navy-2); }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--cobalt); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--cobalt); color: #fff; font: 700 16px var(--font); padding: 14px 22px; border-radius: 10px;
  text-decoration: none; transition: background .15s;
}
.btn:hover { background: var(--cobalt-dark); color: #fff; }
.btn.dark { background: var(--navy); }
.btn.dark:hover { background: #0f1836; }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--navy-2); color: var(--navy); }
.btn.sun { background: var(--sun); color: var(--navy); }
.btn.sun:hover { background: #f5c11a; color: var(--navy); }
.btn.small { padding: 8px 13px; font-size: 14px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: default; }

.drop { border: 2px dashed #cfcfc4; border-radius: 10px; padding: 22px; text-align: center; cursor: pointer;
  color: var(--navy-2); display: block; transition: background .15s, border-color .15s; font-weight: 600; }
.drop:hover, .drop.over { background: #fbf9df; border-color: var(--navy); }
.drop input { display: none; }
.selfie-preview { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; margin: 12px auto 0; display: none; border: 4px solid var(--sky); }

.flash { padding: 13px 16px; border-radius: 9px; margin-bottom: 18px; font-weight: 600; border-left: 5px solid; background: var(--paper); }
.flash.ok { border-color: var(--grass); color: #13633b; }
.flash.err { border-color: var(--coral); color: #a8262c; }

/* ---- результаты ---- */
.results-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.results-head .found { font: 700 clamp(56px, 8vw, 88px)/.9 var(--font-num); color: var(--navy); }
.results-head h1 { font-size: clamp(24px, 3.6vw, 34px); margin: 6px 0 4px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
@media (max-width: 520px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: 6px; } }
.ph { position: relative; border-radius: 8px; overflow: hidden; background: #e4e4dc; aspect-ratio: 3 / 2; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; transition: opacity .15s; }
.ph:not(.on) img { opacity: .45; }
.ph .pick { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 4px rgba(26, 26, 24, .3); }
.ph .pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ph .pick span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--navy-2); }
.ph.on .pick { background: var(--cobalt); }
.ph.on .pick span { border: 0; width: 12px; height: 7px; border-left: 3px solid #fff; border-bottom: 3px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px); border-radius: 0; }
.ph .pick:has(input:focus-visible) { outline: 3px solid var(--sun); }

.buybar { position: sticky; bottom: 12px; margin-top: 22px; background: var(--paper); border-radius: 14px; padding: 16px 18px;
  z-index: 5; box-shadow: 0 0 0 1px var(--line), 0 16px 40px -12px rgba(26, 26, 24, .35); }
.buybar .row { justify-content: space-between; }
.buybar .sum { font: 700 34px/1 var(--font-num); }
.buybar .sum span { background: var(--sun); color: var(--stage-ink, var(--navy)); padding: 2px 10px; border-radius: 6px; }
.buybar .hint { color: var(--navy-2); font-size: 14px; margin-top: 6px; }
.buybar form { display: none; margin-top: 14px; gap: 10px; grid-template-columns: 1fr 1fr auto; }
.buybar.open form { display: grid; }
@media (max-width: 760px) { .buybar.open form { grid-template-columns: 1fr; } }

.lightbox { position: fixed; inset: 0; background: rgba(14, 22, 48, .93); display: none; align-items: center; justify-content: center; z-index: 20; padding: 16px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; }

/* ---- заказ ---- */
.ticket { max-width: 620px; margin: 0 auto; }
.ticket .bib-number-static { font: 700 64px/1 var(--font-num); color: var(--navy); }
.status { display: inline-block; padding: 4px 12px; border-radius: 99px; font-size: 14px; font-weight: 700; background: #ecece5; color: var(--navy-2); }
.status.ok { background: #dff3e8; color: #13633b; }
.status.wait { background: #fff4cc; color: #7a5a00; }
.status.err { background: #fde5e6; color: #a8262c; }
.pay-box { background: var(--sky); border-radius: 10px; padding: 16px 18px; margin: 16px 0; }

/* ---- кабинеты и админка ---- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 99px; background: #ecece5; font-size: 13px; color: var(--navy-2); font-weight: 600; }
.chip.lime, .chip.ok { background: #dff3e8; color: #13633b; }
.chip.warn { background: #fff4cc; color: #7a5a00; }
.chip.err { background: #fde5e6; color: #a8262c; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; margin-bottom: 20px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stat { padding: 16px 18px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font: 700 30px/1.1 var(--font-num); }
.stat span { color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td.num, th.num { text-align: right; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.progress { height: 10px; background: #ecece5; border-radius: 99px; overflow: hidden; margin: 14px 0 6px; }
.progress div { height: 100%; width: 0; background: var(--ball); transition: width .2s; }
.log { font: 13px/1.5 ui-monospace, Menlo, monospace; background: var(--navy); color: #f3e215; border-radius: 9px; padding: 12px 14px; white-space: pre-wrap; min-height: 42px; }

footer { color: var(--muted); font-size: 14px; padding: 26px 0 44px; border-top: 1px solid var(--line); background: var(--paper); }
footer a { color: var(--navy-2); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

@media (max-width: 560px) {
  .brand .word { display: none; }           /* на телефоне название уже есть в логотипе */
  .top nav { gap: 14px; font-size: 14px; }
  .stage .wrap { padding-top: 28px; padding-bottom: 36px; }
  .bib { padding: 28px 22px 24px; }
}

/* телефон — главный экран: крупные зоны нажатия, нижняя панель покупки на всю ширину */
@media (max-width: 560px) {
  .btn { min-height: 52px; }
  .bib-head select { font-size: 16px !important; }
  input, select, textarea { font-size: 16px; }   /* iPhone не увеличивает страницу при вводе */
  .buybar { bottom: 0; margin-left: -16px; margin-right: -16px; border-radius: 16px 16px 0 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
  .buybar .row { flex-wrap: nowrap; }
  .buybar .row .btn { width: auto; flex: 0 0 auto; padding-left: 26px; padding-right: 26px; }
  .buybar .sum { font-size: 28px; }
  .results-head .found { font-size: 64px; }
  .schedule a { padding: 14px 16px; gap: 12px; }
  .event-stage h1 { font-size: clamp(34px, 10vw, 48px); }
  .find { gap: 16px; }
  .selfie-box { padding: 20px; }
}
@media (max-width: 560px) {
  .results-head { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: end; margin-bottom: 12px; }
  .results-head > div { display: contents; }
  .results-head .found { grid-row: 1 / 3; font-size: 72px; }
  .results-head h1 { margin: 0; font-size: 24px; }
  .results-head .muted { font-size: 14px; }
  .results-head .btn { grid-column: 1 / -1; justify-self: start; margin-top: 10px; min-height: 0; }
}

/* переключатель языка */
.langs { display: flex; gap: 2px; background: var(--sky); border-radius: 8px; padding: 3px; }
.langs a { padding: 4px 9px; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--navy-2); text-decoration: none; }
.langs a[aria-current] { background: var(--paper); color: var(--navy); box-shadow: 0 1px 2px rgba(26, 26, 24, .15); }
@media (max-width: 560px) {
  .top .wrap { gap: 10px; }
  .top nav .hide-m { display: none; }   /* на телефоне место под переключатель языка */
  .langs a { padding: 4px 7px; font-size: 13px; }
}

/* оплата Kaspi */
.btn.kaspi { background: #f14635; font-size: 17px; }
.btn.kaspi:hover { background: #d93a2b; }
.kaspi-qr { display: none; align-items: center; gap: 16px; margin: 14px 0; }
.kaspi-qr svg { width: 132px; height: 132px; flex: none; }
@media (hover: hover) and (min-width: 900px) { .kaspi-qr { display: flex; } }

/* ================= главная для организаторов ================= */
.l-hero .wrap { padding-top: 48px; padding-bottom: 64px; }
.l-hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: center; }
.l-h1 { font-family: var(--font-num); font-weight: 700; text-transform: uppercase; font-size: clamp(42px, 6.6vw, 84px);
  line-height: .95; letter-spacing: -.005em; margin-bottom: 18px; }
.l-h1 .dot { display: inline-block; width: .3em; height: .3em; border-radius: 50%; background: var(--ball); vertical-align: .6em; margin-left: .06em; }
.l-sub { font-size: 19px; max-width: 34em; }
.l-ctas { margin: 22px 0 18px; }
.btn.ghost.on-sun { border-color: var(--navy); background: transparent; }
.l-bullets { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; font-weight: 600; font-size: 15px; }
.l-bullets li::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ball); margin-right: 9px; vertical-align: 1px; }

.phone { justify-self: center; width: 280px; aspect-ratio: 9 / 18.5; background: var(--navy); border-radius: 38px; padding: 10px;
  box-shadow: 0 30px 60px -20px rgba(26, 26, 24, .55); --hole: var(--paper); }
.phone-screen { background: var(--sky); border-radius: 30px; height: 100%; overflow: hidden; display: flex; flex-direction: column; }
.phone-top { background: var(--sun); padding: 26px 16px 34px; }
.phone-logo { font: 700 20px/1 var(--font-num); text-transform: uppercase; }
.bib.mini { margin: -22px 12px 0; padding: 22px 16px 18px; border-radius: 8px; --hole: var(--sky); }
.bib.mini .bib-head { padding-bottom: 6px; margin-bottom: 4px; border-bottom-width: 2px; }
.bib.mini .bib-head b, .bib.mini .bib-head span { font-size: 11px; }
.bib.mini::before, .bib.mini::after, .bib.mini .pins::before, .bib.mini .pins::after { width: 7px; height: 7px; }
.bib.mini::before, .bib.mini::after { top: 8px; } .bib.mini::before { left: 8px; } .bib.mini::after { right: 8px; }
.bib.mini .pins { left: 8px; right: 8px; bottom: 8px; height: 7px; }
.bib.mini .bib-number-static { text-align: center; font: 700 56px/1.1 var(--font-num); }
.fake-btn { background: var(--navy); color: #fff; text-align: center; border-radius: 7px; padding: 8px; font-size: 12px; font-weight: 700; margin-top: 6px; }
.fake-btn.ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--line); }
.phone-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 12px; }
.phone-shots i { aspect-ratio: 3 / 2; border-radius: 5px; background: linear-gradient(135deg, #d8d8cf, #bfbfb4); }

.l-sec { margin: 72px 0 0; }
.l-sec > h2 { font-size: clamp(28px, 4.2vw, 42px); margin-bottom: 26px; }
main .wrap > .l-sec:first-child { margin-top: 16px; }

.models { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 16px; }
.model { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 26px; }
.model.dark { background: var(--navy); color: #fff; border-color: var(--navy); }
.model h3 { font-size: 24px; margin-bottom: 10px; }
.model ul { list-style: none; padding: 0; margin: 14px 0 0; }
.model li { padding: 9px 0; border-top: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.model.dark li { border-color: rgba(255, 255, 255, .15); }
.model li::before { content: "✓"; color: var(--ball); margin-right: 10px; font-weight: 800; }
.model.dark li::before { color: var(--sun); }

.brand-sec { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.brand-sec h2 { font-size: clamp(28px, 4.2vw, 42px); }
.brand-sec p { font-size: 18px; }
.brand-demo { background: var(--paper); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); max-width: 420px; }
.bd-cover { height: 130px; background: linear-gradient(120deg, #2c5be0, #0f9bd8); position: relative; }
.bd-logo { position: absolute; left: 18px; bottom: -22px; width: 64px; height: 64px; border-radius: 12px; background: #fff;
  display: grid; place-items: center; font: 700 13px var(--font-num); color: #2c5be0; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.bd-body { padding: 34px 18px 18px; }
.bd-title { height: 18px; width: 70%; background: var(--navy); border-radius: 4px; margin-bottom: 10px; }
.bd-line { height: 10px; width: 45%; background: var(--line); border-radius: 4px; margin-bottom: 18px; }
.bd-sponsors { display: flex; gap: 10px; }
.bd-sponsors i { height: 30px; flex: 1; border-radius: 6px; background: var(--sky); border: 1px dashed #c9c9bf; }

.feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.feats div { border-top: 3px solid var(--navy); padding-top: 14px; }
.feats h3 { font-size: 18px; }
.feats p { color: var(--navy-2); font-size: 15px; }

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { font-weight: 700; font-size: 18px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 700 24px/1 var(--font-num); color: var(--ball); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--navy-2); }

.join { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; background: var(--sun); border-radius: 18px; padding: 36px; }
.join h2 { font-size: clamp(28px, 4.2vw, 42px); }
.join-form { background: var(--paper); border-radius: 12px; padding: 22px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.runner-cta { display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: wrap; text-align: center; margin-bottom: 8px; }
.runner-cta p { margin: 0; font-weight: 700; font-size: 18px; }

@media (max-width: 860px) {
  .l-hero-grid, .brand-sec, .join, .models { grid-template-columns: 1fr; }
  .feats { grid-template-columns: 1fr 1fr; }
  .phone { width: 240px; }
  .join { padding: 22px 16px; }
  .l-sec { margin-top: 56px; }
}
@media (max-width: 560px) {
  .l-hero .wrap { padding-top: 30px; padding-bottom: 44px; }
  .l-bullets { grid-template-columns: 1fr; }
  .l-ctas .btn { flex: 1; }
  .feats { grid-template-columns: 1fr; }
  .phone { display: none; }
}

/* ================= альбом организатора ================= */
.stage { color: var(--stage-ink, var(--navy)); }
.stage a:not(.btn) { color: inherit; }
.album-head.has-cover { background-image: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.6)), var(--cover); background-size: cover; background-position: center; color: #fff; --hole: var(--sky); }
.album-head.has-cover .wrap { padding-top: 64px; padding-bottom: 44px; }
.album-title { display: flex; gap: 18px; align-items: center; }
.org-logo { width: 76px; height: 76px; object-fit: contain; background: #fff; border-radius: 14px; padding: 8px; flex: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.event-stage .meta.org { font-weight: 500; opacity: .85; margin-top: 2px; }
.live { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 0 0 18px; }
.live.hidden { display: none; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--ball); box-shadow: 0 0 0 0 rgba(217, 47, 0, .5);
  animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(217, 47, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 47, 0, 0); } }
.gallery-pick { display: block; text-align: center; margin: 12px 0 0; font-weight: 600; font-size: 15px; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--ball); text-underline-offset: 4px; color: var(--navy-2); }
.gallery-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.err-text { color: #a8262c; font-weight: 600; margin-top: 10px; }

.sponsors { margin-top: 40px; text-align: center; }
.sponsors h3 { font-size: 15px; color: var(--muted); font-weight: 600; font-family: var(--font); }
.sponsor-list { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; }
.sponsor-list a, .sponsor-list span { display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 16px; min-width: 120px; height: 64px; text-decoration: none; color: var(--navy); }
.sponsor-list img { max-height: 42px; max-width: 140px; object-fit: contain; }
.powered { text-align: center; color: var(--muted); font-size: 13px; margin: 28px 0 0; }

/* камера */
.camera { position: fixed; inset: 0; background: #000; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.camera[hidden] { display: none; }
.camera video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.camera .oval { position: relative; width: min(62vw, 300px); aspect-ratio: 3 / 4; border-radius: 50%;
  box-shadow: 0 0 0 4px var(--sun), 0 0 0 9999px rgba(0, 0, 0, .55); }
.cam-hint { position: relative; color: #fff; font-weight: 600; margin-top: 22px; text-align: center; padding: 0 20px; }
.cam-actions { position: absolute; bottom: calc(28px + env(safe-area-inset-bottom)); left: 16px; right: 16px; display: flex; gap: 12px; justify-content: center; }
.cam-actions .btn.ghost { background: rgba(255, 255, 255, .15); color: #fff; border-color: rgba(255, 255, 255, .4); }
.btn.shutter { background: var(--sun); color: var(--stage-ink, var(--navy)); min-width: 160px; }
body.no-scroll { overflow: hidden; }

/* бесплатная модель: скачивание */
.ph.free .dl-row { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; gap: 6px; }
.ph.free .dl { flex: 1; background: rgba(255, 255, 255, .94); color: var(--navy);
  text-align: center; font-weight: 700; font-size: 14px; border-radius: 8px; padding: 8px 4px; text-decoration: none; }
@media (max-width: 560px) { .album-title { gap: 12px; } .org-logo { width: 58px; height: 58px; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

.buybar.free-bar form { grid-template-columns: 1fr auto; }
@media (max-width: 760px) { .buybar.free-bar form { grid-template-columns: 1fr; } }

.modes { border: 0; padding: 0; margin: 0 0 16px; }
.modes .check { margin: 8px 0; }

.models.three { grid-template-columns: repeat(3, 1fr); }
.calc { background: var(--paper); border-left: 5px solid var(--ball); border-radius: 8px; padding: 14px 18px; font-weight: 600; max-width: 760px; }
.feats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
@media (max-width: 860px) { .models.three { grid-template-columns: 1fr; } }

/* покупка: выбранные или все */
.buy-options { display: flex; gap: 12px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.buy-sel { display: flex; flex-direction: column; gap: 8px; }
.buy-sel .hint { font-weight: 700; color: var(--navy); }
.buybar form { grid-template-columns: 1fr auto !important; }
.buybar form .hint { grid-column: 1 / -1; font-weight: 700; color: var(--navy); }
@media (max-width: 760px) {
  .buy-options { flex-direction: column; align-items: stretch; }
  .buy-sel .btn, .buy-options > .btn { width: 100%; }
  .buybar form { grid-template-columns: 1fr !important; }
}

.ph-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 16px; }
.card.danger { border: 2px solid var(--err); }
.btn.danger { background: var(--err); color: #fff; }

/* единый поиск: селфи-слоты */
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.slot { border: 2px dashed var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.slot.filled { border-style: solid; border-color: var(--navy); }
.slot-img { aspect-ratio: 1; border-radius: 8px; background: #fff; display: grid; place-items: center; overflow: hidden; text-align: center; }
.slot-img span { font-size: 13px; color: var(--muted); padding: 8px; }
.slot-img img { width: 100%; height: 100%; object-fit: cover; }
.slot-img img:not([hidden]) + span { display: none; }
.slot-actions { display: flex; flex-direction: column; gap: 6px; }
.slot-actions .btn { width: 100%; justify-content: center; cursor: pointer; }
.slot-del { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: var(--navy); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.slot-del[hidden] { display: none; }
#find { scroll-margin-top: 16px; }

/* оплата Aitole: на телефоне кнопка, на компьютере QR */
.pay-desk { display: none; text-align: center; }
.pay-desk.always { display: block; }
.pay-desk .kaspi-qr { display: block !important; }
.pay-desk .kaspi-qr svg { display: block; width: 220px; height: 220px; margin: 0 auto; }
@media (min-width: 761px) {
  .pay-aitole .pay-phone { display: none; }
  .pay-aitole .pay-desk { display: block; }
}
.pay-aitole .sandbox { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
/* панель покупки не закрывает последние фото */
body:has(.buybar) .gallery { padding-bottom: 220px; }

/* страница заказа: оригиналы со скачиванием */
.order-photos { max-width: 980px; margin: 24px auto 0; }
.save-all { max-width: 520px; margin: 0 auto 16px; text-align: center; }
.got-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.got { margin: 0; background: var(--paper); border-radius: 10px; overflow: hidden; }
.got img { width: 100%; display: block; aspect-ratio: 4 / 3; object-fit: cover; background: #ddd; }
.got figcaption { display: flex; gap: 8px; padding: 10px; flex-wrap: wrap; }
.got figcaption .btn { flex: 1; justify-content: center; }
@media (max-width: 520px) { .got-grid { grid-template-columns: 1fr; } .got img { aspect-ratio: auto; } }

.gallery .group-title { grid-column: 1 / -1; margin: 14px 0 0; font-size: 15px; color: var(--muted); font-weight: 600; }
.gallery .group-title:first-child { margin-top: 0; }

/* ---- шапка админки: «Выйти» рядом с логотипом, разделы — вкладками отдельной строкой ---- */
.top .logout { margin-left: auto; font-weight: 600; font-size: 15px; color: var(--navy-2); text-decoration: none;
  padding: 8px 4px; }
.top .logout:hover { color: var(--ball); }
.admin-tabs { display: flex; gap: 4px; order: 3; flex-basis: 100%; margin: 0 -4px; padding-bottom: 8px;
  overflow-x: auto; scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs a { flex: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 15px; color: var(--navy-2);
  text-decoration: none; white-space: nowrap; }
.admin-tabs a:hover { color: var(--ball); }
.admin-tabs a[aria-current="page"] { background: var(--sky); color: var(--navy); }
@media (min-width: 761px) {
  /* на компьютере всё в одну строку: логотип, разделы, «Выйти» */
  .admin-tabs { order: 0; flex-basis: auto; margin: 0 0 0 auto; padding: 0; }
  .top .logout { order: 1; margin-left: 8px; }
}
@media (max-width: 760px) {
  .top .wrap:has(.admin-tabs) { row-gap: 2px; min-height: 0; padding-top: 8px; }
  .top .wrap:has(.admin-tabs) .brand img { height: 36px; width: 36px; }
  .admin-tabs a { padding: 8px 10px; font-size: 14px; }
  .admin-tabs { justify-content: space-between; }
}
/* поля формы не шире экрана даже на самых узких телефонах */
.form-grid > div { min-width: 0; }
input, select, textarea { max-width: 100%; min-width: 0; }
@media (max-width: 560px) { .hide-m { display: none; } }

/* защита от «страница шире экрана»: колонки сетки не растягиваются содержимым */
html, body { overflow-x: clip; }
.find { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
@media (max-width: 860px) { .find { grid-template-columns: minmax(0, 1fr); } }
.find > *, .hero > *, .l-hero-grid > *, .models > *, .join > *, .brand-sec > * { min-width: 0; }
.bib-head b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bib-head span { flex: none; }
.top .wrap { min-width: 0; }

.buy-note { margin: 8px 0 0; }
.bought { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.mail-link { margin-top: 18px; max-width: 560px; }
.mail-link .row { flex-wrap: nowrap; }
.mail-link input { flex: 1; }
@media (max-width: 420px) { .mail-link .row { flex-wrap: wrap; } .mail-link .btn { width: 100%; } }

.brand .logo-white { display: none; }

/* проверка поиска по лицу в админке */
.face-test { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.face-test figure { margin: 0; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; }
.face-test figure.found { border-color: var(--grass); }
.face-test img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.face-test figcaption { padding: 6px 8px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 13px; }
.face-test figcaption b { font: 700 18px var(--font-num); margin-right: 4px; }
