/*
 * СпортВсегда — резервная страница расписания катков.
 * Только светлая тема: страница не подстраивается под тёмный режим системы.
 * Мобильная вёрстка — базовая; от 768 px — переходная; от 1024 px — десктоп (макет desktop.html).
 */
:root {
  color-scheme: light only;
  --bg: #ffffff;
  --page: #f3f5fa;
  --text: #17233f;
  --muted: #58647a;
  --soft: #f3f5fa;
  --line: #e3e8f0;
  --blue: #243e8a;
  --blue-shadow: #243e8a22;
  --green: #226341;
  --green-bg: #eff8f3;
  --green-icon: #dcefe3;
  --gold: #c89f35;
  --red: #cc354b;
  --red-bg: #fdf0f2;
  --warn: #8a5a00;
  --warn-bg: #fff6e0;
  --selection: #243e8a;
  --selection-text: #ffffff;
  --focus: #2f6bff;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--page); }
body { margin: 0; background: var(--page); color: var(--text); font: 16px/1.45 Arial, "Helvetica Neue", Helvetica, sans-serif; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.i { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* ---------- Каркас ---------- */
.ice-page { min-height: 100vh; display: flex; justify-content: center; }
.ice-card { width: 100%; background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.ice-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 19px 20px; border-bottom: 1px solid var(--line); }
.ice-logo { width: 210px; max-width: 70%; height: auto; display: block; }
.ice-call { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--soft); color: var(--blue); flex-shrink: 0; }
.ice-main { padding: 18px 20px 0; flex: 1; }
.ice-footer { font-size: 10px; letter-spacing: 1.1px; text-transform: uppercase; text-align: center; padding: 17px; background: var(--soft); color: var(--muted); }

h1 { font-size: 27px; line-height: 1.15; letter-spacing: -.8px; margin: 23px 0 5px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; line-height: 1.3; }
.ice-subtitle { color: var(--muted); font-size: 15px; }

/* ---------- Мятная плашка ---------- */
.ice-notice { background: var(--green-bg); border-radius: 22px; padding: 20px; font-size: 14px; display: grid; grid-template-columns: 1fr 42px; column-gap: 12px; }
.ice-welcome-icon { grid-column: 2; grid-row: 1 / span 2; width: 42px; height: 42px; border-radius: 15px; display: grid; place-items: center; background: var(--green-icon); color: var(--green); transform: rotate(8deg); }
.ice-welcome-icon .i { width: 22px; height: 22px; transform: rotate(-8deg); }
.ice-status { grid-column: 1; grid-row: 1; font-weight: 700; font-size: 21px; line-height: 1.25; letter-spacing: -.5px; color: var(--green); }
.ice-open-label { grid-column: 1; grid-row: 2; font-size: 12px; color: var(--green); margin-top: 5px; }
.ice-notice p { grid-column: 1 / -1; margin: 13px 0 15px; color: var(--muted); line-height: 1.5; }
.ice-payment-note { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 13px; padding: 12px; font-size: 13px; color: var(--green); }
.ice-payment-note strong { font-weight: 600; }

/* ---------- Информационные блоки из админки ---------- */
.ice-blocks:empty { display: none; }
.ice-blocks { display: grid; gap: 10px; margin: 16px 0; }
.ice-block { display: flex; gap: 12px; align-items: flex-start; border-radius: 16px; padding: 15px 16px; font-size: 14px; background: var(--soft); }
.ice-block .i { margin-top: 1px; }
.ice-block h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.ice-block p { color: var(--text); white-space: pre-line; line-height: 1.5; }
.ice-block a { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-weight: 600; color: var(--blue); min-height: 32px; }
.ice-block a .i { width: 16px; height: 16px; margin: 0; }
.ice-block--info { background: #eef3ff; color: var(--blue); }
.ice-block--success { background: var(--green-bg); color: var(--green); }
.ice-block--warning { background: var(--warn-bg); color: var(--warn); }
.ice-block--danger { background: var(--red-bg); color: var(--red); }
.ice-block--neutral { background: var(--soft); color: var(--muted); }

/* ---------- Выбор катка ---------- */
.ice-picker { margin-top: 24px; }
.ice-label { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 1px; margin-bottom: 9px; text-transform: uppercase; }
.ice-rinks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ice-rinks button, .ice-days button {
  border: 1px solid var(--line); color: var(--text); background: var(--bg); border-radius: 11px;
  min-height: 48px; padding: 10px; text-align: center; font-weight: 600; transition: background-color .15s, border-color .15s, color .15s;
}
.ice-rinks button:hover, .ice-days button:hover { border-color: #c5cfdf; }
.ice-rinks button[aria-pressed="true"], .ice-days button[aria-pressed="true"] { background: var(--selection); color: var(--selection-text); border-color: var(--selection); }

.ice-location { display: flex; gap: 9px; margin: 15px 0; color: var(--muted); font-size: 14px; align-items: flex-start; }
.ice-location .i { margin-top: 2px; }
.ice-location strong { display: block; color: var(--text); font-weight: 500; }
.ice-location span { display: block; font-size: 12px; margin-top: 3px; }

.ice-price-strip { display: grid; grid-template-columns: 1fr 1fr; padding: 13px 14px; background: var(--soft); border-radius: 13px; gap: 12px; }
.ice-price-strip > div + div { border-left: 1px solid var(--line); padding-left: 14px; }
.ice-price-strip span { display: block; font-size: 12px; color: var(--muted); }
.ice-price-strip strong { display: block; font-size: 20px; color: var(--blue); margin-top: 3px; letter-spacing: -.3px; }
.ice-price-strip strong.ice-unconfirmed { font-size: 13px; color: var(--muted); font-weight: 400; letter-spacing: 0; }

/* ---------- Расписание ---------- */
.ice-schedule { margin-top: 25px; }
.ice-selected-rink { display: none; }
.ice-section-title, .ice-list-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ice-period, .ice-count { font-size: 12px; color: var(--muted); text-align: right; }
.ice-days { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 12px 0 21px; }
.ice-days button { padding: 9px 3px; min-height: 64px; }
.ice-days button span { display: block; font-size: 18px; }
.ice-days small { display: block; font-size: 11px; font-weight: 400; margin-top: 1px; }
.ice-date-title { font-size: 16px; }
.ice-date-title::first-letter { text-transform: uppercase; }

.ice-stale { display: flex; gap: 10px; align-items: flex-start; margin-top: 11px; padding: 11px 13px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: 13px; line-height: 1.45; }
.ice-stale .i { width: 18px; height: 18px; margin-top: 1px; }

.ice-sessions { margin-top: 11px; display: grid; gap: 8px; }
.ice-session { padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; display: flex; justify-content: space-between; gap: 8px; align-items: center; background: var(--bg); }
.ice-session strong { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.ice-session small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 3px; }
.ice-session .ice-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ice-session .ice-session-note { display: block; font-size: 12px; color: var(--text); margin-top: 4px; }
.ice-session-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.ice-duration { padding: 5px 8px; border-radius: 7px; background: var(--soft); font-size: 12px; white-space: nowrap; color: var(--muted); }
.ice-tag { padding: 3px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ice-session.special { border-left: 3px solid var(--gold); }
.ice-session.hockey { border-left: 3px solid var(--red); }
.ice-session.is-past { opacity: .5; }
.ice-session.is-past .ice-tag { background: var(--soft); color: var(--muted); }
.ice-session.is-live { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.ice-session.is-live .ice-tag { background: var(--green-bg); color: var(--green); }
.ice-session.is-cancelled { background: var(--red-bg); border-color: #f2c9d0; }
.ice-session.is-cancelled strong { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.ice-session.is-cancelled .ice-tag { background: var(--red); color: #fff; }

.ice-past-toggle { grid-column: 1 / -1; min-height: 44px; border: 1px dashed #c5cfdf; border-radius: 12px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; padding: 8px 12px; }
.ice-past-toggle:hover { color: var(--blue); border-color: var(--blue); }
.ice-empty { background: var(--soft); border-radius: 12px; padding: 18px; font-size: 14px; }
.ice-empty strong { display: block; margin-bottom: 5px; }
.ice-empty p { color: var(--muted); font-size: 13px; }
.ice-empty a { color: var(--blue); font-weight: 600; white-space: nowrap; }
.ice-time-note { color: var(--muted); font-size: 11px; margin: 12px 0 21px; line-height: 1.5; }

/* ---------- Прайс ---------- */
.ice-full-prices { border-top: 1px solid var(--line); padding-top: 21px; }
.ice-prices-caption { font-size: 12px; color: var(--muted); margin: 5px 0 13px; }
.ice-price-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: center; }
.ice-price-row strong { font-size: 16px; white-space: nowrap; color: var(--blue); }
.ice-price-row small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.ice-price-row .ice-unconfirmed { font-size: 12px; white-space: normal; text-align: right; max-width: 120px; color: var(--muted); font-weight: 400; }
.ice-benefit { background: var(--soft); border-radius: 12px; padding: 13px; margin: 16px 0 10px; font-size: 14px; }
.ice-benefit h2 { font-size: 17px; }
.ice-benefit h3 { font-size: 14px; line-height: 1.4; margin: 16px 0 3px; font-weight: 600; }
.ice-benefit > p { font-size: 12px; color: var(--muted); margin-top: 7px; }
.ice-benefit-note { font-size: 12px; color: var(--muted); }

/* ---------- Контакты ---------- */
.ice-contacts { padding: 23px 0; }
.ice-contacts h2 { font-size: 17px; }
.ice-contacts > p { color: var(--muted); font-size: 13px; margin-top: 5px; }
.ice-social { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.ice-social a { display: flex; justify-content: space-between; align-items: center; background: var(--soft); border-radius: 10px; min-height: 48px; padding: 12px; color: var(--blue); text-decoration: none; font-weight: 600; font-size: 15px; }
.ice-social a .i { width: 18px; height: 18px; }
.ice-phone-number { display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 700; color: var(--blue); text-decoration: none; min-height: 44px; }
.ice-contacts > small { display: block; font-size: 12px; color: var(--muted); margin-left: 29px; }

@media (max-width: 380px) {
  .ice-main { padding: 16px 15px 0; }
  .ice-header { padding: 15px; }
  .ice-notice { padding: 16px; column-gap: 8px; }
  .ice-status { font-size: 19px; }
  .ice-session strong { font-size: 17px; }
  h1 { font-size: 25px; }
}

/* ---------- Переходная компоновка: от 768 px ---------- */
@media (min-width: 768px) {
  .ice-page { padding: 20px 16px; }
  .ice-card { max-width: 1080px; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 42px #18294b12; }
  .ice-header { padding: 22px 32px; }
  .ice-logo { width: 235px; }
  .ice-main { padding: 30px 32px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-content: start; }
  .ice-main > .ice-blocks { margin: 0; }
  h1 { margin-top: 26px; font-size: 30px; }
  .ice-notice { padding: 18px; }
  .ice-notice p { margin: 8px 0 12px; }
  .ice-payment-note { max-width: 390px; }
  .ice-rinks { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .ice-rinks button { min-height: 58px; font-size: 18px; }
  .ice-rinks button[aria-pressed="true"] { box-shadow: 0 4px 12px var(--blue-shadow); }
  .ice-location { margin: 16px 0 0; }
  .ice-price-strip { margin-top: 16px; max-width: 520px; }
  .ice-schedule { margin: 0; background: var(--soft); padding: 26px; border-radius: 18px; }
  .ice-selected-rink { display: block; font-size: 25px; color: var(--blue); margin: 0 0 20px; letter-spacing: -.4px; }
  .ice-days { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
  .ice-days button { min-height: 72px; }
  .ice-sessions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ice-session { padding: 14px 12px; }
  .ice-empty, .ice-stale { grid-column: 1 / -1; background: var(--bg); }
  .ice-stale { background: var(--warn-bg); }
  .ice-time-note { margin-bottom: 0; }
  .ice-full-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 0 38px; padding-top: 27px; }
  .ice-full-prices > h2, .ice-prices-caption, .ice-price-table, .ice-benefit-note { grid-column: 1; }
  .ice-price-table { align-self: start; }
  .ice-benefit { grid-column: 2; grid-row: 1 / span 4; margin: 0; padding: 22px; align-self: start; }
  .ice-benefit-note { margin-top: 12px; }
  .ice-contacts { border-top: 1px solid var(--line); padding: 25px 0 0; display: grid; grid-template-columns: 1fr auto; gap: 0 38px; }
  .ice-contacts h2, .ice-contacts > p, .ice-social { grid-column: 1; }
  .ice-social { margin-bottom: 0; max-width: 380px; }
  .ice-phone-number { grid-column: 2; grid-row: 1 / span 2; align-self: center; justify-self: end; font-size: 22px; }
  .ice-contacts > small { grid-column: 2; grid-row: 3; justify-self: end; margin: 0; align-self: end; }
  .ice-footer { padding: 19px; }
}

/* ---------- Десктоп: от 1024 px ---------- */
@media (min-width: 1024px) {
  .ice-page { padding: 24px 16px 40px; }
  .ice-price-strip { display: none; }
  .ice-sessions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

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

@media print {
  body, html { background: #fff; }
  .ice-card { box-shadow: none; border: 0; }
  .ice-call, .ice-social { display: none; }
}
