﻿:root {
  --bg-top: #170f15;
  --bg-bottom: #09060b;
  --panel: linear-gradient(165deg, rgba(34, 19, 31, 0.92), rgba(16, 11, 18, 0.96));
  --line: rgba(231, 171, 68, 0.46);
  --line-soft: rgba(231, 171, 68, 0.2);
  --text: #f8e2b6;
  --muted: #c9ab78;
  --accent: #f4c252;
  --accent-dark: #c68d23;
  --success: #ffd77a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", "Trebuchet MS", sans-serif;
  background: linear-gradient(165deg, var(--bg-top), var(--bg-bottom));
  background-attachment: fixed;
  position: relative;
}

@media (max-width: 900px) {
  body[data-page="tournament-levels"],
  body[data-page="tournament-seating"],
  body[data-page="tournament-admin"],
  body[data-page="tournament-report"] {
    font-size: 14px;
  }
  body[data-page="tournament-levels"] h2,
  body[data-page="tournament-seating"] h2,
  body[data-page="tournament-admin"] h2,
  body[data-page="tournament-report"] h2 {
    font-size: 1.15rem;
  }
  body[data-page="tournament-levels"] .btn,
  body[data-page="tournament-seating"] .btn,
  body[data-page="tournament-admin"] .btn,
  body[data-page="tournament-report"] .btn {
    font-size: 0.9rem;
    padding: 0.45rem 0.65rem;
  }
  body[data-page="tournament-levels"] .input-inline,
  body[data-page="tournament-seating"] .input-inline,
  body[data-page="tournament-admin"] .input-inline,
  body[data-page="tournament-report"] .input-inline {
    font-size: 0.9rem;
  }
  body[data-page="tournament-levels"] .panel,
  body[data-page="tournament-seating"] .panel,
  body[data-page="tournament-admin"] .panel,
  body[data-page="tournament-report"] .panel {
    padding: 0.7rem;
  }
  body[data-page="tournament-levels"] .hero-actions,
  body[data-page="tournament-seating"] .hero-actions,
  body[data-page="tournament-admin"] .hero-actions,
  body[data-page="tournament-report"] .hero-actions {
    gap: 0.5rem;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 12px;
  border: 1px solid var(--line-soft);
  pointer-events: none;
  box-shadow: inset 0 0 36px rgba(231, 171, 68, 0.08);
}

body[data-page="home"] {
  background-image:
    linear-gradient(180deg, rgba(8, 6, 10, 0.88), rgba(8, 6, 10, 0.96)),
    linear-gradient(165deg, var(--bg-top), var(--bg-bottom));
  background-size: 100% 100%, 100% 100%;
  background-position: center, center;
  background-repeat: no-repeat;
}

body[data-page="home"]::before {
  background: none;
}

/* Mobile rendering fix for dealer table:
   avoid fixed background/pseudo-frame artifacts (black stripes on some devices). */
body[data-page="dealer-table"] {
  background-attachment: scroll;
}

a {
  color: inherit;
}

.site-header {
  width: min(1600px, calc(100% - 2rem));
  margin: 1rem auto 0;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), inset 0 0 0 1px var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  z-index: 10;
}

.logo {
  text-decoration: none;
  letter-spacing: 0.1em;
  font-family: "Russo One", "Oswald", sans-serif;
  font-size: 1.9rem;
  color: var(--accent);
  text-shadow: 0 0 22px rgba(244, 194, 82, 0.28);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.04em;
  white-space: nowrap;
}

.logo-mark {
  position: relative;
  display: inline-block;
  width: 0.98em;
  height: 0.98em;
  margin-right: 0.03em;
  color: transparent;
  vertical-align: -0.08em;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("assets/logo_mark.jpg");
  filter: drop-shadow(0 0 8px rgba(255, 214, 122, 0.35));
}

.logo-mark::before {
  content: none;
}

.logo-mark::after {
  content: none;
}

.logo span {
  color: #fff3d1;
  margin-left: 0.25rem;
}


.site-nav {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.club-switcher-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.club-switcher-label {
  font-size: 0.75rem;
  color: var(--muted);
}

#global-club-switcher-select {
  min-width: 170px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(8, 14, 22, 0.95);
  color: var(--text);
  padding: 0.3rem 0.45rem;
}

.page-subnav {
  position: sticky;
  top: 0.75rem;
  z-index: 9;
  width: min(1600px, calc(100% - 2rem));
  margin: 1rem auto 0.5rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 0 0 1px var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
}

.page-subnav a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: 160ms ease;
}

.page-subnav a:hover,
.page-subnav a:focus-visible {
  color: var(--text);
  border-color: var(--line);
  box-shadow: 0 0 10px rgba(244, 194, 82, 0.18);
}

main [id] {
  scroll-margin-top: 6rem;
}

.levels-collapsible {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  background: rgba(10, 8, 12, 0.35);
}

.levels-collapsible summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.levels-collapsible summary::-webkit-details-marker {
  display: none;
}

.levels-collapsible summary::before {
  content: "▸";
  color: var(--accent);
  font-size: 1rem;
  transition: transform 160ms ease;
}

.levels-collapsible[open] summary::before {
  transform: rotate(90deg);
}

.levels-collapsible .levels-list {
  margin-top: 0.6rem;
}

.nav-item {
  position: relative;
}

.nav-trigger {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0.35rem 0.55rem;
  border-radius: 4px;
  font: inherit;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: 160ms ease;
}

.nav-trigger::after {
  content: "▾";
  margin-left: 0.35rem;
  font-size: 0.7em;
  opacity: 0.7;
}

.nav-trigger:hover,
.nav-trigger.active {
  color: var(--text);
  border-color: var(--line);
  background: rgba(231, 171, 68, 0.12);
}

.nav-panel {
  position: absolute;
  top: calc(100% + 0.65rem);
  left: 0;
  min-width: 220px;
  padding: 0.6rem;
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.45);
  z-index: 20;
}

.nav-panel::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-item.open .nav-panel {
  display: grid;
}

.nav-panel a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.42rem 0.6rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: 160ms ease;
}

.nav-panel a:hover,
.nav-panel a.active {
  color: var(--text);
  border-color: var(--line);
  background: rgba(231, 171, 68, 0.12);
}

.admin-only,
.dealer-only {
  display: none;
}

.role-admin .admin-only {
  display: block;
}

.role-dealer .dealer-only {
  display: block;
}

.tournament-admin-only {
  display: none;
}

.role-tournament-admin .tournament-admin-only,
.role-admin .tournament-admin-only {
  display: block;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  background: transparent;
  padding: 0.4rem 0.7rem;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
}

main {
  width: min(1600px, calc(100% - 2rem));
  margin: 1rem auto 2rem;
  display: grid;
  gap: 1rem;
}

.home-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.home-latest-tg {
  padding: 1rem;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.55rem;
}

.home-latest-tg h2 {
  margin-top: 0;
}

.home-latest-tg-body {
  min-height: 0;
}

.home-latest-tg-meta {
  margin: 0 0 0.4rem;
  font-size: 0.86rem;
  color: #d3c39f;
}

.home-latest-tg-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  line-height: 1.2;
}

.home-latest-tg-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
  overflow: hidden;
}

.home-latest-tg-media-wrap {
  border: 1px solid rgba(198, 173, 96, 0.24);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.65rem;
  max-height: 240px;
}

.home-latest-tg-media {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
}

.home-latest-tg .hero-actions {
  margin-top: 0.3rem;
}

.hero,
.page-title,
.panel,
.table-panel,
.telegram-banner,
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line-soft), 0 6px 24px rgba(0, 0, 0, 0.35);
}

.hero,
.page-title {
  padding: clamp(1.3rem, 2vw, 2rem);
}

.overline {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

h1,
h2 {
  margin-top: 0.5rem;
  margin-bottom: 0.6rem;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffe7b1;
  text-shadow: 0 0 18px rgba(244, 194, 82, 0.22);
}

h1 {
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  line-height: 1.04;
}

.lead {
  max-width: 70ch;
  color: var(--muted);
}

.hero-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.admin-mini-menu {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-mini-menu-panel {
  display: none;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.admin-mini-menu-panel.open {
  display: flex;
}

.dealer-table-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.dealer-table-selector .dealer-table-locked {
  border-color: rgba(98, 206, 123, 0.65);
  background: linear-gradient(180deg, rgba(52, 128, 73, 0.55), rgba(24, 74, 38, 0.55));
  color: #d4ffdf;
}

.dealer-table-selector .dealer-table-locked-mine {
  border-color: rgba(114, 225, 145, 0.92);
  background: linear-gradient(180deg, rgba(58, 146, 86, 0.78), rgba(26, 90, 48, 0.78));
  box-shadow: inset 0 0 0 1px rgba(180, 255, 202, 0.35);
}

.dealer-table-selector .dealer-table-locked-foreign {
  border-color: rgba(79, 184, 105, 0.92);
  background: linear-gradient(180deg, rgba(42, 109, 64, 0.82), rgba(18, 63, 34, 0.82));
  color: #c1f7cf;
}

.dealer-table-selector .dealer-table-locked:disabled {
  opacity: 0.85;
  cursor: not-allowed;
}

.qr-preview-wrap {
  margin-top: 0.65rem;
  display: inline-flex;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 0.5rem;
  background: rgba(8, 7, 12, 0.78);
}

.qr-preview-wrap img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  border-radius: 6px;
  background: #ffffff;
}

body.global-auth-enabled .admin-auth,
body.global-auth-enabled #monitor-auth {
  display: none !important;
}

.header-user-area {
  margin-left: auto;
  position: relative;
  display: inline-flex;
  align-items: center;
}

.header-user-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(9, 10, 16, 0.75);
  color: #f2e6c6;
  font-size: 0.86rem;
  cursor: pointer;
}

.header-user-trigger img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.header-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(8, 10, 14, 0.95);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  z-index: 40;
}

.header-user-area.open .header-user-menu {
  display: flex;
}

.header-user-menu a,
.header-user-menu button {
  text-align: left;
  border: 0;
  background: transparent;
  color: #f0e2bc;
  text-decoration: none;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
}

.header-user-menu a:hover,
.header-user-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.global-auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 10, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 1rem;
}

.global-auth-modal.open {
  display: flex;
}

.global-auth-dialog {
  width: min(420px, 100%);
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(11, 12, 19, 0.98);
  padding: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.global-auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.global-auth-close {
  border: 1px solid var(--line-soft);
  background: transparent;
  color: #f0dfb8;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  cursor: pointer;
}

.global-auth-status {
  margin-top: 0.55rem;
  font-size: 0.86rem;
  color: var(--muted);
}

body.tournament-monitor-page {
  overflow: hidden;
}

.monitor-main {
  height: calc(100vh - 86px);
  padding: 0.3rem 0.7rem 0.55rem;
}

.monitor-auth {
  max-width: 540px;
}

.monitor-dashboard {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.22rem;
  min-height: 0;
}

.monitor-topline {
  display: flex;
  align-items: flex-end;
  flex-wrap: nowrap;
  gap: 0.22rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.08rem;
}

.monitor-topline > * {
  flex: 0 0 auto;
}

.monitor-topline > .input-inline {
  width: clamp(260px, 28vw, 420px);
}

.monitor-topline > .btn {
  white-space: nowrap;
}

.monitor-topline > #monitor-lock-toggle {
  max-width: none;
}

.monitor-controls {
  display: flex;
  align-items: flex-end;
  flex-wrap: nowrap;
  gap: 0.18rem;
}

.monitor-controls .btn {
  min-width: 34px;
  min-height: 28px;
  padding: 0.18rem 0.34rem;
  font-size: 0.74rem;
  line-height: 1;
}

.monitor-square-icon-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.monitor-square-icon-btn .monitor-icon {
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.monitor-square-icon-btn .monitor-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.monitor-addon-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
}

.monitor-ad-badge {
  position: relative;
  width: 1.8rem;
  min-width: 1.8rem;
  height: 1.35rem;
  border-radius: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.26);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  background: rgba(101, 29, 29, 0.55);
  color: #ffd9d9;
}

.monitor-ad-badge::after {
  content: "";
  position: absolute;
  left: 0.16rem;
  right: 0.16rem;
  top: 50%;
  height: 2px;
  background: #ff3e3e;
  transform: translateY(-50%) rotate(-18deg);
  box-shadow: 0 0 6px rgba(255, 44, 44, 0.55);
}

.monitor-addon-toggle-btn.is-allowed .monitor-ad-badge {
  background: rgba(27, 95, 53, 0.6);
  border-color: rgba(118, 221, 151, 0.65);
  color: #d7ffe3;
}

.monitor-addon-toggle-btn.is-allowed .monitor-ad-badge::after {
  display: none;
}

.monitor-addon-toggle-btn .monitor-btn-text {
  white-space: nowrap;
}

.monitor-lock-toggle-btn {
  position: relative;
}

.monitor-lock-toggle-btn .monitor-lock-icon {
  width: 18px;
  height: 18px;
}

.monitor-lock-toggle-btn .monitor-lock-icon .is-open,
.monitor-lock-toggle-btn .monitor-lock-icon .is-closed {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.monitor-lock-toggle-btn .monitor-lock-icon .is-closed {
  display: none;
}

.monitor-lock-toggle-btn.is-locked .monitor-lock-icon .is-open {
  display: none;
}

.monitor-lock-toggle-btn.is-locked .monitor-lock-icon .is-closed {
  display: block;
}

body.tournament-monitor-page .monitor-topline .btn {
  padding: 0.22rem 0.4rem;
  font-size: 0.71rem;
  line-height: 1;
}

body.tournament-monitor-page .monitor-topline .monitor-square-icon-btn {
  padding: 0;
}

body.tournament-monitor-page .monitor-topline .input-inline {
  gap: 0.14rem;
  font-size: 0.68rem;
}

body.tournament-monitor-page .monitor-topline .input-inline input,
body.tournament-monitor-page .monitor-topline .input-inline select {
  min-height: 28px;
  padding: 0.18rem 0.34rem;
  font-size: 0.74rem;
}

.monitor-controls .input-inline {
  width: 72px;
}

.monitor-controls #monitor-set-minutes {
  width: 100%;
  text-align: center;
}

.monitor-timer-line {
  margin: 0;
  padding: 0.28rem 0.45rem;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(6, 9, 16, 0.62);
  font-weight: 700;
  font-size: 0.9rem;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.03em;
}

.monitor-tables-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(172px, 1fr));
  gap: 0.5rem;
  align-content: start;
  overflow: visible;
  position: relative;
  z-index: 10;
}

@media (max-width: 1320px) {
  .monitor-tables-grid {
    grid-template-columns: repeat(2, minmax(172px, 1fr));
  }
}

@media (max-width: 760px) {
  .monitor-tables-grid {
    grid-template-columns: 1fr;
  }
  .monitor-seat-list {
    grid-template-columns: 1fr;
  }
}

.monitor-layout-grid {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(480px, 546px);
  gap: 0.55rem;
  overflow: visible;
}

body.tournament-monitor-page {
  --monitor-list-visible-rows: 10;
  --monitor-waiting-row-height: 2.05rem;
  --monitor-out-row-height: 1.9rem;
}

