/* =========================================================================
   Душа спорта — стили. Mobile first: базовые правила для телефона,
   расширения — в медиа-запросах min-width.
   ========================================================================= */

:root {
  --bg: #F4F7FC;
  --surface: #FFFFFF;
  --surface-2: #EEF3FC;
  --ink: #0B1A33;
  --ink-2: #33415C;
  --muted: #6A7890;
  --line: #E1E8F3;
  --accent: #1550E8;
  --accent-ink: #0E3FC0;
  --accent-soft: #E6EEFF;
  --navy: #0A1F4D;
  --on-accent: #FFFFFF;
  --shadow: 0 1px 2px rgba(11, 26, 51, .05), 0 6px 24px -12px rgba(11, 26, 51, .18);
  --radius: 16px;
  --radius-sm: 10px;
  --gutter: 16px;
  --maxw: 1200px;
  --head-h: 56px;
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Unbounded", "Golos Text", system-ui, sans-serif;

  /* цвета видов спорта — оттенки одной сине-голубой гаммы + пара акцентов */
  --sp-football: #1550E8;
  --sp-hockey: #0891B2;
  --sp-tennis: #4F9D2D;
  --sp-basketball: #E2652B;
  --sp-formula1: #D23B3B;
  --sp-figure-skating: #8B5CF6;
  --sp-winter: #38BDF8;
  --sp-combat: #9F1239;
  --sp-chess: #334155;
  --sp-esports: #6D28D9;
  --sp-other: #64748B;
  --sp-handball: #B91C1C;
  --sp-bk: #0E3FC0;
  color-scheme: light;
}

/* Тёмная тема — только по кнопке в шапке; по умолчанию всегда светлая */
:root[data-theme="dark"] {
  --bg: #0A1222;
  --surface: #111C31;
  --surface-2: #17243D;
  --ink: #EAF0FB;
  --ink-2: #C3CEE2;
  --muted: #8D9AB3;
  --line: #22314D;
  --accent: #5B8CFF;
  --accent-ink: #8CB0FF;
  --accent-soft: #1A2C55;
  --navy: #050B17;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px -14px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--mast-h, calc(var(--head-h) + 46px)) + 10px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }
svg { width: 20px; height: 20px; flex: none; }

/* одноколоночные гриды не должны раздуваться по ширине картинок */
.home, .home-main, .top, .tiles, .section-page, .lcards, .article-page, .cal-layout, .cal-list, .tiles-3, .lead-body, .lcard-body { grid-template-columns: minmax(0, 1fr); }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.sticky { position: sticky; top: calc(var(--mast-h, calc(var(--head-h) + 50px)) + 16px); }
.muted { color: var(--muted); }

/* ---------------- masthead ---------------- */
.masthead {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.masthead-row { display: flex; align-items: center; justify-content: space-between; height: var(--head-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 700 17px/1 var(--font-display); letter-spacing: -.02em; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo span { display: inline-flex; gap: .32em; }
.logo b { color: var(--accent); font-weight: 700; }
.logo-mark { width: 30px; height: 30px; }
.logo-sm { font-size: 15px; }
.logo-sm .logo-mark { width: 26px; height: 26px; }
.masthead-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 40px; height: 40px; padding: 0 10px; border-radius: 12px;
  border: 0; background: transparent; cursor: pointer; color: var(--ink-2);
}
.icon-btn:hover, .icon-btn.is-on { background: var(--accent-soft); color: var(--accent-ink); }
.icon-btn-label { display: none; font-weight: 600; font-size: 14px; }

.nav-strip { padding-bottom: 10px; }
.nav-scroll {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter);
  scroll-snap-type: x proximity;
}
.nav-scroll::-webkit-scrollbar { display: none; }
.nav-chip {
  flex: none; scroll-snap-align: start;
  padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: var(--ink-2); background: var(--surface-2); white-space: nowrap;
}
.nav-chip:hover { color: var(--accent-ink); }
.nav-chip.is-on { background: var(--accent); color: var(--on-accent); }
.nav-chip-cal { display: none; }

/* drawer */
.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(5, 12, 28, .45); }
.drawer[hidden] { display: none; }
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(86vw, 340px);
  background: var(--surface); padding: 12px 16px 24px; overflow-y: auto;
  box-shadow: -10px 0 40px rgba(0, 0, 0, .2);
  animation: slide .22s ease-out;
}
@keyframes slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; height: 44px; margin-bottom: 8px; }
.drawer-title { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.drawer-nav { display: flex; flex-direction: column; }
.drawer-nav a { padding: 13px 4px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 17px; }
.drawer-nav a.is-on { color: var(--accent); }
body.no-scroll { overflow: hidden; }

/* ---------------- shared bits ---------------- */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); line-height: 1.3; }
.meta time { font-variant-numeric: tabular-nums; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.tag {
  --c: var(--sp-other);
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .01em;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent);
}
a.tag:hover { color: var(--c); background: color-mix(in srgb, var(--c) 20%, transparent); }
.tag-football, .sw-football { --c: var(--sp-football); }
.tag-hockey, .sw-hockey { --c: var(--sp-hockey); }
.tag-tennis, .sw-tennis { --c: var(--sp-tennis); }
.tag-basketball, .sw-basketball { --c: var(--sp-basketball); }
.tag-formula1, .sw-formula1 { --c: var(--sp-formula1); }
.tag-figure-skating, .sw-figure-skating { --c: var(--sp-figure-skating); }
.tag-winter, .sw-winter { --c: var(--sp-winter); }
.tag-combat, .sw-combat { --c: var(--sp-combat); }
.tag-chess, .sw-chess { --c: var(--sp-chess); }
.tag-esports, .sw-esports { --c: var(--sp-esports); }
.tag-other, .sw-other { --c: var(--sp-other); }
.tag-handball, .sw-handball { --c: var(--sp-handball); }
.tag-bk, .sw-bk { --c: var(--sp-bk); }
.tag-forecast { --c: #7C3AED; }
.sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-title { display: inline-flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; }
.sec-title svg { color: var(--accent); }
.sec-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.sec-link svg { width: 16px; height: 16px; }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1) 16px; padding: 0 var(--gutter) 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.chip span { font-size: 12px; color: var(--muted); font-weight: 600; }
.chip:hover { border-color: var(--accent); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip.is-on span { color: inherit; opacity: .7; }
.chip.is-on .sw { box-shadow: 0 0 0 2px var(--bg); }

/* placeholders when a story has no photo */
.ph {
  --c: var(--accent);
  display: flex; align-items: flex-end; aspect-ratio: 16 / 9; width: 100%; padding: 12px;
  background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--c) 70%, #fff) 0%, var(--c) 45%, var(--navy) 100%);
  color: #fff; font: 700 14px/1 var(--font-display);
}
.ph-hockey { --c: var(--sp-hockey); } .ph-tennis { --c: var(--sp-tennis); } .ph-basketball { --c: var(--sp-basketball); }
.ph-formula1 { --c: var(--sp-formula1); } .ph-figure-skating { --c: var(--sp-figure-skating); } .ph-winter { --c: var(--sp-winter); }
.ph-chess { --c: var(--sp-chess); } .ph-other { --c: var(--sp-other); }

