/*
 * Дизайн системата на MF Tackle по SAP (15.11.2026): бяло платно, две сиви ленти за рамката, тънки линии,
 * ъгли 4 и 8 px (12 px само за диалог и снимка), един златен основен бутон и един бял второстепенен, без сенки,
 * преливки и хапчета. Шрифтът е Source Sans 3. Само светла тема.
 * Пише се на ръка, без сборка. Връзват я laravel/resources/views/inertia.blade.php (страниците на React),
 * layouts/public.blade.php и errors/page.blade.php (Blade). Стил само за една страница стои до страницата.
 * Описанието на системата (цветове, шрифт, ъгли, части, правила) е в laravel/docs/DESIGN.md.
 */

/* Source Sans 3 (Adobe, OFL, променлив 200-900), само кирилица и латиница, от css/fonts. */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(fonts/source-sans-3-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(fonts/source-sans-3-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;
}

:root {
  /* Платно и ленти: бялото е за съдържанието, двете сиви са рамката (горната лента, менюто, долната лента, долният край). */
  --canvas: #ffffff;
  --chrome: #f5f5f2;
  --band: #eaeae6;
  /* Избраното, което е кутия (сегмент, ред в менюто, сектор, избор): светло злато под черта 3 px. */
  --tint: #f6efdc;
  /* Мастило: заглавията черни, текстът топло тъмносив, бележките по-светли. Сивото без оттенък е само за рамката. */
  --ink: #000000;
  --ink-body: #26241f;
  --ink-list: #3f3c35;
  --ink-meta: #5e594e;
  --ink-nav: #545454;
  /* Линии: тънката е между редовете и по ръба на картата, плътната е контурът на бутон и поле (5,1:1 върху бяло). */
  --line: #dddbd4;
  --hairline: #736d5f;
  /* Златото на клиента: запълване с черен надпис (7,1:1). За текст и връзки върху бяло е по-тъмното (6,5:1). */
  --gold: #ae9354;
  --gold-hover: #9d8347;
  --gold-press: #8c743c;
  --gold-text: #735b23;
  --gold-deep: #5a4613;
  /* Златото върху черно (лентата на началната страница, известието, лентата на прегледа като гост): 9:1. */
  --gold-light: #c9ad6b;
  /* Черното от логото: лентата на началната страница и известието долу. */
  --black: #0d0d0d;
  /* Върху черното: заглавие и бутон (19:1), текстът (14:1), контурът на бутона, тънките линии и посоченият бутон. */
  --on-black: #ffffff;
  --on-black-body: #dedcd6;
  --on-black-line: #a5a199;
  --on-black-rule: rgba(255, 255, 255, 0.28);
  --on-black-hover: rgba(255, 255, 255, 0.1);
  /* Състоянията: запълнено е състоянието, текстът върху светлия фон е поне 8:1. */
  --ok: #2e6b30;
  --ok-tint: #e6f2e3;
  --on-ok: #1f4d22;
  --warn: #8a4b0f;
  --warn-tint: #fdeedc;
  --on-warn: #663400;
  --error: #b3261e;
  --error-hover: #8f1c16;
  --err-tint: #fbe9e7;
  --on-err: #7a1410;
  --state-hover: rgba(0, 0, 0, 0.05);
  /* Ореолът на полето с фокус: златото на 55%. */
  --focus-ring: rgba(174, 147, 84, 0.55);
  --scrim: rgba(13, 13, 13, 0.48);
  /* Медалите за 1-3 (злато, сребро, бронз) и числото върху тях; същите са в lib/shareImage.ts. */
  --medal-1: radial-gradient(circle at 32% 28%, #fff0bf, #e8bf55 55%, #b98a26);
  --medal-2: radial-gradient(circle at 32% 28%, #ffffff, #cfd4da 55%, #98a0a9);
  --medal-3: radial-gradient(circle at 32% 28%, #ffe0c4, #d49260 55%, #a2602f);
  --on-medal-1: #3a2800;
  --on-medal-2: #23282e;
  --on-medal-3: #351a04;
  /* Ъгли: 4 px за значки и плочки, 8 px за бутони, полета и карти, 12 px само за диалог и снимка. */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Височината на горната лента на телефон; от 900 px с меню вляво е 0 (.has-rail). */
  --top: 60px;
  --rail-w: 84px;
  --nav-h: 64px;
  /* Лентата на манша, която остава под горната (.stickybar): разделите 44 px и линията. */
  --sticky-h: 45px;

  /*
   * Старите имена от Material 3, насочени към горните. CSS на страниците ги ползва, докато не мине на новите;
   * нов код пише новите имена.
   */
  --primary: var(--gold-text);
  --on-primary: #ffffff;
  --primary-container: var(--tint);
  --on-primary-container: var(--gold-deep);
  --secondary: var(--ink-meta);
  --secondary-container: var(--tint);
  --on-secondary-container: var(--ink-body);
  --tertiary: var(--ok);
  --tertiary-container: var(--ok-tint);
  --on-tertiary-container: var(--on-ok);
  --error-container: var(--err-tint);
  --on-error-container: var(--on-err);
  --warn-container: var(--warn-tint);
  --on-warn-container: var(--on-warn);
  --background: var(--canvas);
  --surface-container-lowest: var(--canvas);
  --surface-container-low: var(--canvas);
  --surface-container: var(--chrome);
  --surface-container-high: var(--chrome);
  --surface-container-highest: var(--band);
  --on-surface: var(--ink-body);
  --on-surface-variant: var(--ink-meta);
  --outline: var(--hairline);
  --outline-variant: var(--line);
  --divider: var(--line);
  --inverse-surface: var(--black);
  --inverse-on-surface: #ffffff;
  --inverse-primary: var(--gold-light);
  --elevation-1: 0 0 0 0 transparent;
  --elevation-2: 0 0 0 0 transparent;
  --radius: var(--radius-md);
  --radius-xl: var(--radius-md);
  color-scheme: light;
}

/* Основа */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  /* Полето с фокус, полето с грешка и котвата (#calendar) не застават под залепената горна лента. */
  scroll-padding-top: calc(var(--top) + 16px);
}

/* На манша под горната лента е и лентата със секторите. */
html:has(.stickybar) {
  scroll-padding-top: calc(var(--top) + var(--sticky-h) + 16px);
}

/* С мишка и тъчпад страницата не отскача в края (лентите се разминаваха със съдържанието); дърпането на телефон остава. */
@media (pointer: fine) {
  html {
    overscroll-behavior-y: none;
  }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink-body);
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  /* Шрифтът има и българските форми на буквите (locl при lang="bg"). В таблица с имена и числа стандартните се четат по-бързо. */
  font-feature-settings: 'locl' 0;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/*
 * Връзка в текст: златна и подчертана. Бутонът (.btn) в празен списък или съобщение остава с цвета на варианта си.
 * Името, отборът и маншът в таблица или списък са в цвета на реда (CSS на страницата).
 */
.prose a:not(.btn),
.empty a:not(.btn),
.notice a:not(.btn) {
  color: var(--gold-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* Всяко :hover е в @media (hover: hover): на телефон фонът и цветът не остават след докосване (натискането е :active). */
@media (hover: hover) {
  .prose a:not(.btn):hover,
  .empty a:not(.btn):hover,
  .notice a:not(.btn):hover {
    color: var(--ink);
  }
}

button,
input,
select,
textarea {
  font: inherit;
  font-feature-settings: inherit;
  color: inherit;
}

/* Двойно докосване по бутон, връзка или поле не увеличава страницата; щипането остава. */
a,
button,
label,
input,
select,
textarea,
summary {
  touch-action: manipulation;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
fieldset {
  margin: 0;
}

/* Заглавията са черни; последната дума не остава сама на втория ред. */
h1,
h2,
h3 {
  color: var(--ink);
  text-wrap: balance;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

fieldset {
  border: 0;
  padding: 0;
  min-width: 0;
}

img {
  max-width: 100%;
}

.num {
  font-variant-numeric: tabular-nums lining-nums;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main {
  flex: 1;
  padding-bottom: 32px;
}

.muted {
  color: var(--ink-meta);
}

.nowrap {
  white-space: nowrap;
}

/* Текст с дълъг имейл или адрес без интервали: пренася се където и да е. */
.break-any {
  overflow-wrap: anywhere;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/*
 * „Към съдържанието“: първата връзка в .page, видима само с фокус. Води към <main id="main">, покрай логото и менюто.
 * Обикновено <a>, не Link на Inertia.
 */
.skip-link {
  position: absolute;
  z-index: 40;
  top: 8px;
  left: max(8px, env(safe-area-inset-left));
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--gold-press);
  border-radius: var(--radius-md);
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.print-only {
  display: none;
}

.noscript {
  padding-top: 24px;
  color: var(--ink-meta);
}

@media (max-width: 599px) {
  .hide-phone {
    display: none !important;
  }
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/*
 * Горната лента на телефон и на гост: логото на MFTACKLE, „Състезания“, вдясно „Меню“ или „Вход“ и „Регистрация“.
 * Логото води към началото на приложението. Менюто (.nav) е лист под лентата на телефон, а от 900 px е менюто
 * вляво (.has-rail по-долу) с квадратния знак горе. От 15.11.2026 на dev вместо нея е хедърът на MF Радар
 * („Хедърът на MF Радар“ по-долу); .topbar, .brand, .brand__sub и .menu-btn остават до качването на живо.
 */
/* Над долната лента (30): отвореното меню затъмнява и нея. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  background: var(--chrome);
  box-shadow: 0 1px 0 var(--line);
}

.topbar__in {
  height: var(--top);
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  flex: none;
}

/* Цялото лого (знакът и „ТВОЯТ ПРИЯТЕЛ В РИБОЛОВА !“) е 44 px високо в лента от 60 px. */
.brand__logo {
  display: block;
  width: auto;
  height: 44px;
}

.brand__sub {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-left: 16px;
  color: var(--ink-nav);
  font-size: 15px;
  line-height: 21px;
  white-space: nowrap;
}

.brand__sub::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  height: 20px;
  margin-top: -10px;
  border-left: 1px solid var(--line);
}

@media (hover: hover) {
  .brand__sub:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}

/* С долната лента разделът се вижда в нея и горе са само знакът и „Меню“. „Състезания“ горе би посочило друг раздел, когато долу е „Класиране“. */
.has-bnav .brand__sub {
  display: none;
}

/* До 479 px до логото няма място за „Състезания“ и „Вход“ с „Регистрация“ (или „Меню“); логото води на същото място. */
@media (max-width: 479px) {
  .brand__sub {
    display: none;
  }
}

/*
 * „Меню“. Когато страницата я няма в долната лента и е в менюто (Регламенти, Състезатели, Отбори, Потребители),
 * е избрана като всичко избрано: светло злато с черта (data-current от TopBar и public.blade.php).
 */
.menu-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink-nav);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

@media (hover: hover) {
  .menu-btn:hover {
    background: var(--band);
    color: var(--ink);
  }
}

.menu-btn svg {
  flex: none;
}

/* Долните ъгли са прави: иначе чертата отдолу се извива нагоре в тях и се чете като сянка. */
.menu-btn[data-current] {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--tint);
  box-shadow: inset 0 -3px 0 var(--gold);
  color: var(--ink);
  font-weight: 600;
}

.menu-btn[aria-expanded='true'] {
  border-radius: var(--radius-md);
  background: var(--black);
  border-color: var(--black);
  box-shadow: none;
  color: var(--on-black);
}

.nav {
  display: none;
}

/*
 * Листът под лентата, квадратен, с линия вместо сянка; останалото от страницата е затъмнено. Превъртането не
 * минава в страницата отдолу, а височината е по видимата част (dvh): в Safari „Изход“ не остава под долната лента.
 */
.nav.is-open {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: var(--top);
  max-height: calc(100vh - var(--top));
  max-height: calc(100dvh - var(--top));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px max(8px, env(safe-area-inset-right)) 12px max(8px, env(safe-area-inset-left));
  background: var(--chrome);
  border-top: 1px solid var(--line);
  box-shadow: 0 0 0 100vmax var(--scrim);
  clip-path: inset(0 -100vmax -100vmax -100vmax);
}

.nav__group + .nav__group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink-nav);
  font-size: 15px;
  line-height: 21px;
  text-align: left;
  cursor: pointer;
}

.nav__icon {
  display: grid;
  place-items: center;
  flex: none;
}

@media (hover: hover) {
  .nav__link:hover {
    background: var(--band);
    color: var(--ink);
  }
}

.nav__link.is-on {
  background: var(--tint);
  color: var(--ink);
  font-weight: 600;
}

/* Избраната страница: златна черта вляво, както чертата под избрания раздел. */
.nav__link.is-on::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 24px;
  margin-top: -12px;
  background: var(--gold);
}

.nav__link.is-on .nav__icon {
  color: var(--gold-text);
}

/* Лента за връзката със сървъра */
.netbar {
  display: none;
  background: var(--err-tint);
  color: var(--on-err);
  font-size: 14px;
  line-height: 21px;
  font-weight: 500;
}

.netbar.show {
  display: block;
  position: sticky;
  top: var(--top);
  z-index: 25;
}

.netbar .wrap {
  display: block;
  padding-top: 12px;
  padding-bottom: 12px;
}

.flashes {
  display: grid;
  gap: 8px;
  padding-top: 16px;
}

.flashes .notice {
  margin-bottom: 0;
}

/* Долният край на страницата (магазинът, лични данни): втората сива лента. */
.site-footer {
  margin-top: 40px;
  background: var(--band);
}

.site-footer__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 20px;
  padding-top: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  color: var(--ink-nav);
  font-size: 15px;
  line-height: 21px;
}

.site-footer__in a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (hover: hover) {
  .site-footer__in a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}

/* Логото на MFTACKLE към магазина, по-малко от горното. */
.site-footer__logo img {
  display: block;
  width: auto;
  height: 36px;
}

/*
 * На телефон логото е на свой ред, а двете връзки са заедно под него: празен елемент през целия ред ги разделя.
 * Иначе според ширината „Лични данни“ падаше сама под логото. Връзката на логото остава колкото логото.
 */
@media (max-width: 599px) {
  .site-footer__in::after {
    content: '';
    order: 1;
    flex-basis: 100%;
    height: 0;
  }
  .site-footer__in > a:not(.site-footer__logo) {
    order: 2;
  }
}

/* Долната лента с менюто на телефон (до 899 px): сива лента, избраното е с черта отгоре и по-тъмен надпис. */
.bnav {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: var(--chrome);
  box-shadow: 0 -1px 0 var(--line);
}

.bnav__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 0 2px;
  color: var(--ink-nav);
}

.bnav__pill {
  display: grid;
  place-items: center;
  width: 44px;
  height: 28px;
}

.bnav__label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 18px;
}

.bnav__item[aria-current='page'] {
  color: var(--ink);
}

@media (hover: hover) {
  .bnav__item:hover {
    color: var(--ink);
  }
}

.bnav__item[aria-current='page']::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 48px;
  height: 3px;
  margin-left: -24px;
  background: var(--gold);
}