.monitor-add-player-modal {
  position: fixed;
  inset: 0;
  z-index: 1600;
  background: rgba(4, 7, 12, 0.72);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.monitor-add-player-modal[hidden] {
  display: none !important;
}

.monitor-add-player-window {
  width: min(980px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(10, 14, 20, 0.98);
  padding: 0.6rem;
  display: grid;
  gap: 0.45rem;
  overflow: auto;
}

.monitor-table-window {
  width: min(1240px, calc(100vw - 2rem));
}

.monitor-chips-window {
  width: calc(100vw - 1rem);
  max-height: calc(100vh - 1rem);
  height: calc(100vh - 1rem);
  padding: 0.55rem;
  gap: 0.35rem;
}

.monitor-chips-grid {
  min-height: 0;
  height: 100%;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.45rem;
  align-content: start;
}

.monitor-chips-table-card {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(7, 10, 16, 0.92);
  padding: 0.35rem;
  display: grid;
  gap: 0.3rem;
}

.monitor-chips-table-card h4 {
  margin: 0;
  font-size: 0.85rem;
}

.monitor-chips-table {
  width: 100%;
  table-layout: fixed;
}

.monitor-chips-table th,
.monitor-chips-table td {
  padding: 0.18rem 0.22rem;
  font-size: 0.68rem;
  line-height: 1.2;
  white-space: nowrap;
}

.monitor-chips-table th:nth-child(1),
.monitor-chips-table td:nth-child(1) {
  width: 12%;
  text-align: center;
}

.monitor-chips-table th:nth-child(2),
.monitor-chips-table td:nth-child(2) {
  width: 43%;
}

.monitor-chips-table th:nth-child(3),
.monitor-chips-table td:nth-child(3) {
  width: 45%;
}

.monitor-chips-table .input-compact {
  min-height: 28px;
  padding: 0.2rem 0.3rem;
  font-size: 0.74rem;
}

.monitor-chips-player-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.monitor-table-toolbar {
  grid-template-columns: minmax(320px, 1fr) auto;
}

.monitor-table-list {
  max-height: calc(100vh - 280px);
  overflow: auto;
}

.monitor-table-actions-table {
  width: 100%;
}

.monitor-table-actions-table .hero-actions {
  margin-top: 0;
  gap: 0.25rem;
  align-items: center;
}

.monitor-table-actions-table .btn {
  padding: 0.35rem 0.5rem;
}

.monitor-table-actions-table .btn[data-modal-op="reentry"],
.monitor-table-actions-table .btn[data-modal-op="addon"],
.monitor-table-actions-table .btn[data-modal-op="addon15"] {
  min-width: 2.35rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.monitor-table-actions-table input[data-modal-move-table],
.monitor-table-actions-table input[data-modal-move-seat] {
  width: 64px;
  min-width: 64px;
  padding: 0.3rem 0.35rem;
}

.monitor-table-seat-toolbar {
  grid-template-columns: minmax(280px, 1fr) minmax(160px, 200px) auto;
}

.monitor-add-player-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.monitor-add-player-head h3 {
  margin: 0;
  font-size: 1rem;
}

.monitor-add-player-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  gap: 0.38rem;
  align-items: end;
}

.monitor-add-player-quick {
  grid-template-columns: minmax(160px, 1fr) minmax(200px, 1fr) minmax(180px, 1fr) auto;
  padding-top: 0.2rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.14);
}

.monitor-add-player-status {
  min-height: 1rem;
  font-size: 0.76rem;
  color: var(--muted);
}

.monitor-add-player-list {
  max-height: calc(100vh - 220px);
  overflow: auto;
}

.monitor-left-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 0.22rem;
  overflow: visible;
  position: relative;
  z-index: 12;
}

.monitor-side-stack {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(180px, 1fr) minmax(150px, 0.65fr) minmax(160px, 0.9fr);
  gap: 0.5rem;
  position: relative;
  z-index: 2;
}

.monitor-stats-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.24rem;
  align-items: start;
  grid-auto-rows: min-content;
}

.monitor-player-search-row {
  display: grid;
  grid-template-columns: minmax(180px, 320px);
  gap: 0.2rem;
  align-items: end;
}

.monitor-player-search-row-top {
  grid-template-columns: minmax(220px, 300px);
  align-self: end;
}

.monitor-player-search-row .input-inline {
  gap: 0.14rem;
  font-size: 0.72rem;
}

.monitor-player-search-row .input-inline input {
  min-height: 29px;
  padding: 0.24rem 0.38rem;
  font-size: 0.78rem;
}

.monitor-stat-chip {
  border: 1px solid rgba(244, 194, 82, 0.24);
  border-radius: 9px;
  background: rgba(6, 9, 16, 0.58);
  padding: 0.16rem 0.3rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem;
  min-height: 0;
  height: auto;
  align-self: start;
}

.monitor-stat-chip span {
  font-size: 0.58rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.monitor-stat-chip strong {
  font-size: 0.8rem;
  color: #fff0cb;
}

.monitor-actions-panel {
  min-height: 0;
  height: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(10, 12, 18, 0.82);
  padding: 0.5rem;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 0.45rem;
}

.monitor-actions-head {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
}

.monitor-actions-panel h3 {
  margin: 0;
  font-size: 0.95rem;
}

.monitor-actions-window {
  width: min(1200px, 50vw);
}

.monitor-waiting-window {
  width: min(1100px, 48vw);
}

.monitor-actions-toolbar {
  grid-template-columns: minmax(300px, 1fr) minmax(170px, auto) minmax(120px, auto) auto auto;
}

.monitor-actions-status-line {
  min-height: 1.1rem;
}

.monitor-actions-list {
  min-height: 0;
  overflow: auto;
  padding-right: 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.monitor-actions-list-full {
  max-height: calc(100vh - 210px);
}

.monitor-waiting-list-full {
  max-height: calc(100vh - 160px);
}

.monitor-action-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 0.38rem 0.42rem;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
  line-height: 1.3;
}

.monitor-action-time {
  color: var(--muted);
  font-size: 0.72rem;
}

.monitor-action-actor {
  color: #ffe8b7;
  font-weight: 600;
}

.monitor-action-player {
  color: #d4e9ff;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monitor-action-name-btn {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monitor-action-name-btn:hover {
  text-decoration: underline;
}

.monitor-action-chat {
  display: grid;
  gap: 0.22rem;
}

.monitor-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
  gap: 0.28rem;
  align-items: center;
}

.monitor-action-undo {
  width: 1.55rem;
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  justify-self: end;
  line-height: 1;
  font-size: 0.84rem;
}

.monitor-action-badge {
  border-radius: 999px;
  padding: 0.1rem 0.42rem;
  font-size: 0.68rem;
  border: 1px solid transparent;
  white-space: nowrap;
}

.monitor-action-badge.is-entry {
  color: #d7ffe2;
  border-color: rgba(102, 221, 141, 0.65);
  background: rgba(35, 129, 66, 0.5);
}

.monitor-action-badge.is-reentry {
  color: #fff7ca;
  border-color: rgba(229, 189, 84, 0.66);
  background: rgba(148, 119, 34, 0.55);
}

.monitor-action-badge.is-out {
  color: #ffd7d7;
  border-color: rgba(234, 92, 92, 0.72);
  background: rgba(126, 37, 37, 0.58);
}

.monitor-action-badge.is-addon {
  color: #d9ebff;
  border-color: rgba(110, 169, 236, 0.72);
  background: rgba(39, 77, 133, 0.58);
}

.monitor-action-badge.is-exit {
  color: #f0f0f0;
  border-color: rgba(198, 198, 198, 0.56);
  background: rgba(76, 76, 76, 0.45);
}

.monitor-action-badge.is-neutral {
  color: #d8dded;
  border-color: rgba(145, 160, 196, 0.5);
  background: rgba(55, 64, 88, 0.45);
}

.monitor-waiting-panel {
  min-height: 0;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(10, 12, 18, 0.82);
  padding: 0.45rem;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.35rem;
}

.monitor-waiting-panel h3 {
  margin: 0;
  font-size: 0.9rem;
}

.monitor-waiting-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
}

.monitor-waiting-list {
  min-height: 0;
  max-height: calc((var(--monitor-list-visible-rows) * var(--monitor-waiting-row-height)) + 2.4rem);
  overflow: auto;
}

.monitor-waiting-table {
  width: 100%;
  table-layout: fixed;
}

.monitor-waiting-table th,
.monitor-waiting-table td {
  padding: 0.22rem 0.26rem;
  font-size: 0.66rem;
  line-height: 1.2;
  vertical-align: top;
}

.monitor-waiting-table th:nth-child(1),
.monitor-waiting-table td:nth-child(1) {
  width: 10%;
}

.monitor-waiting-table th:nth-child(2),
.monitor-waiting-table td:nth-child(2) {
  width: 50%;
}

.monitor-waiting-table th:nth-child(3),
.monitor-waiting-table td:nth-child(3) {
  width: 15%;
}

.monitor-waiting-table th:nth-child(4),
.monitor-waiting-table td:nth-child(4) {
  width: 25%;
}

.monitor-waiting-table td:nth-child(2) {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.monitor-waiting-table .hero-actions {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
}

.monitor-waiting-table .btn {
  width: 100%;
  min-width: 0;
  padding: 0.2rem 0.28rem;
  font-size: 0.64rem;
}

.monitor-out-panel {
  min-height: 0;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(10, 12, 18, 0.82);
  padding: 0.45rem;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.4rem;
}

.monitor-out-panel h3 {
  margin: 0;
  font-size: 0.9rem;
}

.monitor-out-list {
  min-height: 0;
  max-height: calc((var(--monitor-list-visible-rows) * var(--monitor-out-row-height)) + 2.4rem);
  overflow: auto;
}

.monitor-add-player-window,
.monitor-actions-list,
.monitor-waiting-list,
.monitor-out-list,
.monitor-add-player-list,
.monitor-table-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 194, 82, 0.5) rgba(255, 255, 255, 0.08);
}

.monitor-add-player-window::-webkit-scrollbar,
.monitor-actions-list::-webkit-scrollbar,
.monitor-waiting-list::-webkit-scrollbar,
.monitor-out-list::-webkit-scrollbar,
.monitor-add-player-list::-webkit-scrollbar,
.monitor-table-list::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.monitor-add-player-window::-webkit-scrollbar-thumb,
.monitor-actions-list::-webkit-scrollbar-thumb,
.monitor-waiting-list::-webkit-scrollbar-thumb,
.monitor-out-list::-webkit-scrollbar-thumb,
.monitor-add-player-list::-webkit-scrollbar-thumb,
.monitor-table-list::-webkit-scrollbar-thumb {
  background: rgba(244, 194, 82, 0.42);
  border-radius: 8px;
}

.monitor-add-player-window::-webkit-scrollbar-track,
.monitor-actions-list::-webkit-scrollbar-track,
.monitor-waiting-list::-webkit-scrollbar-track,
.monitor-out-list::-webkit-scrollbar-track,
.monitor-add-player-list::-webkit-scrollbar-track,
.monitor-table-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.monitor-out-table {
  width: 100%;
}

.monitor-out-table th,
.monitor-out-table td {
  padding: 0.18rem 0.24rem;
  font-size: 0.64rem;
  line-height: 1.2;
  white-space: nowrap;
  vertical-align: middle;
}

.monitor-out-table th:nth-child(1),
.monitor-out-table td:nth-child(1) {
  width: 7%;
}

.monitor-out-table th:nth-child(2),
.monitor-out-table td:nth-child(2) {
  width: 21%;
}

.monitor-out-table th:nth-child(3),
.monitor-out-table td:nth-child(3) {
  width: 17%;
}

.monitor-out-table th:nth-child(4),
.monitor-out-table td:nth-child(4) {
  width: 10%;
}

.monitor-out-table th:nth-child(5),
.monitor-out-table td:nth-child(5),
.monitor-out-table th:nth-child(6),
.monitor-out-table td:nth-child(6),
.monitor-out-table th:nth-child(7),
.monitor-out-table td:nth-child(7) {
  width: 6%;
  text-align: center;
  padding-left: 0.14rem;
  padding-right: 0.14rem;
}

.monitor-out-table th:nth-child(8),
.monitor-out-table td:nth-child(8) {
  width: 10%;
  text-align: right;
}

.monitor-out-table th:nth-child(9),
.monitor-out-table td:nth-child(9) {
  width: 9%;
  text-align: center;
}

.monitor-out-table .monitor-out-cell-nick,
.monitor-out-table .monitor-out-cell-name {
  max-width: none;
  overflow: hidden;
  text-overflow: clip;
}

.monitor-out-table .monitor-out-cell-name {
  max-width: none;
}

.monitor-out-table .monitor-report-player-link {
  display: inline-block;
  max-width: none;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  padding: 0.14rem 0.3rem;
  line-height: 1.1;
  min-height: 0;
}

.monitor-report-list {
  overflow: auto;
}

.monitor-report-table {
  width: max-content;
  min-width: 1520px;
  table-layout: auto;
}

.monitor-report-table th,
.monitor-report-table td {
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  font-size: 0.7rem;
  padding: 0.24rem 0.32rem;
}

.monitor-report-table th {
  font-size: 0.6rem;
  letter-spacing: 0.02em;
}

.monitor-report-table th:nth-child(2),
.monitor-report-table td:nth-child(2) {
  min-width: 190px;
}

.monitor-report-table .monitor-report-player-link {
  display: inline-block;
  min-width: 148px;
  max-width: 188px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
  padding: 0.18rem 0.36rem;
  font-size: 0.78rem;
}

.monitor-table-card {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 0.5rem;
  background: radial-gradient(circle at center, rgba(42, 46, 62, 0.42), rgba(11, 11, 18, 0.95));
  display: grid;
  grid-template-rows: repeat(7, auto) minmax(0, auto);
  gap: 0.28rem;
  min-height: 286px;
  position: relative;
  z-index: 1;
  --monitor-expand-shift-x: 0px;
  --monitor-expand-shift-y: 0px;
  transform-origin: center center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  will-change: transform;
}

.monitor-table-card.is-occupied {
  border-color: rgba(92, 196, 118, 0.68);
  background: radial-gradient(circle at center, rgba(31, 102, 60, 0.55), rgba(10, 20, 14, 0.96));
  box-shadow: inset 0 0 0 1px rgba(120, 232, 150, 0.18);
}

.monitor-table-card.monitor-table-hit {
  border-color: rgba(255, 226, 128, 0.95);
  box-shadow: 0 0 0 1px rgba(255, 220, 107, 0.75), 0 0 24px rgba(255, 221, 113, 0.24), inset 0 0 0 1px rgba(255, 224, 128, 0.22);
}

@media (hover: hover) {
  .monitor-table-card:hover,
  .monitor-table-card:focus-within,
  .monitor-table-card.is-menu-open,
  .monitor-table-card.is-hover-open {
    transform: translate(var(--monitor-expand-shift-x), var(--monitor-expand-shift-y)) scale(2);
    z-index: 300;
    box-shadow: 0 0 0 1px rgba(255, 216, 114, 0.45), 0 14px 38px rgba(0, 0, 0, 0.55);
  }
}

.monitor-table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.monitor-seats {
  position: relative;
  width: 100%;
  max-width: 186px;
  aspect-ratio: 1.3 / 1;
  margin: 0.12rem auto 0;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at center, rgba(26, 88, 58, 0.55) 0%, rgba(16, 44, 30, 0.75) 62%, rgba(8, 14, 11, 0.9) 100%);
  border: 1px solid rgba(148, 217, 172, 0.28);
  box-shadow: inset 0 0 0 2px rgba(10, 22, 16, 0.55);
  overflow: hidden;
}

