: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;
}

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 {
  position: absolute;
  left: 1rem;
  right: auto;
  top: calc(100% + 0.6rem);
  display: none;
  z-index: 20;
}

.site-nav.open {
  display: block;
}

.nav-popup {
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45), inset 0 0 0 1px var(--line-soft);
}

.nav-popup a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: 160ms ease;
}

.nav-popup a:hover,
.nav-popup a:focus-visible,
.nav-popup a.active {
  color: var(--text);
  border-color: var(--line);
  background: rgba(231, 171, 68, 0.12);
}

.nav-divider {
  height: 1px;
  background: var(--line);
  margin: 0.2rem 0;
}

.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,
.nav-trigger,
.nav-panel {
  display: none;
}

.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: inline-flex;
  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;
}

.hero,
.page-title,
.panel,
.table-panel,
.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.7rem 1rem 1rem;
}

.monitor-auth {
  max-width: 540px;
}

.monitor-dashboard {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.55rem;
  min-height: 0;
}

.monitor-topline {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto auto;
  gap: 0.55rem;
  align-items: end;
}

.monitor-controls {
  display: flex;
  gap: 0.4rem;
}

.monitor-controls .btn {
  min-width: 58px;
  font-size: 1.1rem;
  line-height: 1;
}

.monitor-timer-line {
  margin: 0;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(6, 9, 16, 0.62);
  font-weight: 700;
  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: auto;
}

@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-layout-grid {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  gap: 0.55rem;
}

.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: hidden;
}

.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-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 minmax(170px, 1fr) minmax(150px, 0.72fr);
  gap: 0.5rem;
}

.monitor-stats-compact {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.38rem;
}

.monitor-stat-chip {
  border: 1px solid rgba(244, 194, 82, 0.24);
  border-radius: 9px;
  background: rgba(6, 9, 16, 0.58);
  padding: 0.28rem 0.45rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem;
}

.monitor-stat-chip span {
  font-size: 0.66rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.monitor-stat-chip strong {
  font-size: 0.96rem;
  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 1fr;
  gap: 0.45rem;
}

.monitor-actions-panel h3 {
  margin: 0;
  font-size: 0.95rem;
}

.monitor-actions-list {
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.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-text {
  color: #d7e4ff;
}

.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;
  overflow: auto;
}

.monitor-out-table {
  width: 100%;
}

.monitor-out-table th,
.monitor-out-table td {
  padding: 0.2rem 0.28rem;
  font-size: 0.66rem;
  line-height: 1.2;
  white-space: nowrap;
}

.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: auto auto auto auto auto auto auto;
  gap: 0.28rem;
  min-height: 248px;
}

.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-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-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-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-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 {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .monitor-add-player-toolbar {
    grid-template-columns: 1fr;
  }
  .monitor-add-player-window {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    padding: 0.45rem;
  }
  .monitor-stats-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .monitor-tables-grid {
    overflow: visible;
  }
  .monitor-layout-grid {
    grid-template-columns: 1fr;
    height: auto;
  }
  .monitor-left-panel {
    grid-template-rows: auto;
  }
  .monitor-actions-panel {
    height: 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;
  }
}

.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-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);
}

.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-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));
}

.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="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);
}

.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;
}

.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;
}


.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-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;
}

@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;
}

.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) {
  .panel-grid .panel,
  .dashboard-grid .panel,
  .form-grid .panel,
  .cards .card {
    grid-column: span 12;
  }

  .site-nav {
    position: static;
    width: 100%;
  }

  .site-header {
    flex-wrap: wrap;
  }

  .site-nav.open {
    display: block;
  }

  .nav-popup {
    width: 100%;
  }

  

  .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::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,
  

  .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: "Действие"; }

  .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: "Контакт"; }
  .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;
  min-height: 100vh;
  padding: 0;
}

.tv-overlay-board {
  position: relative;
  min-height: 100vh;
  padding: 2rem;
  display: grid;
  grid-template-columns: 300px 1fr 340px;
  gap: 1.5rem;
  align-items: stretch;
  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;
  place-content: center;
  text-align: center;
  gap: 0.8rem;
}

