/* «Мои гонки» (live.trailrunningschool.com/my): цвета сайта Live (решение Дмитрия 19.10.2026, тем же выпуском, что и
   «История»): акцент тёмно-зелёный #20573F, на чёрном #78A98F, фон тёмной темы #070B09, как web/styles.css; обе темы. */
:root, :root[data-theme="trs"], :root[data-theme="light"] {
  --bg: #ffffff; --surface: #ffffff; --soft: #f4f5f4; --ink: #16231c; --muted: #5b6b62; --accent: #315f50;
  --accent-ink: #ffffff; --line: #e4e7e5; --warn: #9a5b2e; --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, Inter, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="te"], :root[data-theme="dark"] { --bg: #050000; --surface: #101010; --soft: rgba(255, 255, 255, .06); --ink: #f8fafc; --muted: #bccad4;
  --accent: #b1eec2; --accent-ink: #050000; --line: rgba(255, 255, 255, .14); --warn: #ff948e;
  --font: "Geist Mono TRS", ui-monospace, "SF Mono", Menlo, monospace; --mono: "Geist Mono TRS", ui-monospace, "SF Mono", Menlo, monospace; color-scheme: dark; }
:root[data-theme="te"] body, :root[data-theme="dark"] body { background: #050000; font-synthesis: none; }
/* Свечение слоем во весь экран (как body.vt::before макета v5): фон body с fixed Safari на iPhone растягивает на всю страницу. */
:root[data-theme="te"] body::before, :root[data-theme="dark"] body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle at 112% -6%, rgba(255, 42, 47, .30) 0, rgba(255, 42, 47, .15) 20%, rgba(255, 42, 47, 0) 44%), radial-gradient(circle at -20% 106%, rgba(255, 42, 47, .12) 0, rgba(255, 42, 47, 0) 40%); }
/* TE Live (vt.css макета v5): главная кнопка контуром мятного цвета, капсом, как в роликах. */
:root[data-theme="te"] .btn.primary, :root[data-theme="te"] button.primary { background: transparent; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.b-te { display: none; }
:root[data-theme="te"] .b-trs, :root[data-theme="dark"] .b-trs { display: none; }
:root[data-theme="te"] .b-te, :root[data-theme="dark"] .b-te { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .04em; font-size: 13px; font-weight: 400; }
.te-logo { display: inline-block; width: 58px; height: 32px; flex: none; }
.theme-sw { display: inline-flex; align-self: center; flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 2px; gap: 2px; vertical-align: middle; }
.theme-sw button { font: inherit; font-size: 11px; letter-spacing: .04em; min-height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
:root:not([data-theme="te"]):not([data-theme="dark"]) .theme-sw [data-theme-set="trs"],
:root[data-theme="te"] .theme-sw [data-theme-set="te"], :root[data-theme="dark"] .theme-sw [data-theme-set="te"] { background: var(--accent); color: var(--bg); }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
.me { max-width: 640px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px 48px; display: grid; gap: 14px; }
.me h1 { font-size: 22px; line-height: 1.25; margin: 4px 0 0; text-wrap: balance; }
/* Настройки под списком гонок: свой заголовок и отступ сверху, пункты как раньше. */
.settings { display: grid; gap: 14px; margin-top: 10px; }
.settings h2 { font-size: 15px; font-weight: 600; color: var(--muted); margin: 0 2px; letter-spacing: 0.01em; }
.top { display: flex; align-items: center; gap: 10px; }
.top .brand { font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 13px; white-space: nowrap; }
.top > button { margin-left: auto; }
.top a.brand { color: inherit; text-decoration: none; }
.top .acts { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.top .lang { color: var(--muted); text-decoration: none; font-size: 12px; letter-spacing: 0.04em; padding: 6px 8px; }
.top .lang:hover { color: var(--ink); }
/* Шапка в одном стиле с главной (Дмитрий 06.11.2026 00:15): справа капсулы 30 px с рамкой var(--line), скругление 15 px,
   13 px (в TE Live 11 px капсом), промежуток 6 px; у команды на телефоне «Команда» и «Выйти» значками. */
.top .brand { font-size: 14px; letter-spacing: .2px; text-transform: none; }
.top .acts { gap: 6px; flex: none; }
header.top .acts > a, header.top .acts > button {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; min-height: 0; padding: 0 11px; border: 1px solid var(--line);
  border-radius: 15px; background: none; color: var(--ink); font-size: 13px; font-weight: 400; line-height: 1; letter-spacing: 0;
  text-decoration: none; white-space: nowrap;
}
.top .acts .ic { width: 15px; height: 15px; }
.top .acts > .theme-sw { height: 30px; padding: 2px; }
.top .acts > .theme-sw button { height: 24px; min-height: 0; padding: 0 9px; border-radius: 12px; font-size: 12px; line-height: 1; }
:root[data-theme="te"] .top .acts > a, :root[data-theme="te"] .top .acts > button, :root[data-theme="te"] .top .acts > .theme-sw button,
:root[data-theme="dark"] .top .acts > a, :root[data-theme="dark"] .top .acts > button, :root[data-theme="dark"] .top .acts > .theme-sw button {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
}
@media (max-width: 600px) {
  header.top .acts > a, header.top .acts > button { padding: 0 9px; }
  .top .acts > .theme-sw button { padding: 0 7px; }
  :root[data-theme="te"] .top .acts > a, :root[data-theme="te"] .top .acts > button, :root[data-theme="te"] .top .acts > .theme-sw button,
  :root[data-theme="dark"] .top .acts > a, :root[data-theme="dark"] .top .acts > button, :root[data-theme="dark"] .top .acts > .theme-sw button { letter-spacing: .03em; }
  .top .te-logo { width: 44px; height: 24px; }
  :root[data-theme="te"] .top .b-te, :root[data-theme="dark"] .top .b-te { font-size: 12px; letter-spacing: .02em; gap: 6px; }
  header.top .acts.staff > a, header.top .acts.staff > button { width: 30px; padding: 0; justify-content: center; }
  .top .acts.staff .t { display: none; }
}
a.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); padding: 6px 8px; }
.note { color: var(--muted); margin: 0; }
.note.err { color: var(--warn); }
.btn, button { font: inherit; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 8px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.btn.primary, button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button:disabled { opacity: 0.5; cursor: default; }
button.ghost { border-color: transparent; background: transparent; color: var(--muted); padding: 6px 8px; }
/* Значки как в кабинете: тонкая линия цвета текста. */
.ic { width: 18px; height: 18px; flex: none; display: block; }
.btn .ic, button .ic { width: 17px; height: 17px; }
button:focus-visible, .btn:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.race { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 8px; min-width: 0; }
.race.focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); scroll-margin-top: 12px; }
.race .head { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.race .name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.race .date { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px; }
.race .date .ic { width: 15px; height: 15px; }
.race .meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.it { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.meta .it .ic { width: 15px; height: 15px; }
.pill { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--ink); white-space: nowrap; }
.pill.go { background: var(--accent); color: var(--accent-ink); }
.pill.warn { color: var(--warn); }
.pill.soon { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.nudge { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border-radius: 10px; background: var(--soft); font-size: 14px; }
.nudge span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.nudge .ic { width: 16px; height: 16px; color: var(--accent); flex: none; }
.season { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin: 2px 2px 0; }
.season .ic { width: 16px; height: 16px; color: var(--accent); }
.result { font-size: 14px; font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.result .ic { width: 16px; height: 16px; color: var(--accent); }
.panel { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 10px; }
.field { display: grid; gap: 4px; }
.field > span { font-size: 12px; color: var(--muted); }
/* 16px: iPhone на полях мельче приближает страницу при вводе. */
input, textarea, select { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
textarea { min-height: 110px; resize: vertical; }
.count { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg label { padding: 6px 12px; font-size: 13px; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label:has(input:checked) { background: var(--accent); color: var(--accent-ink); }
.seg label:has(input:disabled) { opacity: 0.45; cursor: default; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.4; }
.check input { width: auto; margin-top: 3px; flex: none; }
.card-img { width: 100%; max-width: 360px; border-radius: 8px; border: 1px solid var(--line); display: block; }
.start-form { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.start-form h2 { font-size: 16px; margin: 0; }
.login { display: grid; gap: 10px; max-width: 380px; }
.empty { color: var(--muted); }
/* Что даёт страница (экран входа): строка со значком. */
.gets { display: grid; gap: 8px; margin: 4px 0 14px; }
.gets p { margin: 0; display: flex; gap: 10px; align-items: flex-start; }
.gets .ic { margin-top: 1px; }
.profile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.profile.profile-form { display: grid; }
.profile .field > span { display: inline-flex; align-items: center; gap: 6px; }
.profile .ic { width: 16px; height: 16px; }

/* Ролик и карточки команды по гонке (media.ts). */
.media { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 10px; }
.media-text { margin: 0; }
.media-sign { margin: 0; color: var(--muted); font-size: 13px; }
.media-video { width: 100%; max-height: 70vh; aspect-ratio: auto 9 / 16; border-radius: var(--radius); background: #000; }
.media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.media-grid figure { margin: 0; display: grid; gap: 6px; justify-items: start; }
.media-grid img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.media-grid figcaption { color: var(--muted); font-size: 13px; }

/* Ролик «Гонка в цифрах»: «Мой ролик», правка ролика гонки, «Ролик рисуется» (макет Дмитрия 09.10.2026, video_screens.ts). */
.vhead { display: grid; gap: 6px; }
.vhead h1 { font-size: 26px; margin: 0; }
button.back { justify-self: start; border: 0; background: none; color: var(--accent); padding: 0; min-height: 44px; gap: 4px; }
button.back .ic { width: 20px; height: 20px; }
.vsec { display: grid; gap: 10px; }
.vsec h2, .vsec h3 { margin: 0; font-size: 17px; font-weight: 600; }
.vsec h2.big { font-size: 20px; font-weight: 700; }
.hint { margin: 0; font-size: 13px; color: var(--muted); }
.hint.center { text-align: center; }
.mono { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.chip, .seg-btn { border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; min-height: 48px; text-align: left; }
.chip.on, .seg-btn.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--soft); }
.chip .ratio { width: 40px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.segs { display: flex; gap: 10px; }
.segs .seg-btn { flex: 1; min-width: 0; }
/* «Мой персонаж» (look_view.ts): превью на тёмной сцене как в ролике (шаблон TE), образцы кожи и волос кружками. */
.look-stage { height: min(56vh, 420px); border-radius: var(--radius); background: radial-gradient(120% 90% at 85% 0%, #4a0d10 0%, #120708 55%, #050404 100%);
  display: flex; align-items: flex-end; justify-content: center; overflow: hidden; padding-top: 12px; }
.look-stage .look-img { height: 100%; width: auto; max-width: 100%; object-fit: contain; transition: opacity 0.15s; }
.look-stage .look-line { height: 100%; width: auto; max-width: 100%; }
.look-stage.loading .look-img { opacity: 0.45; }
.look-modes { margin-top: 10px; }
.look-sws { display: flex; flex-wrap: wrap; gap: 12px; }
.segs.look-styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.look-sw { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); padding: 0;
  display: grid; place-items: center; cursor: pointer; }
.look-sw.on { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.look-dot { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); }
@media (prefers-reduced-motion: reduce) { .look-stage .look-img { transition: none; } }
.vcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px; display: grid; }
.vcard.vsolo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.vrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.vrow + .vrow { border-top: 1px solid var(--line); }
.vtext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vname { font-weight: 500; overflow-wrap: anywhere; }
.vname.strong { font-weight: 600; }
.vnote { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
/* Наши продукты в «Экипировке» (kit_catalog.ts): миниатюра в строке и витрина под списком. */
.kit-thumb { width: 40px; height: 40px; object-fit: contain; flex: none; }
.kit-link { color: var(--accent); text-decoration: none; }
.kit-shelf { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.kit-shelf-group { min-width: 0; }
.kit-shelf-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; color: var(--muted); }
.kit-shelf-head a { color: var(--accent); text-decoration: none; }
.kit-shelf-row { display: flex; gap: 10px; overflow-x: auto; padding: 6px 0 4px; scroll-snap-type: x proximity; }
.kit-prod { flex: none; width: 104px; display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px 6px 6px;
  min-height: 0; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  text-align: left; scroll-snap-align: start; font-size: 12px; line-height: 1.25; }
.kit-prod img { width: 100%; height: 96px; object-fit: contain; margin-bottom: 4px; }
.kp-line { font-weight: 500; overflow-wrap: anywhere; }
.kp-flavor { color: var(--muted); }
.kit-prod.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--soft); }
.kit-prod:disabled { opacity: .45; }
.vnum { display: flex; align-items: center; gap: 8px; flex: none; }
input.num { width: 88px; height: 40px; text-align: right; font-family: var(--mono); padding: 0 10px; }
input.num.wide { width: 120px; flex: none; }
input[aria-invalid="true"] { border-color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.unit { width: 44px; font-size: 13px; color: var(--muted); }
.sw { position: relative; width: 46px; height: 28px; min-height: 0; border-radius: 14px; border: 0; background: var(--line); padding: 0; flex: none; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: left 0.15s; }
.sw.on { background: var(--accent); }
.sw.on::after { left: 21px; }
button.link { border: 0; background: none; color: var(--accent); padding: 0 2px; min-height: 44px; font-weight: 500; border-radius: 6px; }
button.link.strong { font-weight: 600; }
.kit-edit { display: grid; gap: 10px; padding: 12px 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { min-height: 44px; padding: 0 16px; }
.tag.on { border-color: var(--accent); background: var(--soft); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 600; }
button.vlink { width: 100%; justify-content: space-between; border-radius: var(--radius); padding: 10px 14px; min-height: 56px; text-align: left; }
button.vlink .ic { width: 20px; height: 20px; color: var(--muted); }
button.vlink .it .ic { color: var(--accent); }
/* Пункт «Сообщество TRS» (community_view.ts): строка как у пунктов-кнопок, без нажатия; ссылки под ней. */
div.vlink.static { display: flex; align-items: center; padding: 10px 14px; min-height: 56px; }
div.vlink.static .it .ic { width: 20px; height: 20px; color: var(--accent); }
.community-acts { padding: 0 14px 6px; }
.result.cheers .ic, .result.note .ic { color: var(--accent); }
button.big, a.btn.big { width: 100%; justify-content: center; min-height: 52px; border-radius: var(--radius); font-size: 16px; font-weight: 600; }
.vvideo { display: flex; gap: 14px; padding: 12px; align-items: center; }
.thumb { width: 84px; height: 150px; flex: none; border-radius: 10px; color: #f2f2f2; font: 9px/1.3 var(--mono); text-align: center;
  background: radial-gradient(120% 60% at 0% 0%, rgba(150, 18, 32, 0.7) 0%, rgba(5, 5, 5, 0) 65%), #050505;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.thumb .ic { width: 22px; height: 22px; }
.ready { font-weight: 700; color: var(--accent); }
.vvideo .row { margin-top: 6px; }
.lab { background: #070b09; color: #f4f8f6; border-radius: 20px; padding: 18px 20px 22px; display: grid; justify-items: center; gap: 10px; text-align: center; }
.lab h2 { margin: 0; font-size: 24px; color: #ffffff; }
.lab p { margin: 0; color: #9eaaa4; }
.collider { width: 100%; max-width: 300px; height: auto; display: block; }
.collider .glow { fill: #78a98f; fill-opacity: 0.16; }
.collider .core { fill: #f4f8f6; }
.collider .orbits { fill: none; stroke: rgba(120, 169, 143, 0.35); stroke-width: 1.4; }
.vprogress { padding: 16px; gap: 12px; }
.bar { height: 10px; border-radius: 5px; background: var(--soft); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 5px; background: var(--accent); transition: width 0.6s; }
.eta { font-size: 20px; font-weight: 700; }
ol.stages { list-style: none; margin: 0; padding: 4px 16px; }
ol.stages li { display: flex; align-items: center; gap: 12px; min-height: 44px; color: var(--muted); }
ol.stages li.done { color: var(--ink); }
ol.stages li.cur { color: var(--ink); font-weight: 600; }
ol.stages .dot { width: 20px; height: 20px; border-radius: 50%; border: 1.6px solid var(--muted); flex: none; position: relative; }
ol.stages li.done .dot { background: var(--accent); border-color: var(--accent); }
ol.stages li.done .dot::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid var(--accent-ink);
  border-width: 0 2px 2px 0; transform: rotate(45deg); }
ol.stages li.cur .dot { border-color: var(--accent); }
ol.stages li.cur .dot::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { ol.stages li.cur .dot::after { animation: none; } .bar span { transition: none; } }
.older { gap: 4px; }
.vvideo .row .btn, .vvideo .row button { min-height: 44px; padding: 0 16px; border-radius: 10px; font-weight: 600; }
.chip:disabled, .seg-btn:disabled { opacity: 0.55; cursor: default; }
.vprogress .vline { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.vprogress .pct { color: var(--accent); font-size: 15px; }
.media-sign.warn { color: var(--warn); }
button.link.help-link { display: block; margin: 8px auto 0; color: var(--muted); }
/* «Ролики тренировок»: строка тренировки, ролик и кнопка под ней. */
.wk { display: grid; gap: 8px; padding: 12px 0; }
.wk + .wk { border-top: 1px solid var(--line); }
.wk-head { display: grid; gap: 2px; }
.wk-head .vname { font-weight: 600; }
/* Последняя тренировка на главной: обложка сторис слева, что было и кнопки справа, ролик под ними. */
.wk-main { margin: 18px 0 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.wk-main h2 { margin: 0 0 10px; font-size: 15px; }
.wk-main-row { display: flex; gap: 12px; align-items: flex-start; }
.wk-main-info { display: grid; gap: 4px; min-width: 0; flex: 1; }
.wk-main-info .vname { font-weight: 600; }
.wk-main .media-video { margin-top: 10px; max-height: 60vh; }
.wk-cover { flex: none; width: 96px; aspect-ratio: 9 / 16; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--line); cursor: pointer; }
.wk-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wk-cover.wait { display: grid; place-items: center; padding: 6px; color: var(--muted); font-size: 11px; text-align: center; cursor: default; }
/* Сообщения для читалки экрана (role=status вне страницы): на экране их не видно. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Сторис тренировки (Дмитрий 15.10): картинки 9:16 столбиком, у каждой «Поделиться» и «Сохранить». */
.stories { display: grid; gap: 18px; }
.story { margin: 0; display: grid; gap: 8px; justify-items: start; }
.story img, .story-wait, .story video { width: min(100%, 340px); aspect-ratio: 9 / 16; border-radius: var(--radius); border: 1px solid var(--line); display: block; background: #050000; }
.story-wait { display: grid; place-items: center; color: #bccad4; font-size: 13px; }
.story figcaption { font-weight: 600; }
label.btn { cursor: pointer; }
/* «Трансляция» у своей гонки: ссылка на трансляцию гонки, трансляция с часов, фото с трассы. */
.livebox { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 10px; }
.livebox h3 { margin: 0; font-size: 15px; font-weight: 600; }
.watchline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; }
.watch-form { display: grid; gap: 8px; }
/* Фото с трассы в трансляцию: кнопка и свои фото миниатюрами с «Убрать». */
.photos { display: grid; gap: 8px; margin-top: 4px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs figure { margin: 0; display: grid; gap: 2px; justify-items: center; }
.thumbs img { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }

/* Редактор на своём фото (17.10.2026): вход первым на экране сторис и у гонок. */
.editor-call { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.editor-call .primary { justify-self: start; }
.editor-call .note { font-size: 13px; }
/* Пустые «Мои гонки»: три шага к своей трансляции и пример. */
.steps-empty { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.steps-empty h2 { margin: 0; font-size: 16px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps .si { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--accent); }
.steps .si .ic { width: 18px; height: 18px; }
.steps b { display: block; font-weight: 600; }
.steps small { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 2px; }
.steps-empty .btn { justify-self: start; }

/* Разделы страницы «Гонки · Сторис» (18.10.2026). */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--soft); width: max-content; max-width: 100%; }
.tabs .tab { border: 0; background: transparent; min-height: 44px; padding: 6px 16px; color: var(--muted); font-weight: 500; }
.tabs .tab .ic { width: 16px; height: 16px; }
.tabs .tab[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.tabs .tab .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 2px; }
/* Четыре раздела на телефоне: без значков и с узкими полями, чтобы влезли в строку. */
.tabs.four .tab { padding: 6px 12px; }
@media (max-width: 440px) { .tabs.four .tab { padding: 6px 10px; } .tabs.four .tab .ic { display: none; } }
/* Раздел «Знаки»: звания, собранные знаки с уровнем и прогрессом, ещё не полученные пунктиром. */
.cl-sec { display: grid; gap: 10px; margin-top: 18px; }
.cl-sec h2 { font-size: 17px; margin: 0; }
.cl-titles, .cl-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px 10px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.cl-titles li, .cl-grid li { display: grid; justify-items: center; align-content: start; gap: 3px; text-align: center; min-width: 0; }
.cl-titles svg, .cl-grid svg { max-width: 100%; height: auto; }
.cl-ahead svg { opacity: 0.85; }
.cl-titles b, .cl-grid b { font-size: 13.5px; line-height: 1.25; font-weight: 600; }
.cl-titles small, .cl-grid small { font-size: 12px; line-height: 1.3; color: var(--muted); }
.cl-lvl { font-weight: 600; letter-spacing: 0.01em; }
.cl-lvl.bronze { color: #A8643A; } .cl-lvl.silver { color: #7C8994; } .cl-lvl.gold { color: #A47B1E; } .cl-lvl.platinum { color: #4F7E98; } .cl-lvl.diamond { color: #2F8DB3; }
:root[data-theme="te"] .cl-lvl.bronze, :root[data-theme="dark"] .cl-lvl.bronze { color: #E3A57A; } :root[data-theme="te"] .cl-lvl.silver, :root[data-theme="dark"] .cl-lvl.silver { color: #C7D1D8; } :root[data-theme="te"] .cl-lvl.gold, :root[data-theme="dark"] .cl-lvl.gold { color: #EBC66A; } :root[data-theme="te"] .cl-lvl.platinum, :root[data-theme="dark"] .cl-lvl.platinum { color: #BFE3F5; } :root[data-theme="te"] .cl-lvl.diamond, :root[data-theme="dark"] .cl-lvl.diamond { color: #A6EEFF; }
.cl-bar { display: block; width: 72%; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 2px; }
.cl-bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.cl-ahead .cl-how { font-size: 11.5px; }
/* Раздел «Сторис»: выбор гонки, кадры сеткой, «Сохранить все», короткий ролик. */
.race-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.race-chip { flex: none; display: grid; gap: 2px; text-align: left; border-radius: 12px; padding: 8px 12px; min-height: 52px; max-width: 260px; }
.race-chip[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--soft); }
.rc-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }
.rc-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.stories-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; }
.stories-head h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.stories-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
.story-card { margin: 0; display: grid; gap: 6px; align-content: start; min-width: 0; }
.story-card img, .story-card .story-wait, .story-card video { width: 100%; aspect-ratio: 9 / 16; border-radius: 10px; border: 1px solid var(--line); display: block; background: #050000; object-fit: cover; }
.story-card .story-wait { display: grid; place-items: center; }
.story-card figcaption { font-weight: 600; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.sc-acts { display: grid; gap: 6px; }
.sc-acts button, .sc-acts .btn { justify-content: center; min-height: 44px; padding: 6px 10px; font-size: 14px; }
.clip-card { max-width: 260px; }
@media (min-width: 700px) { .story-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* «Своя трансляция»: статус, ссылка, кадр трансляции сейчас, что подготовить, что видят зрители. */
.lb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pill.live { background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; gap: 6px; }
.pill.live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .pill.live i { animation: none; } }
/* Статус и кадр трансляции рядом, ссылки под ними на всю ширину; на широком экране ссылки рядом с кадром. */
.lb-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "line pv" "links links"; gap: 10px 12px; align-items: start; }
.lb-line { grid-area: line; margin: 0; font-size: 14px; }
.lb-grid > .row { grid-area: links; }
.lb-preview { grid-area: pv; display: block; width: 84px; }
.lb-preview img { width: 100%; aspect-ratio: 9 / 16; border-radius: 10px; border: 1px solid var(--line); display: block; background: #050000; }
.lb-sec { display: grid; gap: 8px; }
.lb-sec h4 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.checks, .seen { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: flex; align-items: center; gap: 10px; font-size: 14px; min-height: 32px; }
.checks .ck { width: 22px; height: 22px; border-radius: 50%; border: 1.6px solid var(--line); display: grid; place-items: center; flex: none; color: var(--accent-ink); }
.checks li.ok .ck { background: var(--accent); border-color: var(--accent); }
.checks .ck .ic { width: 14px; height: 14px; }
.checks .ct { flex: 1; min-width: 0; }
.checks button.link, .lb-sec button.link { min-height: 44px; justify-self: start; }
.seen li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.seen .ic { width: 16px; height: 16px; color: var(--accent); }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.live-soon { display: flex; gap: 8px; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 10px; }
.live-soon .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--accent); }
.pick-btn { min-height: 38px; padding: 6px 12px; border-radius: 999px; font-size: 14px; }
.pick-btn[aria-checked="true"] { border-color: var(--accent); background: var(--soft); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 600; }
/* Телефон: кнопки гонки и ссылки трансляции сеткой в две колонки, главная кнопка на всю ширину: короче лента, главное
   заметнее (раньше 5-8 кнопок столбиком по одной). */
@media (max-width: 599px) {
  .race-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .race-acts > .primary { grid-column: 1 / -1; }
  .race-acts > button, .race-acts > .btn { justify-content: center; text-align: center; padding: 8px 10px; font-size: 14px; line-height: 1.25; min-width: 0; }
  .race-acts > button .ic, .race-acts > .btn .ic { width: 16px; height: 16px; }
}
/* Колонки списка: на телефоне одна (гонки, под ними настройки, как раньше), на широком экране настройки справа. */
.cols, .col-main, .col-side { display: grid; gap: 14px; min-width: 0; }
@media (min-width: 1100px) {
  .me.wide { max-width: 1180px; padding-left: 32px; padding-right: 32px; }
  .cols { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
  /* Колонка настроек липкая, но не выше окна: открытая форма прокручивается внутри неё. */
  .col-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
  .col-side .settings { margin-top: 0; }
  .lb-grid { grid-template-areas: "line pv" "links pv"; grid-template-rows: auto 1fr; }
  .lb-grid > .row { align-self: start; }
  .lb-preview { width: 150px; }
  .media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Ролик слева, кнопки и подписи справа от него, карточки команды ниже на всю ширину. */
  .media { display: flow-root; }
  .media > * + * { margin-top: 10px; }
  .media > .media-video { float: left; width: 320px; max-height: none; margin: 10px 22px 10px 0; }
  .media > .media-grid { clear: both; padding-top: 6px; }
  .story-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px 16px; }
}

/* «История» (history_view.ts): фильтры, итоги, индекс TE, лучшие результаты, гонки по годам, карточка в строке. */
.hist-filters { display: grid; gap: 8px; min-width: 0; }
.hist-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: thin; }
.hist-chips.wrap { flex-wrap: wrap; overflow: visible; }
.hchip { flex: none; padding: 6px 14px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.hchip .ic { width: 16px; height: 16px; }
.hchip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.hist-chips.sub .hchip { min-height: 40px; font-size: 13px; }
.hist-more { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; }
.hist-more .ghost { padding-left: 2px; }
.hist-sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); z-index: 20; }
.hist-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--surface); color: var(--ink);
  border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; padding: 16px 16px max(16px, env(safe-area-inset-bottom));
  display: grid; gap: 10px; max-height: 80vh; overflow-y: auto; }
.hist-sheet h2 { margin: 0; font-size: 17px; }
.hist-sheet h3 { margin: 4px 0 0; font-size: 13px; color: var(--muted); font-weight: 600; }
@media (min-width: 700px) {
  .hist-sheet { left: 50%; right: auto; bottom: auto; top: 15vh; transform: translateX(-50%); width: min(520px, calc(100vw - 32px));
    border: 1px solid var(--line); border-radius: 16px; }
}
/* Разметка покрытия (history_view.ts surfSheet): вид словами TE и доля, ползунок между «меньше» и «больше» (44 px под
   палец), сумма и «Сохранить» прилипают снизу. Заливка дорожки: --p из my.ts surfPatch. */
.surf-sheet { gap: 6px; max-height: 88vh; padding-bottom: 0; }
.surf-sheet .hint { margin-top: -4px; }
.surf-list { display: grid; }
.surf-row { display: grid; padding: 2px 0 4px; border-bottom: 1px solid var(--line); }
.surf-row:last-child { border-bottom: 0; }
.surf-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.surf-top label { font-weight: 500; }
.surf-top output { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 3.5em; text-align: right; }
.surf-ctl { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; }
.surf-step { width: 44px; height: 44px; padding: 0; justify-content: center; }
.surf-step .ic { width: 18px; height: 18px; }
.surf-ctl input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; min-width: 0; height: 44px; margin: 0;
  padding: 0; border: 0; border-radius: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.surf-ctl input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--accent) var(--p, 0%), var(--line) var(--p, 0%)); }
.surf-ctl input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -11px;
  border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--accent); }
.surf-ctl input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
.surf-ctl input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
.surf-ctl input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--accent);
  border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--accent); }
.surf-ctl input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.surf-foot { position: sticky; bottom: 0; z-index: 1; background: var(--surface); border-top: 1px solid var(--line); display: grid;
  gap: 8px; padding: 10px 0 max(14px, env(safe-area-inset-bottom)); }
.surf-sum { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.surf-left { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--warn); }
.surf-left.ok { color: var(--accent); }
.surf-sum button.ghost { min-height: 44px; }
button.surf-save { width: 100%; justify-content: center; min-height: 48px; }
.ix-acts button { min-height: 44px; }
/* На телефоне «Применить» и «Разметить самому» во всю ширину, одна под другой: под большой палец. */
@media (max-width: 599px) {
  .ix-acts > button { flex: 1 1 100%; justify-content: center; }
}
.hist-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 10px; min-width: 0; }
.hist-box h2 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.hist-box h2 .ic { color: var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px 12px; }
.tile { display: grid; align-content: start; }
.tile b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.tile span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.ix-nums { display: flex; gap: 8px 24px; flex-wrap: wrap; }
.ix-nums div { display: grid; }
.ix-nums b { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ix-nums span { font-size: 12px; color: var(--muted); }
.ix-line { width: 100%; height: auto; color: var(--accent); display: block; }
.ix-line circle { fill: var(--accent); }
.ix-line text { fill: var(--muted); font: 11px var(--font); }
.best-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
/* Подпись корзины своей колонкой по ширине подписи (не больше половины строки), значение справа в остатке (21.10.2026:
   «S 45-74» в колонке minmax(0, 1fr) сжималось в три строки и наезжало на «Индекс TE 631»). Корзина одной строкой
   (.nw); части значения переносятся целиком, после точки. */
.best-row { width: 100%; display: grid; grid-template-columns: fit-content(50%) minmax(0, 1fr); gap: 2px 12px; border: 0; border-radius: 10px;
  background: transparent; padding: 8px 6px; text-align: left; min-height: 44px; }
.best-row:hover { background: var(--soft); }
.b-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.b-label .nw { white-space: nowrap; }
.b-label .ic { width: 16px; height: 16px; color: var(--muted); }
.b-val { font-variant-numeric: tabular-nums; font-size: 14px; text-align: right; }
.b-val > span { display: inline-block; }
.b-race { grid-column: 1 / -1; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.hist-year { display: grid; gap: 8px; }
.year-head { position: sticky; top: 0; z-index: 2; margin: 6px 0 0; padding: 8px 2px; background: var(--bg); display: flex;
  align-items: baseline; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; font-size: 18px; border-bottom: 1px solid var(--line); }
.yh-sum { font-size: 13px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Переход из «Лучших результатов»: строка не уходит под липкую шапку года. */
.hrow { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; scroll-margin-top: 56px; }
.hrow.open { border-color: var(--accent); }
.hrow > .note { padding: 0 14px 10px; }
.hrow-head { width: 100%; border: 0; background: transparent; border-radius: var(--radius); display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; text-align: left; padding: 12px 14px; min-height: 56px; }
.h-date { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.h-main { display: grid; gap: 3px; min-width: 0; }
.h-name { display: flex; align-items: flex-start; gap: 6px; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.h-name .ic { width: 16px; height: 16px; margin-top: 2px; color: var(--muted); }
.h-meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.h-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.h-res { display: grid; justify-items: end; gap: 2px; text-align: right; font-variant-numeric: tabular-nums; max-width: 150px; }
.h-time { font-weight: 600; }
.h-place { font-size: 12px; color: var(--muted); }
.h-place.warn { color: var(--warn); }
.h-ix { display: grid; justify-items: end; font-size: 15px; line-height: 1.2; }
.h-ix small { font-size: 11px; color: var(--muted); }
.h-ix.need { font-size: 11px; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 1px 8px; }
@media (max-width: 480px) {
  .hrow-head { grid-template-columns: minmax(0, 1fr) auto; }
  .h-date { grid-column: 1 / -1; }
}
.hcard { border-top: 1px solid var(--line); padding: 10px 14px 14px; display: grid; gap: 14px; }
.hc-sec { display: grid; gap: 6px; }
.hc-sec h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.hc-sec h3 .ic { width: 15px; height: 15px; }
.hc-line { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; font-variant-numeric: tabular-nums; }
.hc-line .ic { width: 15px; height: 15px; color: var(--accent); }
.ix-big { margin: 0; font-size: 20px; }
.ix-big b { font-weight: 600; }
.ix-need { margin: 0; font-weight: 600; }
.hc-links .btn, .hc-links button { font-size: 14px; }
.hist-te { font-size: 14px; }
/* Колонки истории: на телефоне итоги, индекс и лучшие над списком; на широком экране список слева, они справа. */
@media (min-width: 1100px) {
  .hist-cols .hist-main { grid-column: 1; grid-row: 1; }
  .hist-cols .hist-side { grid-column: 2; grid-row: 1; }
}
@media (max-width: 599px) {
  .hc-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hc-links > .btn, .hc-links > button { justify-content: center; text-align: center; padding: 8px 10px; line-height: 1.25; min-width: 0; }
}

/* «Мои организации» (web/my/orgs_view.ts, миграция 071). */
.orgs-panel .org-item { display: grid; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.orgs-panel .org-item:last-of-type { border-bottom: 0; }
.orgs-panel .org-item p { margin: 0; }
.orgs-panel .org-link { flex: 1; min-width: 0; font: inherit; }
.orgs-panel .org-people { margin: 0; padding-left: 18px; }
.org-form label:not(.check), .org-create label, .org-join label { display: grid; gap: 4px; }
.org-form select, .org-create input, .org-create select, .org-join input { width: 100%; max-width: 100%; }

/* Итог поддержки (090, макет «Поддержать» v2): значки у строки «Тебя поддержали», «Спасибо всем», «Тебе сказали спасибо». */
.result.cheers { align-items: center; }
.result.cheers .cheer-counts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--ink); }
.result.cheers .cheer-counts .cc { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.result.cheers .cheer-ico { display: block; flex: none; }
.result.cheers button { min-height: 36px; padding: 6px 12px; }
.result.cheers .thanked { color: var(--muted); }
.thanks-in { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.thanks-in h2 { margin: 0; font-size: 15px; }
.thanks-in .it { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; }
.thanks-in .ic { width: 16px; height: 16px; flex: none; color: var(--accent); }

/* Соцсеть школы, этап 1 (social_view.ts; макет «Лента в Моих гонках», Дмитрий 02.11.2026: «Да, как в макете»). */
/* Больше четырёх разделов: строка листается вбок, на телефоне без значков. */
.tabs.many { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs.many::-webkit-scrollbar { display: none; }
.tabs.many .tab { flex: none; padding: 6px 12px; }
@media (max-width: 440px) { .tabs.many .tab { padding: 6px 10px; } .tabs.many .tab .ic { display: none; } }
.sf { display: grid; gap: 12px; }
.sf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-chip { min-height: 34px; padding: 5px 12px; font-size: 13px; }
.sf-chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--soft); }
.sf-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 9px; min-width: 0; }
.sf-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sf-av { width: 36px; height: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--soft); color: var(--accent); display: grid; place-items: center; font-size: 12.5px; font-weight: 600; flex: none; }
.sf-av.big { width: 52px; height: 52px; font-size: 16px; }
.sf-whotext { display: grid; min-width: 0; }
.sf-name { border: 0; background: none; padding: 0; min-height: 0; font-weight: 600; font-size: 14.5px; line-height: 1.25; color: var(--ink); text-align: left; justify-content: flex-start; overflow-wrap: anywhere; }
.sf-when { color: var(--muted); font-size: 12.5px; }
.sf-vis { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.sf-vis .ic { width: 13px; height: 13px; }
.sf-title { border: 0; background: none; padding: 0; min-height: 0; border-radius: 4px; font-weight: 600; font-size: 15px; line-height: 1.3; color: var(--ink); text-align: left; justify-content: flex-start; overflow-wrap: anywhere; }
h2.sf-title { margin: 0; font-size: 17px; }
.sf-mx { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.sf-mx span { display: inline-flex; align-items: center; gap: 5px; }
.sf-mx .ic { width: 15px; height: 15px; }
.sf-mx b { color: var(--ink); font-weight: 600; }
.sf-trk { position: relative; border-radius: 10px; background: linear-gradient(145deg, #ffffff 12%, #eef3f0 100%); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(55, 92, 80, .08); }
:root[data-theme="te"] .sf-trk, :root[data-theme="dark"] .sf-trk { background: radial-gradient(ellipse at 95% 12%, rgba(160, 24, 24, .32), transparent 65%), radial-gradient(ellipse at 8% 100%, rgba(92, 10, 15, .26), transparent 62%), #030000; box-shadow: inset 0 0 0 1px rgba(239, 94, 94, .12); }
:root[data-theme="te"] .sf-trk > svg > path, :root[data-theme="dark"] .sf-trk > svg > path { stroke: #c2f5d1; filter: drop-shadow(0 0 3px rgba(180, 241, 198, .22)); }
:root:not([data-theme="te"]):not([data-theme="dark"]) .sf-trk > svg > path { stroke: #375c50; }
.sf-trk svg { display: block; width: 100%; height: auto; max-height: 200px; }
.sf-trk > svg > path { fill: none; stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.sf-cut { position: absolute; right: 8px; bottom: 6px; color: var(--muted); display: inline-flex; }
.sf-cut .ic { width: 15px; height: 15px; }
.sf-bar { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 9px; }
.sf-cheer { min-height: 36px; padding: 4px 11px; gap: 6px; font-size: 13px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.sf-cheer.on { border-color: var(--accent); color: var(--accent); background: var(--soft); }
.sf-cheer:disabled { opacity: 1; cursor: default; }
.sf-kinds { display: inline-flex; align-items: center; }
.sf-kinds .cheer-ico + .cheer-ico { margin-left: -4px; }
.sf-n { font-variant-numeric: tabular-nums; font-weight: 600; }
.sf-hint { color: var(--muted); font-size: 12.5px; }
.sf-cm { margin-left: auto; border: 0; background: none; color: var(--muted); min-height: 36px; padding: 4px 6px; font-size: 13px; gap: 5px; }
.sf-cm .ic { width: 16px; height: 16px; }
.sf-picker { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.sf-pk { aspect-ratio: 1; min-height: 0; padding: 0; border: 1px solid transparent; border-radius: 9px; background: none; display: grid; place-items: center; }
.sf-pk[aria-pressed="true"] { border-color: var(--accent); background: var(--soft); color: var(--accent); }
.sf-empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px; color: var(--muted); font-size: 14px; display: grid; gap: 8px; }
.sf-empty b { color: var(--ink); }
.sf-empty.err { border-style: solid; }
.sf-small { font-size: 12.5px; }
.sf-back { justify-self: start; }
.sf-sub { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.sf-people { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-people span { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; padding: 3px 9px; border-radius: 999px; background: var(--soft); }
.sf-comments { display: grid; gap: 8px; }
.sf-comment { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: grid; gap: 4px; }
.sf-comment.answer { margin-left: 18px; }
.sf-comment p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.sf-ctop { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.sf-ctop span { color: var(--muted); font-size: 12px; }
.sf-tools { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.sf-tool { min-height: 32px; font-size: 13px; }
.sf-reasons { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.sf-replying { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.sf-write { display: flex; gap: 8px; align-items: center; }
.sf-write input { flex: 1; min-width: 0; font: inherit; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.sf-send { padding: 8px 12px; }
.sf-prof { display: flex; align-items: center; gap: 12px; }
.sf-pname { font-size: 18px; }
.sf-stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; font-variant-numeric: tabular-nums; }
.sf-stats div { display: inline-flex; align-items: baseline; gap: 5px; }
.sf-stats b { font-size: 18px; }
.sf-stats span, .sf-stats small { color: var(--muted); font-size: 13px; }
.sf-kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.sf-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sf-opt { display: grid; gap: 2px; justify-items: start; text-align: left; border-radius: 12px; padding: 10px 12px; min-height: 0; }
.sf-opt b { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.sf-opt b .ic { width: 16px; height: 16px; }
.sf-opt small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.sf-opt[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.sf-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 13px; }
.sf-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sf-legend .ic { width: 15px; height: 15px; }
.sf-wl { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.sf-wr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line); }
.sf-wr:first-child { border-top: 0; }
.sf-wt { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.sf-wd { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.sf-tri { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; gap: 2px; }
.sf-tri button { border: 0; background: none; color: var(--muted); border-radius: 999px; width: 34px; height: 32px; min-height: 0; padding: 0; display: grid; place-items: center; }
.sf-tri button .ic { width: 15px; height: 15px; }
.sf-tri button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.sf-tri button[aria-checked="true"][data-v=""] { background: var(--soft); color: var(--ink); }
.sf-toast { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--ink); color: var(--bg); border-radius: 12px; padding: 8px 12px; font-size: 13.5px; }
.sf-toast button { border: 0; background: none; color: inherit; min-height: 32px; padding: 0 4px; font-weight: 600; text-decoration: underline; }

.lv5-geo-map { position:relative; min-height:320px; width:100%; overflow:hidden; border-radius:16px; background:#edf1ed; color:#38433e; }
.lv5-geo-canvas { width:100%; height:420px; }
.lv5-geo-map .maplibregl-ctrl-attrib { font:10px/1.4 system-ui,sans-serif; background:rgba(255,255,255,.88); }
.lv5-geo-map .maplibregl-ctrl-group { border-radius:10px; overflow:hidden; }
.lv5-geo-map .maplibregl-canvas:focus-visible { outline:2px solid currentColor; outline-offset:-3px; }
@media(max-width:700px) { .lv5-geo-map {min-height:260px; border-radius:12px;} .lv5-geo-canvas {height:300px;} }

/* Current admitted workout, using Claude C25 spacing and thin route style.
   Only existing, permitted metrics are rendered; no placeholder chart data. */
.sf-card.sf-workout { background: transparent; border: 0; border-radius: 0; padding: 8px 0 16px; gap: 18px; }
.sf-workout .sf-title { font-size: clamp(24px, 3vw, 34px); line-height: 1.15; font-weight: 650; letter-spacing: -.035em; margin: 6px 0 0; }
.sf-workout .sf-mx { display: flex; flex-wrap: wrap; column-gap: 28px; row-gap: 14px; font-family: var(--mono); }
.sf-workout .sf-mx b { font-size: 24px; font-weight: 500; letter-spacing: -.035em; }
.sf-workout-map { margin: 0; min-width: 0; }
.sf-workout-map figcaption { margin: 8px 2px 0; color: var(--muted); font-size: 11px; }
.sf-workout-map .lv5-geo-map { border-radius: 14px; }
.sf-workout .sf-bar { border-top: 1px solid var(--line); padding-top: 14px; }
.sf-workout-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 20px 28px; margin: 0; }
.sf-workout-metrics dt { color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.sf-workout-metrics dd { display: flex; gap: 6px; align-items: baseline; margin: 3px 0 0; font: 500 28px/1.2 var(--mono); letter-spacing: -.04em; }
.sf-workout-metrics small { font-size: 12px; color: var(--muted); letter-spacing: 0; }
.me:has(.sf-workout) { max-width: 1120px; }
@media (min-width: 900px) {
  .sf-workout .lv5-geo-canvas { height: 480px; }
  .sf-workout .sf-mx { column-gap: 42px; }
}