.monitor-seat-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(110, 122, 142, 0.55);
  color: #fff;
  font-size: 0.58rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: width 0.18s ease, height 0.18s ease, margin 0.18s ease, font-size 0.18s ease, background 0.18s ease;
}

.monitor-seat-dot.monitor-dealer-seat {
  border-color: rgba(255, 228, 169, 0.92);
  box-shadow: 0 0 0 1px rgba(20, 10, 4, 0.8);
}

.monitor-seat-dot.occupied {
  background: #43b768;
  border-color: rgba(203, 255, 220, 0.9);
  color: #0a2815;
  font-weight: 700;
}

.monitor-seat-dot.monitor-seat-hit {
  outline: 2px solid #ffec85;
  box-shadow: 0 0 0 2px rgba(255, 216, 120, 0.38), 0 0 16px rgba(255, 233, 143, 0.65);
  z-index: 4;
}

.monitor-seat-label {
  position: absolute;
  transform: translate(-50%, -50%);
  max-width: 56px;
  padding: 0.05rem 0.2rem;
  border-radius: 6px;
  background: rgba(9, 16, 12, 0.86);
  border: 1px solid rgba(118, 215, 145, 0.55);
  color: #c7f8d4;
  font-size: 0.55rem;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.monitor-seat-stats {
  position: absolute;
  transform: translate(-50%, -50%);
  max-width: 68px;
  padding: 0.02rem 0.2rem;
  border-radius: 5px;
  background: rgba(9, 16, 12, 0.8);
  border: 1px solid rgba(118, 215, 145, 0.35);
  color: #9ce6b1;
  font-size: 0.5rem;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.monitor-seat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.22rem 0.3rem;
  align-content: start;
  max-height: 110px;
  overflow: auto;
  padding-right: 0.1rem;
}

.monitor-seat-chip {
  display: grid;
  grid-template-columns: 1.45rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.28rem;
  padding: 0.14rem 0.24rem;
  border: 1px solid rgba(130, 196, 151, 0.34);
  border-radius: 6px;
  background: rgba(7, 16, 12, 0.62);
  min-width: 0;
}

.monitor-seat-chip.monitor-seat-hit {
  border-color: rgba(255, 231, 139, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 230, 121, 0.42);
}

.monitor-seat-chip-no {
  width: 1.45rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(214, 255, 227, 0.42);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  color: #dbffe7;
  background: rgba(46, 130, 79, 0.55);
}

.monitor-seat-chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #d8f6df;
  font-size: 0.62rem;
}

.monitor-seat-chip-stats {
  color: #b7e9c7;
  font-size: 0.6rem;
  white-space: nowrap;
}

.monitor-seat-list-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.62rem;
  padding: 0.1rem 0.05rem;
}

.monitor-table-dealer {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0;
}

.monitor-table-dealer-seat {
  color: #ffe6b3;
  font-size: 0.72rem;
  margin-top: 0;
}

.monitor-table-metrics {
  color: #b7e7c6;
  font-size: 0.64rem;
  margin-top: 0;
  line-height: 1.2;
  white-space: normal;
  word-break: break-word;
}

.monitor-table-bank-current {
  color: #9fd5ad;
  font-size: 0.62rem;
  margin-top: 0;
}

.monitor-table-bank {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 0.24rem;
  align-items: end;
}

.monitor-table-bank label {
  display: grid;
  gap: 0.08rem;
  font-size: 0.58rem;
  color: #d2e5da;
}

.monitor-table-bank .input-compact {
  min-height: 1.5rem;
  padding: 0.2rem 0.28rem;
  font-size: 0.66rem;
}

.monitor-seat-menu {
  position: fixed;
  z-index: 1300;
  width: min(320px, calc(100vw - 20px));
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(8, 10, 16, 0.97);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.48);
  padding: 0.6rem;
  display: none;
}

.monitor-seat-menu.open {
  display: block;
}

.monitor-seat-menu-title {
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.04em;
  color: #ffe3af;
  margin-bottom: 0.25rem;
}

.monitor-seat-menu-player {
  font-size: 0.9rem;
  color: #e8f0ff;
  margin-bottom: 0.45rem;
}

.monitor-seat-menu-label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.monitor-seat-menu-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.32rem;
  margin-top: 0.3rem;
}

.monitor-seat-menu-select {
  width: 100%;
}

.monitor-seat-menu-input {
  width: 100%;
}

.monitor-seat-menu-actions {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.monitor-seat-menu-actions .btn {
  width: auto;
  min-width: 90px;
}

.monitor-seat-menu-status {
  min-height: 1rem;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.74rem;
}

.out-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1800;
  background: rgba(6, 9, 14, 0.74);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.out-confirm-window {
  width: min(420px, calc(100vw - 2rem));
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel);
  padding: 0.75rem;
  display: grid;
  gap: 0.45rem;
}

.out-confirm-window h3 {
  margin: 0;
  font-size: 1.02rem;
}

.out-confirm-player {
  margin: 0;
  color: #ffe8b7;
  font-weight: 700;
}

.out-confirm-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.out-confirm-report {
  display: grid;
  gap: 0.2rem;
  padding: 0.3rem 0.42rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.out-confirm-mini-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.out-confirm-mini-table th,
.out-confirm-mini-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.18rem;
  text-align: center;
  font-size: 0.78rem;
}

.out-confirm-mini-table th {
  color: #f4c252;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.out-confirm-mini-table td {
  color: #ffe9bc;
  font-weight: 700;
}

.out-confirm-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.out-confirm-stepper {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 0.35rem;
  align-items: center;
}

.out-confirm-stepper input {
  text-align: center;
}

.out-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
}

@media (max-width: 980px) {
  .monitor-main {
    height: auto;
    overflow: auto;
  }
  body.tournament-monitor-page {
    overflow: auto;
  }
  .monitor-dashboard {
    height: auto;
  }
  .monitor-topline {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    overflow: visible;
    padding-bottom: 0;
  }
  .monitor-topline > .input-inline {
    width: 100%;
  }
  .monitor-add-player-toolbar {
    grid-template-columns: 1fr;
  }
  .monitor-table-toolbar,
  .monitor-table-seat-toolbar {
    grid-template-columns: 1fr;
  }
  .monitor-add-player-window {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    padding: 0.45rem;
  }
  .monitor-actions-window {
    width: calc(100vw - 1rem);
  }
  .monitor-actions-toolbar {
    grid-template-columns: 1fr;
  }
  .monitor-stats-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .monitor-player-search-row {
    grid-template-columns: 1fr;
  }
  .monitor-tables-grid {
    overflow: visible;
  }
  .monitor-layout-grid {
    grid-template-columns: 1fr;
    height: auto;
  }
  .monitor-left-panel {
    grid-template-rows: auto;
  }
  .monitor-side-stack {
    height: auto;
    grid-template-rows: auto;
  }
  .monitor-table-bank {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .monitor-table-bank button {
    grid-column: 1 / -1;
  }
  .monitor-actions-list {
    max-height: 240px;
  }
  .monitor-out-list {
    max-height: 240px;
  }
  .monitor-waiting-list {
    max-height: 220px;
  }
}

.dealer-table-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 0.8rem;
  background: radial-gradient(circle at center, rgba(24, 72, 44, 0.45), rgba(10, 8, 12, 0.9));
}

.dealer-table-layout::before {
  content: none;
}

.dealer-seat {
  position: relative;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem;
  background: rgba(8, 7, 12, 0.82);
  box-shadow: inset 0 0 0 1px var(--line-soft), 0 4px 12px rgba(0, 0, 0, 0.4);
  display: grid;
  gap: 0.25rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dealer-seat.selected {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(244, 194, 82, 0.35), inset 0 0 0 1px var(--line);
  transform: translateY(-2px);
}

.dealer-seat.is-occupied {
  border-color: rgba(92, 196, 118, 0.55);
  background: rgba(28, 78, 45, 0.45);
}

.dealer-seat h3 {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.dealer-seat .dealer-seat-name {
  font-size: 0.85rem;
  color: var(--text);
}

.dealer-seat .dealer-seat-select {
  width: 100%;
}

.dealer-seat-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem;
}

.dealer-seat-fields label {
  display: grid;
  gap: 0.15rem;
  font-size: 0.62rem;
  color: var(--muted);
}

.dealer-seat-fields input {
  width: 100%;
}

.dealer-seat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.dealer-seat-actions .btn {
  font-size: 0.65rem;
  padding: 0.25rem 0.35rem;
}

.dealer-seat-empty {
  color: var(--muted);
}

.dealer-seat-target.seat-occupied {
  border-color: rgba(92, 196, 118, 0.9);
  background: rgba(28, 78, 45, 0.45);
  color: #dfffe6;
}

.dealer-seat-occupied-row td:last-child {
  color: #9ef1b2;
  font-weight: 600;
}

.dealer-seat-1 { grid-column: 1; grid-row: 1; }
.dealer-seat-3 { grid-column: 1; grid-row: 2; }
.dealer-seat-5 { grid-column: 1; grid-row: 3; }
.dealer-seat-7 { grid-column: 1; grid-row: 4; }
.dealer-seat-9 { grid-column: 1; grid-row: 5; }

.dealer-seat-2 { grid-column: 2; grid-row: 1; }
.dealer-seat-4 { grid-column: 2; grid-row: 2; }
.dealer-seat-6 { grid-column: 2; grid-row: 3; }
.dealer-seat-8 { grid-column: 2; grid-row: 4; }
.dealer-seat-10 { grid-column: 2; grid-row: 5; }

.dealer-table-actions {
  margin-top: 0.8rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.dealer-table-actions .btn {
  min-width: 72px;
  pointer-events: auto;
  cursor: pointer;
}

.dealer-table-actions * {
  pointer-events: auto;
}

.dealer-seat-oval-layout {
  position: relative;
  min-height: 62vh;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 48%, rgba(16, 86, 50, 0.65), rgba(8, 7, 12, 0.95));
  padding: 0;
  overflow: hidden;
}

.dealer-seat-oval-layout .dealer-seat-board {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(58vw, 520px);
  height: min(35vw, 300px);
  transform: translate(-50%, -50%);
  border-radius: 50% / 42%;
  border: 2px solid rgba(244, 194, 82, 0.55);
  background: radial-gradient(circle at 50% 40%, rgba(24, 112, 58, 0.74), rgba(10, 48, 28, 0.9));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.06), 0 20px 38px rgba(0, 0, 0, 0.45);
}

.dealer-seat-oval-layout .dealer-seat-board::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 22%;
  height: 14%;
  transform: translateX(-50%);
  border-radius: 16px 16px 0 0;
  border: 2px solid rgba(244, 194, 82, 0.55);
  border-bottom: none;
  background: rgba(10, 48, 28, 0.9);
}

.dealer-seat-center-number {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  font-family: "Russo One", sans-serif;
  font-size: clamp(1.15rem, 2.2vw, 2rem);
  letter-spacing: 0.06em;
  color: #ffd98a;
  text-shadow: 0 0 14px rgba(255, 197, 71, 0.45);
  border: 1px solid rgba(255, 204, 98, 0.35);
  border-radius: 999px;
  padding: 0.32rem 0.9rem;
  background: rgba(5, 12, 18, 0.66);
  pointer-events: none;
}

