/* =====================================================================
   Премиальная тема: тёмный орех, золото, стекло. Подключается последней
   и перекрывает светлую тему из style.css и shell.css.
   ===================================================================== */
:root {
  --bg-top: #2a1d14;
  --bg-bottom: #0d0a08;
  --text: #f4ead6;
  --muted: #a8977e;
  --gold: #e3b866;
  --gold-hi: #ffe2a0;
  --gold-soft: rgba(227, 184, 102, .16);
  --surface: linear-gradient(180deg, rgba(58, 42, 30, .78), rgba(30, 22, 16, .82));
  --surface-flat: #1f1712;
  --surface-strong: #1d1611;
  --surface-hi: rgba(255, 236, 200, .05);
  --line: rgba(227, 184, 102, .16);
  --shadow: 0 10px 28px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 236, 200, .06);
  --danger: #ff6a4d;
  --font-luxe: 'Playfair Display', Georgia, serif;
  --gold-grad: linear-gradient(180deg, #ffe7a8 0%, #e9be68 45%, #b98431 100%);
}

body {
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(227, 184, 102, .16), transparent 60%),
    radial-gradient(140% 90% at 50% 0%, var(--bg-top), var(--bg-bottom) 72%) fixed,
    var(--bg-bottom);
  color: var(--text);
}
/* Едва заметная фактура, чтобы фон не был «пластиковым» */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: repeating-linear-gradient(115deg, rgba(255, 230, 190, .012) 0 2px, transparent 2px 7px);
}
#app { z-index: 1; }

