/* GTO for лудиков. Три темы оформления, выбираются в профиле:
   club  — «Клуб»: тёплый почти чёрный фон, зелёное сукно, латунь;
   final — «Финальный стол»: графика телетрансляции, чёрный и оранжевый, острые углы;
   light — «Светлый клуб»: светлая тема для занятий днём.
   Общие правила: один шрифт (Manrope) без курсива и без жирности выше 700, плоские фоны
   с лёгким зерном, один акцент на тему, шкала размеров и скруглений как в Tailwind,
   одна кривая анимаций. Стол — иллюстрация: на сукне оставлен мягкий свет лампы. */

@font-face { font-family: "Manrope"; src: url("/static/fonts/Manrope.ttf") format("truetype"); font-weight: 200 800; font-display: swap }

/* ================= темы ================= */
:root {
  --ease: cubic-bezier(.22, 1, .36, 1);
  --t-move: .5s; --t-color: .3s; --t-press: .2s;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: var(--font); --body: var(--font); --display-style: normal; --display-weight: 700;
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --grain-opacity: .045;
  --h1-from: #ffffff; --h1-to: #9b9b9b;
}
:root, [data-theme="club"] {
  color-scheme: dark;
  --bg: #131209;
  --panel: color-mix(in srgb, #131209, #f3ead2 5%); --panel2: color-mix(in srgb, #131209, #f3ead2 9%); --sunk: #0e0d07;
  --line: rgba(236, 229, 211, .10); --line2: rgba(236, 229, 211, .20);
  --text: #ece5d3; --muted: #a29d8c;
  --accent: #d4b06a; --accent-hi: #e6c98a; --accent-ink: #1f1606;
  --violet: #d4b06a;                         /* второй акцент убран: предупреждения тем же цветом */
  --go: #d4b06a; --go-ink: #241806;          /* олл-ин, колл — латунь */
  --agg: #c45a4c; --agg-ink: #fff3ee;        /* рейз — красная фишка */
  --fold: transparent; --fold-cell: #2b2a20;
  --shade2: #8fc7b0; --shade3: #d9a0b8; --shade4: #8fb4e8;   /* оттенки действий в матрице — данные, не акцент */
  --good: #8fd3ad; --bad: #e0705f;
  --felt: #1d5a4a; --felt2: #0f3129; --felt-line: rgba(212, 176, 106, .45);
  --rail: #3a2418;
  --card: #f7f1e3; --card-ink: #1c1c1c;
  --suit-h: #b3262f; --suit-d: #2457a8; --suit-c: #1d7044;
  --seat: #1f2a22; --seat-ink: #f1ebdb; --seat-folded: #161a14;
  --hero: #d4b06a; --hero-ink: #1f1606;
  --chip-face: #c8423b; --chip-edge: #f3eadb;
  --r-s: 6px; --r-m: 12px; --r-l: 16px; --r-btn: 12px;
  --btn-shape: none;
  --shadow: 0 16px 40px -24px rgba(8, 7, 2, .9);
  --top-h: 64px; --nav-h: 64px;
}
[data-theme="final"] {
  color-scheme: dark;
  --bg: #000000;
  --panel: #1f1f1f; --panel2: #272727; --sunk: #181818;
  --line: rgba(255, 255, 255, .09); --line2: rgba(255, 255, 255, .20);
  --text: #f4f4f4; --muted: #9b9b9b;
  --accent: #e86847; --accent-hi: #eb9060; --accent-ink: #ffffff;
  --violet: #e86847;
  --go: #e86847; --go-ink: #ffffff;
  --agg: #2fd8c4; --agg-ink: #04201d;
  --fold: transparent; --fold-cell: #313131;
  --shade2: #ebbb5b; --shade3: #b08fe0; --shade4: #6fa8e0;
  --good: #2fd8c4; --bad: #eb617a;
  --felt: #22307a; --felt2: #0c1236; --felt-line: rgba(255, 255, 255, .35);
  --rail: #272727;
  --card: #ffffff; --card-ink: #111111;
  --suit-h: #e33720; --suit-d: #456ee8; --suit-c: #0f8f55;
  --seat: #1f1f1f; --seat-ink: #f4f4f4; --seat-folded: #181818;
  --hero: #e86847; --hero-ink: #ffffff;
  --chip-face: #e86847; --chip-edge: #ffffff;
  --r-s: 2px; --r-m: 2px; --r-l: 4px; --r-btn: 0;
  --btn-shape: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  --shadow: 0 20px 48px -26px rgba(0, 0, 0, .95);
  --top-h: 64px; --nav-h: 64px;
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #e8ece8;
  --panel: #f9faf7; --panel2: #eef2ee; --sunk: #e3e8e4;
  --line: rgba(23, 38, 31, .10); --line2: rgba(23, 38, 31, .22);
  --text: #17261f; --muted: #5f6f67;
  --accent: #1f5a47; --accent-hi: #2c6a55; --accent-ink: #ffffff;
  --violet: #1f5a47;
  --go: #c23b2e; --go-ink: #ffffff;
  --agg: #2a7f6a; --agg-ink: #ffffff;
  --fold: transparent; --fold-cell: #dfe5e0;
  --shade2: #c48a2c; --shade3: #7b5cc4; --shade4: #2f7bc4;
  --good: #227a5e; --bad: #c23b2e;
  --felt: #2f6f59; --felt2: #1f4e3f; --felt-line: rgba(255, 255, 255, .25);
  --rail: #23302a;
  --card: #ffffff; --card-ink: #1b1b1b;
  --suit-h: #c2272d; --suit-d: #2459b3; --suit-c: #1e7a48;
  --seat: #ffffff; --seat-ink: #17261f; --seat-folded: #eef1ee;
  --hero: #17261f; --hero-ink: #ffffff;
  --chip-face: #c23b2e; --chip-edge: #ffffff;
  --r-s: 6px; --r-m: 12px; --r-l: 16px; --r-btn: 12px;
  --btn-shape: none;
  --shadow: 0 16px 36px -26px rgba(20, 40, 30, .5);
  --grain-opacity: .06;
  --h1-from: #000000; --h1-to: #666666;
  --top-h: 64px; --nav-h: 64px;
}

/* ================= основа ================= */
* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; background: var(--bg) }
body {
  margin: 0; color: var(--text); min-height: 100dvh; background: var(--bg);
  font: 500 16px/1.5 var(--body); -webkit-tap-highlight-color: transparent;
}
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; background: var(--grain); opacity: var(--grain-opacity) }
.shell { position: relative; z-index: 1 }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance }
p, li { text-wrap: pretty }
h1 { font: 700 1.875rem/2.25rem var(--display); letter-spacing: -.025em;
  background: linear-gradient(90deg, var(--h1-from), var(--h1-to)); -webkit-background-clip: text; background-clip: text; color: transparent }
h2 { font: 700 1.25rem/1.75rem var(--display); letter-spacing: -.015em }
h3 { font-size: .875rem; color: var(--muted); font-weight: 600 }
p { margin: 0 }
a { color: var(--accent-hi); text-underline-offset: 3px }
[data-theme="light"] a { color: var(--accent) }
button, input, select { font: inherit; color: inherit }
.boot { padding: 3rem 1rem; text-align: center; color: var(--muted) }
.num { font-variant-numeric: tabular-nums lining-nums }
.muted { color: var(--muted) }
.small { font-size: .75rem }
.hidden { display: none !important }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; border-radius: 6px }
[data-theme="light"] :focus-visible { outline-color: var(--accent) }

/* ================= каркас ================= */
.shell { min-height: 100dvh }
.top {
  display: flex; align-items: center; gap: .8rem; height: calc(var(--top-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 1rem 0; position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; white-space: nowrap;
  font: var(--display-style) var(--display-weight) 1.125rem var(--display); letter-spacing: -.005em }
.brand img { width: 30px; height: 30px }
.brand-2 { font-weight: 500; color: var(--accent-hi) }
[data-theme="light"] .brand-2 { color: var(--accent) }
.top-right { margin-left: auto; display: flex; align-items: center; gap: .8rem; min-width: 0 }
.live { display: inline-flex; align-items: center; gap: .45rem; font-size: .75rem; color: var(--muted); white-space: nowrap }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent) }
.who {
  display: flex; align-items: center; gap: .45rem; color: var(--text); font-size: .875rem; text-decoration: none;
  padding: .25rem .7rem .25rem .3rem; border-radius: 999px; border: 1px solid var(--line); min-height: 38px; max-width: 46vw;
}
.who .ico { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--panel2); color: var(--accent-hi) }
[data-theme="light"] .who .ico { background: var(--accent); color: #fff }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.who.on, .who:hover { border-color: var(--line2) }
[data-theme="final"] .who { border-radius: 0; clip-path: var(--btn-shape); border: 0; background: var(--panel2); padding-left: .6rem; padding-right: .9rem }
[data-theme="final"] .who .ico { background: none }
@media (max-width: 420px) { .who span { display: none } .who { padding: .25rem } .live { display: none } }

main {
  width: 100%; max-width: 680px; margin: 0 auto; display: grid; gap: 1.1rem; align-content: start;
  padding: 1.1rem 1rem calc(var(--nav-h) + env(safe-area-inset-bottom) + 1.5rem);
}
main.page-team, main.page-stats, main.page-solver, main.page-imports { max-width: 900px }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--bg) 90%, transparent); border-top: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.tabs a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0;
  text-decoration: none; color: var(--muted); font-size: .75rem; font-weight: 500; position: relative;
}
.tabs a .ico { width: 21px; height: 21px }
.tabs a.extra { display: none }
.tabs a.on { color: var(--accent-hi); font-weight: 600 }
[data-theme="light"] .tabs a.on { color: var(--text) }
.tabs a.on::before { content: ""; position: absolute; top: -1px; width: 26px; height: 2px; border-radius: 2px; background: var(--accent) }