/* ---------------- home ---------------- */
.home { padding-top: 16px; padding-bottom: 40px; display: grid; gap: 28px; }
.home-main { display: grid; gap: 28px; min-width: 0; }
.home-aside { min-width: 0; }
.only-desktop { display: none; }

.top { display: grid; gap: 16px; }
.lead-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.lead-media img, .lead-media .ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lead-body { padding: 14px 16px 18px; display: grid; gap: 8px; }
.lead-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
/* телефон: главная новость компактнее, чтобы баннер под ней попадал в первый экран */
@media (max-width: 599px) {
  .lead-media img, .lead-media .ph { aspect-ratio: 21 / 9; }
  .lead-body { padding: 12px 14px 14px; gap: 6px; }
  .lead-title { font-size: 19px; line-height: 1.22; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .lead-text { display: none; }
  .top { gap: 12px; }
}
.lead-text { color: var(--ink-2); font-size: 15px; }

.tiles { display: grid; gap: 12px; }
.tile { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: start; background: var(--surface); border-radius: var(--radius-sm); padding: 10px; box-shadow: var(--shadow); }
.tile-media { border-radius: 8px; overflow: hidden; }
.tile-media img, .tile-media .ph { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: 100%; }
.tile-media .ph span { font-size: 10px; }
.tile-body { display: grid; gap: 6px; align-content: start; }
.tile-title { font-size: 15px; font-weight: 700; line-height: 1.3; }

/* feed */
.day-head {
  position: sticky; top: var(--mast-h, calc(var(--head-h) + 50px)); z-index: 2;
  margin: 18px 0 6px; padding: 6px 0; background: var(--bg);
  font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
}
.feed-list > .day-head:first-child { margin-top: 0; }
.feed-day { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; padding: 14px 14px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row[hidden] { display: none; }
.row-body { display: grid; gap: 6px; align-content: start; min-width: 0; }
.row-title { font-size: 16px; font-weight: 700; line-height: 1.32; }
.row-lead { display: none; color: var(--muted); font-size: 14px; }
.row-media { border-radius: 8px; overflow: hidden; align-self: start; }
.row-media img, .row-media .ph { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.row-media .ph span { display: none; }
.empty { padding: 24px; text-align: center; color: var(--muted); }

/* ---------------- calendar widget ---------------- */
.cal-widget, .upcoming, .side-list {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px;
}
.cal-widget .cal-month { display: none; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 12px; }
.cal-wd {
  display: grid; justify-items: center; gap: 2px; padding: 8px 0 7px; border-radius: 12px; border: 0;
  background: var(--surface-2); cursor: pointer; position: relative;
}
.cal-wd small { font-size: 11px; color: var(--muted); text-transform: uppercase; font-weight: 600; }
.cal-wd b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-wd i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: 0; }
.cal-wd.has i { opacity: 1; }
.cal-wd.is-today b { color: var(--accent); }
.cal-wd.is-sel { background: var(--accent); color: var(--on-accent); }
.cal-wd.is-sel small, .cal-wd.is-sel b { color: inherit; }
.cal-wd.is-sel i { background: #fff; }

.cal-day-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; color: var(--ink-2); }
.cal-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cal-ev { display: grid; grid-template-columns: 4px 1fr auto; gap: 10px; align-items: start; padding: 10px 12px 10px 0; border-radius: 10px; background: var(--surface-2); }
.cal-ev::before { content: ""; grid-row: 1 / span 2; align-self: stretch; border-radius: 0 3px 3px 0; background: var(--c, var(--accent)); }
.cal-ev-title { font-weight: 700; font-size: 14px; line-height: 1.3; }
.cal-ev-title a:hover { text-decoration: underline; }
.cal-ev-sub { grid-column: 2 / span 2; font-size: 12px; color: var(--muted); line-height: 1.35; }
.cal-ev-time { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.cal-none { font-size: 14px; color: var(--muted); padding: 10px 0; }
.cal-also { margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.cal-also b { color: var(--ink-2); }
.cal-also a { color: var(--accent); }
.cal-more { margin-top: 10px; font-size: 13px; color: var(--muted); }

.cal-month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-month-head strong { font-size: 15px; font-weight: 700; text-transform: capitalize; }
.cal-nav { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 18px; line-height: 1; }
.cal-nav:hover { border-color: var(--accent); color: var(--accent); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-grid .wd { text-align: center; font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; padding-bottom: 4px; }
.cal-cell {
  position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; border: 0; border-radius: 10px;
  background: transparent; cursor: pointer; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink);
}
.cal-cell.out { color: var(--muted); opacity: .35; cursor: default; }
.cal-cell:not(.out):hover { background: var(--surface-2); }
.cal-cell.has::after {
  content: ""; position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.cal-cell .dots { position: absolute; bottom: 4px; left: 0; right: 0; display: flex; justify-content: center; gap: 2px; }
.cal-cell .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--c); }
.cal-cell.has.multi::after { display: none; }
.cal-cell.is-today { color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.cal-cell.is-sel { background: var(--accent); color: var(--on-accent); }
.cal-cell.is-sel::after { background: #fff; }
.cal-cell.is-sel .dots i { background: #fff; }

/* full calendar page */
.cal-page { padding-top: 16px; padding-bottom: 48px; }
.page-title { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 8px; font-family: var(--font-display); }
.page-sub { color: var(--muted); margin-bottom: 16px; font-size: 15px; }
.cal-layout { display: grid; gap: 16px; }
.cal-month-lg { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.btn-ghost { margin-top: 12px; width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: transparent; font-weight: 600; cursor: pointer; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.cal-list { display: grid; gap: 14px; }
.cal-list-day { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.cal-list-day.is-sel { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.cal-list-day h2 { font-size: 15px; font-weight: 700; margin-bottom: 10px; display: flex; gap: 8px; align-items: baseline; }
.cal-list-day h2 small { color: var(--muted); font-weight: 500; font-size: 13px; }

/* ---------------- section (sport) page ---------------- */
.section-page, .article-page, .prose-page { padding-top: 14px; padding-bottom: 48px; }
.section-page { display: grid; gap: 24px; }
.section-main { min-width: 0; }
.crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent); }
.lcards { display: grid; gap: 16px; margin-top: 12px; }
.lcard { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: grid; }
.lcard-media img, .lcard-media .ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lcard-body { padding: 14px 16px 16px; display: grid; gap: 8px; }
.lcard-title { font-size: 19px; font-weight: 800; line-height: 1.25; }
.lcard-lead { color: var(--ink-2); font-size: 15px; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--accent); justify-self: start; margin-top: 2px; }
.more svg { width: 16px; height: 16px; transition: transform .15s; }
.more:hover svg { transform: translateX(3px); }
.section-aside { display: grid; gap: 16px; align-content: start; }
.upcoming ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.upcoming li { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.upcoming li:last-child { border-bottom: 0; padding-bottom: 0; }
.up-date { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .03em; }
.up-title { font-weight: 700; font-size: 15px; line-height: 1.3; }
.fixtures .fx-h { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin: 4px 0 8px; }
.fixtures ul + .fx-h { margin-top: 16px; }
.fx-score { margin-left: 8px; font-variant-numeric: tabular-nums; color: var(--accent-ink); }
.article-page > .fixtures { grid-column: 1 / -1; }
.up-place { font-size: 13px; color: var(--muted); }
.side-list .sec-title { margin-bottom: 10px; font-size: 17px; }
.side-list ol { list-style: none; margin: 0; padding: 0; display: grid; }
.side-list li { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); font-weight: 600; font-size: 15px; line-height: 1.35; }
.side-list li:first-child { border-top: 0; padding-top: 0; }
.side-list .meta { font-size: 12px; font-weight: 500; }

/* ---------------- article ---------------- */
.article-page { display: grid; gap: 28px; }
.article { min-width: 0; }
.art-head { display: grid; gap: 10px; margin: 6px 0 16px; }
.art-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.18; }
.art-lead { font-size: 18px; line-height: 1.5; color: var(--ink-2); font-weight: 500; }
.art-figure { margin: 0 calc(var(--gutter) * -1) 20px; }
.art-figure img, .art-figure .ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.art-figure figcaption { padding: 8px var(--gutter) 0; font-size: 12px; color: var(--muted); }
.art-figure figcaption a:hover { text-decoration: underline; }
.art-body { font-size: 17px; line-height: 1.68; color: var(--ink); max-width: 68ch; }
.art-body p + p { margin-top: 1em; }
.art-body h2 { font-size: 21px; font-weight: 800; margin: 1.4em 0 .5em; letter-spacing: -.01em; }
.art-body h2:first-child { margin-top: 0; }
.art-foot { margin-top: 24px; display: grid; gap: 16px; max-width: 68ch; }
.art-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.art-tags li { font-size: 13px; padding: 5px 10px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); font-weight: 600; }
.art-source { font-size: 14px; color: var(--muted); }
.art-source a { color: var(--accent); }
.share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--line); }
.share > span:first-child { font-size: 14px; font-weight: 600; color: var(--muted); margin-right: 4px; }
.share-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; border: 0; background: var(--surface-2); color: var(--ink-2); cursor: pointer; }
.share-btn:hover { background: var(--accent); color: #fff; }
.copied { font-size: 13px; color: var(--accent); font-weight: 600; }
.article-aside { display: none; }
.related { min-width: 0; }
.tiles-3 { display: grid; gap: 12px; }

/* ---------------- bookmakers ---------------- */
.bk-widget { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.bk-top { list-style: none; margin: 0; padding: 0; display: grid; }
.bk-top li + li { border-top: 1px solid var(--line); }
.bk-top a { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px 0; }
.bk-top a:hover { color: inherit; }
.bk-top a:hover .bk-title { color: var(--accent); }
/* выделенные строки ТОП-5: Мелбет — жёлтая, Бет-М — синяя */
.bk-top li.hl-yellow, .bk-top li.hl-blue { border-top: 0; border-radius: 12px; margin: 2px 0; }
.bk-top li.hl-yellow + li, .bk-top li.hl-blue + li { border-top: 0; }
.bk-top li.hl-yellow a, .bk-top li.hl-blue a { padding: 11px 12px; }
.bk-top li.hl-yellow { background: #FFCB2E; }
.bk-top li.hl-yellow .bk-rank { background: #fff; color: #7A5600; }
.bk-top li.hl-yellow .bk-title { color: #1F1600; }
.bk-top li.hl-blue { background: #1550E8; }
.bk-top li.hl-blue .bk-rank { background: #fff; color: #1550E8; }
.bk-top li.hl-blue .bk-title { color: #fff; }
.bk-top li.hl-yellow a:hover .bk-title, .bk-top li.hl-blue a:hover .bk-title { text-decoration: underline; }
.bk-rank { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; flex: none; }
.bk-rank-lg { background: var(--accent); color: var(--on-accent); }
.bk-name { display: grid; font-weight: 700; font-size: 16px; line-height: 1.25; }
.bk-title { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-sub { font-weight: 500; font-size: 13px; color: var(--muted); margin-top: 2px; }
.btn-primary { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 12px; background: #1550E8; color: #fff; font-weight: 700; font-size: 15px; }
.btn-primary:hover { background: #0E3FC0; color: #fff; }
.btn-primary svg { width: 18px; height: 18px; }
.bk-note { margin-top: 10px; font-size: 11px; line-height: 1.4; color: var(--muted); }

.bk-page { padding-top: 14px; padding-bottom: 48px; max-width: 920px; }
.bk-intro { margin-bottom: 20px; }
.bk-table-wrap { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 24px; }
.bk-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.bk-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.bk-table td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.bk-table tbody tr:first-child td { border-top: 0; }
.bk-table td:nth-child(2) { font-weight: 700; }
.bk-table td:nth-child(3) { color: var(--ink-2); font-size: 14px; }
.bk-table a:hover { color: var(--accent); }
.bk-rank-cell { width: 52px; }
.bk-cards { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.bk-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 16px; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); scroll-margin-top: calc(var(--mast-h, calc(var(--head-h) + 54px)) + 16px); }
.bk-card h2 { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 800; }
.bk-card > p { font-size: 16px; line-height: 1.6; color: var(--ink); }
.bk-card > p.bk-known { color: var(--ink-2); font-weight: 500; }
.bk-bonus { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; }
.bk-bonus b { font-size: 17px; color: var(--accent-ink); }
.bk-bonus p { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.bk-checked { font-size: 12px; color: var(--muted); }
.bk-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bk-feats li { font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); }
.bk-facts { margin: 0; display: grid; border-top: 1px solid var(--line); }
.bk-facts div { display: grid; gap: 2px 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.bk-facts dt { font-size: 13px; color: var(--muted); }
.bk-facts dd { margin: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.bk-pc { display: grid; gap: 14px; }
.bk-pc h3 { font-size: 14px; font-weight: 800; margin-bottom: 6px; }
.bk-pros, .bk-cons { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 15px; line-height: 1.45; }
.bk-pros li, .bk-cons li { padding-left: 22px; position: relative; }
.bk-pros li::before { content: "+"; position: absolute; left: 4px; font-weight: 800; color: #1E9E5A; }
.bk-cons li::before { content: "\2013"; position: absolute; left: 4px; font-weight: 800; color: #D0483F; }
.bk-others { margin-top: 24px; }
.bk-others h2 { font-size: 18px; margin-bottom: 10px; }
.bk-others ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bk-others a { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.bk-others a:hover { border-color: var(--accent); }
.bk-how { margin-top: 28px; }
.bk-faq { margin-top: 28px; display: grid; gap: 8px; }
.bk-faq h2 { font-size: 20px; margin-bottom: 4px; }
.bk-faq details { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 0 16px; }
.bk-faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; }
.bk-faq details p { padding: 0 0 14px; line-height: 1.6; color: var(--ink-2); }
.bk-disclaimer { margin-top: 24px; font-size: 13px; line-height: 1.5; color: var(--muted); }
@media (min-width: 600px) {
  .bk-card { padding: 22px 24px; }
  .bk-facts div { grid-template-columns: 220px minmax(0, 1fr); }
  .bk-pc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------- рекламные места (пока пустые) ---------------- */
.ad-wrap { padding-top: 12px; }
.ad {
  position: relative; display: flex; align-items: center; justify-content: center;
  border: 1px dashed color-mix(in srgb, var(--muted) 45%, transparent); border-radius: 12px;
  background: var(--surface-2); color: var(--muted); overflow: hidden;
}
.ad::after { content: attr(data-size); font-size: 12px; font-weight: 600; letter-spacing: .04em; opacity: .7; }
.ad.has-creative::after { content: none; }
.ad.has-creative { border: 0; background: transparent; overflow: visible; display: block; }
.ad.has-creative.only-desktop { display: none; }
.ad-frames { position: relative; width: 100%; height: 100%; border-radius: 12px; overflow: hidden; }
.ad-frames > .ad-cr { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .35s; }
.ad-frames > .ad-cr.is-on { opacity: 1; }
/* кадр, разобранный по слоям: каждый элемент макета на своём месте (координаты из Figma, в % от баннера) */
div.ad-cr { overflow: hidden; }
.ad-cr .ad-l { position: absolute; display: block; max-width: none; }
.ad-cr .ad-l-bg { inset: 0; width: 100%; height: 100%; }
/* одиночная картинка — в натуральных пропорциях (боковой баннер 321×680 и т.п.) */
.ad.has-creative:has(.ad-frames > .ad-cr:only-child) { height: auto; aspect-ratio: auto; }
.ad-frames:has(> .ad-cr:only-child) { height: auto; }
.ad-frames > .ad-cr:only-child { position: static; height: auto; opacity: 1; }
.ad > a { display: block; width: 100%; height: 100%; }
/* пометка рекламы: «Реклама 18+» и кнопка с рекламодателем и ERID */
.ad-mark { position: absolute; top: 6px; left: 6px; display: flex; align-items: flex-start; gap: 4px; z-index: 2; font: 600 11px/1 var(--font); }
.ad-label, .ad-more { background: rgba(40, 44, 52, .32); color: rgba(255, 255, 255, .92); text-shadow: 0 1px 2px rgba(0, 0, 0, .45); border-radius: 999px; height: 20px; display: inline-flex; align-items: center; }
.ad-label { padding: 0 8px; }
.ad-more { border: 0; padding: 0 6px; cursor: pointer; font: inherit; letter-spacing: -.5px; }
.ad-info { position: absolute; top: 24px; left: 0; width: max-content; max-width: min(260px, calc(100vw - 60px)); padding: 6px 10px; border-radius: 10px;
  background: #fff; color: #0B1A33; font: 500 11px/1.35 var(--font); box-shadow: 0 4px 14px rgba(0, 0, 0, .22); overflow-wrap: anywhere; }
.ad-info { display: none; }
/* плашка «Реклама 18+» не должна закрывать предупреждения на самих баннерах */
.ad-side .ad-mark { top: 12.3%; left: 10px; }                     /* Бет-М 321×680: в полосе между предупреждением и логотипом */
.ad[data-brand="melbet"]:is(.ad-top-mobile, .ad-infeed-mobile, .ad-infeed2-mobile, .ad-article-mobile) .ad-mark {
  top: 17px; left: auto; right: 6px; }  /* Мелбет 320×100: справа, под верхней строкой */
.ad[data-brand="melbet"]:is(.ad-top-mobile, .ad-infeed-mobile, .ad-infeed2-mobile, .ad-article-mobile) .ad-info { left: auto; right: 0; }
.ad-more:hover + .ad-info, .ad-more:focus-visible + .ad-info, .ad-info:hover, .ad-mark.is-open .ad-info { display: block; }
.ad.only-desktop { display: none; }
.ad-top-mobile { width: 100%; aspect-ratio: 320 / 100; }
.ad-lead-mobile { width: 100%; aspect-ratio: 320 / 100; }
.ad-top-desktop { width: 100%; aspect-ratio: 1200 / 200; }
.ad-side { width: 100%; aspect-ratio: 1 / 2; margin: 0 0 16px; }  /* ширина колонки: 340 на главной и в рубриках, 320 в новостях */
.bk-widget + .ad-side, .cal-widget + .ad-side { margin-top: 16px; }
.ad-article-desktop, .ad-infeed-desktop, .ad-infeed2-desktop { width: 100%; max-width: 728px; aspect-ratio: 728 / 90; margin: 0 auto; }
.ad-article-mobile, .ad-infeed-mobile, .ad-infeed2-mobile { width: 100%; max-width: 320px; aspect-ratio: 320 / 100; margin: 0 auto; }
.art-ad { margin-top: 24px; }
.row-ad { padding: 14px; border-top: 1px solid var(--line); }
.feed-day > .row-ad:first-child { border-top: 0; }
@media (min-width: 1024px) {
    .ad.only-desktop { display: flex; }
  .ad.has-creative.only-desktop { display: block; }
  .ad.has-creative.only-mobile { display: none; }
  .ad.only-mobile { display: none; }
  .ad-wrap { padding-top: 20px; }
  .ad-wrap.no-desk { padding-top: 0; }
}

/* ---------------- прогнозы ---------------- */
.fc-when { font-weight: 700; font-size: 15px; color: var(--ink-2); }
.fc-pick { display: grid; gap: 2px; background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; font-weight: 700; color: var(--accent-ink); }
.fc-pick span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.fc-match { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: grid; gap: 8px; margin-bottom: 18px; }
.fc-teams { font-size: 20px; font-weight: 800; }
.fc-info { font-size: 14px; color: var(--muted); }
.fc-note { margin-top: 18px; font-size: 13px; color: var(--muted); }

/* ---------------- prose ---------------- */
.prose { max-width: 68ch; font-size: 17px; line-height: 1.65; }
.prose h2 { font-size: 20px; margin: 28px 0 8px; }
.prose p + p { margin-top: .8em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.notfound .page-title { font-size: 64px; }

/* ---------------- footer ---------------- */
.footer { background: var(--navy); color: #C9D5EE; padding: 32px 0 calc(20px + env(safe-area-inset-bottom)); margin-top: 16px; }
.footer .logo { color: #fff; }
.footer .logo b { color: #8CB0FF; }
.footer-grid { display: grid; gap: 24px; }
.footer-brand p { margin-top: 12px; font-size: 14px; color: #93A3C4; max-width: 44ch; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; line-height: 1.55; color: #93A3C4; display: grid; gap: 10px; }
.footer-legal p { max-width: 92ch; }
.footer-legal dl { margin: 0; display: grid; gap: 6px; }
.footer-legal dl div { display: grid; gap: 0 12px; }
.footer-legal dt { color: #7F8FB0; }
.footer-legal dd { margin: 0; color: #C9D5EE; }
.footer-legal a { color: #C9D5EE; text-decoration: underline; text-underline-offset: 2px; }
.footer-legal a:hover { color: #fff; }
@media (min-width: 600px) { .footer-legal dl div { grid-template-columns: 200px minmax(0, 1fr); } }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; color: #7F8FB0; }
.age { border: 1px solid currentColor; border-radius: 6px; padding: 2px 6px; font-weight: 700; }

/* =========================================================================
   ≥ 600px — большие телефоны / маленькие планшеты
   ========================================================================= */
@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .lead-title { font-size: 26px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { grid-template-columns: minmax(0, 1fr); padding: 0; overflow: hidden; }
  .tile-media { border-radius: 0; }
  .tile-media img, .tile-media .ph { aspect-ratio: 16 / 9; }
  .tile-body { padding: 0 14px 14px; }
  .row { grid-template-columns: minmax(0, 1fr) 168px; padding: 16px 18px; gap: 18px; }
  .row-media img, .row-media .ph { aspect-ratio: 16 / 10; }
  .row-lead { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .row-title { font-size: 17px; }
  .lcard { grid-template-columns: 260px minmax(0, 1fr); }
  .lcard-media img, .lcard-media .ph { height: 100%; aspect-ratio: auto; min-height: 180px; }
  .tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .art-figure { margin-left: 0; margin-right: 0; }
  .art-figure img, .art-figure .ph { border-radius: var(--radius); }
  .art-figure figcaption { padding-left: 0; }
  .art-title { font-size: 32px; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .footer-links { grid-template-columns: 1fr; align-content: start; }
  .chips { flex-wrap: wrap; overflow: visible; margin-left: 0; margin-right: 0; padding: 0; }
}

/* =========================================================================
   ≥ 1024px — десктоп
   ========================================================================= */
@media (min-width: 1024px) {
  :root { --head-h: 64px; }
  html { scroll-padding-top: calc(var(--mast-h, calc(var(--head-h) + 60px)) + 10px); }
  .icon-btn-label { display: inline; }
  .burger { display: none; }
  .nav-strip { padding-bottom: 12px; }
  .nav-scroll { overflow: visible; flex-wrap: wrap; margin: 0; padding: 0; }
  .only-mobile { display: none; }
  .only-desktop { display: block; }

  .home { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; padding-top: 24px; align-items: start; }
  .top { grid-template-columns: 1fr; }
  .lead-card { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .lead-media img, .lead-media .ph { height: 100%; aspect-ratio: auto; min-height: 340px; }
  .lead-body { padding: 28px 32px 28px 32px; gap: 12px; align-content: center; }
  .lead-title { font-size: 28px; }
  .lead-text { font-size: 16px; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tile-title { font-size: 15px; }

  /* колонка главной: ТОП-5 сверху, баннер при прокрутке прилипает под шапкой и виден целиком */
  .home-aside { align-self: stretch; }
  .aside-stack { height: 100%; }
  .aside-stack .ad-side { position: sticky; top: calc(var(--mast-h, calc(var(--head-h) + 50px)) + 16px); }
  .home-aside .sticky { position: static; }
  .cal-widget .cal-month { display: block; margin-bottom: 14px; }
  .cal-widget .cal-week { display: none; }

  .section-page { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; padding-top: 22px; }
  /* боковые колонки: тянутся на всю высоту страницы, а прилипает только сам баннер */
  .section-aside, .article-aside { align-self: stretch; align-content: start; }
  .side-sticky { position: sticky; top: calc(var(--mast-h, calc(var(--head-h) + 50px)) + 16px); margin-top: 16px; }
  .page-title { font-size: 34px; }
  .lcard { grid-template-columns: 320px minmax(0, 1fr); }
  .lcard-body { padding: 20px 22px; align-content: center; }
  .lcard-title { font-size: 22px; }

  .article-page { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding-top: 22px; align-items: start; }
  .article-aside { display: block; }
  /* боковая колонка новости идёт до конца страницы — баннер прилипает и над «Читайте также» */
  .related, .article-page > .fixtures { grid-column: 1; }
  .article-aside { grid-column: 2; grid-row: 1 / span 3; }
  .art-title { font-size: 38px; }
  .art-body { font-size: 18px; }

  .cal-layout { grid-template-columns: 380px minmax(0, 1fr); align-items: start; }
  .cal-month-lg { position: sticky; top: calc(var(--mast-h, calc(var(--head-h) + 50px)) + 16px); }
  .row:hover .row-title a { color: var(--accent); }
  .day-head { top: var(--mast-h, calc(var(--head-h) + 50px)); }
}

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

/* ---------------- «мигалка» вокруг верхнего и бокового баннера ----------------
   Раз в 5 секунд — короткая серия вспышек, как у полицейской мигалки: синий → красный → синий → красный.
   В остальное время рамка спокойная. Телефон: верхний баннер и баннер Бет-М под главной новостью. */
.ad.has-creative:is(.ad-top-desktop, .ad-top-mobile, .ad-side, .ad-lead-mobile) {
  padding: 3px;
  border-radius: 15px;
  background: #D9E1EF;
  animation: ad-police 5s infinite;
}
.ad.has-creative:is(.ad-top-desktop, .ad-top-mobile) .ad-mark { top: 9px; left: 9px; }
.ad.has-creative.ad-top-mobile .ad-mark { left: auto; right: 9px; top: 20px; }
@keyframes ad-police {
  0%, 62%   { background: #D9E1EF; box-shadow: none; }
  63%, 67%  { background: #1550E8; box-shadow: 0 0 18px 2px rgba(21, 80, 232, .75); }
  68%, 70%  { background: #D9E1EF; box-shadow: none; }
  71%, 75%  { background: #E5383B; box-shadow: 0 0 18px 2px rgba(229, 56, 59, .75); }
  76%, 78%  { background: #D9E1EF; box-shadow: none; }
  79%, 83%  { background: #1550E8; box-shadow: 0 0 18px 2px rgba(21, 80, 232, .75); }
  84%, 86%  { background: #D9E1EF; box-shadow: none; }
  87%, 91%  { background: #E5383B; box-shadow: 0 0 18px 2px rgba(229, 56, 59, .75); }
  92%, 100% { background: #D9E1EF; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ad.has-creative:is(.ad-top-desktop, .ad-top-mobile, .ad-side, .ad-lead-mobile) { animation: none; }
}

/* ---------------- боковой баннер: всегда целиком в окне (на невысоких экранах уменьшается) ----------------
   Ширина считается из высоты окна: (высота окна − шапка − отступы) × пропорция баннера (321/680 ≈ 0.472),
   но не шире колонки. Так и верхнее предупреждение, и юридический текст внизу видны на любом экране. */
.ad-side.has-creative {
  --side-ar: .472;
  display: block; aspect-ratio: auto; height: auto;
  width: min(100%, calc((100vh - var(--mast-h, 153px) - 32px) * var(--side-ar)));
  width: min(100%, calc((100dvh - var(--mast-h, 153px) - 32px) * var(--side-ar)));
  margin-left: auto; margin-right: auto;
}
.ad-side.has-creative .ad-frames { width: 100%; height: auto; }
.ad-side.has-creative .ad-frames > .ad-cr:only-child { width: 100%; height: auto; }

/* ---------------- «Главное за неделю» ---------------- */
.week-top { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-top: 20px; }
.week-top .sec-head { margin-bottom: 6px; }
.week-top ol { list-style: none; margin: 0; padding: 0; counter-reset: wt; }
.week-top li { display: grid; grid-template-columns: 26px 1fr; column-gap: 10px; row-gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); }
.week-top li:first-child { border-top: 0; }
.week-top li::before { counter-increment: wt; content: counter(wt); grid-row: span 2; font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1.2; color: var(--accent); }
.week-top li a { font-weight: 700; font-size: 16px; line-height: 1.35; color: var(--ink); text-decoration: none; }
.week-top li a:hover { color: var(--accent); }
.week-top .meta { font-size: 12px; }

/* ---------------- поиск ---------------- */
.search-pop { border-top: 1px solid var(--line); background: var(--surface); padding: 12px 0 14px; box-shadow: 0 18px 40px -24px rgba(11, 26, 51, .35); }
.search-pop[hidden] { display: none; }
.search-form { display: flex; align-items: center; gap: 8px; }
.search-field { flex: 1; display: flex; align-items: center; gap: 10px; border: 2px solid var(--accent); border-radius: 12px; padding: 0 12px; background: var(--surface); }
.search-field svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; padding: 11px 0; }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-results { max-height: min(60vh, 520px); overflow: auto; }
.search-results:empty { display: none; }
.search-pop .search-results { margin-top: 10px; }
.search-results a.sr { display: grid; gap: 4px; padding: 10px 4px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.search-results a.sr:first-child { border-top: 0; }
.search-results a.sr:hover b { color: var(--accent); }
.search-results a.sr b { font-weight: 700; font-size: 15px; line-height: 1.35; }
.search-results a.sr .meta { font-size: 12px; }
.search-results mark { background: #FFF1A8; color: inherit; border-radius: 3px; padding: 0 1px; }
:root[data-theme="dark"] .search-results mark { background: #5C4B00; }
.search-results .sr-note { color: var(--muted); font-size: 13px; padding: 8px 4px 0; }
.search-results .sr-all { display: inline-block; margin-top: 8px; font-weight: 700; font-size: 14px; color: var(--accent); }
.search-page .search-form-page { margin: 6px 0 16px; }
.search-results-page { max-height: none; overflow: visible; }

/* ---------------- Новый год (NEW_YEAR в build.py) ---------------- */
.logo-ico { position: relative; display: inline-flex; flex: none; }
/* шапка: центр опушки — над центром значка, опушка ложится на верх круга */
.ny-hat { position: absolute; left: 50%; top: -18px; width: 35px; height: auto; max-width: none; transform: translateX(-45%); transform-origin: 44% 90%; pointer-events: none; filter: drop-shadow(0 1px 1.5px rgba(11, 26, 51, .28)); }
.logo-sm .ny-hat { top: -15px; width: 29px; }
.ny .masthead .logo:has(.ny-hat) { transform: translateY(5px); }
.ny .logo:hover .ny-hat { animation: ny-hat 1.1s ease-in-out; }
@keyframes ny-hat { 0%, 100% { transform: translateX(-45%) rotate(0); } 35% { transform: translateX(-45%) rotate(-5deg); } 70% { transform: translateX(-45%) rotate(3deg); } }

/* снег рисуется на фоне страницы — под карточками, баннерами и текстом */
html:has(body.ny) { background: var(--bg); }
body.ny { background: transparent; }
.ny-snow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

@media (prefers-reduced-motion: reduce) { .ny .logo:hover .ny-hat { animation: none; } }

/* ---------------- топ матчи на главной ---------------- */
.mstrip { position: relative; margin-top: 18px; }
.mstrip-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px 2px 6px; }
.mstrip-row::-webkit-scrollbar { display: none; }
.ms-card { flex: 0 0 auto; width: 214px; scroll-snap-align: start; display: grid; gap: 5px; align-content: start; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 12px 11px; color: var(--ink); text-decoration: none; transition: transform .15s; }
.ms-card:hover { color: var(--ink); transform: translateY(-1px); }
.ms-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.ms-lg { font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.ms-hockey .ms-lg { color: var(--sp-hockey); } .ms-tennis .ms-lg { color: var(--sp-tennis); } .ms-basketball .ms-lg { color: var(--sp-basketball); }
.ms-when { white-space: nowrap; }
.ms-t { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 14px; line-height: 1.35; }
.ms-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-sc { font-variant-numeric: tabular-nums; font-weight: 800; }
.ms-t.is-win { font-weight: 800; }
.ms-det { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-card.is-live .ms-when { color: #E11D48; font-weight: 800; }
.ms-card.is-live .ms-when::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #E11D48; margin-right: 5px; vertical-align: 1px; animation: ms-pulse 1.6s infinite; }
@keyframes ms-pulse { 50% { opacity: .3; } }
.ms-card.is-day { background: linear-gradient(135deg, var(--navy), var(--accent)); color: #fff; }
.ms-card.is-day .ms-top, .ms-card.is-day .ms-det { color: rgba(255, 255, 255, .78); }
.ms-day { font-weight: 800; color: #fff; background: rgba(255, 255, 255, .16); border-radius: 6px; padding: 2px 7px; }
.ms-all { width: 118px; text-align: center; justify-items: center; align-content: center; gap: 2px; }
.ms-all b { font: 800 26px/1 var(--font-display); color: var(--accent); }
.ms-all span { font-size: 12.5px; color: var(--muted); line-height: 1.25; }
.ms-all .ms-all-go { margin-top: 6px; font-weight: 700; color: var(--accent); font-size: 12px; }
.ms-arrow { display: none; position: absolute; right: calc(var(--gutter) - 14px); top: 50%; transform: translateY(-55%); width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }
@media (min-width: 1024px) { .ms-arrow { display: inline-flex; } .mstrip { margin-top: 22px; } }

/* ---------------- матч-центр ---------------- */
.mc-page { padding-top: 36px; padding-bottom: 40px; }
.mc-ln { display: inline-flex; align-items: baseline; gap: 8px; }
.mc-panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin: 14px 0 16px; display: grid; gap: 12px; }
.mc-sports, .mc-days { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.mc-sports::-webkit-scrollbar, .mc-days::-webkit-scrollbar { display: none; }
.mc-sp { border: 0; background: none; font-weight: 700; font-size: 16px; color: var(--muted); padding: 6px 10px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.mc-sp.is-on { color: var(--ink); background: var(--surface-2); }
.mc-day { border: 0; background: var(--surface-2); color: var(--ink-2); font-weight: 600; font-size: 14px; padding: 9px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.mc-day span { color: var(--muted); font-weight: 500; margin-left: 4px; }
.mc-day.is-on { background: var(--accent); color: #fff; } .mc-day.is-on span { color: rgba(255, 255, 255, .8); }
.mc-day.mc-live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #E11D48; margin-right: 6px; vertical-align: 1px; }
.mc-sport { margin-top: 18px; }
.mc-sport > h2 { font-size: 20px; font-weight: 800; margin: 0 0 10px; }
.mc-league { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.mc-lh { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: var(--ink); font-weight: 800; font-size: 15px; padding: 13px 16px; cursor: pointer; text-align: left; }
.mc-lh span { color: var(--muted); font-weight: 600; font-size: 13px; }
.mc-lh svg { width: 18px; height: 18px; transform: rotate(-90deg); transition: transform .2s; color: var(--muted); }
.mc-league.is-closed .mc-lh svg { transform: rotate(90deg); }
.mc-league.is-closed .mc-rows { display: none; }
.mc-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) 64px minmax(0, 1fr); align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 14.5px; }
.mc-row .tm { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.mc-row .tm.live { color: #E11D48; font-weight: 800; }
.mc-row .h { text-align: right; font-weight: 600; } .mc-row .a { font-weight: 600; }
.mc-row .w { font-weight: 800; }
.mc-row .sc { text-align: center; font: 700 15px/1 var(--font-display); background: var(--surface-2); border-radius: 8px; padding: 7px 0; font-variant-numeric: tabular-nums; }
.mc-row .sc.live { background: #FFE4EA; color: #BE123C; }
:root[data-theme="dark"] .mc-row .sc.live { background: #3B1020; color: #FDA4AF; }
.mc-row .det { grid-column: 2 / -1; font-size: 12px; color: var(--muted); margin-top: -4px; text-align: center; }
.mc-empty { color: var(--muted); background: var(--surface); border-radius: var(--radius); padding: 24px; text-align: center; }
.mc-note { color: var(--muted); font-size: 12.5px; margin-top: 16px; }
@media (max-width: 599px) {
  .mc-row { grid-template-columns: 46px minmax(0, 1fr) 54px minmax(0, 1fr); gap: 8px; padding: 10px 12px; font-size: 13.5px; }
}
.mc-lh > .mc-ln { color: var(--ink); font-weight: 800; font-size: 15px; }
.mc-lh > .mc-ln > span { color: var(--muted); font-weight: 600; font-size: 13px; }
.ms-card.is-day.is-live .ms-when { color: #FFC2CE; }
.ms-card.is-day.is-live .ms-when::before { background: #FF8FA6; }

/* коэффициенты */
.ms-odds { display: flex; gap: 4px; margin-top: 2px; }
.ms-odds span { flex: 1; display: flex; justify-content: space-between; gap: 4px; background: var(--surface-2); border-radius: 7px; padding: 4px 6px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.ms-odds i { font-style: normal; font-weight: 500; color: var(--muted); }
.ms-card.is-day .ms-odds span { background: rgba(255, 255, 255, .14); color: #fff; }
.ms-card.is-day .ms-odds i { color: rgba(255, 255, 255, .7); }
.mc-row .odds { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-top: 2px; }
.mc-row .odds span { display: flex; justify-content: center; gap: 8px; background: var(--surface-2); border-radius: 9px; padding: 8px 10px; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.mc-row .odds i { font-style: normal; font-weight: 500; color: var(--muted); }
@media (max-width: 599px) { .mc-row .odds { grid-column: 1 / -1; gap: 6px; } .mc-row .odds span { font-size: 13px; padding: 7px 6px; gap: 6px; } }

/* новогодняя шапка: морозный оттенок и бледные снежинки по краям — спокойно, без анимации */
.ny .masthead {
  background:
    url("../img/ny/header-frost-left.webp") left top / auto 100% no-repeat,
    url("../img/ny/header-frost-right.webp") right top / auto 100% no-repeat,
    linear-gradient(180deg, color-mix(in srgb, #E3EEFF 94%, transparent), color-mix(in srgb, #F1F6FF 94%, transparent));
  border-bottom-color: #D3E2FA;
}
.ny .nav-chip:not(.is-on) { background: rgba(255, 255, 255, .72); }
:root[data-theme="dark"] .ny .masthead {
  background:
    url("../img/ny/header-frost-left.webp") left top / auto 100% no-repeat,
    url("../img/ny/header-frost-right.webp") right top / auto 100% no-repeat,
    linear-gradient(180deg, color-mix(in srgb, #10234A 95%, transparent), color-mix(in srgb, #0C1A38 95%, transparent));
  border-bottom-color: #22396A;
}
:root[data-theme="dark"] .ny .nav-chip:not(.is-on) { background: rgba(255, 255, 255, .06); }
@media (max-width: 599px) { .ny .masthead { background-size: auto 70%, auto 100%, auto; } }

/* календарь: совпадение по времени */
.cal-clash { grid-column: 1 / -1; display: inline-block; justify-self: start; margin-top: 4px; font-size: 12px; font-weight: 700; color: #B45309; background: #FEF3C7; border-radius: 6px; padding: 3px 8px; }
:root[data-theme="dark"] .cal-clash { color: #FCD34D; background: #3A2A06; }
/* «Все разделы» — только там, где меню прокручивается (телефон, планшет) */
.nav-chip-all { border: 0; cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); }
@media (min-width: 1024px) { .nav-chip-all { display: none; } }

/* матч-центр: логотипы команд и разделение сторон */
.mc-row { grid-template-columns: 58px minmax(0, 1fr) 76px minmax(0, 1fr); column-gap: 14px; }
.mc-row .h, .mc-row .a { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mc-row .h { justify-content: flex-end; }
.mc-row .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-row .lg { width: 26px; height: 26px; flex: none; object-fit: contain; display: block; }
.mc-row i.lg { border-radius: 50%; background: var(--surface-2); }
.mc-row .sc { min-width: 64px; padding: 8px 6px; }
.ms-lg-img { width: 18px; height: 18px; flex: none; object-fit: contain; display: block; }
i.ms-lg-img { border-radius: 50%; background: var(--surface-2); }
.ms-t { justify-content: flex-start; align-items: center; }
.ms-t .ms-n { flex: 1; }
.ms-card.is-day i.ms-lg-img { background: rgba(255, 255, 255, .18); }
@media (max-width: 599px) {
  .mc-row { grid-template-columns: 42px minmax(0, 1fr) 56px minmax(0, 1fr); column-gap: 8px; }
  .mc-row .h, .mc-row .a { gap: 6px; }
  .mc-row .lg { width: 20px; height: 20px; }
  .mc-row .sc { min-width: 50px; }
}
/* телефон: команды друг под другом — логотип и полное название, время слева, счёт справа */
@media (max-width: 599px) {
  .mc-row { grid-template-columns: 44px minmax(0, 1fr) 56px; grid-template-areas: "tm h sc" "tm a sc" "det det det" "od od od"; row-gap: 6px; column-gap: 10px; }
  .mc-row .tm { grid-area: tm; align-self: center; }
  .mc-row .h { grid-area: h; flex-direction: row-reverse; justify-content: flex-end; text-align: left; }
  .mc-row .a { grid-area: a; }
  .mc-row .sc { grid-area: sc; align-self: center; }
  .mc-row .det { grid-area: det; text-align: left; margin-top: 0; }
  .mc-row .odds { grid-area: od; }
  .mc-row .nm { font-size: 14px; }
}

/* ---------- движение коэффициентов ---------- */
:root { --om-dn: #12A150; --om-up: #E5484D; }
.om { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin: 22px 0; }
.om-title { font-family: var(--font-display); font-size: 20px; margin: 0 0 6px; }
.om-src { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.om-src i { width: 8px; height: 8px; border-radius: 50%; background: var(--om-dn); flex: none; }
.om-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.om-cards.om-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.om-card { display: grid; gap: 6px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; font: inherit; color: var(--ink); }
.om-card.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.om-k { font-size: 13px; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.om-v { font-family: var(--font-display); font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.om-v s { font-family: var(--font); font-size: 15px; color: var(--muted); font-weight: 600; }
.om-b { justify-self: start; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.om-dn { color: var(--om-dn); background: rgba(18, 161, 80, .12); }
.om-up { color: var(--om-up); background: rgba(229, 72, 77, .12); }
.om-st { color: var(--muted); background: var(--surface-2); }
.om-bar { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.om-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), #7C9BFF); }
.om-pr { font-size: 12px; color: var(--muted); }
.om-chart { border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 4px; margin-top: 12px; }
.om-svg { width: 100%; max-width: 760px; margin: 0 auto; height: auto; display: block; overflow: visible; }
.om-grid { stroke: var(--line); stroke-width: 1; }
.om-open { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; opacity: .7; }
.om-od { fill: var(--surface); stroke: var(--muted); stroke-width: 2; }
.om-gap { fill: none; stroke-width: 2; stroke-dasharray: 3 5; opacity: .7; }
.om-line { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.om-pt { stroke: var(--surface); stroke-width: 1.5; }
.om-end { stroke: var(--surface); stroke-width: 2.5; }
.om-ax { fill: var(--muted); font-size: 12px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.om-lbl { fill: var(--ink-2); font-size: 12.5px; font-family: var(--font); }
.om-now { font-size: 15px; font-weight: 700; font-family: var(--font); }
.om-cap { text-align: center; color: var(--muted); font-size: 13px; margin: 2px 0 6px; }
.om-sum { background: var(--accent-soft); color: var(--ink); font-weight: 700; border-radius: 12px; padding: 12px 14px; margin: 12px 0 8px; }
.om-note { color: var(--muted); font-size: 12.5px; margin: 0; }
.om-inline { margin: 4px 0 12px; box-shadow: none; border: 1px solid var(--line); }
.om-btn { font: inherit; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 9px; padding: 8px 12px; cursor: pointer; }
.om-btn[aria-expanded="true"] { background: var(--accent); color: var(--on-accent); }
@media (max-width: 599px) {
  .om { padding: 14px; }
  .om-cards { grid-template-columns: 1fr; }
  .om-cards.om-n2 { grid-template-columns: 1fr 1fr; }
  .om-cards:not(.om-n2) .om-card { grid-template-columns: 1fr auto; align-items: center; }
  .om-cards:not(.om-n2) .om-k, .om-cards:not(.om-n2) .om-bar, .om-cards:not(.om-n2) .om-pr { grid-column: 1 / -1; }
  .om-v { font-size: 24px; }
}

/* ---------- липкие вкладки справа ---------- */
.side-tabs { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 40; display: grid; gap: 8px; }
.st-tab { width: 92px; display: grid; justify-items: center; gap: 6px; padding: 12px 8px; text-align: center; text-decoration: none;
  font-size: 12px; font-weight: 700; line-height: 1.25; border-radius: 14px 0 0 14px; box-shadow: var(--shadow); transition: transform .15s ease, width .15s ease; }
.st-tab:hover { transform: translateX(-4px); }
.st-ic { width: 26px; height: 26px; display: grid; place-items: center; }
.st-ic svg { width: 24px; height: 24px; }
.st-fc { background: linear-gradient(160deg, var(--accent), #6E8BFF); color: #fff; }
.st-lg { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-right: 0; }
.st-lg .st-ic { color: var(--accent); }
@media (max-width: 1279px) { .side-tabs { display: none; } }

/* матч, на который пришли по ссылке «матч дня» */
.mc-row.is-focus { background: var(--accent-soft); border-radius: 12px; box-shadow: inset 3px 0 0 var(--accent); }
