:root {
  --bg: #f6f1e7;
  --bg-2: #efe7d8;
  --card: #fffdf8;
  --ink: #1b1712;
  --ink-2: #4d453b;
  --muted: #7d7264;
  --line: rgba(27, 23, 18, .12);
  --accent: #ff5a36;
  --accent-ink: #fff;
  --accent-soft: #ffe1d6;
  --teal: #0f7a6c;
  --teal-soft: #d4efe9;
  --warn-bg: #ffe27a;
  --warn-ink: #3a2a00;
  --heat-0: #ece4d4;
  --shadow: 0 1px 0 rgba(27, 23, 18, .06), 0 12px 30px -18px rgba(27, 23, 18, .35);
  --r: 18px;
  --gutter: 20px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12100e; --bg-2: #1b1815; --card: #1f1b17; --ink: #f4ede2; --ink-2: #cfc4b4; --muted: #a0937f;
    --line: rgba(244, 237, 226, .12); --accent: #ff6a45; --accent-soft: #3a1f17; --teal: #4fd1bd; --teal-soft: #13302b;
    --warn-bg: #4a3a05; --warn-ink: #ffe27a; --heat-0: #24201b;
    --shadow: 0 1px 0 rgba(0,0,0,.4), 0 18px 40px -22px rgba(0,0,0,.8); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12100e; --bg-2: #1b1815; --card: #1f1b17; --ink: #f4ede2; --ink-2: #cfc4b4; --muted: #a0937f;
  --line: rgba(244, 237, 226, .12); --accent: #ff6a45; --accent-soft: #3a1f17; --teal: #4fd1bd; --teal-soft: #13302b;
  --warn-bg: #4a3a05; --warn-ink: #ffe27a; --heat-0: #24201b;
  --shadow: 0 1px 0 rgba(0,0,0,.4), 0 18px 40px -22px rgba(0,0,0,.8); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 12px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 500 16px/1.5 var(--font);
  min-height: 100vh; overflow-x: hidden; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
button, a, input, label { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background:
    radial-gradient(1200px 500px at 85% -10%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, color-mix(in oklab, var(--teal) 16%, transparent), transparent 60%);
}
.top, .view, .foot { position: relative; z-index: 1; }

/* ---------- шапка ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1180px; margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 16px max(var(--gutter), env(safe-area-inset-left));
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand-mark {
  flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: var(--accent); color: var(--accent-ink); font: 900 18px/1 var(--display); transform: rotate(-6deg);
  box-shadow: 0 8px 20px -8px var(--accent);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-text b { font: 700 18px/1.1 var(--display); letter-spacing: -.01em; }
.brand-text i { font-style: normal; color: var(--muted); font-size: 13px; font-weight: 600; }
.top-nav { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.icon-btn {
  border: 1px solid var(--line); background: var(--card); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 16px;
}
.live {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; font-size: 12.5px;
  font-weight: 700; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); white-space: nowrap;
}
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); flex: 0 0 auto; }
.live.busy .dot { background: #e0a100; animation: pulse 1.1s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1 } 50% { transform: scale(1.6); opacity: .4 } }

/* ---------- вступление ---------- */
.view {
  max-width: 1180px; margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 40px max(var(--gutter), env(safe-area-inset-left));
}
.hero { padding: 22px 0 6px; }
.hero.small { padding-bottom: 0; }
.kicker { margin: 0 0 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; color: var(--accent); }
.display { margin: 0 0 22px; font: 900 clamp(36px, 7.6vw, 92px)/.98 var(--display); letter-spacing: -.035em; overflow-wrap: anywhere; }
.accent-word { color: var(--accent); }

.periods { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.periods button {
  border: 1.5px solid var(--ink); background: transparent; padding: 10px 18px; border-radius: 999px; cursor: pointer;
  font-weight: 800; font-size: 15px; transition: transform .15s, background .15s; min-height: 44px;
}
.periods button:hover { transform: translateY(-1px); }
.periods button.on { background: var(--ink); color: var(--bg); }
.periods button.past { border-style: dashed; border-color: var(--muted); color: var(--ink-2); margin-left: 6px; }
.periods button.past.on { background: var(--muted); border-color: var(--muted); border-style: solid; color: var(--bg); }
.is-past .ev { opacity: .92; }
.is-past .ev-time { color: var(--muted); }

.themes-wrap { position: relative; margin: 0 calc(-1 * var(--gutter)) 14px; }
.themes-wrap::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 8px; width: 28px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--bg));
}
.themes { display: flex; gap: 8px; overflow-x: auto; padding: 4px var(--gutter) 8px; scrollbar-width: none; scroll-snap-type: x proximity; }
.themes::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; min-height: 40px;
  border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 700; font-size: 14px; white-space: nowrap;
  transition: border-color .15s, transform .15s; scroll-snap-align: start;
}
.chip:hover { border-color: var(--ink-2); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip .n { font-size: 11.5px; opacity: .65; font-weight: 800; }

.ask {
  display: flex; align-items: center; gap: 8px; background: var(--card); border: 1.5px solid var(--line);
  border-radius: 16px; padding: 6px 6px 6px 14px; max-width: 760px; box-shadow: var(--shadow);
}
.ask:focus-within { border-color: var(--accent); }
.ask-ico { color: var(--accent); font-size: 18px; flex: 0 0 auto; }
.ask input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); padding: 10px 0;
  font: 600 16px var(--font); /* 16px — iOS не зумит поле */
}
.ask input::placeholder { color: var(--muted); font-weight: 500; text-overflow: ellipsis; }
.ask button {
  flex: 0 0 auto; border: 0; background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 11px; font-weight: 800; cursor: pointer; min-height: 44px;
}
.region-toggle {
  display: inline-flex; gap: 10px; align-items: center; margin-top: 14px; color: var(--ink-2); font-size: 14.5px; font-weight: 700; cursor: pointer; min-height: 32px;
}
.region-toggle input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; flex: 0 0 auto; }

