/*
  TASK-347 · матчи на сайте: лента города, строка арены, список «Хоккей», страница матча.
  Источник — холст «Сайт: матчи и зимний лёд», экраны 1–5. Цвета, шрифты и радиусы — только из
  glide-tokens.css; исключения — цвет команды на плашке (из справочника команд) и жёлтая наклейка
  «Кто кого» (как в Mini App). Подключается ссылкой на странице, где есть матч, поверх style-b.css.
*/

/* ── Логотип клуба: белый круг на любой теме ───────────────────────────── */
.m-logo {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(13, 27, 38, .25);
  font-size: 12px; font-weight: 700; color: #2b4fa0;
}
.m-logo img { width: 30px; height: 30px; object-fit: contain; }
.m-logo--sm { width: 28px; height: 28px; font-size: 10px; }
.m-logo--sm img { width: 21px; height: 21px; }
.m-logo--xs { width: 30px; height: 30px; }
.m-logo--xs img { width: 22px; height: 22px; }
.m-logo--lg { width: 64px; height: 64px; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); font-size: 16px; }
.m-logo--lg img { width: 46px; height: 46px; }
.m-logos { display: inline-flex; flex: none; }
.m-logos .m-logo + .m-logo { margin-left: -6px; }

/* ── Лента на странице города ─────────────────────────────────────────── */
.m-card {
  position: relative; flex: 0 0 276px; display: flex; flex-direction: column;
  border-radius: var(--g-r-card); background: var(--g-surface); border: 1px solid var(--g-line);
  overflow: hidden; scroll-snap-align: start;
}
.m-card__link { display: flex; flex-direction: column; color: var(--g-ink) !important; text-decoration: none; }
.m-band { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); height: 64px; }
.m-band__mid {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff;
}
.m-band__time { font-family: var(--g-font-display); font-weight: 400; font-size: 15px; font-variant-numeric: proportional-nums; }
.m-card__body { display: flex; flex-direction: column; gap: 3px; padding: 12px 64px 12px 12px; min-height: 68px; }
.m-card__title { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.m-card__sub { font-size: 13px; color: var(--g-muted); }
.m-bell {
  position: absolute; right: 10px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--g-line-strong); background: var(--g-surface); color: var(--g-ink) !important;
}
.m-bell .b-icon { width: 20px; height: 20px; }
.m-note { margin: 0; font-size: 14px; color: var(--g-ink-2); }

/* ── Строка матча в расписании арены ──────────────────────────────────── */
.b-tickets > .m-ticket {
  grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 12px; min-height: 72px;
}
.m-ticket .b-ticket__time { flex: none; font-size: 26px; }
.m-ticket__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.m-ticket__names { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.m-ticket__names span:last-child { overflow-wrap: anywhere; }
.m-ticket .b-ticket__go { margin: 0; flex: none; }
.m-here { display: flex; flex-direction: column; gap: 8px; }
.m-here__row {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  min-height: 56px; padding: 0 14px; border-radius: var(--g-r);
  background: var(--g-surface); border: 1px solid var(--g-line);
  color: var(--g-ink) !important; text-decoration: none; font-variant-numeric: tabular-nums;
}
.m-here__when { font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--g-muted); }
.m-here__name { font-size: 15px; font-weight: 600; }
.m-here__go { font-size: 14px; font-weight: 600; color: var(--g-accent-ink); }