.dealer-seat-ring-btn {
  position: absolute;
  z-index: 4;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border: 2px solid rgba(244, 194, 82, 0.7);
  background: rgba(14, 12, 18, 0.95);
  color: #fff2d2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Russo One", sans-serif;
  font-size: 1.05rem;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  overflow: visible;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.dealer-seat-ring-btn:hover {
  transform: scale(1.04);
  border-color: var(--accent);
}

.dealer-seat-ring-btn.is-empty {
  background: rgba(14, 12, 18, 0.92);
  color: var(--accent);
  font-size: 0.9rem;
}

.dealer-seat-ring-btn .seat-letter {
  font-size: 1.18rem;
}

.dealer-seat-ring-btn .seat-number {
  font-size: 0.84rem;
}

.dealer-seat-ring-name {
  position: absolute;
  z-index: 7;
  width: 124px;
  margin-left: -62px;
  margin-top: -52px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #f7e4ba;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.12rem 0.26rem;
  border-radius: 999px;
  background: rgba(8, 7, 12, 0.72);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  pointer-events: none;
}

.dealer-seat-ring-name:empty {
  display: none;
}

.dealer-seat-ring-nick {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dealer-seat-ring-reentry {
  display: block;
  color: #9dd6ff;
  font-weight: 700;
  font-size: 0.64rem;
}

.dealer-seat-ring-reentry-badge {
  position: absolute;
  right: -6px;
  top: -6px;
  min-width: 24px;
  padding: 0.1rem 0.28rem;
  border-radius: 999px;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0b1320;
  background: linear-gradient(180deg, #9ad5ff, #5fb6ff);
  border: 1px solid rgba(200, 234, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.dealer-seat-ring-stack-badge {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  min-width: 34px;
  max-width: 72px;
  padding: 0.08rem 0.28rem;
  border-radius: 999px;
  font-size: 0.54rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: #0f1308;
  background: linear-gradient(180deg, #ffd975, #f7b53e);
  border: 1px solid rgba(255, 236, 172, 0.92);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dealer-seat-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 7, 12, 0.78);
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 0.8rem;
}

.dealer-seat-modal-overlay[hidden] {
  display: none !important;
}

.dealer-seat-modal-window {
  width: min(560px, 95vw);
  background: rgba(14, 12, 20, 0.98);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  display: grid;
  gap: 0.6rem;
}

.dealer-seat-modal-window h3 {
  margin: 0;
  color: var(--accent);
}

.dealer-seat-modal-window label {
  display: grid;
  gap: 0.28rem;
  color: var(--muted);
}

.dealer-seat-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

@media (orientation: landscape) and (max-width: 1100px) {
  .dealer-seat-oval-layout {
    min-height: 74vh;
  }
  .dealer-seat-oval-layout .dealer-seat-board {
    width: min(48vw, 560px);
    height: min(28vw, 320px);
  }
  .dealer-seat-ring-btn {
    width: 54px;
    height: 54px;
  }
  .dealer-seat-ring-name {
    width: 112px;
    margin-left: -56px;
    margin-top: -48px;
    font-size: 0.66rem;
  }
  .dealer-seat-ring-reentry-badge {
    right: -5px;
    top: -5px;
    font-size: 0.52rem;
  }
  .dealer-seat-ring-stack-badge {
    bottom: -7px;
    max-width: 62px;
    font-size: 0.5rem;
  }
}

.dealer-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  background: rgba(14, 16, 24, 0.96);
  color: #fff3d6;
  border: 1px solid rgba(244, 199, 109, 0.45);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 9999;
  pointer-events: none;
}
.dealer-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.dealer-toast .title {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
  color: #ffe2a6;
}
.dealer-toast .body {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.4;
}

.dealer-alert-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 14, 0.62);
  backdrop-filter: blur(3px);
  z-index: 10000;
  padding: 1rem;
}

.dealer-alert-overlay.show {
  display: flex;
}

.dealer-alert-window {
  width: min(760px, 96vw);
  border: 1px solid rgba(244, 199, 109, 0.55);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(25, 14, 30, 0.98), rgba(12, 9, 18, 0.98));
  color: #fff3d6;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.62);
  padding: 1.1rem 1.2rem;
}

.dealer-alert-title {
  font-family: "Oswald", sans-serif;
  font-size: clamp(1.2rem, 2.7vw, 2rem);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffd98f;
}

.dealer-alert-body {
  margin-top: 0.55rem;
  font-size: clamp(1rem, 1.9vw, 1.28rem);
  line-height: 1.5;
  white-space: pre-wrap;
}

.dealer-alert-close {
  margin-top: 0.9rem;
  min-width: 120px;
}

@media (max-width: 700px) {
  .dealer-table-layout {
    gap: 0.5rem;
  }
}

.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 4px;
  padding: 0.6rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.btn-primary {
  color: #2b1706;
  background: linear-gradient(145deg, #ffd978, #d4972c);
  border: 1px solid rgba(255, 220, 128, 0.7);
  box-shadow: 0 8px 18px rgba(207, 140, 29, 0.26);
}

.btn-outline {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: rgba(47, 26, 16, 0.48);
}

.btn-xs {
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  line-height: 1;
}

.panel-grid,
.dashboard-grid,
.form-grid,
.cards {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.panel-grid .panel,
.cards .card,
.dashboard-grid .panel,
.form-grid .panel {
  grid-column: span 4;
  padding: 1.1rem;
}

.dashboard-grid .panel {
  grid-column: span 6;
}

.form-grid .panel {
  grid-column: span 6;
}

.admin-tournaments-top .panel {
  grid-column: span 4;
}

.editor-panel {
  grid-column: span 12 !important;
}

.editor-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.8rem;
  align-items: start;
}

.editor-tools {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-preview {
  border: 1px dashed rgba(231, 171, 68, 0.45);
  border-radius: 8px;
  background: rgba(22, 12, 19, 0.74);
  padding: 1rem;
  display: grid;
  gap: 0.7rem;
}

.content-preview h3 {
  margin: 0;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.02em;
  font-size: 1.7rem;
}

.preview-subtitle {
  margin: 0;
  color: var(--accent);
}

.preview-body {
  margin: 0;
  white-space: pre-wrap;
  color: var(--text);
}

.preview-image-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(198, 173, 96, 0.24);
  max-height: 280px;
}

.preview-image-wrap img {
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: cover;
  transform-origin: center center;
  transition: transform 180ms ease, object-position 180ms ease;
  display: block;
}

.panel p,
.card p,
.page-title p {
  color: var(--muted);
}

.link-arrow {
  text-decoration: none;
  color: var(--accent);
  font-weight: 700;
}

.link-arrow::after {
  content: " ->";
}

.table-panel {
  padding: 0.6rem;
  overflow: auto;
}

.ratings-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px auto;
  gap: 0.8rem;
  align-items: end;
  margin-bottom: 0.8rem;
}

.ratings-pagination {
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

.compact-table th,
.compact-table td {
  padding: 0.45rem 0.55rem;
  font-size: 0.9rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.6rem 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.92rem;
}

.data-table th {
  color: var(--muted);
  font-weight: 600;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.input-compact {
  width: 100%;
  min-width: 0;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(7, 7, 12, 0.55);
  color: var(--text);
  font-size: 0.9rem;
}

.btn-small {
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
}

.admin-user-meta {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 0.4rem;
}

.admin-user-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.admin-user-id {
  font-size: 0.85rem;
}

.admin-roles {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.admin-roles-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1.3rem;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  white-space: nowrap;
  min-width: 160px;
}

.checkbox-inline input[type="checkbox"] {
  margin: 0;
  transform: translateY(0);
}

.admin-reentry {
  display: grid;
  gap: 0.4rem;
}

.admin-reentry-balance {
  display: grid;
  gap: 0.2rem;
}

.admin-reentry-label {
  font-size: 0.78rem;
  opacity: 0.82;
}

.admin-reentry-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.4rem;
  align-items: center;
}

.admin-user-actions {
  display: grid;
  gap: 0.4rem;
}

.rating-row td {
  transition: background-color 160ms ease;
}

.rating-row[data-user-id] {
  cursor: pointer;
}

.rating-row.is-selected td {
  box-shadow: inset 0 0 0 1px rgba(244, 194, 82, 0.55);
  background-color: rgba(244, 194, 82, 0.12);
}

.rating-final-history-row td {
  background-color: rgba(244, 194, 82, 0.18);
}

.ratings-achievements {
  margin: 14px 0;
}

.achievement-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.achievement-badge {
  border: 1px solid rgba(244, 194, 82, 0.45);
  border-radius: 999px;
  background: rgba(244, 194, 82, 0.14);
  padding: 6px 10px;
}

.final-months-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.rating-top-1 td {
  background: linear-gradient(90deg, rgba(255, 215, 110, 0.22), rgba(255, 215, 110, 0.05));
  color: #ffe9b8;
  font-weight: 700;
}

.rating-top-2 td {
  background: linear-gradient(90deg, rgba(194, 206, 218, 0.2), rgba(194, 206, 218, 0.05));
  color: #e6edf5;
  font-weight: 700;
}

.rating-top-3 td {
  background: linear-gradient(90deg, rgba(205, 142, 91, 0.24), rgba(205, 142, 91, 0.06));
  color: #f4d2b3;
  font-weight: 700;
}

.rating-medal {
  filter: drop-shadow(0 0 6px rgba(255, 224, 145, 0.35));
}

.rating-first-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: 0.35rem;
  padding: 0.05rem 0.28rem 0.05rem 0.08rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 216, 102, 0.55);
  background: rgba(17, 18, 28, 0.55);
  vertical-align: middle;
}

.rating-first-badge img {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 216, 102, 0.65);
}

.rating-first-badge span {
  font-size: 0.72rem;
  color: #ffe5a5;
  font-weight: 700;
  line-height: 1;
}

.rating-second-badge {
  border-color: rgba(198, 211, 224, 0.7);
  background: rgba(20, 23, 34, 0.68);
}

.rating-second-badge img {
  border-color: rgba(205, 218, 232, 0.75);
  filter: grayscale(0.2) saturate(0.2) brightness(1.18);
}

.rating-second-badge span {
  color: #e7eef7;
}

.rating-third-badge {
  border-color: rgba(196, 98, 76, 0.86);
  background: rgba(45, 18, 16, 0.72);
}

.rating-third-badge img {
  border-color: rgba(210, 104, 82, 0.9);
  filter: sepia(0.74) saturate(1.55) hue-rotate(-24deg) brightness(0.92) contrast(1.08);
}

.rating-third-badge span {
  color: #f1b7a8;
}

.poker-hand {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.tournaments-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.tournaments-title-copy {
  flex: 1 1 auto;
}

.tournaments-title-cards {
  flex: 0 0 auto;
  min-height: 0;
  margin-right: 0.4rem;
}

.poker-card {
  width: 126px;
  height: 178px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.94), rgba(248, 248, 246, 0.98) 55%),
    linear-gradient(180deg, #ffffff 0%, #f1f1ee 100%);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  color: #121212;
  display: block;
  position: relative;
  padding: 0;
  transform-origin: center center;
  overflow: hidden;
}

.poker-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(24, 24, 24, 0.08);
  border-radius: inherit;
  pointer-events: none;
}

.poker-card + .poker-card {
  margin-left: -30px;
}

.poker-card .corner {
  position: absolute;
  left: 8px;
  top: 8px;
  display: grid;
  justify-items: center;
  font-family: "Oswald", sans-serif;
  line-height: 1;
}

.poker-card .corner b {
  font-size: 2rem;
  font-weight: 700;
}

.poker-card .corner i {
  font-style: normal;
  font-size: 1.25rem;
  margin-top: -0.12rem;
  font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "Arial Unicode MS", "Times New Roman", serif;
}

.poker-card .corner.corner-br {
  right: 8px;
  left: auto;
  bottom: 8px;
  top: auto;
  transform: rotate(180deg);
}

.poker-card .pip {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.65rem;
  line-height: 1;
  font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "Arial Unicode MS", "Times New Roman", serif;
}

.poker-card.card-red {
  color: #a61d2b;
}

.poker-card.card-black {
  color: #111111;
}

.poker-card-ten {
  transform: rotate(-6deg);
  z-index: 2;
}

.poker-card-two {
  transform: rotate(6deg);
  z-index: 3;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

body[data-page="dealer"] table {
  min-width: 0;
  table-layout: fixed;
}

body[data-page="dealer"] .table-panel {
  overflow-x: hidden;
}

body[data-page="dealer"] th,
body[data-page="dealer"] td {
  white-space: normal;
  word-break: break-word;
}

body[data-page="tournament-admin"] table {
  min-width: 0;
  table-layout: fixed;
}

body[data-page="tournament-admin"] .table-panel {
  overflow-x: hidden;
}

body[data-page="tournament-admin"] th,
body[data-page="tournament-admin"] td {
  white-space: normal;
  word-break: break-word;
}

body[data-page="tournament-monitor"] table {
  min-width: 0;
  table-layout: fixed;
}

body[data-page="tournament-monitor"] th,
body[data-page="tournament-monitor"] td {
  white-space: normal;
  word-break: break-word;
}

body[data-page="dealer"] .admin-auth,
body[data-page="tournament-admin"] .admin-auth,
body[data-page="dealer"] .dealer-closed-panel,
body[data-page="tournament-admin"] .dealer-closed-panel,
body[data-page="dealer"] .dealer-report-panel {
  display: none;
}

.tournament-admin-timer-view #dealer-protected-grid,
.tournament-admin-timer-view .dealer-table-focus,
.tournament-admin-timer-view .dealer-secondary-panel,
.tournament-admin-timer-view #dealer-controls-form,
.tournament-admin-timer-view #dealer-load,
.tournament-admin-timer-view #dealer-assign {
  display: none;
}

th,
td {
  text-align: left;
  padding: 0.8rem;
  border-bottom: 1px solid rgba(198, 173, 96, 0.18);
}

th {
  color: var(--accent);
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag {
  display: inline-block;
  border-radius: 999px;
  font-size: 0.8rem;
  padding: 0.26rem 0.56rem;
  border: 1px solid var(--line);
}

.tag-open {
  color: #fff0be;
  border-color: rgba(231, 171, 68, 0.6);
  background: rgba(231, 171, 68, 0.15);
}

.tag-status-final {
  color: #d7ffe2;
  border-color: rgba(102, 221, 141, 0.65);
  background: rgba(35, 129, 66, 0.36);
}

.tag-status-out {
  color: #ffd7d7;
  border-color: rgba(234, 92, 92, 0.72);
  background: rgba(126, 37, 37, 0.42);
}

.tv-status-final {
  color: #bfffd0;
}

.tv-status-out {
  color: #ffb8b8;
}

.card {
  padding: 1.1rem;
  grid-column: span 4;
}

.card-date {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}

.tg-media {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin: 0.6rem 0;
  display: block;
  background: rgba(7, 6, 10, 0.45);
}

.muted-inline {
  color: var(--muted);
  font-size: 0.92em;
}

.dealer-op-badges {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-right: 10px;
  vertical-align: middle;
}

.dealer-op-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
}

.dealer-op-badge.is-allowed {
  background: rgba(46, 204, 113, 0.16);
  border-color: rgba(46, 204, 113, 0.55);
  color: rgba(226, 255, 238, 0.95);
}

.dealer-op-badge.is-blocked {
  background: rgba(231, 76, 60, 0.14);
  border-color: rgba(231, 76, 60, 0.55);
  color: rgba(255, 230, 228, 0.95);
}

.invite-plus {
  color: #7ef0a5;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(126, 240, 165, 0.35);
}

.big-number {
  margin: 0.3rem 0;
  line-height: 1;
  color: var(--accent);
  font-size: clamp(2.3rem, 5vw, 3.2rem);
  font-family: "Oswald", sans-serif;
}

.simple-list {
  padding-left: 1.1rem;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
}

.profile-registrations-list {
  padding-left: 0;
  list-style: none;
}

.profile-registration-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(231, 171, 68, 0.25);
  border-radius: 10px;
  background: rgba(9, 6, 11, 0.62);
}

.profile-registration-item .btn {
  width: auto;
  min-width: 108px;
  margin-top: 0;
  padding: 0.42rem 0.7rem;
}

.participants-text-card {
  grid-column: span 12 !important;
}

.participants-text-list {
  margin: 0.5rem 0 0;
  padding: 0.8rem;
  border: 1px solid rgba(231, 171, 68, 0.32);
  border-radius: 8px;
  background: rgba(9, 6, 11, 0.72);
  color: #f6ddb0;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.telegram-banner {
  padding: 1.1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.admin-form {
  display: grid;
  gap: 0.8rem;
}

.admin-form label {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
}

.levels-builder {
  display: grid;
  gap: 0.9rem;
  padding: 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(231, 171, 68, 0.2);
  background: rgba(9, 6, 11, 0.6);
}

.levels-builder-header h3 {
  margin: 0;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.02em;
}

.levels-builder-row,
.levels-template-row {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
}

.levels-template-row {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.levels-template-import-form {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: end;
}

.levels-list {
  display: grid;
  gap: 0.6rem;
}

.levels-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(231, 171, 68, 0.2);
  background: rgba(16, 12, 20, 0.65);
}

.levels-item-fields {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items: end;
  flex: 1;
}

.levels-item-index {
  font-size: 0.85rem;
  color: var(--muted);
  align-self: center;
}

.levels-item-fields label {
  font-size: 0.86rem;
  color: var(--muted);
}

.levels-item-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-auth {
  padding: 1.1rem;
}

.dealer-bulk-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.6rem 0 0.8rem;
}

.dealer-bulk-actions .btn {
  padding: 0.45rem 0.7rem;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.6rem;
  margin: 0.8rem 0;
}

.report-card {
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(231, 171, 68, 0.2);
  background: rgba(16, 12, 20, 0.65);
}

.report-card span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}

.report-card strong {
  display: block;
  font-size: 1.1rem;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.dealer-table-toolbar {
  align-items: end;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.input-inline {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.btn-compact {
  padding: 0.35rem 0.55rem;
  font-size: 0.76rem;
}

.dealer-table-view #dealer-protected .dealer-secondary-panel,
.dealer-table-view #dealer-protected-grid .dealer-secondary-panel {
  display: none;
}

.dealer-table-view #dealer-protected-grid {
  grid-template-columns: minmax(0, 1fr);
}

.dealer-table-view.dealer-table-ready #dealer-controls-form label,
.dealer-table-view.dealer-table-ready #dealer-controls-form .overline,
.dealer-table-view.dealer-table-ready #dealer-table-selector,
.dealer-table-view.dealer-table-ready #dealer-load {
  display: none;
}

.dealer-table-view #dealer-view-toggle {
  width: auto;
  padding: 0.5rem 0.8rem;
}

.dealer-table-view.dealer-table-ready .dealer-table-players-table th:nth-child(5),
.dealer-table-view.dealer-table-ready .dealer-table-players-table td:nth-child(5),
.dealer-table-view.dealer-table-ready .dealer-table-players-table th:nth-child(6),
.dealer-table-view.dealer-table-ready .dealer-table-players-table td:nth-child(6),
.dealer-table-view.dealer-table-ready .dealer-table-players-table th:nth-child(7),
.dealer-table-view.dealer-table-ready .dealer-table-players-table td:nth-child(7) {
  display: none;
}