/* ---------- дайджест ---------- */
.digest { margin-top: 26px; }
.lede { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-bottom: 18px; }
.lede.one { grid-template-columns: minmax(0, 1fr); }
.lede-card {
  background: var(--ink); color: var(--bg); border-radius: 26px; padding: 28px 30px 26px; position: relative; overflow: hidden; min-width: 0;
}
.lede-card::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 200px; height: 200px; border-radius: 50%;
  background: var(--accent); opacity: .85; pointer-events: none;
}
.lede-card > * { position: relative; z-index: 1; }
.lede-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; padding-right: 70px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .02em; background: rgba(255,255,255,.12);
}
:root[data-theme="light"] .lede-card .badge, .lede-card .badge { background: color-mix(in oklab, var(--bg) 16%, transparent); }
.lede-card h2 { font: 800 clamp(22px, 3.2vw, 36px)/1.1 var(--display); letter-spacing: -.02em; margin: 0 0 12px; max-width: 22ch; overflow-wrap: anywhere; }
.lede-card p { margin: 0; font-size: 17px; line-height: 1.55; opacity: .92; max-width: 62ch; }
.tips { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.tips li { padding-left: 24px; position: relative; font-size: 14.5px; opacity: .9; }
.tips li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-weight: 900; }

.stats { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: stretch; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: center; }
.stat b { display: block; font: 800 40px/1 var(--display); letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: 13.5px; font-weight: 700; margin-top: 6px; }

