:root {
  /* Белая основа, оранжевый — главное действие, мягкий красный — акценты и «горячие» карточки */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #fff6f0;
  --ink: #2a211c;
  --ink-2: #5b4f48;
  --muted: #998d85;
  --line: #f1e4dc;
  --accent: #f26a1b;      /* оранжевый */
  --accent-ink: #ffffff;
  --red: #e5534b;         /* мягкий красный */
  --red-bg: #fdeceb;
  --hero: linear-gradient(140deg, #f47426 0%, #e5534b 100%);
  --blue: #c2410c;        /* ссылки и второстепенные акценты */
  --ok: #15803d;
  --ok-bg: #e7f6ec;
  --warn: #b45309;
  --warn-bg: #fff1e3;
  --danger: #c92a2a;
  --danger-bg: #fdeaea;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(42, 33, 28, .05), 0 4px 16px rgba(42, 33, 28, .07);
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
    --bg: #15100d; --surface: #211a16; --surface-2: #2a211c; --ink: #f7efe9; --ink-2: #cdbfb6;
    --muted: #8f8179; --line: #3a2e27; --accent: #ff7e36; --accent-ink: #1b120d; --blue: #ff9a5c; --red: #f0716a; --red-bg: #3a1a18;
    --hero: linear-gradient(140deg, #d9601c 0%, #c8413b 100%);
    --ok: #4ade80; --ok-bg: #12301f; --warn: #fbbf24; --warn-bg: #33270d; --danger: #f87171; --danger-bg: #3a1414;
    --shadow: 0 1px 2px rgba(0,0,0,.35); color-scheme: dark;
  } }
:root[data-theme="dark"] {
    --bg: #15100d; --surface: #211a16; --surface-2: #2a211c; --ink: #f7efe9; --ink-2: #cdbfb6;
    --muted: #8f8179; --line: #3a2e27; --accent: #ff7e36; --accent-ink: #1b120d; --blue: #ff9a5c; --red: #f0716a; --red-bg: #3a1a18;
    --hero: linear-gradient(140deg, #d9601c 0%, #c8413b 100%);
    --ok: #4ade80; --ok-bg: #12301f; --warn: #fbbf24; --warn-bg: #33270d; --danger: #f87171; --danger-bg: #3a1414;
    --shadow: 0 1px 2px rgba(0,0,0,.35); color-scheme: dark;
  }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
.app { min-height: 100dvh; display: flex; flex-direction: column; }

/* Сплеш первой загрузки: поверх всего, пока не показан первый экран */
.splash { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: #14213d; color: #fff; padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom); transition: opacity .28s ease, visibility 0s linear .28s; }
.splash img { width: 148px; height: 148px; border-radius: 34px; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.splash-name { font: 800 22px/1.2 'Unbounded', sans-serif; letter-spacing: -.01em; }
.splash .vb-loader { margin-top: 6px; transform: scale(.8); }
.splash .vb-floor { background: rgba(255,255,255,.28); }
.splash .vb-shadow { background: #000; }
.splash.out { opacity: 0; visibility: hidden; pointer-events: none; }

/* Загрузка */
.boot { flex: 1; display: grid; place-items: center; }
.ball { width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0 20%, var(--accent) 21% 100%); animation: bounce .7s infinite alternate ease-in; }
@keyframes bounce { to { transform: translateY(-24px); } }
/* Лоадер: мяч падает, сплющивается о пол, подлетает, вращаясь; тень растёт при приближении к полу */
.vb-loader { position: relative; width: 72px; height: 96px; }
.vb-ball { position: absolute; left: 16px; top: 0; width: 40px; height: 40px; transform-origin: 50% 100%; animation: vb-drop 1s infinite cubic-bezier(.45,0,.55,1); }
.vb-ball svg { width: 40px; height: 40px; display: block; animation: vb-spin 2s infinite linear; }
.vb-shadow { position: absolute; left: 50%; bottom: 8px; width: 34px; height: 6px; margin-left: -17px; border-radius: 50%; background: var(--ink-3, #888); opacity: .25; animation: vb-shadow 1s infinite cubic-bezier(.45,0,.55,1); }
.vb-floor { position: absolute; left: 6px; right: 6px; bottom: 10px; height: 2px; border-radius: 2px; background: var(--line); }
@keyframes vb-drop {
  0% { transform: translateY(0) scale(1, 1); animation-timing-function: cubic-bezier(.55,0,1,.45); }
  45% { transform: translateY(46px) scale(1, 1); }
  50% { transform: translateY(48px) scale(1.18, .8); animation-timing-function: cubic-bezier(0,.55,.45,1); }
  56% { transform: translateY(44px) scale(.95, 1.06); }
  100% { transform: translateY(0) scale(1, 1); }
}
@keyframes vb-shadow { 0%, 100% { transform: scaleX(.45); opacity: .12; } 50% { transform: scaleX(1.05); opacity: .32; } }
@keyframes vb-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vb-ball, .vb-ball svg, .vb-shadow { animation-duration: 3s; } }

/* Шапка */
.topbar {
  position: sticky; top: 0; z-index: 10; padding: calc(var(--top) + 12px) 16px 12px;
  background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px;
}

.topbar h1 { font-size: 20px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .back, .topbar .icon-btn { background: var(--surface-2); border: 0; color: var(--ink); width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; position: relative; flex: none; }
.topbar .back svg, .topbar .icon-btn svg { width: 20px; height: 20px; }
.dot { position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; }

main { flex: 1; padding: 16px 16px calc(var(--bottom) + 88px); max-width: 640px; width: 100%; margin: 0 auto; }
main.chat-main { padding-bottom: 0; display: flex; flex-direction: column; }
main:not(.chat-main) { display: flex; flex-direction: column; }
.main-body { flex: 1 0 auto; min-width: 0; }
/* Подвал: подпись и версия приложения */
.app-foot { margin-top: 32px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; color: var(--ink-3, #888); font-size: 13px; line-height: 1.5; }
.app-foot-love { color: var(--ink-2); font-weight: 600; }
.app-foot .app-foot-src { display: inline-flex; align-items: center; gap: 5px; margin: 6px auto 0; font-size: 13px; color: var(--ink-2); text-decoration: none; }
.app-foot-src .info-ico { width: 16px; height: 16px; }
.app-foot-src:hover { color: var(--ink); }
.app-foot-ai { font-size: 12px; margin: 4px 0 6px; }
.app-foot .ver-old { color: var(--ink); }
.app-foot .link-btn { font-size: 13px; }
.upd-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom) + 76px); z-index: 90; display: flex; align-items: center; gap: 10px;
  width: max-content; max-width: calc(100% - 32px); padding: 8px 8px 8px 16px; border-radius: 14px; background: #14213d; color: #fff; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
body.has-upd main:not(.chat-main) { padding-bottom: calc(var(--bottom) + 156px); }
.upd-bar .upd-go { border: 0; border-radius: 10px; padding: 7px 12px; background: #f2b705; color: #14213d; font-weight: 700; cursor: pointer; }
.upd-bar .upd-x { border: 0; background: none; color: rgba(255,255,255,.7); font-size: 15px; padding: 6px; cursor: pointer; }

/* Нижнее меню */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding: 6px 4px calc(var(--bottom) + 6px);
}
.tabbar a { flex: 1; max-width: 110px; text-decoration: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 500; padding: 4px 0; position: relative; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.active { color: var(--ink); }
.tabbar a.active svg { color: var(--ink); }
.tabbar a.active::before { content: ""; position: absolute; top: -7px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }

/* Карточки и списки */
.section-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 4px 8px; }
.section-title:first-child { margin-top: 4px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 10px; }
.card.link { cursor: pointer; display: block; text-decoration: none; color: inherit; }
.card.link:active { transform: scale(.99); }
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 10px; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; min-height: 52px; }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .sub { font-size: 13px; color: var(--muted); }
.row.clickable { cursor: pointer; }
.chev { color: var(--muted); width: 18px; height: 18px; flex: none; }
.empty { text-align: center; color: var(--muted); padding: 32px 16px; }
.empty .big { font-size: 40px; margin-bottom: 8px; }

/* Слот */
.slot { display: flex; gap: 14px; align-items: stretch; }
.slot .time { flex: none; width: 64px; text-align: center; border-right: 1px solid var(--line); padding-right: 12px; display: flex; flex-direction: column; justify-content: center; }
.slot .time b { font-size: 20px; font-variant-numeric: tabular-nums; }
.slot .time span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.slot .info { flex: 1; min-width: 0; }
.slot .hall { font-weight: 600; }
.slot .meta { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.meter { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; background: var(--ok); border-radius: 3px; }
.meter i.mid { background: var(--accent); }
.meter i.full { background: var(--danger); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.accent { background: var(--accent); color: var(--accent-ink); }
.date-head { display: flex; align-items: baseline; gap: 8px; margin: 22px 4px 8px; }
.date-head b { font-size: 17px; }
.date-head span { color: var(--muted); font-size: 14px; }

/* Фильтр-чипы */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 4px; padding: 2px 16px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--ink-2); }
.chip.on { background: var(--red); color: #fff; border-color: var(--red); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); } }
:root[data-theme="dark"] .chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 13px 18px; font-weight: 600; cursor: pointer; background: var(--surface-2); color: var(--ink); text-decoration: none; min-height: 48px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.dark { background: var(--ink); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.dark { background: var(--surface-2); color: var(--ink); } }
:root[data-theme="dark"] .btn.dark { background: var(--surface-2); color: var(--ink); }
.btn.danger { background: var(--danger-bg); color: var(--danger); }
.btn.ghost { background: transparent; color: var(--blue); padding: 8px 10px; min-height: 0; }
.btn.small { padding: 8px 12px; min-height: 36px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; }
.fab { position: fixed; right: 16px; bottom: calc(var(--bottom) + 80px); z-index: 15; width: 56px; height: 56px; border-radius: 18px; background: var(--accent); color: var(--accent-ink); border: 0; box-shadow: 0 6px 20px rgba(0,0,0,.2); display: grid; place-items: center; cursor: pointer; }
.fab svg { width: 26px; height: 26px; }

/* Формы */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 2px 6px; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 14px; font-size: 16px; outline: none; min-height: 48px; -webkit-appearance: none; appearance: none; }
textarea.input { min-height: 80px; resize: vertical; }
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.grid2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.grid2 > * { min-width: 0; }
input[type=date].input, input[type=time].input { display: block; min-width: 0; }
.input::-webkit-date-and-time-value { text-align: left; }
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8f9e' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.hint { font-size: 13px; color: var(--muted); margin: -6px 2px 14px; }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .grow { flex: 1; min-width: 0; }
.switch-row .sub, .grow > .sub { font-size: 13px; color: var(--muted); }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: 31px; transition: .2s; cursor: pointer; }
.switch i::after { content: ""; position: absolute; width: 27px; height: 27px; left: 2px; top: 2px; background: #fff; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: .2s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(20px); }
.error { background: var(--danger-bg); color: var(--danger); padding: 10px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 14px; }

/* Вход */
.auth { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--top) + 24px) 20px calc(var(--bottom) + 24px); max-width: 420px; margin: 0 auto; width: 100%; }
.auth .logo { width: 72px; height: 72px; border-radius: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.auth h1 { font-size: 30px; margin-bottom: 6px; }
.auth p.lead { color: var(--ink-2); margin: 0 0 24px; }
.tabs { display: flex; background: var(--surface-2); border-radius: 12px; padding: 4px; margin-bottom: 20px; border: 1px solid var(--line); }
.tabs button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.owner-note { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 18px; }

/* Детали слота */
.hero { --accent: #fff; --accent-ink: #d9443d; background: var(--hero); color: #fff; border-radius: 20px; padding: 20px; margin-bottom: 14px; position: relative; overflow: hidden; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero { background: var(--surface-2); } }
:root[data-theme="dark"] .hero { background: var(--surface-2); }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 18px solid rgba(242,106,27,.22); }
.hero .when { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero .day { opacity: .8; margin-top: 2px; }
.hero .where { margin-top: 14px; font-weight: 600; }
.hero .addr { opacity: .7; font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { background: var(--surface); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); text-align: center; }
.stat b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; color: var(--ink); }
.num { width: 24px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; flex: none; font-size: 14px; }

/* Чат */
.chat-list { flex: 1; overflow-y: auto; padding: 12px 0 8px; display: flex; flex-direction: column; gap: 4px; }
.msg { max-width: 82%; align-self: flex-start; display: flex; gap: 8px; align-items: flex-end; }
.msg .bubble { background: var(--surface); padding: 8px 12px; border-radius: 18px 18px 18px 6px; box-shadow: var(--shadow); word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg .who { font-size: 12px; font-weight: 600; color: var(--blue); margin-bottom: 2px; }
.msg .t { font-size: 11px; color: var(--muted); margin-left: 8px; float: right; margin-top: 6px; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.me .bubble { background: var(--accent); color: var(--accent-ink); border-radius: 18px 18px 6px 18px; }
.msg.me .t { color: rgba(255,255,255,.8); }
.msg.cont .avatar { visibility: hidden; }
.msg .avatar { width: 30px; height: 30px; font-size: 12px; }
.day-sep { align-self: center; font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 3px 10px; border-radius: 999px; margin: 10px 0 6px; }
.composer { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 8px 0 calc(var(--bottom) + 76px); background: var(--bg); align-items: flex-end; }
.composer textarea { flex: 1; resize: none; min-height: 44px; max-height: 140px; border-radius: 22px; padding: 11px 16px; border: 1px solid var(--line); background: var(--surface); outline: none; font-size: 16px; line-height: 1.3; }
.composer button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; flex: none; }
.composer button svg { width: 20px; height: 20px; }

/* Нижняя шторка */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(10,16,32,.45); z-index: 50; animation: fade .2s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; background: var(--bg); border-radius: 22px 22px 0 0; max-height: 92dvh; overflow-y: auto; padding: 10px 16px calc(var(--bottom) + 20px); animation: up .25s cubic-bezier(.2,.8,.2,1); max-width: 640px; margin: 0 auto; }
.sheet .grabber { width: 40px; height: 5px; background: var(--line); border-radius: 3px; margin: 0 auto 14px; }
.sheet h2 { font-size: 20px; margin-bottom: 14px; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

/* Уведомление */
.toast { position: fixed; left: 50%; top: calc(var(--top) + 12px); transform: translate(-50%, -150%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; z-index: 100; font-size: 15px; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility .3s; pointer-events: none; visibility: hidden; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { background: var(--surface-2); } }
:root[data-theme="dark"] .toast { background: var(--surface-2); }
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast.err { background: var(--danger); color: #fff; }

/* Баннер установки */
.install { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px dashed var(--accent); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.install img { width: 40px; height: 40px; border-radius: 10px; }
.install .grow { flex: 1; font-size: 14px; }
.install .x { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; padding: 0 4px; }
.share-ico { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; }

.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.admin-tile { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 8px; cursor: pointer; border: 0; text-align: left; }
.admin-tile .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.admin-tile .ico svg { width: 20px; height: 20px; }
.admin-tile b { font-size: 15px; }
.admin-tile span { font-size: 12px; color: var(--muted); }
.notif.unread { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.muted { color: var(--muted); }
.mt { margin-top: 14px; }
.center { text-align: center; }

/* ---- Счётчик непрочитанных на вкладке ---- */
.tab-dot { position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font: 700 11px/18px -apple-system, system-ui, sans-serif; font-style: normal; text-align: center; }

/* ---- Карточка тренера ---- */
.coach-head { display: flex; gap: 12px; align-items: center; }
.coach-head .avatar { width: 48px; height: 48px; font-size: 17px; }
.coach-info { margin-top: 10px; color: var(--ink-2); font-size: 15px; white-space: pre-wrap; }
.coach-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.coach-actions .btn { flex: 1 1 auto; }

/* ---- Список чатов ---- */
.chat-row { gap: 12px; }
.swipe { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); transition: height .25s ease; }
.swipe:last-child { border-bottom: 0; }
.swipe .chat-row { position: relative; z-index: 1; background: var(--surface); border-bottom: 0; transition: transform .22s ease; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.swipe-del { position: absolute; top: 0; right: 0; bottom: 0; width: 92px; border: 0; background: var(--danger); color: #fff; font: 600 13px/1.2 inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.swipe-del svg { width: 20px; height: 20px; }
.swipe.open .swipe-del { outline: none; }
.swipe.gone { overflow: hidden; }
.swipe.gone .chat-row { transform: translateX(-100%) !important; }
.chat-hint { margin: 4px 4px 12px; }
@media (prefers-reduced-motion: reduce) { .swipe, .swipe .chat-row { transition: none; } }
.chat-title { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.chat-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-title .sub { flex: none; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar.chan { background: var(--surface-2); font-size: 18px; }

/* ---- Карточка игры внутри сообщения ---- */
.slot-mini { display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 8px 10px; margin: 2px 0 6px; text-decoration: none; color: var(--ink); font-size: 14px; min-width: 200px; }
.slot-mini b { font-size: 15px; }
.slot-mini span { color: var(--ink-2); }
.slot-mini em { font-style: normal; font-weight: 600; color: var(--blue); margin-top: 2px; }
.msg.me .slot-mini { background: rgba(255,255,255,.55); border-color: rgba(42,33,28,.15); border-left-color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .msg.me .slot-mini { background: rgba(42,33,28,.12); } }
:root[data-theme="dark"] .msg.me .slot-mini { background: rgba(42,33,28,.12); }

/* ---- Переключатель-сегменты в формах ---- */
.field > .lbl { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 2px 6px; }
.tabs.seg { margin-bottom: 0; }
.tabs.seg label { flex: 1; position: relative; cursor: pointer; }
.tabs.seg input { position: absolute; opacity: 0; pointer-events: none; }
.tabs.seg b { display: block; text-align: center; padding: 10px 6px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); }
.tabs.seg input:checked + b { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.tabs.seg input:focus-visible + b { outline: 2px solid var(--accent); }
[hidden] { display: none !important; }

/* ---- Выбор друзей ---- */
.inv-list { max-height: 42dvh; overflow-y: auto; }
.check { width: 22px; height: 22px; accent-color: var(--ok); flex: none; }

/* ---- Тренеры ---- */
.coach .sub { font-size: 13px; color: var(--muted); }
.btn.mosru { margin-top: 8px; background: color-mix(in srgb, #cc0000 10%, var(--surface)); color: #b00020; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.mosru { color: #ff8a8a; } }
:root[data-theme="dark"] .btn.mosru { color: #ff8a8a; }
.coach-tag { display: flex; align-items: center; gap: 4px; color: var(--ink-2); }
.coach-tag svg { width: 14px; height: 14px; flex: none; }
.coach-line, .series-card { display: flex; align-items: center; gap: 12px; }
.coach-line > svg, .series-card > svg { width: 26px; height: 26px; color: var(--accent); flex: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .coach-line > svg, :root:not([data-theme="dark"]) .series-card > svg { color: var(--warn); } }
:root[data-theme="light"] .coach-line > svg, :root[data-theme="light"] .series-card > svg { color: var(--warn); }
.series-card .sub, .coach-line .sub { font-size: 13px; color: var(--muted); }
.scope-list input[type=radio] { width: 20px; height: 20px; accent-color: var(--ink); flex: none; }
.scope-list .row { gap: 12px; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* ---- Видео и фото в чате ---- */
.attach { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); cursor: pointer; flex: none; background: var(--surface); border: 1px solid var(--line); }
.attach svg { width: 21px; height: 21px; }
.media { display: block; margin: 2px -4px 6px; border-radius: 12px; overflow: hidden; background: #000; max-width: 300px; }
.media video, .media img { display: block; width: 100%; max-height: 420px; object-fit: contain; background: #000; }
.msg:has(.media) { max-width: 88%; }
.bubble.upload { min-width: 220px; }
.up-bar { height: 6px; background: rgba(42,33,28,.15); border-radius: 3px; overflow: hidden; margin: 8px 0 4px; }
.up-bar i { display: block; height: 100%; background: var(--ink); transition: width .2s; }
.bubble.upload .btn.ghost { padding: 4px 0; color: var(--accent-ink); opacity: .7; }

/* =================== Лендинг «НаВалик.ру» =================== */
/* Шрифт Unbounded (SIL OFL 1.1) хранится на сайте — не зависим от Google Fonts */
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/unbounded-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/unbounded-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/unbounded-cyrillic-800-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/unbounded-latin-800-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root { --parquet: #e9a35b; --parquet-2: #e29a50; --court-line: #fffaf0; --display: "Unbounded", -apple-system, "Segoe UI", Roboto, sans-serif; }
.lp { min-height: 100dvh; background: var(--bg); color: var(--ink); }
.lp-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(var(--top) + 10px) max(16px, calc((100vw - 1120px) / 2)) 10px; background: var(--hero); color: #fff; }
.lp-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 700 18px/1 var(--display); letter-spacing: -.01em; }
.lp-brand img { border-radius: 9px; }
.lp-top-link { color: #fff; text-decoration: none; font-weight: 600; padding: 9px 16px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,.35); }
.lp-top-link:hover { border-color: #fff; }

/* Площадка — вид сверху: паркет, белая разметка, сетка посередине */
.lp-court { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-width: 1120px; margin: 24px auto 0;
  min-height: 560px; border-radius: 6px; overflow: hidden; isolation: isolate;
  background: repeating-linear-gradient(90deg, var(--parquet) 0 46px, var(--parquet-2) 46px 48px), var(--parquet);
  box-shadow: 0 0 0 10px #2f6f4f, 0 0 0 11px rgba(0,0,0,.08); /* зелёная зона за пределами поля */ }
.lp-court::after { content: ""; position: absolute; inset: 22px; border: 5px solid var(--court-line); pointer-events: none; z-index: 0; }
.lp-court-lines { position: absolute; inset: 22px; pointer-events: none; z-index: 0; }
.lp-court-lines i { position: absolute; top: 0; bottom: 0; }
.lp-net { left: calc(50% - 6px); width: 12px; background: repeating-linear-gradient(0deg, rgba(42,33,28,.85) 0 2px, transparent 2px 9px), rgba(42,33,28,.25);
  border-left: 3px solid #fff; border-right: 3px solid #fff; box-shadow: 0 0 0 1px rgba(42,33,28,.4); }
.lp-attack { width: 5px; background: var(--court-line); opacity: .5; }
.lp-attack.l { left: calc(50% - 5px - 16.66%); } .lp-attack.r { left: calc(50% + 16.66%); }
.lp-hero { position: relative; z-index: 1; padding: 64px 56px 56px; align-self: center; }
.lp-hero h1 { font: 800 clamp(30px, 4.2vw, 48px)/1.08 var(--display); letter-spacing: -.02em; color: var(--ink); margin: 0 0 18px; text-wrap: balance; }
.lp-hero p { font-size: 18px; line-height: 1.5; max-width: 30em; margin: 0 0 26px; color: #2a2f45; }
.lp-cta { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 700; padding: 15px 22px; border-radius: 12px; }
.lp-cta:hover { filter: brightness(.94); }
.lp-auth { position: relative; z-index: 1; padding: 48px 48px 48px 64px; align-self: center; scroll-margin-top: 80px; }
.lp-card { background: var(--surface); color: var(--ink); border-radius: 18px; padding: 22px; box-shadow: 0 14px 40px rgba(60,30,0,.22); max-width: 400px; margin-left: auto; }
.lp-card h2 { font: 700 20px/1.2 var(--display); margin: 0 0 8px; }
.lp-card p { margin: 0 0 14px; line-height: 1.45; }
.lp-card .tabs { margin-bottom: 16px; }
.lp-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.txt-link { background: none; border: 0; padding: 4px 0; color: var(--blue); font: inherit; font-size: 14px; cursor: pointer; }
.txt-link:hover { text-decoration: underline; }

/* Секции ниже площадки */
.lp-sec { max-width: 1120px; margin: 0 auto; padding: 64px 16px 8px; }
.lp-sec h2 { font: 700 clamp(24px, 3vw, 32px)/1.15 var(--display); letter-spacing: -.015em; margin: 0 0 28px; }
.lp-feats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 40px; }
.lp-feats li { display: flex; gap: 14px; align-items: flex-start; }
.lp-ico { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.lp-ico svg { width: 22px; height: 22px; }
.lp-feats h3, .lp-steps h3, .lp-os h3 { font-size: 17px; margin: 2px 0 6px; }
.lp-feats p, .lp-steps p, .lp-os p { margin: 0; color: var(--ink-2); line-height: 1.5; max-width: 34em; }
.lp-steps { list-style: none; counter-reset: st; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.lp-steps li { counter-increment: st; border-top: 4px solid var(--ink); padding-top: 14px; }
.lp-steps li::before { content: counter(st); display: block; font: 800 40px/1 var(--display); color: var(--parquet); margin-bottom: 10px; }
.lp-os { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 18px; }
.lp-os .share-ico { width: 18px; height: 18px; vertical-align: -3px; }
.lp-foot { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 56px 16px calc(var(--bottom) + 32px); color: var(--muted); font-size: 14px; }
.lp-foot img { border-radius: 7px; }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lp-hero p { color: #2a2f45; } :root:not([data-theme="light"]) .lp-card { box-shadow: 0 14px 40px rgba(0,0,0,.5); } :root:not([data-theme="light"]) .lp-steps li { border-top-color: var(--accent); } }
:root[data-theme="dark"] .lp-hero p { color: #2a2f45; } :root[data-theme="dark"] .lp-card { box-shadow: 0 14px 40px rgba(0,0,0,.5); } :root[data-theme="dark"] .lp-steps li { border-top-color: var(--accent); }

/* Телефон: площадка вертикально — сетка поперёк, форма на второй половине поля */
@media (max-width: 860px) {
  .lp-court { grid-template-columns: 1fr; margin: 14px 16px 0; min-height: 0; }
  .lp-court::after, .lp-court-lines { inset: 14px; }
  .lp-net { display: none; }
  .lp-auth::before { content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 12px;
    background: repeating-linear-gradient(90deg, rgba(42,33,28,.85) 0 2px, transparent 2px 9px), rgba(42,33,28,.25);
    border-top: 3px solid #fff; border-bottom: 3px solid #fff; }
  .lp-attack { display: none; }
  .lp-court { background: repeating-linear-gradient(0deg, var(--parquet) 0 46px, var(--parquet-2) 46px 48px), var(--parquet); }
  .lp-hero { padding: 40px 30px 56px; }
  .lp-hero p { font-size: 16px; }
  .lp-cta { display: none; }
  .lp-auth { padding: 34px 26px 30px; }
  .lp-card { max-width: none; margin: 0; }
  .lp-feats, .lp-steps, .lp-os { grid-template-columns: 1fr; gap: 24px; }
  .lp-sec { padding-top: 48px; }
}
@media (min-width: 861px) and (max-width: 1040px) { .lp-feats { grid-template-columns: 1fr 1fr; } .lp-hero { padding: 48px 32px; } .lp-auth { padding: 40px 28px 40px 44px; } }

/* ---- Поделиться ---- */
.share-preview { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.share-preview span { color: var(--blue); word-break: break-all; }
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.share-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); font-size: 13px; padding: 10px 4px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.share-btn i { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 18px/1 -apple-system, system-ui, sans-serif; font-style: normal; }
/* Карточка игры на лендинге (открыли ссылку «Поделиться») */
.lp-game { background: var(--hero); color: #fff; border-radius: 16px; padding: 14px 16px; margin: 0 0 12px auto; max-width: 400px; line-height: 1.4; border-left: 6px solid #fff; }
.lp-game b { display: block; font: 700 17px/1.25 var(--display); margin: 2px 0 4px; }
.lp-game .sub { color: rgba(255,255,255,.75); font-size: 13px; }
@media (max-width: 860px) { .lp-game { max-width: none; margin: 0 0 12px; } }
.btn.nowrap { white-space: nowrap; padding-left: 12px; padding-right: 12px; }

/* ---- Логотип в шапке ---- */
.tb-logo { flex: none; display: block; width: 34px; height: 34px; border-radius: 9px; overflow: hidden; box-shadow: 0 0 0 1.5px rgba(255,255,255,.18); }
.tb-logo img { display: block; width: 100%; height: 100%; }
.topbar .back + .tb-logo { display: none; } /* на внутренних экранах слева кнопка «Назад» */
@media (min-width: 420px) { .topbar .back + .tb-logo { display: block; } }

/* ---- Вкладки главного экрана ---- */
.games-tabs { margin-bottom: 12px; }
.games-tabs button { font-size: 14px; white-space: nowrap; padding-left: 6px; padding-right: 6px; }
.games-tabs i { font-style: normal; display: inline-block; min-width: 22px; padding: 1px 6px; margin-left: 4px; border-radius: 11px; background: var(--line); color: var(--ink-2); font-size: 12px; font-weight: 700; }
.games-tabs .on i { background: var(--accent); color: var(--accent-ink); }

/* ---- Цена и методика ---- */
.meta-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.price-btn { border: 0; background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: 3px 10px; font: 700 13px/1.4 inherit; cursor: pointer; display: inline-flex; gap: 4px; align-items: baseline; border: 1px dashed var(--line); }
.price-btn span { font-weight: 400; color: var(--muted); font-size: 12px; }
.price-btn:hover, .price-btn:focus-visible { border-color: var(--ink-2); }
.stat-btn { border: 0; font: inherit; color: inherit; cursor: pointer; }
.stat-btn span { color: var(--blue); }
.calc { background: var(--surface); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); margin: 0 0 12px; }
.calc > div:not(.sub) { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.calc .sub { font-size: 13px; color: var(--muted); margin: -2px 0 6px; }
.price-table { width: 100%; border-collapse: collapse; margin: 6px 0 8px; font-variant-numeric: tabular-nums; background: var(--surface); border-radius: 12px; overflow: hidden; }
.price-table th, .price-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.price-table th { font-weight: 600; color: var(--muted); font-size: 12px; }
.price-table td:last-child, .price-table th:last-child { text-align: right; }
.price-table tr.cur td { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); font-weight: 700; }
.sheet p { line-height: 1.5; }

/* ---- Напоминание в профиле ---- */
select.input.remind { width: auto; min-width: 150px; min-height: 40px; padding: 8px 36px 8px 12px; font-size: 15px; }

/* ---- Администрация / предложения ---- */
.avatar.chan.sup { background: var(--ink); color: var(--accent); }
.avatar.chan.sup svg { width: 20px; height: 20px; }
.composer { flex-wrap: wrap; }
.sup-bar { flex: 0 0 100%; font-size: 13px; padding: 8px 12px; margin: 0; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); line-height: 1.35; }
.sup-to { font-size: 12px; opacity: .7; margin-bottom: 2px; }
.pending-card { border-left: 5px solid var(--accent); line-height: 1.45; }
.pending-card .sub { color: var(--ink-2); font-size: 14px; }

/* Отчёт о занятии, рейтинг, ведомости */
.badge.hrs { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.report-due { display: flex; gap: 12px; align-items: flex-start; background: var(--warn-bg); color: var(--ink); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.report-due > svg { width: 24px; height: 24px; color: var(--warn); flex: none; margin-top: 1px; }
.report-due a { display: block; font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.report-head { display: flex; align-items: center; gap: 12px; }
.report-head .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.rh-hours { text-align: center; background: var(--ok-bg); color: var(--ok); border-radius: 12px; padding: 6px 10px; line-height: 1.1; }
.rh-hours b { display: block; font-size: 17px; } .rh-hours span { font-size: 11px; }
.att-bar { display: flex; align-items: center; justify-content: space-between; margin: 4px 4px 8px; font-size: 15px; }
.att { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.att input { position: absolute; opacity: 0; pointer-events: none; }
.att .tick { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; flex: none; color: transparent; transition: background .15s, border-color .15s; }
.att .tick svg { width: 16px; height: 16px; }
.att.on .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.att:not(.on) .grow > div:first-child { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.att input:focus-visible + .tick { outline: 2px solid var(--blue); outline-offset: 2px; }
.sticky-save { position: sticky; bottom: calc(var(--bottom) + 72px); padding: 10px 0 4px; background: linear-gradient(transparent, var(--bg) 30%); z-index: 2; }
#att-add { margin-top: 2px; }
.dl-row { margin: 8px 0 14px; } .dl-row .btn { flex: 1; }
.card.rating-card { display: flex; align-items: center; gap: 12px; }
.rating-card > svg:first-child { width: 26px; height: 26px; color: var(--accent); flex: none; }
.rating-card .sub { font-size: 13px; color: var(--muted); }
.rc-val { text-align: right; white-space: nowrap; line-height: 1.15; } .rc-val b { display: block; font-size: 17px; } .rc-val small { font-size: 12px; color: var(--muted); }
.rating-me { display: flex; gap: 16px; align-items: center; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 16px; margin-bottom: 10px; }
.rm-place { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-content: center; text-align: center; flex: none; line-height: 1; }
.rm-place b { font-size: 28px; } .rm-place span { font-size: 11px; margin-top: 2px; }
.rm-hours { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.rating-me .sub { font-size: 13px; color: var(--muted); }
.rating-list .rk { width: 26px; text-align: center; font-weight: 700; color: var(--muted); flex: none; }
.rating-list .rk.top1 { color: #c99400; } .rating-list .rk.top2 { color: #8a94a6; } .rating-list .rk.top3 { color: #b0703c; }
.rating-list .row.me { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.rh { white-space: nowrap; }
.month-nav { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; }
.month-nav b { font-size: 17px; } .month-nav .btn svg { width: 20px; height: 20px; } .month-nav .flip svg { transform: scaleX(-1); }
.st-session summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.st-session summary::-webkit-details-marker { display: none; }
.st-session .sub { font-size: 13px; color: var(--muted); }
.st-names { font-size: 14px; margin-top: 10px; line-height: 1.45; }

/* Минимальный состав */
.min-tag { color: var(--warn); font-weight: 600; } .min-tag.ok { color: var(--ok); }
.min-card { border-left: 4px solid var(--accent); }
.min-card .sub { font-size: 13px; color: var(--ink-2); margin-top: 6px; line-height: 1.4; }
.min-card .meter { margin-top: 10px; }
.min-card .meter i { background: var(--accent); } .min-card .meter i.full-ok { background: var(--ok); }
.min-card.good { border-left-color: var(--ok); } .min-card.bad { border-left-color: var(--danger); background: var(--danger-bg); }
.min-row { padding: 6px 2px 12px; border: 0; }

/* Ближайшая игра */
.next-game { --accent: #fff; --accent-ink: #d9443d; background: var(--hero); color: #fff; border-radius: calc(var(--radius) + 4px); padding: 16px 16px 12px; margin-bottom: 14px; box-shadow: var(--shadow); cursor: pointer; position: relative; overflow: hidden; }
.next-game::after { content: ''; position: absolute; right: -60px; top: -60px; width: 190px; height: 190px; border-radius: 50%; border: 18px solid rgba(255,255,255,.14); pointer-events: none; }
.ng-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; position: relative; z-index: 1; }
.ng-label { color: var(--accent); font-weight: 700; }
.ng-in { background: rgba(255,255,255,.2); padding: 3px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.ng-when { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.ng-when b { font-size: 46px; line-height: 1; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ng-when span { font-size: 14px; opacity: .8; line-height: 1.3; }
.ng-where { font-size: 18px; font-weight: 700; margin-top: 8px; }
.ng-meta { font-size: 12.5px; opacity: .65; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ng-me { opacity: 1; color: var(--accent); font-weight: 700; }
.ng-quorum { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.45); border-radius: 14px; padding: 10px 12px; margin-top: 12px; position: relative; z-index: 1; }
.ng-quorum.ok { border-color: rgba(74,222,128,.5); }
.q-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.q-cap { font-size: 12px; opacity: .75; }
.q-timer { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent); line-height: 1.1; }
.ng-quorum.ok .q-timer, .ng-quorum.ok .q-cap { color: #4ade80; opacity: 1; }
.q-count { text-align: right; } .q-count b { font-size: 22px; } .q-count small { font-size: 14px; opacity: .6; } .q-count span { display: block; font-size: 12px; opacity: .75; }
.q-meter { height: 6px; border-radius: 3px; background: rgba(255,255,255,.15); margin-top: 8px; overflow: hidden; }
.q-meter i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.ng-quorum.ok .q-meter i { background: #4ade80; }
.q-note { font-size: 12px; opacity: .7; margin-top: 6px; }
.next-game .btn.block { margin-top: 12px; position: relative; z-index: 1; min-height: 50px; font-size: 17px; }
.next-game .ng-unbook { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.ng-share { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; position: relative; z-index: 1; }
.ng-sbtn { display: flex; align-items: center; justify-content: center; gap: 6px; background: rgba(255,255,255,.16); color: #fff; border: 0; border-radius: 12px; padding: 10px 4px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.ng-sbtn svg { width: 17px; height: 17px; }
.ng-sbtn:active { background: rgba(255,255,255,.16); }

/* Избранные залы, расположение */
.hall-card .hc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.fav-btn { border: 0; background: none; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 4px; margin: -4px -4px 0 0; }
.fav-btn.on, .fav-top.on { color: var(--accent); }
.fav-top { font-size: 22px; }
.chip.fav { font-weight: 700; }
.geo-line { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.geo-box { border: 1px dashed var(--line); border-radius: 14px; padding: 12px; margin: 4px 0 14px; }
.geo-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
/* Цена: ползунок, кому переводить, итог */
.slider-box { background: var(--surface-2); border-radius: 16px; padding: 14px; margin: 10px 0; }
.sl-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--ink-2); }
.sl-top b { font-size: 20px; color: var(--ink); }
.slider-box input[type=range] { width: 100%; margin: 12px 0 2px; accent-color: var(--accent); height: 28px; }
.sl-scale { position: relative; display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); height: 30px; }
.sl-booked { position: absolute; top: 14px; white-space: nowrap; color: var(--ink-2); font-weight: 600; }
.sl-res { text-align: center; margin-top: 4px; } .sl-res b { font-size: 34px; font-weight: 800; letter-spacing: -.01em; display: block; line-height: 1.1; } .sl-res span { font-size: 13px; color: var(--muted); }
.sl-formula { text-align: center; font-size: 13px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.payee { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; margin-top: 12px; }
.payee .pe-cap, .final-box .fb-cap { font-size: 12px; color: var(--muted); font-weight: 600; }
.payee .pe-main { margin: 4px 0 8px; font-size: 15px; }
.payee .btn-row { margin: 0; }
.final-box { background: var(--ok-bg); border-radius: 16px; padding: 12px 14px; margin: 10px 0; }
.final-box > b { display: block; font-size: 28px; font-weight: 800; color: var(--ok); line-height: 1.15; }
.final-box > span { font-size: 13px; color: var(--ink-2); }
.final-box.light .payee { background: var(--surface); }
.fb-note { font-size: 12px; color: var(--muted); margin-top: 6px; }
.guests-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.guests-row .sub { font-size: 13px; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 10px; flex: none; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 20px; cursor: pointer; color: var(--ink); }
.stepper b { min-width: 20px; text-align: center; font-size: 18px; }
.ok-t { color: var(--ok); font-weight: 600; } .bad-t { color: var(--danger); font-weight: 600; }
.att-ask { border-left: 4px solid var(--accent); } .att-ask .sub { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
/* Ник */
.nick-card { display: flex; align-items: center; gap: 10px; }
.nick-card .sub { font-size: 12.5px; color: var(--muted); }
.nick { font-size: 20px; letter-spacing: .01em; }
.nick-btns { display: flex; gap: 6px; flex: none; } .nick-btns .btn svg { width: 16px; height: 16px; }
.nick-big { text-align: center; font-size: 30px; font-weight: 800; margin: 6px 0 8px; letter-spacing: .01em; }
.ng-metro { display: block; font-size: 13px; font-weight: 500; opacity: .7; margin-top: 2px; }

/* Фильтр залов и «где играть» */
.hall-filter { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.hall-filter .chips { margin: 0; }
.hall-filter .grid2 { gap: 8px; }
.hall-filter select.input { font-size: 15px; }
.hf-count { font-size: 13px; color: var(--muted); margin: 4px 4px 8px; }
.home-ask { border-left: 4px solid var(--accent); }
.home-ask b { display: block; margin-bottom: 4px; } .home-ask span { font-size: 14px; color: var(--ink-2); }
.home-line { display: flex; gap: 6px; align-items: center; font-size: 14px; color: var(--ink-2); text-decoration: none; margin: 0 4px 10px; }
.home-line span { color: var(--blue); margin-left: auto; font-size: 13px; }
.hall-desc { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#where { scroll-margin-top: 80px; }

/* Карта залов */
.view-switch { margin-bottom: 10px; }
.view-switch button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 10px; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.view-switch button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.halls-map { height: calc(100vh - 330px); min-height: 360px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 10px; background: var(--surface-2); z-index: 0; position: relative; }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #8a94a6; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); display: grid; place-items: center; color: #fff; font: 700 12px/1 system-ui, sans-serif; }
.pin.has { background: var(--ok, #15803d); } .pin.fav { background: var(--accent); color: #fff; }
.pin span { transform: rotate(45deg); display: block; }
.map-pop { min-width: 190px; font-size: 13px; line-height: 1.35; } .map-pop b { font-size: 15px; display: block; margin-bottom: 2px; }
.mp-geo { color: #4a5470; margin-top: 2px; } .mp-row { display: flex; gap: 8px; align-items: center; margin: 6px 0 8px; } .mp-dist { color: #4a5470; }
.map-pop .btn { color: var(--accent-ink) !important; text-decoration: none; }
.map-me { width: 34px; height: 34px; border-radius: 8px; border: 2px solid rgba(0,0,0,.2); background: #fff; font-size: 17px; cursor: pointer; }
.near-d { font-size: 12px; font-weight: 700; color: var(--blue); }
.halls-map [class*='ymaps-2'] .map-pop .btn { color: #2a211c !important; }

/* Telegram */
.tg-btn { background: #2aabee !important; color: #fff !important; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.tg-btn svg { flex: none; }
.or-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 14px 0 10px; }
.or-sep::before, .or-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.tg-wait { display: flex; align-items: center; gap: 12px; margin-top: 16px; color: var(--ink-2); font-size: 14px; }
.tg-wait .ball { width: 26px; height: 26px; }
.tg-card { display: flex; align-items: center; gap: 12px; } .tg-card > svg { color: #2aabee; width: 26px; height: 26px; flex: none; }
.tg-card .sub, .tg-groups .sub { font-size: 13px; color: var(--muted); }
.tg-av { background: #e3f4fd !important; color: #2aabee; font-size: 12px; font-weight: 700; }
.tg-av svg { width: 18px; height: 18px; }
.tg-chat { display: flex; align-items: center; gap: 10px; padding: 6px 0; } .tg-chat svg { color: #2aabee; }
.tg-steps { padding-left: 20px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.tg-steps li .btn { display: flex; width: max-content; }
.tg-cmd { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; }
.tg-cmd code { background: var(--surface-2); padding: 8px 12px; border-radius: 10px; font-size: 16px; font-weight: 700; letter-spacing: .04em; }

/* Диагностика бота и код ретранслятора */
.tg-diag { margin-top: 12px; padding: 10px 12px; border-radius: 12px; font-size: 14px; }
.tg-diag.bad { background: var(--danger-bg); color: var(--danger); }
.tg-diag.good { background: var(--ok-bg); color: var(--ok); }
.tg-code { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; white-space: pre; margin: 0 0 10px; max-width: 100%; }

/* ===== v20: команды, чемпионат, уровень, правила ===== */
.avatar.ph { object-fit: cover; background: var(--surface-2); }
.avatar.big { width: 64px; height: 64px; font-size: 22px; }
.linkish { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.warn-t { color: var(--warn); font-style: normal; }
.row.clickable[type="button"], button.row.clickable { width: 100%; border: 0; background: none; text-align: left; font: inherit; color: inherit; }
.tabs a { flex: 1; text-align: center; padding: 10px; border-radius: 9px; font-weight: 600; color: var(--muted); text-decoration: none; }
.tabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.sel-sm { width: auto; min-width: 0; padding: 8px 10px; font-size: 14px; }
.inline-form { display: flex; gap: 8px; margin-top: 6px; }
.inline-form .input { flex: 1; }
.plain { margin: 0; padding-left: 18px; } .plain li { margin: 4px 0; }

/* уровни */
.badge.lvl { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.badge.lvl0 { background: var(--surface-2); }
.badge.lvl1 { background: #eef4fb; color: #355483; border-color: #d6e3f3; }
.badge.lvl2 { background: #e9f6ef; color: #23704a; border-color: #cfe9da; }
.badge.lvl3 { background: #fdf3d6; color: #8a5a00; border-color: #f4e1a6; }
.badge.lvl4 { background: var(--red); color: #fff; border-color: var(--red); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.lvl1, :root:not([data-theme="light"]) .badge.lvl2, :root:not([data-theme="light"]) .badge.lvl3 { background: var(--surface-2); color: var(--ink); border-color: var(--line); } :root:not([data-theme="light"]) .badge.lvl4 { background: var(--accent); color: var(--accent-ink); } }
:root[data-theme="dark"] .badge.lvl1, :root[data-theme="dark"] .badge.lvl2, :root[data-theme="dark"] .badge.lvl3 { background: var(--surface-2); color: var(--ink); border-color: var(--line); } :root[data-theme="dark"] .badge.lvl4 { background: var(--accent); color: var(--accent-ink); }
.lvl-list { display: grid; gap: 8px; }
.lvl-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--surface); }
.lvl-opt input { position: absolute; opacity: 0; pointer-events: none; }
.lvl-opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242,106,27,.18); }
.lvl-opt .sub { font-size: 13px; color: var(--muted); }
.lvl-text { display: block; font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.lvl-num { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.lvl-num.big { width: 64px; height: 64px; border-radius: 18px; font-size: 32px; margin: 0 auto 8px; }
.lvl-result { text-align: center; }
.lvl-result h2 { margin: 4px 0; }

/* профиль: развитие */
.dev-card { display: flex; gap: 14px; align-items: center; }
.dev-photo { position: relative; flex: none; }
.dev-photo .avatar { width: 72px; height: 72px; font-size: 24px; }
.dev-photo-btn { position: absolute; right: -4px; bottom: -4px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; border: 2px solid var(--surface); }
.dev-photo-btn svg { width: 15px; height: 15px; }
.dev-name { font-weight: 700; font-size: 18px; }
.dev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.dev-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-decoration: none; color: inherit; border: 0; font: inherit; text-align: left; cursor: pointer; min-height: 104px; }
.dev-tile .dev-k { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.dev-tile b { font-size: 28px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.dev-tile b svg { width: 28px; height: 28px; }
.dev-tile span:last-child { font-size: 13px; color: var(--ink-2); }
.dev-tile .lvl-big { color: var(--ink); }

/* тесты */
.quiz-q b { display: block; margin-bottom: 8px; }
.quiz-opt { display: flex; gap: 10px; align-items: flex-start; padding: 9px 4px; border-top: 1px solid var(--line); cursor: pointer; font-size: 15px; }
.quiz-opt input { margin-top: 3px; accent-color: var(--ink); }
.quiz-text { font-size: 18px; margin: 6px 0 12px; }
.quiz-ans { display: block; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 8px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; color: inherit; cursor: pointer; }
.quiz-ans.right { border-color: var(--ok); background: var(--ok-bg); }
.quiz-ans.wrong { border-color: var(--danger); background: var(--danger-bg); }
.quiz-why { padding: 10px 12px; border-radius: 12px; font-size: 14px; }
.quiz-why.ok { background: var(--ok-bg); } .quiz-why.bad { background: var(--danger-bg); }
.quiz-prog { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; margin-bottom: 8px; }
.quiz-prog i { display: block; height: 100%; background: var(--accent); }
.quiz-best { margin-top: 8px; font-size: 14px; }
.quiz-done { text-align: center; }
.quiz-done h2 { margin: 0 0 6px; }

/* друзья и предложения */
.guest-due { border-left: 4px solid var(--accent); }
.guest-due a { display: block; margin-top: 4px; font-size: 14px; }
.guest-due .sub { font-size: 13px; color: var(--muted); margin-top: 6px; }
.guest-noacc { margin-bottom: 4px; }
.prop-card { display: grid; gap: 4px; }
.prop-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.prop-card .sub { font-size: 13px; color: var(--muted); }
.propose-btn { border-style: dashed; }

/* команды */
.avatar.team-av { background: var(--ink); color: var(--accent); border-radius: 12px; font-size: 13px; letter-spacing: .02em; }
.avatar.team-av.big { width: 60px; height: 60px; border-radius: 16px; font-size: 20px; }
.team-hero { display: flex; gap: 14px; align-items: center; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 10px; }
.team-hero h2 { margin: 0; font-size: 20px; }
.team-hero .sub { font-size: 13px; color: var(--muted); }
.team-avg { text-align: center; flex: none; max-width: 96px; }
.team-avg b { display: block; font-size: 28px; font-variant-numeric: tabular-nums; }
.team-avg span { font-size: 11px; color: var(--muted); line-height: 1.2; display: block; }
.req-card { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.req-card .btn-row { flex: 1 1 100%; }
.invite-card { border-left: 4px solid var(--accent); }

/* чемпионат: ближайший матч */
.champ-next { display: block; position: relative; overflow: hidden; border-radius: 22px; padding: 18px 18px 16px; margin-bottom: 12px; text-decoration: none;
  --accent: #fff; --accent-ink: #d9443d; background: var(--hero); color: #fff; box-shadow: 0 10px 30px rgba(229,83,75,.25); }
.champ-next::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.45) 0 8px, transparent 8px 14px); }
.champ-next > * { position: relative; }
.cn-cap { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; opacity: .9; }
.cn-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 18px 0 20px; font-size: 22px; font-weight: 800; line-height: 1.15; }
.cn-teams span:first-child { text-align: right; } .cn-teams span:last-child { text-align: left; }
.cn-teams span:only-child { grid-column: 1 / -1; text-align: left; }
.cn-teams i { font-style: normal; font-size: 13px; font-weight: 700; color: #d9443d; background: #fff; border-radius: 999px; padding: 4px 9px; }
.cn-when { font-weight: 700; font-variant-numeric: tabular-nums; display: inline-block; padding: 2px 8px 2px 0; background: transparent; }
.cn-when [data-cd] { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.cn-where, .cn-refs { font-size: 14px; opacity: .8; margin-top: 2px; }
.cn-stage { position: absolute; top: 16px; right: 16px; font-size: 12px; opacity: .7; }
.champ-more { margin-bottom: 4px; }
.day-head { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 14px 4px 6px; }
.match-row .mr-time { font-weight: 700; font-variant-numeric: tabular-nums; width: 46px; flex: none; }
.match-row.mine { box-shadow: inset 4px 0 0 var(--accent); }

/* страница чемпионата */
.champ-head { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 10px; }
.champ-head h2 { margin: 6px 0 4px; font-size: 22px; }
.champ-head .sub { font-size: 13px; color: var(--muted); }
.ch-status { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.ch-status.st-registration { background: var(--ok-bg); color: var(--ok); }
.ch-status.st-groups, .ch-status.st-playoff { background: var(--accent); color: var(--accent-ink); }
.ch-champion { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); }
.ch-desc { white-space: pre-line; font-size: 14px; color: var(--ink-2); margin: 10px 0 0; }
.admin-bar .btn-row .btn { flex: 0 1 auto; }
.reg-card { border-left: 4px solid var(--ok); }
.reg-card .sub { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.ch-tabs { margin: 14px 0 10px; }
.team-card summary { display: flex; gap: 12px; align-items: center; cursor: pointer; list-style: none; }
.team-card summary::-webkit-details-marker { display: none; }
.team-card .sub { font-size: 13px; color: var(--muted); }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; margin-top: 14px; }
.roster-p { text-align: center; font-size: 13px; }
.roster-p img, .rp-ini { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; margin: 0 auto 6px; font-weight: 700; font-size: 22px; color: var(--ink); }
.roster-p b { display: block; font-weight: 600; line-height: 1.2; }
.roster-p span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.match { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 8px; }
.match.focus { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.m-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; font-weight: 600; }
.m-teams span:first-child { text-align: right; }
.m-teams .win { color: var(--ink); font-weight: 800; }
.match.done .m-teams span:not(.win) { color: var(--muted); }
.m-score { font-variant-numeric: tabular-nums; font-size: 18px; min-width: 56px; text-align: center; }
.sets { display: flex; justify-content: center; gap: 6px; margin-top: 6px; }
.sets i { font-style: normal; font-size: 12px; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); font-variant-numeric: tabular-nums; }
.m-meta { text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; }
.m-tools { margin-top: 10px; justify-content: center; }
.m-tools .btn { flex: 0 1 auto; }
.table-card { padding: 8px 8px 12px; overflow-x: auto; }
.standings { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.standings th { font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px; text-align: center; }
.standings td { padding: 8px 6px; text-align: center; border-top: 1px solid var(--line); }
.standings .tl { text-align: left; }
.standings tr.adv td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.sets-form { display: grid; grid-template-columns: auto 1fr 1fr; gap: 8px; align-items: center; }
.sets-form > b { font-size: 13px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sets-form span { font-size: 14px; } .sets-form small { display: block; color: var(--muted); font-size: 11px; }
.sets-form .input { text-align: center; font-size: 18px; font-variant-numeric: tabular-nums; }
.ref-row { gap: 8px; flex-wrap: wrap; }
.ref-row .sub { font-size: 12px; color: var(--muted); }

/* сетка плей-офф */
.bracket-wrap { overflow-x: auto; margin: 0 -16px 8px; padding: 0 16px 8px; }
.bracket { display: flex; gap: 22px; min-width: min-content; }
.bk-col { display: flex; flex-direction: column; width: 168px; flex: none; }
.bk-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.bk-matches { display: flex; flex-direction: column; justify-content: space-around; flex: 1; gap: 14px; }
.bk-match { position: relative; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); overflow: visible; }
.bk-col:not(:last-child) .bk-match:not(.final)::after { content: ""; position: absolute; right: -12px; width: 12px; border-right: 2px solid var(--line); }
.bk-match.up::after { top: 50%; height: calc(50% + 7px); border-top: 2px solid var(--line); border-top-right-radius: 6px; }
.bk-match.down::after { bottom: 50%; height: calc(50% + 7px); border-bottom: 2px solid var(--line); border-bottom-right-radius: 6px; }
.bk-team { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; font-size: 13px; }
.bk-team + .bk-team { border-top: 1px solid var(--line); }
.bk-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-team.won { font-weight: 800; }
.bk-team.won b { color: var(--accent-ink); background: var(--accent); border-radius: 5px; padding: 0 5px; }
.bk-team.tbd { color: var(--muted); }
.bk-cup { text-align: center; padding: 14px 10px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-size: 28px; }
.bk-cup b { display: block; font-size: 14px; margin-top: 4px; }

/* правила */
.rules-lead { font-size: 14px; margin: 0 4px 12px; }
.rules-toc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.rules-toc a { font-size: 13px; padding: 6px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.rules-sec { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px 6px; margin-bottom: 10px; scroll-margin-top: 80px; }
.rules-sec h3 { margin: 0 0 8px; font-size: 17px; }
.rules-sec ul { margin: 0; padding-left: 18px; }
.rules-sec li { margin-bottom: 8px; line-height: 1.45; font-size: 15px; }
.rules-upd { display: flex; gap: 10px; align-items: center; border-left: 4px solid var(--accent); }
.rules-upd .grow { min-width: 0; }
.rules-upd .sub { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; } /* текст переносится, а не вылезает за карточку */
.rules-share { display: flex; justify-content: flex-end; margin: -4px 0 12px; }
.ru-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.rules-change h3 { margin: 4px 0 8px; }
.rules-change ol, .rules-pop ol { padding-left: 20px; margin: 0 0 10px; }
.rules-change li, .rules-pop li { margin-bottom: 6px; line-height: 1.4; }
.rules-change .sub { font-size: 12px; color: var(--muted); }
.rp-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); margin-bottom: 6px; }
.rules-pop h2 { margin: 4px 0; }
.rules-pop .sub { font-size: 13px; color: var(--muted); margin-bottom: 8px; }

.row > svg:not(.chev) { width: 24px; height: 24px; flex: none; color: var(--muted); }
.roster-p .rp-ini { display: grid; }
.ch-tabs button { white-space: nowrap; font-size: 14px; padding: 10px 6px; }
.card.rules-upd { display: flex; }
.card > .sub { font-size: 13px; color: var(--muted); }

.fb-btn { margin-right: 6px; }
.fb-kind b { font-size: 14px; }
.cal-btns { display: grid; gap: 8px; }
.cal-btns .btn svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
.cal-apple { background: var(--ink); color: var(--surface); }

.rule-fig { margin: 4px -4px 12px; }
.rule-fig svg { display: block; width: 100%; height: auto; }
.rule-fig figcaption { font-size: 13px; color: var(--muted); margin: 6px 4px 0; line-height: 1.4; }
/* первые шаги */
.ob-steps { display: flex; gap: 6px; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; }
.ob-steps span { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; padding: 6px 10px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.ob-steps i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 11px; }
.ob-steps .on { color: var(--ink); border-color: var(--accent); } .ob-steps .on i { background: var(--accent); color: var(--accent-ink); }
.ob-steps .done i { background: var(--ok); color: #fff; }
.ob-intro { margin: 0 4px 12px; } .ob-intro h2 { margin: 0 0 4px; font-size: 22px; } .ob-intro p { margin: 0 0 12px; }
.ob-result { text-align: center; } .ob-result h2 { margin: 4px 0; }
.ob-why { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.ob-why span { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); }
.dev-tile.dev-todo { border: 2px dashed var(--accent); }
/* чемпионат: заявка и залы-этапы */
.prop-champ { border-left: 4px solid var(--warn); } .prop-champ.bad { border-left-color: var(--danger); }
.prop-champ .sub { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.halls-card .hc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.hc-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.hc-row .sub { font-size: 12px; color: var(--muted); }

/* ---------- v23: главная, справочник, разминка, тренер ---------- */
.seg { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.seg a { flex: 1; text-align: center; padding: 9px 6px; border-radius: 9px; font-weight: 600; font-size: 15px; color: var(--muted); text-decoration: none; }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.sec-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sec-row a, .sec-row .muted { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; }
.sec-row a { color: var(--blue, #2563eb); text-decoration: none; }
.empty-inline { color: var(--ink-2); font-size: 15px; }
.lr-ic { width: 28px; text-align: center; font-size: 20px; flex: none; }
.icon-btn.on { background: rgba(255,255,255,.14); border-radius: 10px; }
/* путь игрока: шаги по порядку */
.lp-path { list-style: none; margin: 0 0 10px; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.lp-path li + li { border-top: 1px solid var(--line); }
.lp-path a { display: flex; align-items: center; gap: 12px; padding: 13px 14px; color: inherit; text-decoration: none; }
.lp-path b { display: block; font-size: 16px; }
.lp-path .sub { display: block; font-size: 13px; color: var(--muted); margin-top: 1px; }
.lp-n { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--surface-2); color: var(--ink-2); border: 2px solid var(--line); }
.lp-path li.done .lp-n, .lp-n.done { background: var(--ok, #15803d); border-color: var(--ok, #15803d); color: #fff; }
.lp-path li:not(.done):first-of-type .lp-n, .lp-path li.done + li:not(.done) .lp-n { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.lp-path li.done b { color: var(--ink-2); }
.path-done { margin-top: 18px; }
/* разминка */
.card.wu-hero, .card.warm-nudge { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; }
.wu-hero-fig svg, .wn-fig svg { width: 92px; height: auto; display: block; border-radius: 10px; }
.wu-hero b, .warm-nudge b { font-size: 17px; }
.warm-nudge { border: 2px solid var(--accent); }
.wu-intro b { font-size: 17px; }
.wu-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 12px 0 10px; }
.wu-bar i { display: block; height: 100%; background: var(--ok, #15803d); transition: width .3s; }
.wu-timer-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wu-timer { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.wu-timer.ok { color: var(--ok, #15803d); }
.wu-block { margin-top: 22px; }
.wu-split { margin: 30px 0 -6px; padding: 12px 14px; border-radius: 14px; border: 1.5px dashed var(--line); display: grid; gap: 2px; }
.wu-split span { color: var(--ink-2); font-size: 14px; }
.wu-opt .wu-num { background: var(--ink-3, #888); }
.wu-head { display: flex; gap: 12px; align-items: flex-start; margin: 0 4px 10px; }
.wu-head h2 { font-size: 19px; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wu-head .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.wu-num { width: 32px; height: 32px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.wu-count { font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; padding-top: 6px; }
.wu-item { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 2px solid transparent; border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; margin-bottom: 8px; cursor: pointer; }
.wu-item:focus-visible { outline: 3px solid var(--blue, #2563eb); outline-offset: 2px; }
.wu-fig { flex: none; width: 112px; }
.wu-fig svg { width: 100%; height: auto; display: block; border-radius: 10px; }
.wu-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wu-txt b { font-size: 16px; line-height: 1.25; }
.wu-dose { font-size: 13px; font-weight: 700; color: var(--blue, #2563eb); }
.wu-how { font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.wu-check { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); margin-top: 2px; display: grid; place-items: center; }
.wu-item.done { border-color: var(--ok, #15803d); }
.wu-item.done .wu-check { background: var(--ok, #15803d); border-color: var(--ok, #15803d); }
.wu-item.done .wu-check::after { content: ""; width: 10px; height: 6px; border: 3px solid #fff; border-top: 0; border-right: 0; transform: translateY(-2px) rotate(-45deg); }
.wu-item.done { background: var(--ok-bg); }
.wu-item.done .wu-txt b { color: var(--ink-2); }
@media (min-width: 560px) { .wu-fig { width: 150px; } }
/* ссылки на пункты официальных правил */
.rref { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 6px; vertical-align: 1px; }
.rref-b { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font: 600 12px/1 inherit; font-family: inherit; padding: 4px 7px; border-radius: 7px; cursor: pointer; font-variant-numeric: tabular-nums; }
.rref-b:hover { border-color: var(--blue, #2563eb); color: var(--blue, #2563eb); }
.rref-q { margin: 6px 0 12px; padding: 12px 14px; border-left: 4px solid var(--accent); background: var(--surface-2); border-radius: 0 12px 12px 0; font-size: 16px; line-height: 1.45; }
.quiz-why .rref { margin-left: 4px; }
/* тренер */
.cs-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 10px; border-left: 5px solid var(--accent); }
.cs-card.due { border-left-color: var(--warn, #b45309); }
.cs-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cs-time { font-size: 22px; font-variant-numeric: tabular-nums; }
.cs-st { font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.cs-st.live { background: var(--ok, #15803d); color: #fff; }
.cs-st.warn { background: var(--warn-bg); color: var(--warn, #b45309); }
.cs-st.ok { color: var(--ok, #15803d); }
.cs-hall { font-weight: 700; font-size: 17px; margin-top: 4px; }
.cs-hall span { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.cs-people { margin: 10px 0 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.cs-people summary { cursor: pointer; font-size: 15px; }
.cs-list { margin: 8px 0 0; padding-left: 22px; }
.cs-list li { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.cs-list li > span.grow { display: inline; }
.cs-list li { display: list-item; }
.cs-list li .badge { float: right; }
.cs-card .btn-row { flex-wrap: wrap; }
.seg-n { font-style: normal; font-size: 12px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 1px 7px; margin-left: 2px; }
.imp-bar { position: relative; z-index: 11; display: flex; align-items: center; gap: 8px; background: #ffd9a8; color: #5a2a06; padding: calc(env(safe-area-inset-top) + 6px) 12px 6px; font-size: 14px; }
.imp-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-bar button { border: 0; background: rgba(42,33,28,.12); color: inherit; font: 600 13px/1 inherit; font-family: inherit; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.tu-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tu-row:last-child { border-bottom: 0; }
.tu-row .sub { font-size: 13px; color: var(--muted); }
/* разминка: ведомый режим */
.wu-go { margin-top: 4px; }
.wu-go .btn { flex: 1; padding-left: 8px; padding-right: 8px; font-size: 14px; white-space: nowrap; }
.wu-notify { padding: 12px 0 0; margin-top: 12px; border-top: 1px solid var(--line); }
.wu-main { padding-bottom: 230px; }
.wu-item.now { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(242,106,27,.22), var(--shadow); }
.wu-live { --accent: #fff; --accent-ink: #d9443d; position: fixed; left: 8px; right: 8px; bottom: calc(var(--bottom, 0px) + 70px); z-index: 30; max-width: 620px; margin: 0 auto; background: var(--hero); color: #fff; border-radius: 18px; padding: 10px 12px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }

.wl-prog { height: 4px; border-radius: 2px; background: rgba(255,255,255,.15); overflow: hidden; margin-bottom: 10px; }
.wl-prog i { display: block; height: 100%; background: var(--accent); transition: width .5s linear; }
.wl-row { display: flex; align-items: center; gap: 10px; }
.wl-fig svg { width: 64px; height: auto; display: block; border-radius: 8px; }
.wl-step { font-size: 12px; color: rgba(255,255,255,.65); }
.wl-row b { font-size: 16px; line-height: 1.2; display: block; }
.wl-dose { font-size: 13px; color: var(--accent); font-weight: 600; }
.wl-time { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.wl-time.soon { color: var(--accent); }
.wl-next { font-size: 13px; color: rgba(255,255,255,.7); margin: 6px 0 8px; }
.wl-btns { display: flex; gap: 8px; }
.wl-btns .btn { background: rgba(255,255,255,.2); color: #fff; }
.wl-btns .btn.primary { background: var(--accent); color: var(--accent-ink); flex: 1; }
.wl-btns #wl-pause { flex: 1; }
.mg-row { gap: 12px; }
.mg-date { width: 44px; text-align: center; flex: none; }
.mg-date b { display: block; font-size: 20px; line-height: 1; }
.mg-date span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mg-st { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.mg-st b { font-size: 14px; }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.dev-name { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; font-size: 18px; color: var(--ink); text-align: left; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.dev-edit { color: var(--muted); display: inline-grid; }
.dev-edit svg { width: 15px; height: 15px; }
.dev-sub { font-size: 14px; color: var(--muted); margin-top: 2px; }
.dev-nick { border: 0; background: var(--surface-2); color: var(--accent); font: inherit; font-weight: 600; padding: 2px 8px; border-radius: 8px; cursor: pointer; }
.dev-nick span { color: var(--ink-2); font-weight: 500; }
.theme-list { margin-top: 4px; }
.theme-opt { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.theme-opt.on { background: var(--surface-2); }
.th-ic { width: 28px; display: grid; place-items: center; color: var(--accent); }
.th-ic svg { width: 22px; height: 22px; }
.th-check { color: var(--accent); font-weight: 700; font-size: 18px; }
.wu-warn { display: flex; gap: 12px; align-items: flex-start; background: var(--red-bg); color: var(--ink); border: 1.5px solid var(--red); border-radius: var(--radius); padding: 12px 14px; margin: 4px 0 6px; font-size: 14px; line-height: 1.4; }
.wu-warn b { display: block; font-size: 15px; color: var(--red); margin-bottom: 2px; }
.ww-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 16px; }
/* кружки mos.ru */
.badge.mos { background: #fdeceb; color: #c8413b; font-weight: 700; }
.chip.mos.on { background: #c8413b; border-color: #c8413b; color: #fff; }
.pin.mos { background: #c8413b; } .pin.mos.has { background: #e5534b; }
.mos-card .mc-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.mos-card b { display: block; font-size: 16px; }
.mos-card .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.mc-price { margin-top: 6px; font-weight: 700; color: var(--accent); }
main.wide { max-width: 1180px; }
.mos-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.mos-t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mos-t td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mos-t .sub { font-size: 12px; color: var(--muted); }
.mos-t tr.off td { opacity: .55; }
.mos-table-wrap, .mos-seasons { overflow-x: auto; padding: 6px; }
.mos-groups { min-width: 860px; }
.mos-d { font-size: 12px; font-weight: 700; padding: 1px 5px; border-radius: 6px; background: var(--surface-2); }
.mos-d.up { color: var(--danger); background: var(--danger-bg); } .mos-d.down { color: var(--ok); background: var(--ok-bg); }
.mos-sort { display: flex; gap: 6px; flex-wrap: wrap; } .mos-sort .chip { font-size: 12px; padding: 4px 10px; }
.mos-map { height: 460px; }
.mos-pin { min-width: 46px; height: 24px; padding: 0 6px; border-radius: 12px; display: grid; place-items: center; font: 700 12px/1 system-ui, sans-serif; color: #fff; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); white-space: nowrap; }
.mos-pin.free { background: #15803d; } .mos-pin.paid { background: #f26a1b; } .mos-pin.off { background: #9a918b; }
.mos-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin: 4px 2px 0; }
.pin-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.pin-dot.free { background: #15803d; } .pin-dot.paid { background: #f26a1b; } .pin-dot.off { background: #9a918b; }
.danger-t { color: var(--danger); }
main.wide .stats { grid-template-columns: repeat(4, 1fr); }
/* v32: кружки mos.ru — ручное добавление и фильтры */
.row-input { display: flex; gap: 8px; } .row-input .input { flex: 1; min-width: 0; }
.mos-filters { display: flex; flex-direction: column; gap: 8px; }
.mos-filters .chips { margin: 0; padding: 0 0 2px; flex-wrap: wrap; overflow: visible; }
.mos-filters .chip { padding: 6px 12px; font-size: 13px; }
.mos-filters .small-sel { width: auto; flex: none; padding: 6px 28px 6px 12px; background-position: right 8px center; font-size: 13px; border-radius: 999px; }
.icon-btn.mini { width: 26px; height: 26px; font-size: 13px; display: inline-grid; place-items: center; vertical-align: middle; }
.mos-t td.nowrap { white-space: nowrap; }
/* v33: фильтры расписания и занятия кружков mos.ru */
.gfilters { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.gfilters .chips { align-items: center; }
.gf-row { display: flex; flex-wrap: wrap; gap: 6px; }
.gfilters .small-sel { width: auto; flex: none; padding: 6px 28px 6px 12px; background-position: right 8px center; font-size: 13px; border-radius: 999px; max-width: 62vw; }
.mos-info { display: flex; gap: 12px; align-items: center; }
.mos-info .sub { margin-top: 2px; }
.btn .vb-loader { transform: scale(.45); height: 44px; margin: -26px auto -20px; }
.hall-mos .row { align-items: flex-start; }
.mos-games { display: flex; gap: 12px; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
/* v34: импорт из ВК и ТГ */
.draft .draft-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.draft-text summary { cursor: pointer; color: var(--ink-2); margin-bottom: 8px; }
.draft-text pre { white-space: pre-wrap; font: inherit; font-size: 14px; background: var(--bg); border-radius: 10px; padding: 10px; margin: 0 0 10px; max-height: 260px; overflow: auto; }
.grid3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }

/* Игры рядом (главная): радиус 5 км от места и от геолокации */
.near-ask { display: grid; gap: 8px; }
.near-ask .sub { color: var(--ink-2); }
.near-ask .btn-row { margin-top: 4px; display: grid; grid-template-columns: 1fr; gap: 8px; }
.near-ask .btn-row .btn { white-space: nowrap; }
.near-skip { justify-self: start; font-size: 14px; color: var(--ink-2); }
.near-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -2px 0 12px; }
.near-bar .chip { font-size: 14px; padding: 6px 12px; min-height: 0; }
.near-r { font-size: 13px; color: var(--ink-2); font-weight: 600; margin-right: 2px; }
.near-note { margin: -4px 0 10px; color: var(--ink-2); font-size: 14px; }
.near-tag { color: var(--ink-2); }
.near-search { display: grid; gap: 10px; }
.near-search .gf-row { margin: 0; }
.near-search .link-btn { justify-self: start; font-size: 14px; }
.near-place { display: flex; align-items: center; gap: 12px; }
.reg-hall { display: grid; gap: 10px; }
.reg-hall .rh-main { color: inherit; text-decoration: none; display: grid; gap: 3px; }
.reg-hall .rh-sched { font-weight: 600; font-size: 14px; }
.reg-hall .btn-row { margin: 0; }

/* Гайды по элементам игры */
.el-fig { margin: 14px 0 6px; }
.el-fig svg { width: 100%; height: auto; display: block; border-radius: 14px; }
.el-fig figcaption { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.el-var { margin: 0; display: grid; gap: 8px; }
.el-var dt { font-weight: 700; }
.el-var dd { margin: 0; color: var(--ink-2); }
.el-steps { padding-left: 22px; display: grid; gap: 6px; }
.el-drills { list-style: none; padding: 0; display: grid; gap: 8px; }
.el-drills b { font-weight: 700; }
.el-next { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.el-next .grow { display: grid; }

.el-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.el-h h3 { margin: 0; }
.el-sh { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--surface-2, transparent); color: var(--ink-2); cursor: pointer; }
.el-sh:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.el-share-top { margin: -4px 0 4px; }
.el-share-top .share-ico, .el-share-top svg { width: 16px; height: 16px; }
.el-sh .share-ico { width: 18px; height: 18px; }
.rules-sec.el-hl { animation: el-hl 1.6s ease-out; }
@keyframes el-hl { from { box-shadow: 0 0 0 3px var(--accent); } to { box-shadow: 0 0 0 3px transparent; } }
@media (prefers-reduced-motion: reduce) { .rules-sec.el-hl { animation: none; } }

/* Табы на главной: игра на сегодня / постоянное место */
.tabs.home-mode { margin: 0 0 12px; }
.places-list .pl-del { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; font-size: 16px; color: var(--ink-2); cursor: pointer; }
.places-list .pl-del:hover { background: var(--surface-2, rgba(0,0,0,.05)); }

/* Карточка зала — одна на «Залы», карту и главную */
.hcard { display: grid; gap: 3px; padding: 14px 16px; }
.hc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.hc-name { font-size: 16.5px; font-weight: 700; line-height: 1.25; min-width: 0; }
.hcard .fav-btn { margin: -6px -8px -4px 0; padding: 6px 8px; font-size: 22px; }
.hc-where { font-size: 14px; color: var(--ink); }
.hc-addr { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-sched { font-size: 14px; font-weight: 600; margin-top: 2px; }
.hc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.hc-tag { font-size: 12.5px; line-height: 1; padding: 6px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.hc-tag.ok { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.hc-tag.warn { background: var(--warn-bg); color: var(--warn); }
.hc-tag.danger { background: var(--danger-bg); color: var(--danger); }
.hc-tag.mos { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); }
.hc-tag.dist { background: transparent; padding-left: 0; padding-right: 2px; }
.lazy-more { display: grid; place-items: center; padding: 8px 0 4px; }
.lazy-more .vb-loader { transform: scale(.55); height: 60px; }
#hf-map:not([hidden]) + * { margin-top: 0; }
.halls-map:not([hidden]) { margin-bottom: 12px; }

/* Календарь игр: сетка 7 колонок, у всех ячеек одна высота и одна раскладка */
.cal { margin: 2px 0 8px; }
.cal-dow, .cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow span { text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; padding: 0 0 4px; }
.cal-dow .we { color: var(--accent); }
.cal-d { height: 74px; display: grid; grid-template-rows: 18px 16px 16px 14px; align-content: center; justify-items: center; row-gap: 1px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); padding: 0 2px; font: inherit; cursor: pointer; min-width: 0; overflow: hidden; }
.cal-d:disabled { cursor: default; }
.cal-d.empty { background: transparent; border-style: dashed; border-color: var(--line); color: var(--muted); }
.cal-d.past { opacity: .4; }
.cal-d.other { opacity: .35; }
.cal-d.has { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.cal-d.full { background: var(--surface-2); }
.cal-d.mine { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border-color: var(--accent); }
.cal-d.sel { outline: 2.5px solid var(--accent); outline-offset: 1px; }
.cal-n { font-size: 13px; font-weight: 700; line-height: 18px; white-space: nowrap; }
.cal-n small { font-size: 10px; font-weight: 600; color: var(--accent); }
.cal-d.today .cal-n { background: var(--ink); color: var(--surface); border-radius: 999px; padding: 0 6px; }
.cal-d.today .cal-n small { color: inherit; }
.cal-m { font-size: 12px; font-weight: 700; line-height: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cal-m small { font-size: 10px; font-weight: 600; color: var(--ink-2); margin-left: 1px; }
.cal-p { font-size: 10px; line-height: 14px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -.02em; max-width: 100%; overflow: hidden; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-head b { font-size: 16px; }
.cal-sub { font-size: 12px; color: var(--muted); text-align: right; }
.cal-head .icon-btn { width: 38px; height: 38px; font-size: 22px; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--ink); cursor: pointer; }
.cal-head .icon-btn:disabled { opacity: .35; cursor: default; }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; color: var(--ink-2); margin: 0 0 10px; }
.cal-legend .lg { width: 12px; height: 12px; border-radius: 4px; display: inline-block; margin-right: -8px; border: 1px solid var(--line); }
.cal-legend .lg.has { background: var(--ok-bg); } .cal-legend .lg.full { background: var(--surface-2); } .cal-legend .lg.mine { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border-color: var(--accent); }
.games-cal { margin: 12px 0 6px; padding: 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.games-cal .cal-legend { margin-bottom: 0; }
#hall-cal { padding: 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); margin-bottom: 10px; }
#hall-cal .cal-d.empty, .games-cal .cal-d.empty { background: transparent; }
/* Дни недели и время */
.gf-when { display: grid; gap: 8px; margin-top: 8px; }
.day-chips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.day-chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 7px 0; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.day-chip.we { color: var(--accent); }
.day-chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.gf-time { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.gf-time .small-sel { flex: 1; min-width: 0; }
.rg-when { margin: 0 0 12px; }
.rg-when-cap { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.rg-when .gf-when { margin-top: 6px; }

.cal-month + .cal-month { margin-top: 14px; }
.cal-mt { font-size: 15px; font-weight: 700; margin: 2px 0 6px; }
.cal-load { display: grid; place-items: center; min-height: 120px; }
span.cal-d.other { border: 0; background: transparent; }
/* Расходы за месяц */
.spend { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.sp-cap { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.sp-row > div { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sp-row b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sp-row span { font-size: 13px; color: var(--ink-2); }
.sp-row p { margin: 1px 0 0; font-size: 12px; color: var(--muted); }
.sp-empty { font-size: 14px; color: var(--ink-2); }
#hall-spend .spend { margin: 0 0 12px; }

.day-sheet { max-height: 65vh; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.day-sheet .vb-loader { margin: 20px auto; }

/* ---------- Журнал ---------- */
.lp-top { gap: 8px; }
.lp-top .lp-brand { margin-right: auto; }
@media (max-width: 420px) { .lp-top-link { padding: 7px 10px; font-size: 14px; } .lp-brand { font-size: 16px; } }
.tb-signin { min-height: 36px; padding: 7px 14px; border-radius: 10px; font-size: 14px; flex: none; }
.j-tabs { margin-bottom: 14px; }
.j-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.j-src { font-weight: 600; color: var(--ink-2); }
.j-views { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.j-eye { width: 14px; height: 14px; }
.j-title { display: block; font-size: 16px; line-height: 1.3; }
.j-sum { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.j-thumb { flex: none; width: 84px; height: 84px; object-fit: cover; border-radius: 12px; background: var(--surface-2); }
.j-article .j-h { font-size: 22px; line-height: 1.25; margin: 4px 0 12px; }
.j-article p { line-height: 1.55; }
.j-img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 14px; margin-bottom: 12px; background: var(--surface-2); }
.j-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; border: 1.5px solid var(--accent); }
.j-cta .grow { flex: 1 1 220px; }
.j-cta .sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.j-cta .btn { flex: 1 1 auto; }
.j-match { gap: 12px; }
.j-time { flex: none; width: 48px; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); }

.guest-gate { text-align: center; padding: 28px 20px 20px; }
.guest-gate .big { font-size: 44px; margin-bottom: 6px; }
.guest-gate h2 { font-size: 22px; margin: 0 0 8px; }
.guest-gate p { color: var(--muted); line-height: 1.5; margin: 0 0 18px; }

/* Новости: раскрытие на месте */
.j-lead { margin: -2px 4px 12px; color: var(--muted); font-size: 15px; }
.j-news { padding: 0; overflow: hidden; }
.j-head { display: flex; gap: 12px; align-items: flex-start; padding: 16px; cursor: pointer; }
.j-head > .grow { flex: 1; min-width: 0; } /* картинка всегда у правого края, даже при коротком анонсе */
.j-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--radius); }
.j-fav { width: 16px; height: 16px; border-radius: 4px; flex: none; }
.j-body { display: none; padding: 0 16px 16px; }
.j-news.open .j-body { display: block; }
.j-news.open .j-sum, .j-news.open .j-thumb { display: none; }
.j-fig { margin: 0 0 12px; }
.j-fig img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: var(--surface-2); display: block; }
.j-fig figcaption { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.j-cite { font-size: 12.5px; color: var(--muted); margin: 10px 0 14px; line-height: 1.45; }
.j-cite a { color: inherit; }
.src-list { list-style: none; padding: 0; margin: 0 0 6px; }
.src-list li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.45; }
.src-list li:last-child { border-bottom: 0; }
.src-list .what { display: block; font-size: 12.5px; color: var(--muted); }
.src-list a { color: inherit; }
.src-list img { width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }

/* Календарь на узком экране: ячейки ниже, без цены — главное время начала и конца */
@media (max-width: 430px) {
  .cal-dow, .cal-days { gap: 3px; }
  .cal-d { height: 52px; grid-template-rows: 17px 14px 14px; border-radius: 9px; }
  .cal-d .cal-p { display: none; }
  .cal-n { font-size: 12.5px; }
  .cal-m { font-size: 10.5px; line-height: 14px; letter-spacing: -.03em; }
  .cal-m small { font-size: 9px; }
}
/* Посмотреть: идущие матчи */
.pro-teams-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.pro-live { display: block; border: 1.5px solid color-mix(in srgb, var(--red) 45%, transparent); }
.pl-top { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.pl-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 10px 0 4px; }
.pl-teams b { font-size: 15px; line-height: 1.25; }
.pl-teams b:last-child { text-align: right; }
.pl-score { font: 800 26px/1 var(--display, inherit); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.pl-sets { text-align: center; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 2px; animation: livep 1.6s ease-in-out infinite; vertical-align: 1px; }
@keyframes livep { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.j-match.is-live .j-time b { color: var(--red); }
.pro-star { color: var(--accent); margin-right: 2px; }
.pt-list { max-height: 55vh; overflow: auto; margin-top: 10px; }
.pt-row { padding: 0; }
.pt-pick { border: 0; background: none; text-align: left; padding: 12px 14px; font: inherit; color: inherit; cursor: pointer; }
.pt-fav { border: 0; background: none; font-size: 22px; padding: 6px 14px; cursor: pointer; color: var(--muted); }
.pt-fav.on { color: var(--accent); }
.j-text p { margin: 0 0 10px; line-height: 1.55; font-size: 15.5px; }

/* Правовые документы */
.legal { line-height: 1.6; font-size: 15px; }
.legal h2 { font-size: 17px; margin: 20px 0 6px; }
.legal p { margin: 0 0 10px; }
.legal ul { margin: 0 0 10px; padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 10px; font-size: 12.5px; }
.legal-links a { color: var(--muted); }
.lp-foot { flex-wrap: wrap; }
.lp-foot .legal-links { flex-basis: 100%; }
.consent-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; margin: 4px 0 14px; cursor: pointer; }
.consent-check input { width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--accent); }
.legal-note { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin: 10px 0 0; }
.legal-note a, .consent-check a { color: inherit; text-decoration: underline; }
.cookie-bar { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 60; display: flex; gap: 12px; align-items: center;
  max-width: 560px; margin: 0 auto; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: 0 6px 24px rgba(0,0,0,.18); font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.cookie-bar a { color: inherit; }
.cookie-bar .btn { min-height: 38px; padding: 8px 14px; flex: none; }
/* Календарь «Мои игры»: один месяц, крупные ячейки — на телефоне читается без увеличения */
.mcal { margin: 12px 0 10px; padding: 12px 10px 10px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.mc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 10px; }
.mc-head b { display: block; font-size: 17px; }
.mc-sub { display: block; font-size: 13px; color: var(--muted); margin-top: 1px; }
.mc-nav { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.mc-nav span { min-width: 86px; text-align: center; font-weight: 600; font-size: 15px; }
.mc-nav button { width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.mc-nav button:disabled { opacity: .3; cursor: default; }
.mc-dow, .mc-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.mc-dow span { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding-bottom: 4px; }
.mc-dow .we { color: var(--accent); }
.mc-d { position: relative; height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; border-radius: 12px; background: transparent; padding: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.mc-n { font-size: 15px; font-weight: 600; line-height: 1; }
.mc-d.past { color: var(--muted); }
.mc-d.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.mc-d.today .mc-n { color: var(--accent); font-weight: 800; }
.mc-d.on { background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.mc-d.on.today { box-shadow: inset 0 0 0 2px var(--ink); }
.mc-d.on .mc-n { color: inherit; }
.mc-d.on:active { transform: scale(.94); }
.mc-t { font-size: 10.5px; font-weight: 700; line-height: 1; letter-spacing: -.02em; opacity: .92; }
.mc-more { position: absolute; top: 3px; right: 4px; font-size: 9px; font-style: normal; font-weight: 800; line-height: 1; }
@media (min-width: 520px) { .mc-d { height: 56px; } .mc-n { font-size: 16px; } .mc-t { font-size: 12px; } }
#my-spend .spend { margin-bottom: 12px; }
/* Посмотреть: прямая трансляция, завершённый матч, результаты */
.pl-link { color: var(--red); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.pl-end { font-weight: 700; color: var(--ink); }
.pl-trn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pro-live.is-done { border-color: var(--line); }
.pro-seg { margin: 14px 0 4px; }
.pro-seg button { flex: 1; border: 0; background: transparent; cursor: pointer; }
.j-res .j-time b { color: var(--ink); }
.j-win { color: var(--ink); }
.j-teams { color: var(--ink-2); }
.j-teams .j-win { font-weight: 700; color: var(--ink); }
/* Предупреждение о переходе на внешний сайт */
.ext-host { display: inline-block; max-width: 100%; padding: 2px 8px; border-radius: 8px; background: var(--surface-2); font-weight: 600; word-break: break-all; }
.ext-url { font-size: 13px; color: var(--muted); word-break: break-all; margin: 6px 0 14px; }
.seg button { flex: 1; border: 0; background: transparent; cursor: pointer; text-align: center; padding: 9px 6px; border-radius: 9px; font-weight: 600; font-size: 15px; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
/* Подсказка «Установить на экран Домой»: та же плашка, что о cookie, с шагами */
.inst-bar { display: block; padding: 12px 14px 12px; z-index: 61; }
.ib-top { display: flex; align-items: center; gap: 10px; }
.ib-top img { width: 38px; height: 38px; border-radius: 10px; flex: none; }
.ib-top b { display: block; font-size: 15px; color: var(--ink); }
.ib-top span { display: block; font-size: 12px; color: var(--muted); }
.ib-x { flex: none; width: 32px; height: 32px; margin: -6px -6px 0 0; border: 0; background: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.ib-why { margin: 8px 0 0; }
.ib-step { display: flex; gap: 12px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); animation: ib-in .25s ease; }
.ib-step p { margin: 0; color: var(--ink); font-size: 14px; }
.ib-step p svg { width: 17px; height: 17px; vertical-align: -3px; color: var(--accent); }
.ib-n { display: block; font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 1px; }
.ib-ico { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface); color: #0a84ff; box-shadow: var(--shadow); }
.ib-ico svg { width: 24px; height: 24px; }
.ib-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.ib-dots { display: flex; gap: 5px; }
.ib-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .2s; }
.ib-dots i.on { width: 16px; background: var(--accent); }
.ib-btns { display: flex; gap: 8px; }
@keyframes ib-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
/* стрелка к кнопке браузера: «Поделиться» внизу в Safari, ⋮ вверху справа в Chrome */
.inst-arrow { position: fixed; z-index: 62; display: none; width: 44px; height: 44px; border-radius: 50%; place-items: center; background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.25); pointer-events: none; }
.inst-arrow svg { width: 26px; height: 26px; }
.inst-arrow.on { display: grid; }
.inst-arrow.down { left: calc(50% - 22px); bottom: calc(env(safe-area-inset-bottom) + 6px); animation: ib-bob-d 1.1s ease-in-out infinite; }
.inst-arrow.down-right { right: 14px; bottom: calc(env(safe-area-inset-bottom) + 6px); animation: ib-bob-d 1.1s ease-in-out infinite; }
.inst-arrow.up-right { right: 14px; top: calc(env(safe-area-inset-top) + 6px); transform: rotate(180deg); animation: ib-bob-u 1.1s ease-in-out infinite; }
@keyframes ib-bob-d { 50% { transform: translateY(6px); } }
@keyframes ib-bob-u { 0%, 100% { transform: rotate(180deg); } 50% { transform: rotate(180deg) translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .inst-arrow, .ib-step { animation: none !important; } .inst-arrow.up-right { transform: rotate(180deg); } }
/* Вход из Telegram, подключение чата, лист ожидания, путь пользователя */
.tgm { text-align: center; padding: 22px 18px; }
.tgm-ic { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 16px; display: grid; place-items: center; background: #2aabee; color: #fff; font-size: 28px; }
.tgm-ic svg { width: 30px; height: 30px; }
.tgm h2 { font-size: 20px; margin-bottom: 8px; }
.tgm p { color: var(--ink-2); margin: 0 0 14px; }
.tgm .consent-check { text-align: left; }
.tgc-step { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tgc-step b { display: block; margin-bottom: 6px; }
.tgc-step .sub { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.tgc-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.tgc-times { flex-wrap: wrap; overflow: visible; }
.switch-row { display: flex; gap: 10px; align-items: center; line-height: 1.6; }
.switch-row input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.wait-card { display: flex; gap: 10px; align-items: center; border: 1.5px solid var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ev-sum { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.ev-sum span { display: block; font-size: 12px; color: var(--muted); }
.ev-sum b { font-weight: 600; font-size: 14.5px; }
.ev-list .row { align-items: flex-start; }
.ev-t { flex: none; width: 92px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }

.book-note { font-size: 12.5px; line-height: 1.4; color: var(--muted); margin: 8px 2px 0; }
.book-note a { color: inherit; }
.net-max { display: inline-flex; width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg,#3b5bff,#8a3dff); color: #fff; align-items: center; justify-content: center; flex: none; }
.net-max svg { width: 16px; height: 16px; }
.tg-groups + .card h3, .sheet h3 { margin: 14px 0 6px; font-size: 16px; }

/* Единые состояния ошибок */
.error-state{width:min(calc(100% - 32px),460px);margin:32px auto;padding:28px 22px;text-align:center;color:var(--ink);background:var(--surface);border:1px solid color-mix(in srgb,var(--danger) 22%,transparent);border-radius:var(--radius);box-shadow:var(--shadow)}
.error-state__icon{font-size:40px;line-height:1;margin-bottom:12px}.error-state h2{margin:0 0 8px;font-size:20px}.error-state p{margin:0 auto;max-width:360px;color:var(--muted);line-height:1.5}.error-state .btn{margin-top:18px}.toast.err{border:1px solid color-mix(in srgb,#fff 22%,var(--danger))}
@media (prefers-reduced-motion:reduce){.toast{transition:none}}

.hall-yandex{margin:0 0 12px}.yandex-gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;border-radius:16px;overflow:hidden}.yandex-gallery a{display:block;aspect-ratio:1.35;background:var(--surface-2)}.yandex-gallery img{width:100%;height:100%;object-fit:cover}.yandex-source{display:block;margin:8px 2px;color:var(--accent);font-size:13px}.hall-tabs{display:flex;gap:6px;margin:10px 0;border-bottom:1px solid var(--line)}.hall-tab{flex:1;border:0;background:none;padding:10px 6px;color:var(--muted);font:inherit;text-align:center;text-decoration:none}.hall-tab.active{color:var(--accent);font-weight:700;border-bottom:2px solid var(--accent)}.hall-reviews{display:grid;gap:8px}.yandex-review{padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.yandex-review-head{display:flex;justify-content:space-between;margin-bottom:5px}.yandex-review-head span{color:#f2b705}.yandex-empty{padding:18px 8px}
/* Hall photo slider and internal lightbox */
.hall-yandex{width:100vw;margin:0 0 14px;position:relative;left:50%;transform:translateX(-50%);overflow:hidden}
.yandex-gallery{width:100%;border-radius:0;overflow:hidden;background:var(--surface-2)}
.yandex-slider{position:relative;width:100%;background:#111}
.yandex-slides{width:100%;aspect-ratio:16/9;max-height:58vh;min-height:190px}
.yandex-slide{display:none;width:100%;height:100%;padding:0;border:0;background:#111;cursor:zoom-in}
.yandex-slide.active{display:block}
.yandex-slide img{display:block;width:100%;height:100%;object-fit:cover}
.yandex-dots{position:absolute;left:0;right:0;bottom:12px;display:flex;justify-content:center;gap:7px;z-index:2}
.yandex-dot{width:9px;height:9px;padding:0;border:1px solid rgba(255,255,255,.9);border-radius:50%;background:rgba(0,0,0,.3);cursor:pointer}
.yandex-dot.active{background:#fff}
.hall-photo-modal{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:2.5vw;background:rgba(0,0,0,.82);cursor:pointer}
.hall-photo-modal-card{position:relative;width:95vw;max-width:1280px;max-height:95vh;padding:12px;border-radius:18px;background:var(--surface);box-shadow:0 20px 70px rgba(0,0,0,.45);cursor:default}
.hall-photo-view{position:relative;display:flex;align-items:center;justify-content:center;min-height:180px;border-radius:12px;overflow:hidden;background:#111}
.hall-photo-modal-img{display:block;width:100%;max-height:78vh;object-fit:contain}
.hall-photo-close{position:absolute;right:18px;top:18px;z-index:3;width:38px;height:38px;border:0;border-radius:50%;background:rgba(0,0,0,.62);color:#fff;font-size:30px;line-height:1;cursor:pointer}
.hall-photo-nav{position:absolute;top:50%;z-index:2;transform:translateY(-50%);width:40px;height:48px;border:0;border-radius:12px;background:rgba(0,0,0,.55);color:#fff;font-size:36px;line-height:1;cursor:pointer}
.hall-photo-nav.prev{left:12px}.hall-photo-nav.next{right:12px}
.hall-photo-modal-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 2px 0;color:var(--muted);font-size:13px}
.hall-photo-modal-footer .yandex-source{margin:0;color:var(--accent);font-size:13px}
@media (max-width:600px){.yandex-slides{min-height:170px}.hall-photo-modal{padding:2.5vw}.hall-photo-modal-card{padding:8px;border-radius:14px}.hall-photo-close{right:12px;top:12px}.hall-photo-nav{width:34px;height:42px}.hall-photo-modal-footer{font-size:12px}}
/* Keep hall slider inside the existing max-width content column */
.hall-yandex{width:100%;margin:0 0 14px;position:relative;left:auto;transform:none;overflow:hidden}
.yandex-gallery{width:100%;max-width:100%;border-radius:16px;overflow:hidden}
.yandex-slider{width:100%;max-width:100%;margin:0 auto}
.yandex-slides{width:100%;height:auto;aspect-ratio:16/9;max-height:none;min-height:0}
.yandex-slide,.yandex-slide.active{width:100%;height:100%;min-width:100%;display:block}
.yandex-slide:not(.active){display:none}
.yandex-slide img{display:block;width:100%;height:100%;object-fit:cover}
/* Override the legacy thumbnail grid: the hall gallery is a single centered slider */
.hall-yandex .yandex-gallery{display:block;grid-template-columns:none;grid-auto-flow:initial}
.hall-yandex .yandex-slider{display:block}
.hall-yandex .yandex-slides{display:block}
.hall-yandex .yandex-slide.active{display:block}
.hall-yandex .yandex-slide{position:relative}
.hall-photo-delete{position:absolute;right:12px;top:12px;z-index:3;border:0;border-radius:10px;padding:8px 11px;background:rgba(120,24,20,.88);color:#fff;font-size:12px;font-weight:700;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.28)}
.hall-photo-delete:hover{background:var(--danger,#c92a2a)}