/* ---------- Кнопки и поверхности ---------- */
.btn {
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  box-shadow: var(--shadow); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.btn:hover { border-color: rgba(227, 184, 102, .4); background: var(--surface); }
.btn-primary, .btn-primary:hover {
  background: var(--gold-grad); color: #2a1a07; border-color: rgba(255, 230, 170, .6);
  box-shadow: 0 12px 30px rgba(227, 160, 60, .35), inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -2px 0 rgba(120, 70, 10, .35);
  text-shadow: 0 1px 0 rgba(255, 240, 200, .5);
}
.btn-ghost { background: transparent; box-shadow: none; backdrop-filter: none; }
.icon-btn { background: var(--surface); border-color: var(--line); color: var(--gold); }
.card, .tile, .level, .segmented, .rrow, .pf-card, .pf-stats, .av-card, .purse, .fr-card, .shop-item, .consent-note, .stat, .result-rating, .found-card, .player-card, .toast {
  background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); color: var(--text);
}
.input { background: rgba(0, 0, 0, .3); border-color: var(--line); color: var(--text); }
.input::placeholder { color: rgba(168, 151, 126, .7); }
.badge { background: var(--gold-soft); color: var(--gold); }
.muted, .sub-h, .set h4 { color: var(--muted); }
.segmented button { color: var(--muted); }
.segmented button.on { background: var(--gold-grad); color: #2a1a07; box-shadow: 0 4px 12px rgba(227, 160, 60, .3); }
.bar { background: rgba(0, 0, 0, .4); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); }
.switch.off { background: #3a2e24; }
.q-reward, .pack, .invite, .pick-preview, .emblem-editor, .fr-rec, .vs-card { background: rgba(0, 0, 0, .25); border-color: var(--line); }
.msg.system { background: rgba(0, 0, 0, .3); }
.bubble { background: var(--surface-flat); }
.pf-row:nth-child(odd) { background: rgba(255, 236, 200, .03); }
.pf-row span, .fr-rec, .fr-bonus, .club-desc { color: #cdbb9c; }
.fr-name, .fr-log-row .q-text b { color: #f09a7c; }
.fr-x { color: #7d6e5a; }
.fr-x:hover { background: rgba(255, 255, 255, .06); }
.doc-body { color: #d7c7aa; }
.doc-body mark { background: rgba(255, 106, 77, .18); color: #ff9a80; }
.version-line, .version { color: rgba(168, 151, 126, .5); }
.kv, .toggle-row + .toggle-row { border-color: var(--line); }
.avatar.av { background: #1c1510; box-shadow: 0 0 0 2px #1c1510, 0 0 0 3.5px rgba(227, 184, 102, .85), 0 6px 14px rgba(0, 0, 0, .5); }
.pf-pencil { box-shadow: 0 0 0 3px #1c1510, 0 4px 10px rgba(0, 0, 0, .5); }
.tabbar .dot { border-color: #1a130e; }
.rr-delta.up, .q-done svg, .fr-head small.on { color: #5fd38f; }
.rr-delta.up { background: rgba(95, 211, 143, .12); }
.rrow.me, .my-place { background: rgba(227, 184, 102, .12); }
.chat-input { background: linear-gradient(180deg, transparent, var(--bg-bottom) 30%); }
.fr-footer { background: linear-gradient(180deg, rgba(13, 10, 8, 0), var(--bg-bottom) 22%); }
.tab-panel { scrollbar-color: rgba(227, 184, 102, .25) transparent; }

/* ---------- Шапка и нижнее меню ---------- */
.appbar { position: relative; }
.appbar::after {
  content: ''; position: absolute; left: 16px; right: 16px; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227, 184, 102, .35), transparent);
}
.me-meta b { color: var(--text); }
.purse b { color: var(--gold-hi); }
.tabbar {
  background: linear-gradient(180deg, rgba(34, 25, 18, .92), rgba(16, 12, 9, .98));
  border-top: 1px solid rgba(227, 184, 102, .22);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .5);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.tabbar button { color: #8b7b64; }
.tabbar button.on { color: var(--gold-hi); }
.tabbar button.on::before { background: var(--gold-grad); }

/* ---------- Главная ---------- */
.tile { border-color: rgba(227, 184, 102, .22); }
.tile svg { color: var(--gold); }
.logo {
  font-family: var(--font-luxe); font-weight: 700; letter-spacing: .12em;
  background: linear-gradient(180deg, #fff3cf 0%, #f0cc7a 40%, #b98431 75%, #f0cc7a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .6));
}
.logo span { color: transparent; }
.tagline { color: var(--muted); }
.tagline::before, .tagline::after { content: '—'; margin: 0 .6em; color: rgba(227, 184, 102, .5); letter-spacing: 0; }
.panel-title, .sheet-title, .shop-h, .consent-card h2, .modal-card h2, .topbar h2, .club-head h2 { font-family: var(--font-luxe); letter-spacing: .02em; }
.panel-title, .sheet-title, .shop-h { color: var(--gold-hi); }

/* Шашки в интерфейсе — снимки настоящих 3D-шашек (их рисует js/board3d.js) */
.discs-3d .disc.w, .discs-3d .disc.b, .discs-3d .pc-captured i, .discs-3d .emblem-disc .disc {
  background-color: transparent; background-position: center; background-size: contain; background-repeat: no-repeat;
  box-shadow: none; border-radius: 0;
}
.discs-3d .disc.w, .discs-3d .pc-captured i.light { background-image: var(--disc-w); }
.discs-3d .disc.b, .discs-3d .pc-captured i.dark { background-image: var(--disc-b); }
.discs-3d .logo-mark .disc { filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .55)); }
.discs-3d .logo-mark .disc.w { animation: float 6s ease-in-out infinite; }
.discs-3d .logo-mark .disc.b { animation: float 6s ease-in-out infinite -3s; }
@keyframes float { 50% { transform: translateY(-6px) rotate(-3deg); } }
.discs-3d .pc-captured i { width: 18px; height: 18px; }
/* Логотип: две крупные шашки */
.logo-mark { width: 168px; height: 112px; }
.logo-mark .disc { width: 100px; height: 100px; }
.logo-mark .disc.w { top: -6px; }
.logo-mark .disc.b { bottom: -6px; }
.disc-ava { background: radial-gradient(circle at 50% 40%, #3a2a1e, #140f0b); }

/* ---------- Выбор соперника, поиск ---------- */
.level { border-color: rgba(227, 184, 102, .18); }
.level:hover { background: var(--surface); border-color: rgba(227, 184, 102, .5); }
.level b { font-family: var(--font-luxe); font-size: 18px; color: var(--gold-hi); letter-spacing: .02em; }
.radar-ring { border-color: rgba(227, 184, 102, .25); }
.radar-dot { background: var(--gold-hi); box-shadow: 0 0 10px var(--gold); }
.found-card { border-color: rgba(227, 184, 102, .45); }

/* ---------- Партия ---------- */
/* Сверху оба игрока (слева вы, справа соперник), под ними доска на всё свободное место, внизу компактные кнопки */
#screen-game {
  justify-content: flex-start; gap: 4px;
  padding: max(10px, env(safe-area-inset-top)) 0 calc(64px + env(safe-area-inset-bottom));
}
.duel { flex: none; display: flex; align-items: stretch; gap: 6px; width: min(calc(100vw - 16px), 600px); }
.duel .player-card { flex: 1 1 0; min-width: 0; width: auto; padding: 8px 10px; gap: 8px; border-radius: 14px; }
.duel .player-card .avatar { width: 40px; height: 40px; font-size: 16px; }
.duel .pc-info { flex: 1 1 0; min-width: 0; }
.duel .pc-name { font-size: 14px; }
.duel .pc-sub { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duel .pc-captured { font-size: 12px; }
.duel .clock { font-size: 15px; padding: 4px 8px; min-width: 54px; }
.duel #card-top { flex-direction: row-reverse; text-align: right; }
.duel .vs { align-self: center; flex: none; font-family: var(--font-luxe); font-size: 18px; color: rgba(227, 184, 102, .7); }
.player-card.turn {
  border-color: rgba(227, 184, 102, .7);
  background: linear-gradient(180deg, rgba(90, 64, 34, .8), rgba(40, 28, 18, .85));
  box-shadow: 0 0 0 1px rgba(227, 184, 102, .25), 0 10px 30px rgba(227, 160, 60, .18);
}
.pc-name { color: var(--text); }
.pc-captured { color: var(--gold-hi); }
.clock { background: rgba(0, 0, 0, .35); color: var(--text); }
.player-card.turn .clock { background: var(--gold-grad); color: #2a1a07; }
.status { flex: none; height: 20px; font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.status.mine { color: var(--gold-hi); }

/* Рамку и клетки рисует 3D — от старой плоской доски остаётся только холст */
.board-shell, .board-shell::before { background: none; box-shadow: none; border: 0; padding: 0; }
.board-shell { flex: 1 1 auto; min-height: 0; width: 100vw; max-width: 680px; }
.board { width: 100%; height: 100%; border-radius: 0; }
.board3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.game-dock {
  padding: 6px 14px max(6px, env(safe-area-inset-bottom)); gap: clamp(6px, 6vw, 40px); border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, rgba(34, 25, 18, .9), rgba(14, 10, 8, .98));
  box-shadow: 0 -12px 34px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(227, 184, 102, .3);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.game-dock::before { background: var(--gold-grad); }
.dock-btn { gap: 3px; font-size: 10px; max-width: 72px; color: #9b8a70; }
.dock-ico {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(180deg, #3a2a1e, #221811); color: var(--gold-hi);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(227, 184, 102, .22), inset 0 1px 0 rgba(255, 236, 200, .08);
}
.dock-btn:hover .dock-ico { box-shadow: 0 6px 16px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(227, 184, 102, .55); }
.dock-ico svg { width: 20px; height: 20px; }
.dock-btn.primary .dock-ico { background: var(--gold-grad); color: #2a1a07; box-shadow: 0 8px 22px rgba(227, 160, 60, .4), inset 0 1px 0 rgba(255, 255, 255, .55); }

/* ---------- Окна, шторка, итоги ---------- */
.modal, .sheet { background: rgba(5, 3, 2, .6); }
.modal-card, .sheet-card {
  background: linear-gradient(180deg, #2a1e15, #17110d);
  border-color: rgba(227, 184, 102, .25);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 236, 200, .08);
}
.sheet-grab { background: rgba(227, 184, 102, .3); }
.consent { background: radial-gradient(130% 90% at 50% 0%, var(--bg-top), var(--bg-bottom) 70%); }
.toast { background: #241a13; color: var(--text); border-color: rgba(227, 184, 102, .3); box-shadow: 0 12px 30px rgba(0, 0, 0, .6); }
.result { background: radial-gradient(120% 80% at 50% 30%, rgba(48, 34, 22, .97), rgba(10, 7, 5, .99)); }
.result-rays { background: repeating-conic-gradient(from 0deg, rgba(227, 184, 102, .09) 0 8deg, transparent 8deg 22deg); }
.vs-board {
  background: linear-gradient(180deg, #2c2016, #18120d);
  border-color: rgba(227, 184, 102, .35); box-shadow: 0 24px 60px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 236, 200, .08);
}
.vs-side.is-winner .vs-card { background: rgba(227, 184, 102, .1); border-color: rgba(227, 184, 102, .6); }
.vs-label.winner { color: var(--gold-hi); font-family: var(--font-luxe); letter-spacing: .04em; }
.vs-mid { color: rgba(227, 184, 102, .55); font-family: var(--font-luxe); }
.vs-rating b, .vs-name { color: var(--text); }
.vs-coins { background: rgba(0, 0, 0, .35); color: var(--gold-hi); }
.vs-friend { background: var(--gold-grad); color: #2a1a07; }
.vs-friend.added { background: rgba(255, 255, 255, .06); color: var(--muted); }
.vs-rematch { margin-top: 8px; background: rgba(227, 184, 102, .12); color: var(--gold-hi); border: 1px solid rgba(227, 184, 102, .45); }
.vs-rematch svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vs-rematch:disabled { opacity: .55; }
.result-row .btn[hidden] { display: none; }
.vs-bar-row .bar { border-color: #1c1510; }

/* ---------- Магазин ---------- */
.shop-item { background: linear-gradient(180deg, rgba(64, 46, 30, .85), rgba(26, 19, 14, .9)); border-color: rgba(227, 184, 102, .25); }
.shop-n { color: var(--gold-hi); }
.stepper { background: rgba(0, 0, 0, .4); }

/* Свечение за картинками товаров — тёплое золото вместо белого пятна */
.shop-art radialGradient[id$="glow"] stop, .sheet-hero radialGradient[id$="glow"] stop { stop-color: #ffcf73; }
.shop-art radialGradient[id$="glow"] stop:first-child, .sheet-hero radialGradient[id$="glow"] stop:first-child { stop-opacity: .32; }

/* ---------- Награды: календарь бонуса, задания дня, достижения ---------- */
.daily-cal { display: flex; flex-direction: column; gap: 12px; }
.daily-cal.ready { border-color: rgba(227, 184, 102, .55); }
.dc-head { display: flex; flex-direction: column; gap: 2px; }
.dc-head b { font-family: var(--font-luxe); font-size: 17px; color: var(--gold-hi); }
.dc-head small { color: var(--muted); font-size: 12px; font-weight: 600; }
.dc-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.dc-day {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 6px;
  border-radius: 10px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); min-width: 0;
}
.dc-day small { font-size: 9px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.dc-day i { width: 16px; height: 16px; }
.dc-day b { font-size: 11px; font-variant-numeric: tabular-nums; }
.dc-day.gem { background: rgba(80, 140, 220, .1); }
.dc-day.now { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(227, 184, 102, .4), 0 0 16px rgba(227, 184, 102, .35); animation: dc-pulse 1.6s ease-in-out infinite; }
.dc-day.got { opacity: .55; }
.dc-day.later { opacity: .8; }
.dc-check { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 8, 6, .45); border-radius: inherit; }
.dc-check svg { width: 22px; height: 22px; color: #5fd38f; stroke-width: 3; }
@keyframes dc-pulse { 50% { box-shadow: 0 0 0 1px rgba(227, 184, 102, .6), 0 0 22px rgba(227, 184, 102, .55); } }
.rw-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 6px; }
.rw-head .sub-h { margin-bottom: 8px; }
.rw-head small { font-size: 12px; font-weight: 600; }
.rw-group { margin: 14px 2px 8px; font-family: var(--font-luxe); font-size: 15px; color: var(--gold); letter-spacing: .02em; }
.day-bonus .daily-ico svg { width: 26px; height: 26px; }
.claim-all { width: 100%; margin: 4px 0 2px; min-height: 46px; }
#rw-filter { margin-bottom: 8px; }
.toggle-row span small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.r-hint { margin: 0 0 10px; }

/* ---------- Регистрация и вход ---------- */
.auth { z-index: 21; }
.auth .consent-card { text-align: left; }
.auth .consent-card h2, .auth .consent-card > p, .auth .logo-mark { text-align: center; }
.auth .segmented { margin: 4px 0; }
.auth .field { gap: 6px; }
.auth .field[hidden] { display: none; }
.auth-error { min-height: 18px; margin: 0; color: var(--danger); font-size: 13px; font-weight: 700; text-align: center; }
.auth .btn-primary[disabled] { opacity: .6; }

/* Пароль: глазок справа в поле */
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 52px; }
.pw-eye {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; color: var(--muted);
}
.pw-eye svg { width: 22px; height: 22px; }
.pw-eye .eye-off { display: none; }
.pw-eye.on { color: var(--gold-hi); }
.pw-eye.on .eye-open { display: none; }
.pw-eye.on .eye-off { display: inline; }

/* Экран входа прокручивается, а пока печатают — логотип и пояснение прячутся, поле остаётся над клавиатурой */
.auth { overflow-y: auto; align-items: start; padding-top: max(24px, env(safe-area-inset-top)); padding-bottom: 32px; }
.auth .consent-card { margin: auto 0; }
.auth.typing .logo-mark, .auth.typing .consent-card > p:not(.auth-error) { display: none; }
.auth.typing .consent-card h2 { font-size: 20px; }

/* ---------- Онлайн: выбор локации ---------- */
#screen-locations { justify-content: flex-start; gap: 10px; padding-left: 0; padding-right: 0; }
#screen-locations .topbar { width: min(452px, 100%); padding: 0 16px; margin-bottom: 0; }
.loc-top h2 { font-size: 20px; color: var(--gold-hi); }
.loc-purse { min-width: 0; padding: 5px 12px 5px 8px; }
.loc-track {
  flex: 1; width: 100%; display: flex; align-items: center; position: relative;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 0 calc(50% - min(39vw, 170px));
}
.loc-track::-webkit-scrollbar { display: none; }
.loc-card {
  flex: none; width: min(78vw, 340px); position: relative; padding-top: 150px;
  scroll-snap-align: center; scroll-snap-stop: always; transform-origin: 50% 55%; will-change: transform, opacity;
}
/* Сияние за рисунком города */
.loc-card::before {
  content: ''; position: absolute; left: 6%; right: 6%; top: 10px; height: 150px; pointer-events: none;
  background: radial-gradient(60% 70% at 50% 75%, rgba(255, 200, 110, .22), transparent 70%);
}
.loc-art {
  position: absolute; top: 0; left: 0; right: 0; height: 146px; z-index: 2;
  display: flex; align-items: flex-end; justify-content: center; pointer-events: none;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .55));
}
.loc-art svg { height: 100%; width: auto; max-width: 96%; stroke: rgba(60, 34, 8, .55); stroke-width: .5; }
.loc-art img { height: 156px; width: auto; margin-bottom: -22px; }
.loc-art .f { fill: url(#la-gold); }
.loc-art .b { fill: url(#la-back); }
.loc-art .mb { fill: none; stroke: rgba(227, 184, 102, .38); stroke-width: 3; }
.loc-art .d { fill: #3a240c; opacity: .62; }
.loc-art .g { fill: rgba(227, 184, 102, .55); }
.loc-body {
  position: relative; text-align: center; padding: 30px 18px 18px; border-radius: 22px;
  background: linear-gradient(180deg, #3b2a1d, #1e1611 72%);
  border: 1px solid rgba(227, 184, 102, .45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 236, 200, .12),
    inset 0 0 0 5px rgba(0, 0, 0, .22), inset 0 0 0 6px rgba(227, 184, 102, .16);
}
/* Золотой карниз, на котором стоит город */
.loc-body::before {
  content: ''; position: absolute; left: -7px; right: -7px; top: -8px; height: 16px; border-radius: 8px;
  background: var(--gold-grad);
  box-shadow: 0 5px 12px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(120, 70, 10, .45);
}
.loc-name {
  margin: 0 0 10px; font-family: var(--font-luxe); font-size: 30px; font-weight: 800; line-height: 1.1; white-space: nowrap;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .6));
}
.loc-card[data-loc="ekb"] .loc-name, .loc-card[data-loc="nsk"] .loc-name { font-size: 26px; }
.loc-card[data-loc="spb"] .loc-name { font-size: 23px; }
.loc-card[data-loc="upside"] .loc-name { font-size: 19px; }
.loc-online {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 16px; color: #e8dcc4;
}
.loc-online b { font-variant-numeric: tabular-nums; }
.loc-online i {
  width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #c4ffd9, #34c46f 55%, #16793b); box-shadow: 0 0 8px rgba(80, 220, 130, .7);
}
.loc-prize {
  display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 14px 0 12px; padding: 9px 10px 10px;
  border-radius: 14px; background: rgba(0, 0, 0, .5); border: 1px solid rgba(227, 184, 102, .5);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .6);
}
.loc-prize small, .loc-play small { font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.loc-prize small { color: var(--gold); }
.loc-prize span, .loc-play span { display: flex; align-items: center; gap: 8px; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.loc-prize span { color: #fff4dc; }
.loc-prize .ico-coin, .loc-play .ico-coin { width: 26px; height: 26px; }
.loc-play { width: 100%; flex-direction: column; gap: 0; min-height: 0; padding: 7px 10px 9px; border-radius: 14px; }
.loc-play small { opacity: .8; }
.loc-card.locked .loc-play {
  background: linear-gradient(180deg, #4a3a2c, #2a2018); color: #b9a68a; text-shadow: none;
  border-color: rgba(227, 184, 102, .22); box-shadow: inset 0 1px 0 rgba(255, 236, 200, .08), 0 8px 18px rgba(0, 0, 0, .35);
}
.loc-card.locked .loc-play small::after { content: ' · не хватает монет'; }
.loc-card.locked .loc-art { filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .55)) saturate(.55) brightness(.7); }
.loc-dots { display: flex; justify-content: center; gap: 8px; }
.loc-dots i { width: 7px; height: 7px; border-radius: 4px; background: rgba(227, 184, 102, .28); transition: width .25s, background .25s; }
.loc-dots i.on { width: 22px; background: var(--gold-hi); }
.loc-rules { min-height: 40px; gap: 6px; color: var(--gold); }
.loc-rules svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.loc-table { display: grid; grid-template-columns: 1fr auto auto; gap: 7px 14px; margin-top: 14px; font-size: 14px; }
.loc-table b { color: var(--gold); font-size: 12px; }
.loc-table b + b { text-align: right; }
.loc-table span { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-variant-numeric: tabular-nums; }
.loc-table span:nth-child(3n+1) { justify-content: flex-start; }
.loc-table .ico-coin { width: 15px; height: 15px; }
.vs-coins.minus span { color: #ff8a70; }

/* ---------- Правила игры: доска сверху, текст прокручивается под ней ---------- */
.rules-board {
  position: sticky; top: -8px; z-index: 2; margin: -4px -18px 0; padding: 6px 0 14px;
  background: linear-gradient(180deg, var(--surface-strong) 85%, rgba(29, 22, 17, 0));
}
.rb-grid {
  display: grid; grid-template-columns: repeat(var(--n, 8), 1fr); width: min(56vw, 230px); aspect-ratio: 1; margin: 0 auto;
  border: 5px solid #6b4423; border-radius: 4px; box-shadow: 0 0 0 1px rgba(227, 184, 102, .5), 0 8px 20px rgba(0, 0, 0, .5);
}
.rb-grid i { display: grid; place-items: center; background: #e8cf9f; }
.rb-grid i.dk { background: #8a5630; }
.rb-grid .disc { width: 84%; height: 84%; border-radius: 50%; }
.rules-text h4 { margin: 16px 0 4px; font-family: var(--font-luxe); font-size: 17px; color: var(--gold-hi); }
.rules-text h4:first-child { margin-top: 2px; }
.rules-text p { margin: 0 0 8px; line-height: 1.5; color: #e2d5bd; }
.rules-text ul { margin: 0 0 8px; padding-left: 18px; line-height: 1.5; color: #e2d5bd; }
.rules-text b { color: var(--text); }

/* ---------- Поиск соперника: вы и барабан аватаров ---------- */
#screen-search { gap: 14px; }
.search-card { width: min(86vw, 360px); }
.search-card .loc-name { margin-bottom: 14px; }
.dp { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
.dp-side {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px 12px; min-width: 0;
  border-radius: 16px; background: rgba(0, 0, 0, .32); border: 1px solid var(--line);
}
.dp-vs { font-family: var(--font-luxe); font-size: 24px; font-weight: 800; color: var(--gold); text-shadow: 0 2px 0 rgba(0, 0, 0, .6); }
.dp-ava { width: 74px; height: 74px; border-radius: 18px; overflow: hidden; position: relative;
  box-shadow: 0 0 0 2px #1c1510, 0 0 0 4px rgba(227, 184, 102, .85), 0 8px 18px rgba(0, 0, 0, .5); background: #1c1510; }
.dp-ava .avatar { width: 74px; height: 74px; border-radius: 0; box-shadow: none; flex: none; }
.dp-strip { display: flex; flex-direction: column; animation: dp-spin 1.6s linear infinite; }
@keyframes dp-spin { to { transform: translateY(-50%); } }
.dp-reel::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .45), transparent 28%, transparent 72%, rgba(0, 0, 0, .45)); }
.dp-reel.stopped .dp-strip { animation: dp-land .45s cubic-bezier(.2, 1.4, .4, 1); }
.dp-reel.stopped::after { display: none; }
@keyframes dp-land { from { transform: translateY(-60%); } to { transform: none; } }
.dp-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; color: var(--gold-hi); }
#search-title:not(:only-child) { white-space: normal; text-align: center; font-size: 14px; line-height: 1.2; }
.dp-sub { color: var(--muted); font-size: 12px; min-height: 15px; }
.dp-state { width: 26px; height: 26px; border-radius: 50%; margin-top: 2px;
  border: 3px solid rgba(227, 184, 102, .2); border-top-color: var(--gold); animation: spin .9s linear infinite; }
.dp-side.ready .dp-state { animation: none; border: 0; background: #34c46f center / 16px no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
  box-shadow: 0 0 12px rgba(80, 220, 130, .6); }
.dp-stake { display: flex; justify-content: center; gap: 22px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.dp-stake span { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 17px; color: #fff4dc; }
.dp-stake small { color: var(--gold); font-weight: 700; font-size: 13px; margin-right: 2px; }
.dp-stake .ico-coin { width: 20px; height: 20px; }
.search-note { text-align: center; max-width: 320px; margin: 0; min-height: 40px; }
.search-back { min-width: 200px; }

/* ---------- Друзья: заявки, статус, вызов ---------- */
.fr-reqs { display: grid; gap: 8px; margin-bottom: 12px; }
.fr-req { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.fr-req .avatar { width: 44px; height: 44px; flex: none; }
.fr-req .q-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fr-req .q-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-call { width: 100%; min-height: 36px; margin-top: 8px; }
.fr-head small.on { color: #5fd38f; }
.fr-head small .online { margin-right: 4px; }

/* ---------- В партии: ничья и быстрые фразы ---------- */
.dock-btn.hidden { display: none; }
.say-pop {
  position: absolute; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 6;
  width: min(calc(100vw - 24px), 420px); transform: translate(-50%, 12px) scale(.96); opacity: 0; pointer-events: none;
  padding: 12px; border-radius: 18px; background: rgba(28, 21, 16, .97); border: 1px solid rgba(227, 184, 102, .35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .6); transition: opacity .18s, transform .18s;
}
.say-pop.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0) scale(1); }
.say-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.say-grid button {
  min-height: 42px; padding: 6px 10px; border-radius: 12px; font-weight: 700; font-size: 15px; color: var(--text);
  background: rgba(255, 236, 200, .05); border: 1px solid var(--line);
}
.say-grid button:active { background: var(--gold-soft); }
.say-grid button.emo { font-size: 24px; }
.say-mute { width: 100%; margin-top: 10px; padding: 6px; font-size: 12px; color: var(--muted); }
.player-card { position: relative; }
/* Кольцо времени на ход вокруг аватара */
.ava-timer { position: relative; flex: none; display: grid; place-items: center; }
.ava-timer .ring { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); transform: rotate(-90deg); pointer-events: none; opacity: 0; transition: opacity .25s; overflow: visible; }
.ava-timer.on .ring { opacity: 1; }
.ava-timer .ring circle { fill: none; stroke-width: 3.5; }
.ava-timer .ring-bg { stroke: rgba(255, 255, 255, .1); }
.ava-timer .ring-fg { stroke: #3ddc6b; stroke-linecap: round; stroke-dasharray: 138.23; stroke-dashoffset: 0; filter: drop-shadow(0 0 3px rgba(61, 220, 107, .7)); transition: stroke-dashoffset .1s linear, stroke .2s; }
.ava-timer.low .ring-fg { stroke: #ff3b30; filter: drop-shadow(0 0 4px rgba(255, 59, 48, .9)); }
.ava-timer.low .ring { animation: ring-blink .5s steps(2, jump-none) infinite; }
@keyframes ring-blink { 50% { opacity: .25; } }
.say-bubble {
  position: absolute; top: calc(100% + 8px); left: 12px; z-index: 5; max-width: 170px;
  padding: 8px 12px; border-radius: 14px; font-weight: 700; font-size: 15px; color: #2a1a07; background: var(--gold-grad);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .5); animation: bubble-in .25s cubic-bezier(.2, 1.4, .4, 1); transition: opacity .35s;
}
.say-bubble::before { content: ''; position: absolute; top: -6px; left: 16px; border: 6px solid transparent; border-top: 0; border-bottom-color: #ffe7a8; }
#card-top .say-bubble { left: auto; right: 12px; }
#card-top .say-bubble::before { left: auto; right: 16px; }
.say-bubble.hide { opacity: 0; }
@keyframes bubble-in { from { transform: translateY(-6px) scale(.8); opacity: 0; } }

/* ---------- Турнир недели ---------- */
.tiles:has(.tour-tile:only-child) { grid-template-columns: 1fr; }
.tour-tile { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; text-align: left; }
.tour-tile > svg { width: 30px; height: 30px; flex: none; color: var(--gold); }
.tour-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tour-text b { font-family: var(--font-luxe); font-size: 17px; color: var(--gold-hi); }
.tour-place { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.tour-place b { font-size: 22px; color: var(--gold-hi); }
.tour-place small { font-size: 10px; color: var(--muted); }
.tour-head { display: flex; justify-content: space-around; text-align: center; margin-bottom: 4px; }
.tour-head small { display: block; color: var(--muted); font-size: 12px; }
.tour-head b { font-size: 18px; color: var(--gold-hi); }
.tour-me { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.tour-me-place { display: flex; flex-direction: column; align-items: center; min-width: 54px; }
.tour-me-place b { font-family: var(--font-luxe); font-size: 30px; color: var(--gold-hi); line-height: 1; }
.tour-me-place small, .tour-me-info small { font-size: 12px; color: var(--muted); }
.tour-me-info { display: flex; flex-direction: column; gap: 2px; }
.tour-me-info b { font-size: 17px; }
.tour-me-info .tour-need { color: var(--gold); }
.tour-prizes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tour-prize { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.tour-prize > b { min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; display: grid; place-items: center; background: rgba(255, 236, 200, .08); color: var(--gold-hi); font-size: 13px; }
.tour-prize.p1 > b { background: var(--gold-grad); color: #2a1a07; }
.tour-prize.p2 > b { background: linear-gradient(180deg, #f1f1f1, #a9a9a9); color: #222; }
.tour-prize.p3 > b { background: linear-gradient(180deg, #f0c39a, #a8673a); color: #2a1407; }
.tour-prize .amt { display: inline-flex; align-items: center; gap: 3px; }
.tour-table { display: flex; flex-direction: column; gap: 4px; }
.tour-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: rgba(255, 236, 200, .03); }
.tour-row.me { background: rgba(227, 184, 102, .14); }
.tour-row .avatar { width: 34px; height: 34px; flex: none; }
.tour-n { width: 22px; text-align: center; font-weight: 800; color: var(--muted); }
.tour-name { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tour-name small { color: var(--muted); font-size: 11px; }
.tour-row > b { color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.tour-rules { margin-top: 12px; line-height: 1.5; }

/* ---------- Главная: турнир и задача дня рядом ---------- */
.tiles:has(.tour-tile + .tour-tile) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles:has(.tour-tile + .tour-tile) .tour-tile { padding: 10px 12px; gap: 8px; }
.tiles:has(.tour-tile + .tour-tile) .tour-tile > svg { width: 24px; height: 24px; }
.tiles:has(.tour-tile + .tour-tile) .tour-text b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiles:has(.tour-tile + .tour-tile) .tour-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiles:has(.tour-tile + .tour-tile) .tour-place b { font-size: 18px; }

/* Окно «Результат в лиге» */
.prize-modal { position: fixed; inset: 0; z-index: 27; display: none; place-items: center; padding: 24px 18px; background: rgba(8, 5, 3, .72); backdrop-filter: blur(3px); }
.prize-modal.show { display: grid; animation: fade-in .25s ease-out; }
.prize-card {
  position: relative; width: min(100%, 380px); padding: 44px 20px 20px; border-radius: 24px; text-align: center;
  background: linear-gradient(180deg, #4a3423, #23180f); border: 1.5px solid rgba(227, 184, 102, .65);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 236, 200, .2); animation: prize-pop .45s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes prize-pop { from { transform: scale(.8); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
.prize-cup { position: absolute; left: 50%; top: -46px; width: 84px; height: 84px; transform: translateX(-50%); filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .5)); }
.prize-cup svg { width: 100%; height: 100%; }
.prize-x { position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .3); color: var(--gold); cursor: pointer; display: grid; place-items: center; }
.prize-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.prize-title { margin: 0 0 8px; font-family: var(--font-luxe); font-size: 24px; color: var(--gold-hi); }
.prize-hi { margin: 0 0 6px; font-size: 14px; line-height: 1.45; color: var(--text); }
.prize-hi b { color: var(--gold-hi); }
.prize-place { margin: 4px auto 10px; font-family: var(--font-luxe); font-size: 64px; line-height: 1; font-weight: 700;
  background: linear-gradient(180deg, #fff4d2, #dea445); -webkit-background-clip: text; background-clip: text; color: transparent; }
.prize-place.first { font-size: 76px; filter: drop-shadow(0 0 14px rgba(227, 160, 60, .55)); }
.prize-table { display: flex; margin: 0 auto 12px; width: auto; padding: 0 18px; }
.prize-table[hidden] { display: none; }
.prize-reward { padding: 10px 12px 12px; margin-bottom: 14px; border-radius: 16px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(227, 184, 102, .3); }
.prize-reward small { display: block; color: var(--gold); font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.prize-reward .amt { font-size: 26px; font-weight: 800; color: var(--text); }
.prize-reward .ico-silver { width: 28px; height: 28px; vertical-align: -6px; }
#prize-claim { width: 100%; }

/* История партий */
.hist-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.hist-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 14px; text-align: left; cursor: pointer;
  background: rgba(0, 0, 0, .22); border: 1px solid var(--line); color: inherit; font: inherit;
}
.hist-row .avatar { width: 38px; height: 38px; flex: none; }
.hist-row .q-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hist-row .q-text b { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-row .q-text small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-row.nolog { opacity: .7; }
.hist-res { flex: none; width: 82px; padding: 4px 0; border-radius: 10px; text-align: center; font-size: 12px; font-weight: 800; }
.hist-res.win { color: #10301a; background: #7ee08f; }
.hist-res.loss { color: #fff; background: rgba(255, 107, 94, .75); }
.hist-res.draw { color: var(--text); background: rgba(255, 255, 255, .14); }
.hist-delta { flex: none; font-variant-numeric: tabular-nums; color: var(--muted); }
.hist-delta.up { color: #7ee08f; }
.hist-delta.down { color: #ff6b5e; }

/* Обучение новичков */
.tut-title { margin: 0 0 6px; text-align: center; font-family: var(--font-luxe); font-size: 22px; color: var(--gold-hi); }
.tut-text { margin: 0 0 12px; font-size: 15px; line-height: 1.5; text-align: center; }
.tut-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.tut-dots i { width: 8px; height: 8px; border-radius: 4px; background: rgba(227, 184, 102, .25); }
.tut-dots i.done { background: var(--gold); }
.tut-dots i.on { width: 22px; background: var(--gold-hi); }
.tut-btn { display: flex; margin: 10px auto 4px; width: auto; padding: 0 16px; }
.tut-link { align-self: center; margin-top: 14px; width: auto; color: var(--gold); }

/* Лига месяца: значки ступеней и окно со ступенями */
.tier {
  display: inline-block; flex: none; width: 16px; height: 16px; margin-left: 5px; vertical-align: -2px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 45%), var(--tc);
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .28), 0 1px 3px rgba(0, 0, 0, .5); position: relative;
}
.tier::after { content: ''; position: absolute; inset: 27%; background: rgba(255, 255, 255, .9);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.tier.t0 { --tc: linear-gradient(160deg, #f3b882, #9a5726); }
.tier.t1 { --tc: linear-gradient(160deg, #f4f7fb, #8b95a3); }
.tier.t2 { --tc: linear-gradient(160deg, #ffe9a6, #cf9022); }
.tier.t3 { --tc: linear-gradient(160deg, #dcfbff, #4fb0c4); }
.tier.t4 { --tc: linear-gradient(160deg, #ecc8ff, #7d35e8); box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .28), 0 0 10px rgba(170, 100, 255, .7); }
.tier.big { width: 30px; height: 30px; margin: 0; }
.tier.huge { width: 64px; height: 64px; margin: 0; }
.mo-hero { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 4px 0 12px; }
.mo-hero b { display: block; font-family: var(--font-luxe); font-size: 26px; color: var(--gold-hi); }
.mo-hero small { color: var(--muted); }
.mo-bar { margin: 0 6px 6px; }
.mo-ladder { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.mo-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, .22); border: 1px solid transparent; }
.mo-row .tier { width: 26px; height: 26px; margin: 0; }
.mo-row.on { border-color: var(--gold); background: rgba(227, 184, 102, .12); }
.mo-row.done { opacity: .6; }
.mo-name { flex: 1; display: flex; flex-direction: column; font-weight: 800; color: var(--text); }
.mo-name small { font-weight: 600; color: var(--muted); font-size: 12px; }
.mo-reward { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; font-size: 13px; font-weight: 800; }
.mo-last .tier { vertical-align: -3px; }
.tier.sm { width: 12px; height: 12px; margin: 0 4px 0 0; vertical-align: -1px; }

/* Разбор партии: панель вместо нижнего меню */
.review-panel { display: none; }
#screen-game.reviewing .game-dock { display: none; }
#screen-game.reviewing .pc-captured { visibility: hidden; } /* взятые за всю партию к разбираемому ходу не относятся */
#screen-game.reviewing .review-panel {
  display: flex; flex-direction: column; gap: 8px; flex: none; width: min(452px, calc(100% - 24px)); margin: 6px auto 10px; padding: 10px 12px 12px;
  border-radius: 20px; background: linear-gradient(180deg, rgba(52, 38, 26, .96), rgba(22, 16, 11, .96)); border: 1px solid rgba(227, 184, 102, .3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.rv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rv-sum { font-size: 13px; color: var(--muted); }
.rv-sum b { color: var(--text); }
.rv-head .btn { width: auto; min-height: 32px; padding: 0 14px; flex: none; }
.rv-card { display: flex; flex-direction: column; gap: 2px; min-height: 64px; padding: 8px 12px; border-radius: 14px; background: rgba(0, 0, 0, .28); }
.rv-card b { font-size: 15px; color: var(--text); }
#rv-verdict { font-size: 14px; font-weight: 700; color: var(--muted); }
#rv-better { font-size: 13px; font-weight: 700; color: #7ee08f; }
.review-panel .good { color: #7ee08f !important; }
.review-panel .warn { color: #f5c04a !important; }
.review-panel .bad { color: #ff6b5e !important; }
.rv-nav { display: flex; align-items: center; gap: 10px; }
.rv-nav .icon-btn { width: 44px; height: 44px; flex: none; }
.rv-nav .icon-btn:disabled { opacity: .35; }
.rv-nav .icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.rv-count { min-width: 64px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.rv-mistake { margin-left: auto; width: auto; min-height: 40px; padding: 0 14px; }

/* Поделиться победой */
.btn-share { gap: 8px; color: var(--gold-hi); border-color: rgba(227, 184, 102, .55); background: rgba(227, 184, 102, .1); }
.btn-share svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.btn-share[hidden] { display: none; }
.win-card { display: block; width: min(100%, 300px); margin: 0 auto 14px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }

/* Правила: переключатель вариантов и метка в партии */
.variant-pick button { padding: 8px 16px; }
.variant-pick.v3 button { padding: 8px 10px; font-size: 13px; }
.feat-table { display: flex; flex-direction: column; margin: 10px 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.feat-table > div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; font-size: 13.5px; }
.feat-table > div:nth-child(odd) { background: rgba(0, 0, 0, .22); }
.feat-table span { color: var(--muted); }
.feat-table b { color: var(--gold-hi); text-align: right; }
.loc-variant { align-self: center; }
.variant-tag {
  align-self: center; margin: -2px auto 0; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: var(--gold-hi); background: rgba(227, 184, 102, .12); border: 1px solid rgba(227, 184, 102, .3); text-align: center;
}
.variant-tag[hidden] { display: none; }
.watch-tag { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; }
.search-pill { margin-top: 4px; }
.search-pill .link { font: inherit; color: var(--gold-hi); text-decoration: underline; background: none; border: 0; padding: 0; }
.search-train { margin-top: 10px; }
.search-train[hidden] { display: none; }
.watch-tag svg, .live-eye svg, .lv-eye svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

/* Рейтинг: переключатель варианта и «Смотреть партии» */
.variant-tabs { margin: 0 auto 6px; align-self: center; }
.live-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-bottom: 12px; color: var(--text); }
.live-card .live-eye { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-hi); background: rgba(227, 184, 102, .14); border: 1px solid rgba(227, 184, 102, .35); }
.live-card .live-eye svg { width: 20px; height: 20px; }
.live-card .q-text { flex: 1; min-width: 0; }
.live-card .chev { color: var(--muted); font-size: 22px; }
.live-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.live-row { display: block; width: 100%; text-align: left; color: var(--text); padding: 10px 12px; }
.live-row[disabled] { opacity: .6; }
.lv-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.lv-head > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-variant { color: var(--gold-hi); font-weight: 800; }
.lv-eye { display: inline-flex; align-items: center; gap: 3px; }
.lv-mine { color: var(--gold-hi); }
.lv-duel { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.lv-p { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lv-duel .lv-p:last-child { flex-direction: row-reverse; text-align: right; }
.lv-p .avatar { width: 38px; height: 38px; flex: none; font-size: 16px; }
.lv-p > span { display: flex; flex-direction: column; min-width: 0; }
.lv-p b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-p small { color: var(--muted); font-size: 12px; }
.lv-vs { font-style: normal; font-weight: 800; font-size: 12px; color: var(--gold-hi); }

/* Доски и шашки за серебро */
.sk-head { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 12px; color: var(--muted); font-size: 14px; }
.sk-head .amt { color: var(--text); font-size: 18px; font-weight: 800; }
.sk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.sk-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px 10px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(180deg, rgba(64, 46, 30, .85), rgba(26, 19, 14, .9)); border: 1px solid rgba(227, 184, 102, .25); color: inherit; font: inherit;
}
.sk-item.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold), 0 6px 18px rgba(227, 160, 60, .25); }
.sk-item > b { min-height: 2.5em; display: flex; align-items: center; text-align: center; font-size: 12.5px; line-height: 1.2; color: var(--text); }
.sk-on, .sk-pick, .sk-price { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; font-size: 12.5px; font-weight: 800; }
.sk-on { color: var(--gold-hi); }
.sk-on svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; }
.sk-pick { color: var(--muted); }
.sk-price .amt { color: var(--text); }
.sk-price.short { opacity: .55; }
.sk-art { position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; }
.sk-art.board { box-shadow: 0 6px 14px rgba(0, 0, 0, .45); }
.sk-art.pieces { background: radial-gradient(circle at 50% 62%, rgba(255, 210, 140, .18), rgba(0, 0, 0, 0) 68%); }
.sk-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sk-art img:not([src]) { visibility: hidden; }
.sk-art .disc { position: absolute; width: 20.5%; height: 20.5%; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .5)); }
.sk-art .disc.b { left: 29.5%; top: 9%; }
.sk-art .disc.w { left: 50%; top: 70.5%; }
.sk-big { width: 170px; margin: 2px auto 4px; }
.sk-big .sk-art { border-radius: 14px; }
.sk-banner { margin: 0 0 6px; }
.sk-mini { position: relative; flex: none; width: 44px; height: 34px; }
.sk-mini .disc { position: absolute; width: 28px; height: 28px; }
.sk-mini .disc.b { right: 0; top: 0; }
.sk-mini .disc.w { left: 0; bottom: 0; }
.tour-rules + .btn { display: block; margin: 0 auto 4px; }

/* Окно обновления: что нового */
.upd-notes { margin: 4px 0 14px; padding-left: 22px; text-align: left; font-size: 14px; line-height: 1.45; }
.upd-notes li { margin: 4px 0; }

/* Ежедневная лига */
.ico-silver {
  display: inline-block; width: 18px; height: 18px; flex: none; vertical-align: -4px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #dfe3e9 40%, #8e959f 85%);
  box-shadow: inset 0 0 0 2px rgba(88, 94, 104, .55), 0 1px 0 #5c6169;
}
/* Плитки главной — сеткой 2×2: лига дня и лига месяца, турнир и задача дня */
.tiles:has(.tour-tile + .tour-tile) .league-tile .tour-text b { font-size: 17px; }
.lg-empty { text-align: center; padding: 22px 16px; }
.lg-empty p { margin: 0 0 14px; font-size: 16px; line-height: 1.4; }
.lg-cols { display: flex; align-items: center; gap: 10px; padding: 0 10px 4px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.lg-cols .lg-player { flex: 1; margin-left: 44px; }
.lg-silver { width: 58px; flex: none; display: flex; justify-content: center; }
.lg-coins { width: 52px; flex: none; text-align: right; }
.lg-row .lg-silver .amt { gap: 3px; color: #e4e7ec; font-size: 14px; }
.lg-row.p1 .tour-n { color: var(--gold-hi); }
.lg-row.p2 .tour-n { color: #d9d9d9; }
.lg-row.p3 .tour-n { color: #e0a878; }

/* Клубы: шапка, чат, помощь, поиск */
.club-top { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.club-top .emblem { width: 40px; height: 44px; }
.club-top .q-text small { display: flex; align-items: center; gap: 4px; }
.club-top .q-text small .online { margin: 0; }
.club-q { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); color: var(--gold-hi); font-weight: 800; font-size: 18px; }
.club-tabs button:disabled { opacity: .45; }
.club-tabs button { padding-left: 6px; padding-right: 6px; }
/* Турнир клубов */
.emblem.sm { width: 30px; height: 33px; }
.cw-me { display: flex; flex-direction: column; gap: 2px; margin: 10px 0 4px; }
.cw-me span, .cw-me small { color: var(--muted); font-size: 12px; }
.cw-me b { font-size: 16px; color: var(--gold-hi); }
.club-chat { display: flex; flex-direction: column; gap: 8px; height: calc(100dvh - 360px); min-height: 240px; overflow-y: auto; padding: 4px 2px 8px; overscroll-behavior: contain; }
.ce-sys { align-self: center; max-width: 90%; text-align: center; font-size: 13px; color: var(--muted); padding: 4px 12px; border-radius: 12px; background: rgba(0, 0, 0, .2); }
.ce-sys b { color: var(--gold-hi); }
.ce-help { margin: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.ce-help > small { color: var(--muted); font-size: 12px; }
.ce-help > small b { color: var(--gold-hi); }
.ch-row { display: flex; align-items: center; gap: 10px; }
.ch-row .avatar { width: 38px; height: 38px; flex: none; }
.ch-row .btn { width: auto; flex: none; min-width: 96px; }
.ch-bar { position: relative; flex: 1; height: 14px; border-radius: 7px; background: rgba(0, 0, 0, .4); box-shadow: inset 0 0 0 1px var(--line); }
.ch-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; background: var(--gold-grad); }
.ch-bar .ico-coin { position: absolute; right: -6px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; }
.ch-cap { text-align: center; color: var(--muted); font-size: 12px; }
.ce-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 88%; }
.ce-msg .avatar { width: 32px; height: 32px; flex: none; }
.ce-msg.mine { align-self: flex-end; }
.cm-body { padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: rgba(255, 236, 200, .07); border: 1px solid var(--line); min-width: 0; }
.ce-msg.mine .cm-body { border-radius: 16px 16px 4px 16px; background: rgba(227, 184, 102, .16); border-color: rgba(227, 184, 102, .35); }
.cm-head { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.cm-head b { color: var(--gold-hi); }
.cm-head small { color: var(--muted); }
.cm-body p { margin: 2px 0 0; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.club-compose { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.club-compose .input { flex: 1; min-width: 0; margin: 0; }
.club-compose .btn { width: auto; flex: none; }
.club-ask { display: inline-flex; align-items: center; gap: 6px; padding-left: 10px; padding-right: 12px; }
.club-ask[data-wait] { opacity: .6; }
.club-send { width: 46px !important; padding: 0; display: grid; place-items: center; }
.club-send svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.club-find { display: flex; gap: 8px; margin-bottom: 10px; }
.club-find .input { flex: 1; margin: 0; }
.club-find .btn { width: auto; flex: none; }
.club-row { cursor: pointer; }
.club-row .q-text small { display: block; }
.club-row .btn { width: auto; flex: none; }
.club-req { margin: 0; color: var(--gold); font-weight: 700; }
.club-req-row .btn { width: auto; flex: none; }
.club-sheet-join { margin-top: 12px; display: flex; justify-content: center; }
.club-sheet-join .btn { width: 100%; }
.ci-item { display: flex; align-items: center; gap: 14px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.ci-item p { margin: 0; line-height: 1.45; }
.ci-ico { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .25); color: var(--gold-hi); }
.ci-ico svg { width: 26px; height: 26px; }
.ci-ico .ico-coin { width: 28px; height: 28px; }
.ci-elo { font-family: var(--font-luxe); font-size: 14px; color: #e36a4f; }
.ci-item + .btn { margin-top: 14px; }

/* Экран входа: «Забыли пароль?» и ссылки на страницы сайта */
.auth-link { display: block; margin: 10px auto 0; padding: 6px 10px; border: 0; background: none; color: var(--gold); font: inherit; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.auth-link[hidden] { display: none; }
.auth .auth-site { margin: 12px 0 0; text-align: center; font-size: 14px; color: var(--gold); }
.auth-site a { color: var(--gold); font-weight: 700; text-underline-offset: 3px; padding: 6px 4px; }
.auth-site[hidden] { display: none; }

/* Кнопка Яндекс ID */
.ya-btn { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, .18); }
.ya-btn.btn-small { display: inline-flex; margin: 0 0 8px; }
.ya-logo { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #fc3f1d; color: #fff; font: 800 14px/1 Arial, sans-serif; font-style: normal; }

/* Пригласить друга: баннер на главной и окно */
.invite-banner { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 12px 14px; border-radius: 16px; cursor: pointer; text-align: left; color: inherit; font: inherit;
  background: linear-gradient(135deg, rgba(227, 184, 102, .16), rgba(227, 184, 102, .04)); border: 1px dashed rgba(227, 184, 102, .5); }
.invite-banner > svg { width: 28px; height: 28px; flex: none; color: var(--gold-hi); }
.ib-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ib-text b { font-family: var(--font-luxe); font-size: 16px; color: var(--gold-hi); }
.ib-text small { color: var(--muted); font-size: 12px; }
.invite-banner .amt { color: var(--gold-hi); font-size: 15px; }
.invite-banner[hidden] { display: none; }
.season-banner { background: linear-gradient(135deg, rgba(240, 125, 18, .22), rgba(90, 50, 130, .22)); border: 1px solid rgba(240, 138, 28, .55); }
.season-banner .sb-ico { font-size: 26px; line-height: 1; flex: none; }
.season-banner .ib-text b { color: #ffb347; }
.sk-item { position: relative; }
.sk-season { position: absolute; top: 6px; left: 6px; padding: 2px 7px; border-radius: 999px; font-style: normal; font-size: 10.5px; font-weight: 800;
  color: #2a1406; background: linear-gradient(135deg, #ffb347, #f07d12); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.inv-steps { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
.inv-step { display: flex; align-items: center; gap: 12px; text-align: left; }
.inv-step b { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--gold-grad); color: #2a1a07; font-size: 14px; }
.inv-link { word-break: break-all; color: var(--muted); }
.inv-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 12px; text-align: center; }
.inv-stats div { padding: 10px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.inv-stats b { display: block; font-size: 22px; color: var(--gold-hi); }
.inv-stats small { color: var(--muted); font-size: 12px; }
.kv-btn { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); color: inherit; font: inherit; cursor: pointer; }
.kv-btn b { display: inline-flex; align-items: center; gap: 6px; }
.copy-ico { width: 14px; height: 14px; display: inline-block; border: 2px solid var(--muted); border-radius: 3px; box-shadow: 3px -3px 0 -1px var(--muted); }


/* Чат клуба: чужое сообщение можно нажать — пожаловаться или заблокировать автора */
.ce-tap { cursor: pointer; }
.ce-tap:active .cm-body { filter: brightness(1.15); }
.msg-quote { margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); color: var(--muted, #cdbb9c); font-style: italic; overflow-wrap: anywhere; }
/* Настройки: удаление аккаунта и заблокированные игроки */
.btn.btn-danger { color: var(--danger); border-color: rgba(255, 106, 77, .35); }
.blocked-list .kv { align-items: center; }
.blocked-list .kv .btn { width: auto; flex: none; margin: 0; padding: 8px 14px; }
.card.set a { color: var(--gold); }
/* Друзья: строки о приглашении — по порядку, одна под другой */
.fr-bonus-lines { flex-direction: column; gap: 3px; }

/* ---------- Кубок выходного дня ---------- */
/* Плитки кубка и вечернего турнира — рядом, третьим рядом; сетка — пары по кругам, победитель выделен */
.tiles:has(.tour-tile + .tour-tile) .cup-tile .tour-text b { font-size: 13px; } /* «Вечерний турнир» — целиком */
.cup-round { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.cup-m { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.cup-m.me { border-color: rgba(227, 184, 102, .55); }
.cup-m.live { box-shadow: 0 0 0 1px rgba(126, 224, 143, .45) inset; }
.cup-m > i { font-style: normal; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cup-m.live > i { color: #7ee08f; }
.cup-p { display: flex; flex-direction: column; min-width: 0; font-weight: 700; font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cup-m .cup-p:last-child { text-align: right; align-items: flex-end; }
.cup-p small { font-size: 11px; font-weight: 700; opacity: .7; }
.cup-p.win { color: var(--gold-hi); }
.cup-p.bye { opacity: .5; }
.cup-ok { color: #7ee08f; }

/* Экран итогов: «Разбор · 2 ошибки» — заметнее, «без ошибок» — зелёным */
.result-row .btn.rv-bad { color: #ffb38a; border-color: rgba(255, 140, 90, .45); }
.result-row .btn.rv-good { color: #7ee08f; border-color: rgba(126, 224, 143, .4); }