.tv-overlay-center h1 {
  font-size: clamp(2rem, 3.8vw, 4.2rem);
  margin: 0;
}

.tv-timer {
  font-family: "Russo One", "Oswald", sans-serif;
  font-size: clamp(4rem, 11vw, 10rem);
  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(1.6rem, 2.8vw, 3rem);
  color: var(--accent);
}

.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;
}

.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: 42%;
}

#admin-users-table th:nth-child(2),
#admin-users-table td:nth-child(2) {
  width: 18%;
}

#admin-users-table th:nth-child(3),
#admin-users-table td:nth-child(3) {
  width: 16%;
}

#admin-users-table th:nth-child(4),
#admin-users-table td:nth-child(4) {
  width: 14%;
}

#admin-users-table th:nth-child(5),
#admin-users-table td:nth-child(5) {
  width: 10%;
}

.admin-user-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  align-items: center;
}

.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.8rem;
  justify-content: center;
  font-family: "Oswald", sans-serif;
  font-size: clamp(1rem, 1.6vw, 1.6rem);
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.04em;
}

.tv-stats span {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 10, 14, 0.55);
}

@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: 1rem;
}

.tv-outs {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tv-outs-list {
  display: grid;
  gap: 0.5rem;
}

.tv-out-row {
  display: grid;
  grid-template-columns: 42px 1fr auto auto;
  gap: 0.6rem;
  align-items: center;
  font-size: 1rem;
}

.tv-out-place {
  font-family: "Russo One", "Oswald", sans-serif;
  color: var(--accent);
}

.tv-out-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tv-out-meta {
  font-size: 0.9rem;
  color: #fff3ce;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tv-sidebar h2 {
  margin-top: 0;
  font-size: 1.5rem;
}

.tv-leaders-list {
  display: grid;
  gap: 0.55rem;
}

.tv-leader-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 0.5rem;
  align-items: center;
  font-size: 1rem;
}

.tv-leader-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tv-leader-points {
  text-align: right;
  color: #fff3ce;
}

.tv-prize-note {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-align: center;
}

.tv-qr-wrap {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem;
  background: rgba(4, 4, 6, 0.8);
  text-align: center;
}

.tv-qr-wrap p {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
}

.tv-qr-wrap img {
  width: 124px;
  height: 124px;
  display: block;
  background: #fff;
  border-radius: 6px;
}

.tv-out-spotlight {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(6, 6, 10, 0.6);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
  z-index: 40;
}

.tv-out-spotlight.show {
  opacity: 1;
}

.tv-out-card {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 2rem 2.4rem;
  border-radius: 18px;
  border: 1px solid rgba(231, 171, 68, 0.65);
  background: linear-gradient(135deg, rgba(15, 9, 16, 0.95), rgba(5, 4, 8, 0.92));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(231, 171, 68, 0.18);
  transform: translateY(12px) scale(0.98);
  transition: transform 260ms ease;
  min-width: min(640px, 86vw);
}

.tv-out-spotlight.show .tv-out-card {
  transform: translateY(0) scale(1);
}

.tv-out-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.6));
  border: 2px solid rgba(244, 194, 82, 0.7);
  background-size: cover;
  background-position: center;
}

.tv-out-avatar.has-avatar {
  background-color: #0a0a10;
}

.tv-out-info {
  display: grid;
  gap: 0.4rem;
}

.tv-out-title {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 0.9rem;
}

.tv-out-info h2 {
  margin: 0;
  font-size: 2.2rem;
  color: #fff4cf;
  letter-spacing: 0.04em;
}

.tv-out-info .tv-out-place {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffd47a;
  text-transform: uppercase;
}

.tv-out-info .tv-out-meta {
  font-size: 1.1rem;
  color: #fff3ce;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .tv-overlay-board {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .tv-sidebar {
    order: 2;
  }

  .tv-qr-wrap {
    position: static;
    order: 3;
    margin-left: auto;
  }
}