/* календарь */
.cal { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px 18px 14px; box-shadow: var(--shadow); margin-bottom: 8px; }
.cal-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin-bottom: 12px; }
.cal-head h3 { margin: 0; font: 800 18px var(--display); letter-spacing: -.01em; }
.cal-head span { color: var(--muted); font-size: 13px; font-weight: 600; }
.cal-head b { color: var(--ink); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-wd { text-align: center; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-bottom: 2px; }
.cal-wd.we { color: var(--accent); }
.cal-cell {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; height: 62px;
  border-radius: 12px; padding: 6px 7px; border: 0; text-align: left; background: var(--heat-0); color: var(--ink); cursor: default;
}
.cal-cell.out { background: transparent; opacity: .35; }
.cal-cell .num { font: 800 14px/1 var(--display); display: flex; align-items: baseline; gap: 3px; }
.cal-cell .num small { font: 700 9.5px var(--font); text-transform: uppercase; opacity: .7; }
.cal-cell.we .num { color: var(--accent); }
.cal-cell .cnt { align-self: flex-end; font-weight: 800; font-size: 12px; }
button.cal-cell { cursor: pointer; transition: transform .12s; }
button.cal-cell:hover { transform: translateY(-2px); }
.cal-cell.l1 { background: color-mix(in oklab, var(--accent) 22%, var(--heat-0)); }
.cal-cell.l2 { background: color-mix(in oklab, var(--accent) 42%, var(--heat-0)); }
.cal-cell.l3 { background: color-mix(in oklab, var(--accent) 66%, var(--heat-0)); color: #fff; }
.cal-cell.l4 { background: var(--accent); color: #fff; }
.cal-cell.l3.we .num, .cal-cell.l4.we .num { color: #fff; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-legend { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-top: 10px; font-size: 11.5px; color: var(--muted); font-weight: 700; flex-wrap: wrap; }
.cal-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.cal-legend .l1 { background: color-mix(in oklab, var(--accent) 22%, var(--heat-0)); }
.cal-legend .l2 { background: color-mix(in oklab, var(--accent) 42%, var(--heat-0)); }
.cal-legend .l3 { background: color-mix(in oklab, var(--accent) 66%, var(--heat-0)); }
.cal-legend .l4 { background: var(--accent); }

.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 14px; flex-wrap: wrap; }
.sec-title h3 { margin: 0; font: 800 22px/1.1 var(--display); letter-spacing: -.02em; }
.sec-title span { color: var(--muted); font-weight: 700; font-size: 13px; }

/* главное */
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.pick {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s; min-width: 0;
}
.pick:hover { transform: translateY(-3px); }
.pick-img { aspect-ratio: 16/10; background: var(--bg-2) center/cover no-repeat; position: relative; }
.pick-img.noimg { display: grid; place-items: center; font-size: 46px; background: linear-gradient(135deg, var(--accent-soft), var(--teal-soft)); }
.pick-date {
  position: absolute; left: 12px; top: 12px; background: var(--card); color: var(--ink); border-radius: 12px; padding: 6px 10px;
  font-weight: 800; font-size: 13px; box-shadow: var(--shadow); white-space: nowrap;
}
.pick-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.pick h4 { margin: 0; font: 700 17px/1.25 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.pick .why { margin: 2px 0 6px; color: var(--ink-2); font-size: 14.5px; }
.pick .venue { color: var(--muted); font-size: 13px; font-weight: 600; }
.pick .acts { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* лента по дням */
.day { margin-top: 26px; }
.day-head {
  position: sticky; top: 0; z-index: 3; display: flex; align-items: baseline; gap: 10px; padding: 12px 0 10px; flex-wrap: wrap;
  background: linear-gradient(var(--bg) 75%, transparent);
}
.day-head h3 { margin: 0; font: 800 20px/1.1 var(--display); letter-spacing: -.02em; }
.day-head .wd { color: var(--accent); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.day-head .note { color: var(--muted); font-size: 14px; font-weight: 600; }
.day-head .cnt { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 800; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; }

.ev {
  display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; gap: 16px; align-items: start;
  padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px;
  transition: border-color .15s;
}
.ev:hover { border-color: color-mix(in oklab, var(--ink) 30%, transparent); }
.ev.cancelled h4 { text-decoration: line-through; text-decoration-thickness: 2px; opacity: .7; }
.ev-time { font: 800 22px/1 var(--display); letter-spacing: -.03em; padding-top: 2px; white-space: nowrap; }
.ev-time .allday { display: inline-block; font: 800 11px/1.25 var(--font); letter-spacing: .02em; color: var(--muted); text-transform: uppercase; white-space: normal; }
.ev-main { min-width: 0; }
.ev h4 { margin: 0 0 4px; font-size: 17.5px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.ev .venue { color: var(--ink-2); font-size: 14px; font-weight: 600; }
.town { color: var(--teal); font-weight: 800; }
.ev .desc { color: var(--muted); font-size: 14px; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ev.open .desc { -webkit-line-clamp: unset; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.tag.prem { background: var(--accent-soft); color: var(--accent); }
.tag.ok { background: var(--teal-soft); color: var(--teal); }
.tag.warn { background: var(--warn-bg); color: var(--warn-ink); }
.ev-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 124px; }
.price { font-weight: 800; font-size: 14px; white-space: nowrap; }
.price.free { color: var(--teal); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: 12px; font-weight: 800; font-size: 13.5px;
  text-decoration: none; border: 1.5px solid var(--ink); white-space: nowrap; cursor: pointer; background: transparent; min-height: 40px;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { border-color: var(--line); color: var(--ink-2); }
.srcs { display: none; grid-column: 2 / -1; border-top: 1px dashed var(--line); padding-top: 10px; }
.ev.open .srcs { display: block; }
.srcs ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.srcs li { font-size: 13.5px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.srcs li .k { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); min-width: 76px; }
.srcs a { color: var(--teal); font-weight: 700; overflow-wrap: anywhere; }

/* анонсы */
.anns {
  margin: 2px 0 12px; border-radius: var(--r); padding: 14px 16px 8px;
  background: linear-gradient(135deg, color-mix(in oklab, var(--teal-soft) 70%, var(--card)), var(--card));
  border: 1px solid color-mix(in oklab, var(--teal) 25%, transparent);
}
.anns-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.anns-ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--card); flex: 0 0 auto; box-shadow: var(--shadow); }
.anns-head b { display: block; font: 800 15px/1.2 var(--display); }
.anns-head small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.anns ul { list-style: none; margin: 0; padding: 0; }
.ann { border-top: 1px solid var(--line); }
.ann.extra { display: none; }
.anns.all .ann.extra { display: block; }
.ann a { display: grid; grid-template-columns: 54px minmax(0, 1fr) 18px; gap: 10px; padding: 12px 2px; text-decoration: none; align-items: start; }
.ann a:hover .ann-title { color: var(--accent); }
.ann-time { font: 800 14px/1.3 var(--display); color: var(--teal); padding-top: 1px; }
.ann-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ann-title { font-weight: 800; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; transition: color .15s;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ann-desc { color: var(--ink-2); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ann-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.ann-src { color: var(--ink-2); }
.ann-go { color: var(--muted); font-weight: 800; padding-top: 1px; }
.ann-more {
  width: 100%; margin: 2px 0 6px; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; background: transparent;
  font-weight: 800; font-size: 13.5px; color: var(--ink-2); cursor: pointer; min-height: 44px;
}

/* скидки */
.deals { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.deal {
  display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; text-decoration: none; transition: transform .15s; min-width: 0;
}
.deal:hover { transform: translateY(-2px); }
.deal .disc { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: #fff; font: 900 16px var(--display); }
.deal-b { min-width: 0; }
.deal .t { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.deal .m { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 3px; }

.empty { padding: 40px 24px; text-align: center; background: var(--card); border: 1px dashed var(--line); border-radius: 24px; color: var(--ink-2); }
.empty b { display: block; font: 800 22px var(--display); margin-bottom: 8px; color: var(--ink); }

.skeleton { height: 90px; border-radius: 18px; margin-bottom: 12px; background: linear-gradient(90deg, var(--bg-2), var(--card), var(--bg-2)); background-size: 200% 100%; animation: sh 1.4s infinite; }
.skeleton.big { height: 220px; border-radius: 26px; }
@keyframes sh { to { background-position: -200% 0 } }

/* служебный раздел */
.panel { margin-top: 22px; }
.admin-note { color: var(--muted); font-size: 13.5px; font-weight: 600; margin: -6px 0 12px; }
.coll { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.coll-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.coll-item .h { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.coll-item .s { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.coll-item .err { color: var(--accent); font-size: 12px; margin-top: 4px; overflow-wrap: anywhere; }
.st { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: var(--muted); }
.st.fresh { background: var(--teal); } .st.stale { background: #e0a100; } .st.err { background: var(--accent); }
.cat-tools { margin-bottom: 14px; }
.cat-tools input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: 600 16px var(--font); }
.cat-group { margin-bottom: 22px; }
.cat-group h3 { font: 800 18px var(--display); margin: 0 0 10px; }
.cat-group h3 span { color: var(--muted); font: 700 13px var(--font); }
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); }
.cat-table { width: 100%; border-collapse: collapse; background: var(--card); }
.cat-table td { padding: 9px 12px; border-top: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.cat-table tr:first-child td { border-top: 0; }
.cat-table td.n { font-weight: 700; min-width: 160px; }
.cat-table td.m { color: var(--muted); font-size: 12.5px; }
.cat-table a { color: var(--teal); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.pill { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); margin: 2px 3px 0 0; }
.pill.ok { background: var(--teal-soft); color: var(--teal); } .pill.bad { background: var(--accent-soft); color: var(--accent); }
#admin-form { margin-top: 10px; }
#admin-form input { padding-left: 4px; }

.foot {
  max-width: 1180px; margin: 30px auto 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px;
  padding: 22px max(var(--gutter), env(safe-area-inset-right)) max(36px, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
}
.foot p { margin: 4px 0; }
.foot .copy { font-size: 12.5px; opacity: .8; }

.toast {
  position: fixed; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: 14px; font-weight: 700; box-shadow: var(--shadow); max-width: calc(100vw - 32px); text-align: center;
}

/* ---------- планшеты ---------- */
@media (max-width: 960px) {
  .lede { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat b { font-size: 32px; }
}
@media (max-width: 760px) {
  .ev { grid-template-columns: 70px minmax(0, 1fr); gap: 12px 14px; }
  .ev-time { font-size: 18px; }
  .ev-side { grid-column: 2; flex-direction: row; align-items: center; flex-wrap: wrap; justify-content: flex-start; min-width: 0; }
  .srcs { grid-column: 1 / -1; }
}
/* ---------- телефоны ---------- */
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .live #live-text { display: none; }
  .live { padding: 0; width: 40px; height: 40px; justify-content: center; }
  .periods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .periods button { padding: 10px 4px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .periods button.past span { display: none; }
  .periods button.past { margin-left: 0; }
  .lede-card { padding: 22px 18px 20px; border-radius: 22px; }
  .lede-card::after { width: 150px; height: 150px; right: -70px; top: -70px; }
  .lede-meta { padding-right: 46px; }
  .lede-card p { font-size: 15.5px; }
  .stat { padding: 14px 16px; }
  .stat b { font-size: 28px; }
  .cal { padding: 14px 12px 12px; border-radius: 18px; }
  .cal-grid { gap: 4px; }
  .cal-cell { padding: 4px 5px; border-radius: 9px; height: 46px; }
  .cal-cell .num { font-size: 12.5px; }
  .cal-cell .num small { display: none; }
  .cal-cell .cnt { font-size: 11px; }
  .ev { padding: 14px; grid-template-columns: 58px minmax(0, 1fr); gap: 10px 10px; }
  .ev-time { font-size: 14.5px; letter-spacing: -.04em; }
  .ev h4 { font-size: 16.5px; }
  .day-head h3 { font-size: 18px; }
  .anns { padding: 12px 12px 6px; }
  .ann a { grid-template-columns: 52px minmax(0, 1fr); gap: 8px; }
  .ann-time { font-size: 13px; }
  .ann-go { display: none; }
  .sec-title h3 { font-size: 20px; }
  .cat-table td.m { display: none; }
}
@media (max-width: 360px) {
  .periods button { font-size: 13px; }
  .brand-text i { display: none; }
  .ask { padding-left: 10px; }
  .ask-ico { display: none; }
  .ask button { padding: 11px 12px; }
  .chip { padding: 8px 12px; font-size: 13.5px; }
  .ev { grid-template-columns: minmax(0, 1fr); }
  .ev-time { display: flex; align-items: baseline; gap: 8px; }
  .ev-side { grid-column: 1; }
  .ev-main { grid-column: 1; }
  .srcs { grid-column: 1; }
}
@media (hover: none) { .pick:hover, .deal:hover, button.cal-cell:hover, .periods button:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