@media (min-width: 960px) {
  .top { padding: 0 1.6rem }
  .tabs {
    top: 0; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); height: var(--top-h); padding: 0;
    background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; gap: .2rem; align-items: center;
  }
  .tabs a { flex: none; flex-direction: row; gap: .5rem; padding: .5rem .9rem; font-size: .875rem; font-weight: 500; border-radius: 999px }
  .tabs a .ico { width: 19px; height: 19px }
  .tabs a.extra { display: flex }
  .tabs a[href="#/account"] { display: none }
  .tabs a:hover { color: var(--text) }
  .tabs a.on::before { display: none }
  .tabs a.on { color: var(--text); background: color-mix(in srgb, var(--accent) 15%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent) }
  .tabs a.on .ico { color: var(--accent-hi) }
  [data-theme="light"] .tabs a.on { background: var(--text); color: #fff; box-shadow: none }
  [data-theme="light"] .tabs a.on .ico { color: #fff }
  [data-theme="final"] .tabs { height: var(--top-h) }
  [data-theme="final"] .tabs a { border-radius: 0; height: var(--top-h); font-weight: 600 }
  [data-theme="final"] .tabs a.on { background: none; box-shadow: none }
  [data-theme="final"] .tabs a.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; background: var(--accent) }
  main { padding: 2rem 1.6rem 3.5rem; max-width: 760px }
}
/* вкладки занимают место между логотипом и правой группой шапки; ширины считает fitTop() в app.js,
   и если подписи не помещаются, вкладки становятся значками (.compact), а затем прячутся часы сессии (.tight) */
@media (min-width: 960px) {
  .tabs { left: var(--top-left, 260px); right: var(--top-right, 520px); transform: none; justify-content: center; overflow: hidden }
  .tabs.compact a span { display: none }
  .tabs.compact a { padding: .55rem .7rem }
  .top.tight .live { display: none }
}
/* шапка: в середине вкладки, справа опыт, отзыв, поддержка и профиль — на средних экранах прячем часы сессии */

/* ================= базовые элементы ================= */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); padding: 1.2rem;
  display: grid; gap: .9rem; min-width: 0; box-shadow: var(--shadow);
}
[data-theme="club"] .card { background: color-mix(in srgb, var(--panel) 86%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px) }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center }
.row.spread { justify-content: space-between }
.grid2 { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) }
.stack { display: grid; gap: 1rem; min-width: 0 }
.field { display: grid; gap: .4rem; font-size: .75rem; color: var(--muted); font-weight: 500; min-width: 0 }
input[type=text], input[type=password], input[type=number], input[type=url], input[type=search], textarea, select {
  width: 100%; padding: .65rem .85rem; border-radius: var(--r-m); border: 1px solid var(--line2);
  background: var(--sunk); color: var(--text); min-height: 46px; transition: border-color .3s var(--ease);
}
input:hover, select:hover, textarea:hover { border-color: var(--accent) }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent }
input[type=range] { width: 100%; accent-color: var(--accent); min-height: 36px }

.btn {
  border: 1px solid var(--line2); background: var(--panel2); border-radius: var(--r-btn); padding: .6rem 1.1rem;
  min-height: 46px; font-weight: 600; cursor: pointer; transition: transform .2s var(--ease), filter .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem; text-decoration: none; color: var(--text);
}
.btn:hover { border-color: var(--accent) }
.btn:active { transform: scale(.975) }
.btn:disabled { opacity: .5; cursor: default; transform: none; filter: none }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent }
.btn.primary:hover { filter: brightness(1.08) }
[data-theme="club"] .btn.primary { background: var(--accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 10px 24px -10px rgba(212, 176, 106, .7) }
[data-theme="final"] .btn.primary { background: var(--accent) }
.btn.next { width: 100%; min-height: 54px; font-size: 1rem }
.btn.ghost { background: none }
.btn.danger { color: var(--bad) }
.btn.sm { min-height: 36px; padding: .3rem .8rem; font-size: .75rem; border-radius: calc(var(--r-btn) * .75) }
.btn kbd { font: 500 .75rem var(--body); opacity: .6; margin-left: .35rem; border: 1px solid currentColor; border-radius: 4px; padding: 0 .3rem }
@media (hover: none) { .btn kbd { display: none } }
[data-theme="final"] .btn { border: 0; clip-path: var(--btn-shape); padding-left: 1.4rem; padding-right: 1.4rem; font-weight: 700 }
[data-theme="final"] .btn.ghost { background: rgba(255, 255, 255, .06) }
[data-theme="final"] .btn:hover { filter: brightness(1.15) }

.chips { display: flex; flex-wrap: wrap; gap: .4rem }
.chip {
  border: 1px solid var(--line2); background: transparent; border-radius: 999px; padding: .4rem .9rem;
  min-height: 40px; min-width: 44px; cursor: pointer; font-weight: 500; font-size: .875rem; color: var(--muted);
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--text) }
.chip.on { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: var(--accent); color: var(--text) }
[data-theme="light"] .chip.on { background: var(--text); border-color: var(--text); color: #fff }
[data-theme="final"] .chip { border-radius: 0; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); border: 0; background: rgba(255, 255, 255, .07); padding: .4rem 1rem }
[data-theme="final"] .chip.on { background: var(--text); color: #000000; font-weight: 700 }

/* переключатели режимов */
.segmented { display: flex; gap: 1.6rem; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none }
.segmented::-webkit-scrollbar { display: none }
.segmented button {
  border: 0; background: none; padding: .35rem 0 .75rem; min-height: 40px; font-weight: 500; font-size: .875rem;
  color: var(--muted); cursor: pointer; position: relative; white-space: nowrap;
}
.segmented button:hover { color: var(--text) }
.segmented button.on { color: var(--text) }
.segmented button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent) }
[data-theme="light"] .segmented { display: inline-flex; justify-self: start; max-width: 100%; gap: 4px; border: 0; padding: 4px; border-radius: 13px; background: var(--panel); box-shadow: 0 0 0 1px var(--line) }
[data-theme="light"] .segmented button { padding: .45rem 1rem; border-radius: 8px; min-height: 38px }
[data-theme="light"] .segmented button.on { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .14) }
[data-theme="light"] .segmented button.on::after { display: none }
[data-theme="final"] .segmented { gap: 6px; border: 0 }
[data-theme="final"] .segmented button { padding: .55rem 1.1rem; font-weight: 700; background: rgba(255, 255, 255, .06) }
[data-theme="final"] .segmented button > * { display: inline-block }
[data-theme="final"] .segmented button.on { background: var(--text); color: #000000 }
[data-theme="final"] .segmented button.on::after { display: none }
.segmented .count:not(:empty) { margin-left: .4rem; padding: 0 .45rem; background: var(--bad); color: #fff; font-size: .75rem; font-weight: 600; border-radius: 999px; vertical-align: 1px }

.msg { padding: .75rem .9rem; border-radius: var(--r-m); font-size: .875rem; border: 1px solid }
.msg.err { background: color-mix(in srgb, var(--bad) 14%, var(--panel)); color: var(--text); border-color: color-mix(in srgb, var(--bad) 45%, transparent) }
.msg.ok { background: color-mix(in srgb, var(--good) 14%, var(--panel)); color: var(--text); border-color: color-mix(in srgb, var(--good) 45%, transparent) }
.msg.warn { background: color-mix(in srgb, var(--violet) 12%, var(--panel)); color: var(--text); border-color: color-mix(in srgb, var(--violet) 40%, transparent) }
.link-box { word-break: break-all; background: var(--sunk); border: 1px dashed var(--line2); border-radius: var(--r-m); padding: .65rem .75rem; font-size: .75rem }

details.card > summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: .55rem; min-height: 28px }
details.card > summary::-webkit-details-marker { display: none }
details.card > summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .3s }
details.card[open] > summary::after { transform: rotate(-135deg) }
details.card > summary .ico { color: var(--muted) }

.tag { font-size: .75rem; padding: .12rem .55rem; border-radius: 999px; border: 1px solid var(--line2); color: var(--muted); white-space: nowrap }
.tag.admin, .tag.open { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent) }
.tag.off { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent) }
[data-theme="final"] .tag { border-radius: 0 }

/* ================= вход ================= */
.auth { max-width: 420px; margin: 9vh auto 0; width: 100%; padding: 0 1rem 2rem; display: grid; gap: 1.4rem }
.auth .brand { justify-content: center; font-size: 1.5rem }
.auth .brand img { width: 46px; height: 46px }
.auth .card { padding: 1.5rem }
.auth p.small { text-align: center }
form { display: grid; gap: .9rem }

