/* Покер — оформление. Тёмная тема, вертикальная раскладка, крупные карты.
   Мобильный экран первичен: всё, что нажимается, живёт в нижней трети. */

:root {
  --bg:        #0f1216;
  --surface:   #181d25;
  --surface-2: #222a35;
  --surface-3: #2c3542;
  --line:      #313b49;
  --text:      #e9eef4;
  --muted:     #8a97a8;
  --dim:       #5d6979;

  --gold:  #e8b962;
  --good:  #56c88a;
  --bad:   #e2635e;
  --info:  #5aa9e6;

  --felt-1: #1f6b50;
  --felt-2: #10362a;

  --suit-s: #10151c;
  --suit-h: #d33f3f;
  --suit-d: #2a7fd4;
  --suit-c: #1a9455;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  overscroll-behavior: none;
}
body { overflow: hidden; }

button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 650; }
.hidden { display: none !important; }

/* ─────────────────────────── общие элементы ─────────────────────────── */

.btn {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: var(--r-md);
  padding: 11px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .06s ease, background .15s ease, opacity .15s ease;
  touch-action: manipulation;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .38; cursor: default; }
.btn-primary { background: var(--gold); border-color: var(--gold); color: #241a06; }
.btn-ghost   { background: transparent; }
.btn-danger  { background: #4a2422; border-color: #6d332f; color: #ffb9b5; }
.btn-wide    { width: 100%; }
.btn-sm      { padding: 7px 11px; font-size: 13px; border-radius: 10px; }

.icon-btn {
  border: none; background: transparent; color: var(--muted);
  font-size: 22px; line-height: 1; padding: 8px 10px; border-radius: 10px;
  cursor: pointer; min-width: 40px;
}
.icon-btn:active { background: var(--surface-2); }

input[type=text], input[type=password], input[type=number], select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  outline: none;
}
input:focus, select:focus { border-color: var(--info); }

label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
label > input, label > select { margin-top: 6px; }

.screen { position: fixed; inset: 0; display: flex; flex-direction: column; }
.pos { color: var(--good); }
.neg { color: var(--bad); }
.zero { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }

.topbar {
  display: flex; align-items: center; gap: 6px;
  padding: calc(10px + var(--safe-t)) 10px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  flex: none;
}
.topbar-title { flex: 1; font-weight: 650; font-size: 17px; }
.topbar-actions { display: flex; gap: 2px; }

.sticky-foot {
  flex: none; padding: 12px 14px calc(12px + var(--safe-b));
  border-top: 1px solid var(--line); background: var(--surface);
}

/* ───────────────────────────── уведомления ─────────────────────────── */

/* Ниже шапки: иначе всплывашка ложится прямо на заголовок экрана. */
.toasts {
  position: fixed; left: 50%; transform: translateX(-50%);
  top: calc(58px + var(--safe-t)); z-index: 90;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  pointer-events: none; width: min(94vw, 460px);
}
.toast {
  background: var(--surface-3); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 16px; font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  animation: toast-in .18s ease;
}
.toast.err { background: #4a2422; border-color: #7a3a35; color: #ffcbc7; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

.net-badge {
  position: fixed; z-index: 95; left: 50%; transform: translateX(-50%);
  top: calc(8px + var(--safe-t));
  background: #4a3a12; border: 1px solid #7d6220; color: #ffdc9b;
  border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.net-badge .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
  animation: pulse 1s infinite;
}
@keyframes pulse { 50% { opacity: .25; } }

/* ─────────────────────────────── вход ──────────────────────────────── */

.screen-auth { justify-content: center; align-items: center; padding: 20px; overflow: auto; }
.auth-card { width: min(100%, 400px); }
.auth-logo { font-size: 44px; line-height: 1; letter-spacing: -6px; }
.auth-logo span { color: var(--suit-h); }
.screen-auth h1 { font-size: 30px; margin: 10px 0 6px; }
.auth-sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }

.tabs { display: flex; gap: 6px; background: var(--surface); padding: 4px;
        border-radius: var(--r-md); margin-bottom: 18px; }
.tab { flex: 1; border: none; background: transparent; color: var(--muted);
       padding: 9px; border-radius: 10px; font-weight: 600; cursor: pointer; }
.tab.active { background: var(--surface-3); color: var(--text); }
.form-error { color: var(--bad); font-size: 13px; min-height: 18px; margin: 2px 0 10px; }

/* ─────────────────────────────── лобби ─────────────────────────────── */

.lobby-body { flex: 1; overflow: auto; padding: 14px 14px calc(20px + var(--safe-b)); }

.you-strip {
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 14px 16px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 14px;
}
.you-strip .who { flex: 1; min-width: 0; }
.you-strip .nick { font-weight: 650; font-size: 17px; }
.you-strip .sub { color: var(--muted); font-size: 12.5px; }
.you-strip .net { text-align: right; }
.you-strip .net b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.you-strip .net span { color: var(--dim); font-size: 11px; text-transform: uppercase;
                       letter-spacing: .06em; }

.join-row { display: flex; gap: 8px; margin-bottom: 18px; }
.join-row input { text-transform: uppercase; letter-spacing: .18em; font-weight: 600;
                  text-align: center; }
.join-row .btn { flex: none; }

.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.section-head h2 { flex: 1; font-size: 14px; color: var(--muted); font-weight: 600;
                   text-transform: uppercase; letter-spacing: .07em; }

.table-list { display: flex; flex-direction: column; gap: 10px; }
.table-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 14px; cursor: pointer;
  transition: border-color .15s ease;
}
.table-card:active { border-color: var(--gold); }
.table-card .row1 { display: flex; align-items: baseline; gap: 8px; }
.table-card .tname { font-weight: 650; font-size: 16px; flex: 1; }
.table-card .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
                    color: var(--gold); letter-spacing: .12em; font-size: 13px; }