/* ── Список «Хоккей» ──────────────────────────────────────────────────── */
.m-top { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 0; }
.m-back { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; text-decoration: none; }
.m-title { margin: 0; font-family: var(--g-font-display); font-weight: 400; font-size: 30px; line-height: 1; }
.m-lead { margin: -4px 0 0; font-size: 14px; color: var(--g-muted); }
.m-chips {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 4px; margin: 0 -16px;
}
.m-chips::-webkit-scrollbar { display: none; }
.m-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border-radius: var(--g-r-pill); border: 1px solid var(--g-line-strong); background: var(--g-surface);
  color: var(--g-ink) !important; text-decoration: none; font-size: 14px; font-weight: 600;
}
.m-chip--logo { padding-left: 6px; }
.m-chip .m-logo { width: 28px; height: 28px; box-shadow: none; }
.m-chip .m-logo img { width: 21px; height: 21px; }
.m-chip[aria-current="true"] { background: var(--g-ink); color: var(--g-bg) !important; border-color: var(--g-ink); }
.m-days { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 0; }
.m-sec { margin: 10px 0 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; color: var(--g-ink); }
.m-sec:first-child { margin-top: 0; }
.m-feed-empty { margin: 0 16px 10px; font-size: 15px; color: var(--g-muted); }
.m-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.m-day { display: flex; flex-direction: column; gap: 6px; }
.m-day__h { margin: 0; padding-top: 6px; font-size: 12px; font-weight: 600; letter-spacing: .05em; color: var(--g-muted); }
.m-row {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  min-height: 60px; padding: 0 14px; border-radius: var(--g-r);
  background: var(--g-surface); border: 1px solid var(--g-line);
  color: var(--g-ink) !important; text-decoration: none;
}
.m-row--mine { border-color: var(--g-accent); }
.m-row__time { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.m-row__main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.m-row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.m-row__name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-row__where { font-size: 13px; color: var(--g-muted); }
.m-row__go { font-size: 15px; font-weight: 600; color: var(--g-accent-ink); }

/* ── Страница матча ───────────────────────────────────────────────────── */
.m-hero { position: relative; display: block; height: 210px; overflow: hidden; color: #fff; }
.m-hero__halves { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.m-hero__in {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top, 0px)) 16px 16px;
}
.m-hero__bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.m-hero .b-pill { background: rgba(13, 20, 36, .35); }
.m-badge {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: var(--g-r-pill);
  background: rgba(13, 20, 36, .35); font-size: 12px; font-weight: 600; letter-spacing: .05em; white-space: nowrap;
}
.m-hero__teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 4px; }
.m-team { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 16px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.m-centre { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 76px; text-align: center; }
.m-centre__big { font-family: var(--g-font-display); font-weight: 400; font-size: 32px; line-height: 1; font-variant-numeric: proportional-nums; }
.m-centre__sub { font-size: 13px; font-weight: 600; opacity: .92; max-width: 110px; line-height: 1.2; }
.m-h1 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.25; }
.m-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 0; }
.m-actions { display: flex; flex-direction: column; gap: 8px; }
.m-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px;
  border-radius: var(--g-r-btn); font-size: 16px; font-weight: 700; text-decoration: none; text-align: center;
  border: 1.5px solid transparent; cursor: pointer; font-family: inherit; padding: 0 14px;
}
.m-btn small { font-size: 13px; font-weight: 500; opacity: .75; }
.m-btn--dark { background: var(--g-ink); color: var(--g-bg) !important; }
.m-btn--tg { background: var(--g-surface); color: var(--g-tg-btn) !important; border-color: var(--g-tg-btn); }
.m-btn--fill { background: var(--g-tg-btn); color: var(--g-on-tg-btn) !important; min-height: 48px; }
.m-btn--soft { background: var(--g-chip); color: var(--g-ink) !important; min-height: 44px; font-size: 15px; }
.m-btn .b-icon { width: 20px; height: 20px; }
.m-text-link { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; text-decoration: none; }
.m-panel {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px;
  border-radius: var(--g-r-card); background: var(--g-surface); border: 1px solid var(--g-line);
}
.m-panel--game { margin-top: 6px; }
.m-sticker {
  position: absolute; right: 14px; top: -11px; height: 24px; padding: 0 8px; border-radius: 7px;
  background: #ffd23f; color: #0d1424; font-family: var(--g-font-display); font-weight: 400; font-size: 11px; line-height: 24px;
  transform: rotate(-3deg);
}
.m-panel__head { font-size: 17px; font-weight: 700; line-height: 1.3; }
.m-panel__sub { font-size: 14px; line-height: 1.35; color: var(--g-ink-2); }
.m-lbl { font-size: 12px; font-weight: 600; letter-spacing: .05em; color: var(--g-muted); }
.m-lbl + .m-lbl, .m-grid + .m-lbl { margin-top: 4px; }
.m-split { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--g-line); }
.m-split span:first-child { background: var(--g-accent); }
.m-kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 15px; color: var(--g-ink) !important; text-decoration: none; }
.m-kv b { font-weight: 700; text-align: right; }
.m-kv small { display: block; font-size: 12px; color: var(--g-muted); }
.m-form { display: flex; gap: 3px; }
.m-form i {
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 7px; white-space: nowrap; text-transform: uppercase; font-style: normal; font-size: 12px; font-weight: 700;
  line-height: 24px; text-align: center; color: #fff; background: var(--g-quiet);
}
.m-form i[data-win] { background: var(--g-live); }
.m-grid { display: grid; gap: 4px; text-align: center; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.m-grid span:nth-child(-n+8) { color: var(--g-muted); }
.m-where { display: flex; flex-direction: column; gap: 2px; color: var(--g-ink) !important; text-decoration: none; }
.m-where b { font-size: 16px; }
.m-where span { font-size: 14px; color: var(--g-muted); }
.m-maps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.m-maps .m-btn { gap: 8px; }
.m-maps .b-icon { width: 20px; height: 20px; flex: none; }
.m-ice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--g-r-sm); background: var(--g-accent-wash); }
.m-ice b { font-size: 16px; color: var(--g-ink); font-variant-numeric: tabular-nums; }
.m-ice span { font-size: 14px; line-height: 1.3; color: var(--g-ink); }
.m-gone {
  display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--g-r-card);
  background: var(--g-warn-wash); color: var(--g-warn-ink);
}
.m-gone b { font-size: 16px; }
.m-gone span { font-size: 14px; }
.m-empty { margin: 0; padding: 14px 16px 0; font-size: 15px; color: var(--g-muted); }

/* ── Шторка перехода в Telegram (экран 5) ─────────────────────────────── */
.m-sheet-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 12px; list-style: none; border-radius: var(--g-r); background: var(--g-bg); }
.m-sheet-list li { display: flex; gap: 10px; font-size: 14px; line-height: 1.35; }
.m-sheet-list .b-icon { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--g-live); }
.m-sheet__go { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: var(--g-r-btn); background: var(--g-tg-btn); color: var(--g-on-tg-btn) !important; text-decoration: none; font-size: 16px; font-weight: 700; }

a.m-bell:focus-visible, a.m-btn:focus-visible, button.m-btn:focus-visible, a.m-chip:focus-visible, a.m-row:focus-visible,
a.m-card__link:focus-visible, a.m-here__row:focus-visible { outline: 3px solid var(--g-accent); outline-offset: 2px; }