/* ================= тренажёр ================= */
.hud { display: grid; gap: .8rem; position: relative }
.xp { display: grid; gap: .45rem; padding-right: 50px; position: relative }
.xp-line { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; font-size: .75rem; color: var(--muted) }
.xp-line b, .xp-line strong { color: var(--text); font-weight: 600 }
.xp-bar { height: 5px; border-radius: 6px; background: color-mix(in srgb, var(--text) 9%, transparent); overflow: hidden }
.xp-bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--accent); transition: width .5s var(--ease) }
[data-theme="final"] .xp-bar { border-radius: 0; height: 6px }
[data-theme="final"] .xp-bar i { border-radius: 0 }
[data-theme="light"] .xp-bar i { background: var(--accent) }
.hud-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem }
.hud-tile { min-width: 0; display: grid }
.hud-tile b { font: var(--display-style) var(--display-weight) 1.875rem/2.25rem var(--display); font-variant-numeric: lining-nums tabular-nums }
.hud-tile span { font-size: .75rem; color: var(--muted); margin-top: .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.hud-tile.hot b { color: var(--accent-hi) }
[data-theme="light"] .hud-tile.hot b { color: var(--go) }
[data-theme="final"] .hud { background: var(--panel); border: 1px solid var(--line); padding: .9rem 1rem }
[data-theme="light"] .hud { background: var(--panel); border-radius: var(--r-l); padding: 1rem 1.1rem; box-shadow: 0 0 0 1px var(--line) }
.mute {
  position: absolute; right: 0; top: -4px; width: 40px; height: 40px; display: grid; place-items: center; z-index: 2;
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; border-radius: 50%;
}
.mute:hover { color: var(--text); border-color: var(--line2) }
.mute[aria-pressed="true"] { color: var(--bad) }
[data-theme="final"] .mute { border-radius: 0; top: 0; right: .2rem }
[data-theme="final"] .hud .mute { top: .7rem; right: .8rem }
[data-theme="light"] .hud .mute { top: .8rem; right: .9rem }
.xp-float { position: absolute; right: 54px; top: -6px; font-weight: 700; font-size: .875rem; color: var(--accent-hi); pointer-events: none }
.score { display: flex; justify-content: center; gap: .4rem; flex-wrap: wrap }
.score span { display: inline-flex; align-items: baseline; gap: .35rem; padding: .25rem .75rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: .75rem }
.score b { font: var(--display-style) var(--display-weight) 1rem/1.5rem var(--display); color: var(--text) }

.spotline { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0; font-size: .75rem; color: var(--muted) }
.spotline li + li::before { content: "·"; margin: 0 .5rem; opacity: .6 }
.spotline li:last-child { color: var(--text) }
[data-theme="final"] .spotline { justify-content: flex-start; gap: .3rem }
[data-theme="final"] .spotline li { background: rgba(255, 255, 255, .07); padding: .25rem .7rem; color: var(--text); font-weight: 600; font-size: .75rem; clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%) }
[data-theme="final"] .spotline li + li::before { content: none }
[data-theme="final"] .spotline li:last-child { background: var(--accent); color: #fff }

/* стол */
.table-wrap { position: relative; width: 100%; max-width: 660px; margin: .4rem auto 0; aspect-ratio: 16 / 9.8; isolation: isolate; container-type: inline-size }
.felt {
  --rail-w: clamp(9px, 2.4cqw, 16px);
  position: absolute; inset: 16% 11%; border-radius: 999px; display: grid; place-items: center; text-align: center;
  background: radial-gradient(ellipse at 50% 38%, color-mix(in srgb, var(--felt) 78%, #fff 10%) 0%, var(--felt) 45%, var(--felt2) 100%);
  box-shadow: 0 0 0 var(--rail-w) #1c120c, inset 0 0 0 2px var(--felt-line), inset 0 0 0 7px var(--felt2), inset 0 12px 40px rgba(0, 0, 0, .5), 0 30px 60px -20px #000;
}
.felt::before {   /* кожаный борт */
  content: ""; position: absolute; inset: calc(var(--rail-w) * -1); border-radius: inherit; z-index: -1;
  background: var(--rail); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 0 0 1px #000;
}
.felt::after {
  content: "GTO for лудиков"; position: absolute; bottom: 18%; left: 0; right: 0; text-align: center; pointer-events: none;
  font: 600 clamp(.8rem, 3cqw, 1.3rem) var(--display); color: rgba(255, 255, 255, .045); letter-spacing: -.02em;
}
[data-theme="final"] .felt { --rail-w: 3px; box-shadow: 0 0 0 3px #313131, inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 20px 60px rgba(0, 0, 0, .5),  0 40px 80px -30px #000 }
[data-theme="final"] .felt::before { display: none }
[data-theme="final"] .felt::after { font: 700 clamp(.9rem, 3.4cqw, 1.5rem) var(--display); color: rgba(255, 255, 255, .04); letter-spacing: -.02em }
[data-theme="light"] .felt { --rail-w: clamp(8px, 2cqw, 13px); box-shadow: 0 0 0 var(--rail-w) #1f2a25, inset 0 10px 30px rgba(0, 0, 0, .3), 0 24px 40px -24px rgba(0, 0, 0, .6) }
[data-theme="light"] .felt::before { display: none }
[data-theme="light"] .felt::after { color: rgba(255, 255, 255, .08) }
.pot { position: relative; z-index: 1; font-size: .75rem; color: rgba(255, 255, 255, .72); line-height: 1.2; display: grid; justify-items: center; gap: .1rem }
.pot b { font: var(--display-style) var(--display-weight) clamp(1.1rem, 4.2cqw, 1.6rem)/1.1 var(--display); color: #fff }
.pot > b { display: inline-block }

/* места: одинаковые плашки на линии борта */
.seat {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  display: grid; justify-items: center; gap: 1px; min-width: clamp(52px, 12.5cqw, 82px);
  padding: clamp(3px, .9cqw, 6px) clamp(6px, 1.6cqw, 11px) clamp(4px, 1cqw, 7px);
  border-radius: clamp(8px, 2cqw, 12px); text-align: center; line-height: 1.12;
  background: var(--seat); color: var(--seat-ink); box-shadow: 0 0 0 1px var(--line2), 0 8px 18px rgba(0, 0, 0, .45);
}
.seat .pos { font-weight: 700; font-size: clamp(.68rem, 2.3cqw, .9rem); letter-spacing: .01em; white-space: nowrap }
.seat small { font-size: clamp(.58rem, 1.9cqw, .74rem); color: var(--muted); white-space: nowrap }
.seat.folded { background: color-mix(in srgb, var(--seat-folded) 92%, transparent); box-shadow: 0 0 0 1px var(--line) }
.seat.folded .pos { color: color-mix(in srgb, var(--seat-ink) 62%, transparent) }
.seat.folded small { color: color-mix(in srgb, var(--muted) 85%, transparent) }
.seat.hero { background: var(--hero); color: var(--hero-ink); box-shadow: 0 0 0 2px var(--accent), 0 0 26px color-mix(in srgb, var(--accent) 45%, transparent), 0 8px 18px rgba(0, 0, 0, .45) }
.seat.hero small { color: var(--hero-ink); opacity: .85; font-weight: 600 }
.seat.allin { box-shadow: 0 0 0 2px var(--agg), 0 0 22px color-mix(in srgb, var(--agg) 45%, transparent), 0 8px 18px rgba(0, 0, 0, .45) }
.seat.allin small { color: var(--agg); font-weight: 700 }
[data-theme="light"] .seat.allin small { color: var(--agg) }
.seat.live { box-shadow: 0 0 0 2px var(--go), 0 8px 18px rgba(0, 0, 0, .45) }
.seat.live small { color: var(--go); font-weight: 600 }

.dealer-btn, .bet { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; pointer-events: none }
.dealer-btn {
  width: clamp(16px, 3.8cqw, 22px); height: clamp(16px, 3.8cqw, 22px); border-radius: 50%; display: grid; place-items: center;
  background: #f5efe0; color: #1a1a1a; font: 700 clamp(.5rem, 1.7cqw, .68rem)/1 var(--body); box-shadow: 0 2px 4px rgba(0, 0, 0, .55), inset 0 -2px 0 rgba(0, 0, 0, .15);
}
.bet { display: flex; align-items: center; gap: 4px; font-size: clamp(.6rem, 1.9cqw, .76rem); font-weight: 700; color: #fff; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, .6) }
.bet i, .pot-chip {
  width: clamp(11px, 2.6cqw, 15px); height: clamp(11px, 2.6cqw, 15px); border-radius: 50%; flex: none;
  background: radial-gradient(circle, var(--chip-face) 0 36%, var(--chip-edge) 37% 46%, var(--chip-face) 47%); box-shadow: 0 1px 0 rgba(0, 0, 0, .5), 0 2px 3px rgba(0, 0, 0, .4);
}
/* «Финальный стол»: плашки игроков как в эфире */
[data-theme="final"] .seat { justify-items: start; text-align: left; border-radius: 0; box-shadow: 0 10px 20px rgba(0, 0, 0, .45) }
[data-theme="final"] .seat .pos { font: 700 clamp(.7rem, 2.4cqw, .95rem)/1.1 var(--display) }
[data-theme="final"] .seat.folded { background: rgba(24, 24, 24, .92) }
[data-theme="final"] .seat.hero { box-shadow: 0 0 0 2px #fff, 0 10px 24px rgba(232, 104, 71, .35) }
[data-theme="final"] .seat.hero small { color: #ffe1d4 }
[data-theme="final"] .seat.allin { box-shadow: 0 0 0 2px var(--agg), 0 10px 20px rgba(0, 0, 0, .45) }
[data-theme="final"] .seat.live { box-shadow: 0 0 0 2px var(--go), 0 10px 20px rgba(0, 0, 0, .45) }
[data-theme="final"] .dealer-btn { background: #fff; color: #000000 }
[data-theme="light"] .seat { box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), 0 6px 14px rgba(0, 0, 0, .22) }
[data-theme="light"] .seat.hero { box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 70%, transparent), 0 8px 18px rgba(0, 0, 0, .3) }
[data-theme="light"] .dealer-btn { background: var(--violet); color: #fff }
@media (max-width: 600px) {
  .table-wrap { aspect-ratio: 1 / .84; margin-top: .9rem }
  .felt { inset: 17% 15% }
}

/* карты */
.hand { display: flex; justify-content: center; gap: .6rem }
.pcard {
  position: relative; width: 80px; height: 112px; border-radius: 8px; background: var(--card); color: var(--card-ink);
  display: grid; place-items: center; font-family: var(--display);
  box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .75), 0 0 0 1px rgba(0, 0, 0, .18);
}
.pcard .ix { position: absolute; top: 7%; left: 9%; display: grid; justify-items: center; line-height: .95 }
.pcard .ix b { color: inherit; font-size: 1.25rem; font-weight: 700; font-style: var(--display-style); letter-spacing: -.04em }
[data-theme="final"] .pcard .ix b { font-weight: 700 }
.pcard .ix i, .pcard .pip { font-style: normal; font-family: system-ui, "Segoe UI Symbol", sans-serif }
.pcard .ix i { font-size: .875rem }
.pcard .pip { font-size: 2.25rem; margin-top: 18%; margin-left: 18%; line-height: 1 }
.pcard.s { color: var(--card-ink) } .pcard.h { color: var(--suit-h) } .pcard.d { color: var(--suit-d) } .pcard.c { color: var(--suit-c) }
.hand:not(.board .hand) .pcard:first-child:nth-last-child(2) { transform: rotate(-4deg) translateY(3px) }
.hand:not(.board .hand) .pcard:last-child:nth-child(2) { transform: rotate(4deg) }
[data-theme="final"] .hand .pcard { transform: none !important; border-radius: 6px }
.pcard.mini { width: 34px; height: 46px; border-radius: 6px; box-shadow: 0 3px 8px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .15); transform: none !important }
.pcard.mini .ix { position: static; display: flex; align-items: baseline; gap: 1px }
.pcard.mini .ix b { font-size: 1rem }
.pcard.mini .ix i { font-size: .75rem }
.pcard.mini .pip { display: none }
.board { margin-bottom: .35rem }
.board .hand { gap: .25rem }
@media (prefers-reduced-motion: no-preference) {
  body:not(.no-motion) .card > .hand .pcard { animation: deal .32s cubic-bezier(.2, .8, .3, 1) backwards }
  body:not(.no-motion) .card > .hand .pcard:nth-child(2) { animation-delay: .08s }
  @keyframes deal { from { opacity: 0; transform: translateY(-30px) rotate(-10deg) } }
}
.settled > .hand .pcard { animation: none !important }
.hand.mucked .pcard { opacity: .35 }

.question { text-align: center; font: var(--display-style) var(--display-weight) 1.25rem/1.75rem var(--display); text-wrap: balance }
[data-theme="final"] .question { font-weight: 700 }
.question .line { display: block; font: 400 .875rem/1.25rem var(--body); color: var(--muted); margin-bottom: .35rem; font-style: normal }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem }
.actions .btn { min-height: 62px; font-size: 1rem; padding: .4rem; border-radius: var(--r-btn); line-height: 1.15 }
.btn.act-fold { background: transparent; color: var(--text); border-color: var(--line2) }
.btn.act-go { background: var(--go); border-color: transparent; color: var(--go-ink) }
.btn.act-agg { background: var(--agg); border-color: transparent; color: var(--agg-ink) }
[data-theme="club"] .btn.act-go { background: var(--go); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 12px 26px -12px rgba(212, 176, 106, .8) }
[data-theme="club"] .btn.act-agg { background: var(--agg); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3) }
[data-theme="final"] .actions .btn { font: 700 1rem var(--display); clip-path: polygon(4% 0, 100% 0, 96% 100%, 0 100%) }
[data-theme="final"] .btn.act-fold { background: var(--panel2) }
[data-theme="final"] .btn.act-go { background: var(--go) }
[data-theme="light"] .btn.act-fold { background: var(--panel2); border-color: transparent }
[data-theme="light"] .btn.act-go { box-shadow: 0 12px 22px -12px var(--go) }
@media (max-width: 600px) {
  .pcard { width: 70px; height: 98px }
  .pcard .pip { font-size: 1.875rem }
  .question { font-size: 1.125rem }
  .hud-tile b { font-size: 1.5rem }
}
@media (max-width: 959px) {
  .btn.next { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + .6rem); z-index: 3; min-height: 54px; box-shadow: 0 -6px 24px rgba(0, 0, 0, .35) }
  .actions {
    position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + .5rem); z-index: 3; padding: .5rem; margin: 0 -.5rem;
    border-radius: calc(var(--r-btn) + 6px); background: color-mix(in srgb, var(--bg) 94%, transparent); box-shadow: 0 -10px 30px rgba(0, 0, 0, .25);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
}

.verdict { border-radius: var(--r-l); padding: 1rem 1.15rem 1rem 3.5rem; display: grid; gap: .35rem; position: relative; border: 1px solid; scroll-margin-top: 80px }
.verdict::before {
  content: "✓"; position: absolute; left: 1rem; top: 1rem; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; background: var(--good); color: var(--bg);
}
.verdict.good { background: color-mix(in srgb, var(--good) 12%, var(--panel)); border-color: color-mix(in srgb, var(--good) 40%, transparent) }
.verdict.bad { background: color-mix(in srgb, var(--bad) 12%, var(--panel)); border-color: color-mix(in srgb, var(--bad) 40%, transparent) }
.verdict.bad::before { content: "✕"; background: var(--bad); color: #fff }
.verdict strong { font: var(--display-style) var(--display-weight) 1.25rem var(--display) }
.verdict.good strong { color: var(--good) }
.verdict.bad strong { color: var(--bad) }
[data-theme="light"] .verdict::before { color: #fff }
[data-theme="final"] .verdict { border-width: 0 0 0 4px; border-radius: 0 }
[data-theme="final"] .verdict::before { border-radius: 0; clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%); width: 2rem; color: #04201d }
[data-theme="final"] .verdict.bad::before { color: #fff }

.skeleton { height: 420px; border-radius: var(--r-l); background: linear-gradient(100deg, var(--panel) 30%, var(--panel2) 50%, var(--panel) 70%); background-size: 200% 100% }
.skeleton.short { height: 160px }
@media (prefers-reduced-motion: no-preference) {
  .skeleton { animation: shimmer 1.2s linear infinite }
  @keyframes shimmer { to { background-position: -200% 0 } }
}

/* разбор раздачи */
.explain { border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 6%, transparent); padding: .85rem 1rem; display: grid; gap: .5rem; border-radius: var(--r-m) }
.explain h3 { font: var(--display-style) var(--display-weight) 1rem var(--display); color: var(--text) }
.explain ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .45rem; font-size: .875rem; line-height: 1.55 }
.explain li::marker { color: var(--accent-hi); font-weight: 600 }
[data-theme="final"] .explain { border-radius: 0 }
.links { display: flex; flex-wrap: wrap; gap: .4rem }
.links .btn { font-size: .75rem }
.review-tag { justify-self: center; font-size: .75rem; font-weight: 600; color: var(--accent-hi); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); padding: .15rem .7rem; border-radius: 999px }
[data-theme="light"] .review-tag { color: var(--accent) }
.review-note { display: block; margin-top: .2rem; font-size: .75rem; color: var(--muted) }
.review-note.done { color: var(--good); font-weight: 600 }
.empty { display: grid; gap: .7rem; justify-items: center; text-align: center; padding: 1.6rem .5rem }

/* ================= матрица 13×13 ================= */
.matrix { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 2px; width: 100%; max-width: 600px; margin: 0 auto }
.cell {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 4px; border: 0; padding: 0;
  background: var(--fold-cell); color: color-mix(in srgb, var(--text) 45%, transparent);
  font-size: clamp(.5rem, 2.3vw, .76rem); font-weight: 600; cursor: pointer; overflow: hidden; letter-spacing: -.02em;
  min-width: 0;
}
.cell:hover { filter: brightness(1.15) }
.cell.has { color: var(--go-ink) }
.cell.sel { outline: 2px solid var(--text); outline-offset: -2px }
.cell.mark { outline: 3px solid var(--text); outline-offset: -3px }
.cell.dim { opacity: .26 }
.cell.heat { color: var(--text) }
.cell.picked { background: var(--accent); color: var(--accent-ink) }
[data-theme="final"] .cell { border-radius: 1px }
.matrix.small .cell { font-size: clamp(.45rem, 2vw, .66rem) }
.legend { display: flex; gap: .4rem 1.1rem; justify-content: center; font-size: .75rem; color: var(--muted); flex-wrap: wrap }
.legend i { display: inline-block; width: .8rem; height: .8rem; border-radius: 4px; vertical-align: -1px; margin-right: .4rem; background: var(--fold-cell) }
.legend i.go { background: var(--go) }
.legend i.agg { background: var(--agg) }
.legend i.bad { background: var(--bad) }
.legend b { color: var(--text) }
.detail { text-align: center; min-height: 1.5rem; font-size: .875rem }
.big { font: var(--display-style) var(--display-weight) 1.875rem/2.25rem var(--display); color: var(--accent-hi) }
[data-theme="light"] .big { color: var(--go) }

/* ================= прогресс и таблицы ================= */
.kpis { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); padding: .95rem 1.05rem }
.kpi b { display: block; font: var(--display-style) var(--display-weight) 1.875rem/2.25rem var(--display); font-variant-numeric: lining-nums }
.kpi span { color: var(--muted); font-size: .75rem }
[data-theme="final"] .kpi { border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent)}
.bars { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 120px }
.bar { flex: 1; max-width: 34px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; height: 100%; font-size: .75rem; color: var(--muted) }
.bar i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 1px 1px; min-height: 2px }
table { width: 100%; border-collapse: collapse; font-size: .875rem }
th, td { text-align: left; padding: .6rem .45rem; border-bottom: 1px solid var(--line); vertical-align: middle }
tbody tr:last-child td { border-bottom: 0 }
th { color: var(--muted); font-size: .75rem; font-weight: 500 }
td.r, th.r { text-align: right }
td.r { white-space: nowrap }
td .row { flex-wrap: nowrap; justify-content: flex-end }
.scroll { overflow-x: auto; margin: 0 -.3rem; padding: 0 .3rem }

/* ================= учебник ================= */
.toc { display: grid; gap: .55rem }
section.toc { margin-top: .4rem }
section.toc > h2 { font-size: 1rem; color: var(--muted); margin: .8rem 0 .2rem }
.toc-item { display: flex; gap: 1rem; align-items: center; text-decoration: none; color: var(--text); padding: .9rem 1.05rem; transition: border-color .3s var(--ease), transform .3s }
.toc-item:hover { border-color: var(--accent); transform: translateX(2px) }
.toc-item b, .toc-item .muted { display: block }
.toc-item .toc-text { flex: 1; min-width: 0 }
.toc-item .tag { align-self: center }
.toc-n { width: 2.5rem; height: 2.5rem; flex: none; display: grid; place-items: center; border-radius: 50%;
  font: var(--display-style) var(--display-weight) 1rem var(--display); color: var(--accent-hi);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent) }