.bnav__item[aria-current='page'] .bnav__pill {
  color: var(--gold-text);
}

.bnav__item[aria-current='page'] .bnav__label {
  font-weight: 600;
}

.bnav__item:focus-visible {
  outline-offset: -4px;
  border-radius: var(--radius-md);
}

@media (max-width: 899px) {
  .has-bnav {
    padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  }
  /* Полето с фокус (Tab) не остава под долната лента. */
  html:has(.has-bnav) {
    scroll-padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
  }
}

/*
 * От 900 px: менюто е сива лента вляво, горната лента я няма. До 1279 px е 84 px с иконата над надписа,
 * от 1280 px е 216 px с иконата до надписа. Изрезът на камерата (телефон настрани) е отляво на лентата.
 */
@media (min-width: 900px) {
  .bnav {
    display: none;
  }
  .has-rail {
    --top: 0px;
    padding-left: calc(var(--rail-w) + env(safe-area-inset-left));
  }
  html:has(.has-rail) {
    scroll-padding-top: 16px;
  }
  html:has(.has-rail .stickybar) {
    scroll-padding-top: calc(var(--sticky-h) + 16px);
  }
  .has-rail .topbar {
    position: static;
    background: none;
    box-shadow: none;
  }
  .has-rail .topbar__in {
    padding: 0;
  }
  .has-rail .brand__sub,
  .has-rail .menu-btn {
    display: none;
  }
  .has-rail .brand {
    position: fixed;
    z-index: 32;
    top: 14px;
    left: calc((var(--rail-w) - 48px) / 2 + env(safe-area-inset-left));
    min-height: 0;
  }
  /* Квадратният знак (<source> в <picture> от 900 px). */
  .has-rail .brand__logo {
    width: 48px;
    height: 48px;
  }
  .has-rail .nav,
  .has-rail .nav.is-open {
    position: fixed;
    z-index: 31;
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    display: flex;
    flex-direction: column;
    width: calc(var(--rail-w) + env(safe-area-inset-left));
    max-height: none;
    padding: 78px 6px 10px calc(6px + env(safe-area-inset-left));
    overflow-y: auto;
    scrollbar-width: none;
    background: var(--chrome);
    border-top: 0;
    box-shadow: 1px 0 0 var(--line);
    clip-path: none;
  }
  .has-rail .nav__group {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .has-rail .nav__group + .nav__group {
    margin: 8px 0 0;
  }
  /* „Изход“ е най-долу. */
  .has-rail .nav__group--end,
  .has-rail .nav__group + .nav__group--end {
    margin-top: auto;
    border-top: 0;
  }
  .has-rail .nav__link {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 56px;
    padding: 6px 2px;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
  }
  .has-rail .nav__icon {
    width: 24px;
    height: 24px;
  }
  .has-rail .nav__link:focus-visible {
    outline-offset: -2px;
  }
  /*
   * Избраният ред стига до ръба на лентата, квадратен отляво, и чертата е левият му край, колкото е висок.
   * Отстъпът вляво е по-голям със същото, затова надписът не мърда и чертата не покрива „П“ от „Потребители“.
   */
  .has-rail .nav__link.is-on {
    width: calc(100% + 6px);
    margin-left: -6px;
    padding-left: 8px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
  }
  .has-rail .nav__link.is-on::before {
    top: 0;
    bottom: 0;
    height: auto;
    margin-top: 0;
  }
  .wrap {
    padding-left: max(32px, env(safe-area-inset-left));
    padding-right: max(32px, env(safe-area-inset-right));
  }
  /* Отляво е лентата: отстъпът за изреза е вече в .has-rail. */
  .has-rail .wrap {
    padding-left: 32px;
  }
}

@media (min-width: 1280px) {
  :root {
    --rail-w: 216px;
  }
  .has-rail .brand {
    top: 16px;
    left: calc(20px + env(safe-area-inset-left));
  }
  .has-rail .brand__logo {
    width: 44px;
    height: 44px;
  }
  .has-rail .nav,
  .has-rail .nav.is-open {
    padding: 80px 8px 12px calc(8px + env(safe-area-inset-left));
  }
  .has-rail .nav__link {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    min-height: 40px;
    padding: 0 12px;
    font-size: 15px;
    line-height: 21px;
    text-align: left;
  }
  .has-rail .nav__link.is-on {
    width: calc(100% + 8px);
    margin-left: -8px;
    padding-left: 20px;
  }
}

/* С пръст (таблет настрани) редът в менюто е 44 px. */
@media (min-width: 1280px) and (pointer: coarse) {
  .has-rail .nav__link {
    min-height: 44px;
  }
}

/*
 * Телефон настрани (под 900 px широк и до 500 px висок): иначе двете ленти заемат над една трета от височината.
 * Горната лента се превърта със страницата, а долната е 56 px с иконата до надписа.
 */
@media (max-width: 899px) and (max-height: 500px) {
  :root {
    --top: 0px;
    --nav-h: 56px;
  }
  .topbar {
    position: relative;
  }
  .topbar__in {
    height: 60px;
  }
  .nav.is-open {
    top: 60px;
    max-height: calc(100vh - 60px);
    max-height: calc(100dvh - 60px);
  }
  .no-js .topbar__in {
    min-height: 60px;
  }
  .bnav__item {
    flex-direction: row;
    gap: 4px;
    padding: 0 4px;
  }
  .bnav__pill {
    flex: none;
  }
}

/*
 * Хедърът на MF Радар (15.11.2026, собственикът: „Направи хедъра на състезанията същия като на радара“): горе на всяка
 * страница, 56 px и залепнал, освен на нисък екран (стиловете му са в /riboloven-radar/assets/hedar.css, разметката от
 * App\Support\MfrHeader). <body class="mfr">, когато го има. Горната лента на състезанията (.topbar, .brand, .menu-btn,
 * .nav-guest) вече не се рисува; правилата ѝ остават до качването на живо. Под хедъра е менюто на влезлия: от 900 px лентата
 * вляво, на телефон „Меню“ в долната лента отваря над нея листа с всички страници и „Изход“.
 */
:root {
  --mfr-h: 56px;
}

.mfr .page {
  --top: var(--mfr-h);
  min-height: calc(100vh - var(--mfr-h));
}

/*
 * Полето с фокус и котвата застават под хедъра (56 px на всяка ширина), а на манша и под лентата със секторите, както
 * scroll-padding-top на html по-горе. Тези правила са по-силни и от html { scroll-padding-top: 64px } в hedar.css.
 */
html:has(body.mfr) {
  scroll-padding-top: calc(var(--mfr-h) + 16px);
}

html:has(body.mfr .stickybar) {
  scroll-padding-top: calc(var(--mfr-h) + var(--sticky-h) + 16px);
}

/* „Меню“ в долната лента е бутон със същия вид като връзките до него. */
.bnav__menu {
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

/* Текущата страница е в менюто: като текущата връзка в долната лента (златна черта горе). */
.bnav__menu[data-current] {
  color: var(--ink);
}

.bnav__menu[data-current]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 48px;
  height: 3px;
  margin-left: -24px;
  background: var(--gold);
}

.bnav__menu[data-current] .bnav__pill {
  color: var(--gold-text);
}

.bnav__menu[data-current] .bnav__label {
  font-weight: 600;
}

/* Отвореното меню: черният знак, както посоченият бутон „Меню“ горе (.menu-btn[aria-expanded='true']). */
.bnav__menu[aria-expanded='true'] .bnav__pill {
  border-radius: var(--radius-md);
  background: var(--black);
  color: var(--on-black);
}

@media (max-width: 899px) {
  /* Листът с менюто е над долната лента; затъмнено е съдържанието, хедърът и долната лента не. */
  .mfr .nav.is-open {
    position: fixed;
    z-index: 29;
    top: auto;
    bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
    max-height: calc(100vh - var(--mfr-h) - var(--nav-h) - env(safe-area-inset-bottom));
    max-height: calc(100dvh - var(--mfr-h) - var(--nav-h) - env(safe-area-inset-bottom));
    overscroll-behavior: contain;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    clip-path: inset(-100vmax -100vmax 0 -100vmax);
  }
  .no-js .bnav__menu {
    display: none;
  }
  /* Чатът на MF Радар (hedar.js го зарежда за влезлия там): бутонът и скритите прозорчета са над долната лента. */
  body:has(.has-bnav) .mch-kopche {
    bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom));
  }
  body:has(.has-bnav) .mch-okna {
    bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  }
  /* Докато листът с менюто е отворен, бутонът на чата не е върху него. */
  body:has(.nav.is-open) .mch-kopche {
    display: none;
  }
  /* С „Меню“ управляващите имат пет бутона долу: на 320 px всеки е 64 px. */
  .mfr .bnav__pill {
    max-width: 100%;
  }
}