.dealer-table-view .admin-auth {
  display: none;
}

.dealer-name-line {
  display: block;
  font-weight: 600;
}

.dealer-chips-line {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

.dealer-bounty-line {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.dealer-chips-input {
  width: 100%;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.dealer-bounty-input {
  width: 100%;
  padding: 0.32rem 0.45rem;
  border-radius: 8px;
  font-size: 0.85rem;
}

.dealer-table-view .dealer-table-players-table th,
.dealer-table-view .dealer-table-players-table td {
  padding: 0.42rem 0.5rem;
  font-size: 0.9rem;
}

.dealer-table-view .dealer-table-players-table .dealer-name-line {
  font-size: 0.95rem;
}

.dealer-table-view .dealer-table-players-table .dealer-chips-line {
  font-size: 0.85rem;
}

.dealer-table-view .dealer-table-toolbar {
  gap: 0.45rem;
}

.dealer-table-view .dealer-table-toolbar .btn {
  padding: 0.42rem 0.6rem;
  font-size: 0.82rem;
}

.dealer-table-view .table-panel {
  padding: 0.45rem;
}

body.dealer-seat-only .site-header,
body.dealer-seat-only .admin-auth,
body.dealer-seat-only #dealer-table-protected {
  display: none !important;
}

body.dealer-seat-only main {
  padding: 0.45rem;
}

body.dealer-seat-only #dealer-table-seats {
  display: block !important;
  min-height: calc(100vh - 0.9rem);
  margin: 0;
  padding: 0.45rem;
}

body.dealer-seat-only #dealer-table-seats > h2,
body.dealer-seat-only #dealer-seat-reentry-summary,
body.dealer-seat-only #dealer-seat-status,
body.dealer-seat-only #dealer-table-actions {
  display: none !important;
}

body.dealer-seat-only .dealer-seat-oval-layout {
  min-height: calc(100vh - 1.6rem);
}

@media (max-width: 640px) {
  .dealer-table-view .dealer-table-players-table th,
  .dealer-table-view .dealer-table-players-table td {
    padding: 0.35rem 0.4rem;
    font-size: 0.84rem;
  }

  .dealer-table-view .dealer-table-players-table .dealer-name-line {
    font-size: 0.9rem;
  }

  .dealer-table-view .dealer-table-players-table .dealer-chips-input {
    padding: 0.28rem 0.4rem;
    font-size: 0.82rem;
  }
}

.tournament-title-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tournament-title-row {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.tournament-title-btn {
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(22, 14, 24, 0.7);
  color: var(--accent);
  font-weight: 600;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.tournament-title-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 221, 132, 0.25), 0 10px 18px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.tournament-title-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tournament-title-delete {
  flex: 0 0 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid rgba(200, 86, 86, 0.5);
  background: rgba(70, 20, 20, 0.55);
  color: #ffb3b3;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.tournament-title-delete:hover {
  border-color: #ff9b9b;
  box-shadow: 0 0 0 1px rgba(255, 150, 150, 0.2), 0 10px 18px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.tournament-title-delete:focus-visible {
  outline: 2px solid #ffb3b3;
  outline-offset: 2px;
}

.auth-login-form {
  max-width: 420px;
}

.account-auth {
  padding: 1.1rem;
}

.account-auth-stack {
  display: grid;
  grid-template-columns: minmax(0, 520px);
  gap: 0.8rem;
}

.account-auth-stack h3 {
  margin: 0;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.02em;
}

.auth-switch-link {
  display: inline-block;
  margin-top: -0.2rem;
  font-size: 0.84rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-switch-link:hover {
  color: var(--accent);
}

.account-avatar-wrap {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 0.7rem;
}

.account-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.camera-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.6rem;
}

.camera-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.6rem;
}

.camera-video,
.camera-canvas {
  width: 160px;
  height: 120px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0a0a0a;
}

.camera-preview img {
  object-fit: cover;
}

.camera-hidden {
  display: none;
}

.account-profile-form {
  margin-top: 0.9rem;
}

.admin-auth .btn {
  width: fit-content;
}

.editor-status {
  margin: 0;
  min-height: 1.2rem;
  color: var(--success);
  font-size: 0.92rem;
}

.system-log-preview {
  margin: 0;
  padding: 0.6rem 0.75rem;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(7, 20, 17, 0.7);
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.published-card .preview-image-wrap {
  margin: 0.5rem 0 0.8rem;
}

.post-delete {
  margin-top: 0.9rem;
}

.tournament-join,
.tournament-delete {
  margin-top: 0.8rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  color: var(--text);
  background: rgba(7, 20, 17, 0.7);
}

input:focus,
textarea:focus,
select:focus {
  outline: 1px solid rgba(198, 173, 96, 0.7);
}

input[type="file"] {
  padding: 0.45rem 0.55rem;
}

input[type="range"] {
  padding: 0;
}

input[type="color"] {
  min-height: 2.6rem;
  padding: 0.25rem;
}

.site-footer {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto 1.4rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0.25rem 0;
}

.legal-notice {
  color: #ffdf9e;
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .home-hero-layout {
    grid-template-columns: 1fr;
  }

  .panel-grid .panel,
  .dashboard-grid .panel,
  .form-grid .panel,
  .cards .card {
    grid-column: span 12;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 0.6rem;
    gap: 0.45rem;
  }

  .site-header {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav.open {
    display: flex;
  }

  .nav-item {
    width: 100%;
  }

  .nav-trigger {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .nav-panel {
    position: static;
    width: 100%;
    margin-top: 0.4rem;
    box-shadow: none;
  }

  .telegram-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .editor-shell,
  .editor-tools,
  .account-auth-stack {
    grid-template-columns: 1fr;
  }

  .ratings-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .ratings-pagination {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .poker-hand {
    min-height: 158px;
    justify-content: flex-start;
  }

  .tournaments-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .tournaments-title-cards {
    width: 100%;
    justify-content: flex-start;
    margin-right: 0;
  }

  .poker-card {
    width: 96px;
    height: 138px;
  }

  .poker-card + .poker-card {
    margin-left: -22px;
  }

  .poker-card .corner b {
    font-size: 1.55rem;
  }

  .poker-card .corner i {
    font-size: 1rem;
  }

  .poker-card .pip {
    font-size: 2rem;
  }
}

@media (max-width: 640px) {
  body[data-page="dealer-table"] {
    min-height: 100dvh;
    background-attachment: scroll;
  }

  body[data-page="dealer-table"]::before,
  body[data-page="dealer-table"]::after {
    display: none;
  }

  body[data-page="dealer-table"] main {
    width: calc(100% - 0.5rem);
  }

  body[data-page="dealer-table"] .panel {
    padding: 0.7rem;
  }

  body[data-page="dealer-table"] .dealer-seat-oval-layout {
    min-height: 72dvh;
    background: radial-gradient(circle at 50% 48%, rgba(16, 86, 50, 0.78), rgba(8, 7, 12, 0.98));
  }

  body::after {
    inset: 6px;
  }

  .site-header,
  main,
  .site-footer {
    width: min(1100px, calc(100% - 1rem));
  }

  .site-header {
    padding: 0.75rem 0.8rem;
    gap: 0.65rem;
  }

  .logo {
    font-size: 1.48rem;
    letter-spacing: 0.06em;
  }

  .menu-toggle {
    width: 100%;
    padding: 0.52rem 0.7rem;
  }

  .site-nav {
    gap: 0.35rem;
  }

  .nav-panel a {
    width: 100%;
    padding: 0.58rem 0.65rem;
  }

  .hero,
  .page-title {
    padding: 1rem 0.95rem;
  }

  .panel,
  .card,
  .telegram-banner {
    padding: 0.95rem;
  }

  .table-panel {
    padding: 0.45rem;
  }

  h1 {
    font-size: clamp(1.56rem, 7vw, 2.1rem);
    line-height: 1.1;
  }

  h2 {
    font-size: 1.34rem;
  }

  .overline {
    font-size: 0.76rem;
  }

  .panel-grid,
  .dashboard-grid,
  .form-grid,
  .cards {
    gap: 0.75rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dealer-table-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .dealer-bulk-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 10px;
    border: 1px solid rgba(231, 171, 68, 0.35);
    background: rgba(10, 7, 12, 0.85);
    position: sticky;
    bottom: 0;
    z-index: 5;
  }

  .dealer-bulk-actions .btn {
    width: 100%;
    padding: 0.6rem 0.7rem;
  }

  .btn {
    width: 100%;
    text-align: center;
    padding: 0.72rem 0.95rem;
  }

  .profile-registration-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-registration-item .btn {
    width: auto;
  }

  .ratings-toolbar {
    gap: 0.6rem;
  }

  .ratings-pagination {
    justify-content: space-between;
    width: 100%;
  }

  /* Admin tournaments mobile */
  body[data-page="admin"] .admin-tournaments-top,
  body[data-page="admin"] .form-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="admin"] .admin-tournaments-top .panel,
  body[data-page="admin"] .form-grid .panel {
    grid-column: span 12;
  }

  body[data-page="admin"] .admin-form {
    gap: 0.65rem;
  }

  body[data-page="admin"] .admin-form input,
  body[data-page="admin"] .admin-form select,
  body[data-page="admin"] .admin-form textarea {
    min-height: 3rem;
    font-size: 1rem;
  }

  body[data-page="admin"] .levels-builder-row,
  body[data-page="admin"] .levels-template-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  body[data-page="admin"] .levels-item {
    flex-direction: column;
    align-items: stretch;
  }

  body[data-page="admin"] .levels-item-actions {
    justify-content: stretch;
  }

  body[data-page="admin"] .levels-item-actions .btn {
    width: 100%;
  }

  table {
    min-width: 560px;
  }

  th,
  td {
    padding: 0.58rem 0.52rem;
    font-size: 0.87rem;
  }

  .compact-table th,
  .compact-table td {
    font-size: 0.84rem;
    padding: 0.42rem 0.45rem;
  }

  .mobile-cards-table {
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }

  .mobile-cards-table thead {
    display: none;
  }

  .mobile-cards-table tbody {
    display: grid;
    gap: 0.65rem;
  }

  .mobile-cards-table tr {
    display: block;
    border: 1px solid rgba(231, 171, 68, 0.35);
    border-radius: 8px;
    background: rgba(10, 7, 12, 0.75);
    padding: 0.5rem 0.62rem;
  }

  .mobile-cards-table td {
    display: grid;
    grid-template-columns: 7.2rem 1fr;
    gap: 0.5rem;
    border: 0;
    padding: 0.34rem 0;
    min-height: 1.8rem;
    align-items: center;
  }

  .mobile-cards-table input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
  }

  .mobile-cards-table td input[type="number"].input-compact {
    width: 100%;
  }

  .mobile-cards-table td::before {
    color: var(--accent);
    font-family: "Oswald", sans-serif;
    letter-spacing: 0.04em;
    font-size: 0.76rem;
    text-transform: uppercase;
    content: "";
  }

  .mobile-cards-table td[colspan] {
    display: block;
    padding: 0.35rem 0;
    text-align: left;
  }

  .mobile-cards-table td[colspan]::before {
    content: none;
  }

  .dealer-compact-table {
    min-width: 100%;
  }

  .dealer-compact-table thead {
    display: table-header-group;
  }

  .dealer-compact-table tbody {
    display: table-row-group;
  }

  .dealer-compact-table tr {
    display: table-row;
    border: none;
    background: transparent;
    padding: 0;
  }

  .dealer-compact-table td {
    display: table-cell;
    border: 0;
    padding: 0.4rem 0.45rem;
  }

  .dealer-active-table td:nth-child(1)::before { content: "Выбор"; }
  .dealer-active-table td:nth-child(2)::before { content: "Игрок"; }
  .dealer-active-table td:nth-child(3)::before { content: "R"; }
  .dealer-active-table td:nth-child(4)::before { content: "A"; }
  .dealer-active-table td:nth-child(5)::before { content: "Chips"; }
  .dealer-active-table td:nth-child(6)::before { content: "Место"; }

  .dealer-table-players-table td:nth-child(1)::before { content: "Выбор"; }
  .dealer-table-players-table td:nth-child(2)::before { content: "Игрок"; }
  .dealer-table-players-table td:nth-child(3)::before { content: "R"; }
  .dealer-table-players-table td:nth-child(4)::before { content: "A"; }
  .dealer-table-players-table td:nth-child(5)::before { content: "Chips"; }
  .dealer-table-players-table td:nth-child(6)::before { content: "Bounty"; }
  .dealer-table-players-table td:nth-child(7)::before { content: "Место"; }

  .dealer-all-players-table td:nth-child(1)::before { content: "Игрок"; }
  .dealer-all-players-table td:nth-child(2)::before { content: "Статус"; }
  .dealer-all-players-table td:nth-child(3)::before { content: "Стол"; }
  .dealer-all-players-table td:nth-child(4)::before { content: "Место"; }
  .dealer-all-players-table td:nth-child(5)::before { content: "Chips"; }
  .dealer-all-players-table td:nth-child(6)::before { content: "Bounty"; }
  .dealer-all-players-table td:nth-child(7)::before { content: "Пересадка"; }

  .dealer-users-table td:nth-child(1)::before { content: "Игрок"; }
  .dealer-users-table td:nth-child(2)::before { content: "Телефон"; }
  .dealer-users-table td:nth-child(3)::before { content: "Крупье"; }
  .dealer-users-table td:nth-child(4)::before { content: "Стол"; }
  .dealer-users-table td:nth-child(5)::before { content: "Действие"; }

  .tournament-report-table td:nth-child(1)::before { content: "Место"; }
  .tournament-report-table td:nth-child(2)::before { content: "Игрок"; }
  .tournament-report-table td:nth-child(3)::before { content: "Вход"; }
  .tournament-report-table td:nth-child(4)::before { content: "Re-entry"; }
  .tournament-report-table td:nth-child(5)::before { content: "Бесплатные"; }
  .tournament-report-table td:nth-child(6)::before { content: "Платные"; }

  .mobile-tournaments-table td:nth-child(1)::before { content: "Дата"; }
  .mobile-tournaments-table td:nth-child(2)::before { content: "Формат"; }
  .mobile-tournaments-table td:nth-child(3)::before { content: "Места"; }
  .mobile-tournaments-table td:nth-child(4)::before { content: "Статус"; }

.mobile-ratings-table td:nth-child(1)::before { content: "#"; }
.mobile-ratings-table td:nth-child(2)::before { content: "Игрок"; }
.mobile-ratings-table td:nth-child(3)::before { content: "Рейтинг"; }
.mobile-ratings-table td:nth-child(4)::before { content: "Турниров"; }
.mobile-monthly-ratings-table td:nth-child(1)::before { content: "#"; }
.mobile-monthly-ratings-table td:nth-child(2)::before { content: "Игрок"; }
.mobile-monthly-ratings-table td:nth-child(3)::before { content: "Очки"; }

  .mobile-admin-ratings-table td:nth-child(1)::before { content: "#"; }
  .mobile-admin-ratings-table td:nth-child(2)::before { content: "Игрок"; }
  .mobile-admin-ratings-table td:nth-child(3)::before { content: "Рейтинг"; }
  .mobile-admin-ratings-table td:nth-child(4)::before { content: "Новый"; }
  .mobile-admin-ratings-table td:nth-child(5)::before { content: "Действие"; }

  .mobile-admin-invites-table td:nth-child(1)::before { content: "Игрок"; }
  .mobile-admin-invites-table td:nth-child(2)::before { content: "Рейтинг"; }
  .mobile-admin-invites-table td:nth-child(3)::before { content: "Telegram"; }
  .mobile-admin-invites-table td:nth-child(4)::before { content: "Статус"; }
  .mobile-admin-invites-table td:nth-child(5)::before { content: "Ответ"; }
  .mobile-admin-invites-table td:nth-child(6)::before { content: "Действие"; }

  .poker-card {
    width: 84px;
    height: 122px;
  }

  .poker-card + .poker-card {
    margin-left: -18px;
  }

  .poker-card .corner b {
    font-size: 1.3rem;
  }

  .poker-card .corner i {
    font-size: 0.9rem;
  }

  .poker-card .pip {
    font-size: 1.7rem;
  }

  .account-avatar-wrap {
    width: 68px;
    height: 68px;
  }

  .participants-text-list {
    font-size: 0.88rem;
  }
}

@media (max-width: 420px) {
  .site-header {
    padding: 0.65rem 0.7rem;
  }

  .logo {
    font-size: 1.26rem;
  }

  h1 {
    font-size: 1.42rem;
  }

  .mobile-cards-table td {
    grid-template-columns: 6.2rem 1fr;
    gap: 0.45rem;
  }

  .dealer-compact-table thead {
    display: none;
  }

  .dealer-compact-table tbody {
    display: grid;
    gap: 0.65rem;
  }

  .dealer-compact-table tr {
    display: block;
    border: 1px solid rgba(231, 171, 68, 0.35);
    border-radius: 8px;
    background: rgba(10, 7, 12, 0.75);
    padding: 0.5rem 0.62rem;
  }

  .dealer-compact-table td {
    display: grid;
    grid-template-columns: 6.2rem 1fr;
    gap: 0.45rem;
    border: 0;
    padding: 0.34rem 0;
    min-height: 1.8rem;
    align-items: center;
  }

  .dealer-compact-table td::before {
    color: var(--accent);
    font-family: "Oswald", sans-serif;
    letter-spacing: 0.04em;
    font-size: 0.76rem;
    text-transform: uppercase;
    content: "";
  }

  .dealer-compact-table td[colspan] {
    display: block;
    padding: 0.35rem 0;
    text-align: left;
  }

  .dealer-compact-table td[colspan]::before {
    content: none;
  }
}

.tv-overlay-main {
  width: 100%;
  max-width: none;
  margin: 0;
  height: 100vh;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
}

body[data-page="overlay-tv"] {
  overflow: hidden;
}

body[data-page="overlay-tv"] .tv-overlay-main {
  transform: scale(0.75);
  transform-origin: top left;
  width: 133.3333vw;
  height: 133.3333vh;
}

body[data-page="overlay-tv"] .tv-overlay-board {
  height: 133.3333vh;
  min-height: 133.3333vh;
}

.stream-about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 16px;
  align-items: start;
}

.stream-about-qr {
  margin: 0;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.stream-about-qr img {
  width: 100%;
  max-width: 260px;
  border-radius: 16px;
  border: 1px solid rgba(255, 194, 80, 0.22);
  background: rgba(9, 12, 20, 0.6);
}

.stream-about-qr.is-missing {
  display: none;
}

@media (max-width: 720px) {
  .stream-about-grid {
    grid-template-columns: 1fr;
  }
  .stream-about-qr img {
    max-width: 320px;
  }
}

.tv-overlay-board {
  position: relative;
  height: 100vh;
  min-height: 100vh;
  padding: 1.15rem;
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(0, 1fr) minmax(220px, 0.35fr);
  gap: 1rem;
  align-items: stretch;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(7, 8, 12, 0.74), rgba(8, 7, 10, 0.88)),
    radial-gradient(circle at 20% 20%, rgba(245, 196, 86, 0.18), transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(202, 105, 30, 0.22), transparent 35%);
  background-size: cover;
  background-position: center;
}

.tv-overlay-center {
  display: grid;
  align-content: center;
  text-align: center;
  gap: 0.58rem;
  min-height: 0;
  width: 100%;
  justify-items: stretch;
}

.tv-overlay-center h1,
.tv-timer,
.tv-level,
.tv-blinds,
.tv-top-stats,
.tv-stats {
  width: 100%;
  max-width: none;
}

.tv-break-eta {
  width: max-content;
  max-width: max-content;
  justify-self: center;
}

.tv-overlay-center h1 {
  font-size: clamp(1.75rem, 3.2vw, 3.4rem);
  margin: 0;
}

.tv-timer {
  font-family: "Russo One", "Oswald", sans-serif;
  font-size: clamp(4.8rem, 13.2vw, 12rem);
  line-height: 1;
  color: #fff4d0;
  text-shadow: 0 0 36px rgba(255, 201, 92, 0.35);
}

.tv-level {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 2.1rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tv-blinds {
  margin: 0;
  font-family: "Oswald", sans-serif;
  font-size: clamp(3.35rem, 5.9vw, 6.1rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(255, 197, 88, 0.35);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  justify-content: center;
  column-gap: 0.9em;
  align-items: end;
}

.tv-blinds-col {
  display: grid;
  justify-items: center;
  align-items: end;
  row-gap: 0.08em;
}

.tv-blinds-label {
  font-size: 0.33em;
  line-height: 1;
  letter-spacing: 0.08em;
  color: rgba(255, 224, 160, 0.9);
  text-shadow: 0 0 10px rgba(255, 197, 88, 0.35);
}

.tv-blinds-value {
  font-size: 1em;
  line-height: 1;
}

.tv-doyle-panel {
  justify-self: center;
  padding: 0.45rem 1.65rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 194, 82, 0.45);
  background: rgba(7, 7, 12, 0.7);
  letter-spacing: 0.2em;
  font-family: "Russo One", "Oswald", sans-serif;
  color: #f7ce6e;
  font-size: clamp(2.7rem, 3.75vw, 3.6rem);
}


.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.admin-modal[hidden] {
  display: none !important;
}

body.no-scroll {
  overflow: hidden;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 14, 0.72);
  backdrop-filter: blur(2px);
}

.admin-modal-panel {
  position: relative;
  z-index: 1;
  width: min(980px, 96vw);
  max-height: 92vh;
  overflow: auto;
}

.ratings-analytics-modal {
  width: min(1100px, 96vw);
}

.ratings-analytics-modal-actions {
  justify-content: flex-start;
  gap: 10px;
}

.ratings-analytics-modal-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.ratings-analytics-modal-toolbar .field {
  min-width: 220px;
}

.ratings-analytics-modal-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.ratings-analytics-modal-kpis .report-card {
  margin: 0;
}

.ratings-analytics-modal-compare {
  margin-top: 12px;
}

.ratings-analytics-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.ratings-analytics-modal-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
}

.ratings-analytics-modal-card h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  opacity: 0.9;
}