[data-theme="light"] .toc-n { color: #fff; background: var(--accent); box-shadow: none }
[data-theme="final"] .toc-n { border-radius: 0; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); background: var(--panel2); box-shadow: none; width: 2.8rem }
.prose { gap: 1rem; line-height: 1.7; padding: 1.5rem; font-size: 1rem }
.prose h1 { font-size: 1.5rem }
.prose h2 { margin-top: .8rem; font-size: 1.25rem; color: var(--text) }
.prose ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .55rem }
.prose li::marker { color: var(--accent) }
.guide-link { display: inline-block; margin-top: .5rem; padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line2); text-decoration: none; color: var(--text) }
.guide-link:hover { border-color: var(--accent) }

/* тесты по главам */
.quiz { border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent)}
.quiz-q { font: var(--display-style) var(--display-weight) 1.125rem/1.75rem var(--display) }
.quiz-opts { display: grid; gap: .5rem }
.quiz-opt {
  text-align: left; padding: .75rem .9rem; min-height: 50px; border: 1px solid var(--line2); background: var(--sunk);
  color: var(--text); font: 500 .875rem/1.25rem var(--body); cursor: pointer; border-radius: var(--r-m); transition: border-color .3s var(--ease);
}
.quiz-opt:hover:not(:disabled) { border-color: var(--accent) }
.quiz-opt:disabled { cursor: default; opacity: .7 }
.quiz-opt.right { border-color: var(--good); background: color-mix(in srgb, var(--good) 14%, var(--panel)); opacity: 1 }
.quiz-opt.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, var(--panel)); opacity: 1 }
.quiz-why { font-size: .875rem; line-height: 1.55; padding: .65rem .8rem; border-radius: var(--r-m); background: color-mix(in srgb, var(--good) 10%, transparent); border: 1px solid color-mix(in srgb, var(--good) 45%, transparent)}
.quiz-why.bad { background: color-mix(in srgb, var(--bad) 10%, transparent); border-color: color-mix(in srgb, var(--bad) 45%, transparent) }
.quiz-bar { display: flex; gap: 4px }
.quiz-bar i { flex: 1; height: 4px; border-radius: 4px; background: var(--line2) }
.quiz-bar i.past { background: color-mix(in srgb, var(--accent) 55%, transparent) }
.quiz-bar i.now { background: var(--accent-hi) }
.quiz-score { font: var(--display-style) var(--display-weight) 2.25rem/2.5rem var(--display); color: var(--accent-hi) }
.quiz-best { font-size: .75rem; color: var(--muted) }
.quiz-best.done { color: var(--good) }