/* Пет бутона долу (.bnav--5, с „Въвеждане“): до 374 px надписите са по-ситни и без отстъп, иначе „Състезания“ се реже. */
@media (max-width: 374px) {
  .bnav--5 .bnav__item {
    padding-left: 0;
    padding-right: 0;
  }
  .bnav--5 .bnav__label {
    font-size: 11px;
    letter-spacing: 0.2px;
  }
}

@media (min-width: 700px) and (max-width: 899px) {
  body:has(.has-bnav) .mch-panel {
    bottom: calc(var(--nav-h) + 76px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 699px) {
  body:has(.has-bnav) .mch-okna {
    bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom));
  }
  body:has(.has-bnav) .mch-tost {
    bottom: calc(var(--nav-h) + 76px + env(safe-area-inset-bottom));
  }
}

/* Екранът за мерене (Screen/Show, без рамка) е без хедъра на MF Радар и без чата: <body class="scr-on">. */
.scr-on #mfr-gl,
.scr-on .mfr-preskochi,
.scr-on .mch-kopche,
.scr-on .mch-okna,
.scr-on .mch-tost,
.scr-on .mch-panel {
  display: none !important;
}

/* От 900 px лентата вляво е под хедъра, без квадратния знак горе: логото е „MF Радар“ в хедъра. */
@media (min-width: 900px) {
  .mfr .has-rail .nav,
  .mfr .has-rail .nav.is-open {
    top: var(--mfr-h);
    padding-top: 16px;
  }
}

/* Нисък екран: хедърът се превърта със страницата (hedar.css), лентата вляво е от горния край под него. */
@media (max-height: 540px) {
  .mfr .page {
    --top: 0px;
  }
  html:has(body.mfr) {
    scroll-padding-top: 16px;
  }
  html:has(body.mfr .stickybar) {
    scroll-padding-top: calc(var(--sticky-h) + 16px);
  }
}

@media (min-width: 900px) and (max-height: 540px) {
  .mfr .has-rail .nav,
  .mfr .has-rail .nav.is-open {
    top: 0;
    padding-top: calc(var(--mfr-h) + 16px);
  }
}

/*
 * Бутони: основен (.btn--gold: златен, черен надпис) и второстепенен (.btn--line, .btn--tonal и .btn--ghost са един
 * и същ: бял с контур). Червеният запълнен (.btn--danger) е само за изтриване след потвърждение, второстепенният с
 * червен надпис (.btn--danger-line) е за „Изтрий“ без потвърждение. Размерите са два: 44 px и 36 px (.btn--sm).
 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 16px;
  line-height: 20px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.btn > svg:first-child {
  flex: none;
  margin-left: -2px;
}

.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: default;
}

.btn--sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 15px;
}

/* На телефон и с пръст малките бутони са 44 px. */
@media (max-width: 899px), (pointer: coarse) {
  .btn--sm {
    min-height: 44px;
  }
}

/* „Голям“ (.btn--lg) е със същата височина, както „Запази“ навсякъде; „много голям“ (.btn--xl) пълни реда. */
.btn--xl {
  width: 100%;
}

.btn--gold {
  background: var(--gold);
  border-color: var(--gold-press);
  color: var(--ink);
}

@media (hover: hover) {
  .btn--gold:hover:not(:disabled, [aria-disabled='true']) {
    background: var(--gold-hover);
  }
}

.btn--tonal,
.btn--line,
.btn--ghost {
  background: var(--canvas);
  border-color: var(--hairline);
  color: var(--gold-deep);
}

@media (hover: hover) {
  .btn--tonal:hover:not(:disabled, [aria-disabled='true']),
  .btn--line:hover:not(:disabled, [aria-disabled='true']),
  .btn--ghost:hover:not(:disabled, [aria-disabled='true']) {
    background: var(--chrome);
    border-color: var(--ink-body);
    color: var(--ink);
  }
}

.btn--danger {
  background: var(--error);
  border-color: var(--error);
  color: #fff;
}

@media (hover: hover) {
  .btn--danger:hover:not(:disabled, [aria-disabled='true']) {
    background: var(--error-hover);
    border-color: var(--error-hover);
  }
}

.btn--danger-line {
  background: var(--canvas);
  border-color: var(--hairline);
  color: var(--error);
}

@media (hover: hover) {
  .btn--danger-line:hover:not(:disabled, [aria-disabled='true']) {
    background: var(--err-tint);
    border-color: var(--error);
    color: var(--error-hover);
  }
}

/* Карта: бяла, тънка линия, 8 px. Отстъпът е 16 px на телефон и 24 px от 600 px. */
.card {
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.card--pad {
  padding: 16px;
}

@media (min-width: 600px) {
  .card--pad {
    padding: 24px;
  }
}

.card__title {
  font-size: 20px;
  line-height: 24px;
  font-weight: 500;
  color: var(--ink);
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 44px;
  padding: 6px 0 2px;
  color: var(--ink-nav);
  font-size: 15px;
  line-height: 21px;
}

.crumb::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  margin: 0 2px 0 3px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

@media (hover: hover) {
  .crumb:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}

/*
 * Страница, която започва с крачка: крачката е на 8 px под горната лента, заглавието на 2 px под нея (.page-head
 * и заглавията на страниците с крачка), еднакво на всички страници.
 */
.wrap:has(> .crumb:first-child) {
  padding-top: 8px;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 0 16px;
}

.crumb + .page-head {
  padding-top: 2px;
}

/* Заглавието е 28/31 px на телефон и 32/35 px от 600 px, тегло 500. Дълго име без интервал се пренася. */
.page-title {
  font-size: 28px;
  line-height: 31px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

@media (min-width: 600px) {
  .page-title {
    font-size: 32px;
    line-height: 35px;
  }
}

/* На телефон действието до заглавието („Ново състезание“, „Нов потребител“) е на собствен ред и го пълни. */
@media (max-width: 599px) {
  .page-head > .btn {
    flex: 1 1 100%;
  }
  /* Бутоните под името на водоема (React и Blade) пълнят всеки ред, без назъбен десен край; два в ред са еднакви. */
  .vpage .hero__actions .btn {
    flex: 1 1 140px;
  }
}

/*
 * Значки (не се натискат). Фактът (видът, ролята, „Заключен“, „Метод фидер“) е бяла значка с тънка линия.
 * Състоянието е запълнено: зелено („Текущо“, „потвърден“), оранжево („чернова“), сиво („Приключило“).
 * „Предстоящо“ е думата с празен кръг пред нея, без кутия.
 */
.chip,
.ccard__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: var(--canvas);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-list);
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
}

/* Етикетът в картата на състезанието се пренася: „Квалификация: …, Финал A: …“ е по-дълъг от картата. */
.ccard__tag {
  height: auto;
  min-height: 24px;
  padding: 3px 8px;
  white-space: normal;
}

/* Чип с икона: катинарът на заключен регламент. */
.chip svg {
  flex: none;
}

.chip--ok,
.chip--current {
  background: var(--ok-tint);
  box-shadow: none;
  color: var(--on-ok);
  font-weight: 500;
}

/* „Текущо“: зелено с точка. */
.chip--current::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

.chip--warn {
  background: var(--warn-tint);
  box-shadow: none;
  color: var(--on-warn);
  font-weight: 500;
}

.chip--muted {
  background: var(--band);
  box-shadow: none;
  color: var(--ink-body);
  font-weight: 500;
}

.chip--next {
  padding: 0;
  background: none;
  box-shadow: none;
  color: var(--ink-meta);
  font-weight: 500;
}

.chip--next::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