.ratings-analytics-modal-card canvas {
  width: 100%;
  max-height: 260px;
}

@media (max-width: 900px) {
  .ratings-analytics-modal-grid {
    grid-template-columns: 1fr;
  }
  .ratings-analytics-modal-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.rating-row-actions td {
  padding-top: 0;
}

.rating-row-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0 2px 0;
}

.rating-row.is-expanded {
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.ratings-analytics-modal-history {
  margin-top: 14px;
}

.ratings-analytics-modal-history h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  opacity: 0.9;
}

.ratings-analytics-modal-history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 900px) {
  .ratings-analytics-modal-history-grid {
    grid-template-columns: 1fr;
  }
}

.stream-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background: rgba(18, 23, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stream-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.stream-player video {
  width: 100%;
  height: 100%;
  background: #000;
}

.stream-player.is-paused::after {
  content: "Пауза";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(5, 8, 14, 0.72);
  backdrop-filter: blur(2px);
}

.doyle-combobox {
  position: relative;
}

.doyle-autocomplete {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  background: rgba(18, 23, 28, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  padding: 6px;
}

.doyle-autocomplete .opt {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.doyle-autocomplete .opt:hover,
.doyle-autocomplete .opt.active {
  background: rgba(255, 255, 255, 0.06);
}

.doyle-autocomplete .opt .meta {
  opacity: 0.7;
  white-space: nowrap;
}

.ratings-analytics-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: end;
  margin: 12px 0 12px;
}

.ratings-analytics-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 12px;
}

.ratings-analytics-summary .report-card {
  min-height: 72px;
}

@media (max-width: 720px) {
  .ratings-analytics-toolbar {
    grid-template-columns: 1fr;
  }
  .ratings-analytics-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-users-group-row td {
  font-weight: 700;
  color: #f2cb7a;
  background: rgba(255, 255, 255, 0.04);
}

.admin-user-row-collapsible td {
  padding: 0.55rem 0.75rem;
}

#admin-users-table th:nth-child(1),
#admin-users-table td:nth-child(1) {
  width: 4%;
  text-align: center;
}

#admin-users-table th:nth-child(2),
#admin-users-table td:nth-child(2) {
  width: 7%;
}

#admin-users-table th:nth-child(3),
#admin-users-table td:nth-child(3) {
  width: 31%;
}

#admin-users-table th:nth-child(4),
#admin-users-table td:nth-child(4) {
  width: 15%;
}

#admin-users-table th:nth-child(5),
#admin-users-table td:nth-child(5) {
  width: 13%;
}

#admin-users-table th:nth-child(6),
#admin-users-table td:nth-child(6) {
  width: 12%;
}

#admin-users-table th:nth-child(7),
#admin-users-table td:nth-child(7) {
  width: 12%;
}

#admin-users-table th:nth-child(8),
#admin-users-table td:nth-child(8) {
  width: 6%;
}

.admin-user-row-check,
#admin-users-check-all {
  width: 1rem;
  height: 1rem;
}

.admin-user-icon-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.admin-icon-btn {
  width: 2rem;
  height: 2rem;
  padding: 0.2rem;
  border-radius: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-icon-btn svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
}

.admin-icon-btn-danger {
  color: #ff7b7b;
  border-color: rgba(255, 123, 123, 0.65);
}

.admin-icon-btn-danger:hover {
  background: rgba(255, 123, 123, 0.15);
}

.admin-icon-btn-favorite {
  color: #d6b679;
  border-color: rgba(214, 182, 121, 0.6);
}

.admin-icon-btn-favorite.active {
  color: #ffcf5a;
  border-color: rgba(255, 207, 90, 0.85);
  background: rgba(255, 207, 90, 0.18);
}

.admin-user-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  align-items: center;
}

.admin-player-badge-new {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  border: 1px solid rgba(122, 206, 255, 0.72);
  background: rgba(32, 94, 141, 0.28);
  color: #b5e6ff;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.admin-user-details-row td {
  padding-top: 0;
}

.admin-user-details[hidden] {
  display: none;
}

.admin-user-details {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-user-fields-labeled {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.5rem;
}

.admin-user-edit-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.admin-user-edit-field > span {
  font-size: 0.78rem;
  opacity: 0.8;
}

.tv-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  font-family: "Oswald", sans-serif;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.04em;
  max-width: min(96vw, 1200px);
}

.tv-stats span {
  padding: 0.27em 0.6em;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 10, 14, 0.55);
}

.tv-stats .tv-stat-big {
  font-size: 1.1em;
  letter-spacing: 0.03em;
}

.tv-stats .tv-stat-timer {
  font-size: 1.2em;
  letter-spacing: 0.03em;
}

.tv-stats .tv-stat-timer strong {
  font-size: 1.22em;
  color: #fff4d0;
}

.tv-stats .tv-stat-big strong {
  font-size: 1.16em;
  color: #fff;
}

.tv-stats .tv-stat-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-size: 1.35em;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.tv-top-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  margin: 0.15rem 0 0.5rem;
}

.tv-top-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  padding: 0.22em 0.62em;
  border-radius: 999px;
  border: 1px solid rgba(231, 171, 68, 0.3);
  font-family: "Oswald", sans-serif;
  font-size: 1em;
  letter-spacing: 0.04em;
}

.tv-top-pill strong {
  color: #fff;
}

.tv-top-pill-players {
  background: rgba(34, 106, 68, 0.34);
  color: #b7ffd2;
}

.tv-top-pill-re {
  background: rgba(93, 51, 132, 0.34);
  color: #e7ccff;
}

@media (max-width: 900px) {
  body[data-page="tournament-admin"] .mobile-quick-panel {
    display: block;
  }
  body[data-page="tournament-admin"] .mobile-quick-panel .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  body[data-page="tournament-admin"] .mobile-quick-panel .btn {
    width: 100%;
  }
}

@media (min-width: 901px) {
  body[data-page="tournament-admin"] .mobile-quick-panel {
    display: none;
  }
}


.tv-sidebar {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(7, 6, 10, 0.8);
  padding: 0.85rem;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
  overflow: hidden;
}

.tv-sidebar.tv-outs {
  width: clamp(420px, 38vw, 780px);
  max-width: none;
  justify-self: start;
}

.tv-sidebar.tv-leaders {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  border: none;
  background: transparent;
  padding: 0;
}

.tv-leaders-stack {
  display: block;
  height: auto;
  width: 100%;
  min-height: 0;
}

.tv-leaders-main {
  display: none;
}

.tv-points-strip {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.25rem;
  min-height: 0;
  height: 100%;
  width: fit-content;
  max-width: min(100%, 340px);
  justify-self: end;
  overflow: visible;
}

.tv-outs {
  gap: 0.5rem;
}

.tv-outs-list {
  display: grid;
  gap: 0.3rem;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.2rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
  max-width: none;
}

.tv-out-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  column-gap: 0.6ch;
  row-gap: 0;
  align-items: center;
  font-size: 0.84rem;
  line-height: 1.2;
  padding: 0.18rem 0.2rem;
  border-radius: 6px;
  border: 1px solid rgba(231, 171, 68, 0.14);
  background: rgba(10, 10, 14, 0.38);
  width: 100%;
  max-width: none;
}

.tv-out-place {
  font-family: var(--oc-outs-font-family, "Russo One", "Oswald", sans-serif);
  color: var(--oc-outs-color, var(--accent));
  font-size: var(--oc-outs-font-size, 2.1rem);
  font-weight: var(--oc-outs-font-weight, normal);
  line-height: var(--oc-outs-line-height, 1);
}