.table-card .row2 { color: var(--muted); font-size: 13px; margin-top: 4px;
                    display: flex; flex-wrap: wrap; gap: 4px 10px; }
.table-card .nicks { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.pill { background: var(--surface-2); border-radius: 999px; padding: 2px 9px; font-size: 12px; }
.pill.on { background: #3a2f12; color: var(--gold); }
.empty-note { color: var(--dim); text-align: center; padding: 34px 10px; font-size: 14px; }

/* ─────────────────────────── форма создания ────────────────────────── */

.form-body { flex: 1; overflow: auto; padding: 14px 14px 20px; }
.fieldset { background: var(--surface); border: 1px solid var(--line);
            border-radius: var(--r-lg); padding: 14px; margin-bottom: 14px; }
.fieldset > h3 { font-size: 13px; color: var(--muted); text-transform: uppercase;
                 letter-spacing: .07em; margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 9px 0;
              border-top: 1px solid var(--line); }
.switch-row:first-of-type { border-top: none; }
.switch-row .lbl { flex: 1; }
.switch-row .lbl b { display: block; font-weight: 600; font-size: 14.5px; }
.switch-row .lbl span { color: var(--dim); font-size: 12px; }
.switch { position: relative; width: 46px; height: 27px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0;
                cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; background: var(--surface-3);
            border-radius: 999px; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px;
                   width: 21px; height: 21px; border-radius: 50%; background: #fff;
                   transition: transform .15s; }
.switch input:checked + i { background: var(--gold); }
.switch input:checked + i::after { transform: translateX(19px); }
.hint { color: var(--dim); font-size: 12px; margin: -4px 0 12px; }

/* ────────────────────────────── карты ──────────────────────────────── */

.card {
  --w: 44px;
  width: var(--w); height: calc(var(--w) * 1.42);
  border-radius: calc(var(--w) * .13);
  background: linear-gradient(170deg, #fdfefe, #e7ecf2);
  color: var(--suit-s);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1; font-weight: 750; flex: none;
  box-shadow: 0 2px 5px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.08);
  user-select: none;
}
.card .r { font-size: calc(var(--w) * .52); letter-spacing: -.02em; }
.card .s { font-size: calc(var(--w) * .42); margin-top: calc(var(--w) * .04); }
.card.s-s { color: var(--suit-s); }
.card.s-h { color: var(--suit-h); }
.card.s-d { color: var(--suit-d); }
.card.s-c { color: var(--suit-c); }
.card.back {
  background:
    repeating-linear-gradient(45deg, #2b4c7e 0 5px, #24406b 5px 10px);
  box-shadow: 0 2px 5px rgba(0,0,0,.45), inset 0 0 0 2px rgba(255,255,255,.12);
}
.card.dim { opacity: .34; filter: grayscale(.5); }
.card.win { outline: 2px solid var(--gold); outline-offset: 1px; }
.card.new { animation: deal .22s ease; }
@keyframes deal { from { opacity: 0; transform: translateY(-9px) scale(.9); } }

/* ────────────────────────────── стол ───────────────────────────────── */

.screen-table {
  background:
    radial-gradient(120% 62% at 50% 34%, var(--felt-1) 0%, var(--felt-2) 62%, var(--bg) 100%);
}
.table-top {
  display: flex; align-items: center; gap: 4px; flex: none;
  padding: calc(6px + var(--safe-t)) 6px 6px;
  background: rgba(0,0,0,.28); backdrop-filter: blur(6px);
}
.table-title { flex: 1; min-width: 0; text-align: center; }
.t-name { font-weight: 650; font-size: 15px; white-space: nowrap;
          overflow: hidden; text-overflow: ellipsis; }
.t-sub { font-size: 11.5px; color: #b9cdc4; font-variant-numeric: tabular-nums; }

/* Оппоненты жмутся к верху и занимают ровно столько, сколько нужно;
   всё свободное место достаётся борду, чтобы он стоял по центру экрана,
   а не уезжал вниз, когда за столом двое. */
.opponents {
  flex: 0 1 auto; min-height: 0; max-height: 42vh;
  overflow-y: auto; overflow-x: hidden;
  padding: 8px; display: grid; gap: 7px; align-content: start;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
}
.seat {
  background: rgba(6,14,11,.42); border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--r-md); padding: 7px 9px; position: relative;
  transition: border-color .15s ease, opacity .2s ease;
}
.seat.empty { border-style: dashed; opacity: .45; text-align: center;
              display: flex; align-items: center; justify-content: center;
              min-height: 58px; cursor: pointer; font-size: 13px; color: #cfe0d8; }
.seat.empty:active { opacity: .8; }
.seat.turn { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold),
             0 0 16px rgba(232,185,98,.28); }
.seat.folded { opacity: .42; }
.seat.out { opacity: .5; }
.seat .line1 { display: flex; align-items: center; gap: 5px; }
.seat .nick { font-weight: 600; font-size: 13.5px; flex: 1; min-width: 0;
              overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .stack { font-size: 13.5px; font-variant-numeric: tabular-nums; color: #d8ece2; }
.seat .line2 { display: flex; align-items: center; gap: 6px; margin-top: 4px; min-height: 20px; }
.seat .mini { display: flex; gap: 2px; }
.seat .act { font-size: 11.5px; color: #a8bfb5; text-transform: uppercase;
             letter-spacing: .05em; flex: 1; }
.seat .act.raise { color: var(--gold); }
.seat .act.fold { color: var(--dim); }
.seat .bet { background: rgba(0,0,0,.4); border: 1px solid rgba(232,185,98,.4);
             color: var(--gold); border-radius: 999px; padding: 1px 8px;
             font-size: 12px; font-variant-numeric: tabular-nums; }
.seat .won { position: absolute; right: 8px; top: 6px; color: var(--good);
             font-weight: 700; font-size: 13px; animation: pop .3s ease; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.badge { font-size: 10px; font-weight: 700; border-radius: 4px; padding: 1px 4px;
         line-height: 1.35; }
.badge.d  { background: #fff; color: #111; }
.badge.sb { background: rgba(255,255,255,.2); }
.badge.bb { background: rgba(255,255,255,.3); }
.badge.host { background: rgba(232,185,98,.25); color: var(--gold); }
.seat .offline { color: var(--dim); font-size: 11px; }
.seat .ring { position: absolute; left: 0; bottom: 0; height: 2px;
              background: var(--gold); transition: width .1s linear; }
.seat .hand-desc { font-size: 11px; color: var(--gold); margin-top: 2px; }

/* overflow-y обязателен: на бомб-поте с четырьмя бордами карты выше отведённого
   места, и без прокрутки они выдавливали бы вниз кнопки действий. */
.center {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: 4px 8px 8px; text-align: center;
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
}
.boards { display: flex; flex-direction: column; gap: 5px; align-items: center; }
.board { display: flex; gap: 4px; align-items: center; }
.board .bnum { color: rgba(255,255,255,.4); font-size: 10px; width: 12px;
               text-align: right; font-weight: 700; }
.board .card { --w: 42px; }
.pot-row { margin-top: 8px; display: flex; gap: 8px; justify-content: center;
           flex-wrap: wrap; align-items: center; }
.pot {
  background: rgba(0,0,0,.42); border: 1px solid rgba(232,185,98,.35);
  border-radius: 999px; padding: 3px 14px; font-weight: 700; color: var(--gold);
  font-variant-numeric: tabular-nums; font-size: 15px;
}
.pot .lbl { color: #a89468; font-weight: 600; font-size: 11px; margin-right: 5px;
            text-transform: uppercase; letter-spacing: .06em; }
.side-pot { font-size: 12.5px; padding: 2px 10px; opacity: .8; }
.street-note { margin-top: 6px; font-size: 12px; color: #cfe4da; min-height: 16px; }
.street-note b { color: var(--gold); }

/* Ровно две строки: третья не помещалась и обрезалась пополам. */
.feed {
  flex: none; height: 34px; overflow: hidden; padding: 0 12px 2px;
  font-size: 12px; line-height: 16px; color: #b6cdc3;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.feed div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed .result { color: var(--gold); font-weight: 600; }

.hero {
  flex: none; padding: 6px 12px 4px;
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center;
}
.hero-cards { display: flex; gap: 5px; }
.hero-cards .card { --w: 62px; }
.hero-info { min-width: 0; }
.hero-nick { font-weight: 650; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.hero-stack { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer { grid-column: 1 / -1; height: 5px; background: rgba(0,0,0,.35);
         border-radius: 999px; overflow: hidden; position: relative; margin-top: 4px; }
.timer.hidden-soft { opacity: 0; }
.timer-fill { height: 100%; width: 100%; background: var(--good);
              transition: width .1s linear, background .3s ease; }
.timer-fill.warn { background: var(--gold); }
.timer-fill.danger { background: var(--bad); }
.timer span { position: absolute; right: 4px; top: -17px; font-size: 11px;
              color: var(--muted); font-variant-numeric: tabular-nums; }

/* Режим открытых карт виден всему столу — потому и полоса во всю ширину,
   а не скромная иконка где-то в углу. */
.xray-banner {
  flex: none; background: #5a3410; border-top: 1px solid #a8701f;
  color: #ffd9a0; font-size: 12.5px; font-weight: 600;
  padding: 7px 12px; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.xray-banner b { color: #fff; }
.seat .badge.xray { background: #a8701f; color: #fff; }

.actionbar {
  flex: none; background: rgba(0,0,0,.4); backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,.09);
  padding: 9px 10px calc(9px + var(--safe-b));
  display: flex; flex-direction: column; gap: 8px; min-height: 62px;
}
.act-row { display: flex; gap: 8px; }
.act-row .btn { flex: 1; padding: 14px 8px; font-size: 15.5px; }
.act-row .btn b { display: block; font-size: 12px; opacity: .75; font-weight: 600; }
.btn-fold { background: #3a2220; border-color: #5c332f; color: #ffb0ab; }
.btn-check { background: #1e3b2f; border-color: #2f5c49; color: #b6f0d2; }
.btn-call { background: #1e3b2f; border-color: #2f5c49; color: #b6f0d2; }
.btn-raise { background: var(--gold); border-color: var(--gold); color: #241a06; }
.waiting-note { text-align: center; color: #a9c2b8; font-size: 13px; padding: 6px 0; }

.raise-panel { display: flex; flex-direction: column; gap: 9px; }
.raise-top { display: flex; align-items: center; gap: 10px; }
.raise-amount { font-size: 24px; font-weight: 750; font-variant-numeric: tabular-nums;
                flex: 1; color: var(--gold); }
.chips-row { display: flex; gap: 6px; }
.chips-row .btn { flex: 1; padding: 8px 4px; font-size: 12.5px; }
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 30px;
  background: transparent; margin: 0;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 6px; background: var(--surface-3); border-radius: 999px;
}
input[type=range]::-moz-range-track { height: 6px; background: var(--surface-3);
  border-radius: 999px; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold); margin-top: -11px; box-shadow: 0 2px 6px rgba(0,0,0,.5);
}
input[type=range]::-moz-range-thumb { width: 28px; height: 28px; border: none;
  border-radius: 50%; background: var(--gold); }

/* ───────────────────────── выдвижная панель ────────────────────────── */

.sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.sheet-panel {
  position: relative; width: 100%; max-height: 84vh; overflow: auto;
  background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0;
  border-top: 1px solid var(--line);
  padding: 8px 16px calc(20px + var(--safe-b));
  animation: sheet-up .2s ease;
}
@keyframes sheet-up { from { transform: translateY(100%); } }
/* Язычок кликабелен целиком: на телефоне панель занимает почти весь экран,
   и «промахнуться мимо фона», чтобы её закрыть, слишком легко. */
.sheet-grip { width: 100%; padding: 6px 0 10px; cursor: pointer; }
.sheet-grip::before { content: ""; display: block; width: 38px; height: 4px;
                      border-radius: 999px; background: var(--surface-3); margin: 0 auto; }
.sheet-close {
  position: absolute; top: 8px; right: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: var(--surface-2); color: var(--muted);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.sheet-close:active { background: var(--surface-3); }
.sheet-panel h3 { margin: 4px 0 12px; font-size: 17px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%;
             background: transparent; border: none; border-bottom: 1px solid var(--line);
             padding: 15px 2px; text-align: left; cursor: pointer; font-size: 15px; }
.menu-item:last-child { border-bottom: none; }
.menu-item .ico { width: 22px; text-align: center; font-size: 18px; }
.menu-item.danger { color: var(--bad); }

.chat-log { max-height: 40vh; overflow: auto; display: flex; flex-direction: column;
            gap: 7px; margin-bottom: 12px; }
.chat-log .msg { font-size: 14px; }
.chat-log .msg b { color: var(--gold); font-weight: 600; }
.chat-form { display: flex; gap: 8px; }

/* ───────────────────────────── статистика ──────────────────────────── */

.stats-body { flex: 1; overflow: auto; padding: 14px 14px calc(24px + var(--safe-b)); }
.stat-hero { background: var(--surface); border: 1px solid var(--line);
             border-radius: var(--r-lg); padding: 18px; text-align: center;
             margin-bottom: 14px; }
.stat-hero .big { font-size: 40px; font-weight: 750; font-variant-numeric: tabular-nums;
                  line-height: 1.1; }
.stat-hero .cap { color: var(--dim); font-size: 12px; text-transform: uppercase;
                  letter-spacing: .07em; margin-top: 2px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
             margin-bottom: 14px; }
.stat-box { background: var(--surface); border: 1px solid var(--line);
            border-radius: var(--r-md); padding: 12px 10px; text-align: center; }
.stat-box b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; }
.stat-box span { color: var(--dim); font-size: 11px; }

.chart { background: var(--surface); border: 1px solid var(--line);
         border-radius: var(--r-lg); padding: 14px; margin-bottom: 14px; }
.chart svg { width: 100%; height: 130px; display: block; overflow: visible; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--gold); stroke-width: 2;
               stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: rgba(232,185,98,.13); }
.chart .zero { stroke: var(--dim); stroke-dasharray: 3 3; stroke-width: 1; }

.day-list { display: flex; flex-direction: column; }
.day-row { display: flex; align-items: center; gap: 10px; padding: 12px 2px;
           border-bottom: 1px solid var(--line); }
.day-row:last-child { border-bottom: none; }
.day-row .d { flex: 1; }
.day-row .d b { font-weight: 600; }
.day-row .d span { display: block; color: var(--dim); font-size: 12px; }
.day-row .v { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 16px; }
.day-row .live { color: var(--gold); font-size: 11px; }

.lb-row { display: flex; align-items: center; gap: 12px; padding: 11px 2px;
          border-bottom: 1px solid var(--line); }
.lb-row:last-child { border-bottom: none; }
.lb-row .rank { width: 22px; color: var(--dim); font-weight: 700; text-align: center; }
.lb-row .who { flex: 1; }
.lb-row .who b { font-weight: 600; }
.lb-row .who span { display: block; color: var(--dim); font-size: 12px; }
.lb-row .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.lb-row.me { background: rgba(232,185,98,.07); border-radius: var(--r-sm); }

.tabs.sub { margin: 4px 0 14px; }

/* ────────────────────── широкие экраны (ноутбук) ───────────────────── */

@media (min-width: 760px) {
  .screen-table { align-items: center; }
  .opponents, .center, .feed, .hero {
    width: 100%; max-width: 620px; margin-inline: auto;
  }
  /* Верхняя и нижняя панели — во всю ширину окна, как в обычном приложении:
     узкая полоска посреди сукна выглядит недоделанной. Содержимое внутри
     всё равно держится колонки. */
  .table-top, .actionbar { width: 100%; max-width: none; }
  .table-top .table-title { max-width: 560px; margin-inline: auto; }
  .actionbar > * { width: 100%; max-width: 620px; margin-inline: auto; }
  .opponents { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .board .card { --w: 54px; }
  .hero-cards .card { --w: 78px; }
  .lobby-body, .stats-body, .form-body { max-width: 680px; margin-inline: auto; width: 100%; }
  .topbar, .sticky-foot { max-width: 680px; margin-inline: auto; width: 100%; }
  .sheet-panel { max-width: 520px; margin: 0 auto; border-radius: var(--r-lg);
                 margin-bottom: 5vh; }
  .sheet { align-items: center; justify-content: center; }
}

@media (min-width: 1080px) {
  .feed { height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