/*
 * „На живо“ (.chip.chip--live, LiveBadge.tsx и status.blade.php): червено с бял надпис и точка, която пулсира два пъти
 * и спира (при prefers-reduced-motion не пулсира).
 */
.chip--live {
  gap: 6px;
  background: var(--error);
  box-shadow: none;
  color: #fff;
  font-weight: 700;
}

.live-badge__dot {
  position: relative;
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.live-badge__dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: pulse 1.8s ease-out 2;
}

@keyframes pulse {
  from {
    transform: scale(1);
    opacity: 0.6;
  }
  to {
    transform: scale(2.75);
    opacity: 0;
  }
}

/* Редът под „На живо“ на страниците, които се обновяват сами (ui/LiveNote.tsx): кога е последната проверка. */
.live-note {
  margin-top: 6px;
  color: var(--ink-meta);
  font-size: 14px;
  line-height: 21px;
}

.live-note--warn {
  color: var(--warn);
  font-weight: 500;
}

.live-note--warn svg {
  margin-right: 2px;
  vertical-align: -3px;
}

.live-note a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

@media (hover: hover) {
  .live-note a:hover {
    text-decoration-thickness: 2px;
  }
}

/* Медали: 1-3 са злато, сребро и бронз; местата след третото са само число; без място за проверка е с триъгълник. */
.medal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  flex: none;
}

.medal--lg {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

/* Кръгът на 1-3: целият знак (малък върху снимка, ribbon={false}) или дискът под лентата (.medal--won). */
.medal--gold,
.medal--silver,
.medal--bronze,
.medal__disc {
  font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45), 0 1px 2px rgba(60, 40, 0, 0.3);
}

.medal--gold:not(.medal--won),
.medal--gold .medal__disc {
  background: var(--medal-1);
  color: var(--on-medal-1);
}

.medal--silver:not(.medal--won),
.medal--silver .medal__disc {
  background: var(--medal-2);
  color: var(--on-medal-2);
}

.medal--bronze:not(.medal--won),
.medal--bronze .medal__disc {
  background: var(--medal-3);
  color: var(--on-medal-3);
}

/*
 * Медал с лента за 1-3 в списъците (ui/Medal.tsx): в същата кутия като числото на другите места, лентата горе и дискът
 * с числото долу. Размерите са в проценти и em, затова медалът расте с кутията (medal--lg, екранът за мерене).
 */
.medal--won {
  position: relative;
  box-shadow: none;
}

.medal__ribbon {
  position: absolute;
  top: 0;
  left: 50%;
  width: 58%;
  height: 48%;
  transform: translateX(-50%);
  /* Черното и златото от логото, без цветовете на някое знаме. */
  background: linear-gradient(90deg, var(--black) 0 34%, var(--gold) 34% 66%, var(--black) 66%);
  clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%);
}

.medal__disc {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 72%;
  height: 72%;
  transform: translateX(-50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.86em;
  line-height: 1;
}

/* Делено място („1,5“) с по-малко число, за да влезе в диска. */
.medal__disc--long {
  font-size: 0.76em;
  letter-spacing: 0;
}

/* Местата след третото са само число: кръгът е за медалите. */
.medal--plain {
  color: var(--ink-list);
}

.medal--none {
  color: var(--ink-meta);
}

.medal--review {
  border-radius: var(--radius-sm);
  background: var(--warn-tint);
  color: var(--on-warn);
}

/* Снимката на състезателя (ui/Avatar.tsx): квадрат с ъгъл 8 px, кръгът е само за медалите. Без снимка първите букви. Размерът е в style. */
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--band);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.avatar--none {
  color: var(--ink-nav);
  font-weight: 500;
  line-height: 1;
  -webkit-user-select: none;
  user-select: none;
}

/*
 * Знаменцето на държавата до името (ui/Flag.tsx): колкото буквите, 3:2. Чертата отвън е за белите ивици (България)
 * на бял фон и на хартия. Файловете в css/flags/ са от country-flag-icons 1.6.20:
 *
 * (The MIT License)
 *
 * Copyright (c) 2020 @catamphetamine <purecatamphetamine@gmail.com>
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * 'Software'), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
.flag {
  display: inline-block;
  height: 0.8em;
  width: auto;
  aspect-ratio: 3 / 2;
  margin-right: 0.35em;
  vertical-align: -0.06em;
  border-radius: 1px;
  outline: 1px solid rgba(0, 0, 0, 0.18);
  outline-offset: -1px;
  object-fit: cover;
}

/* Знаменцето и първата буква на името не се делят на два реда; останалото се пренася както името. */
.flag-word {
  white-space: nowrap;
}

/* Превключвател (сегментирани бутони, връзки с aria-current): избраното е светло злато с черта отдолу. */
.seg {
  display: inline-flex;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--canvas);
  overflow: hidden;
}

.seg__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  color: var(--ink-body);
  font-size: 15px;
  line-height: 21px;
  white-space: nowrap;
}

.seg__btn + .seg__btn {
  border-left: 1px solid var(--hairline);
}

@media (hover: hover) {
  .seg__btn:hover {
    background: var(--chrome);
  }
}

.seg__btn.is-on {
  background: var(--tint);
  box-shadow: inset 0 -3px 0 var(--gold);
  color: var(--ink);
  font-weight: 600;
}

.seg__btn:focus-visible {
  outline-offset: -3px;
  border-radius: calc(var(--radius-md) - 2px);
}

/* Избраният крайен бутон: долният ъгъл е прав, иначе чертата се извива нагоре в закръгления ъгъл. */
.seg:has(> .seg__btn.is-on:first-child) {
  border-bottom-left-radius: 0;
}

.seg:has(> .seg__btn.is-on:last-child) {
  border-bottom-right-radius: 0;
}

/* Раздели: текст на линия, черта 3 px под избрания. .tabs--chips (филтрите) са същите раздели, по-близо един до друг. */
.tabs {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  box-shadow: inset 0 -1px 0 var(--line);
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs.more-right {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
}

.tabs.more-left {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px);
  mask-image: linear-gradient(90deg, transparent, #000 40px);
}

.tabs.more-left.more-right {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}

.tab {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink-nav);
  font-size: 15px;
  line-height: 21px;
  white-space: nowrap;
}

@media (hover: hover) {
  .tab:hover {
    color: var(--ink);
  }
}

.tab.is-on {
  color: var(--ink);
  font-weight: 600;
}

.tab.is-on::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--gold);
}

/* Рамката на фокуса е вътре: кутията на .tabs (overflow) реже всичко извън раздела. */
.tab:focus-visible {
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}

.tabs--chips {
  gap: 4px;
}

.tabs--chips .tab {
  padding: 0 12px;
}

/* На 360-399 px четирите раздела на „Състезатели“ се побират без превъртане, под 360 px с по-малко място между тях. */
@media (max-width: 399px) {
  .tabs--chips .tab {
    padding: 0 10px;
  }
}

@media (max-width: 359px) {
  .tabs--chips {
    gap: 0;
  }
  .tabs--chips .tab {
    min-width: 44px;
    padding: 0 6px;
  }
}

/* Съобщения */
.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 21px;
  margin-bottom: 16px;
}

.notice > svg {
  flex: none;
}

/* Дълъг имейл без интервали („Пратихме писмо на …“) се пренася, вместо да излиза от кутията на телефон. */
.notice__body {
  min-width: 0;
  overflow-wrap: anywhere;
}

.notice__body ul {
  margin-top: 4px;
  padding-left: 18px;
  list-style: disc;
}

.notice--warn {
  background: var(--warn-tint);
  color: var(--on-warn);
}

.notice--ok {
  background: var(--ok-tint);
  color: var(--on-ok);
}

.notice--err {
  background: var(--err-tint);
  color: var(--on-err);
}

.notice--info {
  background: var(--chrome);
  color: var(--ink-body);
}

/* Празен списък: извън карта е кутия като картата. */
.empty {
  display: grid;
  justify-items: start;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--canvas);
  color: var(--ink-meta);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.card .empty {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

/* Списък със състезания: редове с линия в една карта. */
.clist > li + li {
  border-top: 1px solid var(--line);
}

.crow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  min-height: 56px;
  padding: 12px 16px;
}

@media (hover: hover) {
  .crow:hover {
    background: var(--chrome);
  }
}

.clist > li:first-child .crow {
  border-radius: calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px) 0 0;
}

.clist > li:last-child .crow {
  border-radius: 0 0 calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px);
}

.clist > li:only-child .crow {
  border-radius: calc(var(--radius-md) - 1px);
}

.crow__main {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.crow__name {
  color: var(--ink);
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.crow__meta {
  color: var(--ink-meta);
  font-size: 14px;
  line-height: 21px;
}

/* Част от реда („Метод фидер“): цяла на нов ред, ако не се побира, а по-дълга от реда се пренася вътре. */
.crow__item {
  display: inline-block;
}

.crow__date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-meta);
  font-size: 14px;
  line-height: 21px;
}

.crow__date svg {
  flex: none;
}

/* Значката (статус, „Заключен“): на телефон под текста, за да остане място за името; от 600 px вдясно, преди шеврона. */
.crow__side {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
  margin-top: 10px;
}

.crow > .chev-go {
  grid-column: 2;
  grid-row: 1 / span 2;
}

/* Шевронът надясно в ред, който води към друга страница. */
.chev-go {
  flex: none;
  color: var(--ink-meta);
  transform: rotate(-90deg);
}

@media (min-width: 600px) {
  .crow {
    grid-template-columns: minmax(0, 1fr) auto auto;
    column-gap: 16px;
  }
  .crow__side {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
  }
  .crow > .chev-go {
    grid-column: 3;
    grid-row: 1;
  }
}

/*
 * Картите на състезанията по месеци („Състезания“ в React и началната страница за гост, competitions/_card).
 * Мрежата е от една колона на телефон до три на компютър. Цялата карта е връзка; „Към състезанието“ е най-долу.
 * Картата е колкото съдържанието си: карта без първите трима не се разтяга до съседката си.
 */
.ccards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  align-items: start;
  gap: 16px;
}

.ccards > li {
  display: flex;
  min-width: 0;
}

.ccard {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--canvas);
}

@media (hover: hover) {
  .ccard:hover {
    border-color: var(--hairline);
  }
}

@media (min-width: 600px) {
  .ccard {
    padding: 20px;
  }
}

.ccard__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.ccard__venue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 24px;
  color: var(--ink-meta);
  font-size: 14px;
  line-height: 21px;
}

.ccard__venue svg {
  flex: none;
}