/* ================= ICM ================= */
.stacks { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)) }
.payout-preview { display: grid; gap: .4rem }
.payout-preview:empty { display: none }
.payout-preview ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px }
.payout-preview li { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; padding: .4rem .7rem; background: var(--sunk); font-size: .875rem; border-radius: 6px }
.payout-preview li span:first-child { color: var(--muted) }
.payout-preview li span:last-child { min-width: 6.5rem; text-align: right; color: var(--accent-hi) }
td .cell-sub { display: block }
td.eur, tfoot td.eur { color: var(--accent-hi); font-weight: 600 }
[data-theme="light"] td.eur, [data-theme="light"] .payout-preview li span:last-child { color: var(--accent) }
tfoot td { font-weight: 600; border-top: 1px solid var(--line2); border-bottom: 0 }
td .btn.sm .ico { width: 18px; height: 18px }
td .btn.sm:has(.ico) { min-width: 44px; padding: .3rem .5rem }

/* ================= калькулятор эквити ================= */
.player-card h2 { display: flex; align-items: center; gap: .5rem }
.player-card .dot { width: 10px; height: 10px; display: inline-block; border-radius: 50% }
.player-card .row { flex-wrap: wrap }
.slots { display: flex; gap: .5rem; flex-wrap: wrap }
.slot {
  width: 56px; height: 78px; border: 1px dashed var(--line2); background: var(--sunk); border-radius: 8px; cursor: pointer;
  display: grid; place-items: center; color: var(--muted); font: 700 1.25rem/1.75rem var(--display); padding: 0;
}
.slot small { font: 500 .75rem var(--body) }
.slot.filled { background: var(--card); border: 0; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .6), 0 0 0 1px rgba(0, 0, 0, .15); color: var(--card-ink) }
.slot.filled span { display: block; font-size: 1rem; font-family: system-ui, sans-serif }
.slot.filled.h { color: var(--suit-h) } .slot.filled.d { color: var(--suit-d) } .slot.filled.c { color: var(--suit-c) }
.slot.on { outline: 3px solid var(--accent); outline-offset: 2px }
.board-slots .slot:nth-child(4), .board-slots .slot:nth-child(5) { margin-left: .5rem }
.picker-wrap { display: grid; gap: .6rem }
.picker { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 3px }
.pick {
  aspect-ratio: 3 / 4; border: 0; border-radius: 4px; background: var(--card); color: var(--card-ink); cursor: pointer; padding: 0;
  font: 700 clamp(.62rem, 2.6vw, .9rem)/1 var(--display); display: grid; place-content: center; gap: 1px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}
.pick span { font: 400 clamp(.55rem, 2.2vw, .8rem)/1 system-ui, sans-serif }
.pick.h { color: var(--suit-h) } .pick.d { color: var(--suit-d) } .pick.c { color: var(--suit-c) }
.pick:disabled { opacity: .15; cursor: default }
.pick.on { outline: 2px solid var(--accent); outline-offset: 1px }
.pick:hover:not(:disabled) { transform: translateY(-1px) }
.range-edit { display: grid; gap: .6rem }
.eq-total { display: flex; height: 14px; background: var(--sunk); overflow: hidden; border-radius: 6px }
.eq-total i { display: block; height: 100%; transition: width .5s var(--ease) }
.eq-row { display: grid; gap: .3rem }
.eq-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem }
.eq-num { font: var(--display-style) var(--display-weight) 1.5rem/2rem var(--display) }
.eq-bar { height: 8px; background: var(--sunk); border-radius: 4px; overflow: hidden }
.eq-bar i { display: block; height: 100%; width: 0; transition: width .5s var(--ease) }

/* ================= карта слабых мест ================= */
.weak h3 { margin-top: .4rem; font: var(--display-style) var(--display-weight) 1rem var(--display); color: var(--text) }
.weak-top { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem }
.weak-top li { display: grid; grid-template-columns: 1fr auto auto; gap: .7rem; align-items: center; padding: .65rem .8rem; background: var(--sunk); border: 1px solid color-mix(in srgb, var(--bad) 45%, transparent); border-radius: var(--r-m) }
.weak-top li b, .weak-top li .muted { display: block }
.weak-loss { font-weight: 700; color: var(--bad); white-space: nowrap }
.heat-table th, .heat-table td { padding: .25rem .2rem }
.heat-table td:first-child { font-weight: 600; font-size: .75rem }
.heat-cell { width: 100%; min-width: 40px; min-height: 36px; border: 0; border-radius: 4px; background: var(--panel2); color: var(--text); font-weight: 600; font-size: .75rem; cursor: pointer }
.heat-cell:disabled { background: none; cursor: default }
@media (max-width: 480px) { .weak-top li { grid-template-columns: 1fr auto } .weak-top li .btn { grid-column: 1 / -1; justify-self: start } }

/* ================= разбор турниров ================= */
.steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .35rem; color: var(--muted); font-size: .875rem }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none }
.file-pick {
  display: flex; align-items: center; gap: .6rem; padding: 1rem 1.1rem; border: 1px dashed var(--line2); background: var(--sunk);
  border-radius: var(--r-m); cursor: pointer; color: var(--text); font-weight: 600; min-height: 58px; overflow: hidden;
}
.file-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.file-pick:hover { border-color: var(--accent) }
.file-input:focus-visible + .file-pick, .file-pick:focus-within { outline: 2px solid var(--accent) }
.imp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem }
.imp-list li { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center; padding: .7rem .8rem; background: var(--sunk); border: 1px solid color-mix(in srgb, var(--bad) 45%, transparent); border-radius: var(--r-m) }
.imp-list .hand { justify-content: flex-start }
.imp-list.collapsed li:nth-child(n + 11) { display: none }
.imp-text { display: grid; gap: .15rem; min-width: 0 }
.imp-act { font-size: .875rem; color: var(--accent-hi) }
[data-theme="light"] .imp-act { color: var(--accent) }
.imp-side { display: grid; gap: .4rem; justify-items: end }
.imp-notes { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem }
@media (max-width: 480px) {
  .imp-list li { grid-template-columns: auto 1fr }
  .imp-side { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; align-items: center }
}