.tv-out-name {
  font-size: var(--oc-outs-font-size, 4.2rem);
  font-family: var(--oc-outs-font-family, "Russo One", "Oswald", sans-serif);
  color: var(--oc-outs-color, #fff3ce);
  font-weight: var(--oc-outs-font-weight, normal);
  line-height: var(--oc-outs-line-height, 1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  padding-right: 0;
}

.tv-out-meta {
  font-size: var(--oc-outs-font-size, 2.1rem);
  font-family: var(--oc-outs-font-family, "Russo One", "Oswald", sans-serif);
  color: var(--oc-outs-color, #fff3ce);
  font-weight: var(--oc-outs-font-weight, normal);
  line-height: var(--oc-outs-line-height, 1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  margin-left: 0;
  text-align: left;
}

.tv-out-bounty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: calc(var(--oc-outs-font-size, 2.1rem) * 0.34);
  height: calc(var(--oc-outs-font-size, 2.1rem) * 0.34);
  border: calc(var(--oc-outs-font-size, 2.1rem) * 0.035) solid #ff3b30;
  border-radius: 50%;
  box-sizing: border-box;
  margin-right: 0.22em;
  transform: translateY(calc(var(--oc-outs-font-size, 2.1rem) * 0.01));
}

.tv-out-bounty-icon::before,
.tv-out-bounty-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #ff3b30;
  transform: translate(-50%, -50%);
}

.tv-out-bounty-icon::before {
  width: calc(var(--oc-outs-font-size, 2.1rem) * 0.04);
  height: calc(var(--oc-outs-font-size, 2.1rem) * 0.22);
}

.tv-out-bounty-icon::after {
  width: calc(var(--oc-outs-font-size, 2.1rem) * 0.22);
  height: calc(var(--oc-outs-font-size, 2.1rem) * 0.04);
}

.tv-sidebar h2 {
  margin-top: 0;
  margin-bottom: 0.3rem;
  font-size: 1.8rem;
}

.tv-leaders-list {
  display: grid;
  gap: 0.16rem;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.14rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tv-leader-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  column-gap: 0.6ch;
  row-gap: 0;
  align-items: center;
  font-size: 0.67rem;
  line-height: 1.2;
  padding: 0.11rem 0.14rem;
  border-radius: 6px;
  border: 1px solid rgba(231, 171, 68, 0.14);
  background: rgba(10, 10, 14, 0.38);
}

.tv-leader-name {
  font-size: var(--oc-leaders-font-size, 3.2rem);
  font-family: var(--oc-leaders-font-family, "Russo One", "Oswald", sans-serif);
  color: var(--oc-leaders-color, #fff3ce);
  font-weight: var(--oc-leaders-font-weight, normal);
  line-height: var(--oc-leaders-line-height, 1);
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  font-family: "Russo One", "Oswald", sans-serif;
}

.tv-outs-list::-webkit-scrollbar,
.tv-leaders-list::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.tv-leader-row > span:first-child,
.tv-leader-points {
  font-size: var(--oc-leaders-font-size, 3.2rem);
  font-family: var(--oc-leaders-font-family, "Russo One", "Oswald", sans-serif);
  color: var(--oc-leaders-color, #fff3ce);
  font-weight: var(--oc-leaders-font-weight, normal);
  line-height: var(--oc-leaders-line-height, 1);
}

.tv-name-achievement {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.34rem;
  font-size: 0.86em;
  color: #ffd15f;
  filter: drop-shadow(0 0 6px rgba(255, 196, 79, 0.45));
}

.tv-first-badge {
  margin-left: 0.3rem;
  padding: 0.05em 0.32em 0.05em 0.1em;
  border-color: rgba(255, 216, 102, 0.75);
  background: rgba(12, 12, 20, 0.78);
}

.tv-first-badge img {
  width: 0.62em;
  height: 0.62em;
}

.tv-first-badge span {
  font-size: 0.62em;
}

.tv-out-first-badge {
  margin-left: 0.42rem;
  vertical-align: middle;
}

.tv-leader-points {
  text-align: right;
  letter-spacing: 0.02em;
  margin-left: 2ch;
}

.tv-prize-note {
  margin: 0;
  font-size: 1.14rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-align: center;
  white-space: normal;
  line-height: 1.15;
}

.tv-prize-note-strip {
  margin-top: 0;
  font-size: 1.14rem;
}

.tv-points-title {
  margin: 0 0 0.24rem;
  text-transform: uppercase;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.05em;
  color: #ffd47a;
  font-size: 1.1rem;
  text-align: center;
}

.tv-cup-icon {
  display: inline-block;
  font-size: 2.56rem;
  line-height: 1;
  color: #ffd45b;
  filter: drop-shadow(0 0 8px rgba(255, 204, 84, 0.45));
}

.tv-points-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.18rem;
  max-height: none;
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding-right: 0.08rem;
  width: 100%;
  margin-inline: 0;
}

.tv-points-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  border-radius: 4px;
  border: 1px solid rgba(231, 171, 68, 0.12);
  background: rgba(10, 10, 14, 0.28);
  padding: 0.28rem 0.42rem;
  font-size: 3rem;
  font-family: "Oswald", sans-serif;
  color: #fff3ce;
  width: 100%;
}

.tv-points-row span:first-child {
  font-size: 2.1rem;
}

.tv-points-row span:first-child {
  min-width: 1.75rem;
}

.tv-qr-wrap {
  position: static;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.38rem;
  background: rgba(4, 4, 6, 0.8);
  text-align: center;
  margin-top: 0;
  justify-self: center;
  align-self: center;
}

.tv-qr-wrap p {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
}

.tv-break-eta {
  margin: 0 0 0.35rem;
  font-size: 2.34rem;
  color: #fff3ce;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tv-break-eta-top {
  position: absolute;
  top: 0.48rem;
  left: 0;
  right: 0;
  width: max-content;
  margin-inline: auto;
  transform: none;
  margin: 0;
  z-index: 3;
  text-align: center;
  padding: 0.22rem 0.86rem;
  border-radius: 999px;
  border: 1px solid rgba(231, 171, 68, 0.36);
  background: rgba(8, 8, 14, 0.65);
}

.tv-break-eta strong {
  color: #fff;
}

.tv-qr-wrap img {
  width: 62px;
  height: 62px;
  display: block;
  background: #fff;
  border-radius: 6px;
}

.tv-out-spotlight {
  --tv-out-spotlight-scale: 1.2;
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(108, 73, 38, 0.42) 0 12px,
      rgba(141, 98, 53, 0.42) 12px 24px
    ),
    radial-gradient(circle at 50% 45%, rgba(48, 29, 14, 0.35), rgba(16, 9, 5, 0.68));
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
  z-index: 40;
}

.tv-out-spotlight.show {
  opacity: 1;
}

.tv-out-card {
  position: relative;
  overflow: hidden;
  display: block;
  padding: 2.35rem 2.1rem 2rem;
  border-radius: 14px;
  border: 1px solid rgba(98, 63, 29, 0.72);
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0) 36%),
    radial-gradient(circle at 80% 78%, rgba(98, 63, 29, 0.2), rgba(0, 0, 0, 0) 42%),
    linear-gradient(160deg, #ddbe84 0%, #cfad74 45%, #be995f 100%);
  box-shadow:
    0 20px 42px rgba(24, 14, 8, 0.64),
    inset 0 0 0 1px rgba(255, 238, 196, 0.22),
    inset 0 0 32px rgba(86, 51, 22, 0.26);
  transform: translateY(18px) scale(calc(var(--tv-out-spotlight-scale, 1) * 0.98));
  transition: transform 260ms ease;
  width: min(670px, 94vw);
  min-height: min(860px, 95vh);
  filter: saturate(0.88) contrast(1.02);
  clip-path: polygon(2% 1%, 97% 0%, 99% 4%, 98% 16%, 100% 28%, 97% 39%, 99% 52%, 97% 66%, 99% 81%, 97% 95%, 90% 100%, 74% 98%, 58% 100%, 44% 98%, 30% 100%, 16% 98%, 4% 100%, 0% 90%, 2% 77%, 0% 63%, 2% 49%, 0% 35%, 2% 21%, 0% 10%);
}

.tv-out-card::before {
  content: "";
  position: absolute;
  inset: 10px 14px;
  border: 2px solid rgba(74, 46, 20, 0.72);
  border-left-width: 3px;
  border-right-width: 3px;
  pointer-events: none;
}

.tv-out-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 18%, rgba(66, 40, 18, 0.22), rgba(0, 0, 0, 0) 38%),
    radial-gradient(circle at 78% 76%, rgba(66, 40, 18, 0.2), rgba(0, 0, 0, 0) 36%),
    repeating-radial-gradient(circle at 40% 32%, rgba(56, 34, 16, 0.05) 0 2px, rgba(0, 0, 0, 0) 2px 5px);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.tv-out-spotlight.show .tv-out-card {
  transform: translateY(0) scale(calc(var(--tv-out-spotlight-scale, 1) * 1));
}

.tv-out-spotlight.leaving .tv-out-card {
  transform: translateY(-12px) scale(calc(var(--tv-out-spotlight-scale, 1) * 0.985));
  opacity: 0;
  transition: transform 260ms ease, opacity 260ms ease;
}

.tv-out-avatar {
  width: 100%;
  height: clamp(260px, 40vh, 390px);
  border-radius: 4px;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.62));
  border: 2px solid rgba(72, 43, 19, 0.72);
  background-size: cover;
  background-position: center;
  filter: sepia(0.72) grayscale(0.36) contrast(1.08);
  box-shadow: inset 0 0 0 1px rgba(255, 235, 189, 0.18), 0 6px 16px rgba(38, 22, 10, 0.5);
  margin: 0.7rem 0 0.8rem;
}

.tv-out-avatar.has-avatar {
  background-color: #0a0a10;
}

.tv-out-info {
  display: flex;
  flex-direction: column;
  gap: 0.52rem;
  height: 100%;
  color: #4d2e14;
  text-shadow: none;
}

.tv-out-title {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #3e2410;
  font-size: clamp(3.1rem, 8.4vw, 5.3rem);
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.tv-out-title::before {
  content: "***";
  display: block;
  font-size: 1.2rem;
  letter-spacing: 0.42em;
  margin-bottom: 0.2rem;
  color: rgba(52, 30, 13, 0.88);
  text-align: center;
}

.tv-out-subtitle {
  margin: 0;
  font-family: "Oswald", sans-serif;
  font-size: clamp(1.6rem, 4.6vw, 2.35rem);
  font-style: italic;
  text-align: center;
  color: rgba(61, 36, 15, 0.9);
}

.tv-out-info h2 {
  margin: 0;
  font-size: clamp(4.4rem, 10.2vw, 7.4rem);
  color: #fff7d8;
  letter-spacing: 0.045em;
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  line-height: 1.02;
  text-align: center;
  text-shadow: 0 0 12px rgba(255, 217, 121, 0.45), 0 6px 18px rgba(78, 33, 10, 0.35);
  padding: 0.14em 0.22em;
  border: 2px solid rgba(106, 46, 14, 0.72);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(164, 65, 22, 0.86), rgba(122, 47, 16, 0.9)),
    linear-gradient(90deg, rgba(255, 206, 108, 0.28), rgba(255, 237, 188, 0.18));
  box-shadow: inset 0 0 0 1px rgba(255, 226, 150, 0.4), 0 10px 24px rgba(52, 22, 8, 0.34);
}

.tv-out-info .tv-out-place {
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 700;
  color: #2a1508;
  text-transform: uppercase;
  font-style: italic;
  font-family: "Oswald", sans-serif;
  text-align: center;
  letter-spacing: 0.06em;
  padding: 0.24rem 0.5rem;
  border: 2px solid rgba(74, 42, 18, 0.75);
  border-radius: 8px;
  background: rgba(255, 233, 178, 0.48);
  text-shadow: 0 1px 0 rgba(255, 239, 197, 0.45), 0 5px 12px rgba(34, 20, 10, 0.2);
}

.tv-out-info .tv-out-meta {
  font-size: clamp(1.12rem, 3.1vw, 1.58rem);
  color: #3b230f;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: "Oswald", sans-serif;
  margin-top: auto;
  text-align: center;
  font-weight: 700;
}

.tv-out-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
  margin-top: 0.48rem;
}

body.tv-no-bounty .tv-out-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tv-out-stat-cell {
  border: 1px solid rgba(72, 43, 19, 0.72);
  border-radius: 6px;
  background: rgba(121, 83, 45, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 238, 196, 0.18);
  padding: 0.52rem 0.4rem 0.56rem;
  text-align: center;
  text-transform: uppercase;
}

.tv-out-stat-cell span {
  display: block;
  font-family: "Oswald", sans-serif;
  font-size: clamp(0.94rem, 2.1vw, 1.22rem);
  letter-spacing: 0.1em;
  color: rgba(62, 34, 13, 0.95);
  font-weight: 700;
}

.tv-out-stat-cell strong {
  display: block;
  margin-top: 0.2rem;
  font-family: "Russo One", "Oswald", sans-serif;
  font-size: clamp(1.65rem, 4.3vw, 2.85rem);
  color: #2c1608;
  text-shadow: 0 1px 0 rgba(255, 237, 198, 0.55), 0 6px 14px rgba(38, 21, 9, 0.2);
}

.tv-out-bullets {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.tv-bullet-hole {
  position: absolute;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.2);
  background:
    radial-gradient(circle at center, rgba(12, 8, 6, 0.98) 0 24%, rgba(30, 18, 11, 0.88) 25% 38%, rgba(192, 128, 68, 0.58) 40% 55%, rgba(0, 0, 0, 0) 62%);
  box-shadow: 0 0 0 1px rgba(24, 14, 8, 0.7), 0 0 20px rgba(0, 0, 0, 0.45);
}

.tv-bullet-hole::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 165px;
  height: 105px;
  transform: translate(-50%, -58%) scale(0.525);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(182, 182, 182, 0.45), rgba(130, 130, 130, 0.22) 44%, rgba(122, 122, 122, 0) 74%);
  opacity: 0;
}

.tv-bullet-hole.shot {
  animation: tv-bullet-impact 230ms ease-out forwards;
}

.tv-bullet-hole.smoke::after {
  animation: tv-bullet-smoke 1.25s ease-out forwards;
}

.tv-bullet-hole.hole-1 {
  left: 39%;
  top: 34%;
}

.tv-bullet-hole.hole-2 {
  left: 66%;
  top: 51%;
}

.tv-bullet-hole.hole-3 {
  left: 51%;
  top: 66%;
}

.tv-out-finish-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
  background: radial-gradient(circle at 50% 50%, rgba(18, 8, 2, 0.26), rgba(6, 3, 1, 0.74));
  backdrop-filter: blur(2px);
}

.tv-out-finish-overlay.show {
  opacity: 1;
}

.tv-out-finish-window {
  width: min(1320px, 96vw);
  border-radius: 20px;
  border: 2px solid rgba(255, 222, 160, 0.6);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 226, 170, 0.22), rgba(255, 226, 170, 0) 42%),
    linear-gradient(170deg, rgba(29, 15, 6, 0.93), rgba(16, 8, 3, 0.92));
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 232, 186, 0.25);
  padding: 2.1rem 2.4rem 2.4rem;
  display: grid;
  gap: 1rem;
  justify-items: center;
  animation: tv-out-finish-in 340ms ease-out;
}

.tv-out-finish-kicker {
  margin: 0;
  font-family: "Oswald", sans-serif;
  font-size: clamp(1.1rem, 2.6vw, 1.85rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 224, 167, 0.95);
}

.tv-out-finish-name {
  margin: 0;
  font-family: "Russo One", "Oswald", sans-serif;
  font-size: clamp(2.1rem, 6.2vw, 4.8rem);
  line-height: 0.98;
  text-transform: uppercase;
  color: #fff0c2;
  text-align: center;
  text-shadow: 0 2px 0 rgba(92, 50, 20, 0.55), 0 10px 24px rgba(0, 0, 0, 0.42);
}

.tv-out-finish-place {
  margin: 0;
  font-family: "Russo One", "Oswald", sans-serif;
  font-size: clamp(3.7rem, 11.5vw, 10rem);
  line-height: 0.95;
  text-transform: uppercase;
  color: #ffda98;
  text-shadow: 0 3px 0 rgba(96, 53, 20, 0.5), 0 16px 34px rgba(0, 0, 0, 0.45);
}