/* Мястото е елемент в inline-flex: без min-width: 0 не става по-тясно от най-дългата си дума и излиза под значката. */
.ccard__venue > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ccard__badge {
  flex: none;
}

.ccard__name {
  color: var(--ink);
  font-size: 20px;
  line-height: 24px;
  font-weight: 500;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.ccard__tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ccard__tilewrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ccard__sep {
  color: var(--ink-meta);
}

.ccard__tile {
  display: grid;
  justify-items: center;
  min-width: 56px;
  padding: 6px 8px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--canvas);
}

.ccard__day {
  color: var(--ink);
  font-size: 20px;
  line-height: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
}

.ccard__mon {
  color: var(--ink-body);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}

.ccard__wd {
  justify-self: stretch;
  margin-top: 4px;
  padding-top: 2px;
  border-top: 1px solid var(--line);
  color: var(--ink-meta);
  font-size: 13px;
  line-height: 18px;
  text-align: center;
}

.ccard__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ccard__days {
  color: var(--ink-meta);
  font-size: 14px;
  line-height: 21px;
}

/* Първите трима (само в React, за влезлите): медал, снимка, име, точки и улов. */
.ccard__podium {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.ccard__label,
.ccard__more {
  color: var(--ink-meta);
  font-size: 14px;
  line-height: 21px;
}

.ccard__wins {
  display: grid;
  gap: 8px;
}

.ccard__win {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.ccard__who {
  display: grid;
  min-width: 0;
}

.ccard__wname {
  color: var(--ink-body);
  font-size: 15px;
  line-height: 21px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.ccard__wres {
  color: var(--ink-meta);
  font-size: 14px;
  line-height: 21px;
  font-variant-numeric: tabular-nums lining-nums;
}

/* Самостоятелна връзка: златна и подчертана. */
.ccard__go {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: auto;
  color: var(--gold-text);
  font-size: 15px;
  line-height: 21px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

@media (hover: hover) {
  .ccard:hover .ccard__go {
    color: var(--ink);
  }
}

.ccard__chev {
  transform: rotate(-90deg);
}

/* Страницата на водоема (public/venue в Blade и Venues/Show в React): снимката под заглавието и описанието. */
.vpage__photo {
  margin: 16px 0 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--chrome);
}

.vpage__photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(60vh, 480px);
  object-fit: cover;
}

/* Картата с описанието е на цялата ширина, а редовете в нея са до 46em (.prose, затова с .vpage пред нея). */
.vpage .vpage__about {
  max-width: none;
  margin-top: 16px;
}

.vpage__about > * {
  max-width: 46em;
}

.vpage__about > h2:first-child {
  margin-top: 0;
}

.vpage .pub-list,
.vpage .ci-section {
  margin-top: 24px;
}

/* Мястото в заглавието, когато води към страницата на водоема. */
.hero__link {
  color: var(--gold-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

@media (hover: hover) {
  .hero__link:hover {
    color: var(--ink);
  }
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.pagination > :first-child {
  justify-self: start;
}

.pagination > :last-child {
  justify-self: end;
}

.pagination__now {
  color: var(--ink-meta);
  font-size: 14px;
}

/* Класиране (Standings/Show): заглавие, превключвател, раздели за обхвата, действията, редовете. */
.st__hero {
  padding-bottom: 12px;
}

.st__titlerow {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  margin-top: 2px;
}

@media screen and (max-width: 599px) {
  .st__type {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

.st__title {
  font-size: 28px;
  line-height: 31px;
  font-weight: 500;
}

.st__status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--ink-meta);
  font-size: 14px;
  line-height: 21px;
}

.st__status::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

.st__status--warn::before {
  background: var(--warn);
}

.st__layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.st__bar {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.st__bar .seg {
  display: flex;
}

.st__bar .seg__btn {
  flex: 1;
}

/* На телефон разделите се превъртат до ръба на екрана. */
.st__scopes {
  display: grid;
  min-width: 0;
  margin: 0 -16px;
  padding: 0 16px;
}

.st__side {
  display: contents;
}

.st__card {
  display: none;
}

.st__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Действията на класирането са малкият размер (36 px); с пръст са 44 px. */
.st__actions .btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 15px;
}

@media (max-width: 899px), (pointer: coarse) {
  .st__actions .btn {
    min-height: 44px;
  }
}

/*
 * На телефон шестте действия са лента в три колони с иконата над надписа (два реда, около 136 px вместо 400):
 * под заглавието и превключвателите остава място за подиума и първите редове. Иконите са на една линия горе,
 * и когато надписът в съседния бутон е на два или три реда.
 */
@media (max-width: 599px) {
  .st__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
  }
  .st__actions .btn {
    flex-direction: column;
    justify-content: flex-start;
    gap: 2px;
    padding: 12px 4px 4px;
    font-size: 13px;
    line-height: 16px;
    white-space: normal;
    text-align: center;
  }
  .st__actions .btn > svg:first-child {
    margin: 0;
  }
}

/*
 * От 600 до 1199 px (до картата вдясно) действията са в равни колони: две до 799 px, където „Снимки за социални
 * мрежи“ не се събира в трета, и три от 800 px. Иначе бяха пет в ред и шестото само на втори ред.
 */
@media (min-width: 600px) and (max-width: 1199px) {
  .st__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 800px) and (max-width: 1199px) {
  .st__actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.st__body {
  min-width: 0;
}

.st__foot {
  margin-top: 16px;
  color: var(--ink-meta);
  font-size: 14px;
  line-height: 21px;
}

/* Лента, която остава горе под горната лента (секторите на манша). */
.stickybar {
  position: sticky;
  top: var(--top);
  z-index: 20;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}

.stickybar .tabs {
  box-shadow: none;
}

@media (min-width: 600px) {
  .st__title {
    font-size: 32px;
    line-height: 35px;
  }
  .st__bar .seg {
    max-width: 420px;
  }
}

@media (min-width: 900px) {
  .st__scopes {
    margin: 0;
    padding: 0;
  }
}

/* От 1200 px: вдясно карта със състезанието (дати, място, потвърдени маншове) и действията. */
@media (min-width: 1200px) {
  .st__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas: 'bar side' 'body side';
    grid-template-rows: auto 1fr;
    column-gap: 24px;
    row-gap: 16px;
    align-items: start;
  }
  .st__bar {
    grid-area: bar;
  }
  .st__body {
    grid-area: body;
  }
  .st__side {
    grid-area: side;
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .st__card {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .st__card .chip--live {
    align-self: flex-start;
  }
  .st__card-name {
    color: var(--ink);
    font-size: 20px;
    line-height: 24px;
    font-weight: 500;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }
  .st__card .st__status {
    margin-top: 0;
  }
  .st__facts {
    display: grid;
    gap: 6px;
    color: var(--ink-list);
    font-size: 15px;
    line-height: 21px;
  }
  .st__facts li {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .st__facts svg {
    flex: none;
  }
  .st__meter .meter__bar {
    margin-bottom: 0;
  }
  .st__card-legend {
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--ink-meta);
    font-size: 14px;
    line-height: 21px;
  }
  .st__hero .st__status,
  .st__hero .chip--live,
  .st__hero .live-note,
  .st__foot {
    display: none;
  }
  .st__card .live-note {
    margin-top: 0;
  }
  .st__side .st__actions .btn {
    flex: 1;
  }
}

/*
 * Таблото: всеки ред е мрежа със същите колони. Заглавният ред е 13 px в сиво с плътна линия отдолу, редовете са
 * 48 px с тънка линия, точките 17 px удебелени, числата вдясно в колони.
 */
.board {
  overflow: hidden;
}

.board__head,
.srow {
  display: grid;
  grid-template-columns: var(--cols-phone);
  column-gap: 8px;
  align-items: center;
  padding-left: 12px;
  padding-right: 14px;
}

/* Надписите стоят долу над линията: надпис на два реда („Първи места“) не изкарва другите от линията им. */
.board__head {
  align-items: end;
  min-height: 40px;
  padding-top: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink-meta);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}

/* „Място“ над медалите е центрирано като тях. */
.board:has(.srow > .srow__place:first-child) .board__head > :first-child {
  justify-self: center;
  text-align: center;
}

.board .r {
  text-align: right;
}

.board .wide-only,
.board .desk-only {
  display: none;
}

.srow {
  min-height: 48px;
  padding-top: 6px;
  padding-bottom: 6px;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums lining-nums;
}

.srow:first-child {
  border-top: 0;
}

/* Класирането и статистиката може да са над 50 реда: редовете извън екрана не се подреждат и не се рисуват, но остават
   за търсенето в страницата и за четеца. auto пази последната височина на реда; 48 и 60 px (телефон) са min-height на
   .srow. content-visibility реже нарисуваното извън реда: overflow-clip-margin оставя 12 px за зоната за пръст около
   името (11 px, _shared/who-link.css) и за рамката на фокуса. Само за екрана, печатът е без правилото. */
@media screen {
  .srow {
    content-visibility: auto;
    contain-intrinsic-size: auto 48px;
    overflow-clip-margin: 12px;
  }
}

@media (hover: hover) {
  .srow:hover {
    background: var(--chrome);
  }
}

.srow__place {
  display: flex;
  justify-content: center;
}

.srow__who,
.srow__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Със снимките на състезателите (Standings/Show, ui/Avatar.tsx): снимката вляво от името и отбора. */
.srow__who--photo {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.srow__name {
  color: var(--ink);
  font-size: 16px;
  line-height: 22px;
  font-weight: 500;
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: anywhere;
}

/* Отборът е на 350: същият размер като името на компютър, но се чете като второ. */
.srow__team {
  margin-top: 2px;
  color: var(--ink-list);
  font-size: 15px;
  line-height: 21px;
  font-weight: 350;
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: anywhere;
}

/*
 * Бележките („заместен от“, „резерва за“, причината за проверка) са последната клетка на реда, на собствен ред в мрежата:
 * на телефон под името и точките, от 600 px под всички колони след мястото.
 */
.srow__notes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  min-width: 0;
}

.note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}

.note svg {
  flex: none;
}

.note--review {
  background: var(--warn-tint);
  color: var(--on-warn);
}

.note--swap {
  background: var(--ok-tint);
  color: var(--on-ok);
}

.srow__heats {
  color: var(--ink-meta);
  font-size: 15px;
}

.srow__pts {
  color: var(--ink);
  font-size: 17px;
  line-height: 22px;
  font-weight: 700;
}

.srow__kg {
  color: var(--ink-body);
  font-size: 16px;
  line-height: 22px;
}

/* Мерните единици след числото: само в редовете на телефон (.board--stack), където заглавията ги няма. */
.unit {
  display: none;
}

/*
 * .board--stack (класирането) на телефон: мястото вляво, точките горе вдясно, уловът под тях.
 * Заглавията на колоните остават само за екранния четец.
 */
@media (max-width: 599px) {
  .board--stack .board__head,
  .board--stack .board__head > * {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .board--stack .srow {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    grid-template-areas: 'place who pts' 'place who kg' 'place notes notes';
    grid-template-rows: auto 1fr auto;
    column-gap: 14px;
    min-height: 60px;
    contain-intrinsic-size: auto 60px;
    padding: 10px 16px;
  }
  /* Табло без колона за място (отборните точки в манша): името вляво, точките и уловът вдясно. */
  .board--stack .srow:not(:has(> .srow__place)) {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'who pts' 'who kg' 'notes notes';
  }
  .board--stack .srow__notes {
    grid-area: notes;
  }
  .board--stack .srow__place {
    grid-area: place;
    align-self: center;
  }
  .board--stack .srow:has(.srow__notes) .srow__place {
    align-self: start;
    margin-top: 2px;
  }
  .board--stack .srow__who {
    grid-area: who;
    align-self: center;
  }
  .board--stack .srow__pts {
    grid-area: pts;
    align-self: end;
    white-space: nowrap;
  }
  .board--stack .srow__kg {
    grid-area: kg;
    align-self: start;
    color: var(--ink-meta);
    font-size: 15px;
    white-space: nowrap;
  }
  .board--stack .unit {
    display: inline;
    color: var(--ink-meta);
    font-size: 13px;
    font-weight: 400;
  }
}

@media (min-width: 600px) {
  .board__head,
  .srow {
    grid-template-columns: var(--cols-wide);
    column-gap: 16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .board .wide-only {
    display: block;
  }
  /* Дългото име на отбор се пренася на втори ред, за да се вижда цяло и на таблет без мишка. */
  .srow__teamcol {
    color: var(--ink-list);
    font-size: 15px;
    line-height: 21px;
    font-weight: 350;
    -webkit-hyphens: auto;
    hyphens: auto;
    overflow-wrap: anywhere;
  }
  .srow__team {
    display: none;
  }
  /* Бележките са под всички колони след мястото; в табло без място (отборните точки в манша) започват от първата колона. */
  .srow__notes {
    grid-column: 2 / -1;
    margin-top: 2px;
  }
  .srow:not(:has(> .srow__place)) > .srow__notes {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .board__head,
  .srow {
    grid-template-columns: var(--cols-desk);
  }
  .board .desk-only {
    display: block;
  }
}

/* Формите: полета с контур 44 px, етикет отгоре; при фокус черна рамка и златен ореол 3 px. */
.field {
  min-width: 0;
  margin-top: 16px;
}

/* В .stack разстоянието е от gap: полето след текст или друго поле не добавя свое. */
.stack > * + .field {
  margin-top: 0;
}

.lbl {
  display: block;
  margin: 0 0 6px;
  padding: 0;
  color: var(--ink-body);
  font-size: 14px;
  line-height: 21px;
  font-weight: 500;
}

.inp {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--canvas);
  color: var(--ink-body);
  font-size: 16px;
  line-height: 24px;
  /* Дълъг текст или пример в празното поле свършва с многоточие, а не по средата на думата. */
  text-overflow: ellipsis;
}

.inp--area {
  min-height: 112px;
  padding: 10px 12px;
  resize: vertical;
}

.inp::placeholder {
  color: var(--ink-meta);
  opacity: 1;
}

.select {
  position: relative;
  display: block;
}

/* Дълъг избор на телефон („Средно място (напр. 2 и 3 → по 2,5)“): многоточие вместо отрязан текст. */
.select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 44px;
  padding: 0 40px 0 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--canvas);
  color: var(--ink-body);
  font-size: 16px;
  line-height: 24px;
  text-overflow: ellipsis;
}

@media (hover: hover) {
  .inp:hover,
  .select select:hover {
    border-color: var(--ink-body);
  }
}

.select svg {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-meta);
  pointer-events: none;
}

.select select:focus-visible,
.inp:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.inp.is-err,
.select.is-err select {
  border-color: var(--error);
  box-shadow: inset 0 0 0 1px var(--error);
}

.inp.is-err:focus,
.select.is-err select:focus {
  box-shadow: inset 0 0 0 1px var(--error), 0 0 0 3px rgba(179, 38, 30, 0.3);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 10px 0;
  color: var(--ink-body);
  cursor: pointer;
}

.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--gold-press);
}

/* Бележката под полето може да е с имейл: дълъг имейл без интервал се пренася. */
.hint {
  margin-top: 6px;
  color: var(--ink-meta);
  font-size: 14px;
  line-height: 21px;
  overflow-wrap: anywhere;
}

.msg {
  margin-top: 6px;
  font-size: 14px;
  line-height: 21px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.msg--err {
  color: var(--error);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Радиобутоните като избор (статус на реда, регламент): избраното е светло злато с черта отдолу. */
.pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--canvas);
  color: var(--ink-body);
  font-size: 15px;
  cursor: pointer;
}

@media (max-width: 899px), (pointer: coarse) {
  .pick {
    min-height: 44px;
  }
}

.pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

@media (hover: hover) {
  .pick:hover {
    background: var(--chrome);
    border-color: var(--ink-body);
  }
}

/* Долните ъгли са прави, за да е чертата права (както на „Меню“). */
.pick.is-on {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--tint);
  box-shadow: inset 0 -3px 0 var(--gold);
  color: var(--ink);
  font-weight: 600;
}