/* ================= фишки, вспышки, уведомления ================= */
.pchip {
  position: absolute; z-index: 4; width: 18px; height: 18px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, var(--chip-face) 0 36%, var(--chip-edge) 37% 46%, var(--chip-face) 47%);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .5), 0 3px 6px rgba(0, 0, 0, .5);
}
.pchip.alt { background: radial-gradient(circle, #1d1d1d 0 36%, var(--chip-edge) 37% 46%, #1d1d1d 47%) }
@media (prefers-reduced-motion: no-preference) {
  body:not(.no-motion) .verdict.fx-good { animation: glow .7s ease-out }
  body:not(.no-motion) .verdict.fx-bad { animation: shake .4s ease-in-out }
  @keyframes glow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent) } 100% { box-shadow: 0 0 0 16px transparent } }
  @keyframes shake { 0%, 100% { transform: none } 25% { transform: translateX(-6px) } 50% { transform: translateX(5px) } 75% { transform: translateX(-3px) } }
}
body.no-motion .card > .hand .pcard { animation: none !important }
.toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 76px); transform: translateX(-50%); z-index: 50;
  padding: .7rem 1.2rem; background: var(--panel2); color: var(--text); font-weight: 600; font-size: .875rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
  transition: opacity .4s var(--ease), transform .4s var(--ease); white-space: nowrap;
}
.toast.level { background: var(--accent); color: var(--accent-ink); border-color: transparent }
[data-theme="final"] .toast { border-radius: 0; clip-path: var(--btn-shape); border: 0; padding: .7rem 1.6rem }
.toast.out { opacity: 0; transform: translate(-50%, -10px) }
@media (prefers-reduced-motion: no-preference) {
  body:not(.no-motion) .toast { animation: toast-in .35s cubic-bezier(.2, .9, .3, 1.2) }
  @keyframes toast-in { from { opacity: 0; transform: translate(-50%, -16px) scale(.96) } }
}

/* ================= солвер ================= */
.solver-layout { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start }
@media (max-width: 900px) { .solver-layout { grid-template-columns: minmax(0, 1fr) } }
.solver-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-top: .6rem }
.solver-counts div { background: var(--sunk); padding: .7rem .8rem; border-radius: var(--r-m); display: grid; gap: .2rem }
.solver-counts b { font: var(--display-style) var(--display-weight) 1.5rem/2rem var(--display); color: var(--accent-hi) }
[data-theme="light"] .solver-counts b { color: var(--accent) }
.solver-counts span { font-size: .75rem; color: var(--muted) }
.jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem }
.job { border: 1px solid var(--line); border-radius: var(--r-m); padding: .7rem .8rem; display: grid; gap: .4rem }
.job-main { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap }
.node-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0 }
.node-act { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border: 1px solid var(--line2); border-radius: 999px;
  background: var(--sunk); color: var(--text); font: inherit; font-size: .875rem }
.node-act.go { cursor: pointer }
.node-act.go:hover { border-color: var(--accent) }
.node-act .sw, .swatch { width: .8rem; height: .8rem; border-radius: 4px; display: inline-block; flex: none }
.swatch { margin-right: .4rem; vertical-align: -1px }
.hand-detail { margin-top: .8rem }