.tv-out-finish-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

body.tv-no-bounty .tv-out-finish-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 720px;
}

.tv-out-finish-cell {
  border: 2px solid rgba(255, 222, 160, 0.46);
  border-radius: 12px;
  padding: 0.82rem 1rem 1rem;
  text-align: center;
  background: rgba(255, 205, 123, 0.08);
}

.tv-out-finish-cell span {
  display: block;
  font-family: "Oswald", sans-serif;
  font-size: clamp(1rem, 2.4vw, 1.6rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 225, 171, 0.9);
}

.tv-out-finish-cell strong {
  display: block;
  margin-top: 0.2rem;
  font-family: "Russo One", "Oswald", sans-serif;
  font-size: clamp(2.1rem, 8vw, 6.7rem);
  line-height: 1;
  color: #fff3cf;
  text-shadow: 0 2px 0 rgba(89, 49, 18, 0.48), 0 14px 30px rgba(0, 0, 0, 0.46);
}

.tv-winner-spotlight {
  position: fixed;
  inset: 0;
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

.tv-winner-spotlight.show {
  opacity: 1;
}

.tv-winner-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(14, 8, 4, 0.7), rgba(8, 4, 2, 0.55)),
    url("assets/winner_first_place.jpg") center / cover no-repeat;
  filter: sepia(0.28) saturate(1.06) contrast(1.05);
}

.tv-winner-panel {
  position: relative;
  z-index: 1;
  width: min(1220px, 94vw);
  margin: clamp(1.1rem, 3vh, 2.2rem) auto;
  padding: clamp(1.15rem, 2.6vw, 2.1rem);
  border: 2px solid rgba(255, 225, 163, 0.58);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 9, 4, 0.48), rgba(7, 4, 2, 0.7));
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 238, 201, 0.22);
  display: grid;
  justify-items: center;
  gap: clamp(0.5rem, 1.6vh, 1rem);
  text-align: center;
  animation: tv-winner-panel-in 380ms ease-out;
}

.tv-winner-kicker {
  margin: 0;
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #ffd9a1;
  font-size: clamp(1rem, 2.6vw, 1.75rem);
}

.tv-winner-name {
  margin: 0;
  font-family: "Russo One", "Oswald", sans-serif;
  text-transform: uppercase;
  color: #fff0c6;
  line-height: 0.95;
  text-shadow: 0 3px 0 rgba(58, 31, 12, 0.6), 0 16px 34px rgba(0, 0, 0, 0.55);
  font-size: clamp(3.2rem, 10vw, 8rem);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.tv-winner-tournament {
  margin: 0;
  font-family: "Oswald", sans-serif;
  font-size: clamp(1.2rem, 3.1vw, 2.5rem);
  letter-spacing: 0.04em;
  color: #ffddaa;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.46);
}

.tv-winner-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.5rem, 1.5vw, 1rem);
}

body.tv-no-bounty .tv-winner-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tv-winner-stat {
  border: 2px solid rgba(255, 228, 171, 0.46);
  border-radius: 12px;
  background: rgba(255, 201, 120, 0.08);
  padding: clamp(0.45rem, 1.3vw, 0.9rem) clamp(0.5rem, 1.2vw, 0.85rem);
}

.tv-winner-stat span {
  display: block;
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255, 228, 177, 0.94);
  font-size: clamp(0.9rem, 2vw, 1.35rem);
}

.tv-winner-stat strong {
  display: block;
  margin-top: 0.15rem;
  font-family: "Russo One", "Oswald", sans-serif;
  color: #fff2d1;
  line-height: 0.95;
  text-shadow: 0 2px 0 rgba(77, 42, 16, 0.6), 0 10px 24px rgba(0, 0, 0, 0.55);
  font-size: clamp(1.9rem, 5.5vw, 5rem);
}

.tv-winner-credits {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 320ms ease;
  background: linear-gradient(180deg, rgba(6, 3, 1, 0.15), rgba(6, 3, 1, 0.62));
}

.tv-winner-credits.show {
  opacity: 1;
}

.tv-winner-credits-track {
  position: absolute;
  left: 50%;
  bottom: -5%;
  transform: translateX(-50%);
  width: min(1120px, 92vw);
  display: grid;
  gap: 2.2rem;
  animation-name: tv-winner-credits-roll;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.tv-winner-credits-section {
  text-align: center;
  display: grid;
  gap: 0.7rem;
}

.tv-winner-credits-section h3 {
  margin: 0;
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #ffe3b4;
  font-size: clamp(1.2rem, 2.8vw, 2rem);
}

.tv-winner-credits-line {
  display: grid;
  grid-template-columns: 120px 1fr 220px;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid rgba(255, 225, 162, 0.3);
  border-radius: 9px;
  background: rgba(20, 10, 4, 0.58);
  padding: 0.4rem 0.7rem;
}

.tv-winner-credits-line span {
  font-family: "Oswald", sans-serif;
  color: #ffdca6;
  font-size: clamp(1.1rem, 2.6vw, 1.85rem);
}

.tv-winner-credits-line strong {
  font-family: "Russo One", "Oswald", sans-serif;
  color: #fff1cd;
  font-size: clamp(1.7rem, 4.2vw, 3.1rem);
  line-height: 1.02;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(75, 41, 16, 0.55), 0 8px 18px rgba(0, 0, 0, 0.5);
}

.tv-winner-credits-staff p {
  margin: 0;
  font-family: "Oswald", sans-serif;
  color: #ffe3b8;
  font-size: clamp(1.2rem, 2.8vw, 2rem);
  letter-spacing: 0.04em;
}

.tv-winner-credits-end {
  text-align: center;
  font-family: "Russo One", "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff3d3;
  font-size: clamp(4.2rem, 12vw, 11rem);
  line-height: 0.95;
  text-shadow: 0 4px 0 rgba(84, 47, 19, 0.62), 0 20px 42px rgba(0, 0, 0, 0.62);
  padding: 1.8rem 0 0.8rem;
}

@keyframes tv-winner-panel-in {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tv-winner-credits-roll {
  0% {
    transform: translate(-50%, 100%);
  }
  100% {
    transform: translate(-50%, -120%);
  }
}

@keyframes tv-out-finish-in {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tv-bullet-impact {
  0% {
    opacity: 0;
    transform: scale(3.15);
    filter: brightness(2.1);
  }
  38% {
    opacity: 1;
    transform: scale(1.125);
    filter: brightness(1.35);
  }
  100% {
    opacity: 1;
    transform: scale(1.5);
    filter: brightness(1);
  }
}

@keyframes tv-bullet-smoke {
  0% {
    opacity: 0.68;
    transform: translate(-50%, -62%) scale(0.6);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -160%) scale(1.77);
  }
}

@media (max-width: 900px) {
  .tv-overlay-board {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    padding: 0.75rem;
    overflow: auto;
  }

  .tv-sidebar {
    order: 2;
    grid-template-rows: auto auto auto;
  }

  .tv-leaders-stack {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .tv-qr-wrap {
    position: static;
    order: 3;
    margin-left: auto;
  }
}

/* Compact single-screen view for overlay opened from QR on phone */
body.tv-qr-mobile .tv-overlay-main {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

body.tv-qr-mobile .tv-overlay-board {
  height: 200vh;
  min-height: 200vh;
  width: 200vw;
  padding: 0.45rem;
  gap: 0.45rem;
  overflow: hidden;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "center center"
    "outs leaders";
  transform: scale(0.5);
  transform-origin: top left;
}

body.tv-qr-mobile .tv-overlay-center {
  grid-area: center;
  gap: 0.22rem;
  align-content: center;
}

body.tv-qr-mobile .tv-outs {
  grid-area: outs;
}

body.tv-qr-mobile .tv-leaders {
  grid-area: leaders;
}

body.tv-qr-mobile .tv-sidebar {
  padding: 0.42rem;
  border-radius: 8px;
}

body.tv-qr-mobile .tv-overlay-center h1 {
  font-size: clamp(0.95rem, 3.6vw, 1.25rem);
  line-height: 1.14;
}

body.tv-qr-mobile .tv-doyle-panel {
  padding: 0.18rem 0.72rem;
  font-size: clamp(0.86rem, 3.5vw, 1.15rem);
  letter-spacing: 0.09em;
}

body.tv-qr-mobile .tv-top-stats {
  margin: 0.06rem 0 0.12rem;
  gap: 0.28rem;
}

body.tv-qr-mobile .tv-top-pill {
  font-size: 1em;
  padding: 0.16em 0.44em;
}

body.tv-qr-mobile .tv-break-eta {
  font-size: clamp(0.7rem, 2.7vw, 0.9rem);
}

body.tv-qr-mobile .tv-break-eta-top {
  top: 0.2rem;
  padding: 0.08rem 0.35rem;
}

body.tv-qr-mobile .tv-timer {
  font-size: clamp(2.25rem, 13.6vw, 4rem);
}

body.tv-qr-mobile .tv-level {
  font-size: clamp(0.75rem, 3.1vw, 0.96rem);
  letter-spacing: 0.05em;
}

body.tv-qr-mobile .tv-blinds {
  font-size: clamp(1.02rem, 4.2vw, 1.42rem);
  letter-spacing: 0.03em;
}

body.tv-qr-mobile .tv-stats {
  gap: 0.24rem;
  font-size: 1em;
}

body.tv-qr-mobile .tv-stats span {
  padding: 0.15em 0.35em;
}

body.tv-qr-mobile .tv-stats .tv-stat-big {
  font-size: 1.06em;
}

body.tv-qr-mobile .tv-stats .tv-stat-next {
  font-size: 1.2em;
  width: 100%;
}

body.tv-qr-mobile .tv-sidebar h2 {
  font-size: clamp(0.86rem, 3.3vw, 1.08rem);
  margin-bottom: 0.24rem;
}

body.tv-qr-mobile .tv-outs-list,
body.tv-qr-mobile .tv-leaders-list {
  gap: 0.2rem;
  overflow: hidden;
  padding-right: 0;
}

body.tv-qr-mobile .tv-out-row {
  grid-template-columns: 34px 1fr;
  gap: 0.24rem;
  font-size: clamp(0.7rem, 2.8vw, 0.9rem);
  padding: 0.12rem 0.2rem;
}

body.tv-qr-mobile .tv-out-name,
body.tv-qr-mobile .tv-leader-name {
  font-size: 1em;
  line-height: 1.1;
}

body.tv-qr-mobile .tv-out-place,
body.tv-qr-mobile .tv-out-meta,
body.tv-qr-mobile .tv-leader-row > span:first-child,
body.tv-qr-mobile .tv-leader-points {
  font-size: 1em;
  line-height: 1.1;
}

body.tv-qr-mobile .tv-out-meta {
  display: none;
}

body.tv-qr-mobile .tv-leader-row {
  grid-template-columns: 28px 1fr auto;
  gap: 0.2rem;
  font-size: clamp(0.72rem, 2.8vw, 0.9rem);
  padding: 0.11rem 0.18rem;
}

body.tv-qr-mobile .tv-leader-points {
  letter-spacing: 0.01em;
}

body.tv-qr-mobile .tv-first-badge img {
  width: 0.62em;
  height: 0.62em;
}

body.tv-qr-mobile .tv-first-badge span {
  font-size: 0.62em;
}

body.tv-qr-mobile .tv-points-strip,
body.tv-qr-mobile .tv-qr-wrap,
body.tv-qr-mobile .tv-sound-toggle {
  display: none !important;
}

body.tv-qr-mobile .tv-leaders-stack {
  grid-template-columns: 1fr;
}

body.tv-qr-mobile .tv-out-spotlight .tv-out-card {
  min-width: min(95vw, 560px);
  min-height: min(86vh, 690px);
  padding: 1.2rem 1.25rem;
}

body.tv-qr-mobile .tv-out-avatar {
  width: 100%;
  height: clamp(130px, 23vh, 200px);
}

body.tv-qr-mobile .tv-out-finish-window {
  width: min(98vw, 780px);
  padding: 1rem;
  gap: 0.65rem;
}

body.tv-qr-mobile .tv-out-finish-grid {
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

body.tv-qr-mobile .tv-winner-panel {
  width: min(98vw, 860px);
  margin: 0.7rem auto;
  padding: 0.75rem;
  border-radius: 12px;
}

body.tv-qr-mobile .tv-winner-stats {
  grid-template-columns: 1fr;
  gap: 0.42rem;
}

body.tv-qr-mobile .tv-winner-credits-track {
  width: min(96vw, 860px);
  gap: 1rem;
}

body.tv-qr-mobile .tv-winner-credits-line {
  grid-template-columns: 70px 1fr 115px;
  gap: 0.35rem;
  padding: 0.3rem 0.45rem;
}

.overlay-constructor-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(480px, 1fr);
  gap: 18px;
  align-items: start;
}

.overlay-constructor-controls {
  display: grid;
  gap: 12px;
}

.overlay-constructor-card {
  border: 1px solid rgba(216, 188, 127, 0.28);
  border-radius: 12px;
  padding: 12px;
  background: rgba(18, 14, 11, 0.35);
}

.overlay-constructor-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.overlay-constructor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.overlay-constructor-grid label {
  font-size: 0.9rem;
}

.overlay-constructor-grid input,
.overlay-constructor-grid select {
  width: 100%;
}

.overlay-constructor-preview-wrap {
  border: 1px solid rgba(216, 188, 127, 0.28);
  border-radius: 12px;
  padding: 12px;
  background: rgba(13, 13, 15, 0.6);
  position: sticky;
  top: 12px;
  align-self: start;
}

.overlay-constructor-preview {
  position: relative;
  min-height: 360px;
  border-radius: 12px;
  padding: 24px 20px;
  color: #f8f0df;
  background:
    radial-gradient(1000px 420px at 70% -10%, rgba(206, 137, 46, 0.14), transparent 60%),
    linear-gradient(160deg, #0f1118 0%, #16131b 60%, #17110f 100%);
  overflow: hidden;
  text-align: center;
}

.overlay-constructor-preview h2,
.overlay-constructor-preview p,
.overlay-constructor-preview div {
  margin: 0;
}

.oc-top-stats {
  margin-bottom: 14px;
}

.oc-break-eta {
  margin-bottom: 10px;
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid rgba(216, 188, 127, 0.35);
  border-radius: 999px;
}

.oc-timer {
  margin-top: 16px;
  margin-bottom: 10px;
}

.oc-level {
  margin-top: 10px;
}

.oc-blinds {
  margin-top: 8px;
}

.oc-stats {
  margin-top: 16px;
}

.oc-lists {
  margin-top: 16px;
  display: grid;
  gap: 8px;
  text-align: left;
}

.oc-list-title {
  margin-bottom: 4px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d8bc7f;
}

.oc-list-rows {
  border: 1px solid rgba(216, 188, 127, 0.2);
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(8, 8, 12, 0.45);
}

@media (max-width: 1180px) {
  .overlay-constructor-layout {
    grid-template-columns: 1fr;
  }

  .overlay-constructor-preview-wrap {
    position: static;
  }
}

body.tv-qr-mobile .tv-out-stat-cell span {
  font-size: 0.58rem;
}

body.tv-qr-mobile .tv-out-stat-cell strong {
  font-size: clamp(0.8rem, 3.6vw, 1rem);
}