/* Рамката е само от клавиатурата: щракването по избора също дава фокус на скрития радиобутон. */
.pick:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Формите за управление: групи полета, колони, бутони, сгъваеми раздели (ui/Form.tsx, ui/Disclosure.tsx) */
/*
 * Тясна страница (форма): левият ръб е на мястото на левия ръб на .wrap от 1120 px, за да не скача заглавието
 * при преход от една страница на менюто към друга. На телефон и таблет (под 1120 px) е на цялата ширина.
 */
.wrap--narrow {
  max-width: 800px;
  margin-left: max(0px, calc((100% - 1120px) / 2));
  margin-right: auto;
}

/* Страница с .wrap--narrow: съобщенията отгоре са със същата ширина и на същото място. */
.main:has(> .wrap--narrow) > .flashes {
  max-width: 800px;
  margin-left: max(0px, calc((100% - 1120px) / 2));
  margin-right: auto;
}

/* Карти една под друга (форма от няколко карти) */
.stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-content: start;
}

.lbl .optional {
  font-weight: 400;
  color: var(--ink-meta);
}

/* На 320 px „Индивидуално и отборно“ иначе е с многоточие. iOS увеличава страницата при поле под 16 px,
   но iPhone с iOS 16.4 (най-старият браузър от build.target) е широк поне 375 px. */
@media (max-width: 359px) {
  .select select {
    padding-right: 36px;
    font-size: 15px;
  }
}

.inp--short {
  max-width: 180px;
}

.fset + .fset {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* С float надписът е обикновен блок: иначе браузърът го слага върху горната рамка на групата. */
.fset__legend {
  float: left;
  width: 100%;
  padding: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 24px;
  font-weight: 500;
}

.fset__body {
  clear: both;
  padding-top: 1px;
}

.fgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 16px;
}

@media (min-width: 600px) {
  .fgrid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fgrid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.factions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

/* Бутоните в .stack са на 24 px от последното поле, както в другите форми. */
.stack > * + .factions {
  margin-top: 8px;
}

/* На телефон всеки бутон във формата пълни реда си („Запази“ и „Смени паролата“ еднакво). */
@media (max-width: 599px) {
  .factions > .btn {
    flex: 1 1 100%;
  }
}

.disc__sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.disc__sum::-webkit-details-marker {
  display: none;
}

.disc__sum::after {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-right: 2px solid var(--ink-meta);
  border-bottom: 2px solid var(--ink-meta);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.15s;
}

.disc[open] > .disc__sum::after {
  transform: translateY(3px) rotate(225deg);
}

@media (hover: hover) {
  .disc:not(.card--pad) > .disc__sum:hover {
    color: var(--gold-text);
  }
}

/*
 * Сгъваемата карта е като „Регламент“ на състезанието: заглавният ред стига до ръбовете на картата
 * и при посочване е сив; отстъпът е в заглавието и в съдържанието.
 */
.disc.card--pad {
  padding: 0;
}

.disc.card--pad > .disc__sum {
  min-height: 56px;
  padding: 0 16px;
  border-radius: calc(var(--radius-md) - 1px);
  font-size: 20px;
  line-height: 24px;
}

.disc.card--pad[open] > .disc__sum {
  border-radius: calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px) 0 0;
}

.disc.card--pad > .disc__body {
  padding: 0 16px 20px;
}

@media (hover: hover) {
  .disc.card--pad > .disc__sum:hover {
    background: var(--chrome);
  }
}

.disc.card--pad > .disc__sum:active {
  background: var(--band);
}

.disc.card--pad > .disc__sum:focus-visible {
  outline-offset: -2px;
}

@media (min-width: 600px) {
  .disc.card--pad > .disc__sum {
    padding: 0 24px;
  }
  .disc.card--pad > .disc__body {
    padding: 0 24px 20px;
  }
}

/* Улов в протокола: голямото поле, под него какво ще се запише */
.weight {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 72px;
  padding: 0 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--canvas);
}

.weight:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.weight.is-err {
  border-color: var(--error);
  box-shadow: inset 0 0 0 1px var(--error);
}

.weight.is-off {
  background: var(--chrome);
  border-color: var(--line);
  color: var(--ink-meta);
}

.weight__inp {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 36px;
  line-height: 40px;
  font-weight: 500;
  font-variant-numeric: tabular-nums lining-nums;
}

.weight__unit {
  color: var(--ink-meta);
  font-size: 20px;
}