/* ================= выбор темы ================= */
.themes { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) }
.theme-pick {
  align-content: start; border: 1px solid var(--line2); background: var(--sunk); border-radius: var(--r-m); padding: .6rem; cursor: pointer; text-align: left;
  display: grid; gap: .55rem; color: var(--text); transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.theme-pick:hover { border-color: var(--accent); transform: translateY(-1px) }
.theme-pick.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) }
.theme-pick b { font-weight: 600; font-size: .875rem }
.theme-pick small { color: var(--muted); font-size: .75rem; line-height: 1.35; display: block }
.theme-prev { height: 78px; border-radius: 8px; position: relative; overflow: hidden }
.theme-prev i { position: absolute; left: 14%; right: 14%; top: 20%; bottom: 20%; border-radius: 999px }
.theme-prev u { position: absolute; bottom: 10px; width: 16px; height: 22px; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .4) }
.theme-prev u:nth-of-type(1) { left: calc(50% - 18px) } .theme-prev u:nth-of-type(2) { left: calc(50% + 2px) }
.theme-prev em { position: absolute; right: 8px; top: 8px; width: 26px; height: 8px; border-radius: 4px }
.theme-prev.club { background: #131209 }
.theme-prev.club i { background: #1d5a4a; box-shadow: 0 0 0 5px #3a2418 }
.theme-prev.club u { background: #f5efe0 } .theme-prev.club em { background: #d4b06a }
.theme-prev.final { background: #000000 }
.theme-prev.final i { background: #22307a; box-shadow: 0 0 0 2px #272727 }
.theme-prev.final em { background: #e86847; border-radius: 0 }
.theme-prev.light { background: #e8ece8 }
.theme-prev.light i { background: #2f6f59; box-shadow: 0 0 0 4px #1f2a25 }
.theme-prev.light em { background: #c23b2e }

/* ================= логотип: фишка в цветах темы ================= */
.logo-chip {
  width: 30px; height: 30px; border-radius: 50%; flex: none; position: relative;
  background: radial-gradient(circle, var(--bg) 0 38%, transparent 39%), repeating-conic-gradient(var(--chip-face) 0 22.5deg, var(--chip-edge) 22.5deg 45deg);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent);
}
.auth .logo-chip { width: 46px; height: 46px }
[data-theme="club"] .logo-chip { background: radial-gradient(circle, var(--bg) 0 38%, transparent 39%), repeating-conic-gradient(#d4b06a 0 22.5deg, #7c2a26 22.5deg 45deg) }
[data-theme="final"] .logo-chip { border-radius: 0; background: var(--accent); clip-path: polygon(18% 0, 100% 0, 82% 100%, 0 100%); box-shadow: none }

/* выбор роли и тренера в таблице команды */
td select { width: auto; min-height: 36px; padding: .3rem 1.6rem .3rem .55rem; font-size: .75rem; border-radius: var(--r-s) }
@media (min-width: 960px) { main.page-team { max-width: 1180px } }

/* ================= покерный таймер ================= */
.clock {
  position: relative; isolation: isolate; overflow: hidden;
  container-type: inline-size; aspect-ratio: 16 / 9;
  display: grid; grid-template-columns: minmax(0, 27%) minmax(0, 1fr);
  border-radius: var(--r-l); border: 1px solid var(--line);
  color: #f6f3ea; box-shadow: var(--shadow);
  --tc-accent: var(--accent-hi);
}
[data-theme="light"] .clock { --tc-accent: #f0d48a }
[data-theme="light"] .clock[data-bg="plain"] { --tc-accent: var(--accent) }
.clock-bg { position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center;
  background-color: var(--felt2);
  background-image: radial-gradient(ellipse 75% 70% at 60% 38%, var(--felt), var(--felt2)) }
.clock-bg::before { content: ""; position: absolute; inset: 0; background: var(--grain); opacity: .08 }
.clock-bg::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, var(--dim, 0)) }
.clock[data-bg="plain"] .clock-bg { background-image: none; background-color: var(--bg) }
.clock[data-bg="color"] .clock-bg, .clock[data-bg="image"] .clock-bg { background-color: #111; background-image: none }
[data-theme="light"] .clock[data-bg="plain"] { color: var(--text) }

.clock-side { display: flex; flex-direction: column; gap: 1.6cqw; padding: 2.4cqw 2.2cqw;
  background: rgba(0, 0, 0, .26); border-right: 1px solid rgba(255, 255, 255, .08); font-size: 1.45cqw; min-width: 0 }
[data-theme="light"] .clock[data-bg="plain"] .clock-side { background: rgba(255, 255, 255, .5); border-color: var(--line) }
.tc-pay { list-style: none; margin: 0; padding: 0; display: grid; gap: .5cqw }
.tc-pay li { display: flex; justify-content: space-between; align-items: baseline; gap: 1cqw }
.tc-pay li span { opacity: .7 }
.tc-pay li b { font-size: 2.3cqw; font-weight: 700 }
.tc-pay li:first-child b { font-size: 2.9cqw; color: var(--tc-accent) }
.tc-group { display: grid; gap: .45cqw; padding-top: 1.2cqw; border-top: 1px solid rgba(255, 255, 255, .1) }
.tc-stat, .tc-break { display: flex; justify-content: space-between; gap: 1cqw; align-items: baseline }
.tc-stat span, .tc-break span { opacity: .7 }
.tc-stat b { font-weight: 600 }
.tc-break b { font-size: 2cqw; color: var(--tc-accent) }
.tc-chips { margin-top: auto; display: flex; flex-wrap: wrap; gap: .9cqw }
.tc-chip { --chip: #2f8f5b; width: 4.6cqw; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: var(--chip); border: .45cqw dashed rgba(255, 255, 255, .85); box-shadow: 0 .3cqw .8cqw rgba(0, 0, 0, .4) }
.tc-chip i { font-style: normal; font-weight: 700; font-size: 1.15cqw; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6) }

.clock-main { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 2.5cqw 2cqw; min-width: 0 }
.clock-main p { margin: 0 }
.tc-name { font-size: 2.1cqw; font-weight: 600; opacity: .75; letter-spacing: -.01em }
.tc-time { font-size: 17.5cqw; font-weight: 700; line-height: 1; letter-spacing: -.045em; margin-top: .4cqw;
  transition: color var(--t-color) var(--ease), opacity var(--t-color) var(--ease) }
.tc-level { font-size: 2.6cqw; font-weight: 700; color: var(--tc-accent); margin-top: .6cqw }
.tc-blinds { font-size: 9cqw; font-weight: 700; line-height: 1.05; letter-spacing: -.035em }
.tc-ante { font-size: 2.6cqw; font-weight: 600; opacity: .8; min-height: 3.2cqw }
.tc-around { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin-top: 2cqw; gap: 2cqw }
.tc-around div { display: grid; gap: .3cqw }
.tc-around span { font-size: 1.5cqw; opacity: .65 }
.tc-around b { font-size: 3.6cqw; font-weight: 700; letter-spacing: -.02em }
.tc-paused { position: absolute; top: 2cqw; right: 2.4cqw; margin: 0; padding: .5cqw 1.4cqw; border-radius: 999px;
  font-size: 1.4cqw; font-weight: 700; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity var(--t-color) var(--ease) }
.clock.is-paused .tc-paused { opacity: 1 }
.clock.is-paused .tc-time { opacity: .55 }
.clock.is-last .tc-time { color: var(--bad) }
.clock.is-break .tc-blinds { color: var(--tc-accent) }
[data-theme="final"] .tc-paused { border-radius: 0 }
[data-theme="final"] .tc-level { letter-spacing: .02em }

.clock:fullscreen, .clock.is-max { aspect-ratio: auto; width: 100vw; height: 100vh; height: 100dvh; border: 0; border-radius: 0; box-shadow: none }
.clock.is-max { position: fixed; inset: 0; z-index: 1000 }
body.timer-max { overflow: hidden }
.clock.is-full .clock-main { padding-top: 4cqw }
.clock.is-full:not(.show-remote) { cursor: none }

/* кнопка «весь экран» в углу табло и пульт поверх табло в полноэкранном режиме */
.tc-expand { position: absolute; right: 1.6cqw; bottom: 1.6cqw; width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--r-s); background: rgba(0, 0, 0, .35); color: inherit;
  cursor: pointer; opacity: .55; transition: opacity var(--t-color) var(--ease) }
.tc-expand:hover, .tc-expand:focus-visible { opacity: 1 }
.tc-expand .ico { width: 22px; height: 22px }
.tc-remote { width: max-content; max-width: 94%; position: absolute; left: 50%; bottom: 2cqw; transform: translate(-50%, 1rem); display: flex; gap: .5rem;
  flex-wrap: wrap; justify-content: center; padding: .6rem; border-radius: var(--r-m);
  background: rgba(0, 0, 0, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity var(--t-color) var(--ease), transform var(--t-move) var(--ease) }
.clock.is-full.show-remote .tc-remote { opacity: 1; pointer-events: auto; transform: translate(-50%, 0) }
.clock.is-full .tc-expand { opacity: 0; transition: opacity var(--t-color) var(--ease) }
.clock.is-full.show-remote .tc-expand { opacity: .8 }
.tc-remote .btn { white-space: nowrap; color: #fff; border-color: rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06) }
.tc-remote .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent }
[data-theme="light"] .tc-remote .btn.primary { background: #f0d48a; color: #1f1606 }

.tc-controls { display: grid; gap: .6rem; margin: 1rem 0 1.4rem }
.tc-levels { display: grid; gap: .8rem; overflow-x: auto }
.tc-levels input { width: 6.5rem; min-height: 36px; padding: .3rem .5rem }
.tc-levels tr.brk td { color: var(--muted) }
.tc-levels tr.on td:first-child { color: var(--accent-hi); font-weight: 700 }
main.page-timer { max-width: 1180px }


/* в полном экране размеры считаются и от высоты: на широких и низких экранах ничего не обрезается */
.clock.is-full { container-type: size }
.clock.is-full .tc-name { font-size: min(2.1cqw, 3.8cqh) }
.clock.is-full .tc-time { font-size: min(17.5cqw, 31cqh) }
.clock.is-full .tc-level { font-size: min(2.6cqw, 4.6cqh) }
.clock.is-full .tc-blinds { font-size: min(9cqw, 16cqh) }
.clock.is-full .tc-ante { font-size: min(2.6cqw, 4.6cqh); min-height: 0 }
.clock.is-full .tc-around span { font-size: min(1.5cqw, 2.7cqh) }
.clock.is-full .tc-around b { font-size: min(3.6cqw, 6.4cqh) }
.clock.is-full .clock-side { font-size: min(1.45cqw, 2.6cqh); gap: min(1.6cqw, 2.8cqh) }
.clock.is-full .tc-pay li b { font-size: min(2.3cqw, 4cqh) }
.clock.is-full .tc-pay li:first-child b { font-size: min(2.9cqw, 5cqh) }
.clock.is-full .tc-break b { font-size: min(2cqw, 3.6cqh) }
.clock.is-full .tc-chip { width: min(4.6cqw, 8cqh) }
.clock.is-full .tc-chip i { font-size: min(1.15cqw, 2cqh) }
@media (max-height: 520px) {
  .clock.is-full { grid-template-columns: 1fr }
  .clock.is-full .clock-side { display: none }
  .clock.is-full .clock-main { padding: 3cqh 3cqw }
  .clock.is-full .tc-name { font-size: 4.5cqh }
  .clock.is-full .tc-time { font-size: min(24cqw, 28cqh); margin: 0 }
  .clock.is-full .tc-level { font-size: 5.5cqh; margin-top: 0 }
  .clock.is-full .tc-blinds { font-size: min(12cqw, 15cqh) }
  .clock.is-full .tc-ante { font-size: 5cqh }
  .clock.is-full .tc-around { margin-top: 1.5cqh; gap: 1cqh }
  .clock.is-full .tc-around span { font-size: 3.6cqh }
  .clock.is-full .tc-around b { font-size: 7cqh }
  .tc-remote { flex-wrap: nowrap; padding: .4rem; gap: .35rem; bottom: 2cqh }
}
}


/* ---- компоновка «Большой турнир» ---- */
.ev { display: none }
.clock[data-layout="event"] { grid-template-columns: 1fr }
.clock[data-layout="event"] .clock-side, .clock[data-layout="event"] .clock-main { display: none }
.clock[data-layout="event"] .ev { display: grid; min-width: 0; text-align: center;
  grid-template-columns: minmax(0, 22%) minmax(0, 1fr) minmax(0, 22%);
  grid-template-rows: auto 1fr auto; grid-template-areas: "head head head" "left center right" "foot foot foot" }
.ev p { margin: 0 }
.ev-head { grid-area: head; padding-top: 1.2cqw }
.ev-name { font-size: 4.8cqw; font-weight: 700; line-height: 1.1; letter-spacing: -.03em }
.ev-info { margin-top: .6cqw !important; padding: .6cqw 2cqw; font-size: 1.7cqw; font-weight: 500;
  background: rgba(0, 0, 0, .32); border-block: 1px solid rgba(255, 255, 255, .08) }
.ev-info:empty { display: none }
.ev-left, .ev-right { display: flex; flex-direction: column; justify-content: space-evenly; gap: .6cqw; padding: 1cqw 1cqw }
.ev-left { grid-area: left }
.ev-right { grid-area: right; justify-content: flex-start; padding-top: 2cqw; gap: 2.4cqw }
.ev-stat { display: grid; gap: .3cqw }
.ev-stat > span { font-size: 1.9cqw; font-weight: 700 }
.ev-stat > b { font-size: 1.75cqw; font-weight: 600; opacity: .78 }
.ev-pay { list-style: none; margin: 0; padding: 0; display: grid; gap: .3cqw; font-size: 1.7cqw; font-weight: 600; opacity: .85 }
.ev-pay li:first-child { color: var(--tc-accent); opacity: 1 }
.ev-pay.two { grid-template-columns: 1fr 1fr; font-size: 1.4cqw; column-gap: 1cqw }
.ev-center { grid-area: center; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1cqw 0; min-width: 0 }
.ev-level { font-size: 2.2cqw; font-weight: 700; color: var(--tc-accent) }
.ev-blinds { font-size: 6cqw; font-weight: 700; line-height: 1.05; letter-spacing: -.03em; opacity: .85 }
.ev-ante { font-size: 1.8cqw; font-weight: 600; opacity: .75; min-height: 2.4cqw }
.ev-timebox { align-self: stretch; margin-top: .6cqw; padding: 1.4cqw 1cqw; background: rgba(0, 0, 0, .3);
  border: 1px solid rgba(255, 255, 255, .06); border-radius: var(--r-m) }
.ev-time { font-size: 11.5cqw; font-weight: 700; line-height: 1; letter-spacing: -.04em;
  transition: color var(--t-color) var(--ease), opacity var(--t-color) var(--ease) }
.ev-foot { grid-area: foot; padding: .6cqw 0 1.6cqw; font-size: 2.7cqw; font-weight: 700 }
.clock.is-paused .ev-time { opacity: .55 }
.clock.is-last .ev-time { color: var(--bad) }
.clock.is-break .ev-blinds { color: var(--tc-accent); opacity: 1 }
.clock[data-layout="event"] .tc-paused { top: 1.4cqw; right: 1.6cqw }
[data-theme="light"] .clock[data-bg="plain"] .ev-info, [data-theme="light"] .clock[data-bg="plain"] .ev-timebox { background: rgba(255, 255, 255, .55) }

.clock.is-full[data-layout="event"] .ev-name { font-size: min(5.6cqw, 10cqh) }
.clock.is-full[data-layout="event"] .ev-info { font-size: min(1.9cqw, 3.4cqh) }
.clock.is-full[data-layout="event"] .ev-stat > span { font-size: min(2.1cqw, 3.7cqh) }
.clock.is-full[data-layout="event"] .ev-stat > b { font-size: min(1.9cqw, 3.4cqh) }
.clock.is-full[data-layout="event"] .ev-pay { font-size: min(1.7cqw, 3cqh) }
.clock.is-full[data-layout="event"] .ev-level { font-size: min(2.2cqw, 3.9cqh) }
.clock.is-full[data-layout="event"] .ev-blinds { font-size: min(6.6cqw, 11.5cqh) }
.clock.is-full[data-layout="event"] .ev-ante { font-size: min(1.8cqw, 3.2cqh) }
.clock.is-full[data-layout="event"] .ev-time { font-size: min(13cqw, 23cqh) }
.clock.is-full[data-layout="event"] .ev-foot { font-size: min(3cqw, 5.3cqh) }

@media (max-width: 720px) {
  .clock { aspect-ratio: auto; grid-template-columns: 1fr }
  .clock-main { order: -1; padding: 6cqw 4cqw }
  .tc-name { font-size: 4.2cqw }
  .tc-time { font-size: 27cqw }
  .tc-level { font-size: 5cqw }
  .tc-blinds { font-size: 15cqw }
  .tc-ante { font-size: 4.6cqw; min-height: 0 }
  .tc-around span { font-size: 3.4cqw }
  .tc-around b { font-size: 6.4cqw }
  .clock-side { border-right: 0; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 3.6cqw; gap: 3cqw; padding: 4cqw }
  .tc-pay li b, .tc-pay li:first-child b { font-size: 5cqw }
  .tc-break b { font-size: 4.6cqw }
  .tc-chip { width: 11cqw; border-width: 1cqw }
  .tc-chip i { font-size: 2.8cqw }
  .tc-paused { font-size: 3.4cqw }
  .clock.is-full .clock-side { display: none }
  .clock.is-full .clock-main { justify-content: center }
  .clock.is-full .tc-name { font-size: min(4.2cqw, 3cqh) }
  .clock.is-full .tc-time { font-size: min(27cqw, 22cqh) }
  .clock.is-full .tc-level { font-size: min(5cqw, 4cqh) }
  .clock.is-full .tc-blinds { font-size: min(15cqw, 12cqh) }
  .clock.is-full .tc-ante { font-size: min(4.6cqw, 3.6cqh) }
  .clock.is-full .tc-around span { font-size: min(3.4cqw, 2.6cqh) }
  .clock.is-full .tc-around b { font-size: min(6.4cqw, 5cqh) }
}

.tc-structure summary { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; cursor: pointer; list-style: none }
.tc-structure summary::-webkit-details-marker { display: none }
.tc-structure summary h2::after { content: " +"; color: var(--muted) }
.tc-structure[open] summary h2::after { content: " −" }
.tc-structure[open] summary { margin-bottom: .9rem }
@media (max-width: 720px) {
  .clock[data-layout="event"] .ev { grid-template-columns: 1fr 1fr; grid-template-areas: "head head" "center center" "left right" "foot foot" }
  .ev-name { font-size: 9cqw }
  .ev-info { font-size: 3.6cqw; padding: 1.5cqw 3cqw }
  .ev-center { padding: 3cqw 3cqw 0 }
  .ev-level { font-size: 5cqw }
  .ev-blinds { font-size: 14cqw }
  .ev-ante { font-size: 4.2cqw; min-height: 0 }
  .ev-time { font-size: 25cqw }
  .ev-timebox { padding: 4cqw 2cqw }
  .ev-left, .ev-right { gap: 3.5cqw; padding: 5cqw 3cqw; justify-content: flex-start }
  .ev-stat > span { font-size: 4cqw }
  .ev-stat > b, .ev-pay { font-size: 3.8cqw }
  .ev-pay.two { font-size: 3.2cqw }
  .ev-foot { font-size: 5cqw; padding: 2cqw 3cqw 5cqw }
  .clock[data-layout="event"] .tc-paused { top: auto; bottom: 3cqw; left: 3cqw; right: auto }
  .clock.is-full[data-layout="event"] .ev-left, .clock.is-full[data-layout="event"] .ev-right { display: none }
  .clock.is-full[data-layout="event"] .ev { grid-template-rows: auto 1fr auto }
  .clock.is-full[data-layout="event"] .ev-name { font-size: min(9cqw, 6cqh) }
  .clock.is-full[data-layout="event"] .ev-blinds { font-size: min(14cqw, 9cqh) }
  .clock.is-full[data-layout="event"] .ev-time { font-size: min(25cqw, 17cqh) }
  .clock.is-full[data-layout="event"] .ev-foot { font-size: min(5cqw, 3.5cqh) }
  .clock.is-full[data-layout="event"] .ev-level { font-size: min(5cqw, 3.5cqh) }
  .clock.is-full[data-layout="event"] .ev-ante { font-size: min(4.2cqw, 3cqh) }
  .clock.is-full[data-layout="event"] .ev-info { font-size: min(3.6cqw, 2.4cqh) }
}
@media (max-height: 520px) {
  .clock.is-full[data-layout="event"] .ev { grid-template-columns: 1fr }
  .clock.is-full[data-layout="event"] .ev-left, .clock.is-full[data-layout="event"] .ev-right, .clock.is-full[data-layout="event"] .ev-info { display: none }
  .clock.is-full[data-layout="event"] .ev { grid-template-areas: "head" "center" "foot" }
}

/* учёт игроков */
.tc-controls.tracked .tc-manual { display: none }
.tc-tour { display: grid; gap: .9rem }
.tc-add input[type="text"] { flex: 1 1 14rem; min-width: 0 }
.tc-add input[type="search"] { flex: 0 1 12rem; min-width: 0; margin-left: auto }
.tc-tour-sum { margin: 0; color: var(--muted) }
.tc-tour-sum b { color: var(--text) }
.tc-players { display: grid; gap: .6rem; overflow-x: auto }
.tc-ptable td { padding-block: .4rem }
.tc-ptable tr.out td { color: var(--muted) }
.tc-ptable tr.out td:first-child { color: var(--text); font-weight: 700 }
.tc-itm { color: var(--accent-hi); font-weight: 600 }
.tc-live { font-size: .75rem; color: var(--good) }
.tc-history { display: grid; gap: .5rem }
.tc-history h3 { margin: .6rem 0 0; font-size: 1rem }

/* свои структуры */
.tc-structure > .field, .tc-structure > .row, .tc-structure > .tc-struct-msg { margin-bottom: .9rem }
.tc-structs { align-items: center }
.tc-struct { display: inline-flex; align-items: center; gap: .15rem }
.tc-struct .btn.sm { min-width: 36px; padding-inline: .5rem }
.tc-struct-save input { flex: 1 1 16rem; min-width: 0 }
.tc-struct-msg:empty { display: none }
.tc-allmin { flex: 0 1 16rem }
.tc-allmin input { width: 6rem }
.tc-rowact { flex-wrap: nowrap; gap: .25rem }
.tc-rowact .btn.sm { padding-inline: .5rem; white-space: nowrap }

/* поддержать проект */
.support-link { text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: 999px;
  color: var(--accent-hi); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); font-weight: 600; font-size: .875rem;
  transition: background var(--t-color) var(--ease), border-color var(--t-color) var(--ease) }
.support-link:hover, .support-link.on { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: var(--accent) }
.support-link .ico { width: 18px; height: 18px }
[data-theme="final"] .support-link { border-radius: 0 }
@media (max-width: 1600px) { .support-link span { display: none } .support-link { padding: .45rem } }
textarea { font: inherit; resize: vertical; line-height: 1.5 }
.support-card { display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; align-items: start }
.support-mark { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-hi) }
.support-mark .ico { width: 28px; height: 28px }
.support-text p { margin: 0 0 .7rem; max-width: 62ch }
.support-go { margin: .4rem 0 .6rem }
.supporters { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem }
.supporters li { padding: .35rem .8rem; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line) }
main.page-support { max-width: 820px }
@media (max-width: 560px) { .support-card { grid-template-columns: 1fr } }

/* обратная связь */
.fb-link { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid var(--line);
  background: none; color: var(--accent-hi); cursor: pointer }
.fb-link:hover, .fb-link:focus-visible { border-color: var(--line2) }
.fb-link .ico { width: 20px; height: 20px }
[data-theme="light"] .fb-link { color: var(--accent) }
[data-theme="final"] .fb-link { border-radius: 0; clip-path: var(--btn-shape); border: 0; background: var(--panel2) }
.fb-dialog { width: min(520px, calc(100vw - 2rem)); padding: 1.3rem; border: 1px solid var(--line2); border-radius: var(--radius, 16px);
  background: var(--panel); color: var(--text) }
.fb-dialog::backdrop { background: rgb(0 0 0 / .55); backdrop-filter: blur(3px) }
.fb-dialog form { display: grid; gap: .8rem }
.fb-dialog h2 { margin: 0 }
.fb-dialog textarea { width: 100% }
.fb-moods { flex-wrap: wrap }
.fb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem }
.fb-list li { padding-bottom: .8rem; border-bottom: 1px solid var(--line) }
.fb-list li:last-child { border-bottom: 0; padding-bottom: 0 }
.fb-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem }
.fb-mood { font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; background: var(--panel2) }
.fb-like { color: var(--good, #5ec27a) } .fb-dislike { color: var(--bad, #e06c5a) } .fb-idea { color: var(--accent-hi) } .fb-bug { color: var(--warn, #e0a84a) }
.fb-text { margin: .4rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere }
.xp-card .xp { padding-right: 0 }