.readback {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 21px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.readback svg {
  flex: none;
  margin-top: 1px;
}

.readback--ok {
  background: var(--ok-tint);
  color: var(--on-ok);
}

.readback--err {
  background: var(--err-tint);
  color: var(--on-err);
}

.readback--warn {
  background: var(--warn-tint);
  color: var(--on-warn);
}

.readback--info {
  background: var(--chrome);
  color: var(--ink-meta);
  font-weight: 400;
}

.sectors {
  display: grid;
  /* Петте сектора са на един ред и на 320 px. „13 реда“ е 43 px: под 360 px разстоянието е 6 px, за да се побере. */
  grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
  gap: 8px;
}

@media (max-width: 359px) {
  .sectors {
    gap: 6px;
  }
}

/* Сектор: избраното е светло злато с черта, както сегментът. */
.sector {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  min-height: 56px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--canvas);
  color: var(--ink-body);
  cursor: pointer;
}

@media (hover: hover) {
  .sector:hover {
    background: var(--chrome);
    border-color: var(--ink-body);
  }
}

.sector__l {
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

.sector__n {
  color: var(--ink-meta);
  font-size: 13px;
}

/* Долните ъгли са прави, за да е чертата права (както на „Меню“). */
.sector.is-on {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--tint);
  box-shadow: inset 0 -3px 0 var(--gold);
  color: var(--ink);
}

.sector.is-on .sector__l {
  font-weight: 700;
}

.sector.is-on .sector__n {
  color: var(--ink-body);
}

/* Панелът с „Добави“ долу; на телефон е над долната лента. */
.dock {
  position: sticky;
  bottom: 0;
  z-index: 25;
  margin-top: 8px;
  padding: 18px max(16px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: var(--canvas);
  box-shadow: 0 -1px 0 var(--line);
}

@media (max-width: 899px) {
  .has-bnav .dock {
    bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
    padding-bottom: 12px;
  }
}

/* Без gap: празната област за съобщението (.dock__live, ToastRegion) е в мрежата винаги; отстъпът е под .toast. */
.dock__in {
  max-width: 568px;
  margin: 0 auto;
  display: grid;
  gap: 0;
}

/* Съобщението след запис: черна лента. */
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-bottom: 10px;
  padding: 6px 8px 6px 14px;
  border-radius: var(--radius-md);
  background: var(--black);
  color: var(--on-black);
}

.toast__ic {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--gold-light);
}

.toast__t {
  flex: 1;
  min-width: 0;
  color: var(--on-black);
  font-size: 15px;
  line-height: 21px;
}

/* История на промените */
.history {
  padding: 20px;
}

.history__list {
  margin-top: 10px;
}

/* Причината, „преди“ и „след“ са написани от хора: дълга дума без интервал се пренася вътре в картата. */
.history__item {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.history__label {
  font-weight: 500;
}

.history__change,
.history__text,
.history__lines {
  margin-top: 4px;
  color: var(--ink-meta);
  font-size: 14px;
}

.history__before {
  text-decoration: line-through;
  text-decoration-color: var(--hairline);
}

.history__meta {
  margin-top: 4px;
  color: var(--ink-meta);
  font-size: 13px;
}

/*
 * Публичните страници на Blade: layouts/public.blade.php и resources/views/components/ds/*.
 * Заглавието (hero), бройките (stats), броячът (meter) и заключеното класиране (locked).
 */
.pub {
  padding-top: 10px;
}

/* Горе вдясно за гост: „Вход“ (второстепенен) и „Регистрация“ (основен) */
.nav-guest {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/*
 * Отворената страница („Вход“ на страницата за вход): второстепенният бутон с черта, не втори златен до „Регистрация“.
 * Долните ъгли са прави като на „Меню“, за да е чертата права.
 */
.nav-guest .btn[aria-current='page'] {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--canvas);
  border-color: var(--hairline);
  box-shadow: inset 0 -3px 0 var(--gold);
  color: var(--ink);
  font-weight: 600;
}

/* Под 360 px горе е само „Вход“: „Регистрирай се“ е в заглавието, в заключеното класиране и под формата за вход. */
@media (max-width: 359px) {
  .nav-guest .btn--gold {
    display: none;
  }
}

/* Изходът е бутон във форма: формата не е отделна кутия в менюто. */
.nav form {
  display: contents;
}

/* Без JavaScript менюто на влезлия е отворено под лентата на телефон, без „Меню“. */
@media (max-width: 899px) {
  .no-js .menu-btn {
    display: none;
  }
  .no-js .topbar__in {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--top);
  }
  .no-js .nav {
    display: block;
    width: 100%;
    padding-bottom: 8px;
  }
}

.btn--block {
  width: 100%;
}

/* Заглавието на публичната страница: текст на платното, без кутия. */
.hero {
  position: relative;
  color: var(--ink-body);
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 28px;
  line-height: 31px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin-top: 12px;
  color: var(--ink-list);
  font-size: 16px;
  line-height: 24px;
}

.hero__meta li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__meta svg {
  flex: none;
  color: var(--ink-meta);
}

/* Връзката към водоема е на собствен ред: мястото за пръст е 44 px, без да мести реда. */
.hero__meta .hero__link {
  display: inline-block;
  margin: -10px 0;
  padding: 10px 0;
}

.hero__lead {
  display: grid;
  gap: 10px;
  max-width: 44em;
  margin-top: 12px;
  color: var(--ink-list);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

/*
 * Началната страница: черна лента от край до край под горната лента, квадратна; единственото място с тъмен фон.
 * Лентата излиза до краищата с border-image-outset, а не с по-широк елемент: изнесеното рисуване не прави
 * страницата по-широка и на телефон няма хоризонтално превъртане.
 */
.pub:has(> .hero) {
  padding-top: 0;
}

.pub > .hero {
  padding: 28px 0 32px;
  background: var(--black);
  border-image: linear-gradient(var(--black), var(--black)) fill 0 / 0 / 0 100vmax;
  color: var(--on-black-body);
}

.pub > .hero h1 {
  color: var(--on-black);
}

.pub > .hero .hero__lead {
  gap: 8px;
  margin-top: 16px;
  color: var(--on-black-body);
  font-weight: 350;
}

.pub > .hero .hero__meta,
.pub > .hero .hero__meta svg {
  color: var(--on-black-body);
}

.pub > .hero .hero__link {
  color: var(--gold-light);
}

@media (hover: hover) {
  .pub > .hero .hero__link:hover {
    color: var(--on-black);
  }
}

.pub > .hero .btn--line,
.pub > .hero .btn--tonal,
.pub > .hero .btn--ghost {
  background: transparent;
  border-color: var(--on-black-line);
  color: var(--on-black);
}

@media (hover: hover) {
  .pub > .hero .btn--line:hover,
  .pub > .hero .btn--tonal:hover,
  .pub > .hero .btn--ghost:hover {
    background: var(--on-black-hover);
    border-color: var(--on-black);
    color: var(--on-black);
  }
}

.pub > .hero :focus-visible {
  outline-color: var(--on-black);
}

.pub > .hero .chip:not([class*='chip--']) {
  background: none;
  box-shadow: inset 0 0 0 1px var(--on-black-line);
  color: var(--on-black);
}

/* Заглавие на раздел под заглавието на страницата („Състезания“ на началната страница) */
.section-title {
  margin: 40px 0 12px;
  font-size: 20px;
  line-height: 24px;
  font-weight: 500;
}

/* Бройките: числа, разделени с тънки линии, в една рамка; на телефон две в ред. */
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--canvas);
}

.hero .stats {
  margin-top: 18px;
}

.stat {
  min-width: 0;
  padding: 12px 16px 14px;
  box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line);
}

/* Нечетен брой: последната е на целия ред. */
.stats--odd .stat:last-child {
  grid-column: 1 / -1;
}

.stat__n {
  display: block;
  color: var(--ink);
  font-size: 28px;
  line-height: 31px;
  font-weight: 500;
  font-variant-numeric: tabular-nums lining-nums;
}

.stat__l {
  display: block;
  margin-top: 2px;
  color: var(--ink-meta);
  font-size: 14px;
  line-height: 21px;
}

.pub > .hero .stats {
  border-color: var(--on-black-rule);
  background: none;
}

.pub > .hero .stat {
  box-shadow: 1px 0 0 var(--on-black-rule), 0 1px 0 var(--on-black-rule);
}

.pub > .hero .stat__n {
  color: var(--on-black);
}

.pub > .hero .stat__l {
  color: var(--on-black-body);
}

/* Брояч „3 от 4“ с лента от парчета, които се пълнят отляво */
.meter__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 16px;
  font-weight: inherit;
}

.meter__label {
  color: var(--ink);
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}

.meter__score {
  color: var(--ink);
  font-size: 20px;
  line-height: 24px;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums lining-nums;
}

.meter__of {
  color: var(--ink-meta);
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
}

.meter__bar {
  display: flex;
  gap: 2px;
  margin: 12px 0 4px;
}

.meter__seg {
  flex: 1;
  height: 6px;
  background: var(--band);
}

.meter__seg.is-on {
  background: var(--gold);
}

/* Редове с текст, разделени с линия (редовете за кръговете) */
.lines {
  margin-top: 12px;
}

.lines > li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-list);
}

.lines > li:last-child {
  padding-bottom: 0;
}

/* Заключеното класиране */
.locked {
  padding: 16px;
  overflow: hidden;
}

.locked__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.locked__preview {
  position: relative;
  overflow: hidden;
}

/* Надписите на размитата таблица са в data-t, не в текста на страницата. */
.ghost-tab::before,
.ghost-head span::before {
  content: attr(data-t);
}

.ghost-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding-bottom: 8px;
  opacity: 0.7;
}

/* Сегментът и разделите са като в истинското класиране: контур --hairline, избраното с черта 3 px отдолу. */
.ghost-seg {
  display: inline-flex;
  flex: 1 1 220px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ghost-seg .ghost-tab {
  flex: 1;
  text-align: center;
}

.ghost-seg .ghost-tab + .ghost-tab {
  border-left: 1px solid var(--hairline);
}

.ghost-scopes {
  display: flex;
  flex: 1 1 100%;
  box-shadow: inset 0 -1px 0 var(--line);
}

.ghost-tab {
  flex: none;
  padding: 9px 12px;
  color: var(--ink-meta);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

.ghost-seg .ghost-tab.is-on {
  background: var(--tint);
  box-shadow: inset 0 -3px 0 var(--gold);
  color: var(--ink);
}

/* Прав долен ъгъл откъм избрания, както при .seg. */
.ghost-seg:has(> .ghost-tab.is-on:first-child) {
  border-bottom-left-radius: 0;
}

.ghost-seg:has(> .ghost-tab.is-on:last-child) {
  border-bottom-right-radius: 0;
}

.ghost-scopes .ghost-tab {
  padding: 9px 12px 10px;
}

.ghost-tab--u {
  box-shadow: inset 0 -3px 0 var(--gold);
  color: var(--ink);
}

.ghost-head,
.ghost-row {
  display: grid;
  grid-template-columns: 52px 1fr 44px 64px;
  gap: 8px;
}

/* На 320 px четирите колони се побират: средната може да е по-тясна от „Състезател“. */
@media (max-width: 359px) {
  .ghost-head,
  .ghost-row {
    grid-template-columns: 44px minmax(0, 1fr) 40px 60px;
  }
}

.ghost-head {
  padding: 10px 4px 6px;
  color: var(--ink-meta);
  font-size: 12px;
  font-weight: 500;
  opacity: 0.7;
}

.ghost-head span:nth-child(n + 3) {
  text-align: right;
}

.ghost-rows {
  filter: blur(1px);
  -webkit-mask-image: linear-gradient(180deg, #000 25%, transparent 92%);
  mask-image: linear-gradient(180deg, #000 25%, transparent 92%);
}

.ghost-row {
  align-items: center;
  height: 60px;
  padding: 0 4px;
}

.ghost-medal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--band);
}

.ghost-medal--1 {
  background: var(--medal-1);
}

.ghost-medal--2 {
  background: var(--medal-2);
}

.ghost-medal--3 {
  background: var(--medal-3);
}

.ghost-lines {
  display: grid;
  gap: 8px;
}

.ghost-lines span {
  display: block;
  height: 12px;
  border-radius: var(--radius-sm);
  background: var(--band);
}

.ghost-lines span + span {
  height: 8px;
  opacity: 0.75;
}

/* Дължините на редовете от прототипа: само форма, без имена и числа. */
.ghost-row:nth-child(1) .ghost-lines span:first-child { width: 78%; }
.ghost-row:nth-child(1) .ghost-lines span:last-child { width: 56%; }
.ghost-row:nth-child(2) .ghost-lines span:first-child { width: 64%; }
.ghost-row:nth-child(2) .ghost-lines span:last-child { width: 42%; }
.ghost-row:nth-child(3) .ghost-lines span:first-child { width: 70%; }
.ghost-row:nth-child(3) .ghost-lines span:last-child { width: 48%; }
.ghost-row:nth-child(4) .ghost-lines span:first-child { width: 58%; }
.ghost-row:nth-child(4) .ghost-lines span:last-child { width: 36%; }
.ghost-row:nth-child(5) .ghost-lines span:first-child { width: 66%; }
.ghost-row:nth-child(5) .ghost-lines span:last-child { width: 44%; }

.ghost-num {
  justify-self: end;
  width: 32px;
  height: 12px;
  border-radius: var(--radius-sm);
  background: var(--band);
}

.ghost-num--w {
  width: 56px;
  height: 8px;
  opacity: 0.75;
}

.locked__veil {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: 80px;
  pointer-events: none;
}

/* Плочката с икона (катинарът на заключеното класиране, знакът на грешката): квадрат 44 px с линия. */
.icon-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--chrome);
  color: var(--ink-body);
}

.locked__body {
  margin-top: 18px;
}

.locked__lead {
  color: var(--ink);
  font-size: 20px;
  line-height: 24px;
  font-weight: 500;
}

.locked__list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.locked__list li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-list);
}

.locked__list li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 6px;
  width: 10px;
  height: 5px;
  border-left: 1.5px solid var(--gold-text);
  border-bottom: 1.5px solid var(--gold-text);
  transform: rotate(-45deg);
}

.locked__actions {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

/* Текст на страница (лични данни) */
.prose {
  max-width: 46em;
}

.prose h1 {
  font-size: 28px;
  line-height: 31px;
  font-weight: 500;
}

.prose h2 {
  margin: 32px 0 0;
  font-size: 20px;
  line-height: 24px;
  font-weight: 500;
}

.prose p,
.prose ul {
  margin-top: 10px;
  color: var(--ink-list);
}

.prose ul {
  padding-left: 20px;
  list-style: disc;
}

.prose li + li {
  margin-top: 6px;
}

@media (min-width: 600px) {
  .hero h1,
  .prose h1 {
    font-size: 32px;
    line-height: 35px;
  }
  .locked__actions {
    display: flex;
    flex-wrap: wrap;
  }
}

/*
 * На телефон лентата на началната страница е по-ниска, заглавието е 24 px и текстът е с размера на основния,
 * за да се вижда и първата карта (на 320 px само ако вторият абзац е по-кратък).
 */
@media (max-width: 599px) {
  .pub > .hero {
    padding: 20px 0 24px;
  }
  .pub > .hero h1 {
    font-size: 24px;
    line-height: 28px;
  }
  .pub > .hero .hero__lead {
    margin-top: 12px;
  }
  .pub > .hero .hero__actions {
    margin-top: 16px;
  }
}

@media (min-width: 600px) {
  .pub > .hero {
    padding: 40px 0 44px;
  }
  .pub > .hero .hero__lead {
    gap: 12px;
    font-size: 18px;
    line-height: 27px;
  }
  .pub > .hero .hero__actions {
    margin-top: 28px;
  }
}

@media (min-width: 900px) {
  .hero h1 {
    max-width: 22em;
  }
  .pub > .hero {
    padding: 56px 0;
  }
  .pub > .hero h1 {
    font-size: 36px;
    line-height: 40px;
  }
  .hero--aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
  }
  .hero--aside .stats {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(112px, auto);
    margin: 0;
  }
  .hero--aside .stats .stat:last-child {
    grid-column: auto;
  }
  .hero .stat__l {
    max-width: 9em;
  }
  .locked {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-areas: 'top top' 'prev body';
    column-gap: 28px;
    padding: 24px;
  }
  .locked__top {
    grid-area: top;
  }
  .locked__preview {
    grid-area: prev;
    align-self: start;
  }
  .locked__body {
    grid-area: body;
    align-self: center;
    margin-top: 0;
  }
}

/*
 * Грешка: тясна карта в средата под горната лента (errors/page.blade.php и Errors/Show на React), с размера и мястото
 * на картата за вход (.auth-card в auth.css, 24 и 56 px под .pub с 10 px): 419 след формата за вход е на същото място.
 */
.err {
  max-width: 440px;
  margin: 34px auto 0;
  padding: 16px;
}

.err .icon-tile {
  margin-bottom: 16px;
}

.err__code {
  color: var(--ink-meta);
  font-size: 14px;
  font-weight: 500;
}

.err h1 {
  margin-top: 4px;
  font-size: 28px;
  line-height: 31px;
  font-weight: 500;
}

.err__body {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  color: var(--ink-list);
}

.err__body > .btn,
.err__body > form {
  margin-top: 10px;
}

@media (min-width: 600px) {
  .err {
    margin-top: 66px;
    padding: 32px;
  }
  .err h1 {
    font-size: 32px;
    line-height: 35px;
  }
}

/*
 * Натискане: докато пръстът е на бутон, ред или избор, фонът е по-тъмен; връзките в текста стават по-тъмно златни.
 * Safari на iPhone слага :active само при слушател за touchstart (React го има на #app).
 */
.nav__link:active,
.menu-btn:active,
.crow:active,
.seg__btn:active,
.pick:active,
.sector:active {
  background: var(--band);
}

.ccard:active {
  background: var(--chrome);
}

.btn--gold:active:not(:disabled, [aria-disabled='true']) {
  background: var(--gold-press);
}

.btn--tonal:active:not(:disabled, [aria-disabled='true']),
.btn--line:active:not(:disabled, [aria-disabled='true']),
.btn--ghost:active:not(:disabled, [aria-disabled='true']),
.btn--danger-line:active:not(:disabled, [aria-disabled='true']) {
  background: var(--band);
}

.btn--danger:active:not(:disabled, [aria-disabled='true']) {
  background: var(--on-err);
}

.tab:active,
.bnav__item:active,
.crumb:active,
.brand__sub:active,
.site-footer__in a:active {
  color: var(--gold-text);
}

.hero__link:active,
.ccard:active .ccard__go,
.prose a:not(.btn):active,
.empty a:not(.btn):active,
.notice a:not(.btn):active {
  color: var(--gold-deep);
}

/* Лентата на Inertia (@inertiajs/core) пише в style на елемента transition: all; затова е с !important. */
#nprogress {
  transition-property: opacity !important;
}

#nprogress .bar {
  transition-property: transform !important;
}

@media (prefers-reduced-motion: reduce) {
  .live-badge__dot::after {
    animation: none;
  }
  #nprogress,
  #nprogress .bar {
    transition: none !important;
  }
  .disc__sum::after {
    transition: none;
  }
}

/* Печат: бяло, без лентите, менюто и бутоните */
@media print {
  :root {
    --canvas: #fff;
    --chrome: #fff;
    --band: #eee;
    --tint: #fff;
    --ok-tint: #fff;
    --warn-tint: #fff;
    --err-tint: #fff;
    --ink-body: #000;
    --ink-list: #000;
    --ink-meta: #333;
    --on-ok: #000;
    --on-warn: #000;
    --on-err: #000;
    --line: #ccc;
  }
  body {
    font-size: 12pt;
  }
  .has-rail {
    padding-left: 0 !important;
    padding-bottom: 0 !important;
  }
  .mfr-gl,
  .mfr-preskochi,
  .skip-link,
  .topbar,
  .nav,
  .bnav,
  .netbar,
  .site-footer,
  .st__bar,
  .st__side,
  .st__actions,
  .chip--live,
  .btn,
  .chev-go,
  .no-print {
    display: none !important;
  }
  .print-only {
    display: block;
  }
  .print-head {
    margin-bottom: 6px;
    color: #333;
    font-size: 11pt;
  }
  .pub > .hero {
    background: none;
    border-image: none;
    color: #000;
  }
  .pub > .hero h1 {
    color: #000;
  }
  .locked__preview,
  .locked__top .chip {
    display: none;
  }
  .keep,
  .srow {
    break-inside: avoid;
  }
  .st__layout {
    display: block;
  }
  .notice,
  .note {
    border: 1px solid #999;
  }
  .notice > svg {
    display: none;
  }
}

/*
 * Лентата за връзката със сървъра (.netbar.show) е залепнала и е до три реда (87 px): докато се вижда, полето с фокус застава
 * под нея, а лентата на манша не е залепнала. В края на файла, за да е над правилата за scroll-padding-top по-горе.
 */
html:has(.page .netbar.show) {
  scroll-padding-top: calc(var(--top) + 104px);
}

.page:has(.netbar.show) .stickybar {
  position: static;
}
