:root {
  --board: #063b1d;
  --board-deep: #031e0e;
  --accent: #f5ea36;
  --line: rgba(255,255,255,.68);
  --ink: #ffffff;
  --muted: rgba(255,255,255,.7);
  --ui: #101416;
  --ui-soft: #1a2023;
  --font-board: "Arial Rounded MT Bold", Arial, Helvetica, sans-serif;
  --font-timer: "Arial Rounded MT Bold", Arial, Helvetica, sans-serif;
  --font-board-weight: 900;
  --font-timer-weight: 900;
  --display-scale: 1;
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
button, input, select { font: inherit; }
button { color: inherit; }

body {
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background: #050706;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 54px 1fr;
  background: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--board) 85%, white 15%), var(--board) 38%, var(--board-deep));
  font-family: var(--font-board);
}

.topbar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 18px;
  color: #f7f7f7;
  border-bottom: 1px solid #31383a;
  background: linear-gradient(#171c1e, #0c1012);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.brand { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 850; letter-spacing: .11em; }
.brand-suit { color: var(--accent); font-size: 23px; line-height: 1; }
.topbar-status { display: flex; align-items: center; gap: 8px; color: #aab4b8; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #6e797d; box-shadow: 0 0 0 3px rgba(110,121,125,.14); }
.live-dot.running { background: #32df73; box-shadow: 0 0 0 3px rgba(50,223,115,.16), 0 0 12px rgba(50,223,115,.5); }
.topbar-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.text-button, .setup-button, .icon-button { border: 0; cursor: pointer; }
.text-button { color: #aab4b8; background: transparent; padding: 8px 11px; }
.setup-button { border: 1px solid #465054; border-radius: 7px; padding: 8px 13px; background: #22292c; font-weight: 700; }
.setup-button:hover { background: #2a3336; }

.board {
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(72px, 10vh) 1fr 52px;
  padding: 10px;
  transform: scale(var(--display-scale));
  transform-origin: center;
}

.event-name {
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  padding: 0 20px;
  border: 2px solid var(--line);
  border-bottom: 0;
  background: rgba(0,0,0,.08);
  font-size: clamp(1.4rem, 3vw, 3.2rem);
  font-weight: 900;
  letter-spacing: .01em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 2px rgba(0,0,0,.45);
}

.board-grid {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(210px, 1.05fr) minmax(330px, 1.75fr) minmax(260px, 1.2fr);
  grid-template-rows: minmax(0, 1fr) minmax(118px, .31fr);
  border: 2px solid var(--line);
}
.board-grid.no-ticker { grid-template-rows: 34% 47% 13% 6% 0; }

.panel { min-width: 0; min-height: 0; border-right: 1px solid var(--line); }
.panel-heading { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.panel-heading span { font-size: clamp(.95rem, 1.35vw, 1.35rem); font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.panel-heading small { color: var(--accent); font-size: .83rem; font-weight: 800; }

.payouts-panel { grid-column: 1; grid-row: 1; overflow: hidden; background: rgba(0,0,0,.09); }
.payout-list { margin: 0; padding: 8px 14px 10px; list-style: none; counter-reset: places; }
.payout-list li { counter-increment: places; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; min-height: clamp(30px, 4.1vh, 48px); font-size: clamp(.9rem, 1.5vw, 1.65rem); font-weight: 850; }
.payout-list li::before { content: counter(places) "."; min-width: 1.8em; color: var(--accent); }
.payout-list li i { height: 2px; opacity: .55; background-image: radial-gradient(circle, white 1px, transparent 1.4px); background-size: 8px 2px; }
.payout-list li strong { white-space: nowrap; }

.clock-panel { grid-column: 2; grid-row: 1; display: grid; grid-template-rows: auto 1fr 6px auto; place-items: center; padding: 22px clamp(14px, 2vw, 32px) 24px; }
.level-kicker { color: var(--accent); font-size: clamp(1.15rem, 2vw, 2rem); font-weight: 900; letter-spacing: .12em; }
.main-timer { align-self: center; font: 900 clamp(4.7rem, 10vw, 11rem)/.9 var(--font-timer); letter-spacing: -.055em; white-space: nowrap; text-shadow: 0 .04em .05em rgba(0,0,0,.36); font-variant-numeric: tabular-nums; }
.main-timer.warning { color: var(--accent); }
.main-timer.critical { color: #ff5a4f; animation: pulse 1s steps(2, end) infinite; }
@keyframes pulse { 50% { opacity: .67; } }
.progress-track { width: 100%; height: 6px; overflow: hidden; border-radius: 6px; background: rgba(0,0,0,.35); }
.progress-track span { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--accent); transition: width .35s linear; }
.clock-controls { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 1.3vw, 18px); padding-top: 18px; }
.clock-controls button, .quickbar button { display: grid; place-items: center; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; color: #fff; background: rgba(0,0,0,.26); cursor: pointer; box-shadow: inset 0 1px rgba(255,255,255,.16); }
.clock-controls button { width: clamp(42px, 4.4vw, 62px); aspect-ratio: 1; font-size: clamp(.9rem, 1.4vw, 1.2rem); }
.clock-controls .primary-control { width: clamp(55px, 5.8vw, 78px); border-color: color-mix(in srgb, var(--accent) 75%, white); color: #101410; background: var(--accent); font-size: clamp(1.2rem, 2vw, 1.8rem); }
.clock-controls button:hover, .quickbar button:hover { filter: brightness(1.17); }

.blinds-panel { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; border-right: 0; background: rgba(0,0,0,.07); }
.blind-pair { flex: 1; display: flex; align-items: center; justify-content: center; gap: .2em; padding: 10px; font-size: clamp(2.5rem, 5vw, 6.2rem); font-weight: 950; line-height: .9; letter-spacing: -.05em; }
.blind-pair span { color: var(--accent); font-weight: 500; }
.ante-line, .next-level-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); }
.ante-line span, .next-level-line span { color: var(--muted); font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.ante-line strong { font-size: clamp(1.35rem, 2.4vw, 2.5rem); }
.next-level-line strong { overflow: hidden; font-size: clamp(.8rem, 1.15vw, 1.08rem); text-align: right; text-overflow: ellipsis; white-space: nowrap; }

.stats-panel { grid-column: 1 / 4; grid-row: 2; display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); border-right: 0; }
.stat { min-width: 0; display: grid; place-items: center; align-content: center; gap: 8px; padding: 12px 9px; border-right: 1px solid var(--line); text-align: center; }
.stat:last-child { border-right: 0; }
.stat span { color: var(--muted); font-size: clamp(.7rem, 1vw, .95rem); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.stat strong { max-width: 100%; overflow: hidden; font-size: clamp(1.25rem, 2.4vw, 2.8rem); line-height: 1; text-overflow: ellipsis; white-space: nowrap; }

.quickbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 11px; border: 2px solid var(--line); border-top: 0; background: rgba(0,0,0,.16); }
.quick-group { display: flex; align-items: center; gap: 9px; font: 750 .9rem/1 Inter, "Segoe UI", sans-serif; }
.quick-group button, #fullscreen { width: 30px; height: 30px; }
.quick-group b { color: var(--accent); }
.shortcuts { color: rgba(255,255,255,.56); font: 650 .75rem/1 Inter, "Segoe UI", sans-serif; }
#fullscreen { justify-self: end; border-radius: 6px; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.setup-drawer { position: fixed; inset: 0 0 0 auto; z-index: 21; width: min(620px, 100vw); display: grid; grid-template-rows: auto auto 1fr auto; color: #f6f8f8; background: #101416; box-shadow: -22px 0 70px rgba(0,0,0,.55); transform: translateX(102%); transition: transform .25s ease; font-family: Inter, "Segoe UI", Arial, sans-serif; }
.setup-drawer.open { transform: translateX(0); }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 18px; }
.drawer-header h1 { margin: 2px 0 0; font-size: 1.55rem; }
.eyebrow { color: var(--accent); font-size: .68rem; font-weight: 900; letter-spacing: .14em; }
.icon-button { width: 38px; height: 38px; border-radius: 50%; color: #cbd2d4; background: #242b2e; font-size: 1.65rem; }
.setup-tabs { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0 16px; border-bottom: 1px solid #31383a; }
.setup-tabs button { position: relative; padding: 13px 5px 14px; border: 0; color: #8f9a9e; background: transparent; font-size: .82rem; font-weight: 800; cursor: pointer; }
.setup-tabs button.active { color: #fff; }
.setup-tabs button.active::after { content: ""; position: absolute; right: 8px; bottom: -1px; left: 8px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.drawer-scroll { min-height: 0; overflow-y: auto; padding: 24px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.section-title { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-title h2 { margin: 0 0 4px; font-size: 1.1rem; }
.section-title p { margin: 0; color: #8f9a9e; font-size: .82rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.span-2 { grid-column: span 2; }
label { display: grid; gap: 7px; color: #aeb7ba; font-size: .76rem; font-weight: 750; }
input[type="text"], input[type="number"], select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #3a4448; border-radius: 7px; outline: 0; color: #fff; background: #1a2023; font-size: .9rem; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.switch-row { min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid #3a4448; border-radius: 7px; color: #e5e9ea; background: #1a2023; font-size: .77rem; }
.switch-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.calculation-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; padding: 16px; border: 1px solid #354044; border-radius: 10px; background: #171c1f; }
.calculation-card div { display: grid; gap: 5px; }
.calculation-card span { color: #899599; font-size: .7rem; text-transform: uppercase; }
.calculation-card strong { font-size: 1rem; }
.calculation-card small { grid-column: 1 / -1; margin-top: 5px; color: #6f7c80; }
.secondary-button, .danger-button, .save-button { border-radius: 7px; padding: 9px 13px; font-weight: 800; cursor: pointer; }
.secondary-button { border: 1px solid #465156; color: #dbe1e3; background: #232a2d; font-size: .78rem; }
.full-button { width: 100%; margin-top: 12px; }
.structure-summary { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.structure-summary span { padding: 5px 8px; border: 1px solid #344044; border-radius: 5px; color: #9da8ac; background: #171c1f; font-size: .72rem; }
.levels-table-wrap { overflow-x: auto; border: 1px solid #354044; border-radius: 8px; }
.levels-table { width: 100%; border-collapse: collapse; font-size: .72rem; }
.levels-table th { padding: 9px 5px; color: #7f8c90; background: #171c1f; font-weight: 800; text-align: center; }
.levels-table td { padding: 5px 3px; border-top: 1px solid #2b3437; text-align: center; }
.levels-table input { width: 64px; min-height: 33px; padding: 5px; border: 1px solid #394347; border-radius: 5px; color: #fff; background: #1d2427; text-align: center; }
.levels-table input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); }
.row-remove { border: 0; color: #df7770; background: transparent; cursor: pointer; font-size: 1.1rem; }
.payout-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 15px 0; }
.payout-summary div { display: grid; gap: 4px; padding: 11px; border: 1px solid #354044; border-radius: 7px; background: #171c1f; }
.payout-summary span { color: #7f8b8f; font-size: .66rem; text-transform: uppercase; }
.payout-summary strong { font-size: .9rem; }
.payout-editor { display: grid; gap: 7px; }
.payout-row { display: grid; grid-template-columns: 52px 1fr 46px auto; align-items: center; gap: 10px; }
.payout-row span { color: var(--accent); font-weight: 900; }
.payout-row input { min-height: 38px; }
.payout-row small { min-width: 50px; color: #849095; text-align: right; }
.color-control { display: grid; grid-template-columns: 44px 1fr; gap: 7px; }
.color-control input[type="color"] { width: 44px; height: 42px; padding: 3px; border: 1px solid #3a4448; border-radius: 7px; background: #1a2023; }
.theme-presets { display: flex; gap: 12px; margin: 22px 0; }
.theme-presets button { width: 42px; height: 42px; border: 3px solid #293135; border-radius: 50%; background: var(--swatch); cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.range-label { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.range-label input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.drawer-footer { display: flex; justify-content: space-between; gap: 12px; padding: 15px 24px; border-top: 1px solid #31383a; background: #0c1012; }
.danger-button { border: 1px solid #653c3a; color: #f2a19b; background: #271817; }
.save-button { min-width: 130px; border: 1px solid color-mix(in srgb, var(--accent) 75%, white); color: #111; background: var(--accent); }
.toast { position: fixed; z-index: 40; right: 22px; bottom: 22px; translate: 0 15px; padding: 11px 16px; border: 1px solid #485459; border-radius: 7px; background: #111719; box-shadow: 0 12px 35px rgba(0,0,0,.38); opacity: 0; pointer-events: none; transition: opacity .17s, translate .17s; font: 750 .83rem/1 Inter, sans-serif; }
.toast.visible { translate: 0 0; opacity: 1; }

body.display-only .topbar, body.display-only .quickbar { display: none; }
body.display-only .app { grid-template-rows: 1fr; }
body.display-only .board { grid-template-rows: minmax(72px, 11vh) 1fr; padding: 0; }

@media (max-width: 950px) {
  body { overflow: auto; }
  .app { min-height: 100svh; }
  .topbar { grid-template-columns: 1fr auto; }
  .topbar-status { display: none; }
  .board { min-height: calc(100svh - 54px); grid-template-rows: 66px auto 52px; }
  .board-grid { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(360px, 54vh) auto auto; }
  .clock-panel { grid-column: 1 / 3; grid-row: 1; border-bottom: 1px solid var(--line); }
  .payouts-panel { grid-column: 1; grid-row: 2; }
  .blinds-panel { grid-column: 2; grid-row: 2; }
  .stats-panel { grid-column: 1 / 3; grid-row: 3; grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .shortcuts { display: none; }
  .quickbar { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .topbar { padding: 0 10px; }
  .brand { font-size: 11px; }
  .setup-button span, .text-button { display: none; }
  .board { padding: 5px; }
  .event-name { font-size: 1.2rem; }
  .board-grid { grid-template-columns: 1fr; grid-template-rows: 350px auto auto auto; }
  .clock-panel { grid-column: 1; grid-row: 1; padding: 18px 12px; }
  .payouts-panel { grid-column: 1; grid-row: 3; border-top: 1px solid var(--line); }
  .blinds-panel { grid-column: 1; grid-row: 2; min-height: 310px; border-right: 0; }
  .stats-panel { grid-column: 1; grid-row: 4; grid-template-columns: repeat(2, 1fr); }
  .stat { min-height: 92px; border-bottom: 1px solid var(--line); }
  .main-timer { font-size: clamp(4.2rem, 22vw, 7rem); }
  .quickbar { padding: 0 7px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: 1; }
  .calculation-card, .payout-summary { grid-template-columns: 1fr; }
  .calculation-card small { grid-column: 1; }
  .setup-tabs { overflow-x: auto; grid-template-columns: repeat(4, minmax(94px, 1fr)); }
  .drawer-scroll { padding: 20px 16px; }
}

/* Classic BRAVO-inspired tournament board */
body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #161616 0, #050505 55%, #000 82%);
}

.app {
  width: min(98vw, calc(94vh * 1.58));
  height: min(94vh, calc(98vw / 1.58));
  min-height: 0;
  display: grid;
  grid-template-rows: 25px 1fr;
  overflow: hidden;
  border: 1px solid #667078;
  background: var(--board);
  box-shadow: 0 18px 72px #000, 0 0 0 1px #131313;
}

.topbar {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 25px;
  padding: 0 0 0 6px;
  overflow: hidden;
  color: #263243;
  border-bottom: 1px solid #171717;
  background: linear-gradient(#eef2f6, #bdc6cf);
  font: 11px/1 "Segoe UI", Arial, sans-serif;
  white-space: nowrap;
}

.window-logo { color: #2d3a7c; font-size: 14px; }
.window-buttons { align-self: stretch; display: flex; margin-left: auto; }
.window-buttons span { width: 42px; display: grid; place-items: center; border-left: 1px solid #aab3bc; }
.window-buttons span:last-child { color: #fff; background: linear-gradient(#ef7e73, #c93e32); }

.board {
  width: auto;
  min-height: 0;
  display: grid;
  grid-template-rows: 11% 10.5% 78.5%;
  padding: 12px 8px 16px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--board) 68%, black) 0 1%, var(--board) 1% 99%, color-mix(in srgb, var(--board) 68%, black) 99%);
  transform: scale(var(--display-scale));
  transform-origin: center;
  font-family: var(--font-board);
}

.clock-brand-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(13px, 2vw, 28px);
  color: var(--accent);
  border: 2px solid rgba(255,255,255,.86);
  border-bottom: 0;
  background: #020302;
  font-size: clamp(15px, 2.05vw, 33px);
  font-weight: 500;
  letter-spacing: .015em;
  text-shadow: 0 1px 2px #000;
}

.table-numbers { display: flex; align-items: center; gap: clamp(13px, 2vw, 28px); }
.table-numbers b { color: #ff1f1f; font-weight: 500; }
.screen-state { position: absolute; right: 1%; display: flex; align-items: center; gap: 5px; color: #aab4ad; font: 700 clamp(8px, .75vw, 11px)/1 Arial, sans-serif; letter-spacing: .04em; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #777; }
.live-dot.running { background: #24dc60; box-shadow: 0 0 7px #24dc60; }

.event-name {
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  padding: 0 10px;
  color: #fff;
  border: 2px solid rgba(255,255,255,.86);
  border-bottom: 0;
  background: color-mix(in srgb, var(--board) 92%, white 8%);
  font-size: clamp(18px, 2.8vw, 46px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 2px rgba(0,0,0,.6);
}

.board-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: 29.2% 20.8% 22% 28%;
  grid-template-rows: 33% 45% 12% 5% 5%;
  border: 2px solid rgba(255,255,255,.86);
  background: var(--board);
}

.panel { min-width: 0; min-height: 0; border-right: 1px solid rgba(255,255,255,.84); border-bottom: 1px solid rgba(255,255,255,.84); }
.panel-heading { height: 16%; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 3px; border-bottom: 0; }
.panel-heading span { font: 700 clamp(11px, 1.45vw, 23px)/1 "Courier New", Courier, monospace; text-transform: none; letter-spacing: .02em; white-space: nowrap; }
.panel-heading small { position: absolute; opacity: 0; pointer-events: none; }

.payouts-panel { overflow: hidden; background: transparent; }
.payouts-left { grid-column: 1; grid-row: 1; }
.payouts-right { grid-column: 4; grid-row: 1; border-right: 0; }
.payout-viewport { position: relative; height: 84%; overflow: hidden; container-type: size; }
.payout-list { height: 100%; display: grid; margin: 0; padding: 0 4% 2%; list-style: none; counter-reset: none; }
.payout-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2px; min-height: 0; font: 700 clamp(12px, 1.85vw, 30px)/1 "Courier New", Courier, monospace; }
.payout-list li::before { display: none; content: none; }
.payout-list li span { white-space: nowrap; }
.payout-list li i { height: 3px; margin-top: .45em; opacity: .9; background-image: radial-gradient(circle, white 1px, transparent 1.4px); background-size: 8px 3px; }
.payout-list li strong { white-space: nowrap; }

.clock-panel {
  grid-column: 2 / 4;
  grid-row: 1;
  display: grid;
  grid-template-rows: 28% 1fr 3px;
  place-items: center;
  padding: 0;
}
.level-kicker { align-self: stretch; width: 100%; display: grid; place-items: center; color: #fff; border-bottom: 1px solid rgba(255,255,255,.84); font-size: clamp(15px, 2.25vw, 37px); font-weight: var(--font-board-weight); letter-spacing: 0; }
.main-timer { align-self: center; color: #fff; font: var(--font-timer-weight) clamp(46px, 8vw, 128px)/.88 var(--font-timer); letter-spacing: -.045em; white-space: nowrap; }
.main-timer.warning { color: var(--accent); }
.main-timer.critical { color: #ff3229; }
.progress-track { align-self: end; width: 100%; height: 3px; border-radius: 0; background: rgba(0,0,0,.22); }
.progress-track span { background: var(--accent); border-radius: 0; }

.blinds-panel {
  position: relative;
  grid-column: 1 / 3;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding-top: 0;
  border-right: 1px solid rgba(255,255,255,.84);
  background: transparent;
}
.classic-data-line { width: 82%; display: grid; grid-template-columns: 1fr 1fr; align-items: baseline; gap: .55em; font-family: var(--font-board); font-size: clamp(15px, 2.25vw, 37px); font-weight: var(--font-board-weight); line-height: 1.12; }
.classic-data-line span { text-align: right; }
.classic-data-line strong { text-align: left; }
.classic-data-line span, .classic-data-line strong { font-family: inherit; font-weight: inherit; }
.structure-badge { position: absolute; right: 7px; bottom: 5px; color: color-mix(in srgb, white 58%, var(--accent)); font-size: clamp(8px, .8vw, 12px); opacity: .58; }

.details-panel {
  grid-column: 3 / 5;
  grid-row: 2 / 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0 1.5%;
  border-right: 0;
  border-bottom: 1px solid rgba(255,255,255,.84);
}
.details-panel div { width: 100%; display: grid; grid-template-columns: 40% 60%; align-items: baseline; gap: .55em; min-width: 0; font-size: clamp(13px, 1.9vw, 31px); font-weight: var(--font-board-weight); line-height: 1.04; }
.details-panel span { white-space: nowrap; text-align: right; }
.details-panel strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; font-family: inherit; font-weight: inherit; }

.stats-panel {
  grid-column: 1 / 3;
  grid-row: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 0;
  border-right: 1px solid rgba(255,255,255,.84);
  border-bottom: 1px solid rgba(255,255,255,.84);
}
.stat { min-width: 0; display: grid; grid-template-columns: 1fr; grid-template-rows: 39% 61%; place-items: stretch; gap: 0; padding: 0; border: 1px solid rgba(255,255,255,.84); border-bottom: 0; text-align: center; }
.stat:last-child { border-right: 0; }
.stat span { align-self: stretch; display: grid; place-items: center; color: #fff; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.84); font-size: clamp(11px, 1.5vw, 24px); font-weight: 800; letter-spacing: 0; text-transform: none; }
.stat strong { display: grid; place-items: center; font-size: clamp(20px, 3.1vw, 50px); line-height: 1; }

.clock-emblem { position: absolute; right: 1.6%; bottom: 8%; width: 7.2%; aspect-ratio: 1; border: 4px solid #fff; border-radius: 50%; background: var(--board); box-shadow: 0 0 0 2px #8e9891, inset 0 0 6px #000; }
.clock-emblem::before, .clock-emblem::after { content: ""; position: absolute; inset: 5%; border: 1px dotted rgba(255,255,255,.5); border-radius: 50%; }
.clock-emblem::after { inset: 46%; border: 0; background: #e35845; }
.clock-hand { position: absolute; left: 50%; bottom: 50%; width: 4%; border-radius: 3px; background: #fff; transform-origin: 50% 100%; }
.hour-hand { height: 26%; }
.minute-hand { height: 36%; }
.second-hand { height: 40%; width: 2%; background: #ff4b3e; transition: transform .18s linear; }

.quickbar {
  grid-column: 1 / 5;
  grid-row: 4;
  display: flex;
  align-items: center;
  gap: .45%;
  padding: 0 .7%;
  border: 0;
  background: transparent;
}
.quickbar button { display: grid; place-items: center; padding: 0; border: 0; color: #fff; font-weight: 900; cursor: pointer; box-shadow: inset 0 2px 2px rgba(255,255,255,.7), 0 1px 2px #000; }
.quickbar button:active { transform: translateY(1px); }
.quickbar button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ticker {
  grid-column: 1 / 5;
  grid-row: 5;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  color: var(--accent);
  border-top: 1px solid rgba(255,255,255,.84);
  background: #020302;
  font: var(--font-board-weight) clamp(11px, 1.35vw, 22px)/1 var(--font-board);
  white-space: nowrap;
}
.ticker[hidden] { display: none; }
.ticker span { display: inline-block; min-width: max-content; padding-inline: 1.5em; animation: ticker-left-to-right 16s linear infinite; }
@keyframes ticker-left-to-right { from { transform: translateX(100vw); } to { transform: translateX(-100%); } }
.payout-rounding { margin-top: 14px; }
.payout-list.scrolling-feed { height: auto; padding-block: 0; grid-auto-rows: calc(100cqh / 6); animation: payout-scroll-up 20s linear infinite; }
.payouts-right .payout-list.scrolling-feed { animation-delay: -10s; }
@keyframes payout-scroll-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }

.board :is(.event-name, .level-kicker, .classic-data-line, .details-panel div, .stat span, .stat strong, .ticker) { font-weight: var(--font-board-weight) !important; }
.clock-brand-row { font-weight: 500 !important; }
.clock-brand-row .table-numbers b { font-weight: 500 !important; }
.triple-chevron { margin-right: .3%; color: #ddd; font: 900 clamp(10px, 1.2vw, 18px)/1 Arial; letter-spacing: -4px; }
.round-control, .square-control { position: relative; isolation: isolate; overflow: hidden; flex: 0 0 clamp(19px, 2.3vw, 38px); width: clamp(19px, 2.3vw, 38px); height: clamp(19px, 2.3vw, 38px); aspect-ratio: 1; border: 1px solid rgba(255,255,255,.58) !important; border-radius: 50% !important; box-shadow: inset 0 2px 2px rgba(255,255,255,.72), inset 0 -2px 2px rgba(0,0,0,.32), 0 1px 2px #000 !important; }
.round-control { font-size: clamp(8px, .95vw, 15px); }
.round-control::before, .square-control::before { content: ""; position: absolute; z-index: -1; top: 8%; left: 17%; width: 66%; height: 34%; border-radius: 50%; background: linear-gradient(rgba(255,255,255,.72), rgba(255,255,255,0)); pointer-events: none; }
.blue { background: linear-gradient(#81baff, #076bd8 47%, #06429d 50%, #1680ef); }
.red { background: linear-gradient(#ff7468, #db241c 55%, #a90b06); }
.lime { color: #294500 !important; background: linear-gradient(#edff62, #a7d10b 55%, #718c00); }
.pale { color: #1679b1 !important; background: linear-gradient(#fff, #cbe9ef 58%, #71b6c9); }
.square-control { background: linear-gradient(#81baff, #076bd8 47%, #06429d 50%, #1680ef); font-size: clamp(9px, 1.05vw, 17px); }
#fullscreen { align-self: center; flex: 0 0 clamp(19px, 2.3vw, 38px); width: clamp(19px, 2.3vw, 38px); min-width: clamp(19px, 2.3vw, 38px); max-width: clamp(19px, 2.3vw, 38px); height: clamp(19px, 2.3vw, 38px); min-height: clamp(19px, 2.3vw, 38px); max-height: clamp(19px, 2.3vw, 38px); padding: 0; line-height: 1; }
.display-icon { color: #eafaff !important; text-shadow: 0 1px 2px #000; }
.tools { color: #eefbff !important; text-shadow: 0 1px 2px #000; }
.player-readout { color: #dce6df; font: 750 clamp(8px, .78vw, 12px)/1 Arial, sans-serif; white-space: nowrap; }
.player-readout b { color: var(--accent); }
.toolbar-spacer { flex: 1; }
.alarm-button { width: clamp(25px, 3.1vw, 50px); aspect-ratio: 1; border-radius: 50%; color: #756d9d !important; background: radial-gradient(circle, #fff 0 56%, #aaa 58% 66%, transparent 68%); box-shadow: none !important; font-size: clamp(15px, 2vw, 31px); }

body.display-only .topbar { display: none; }
body.display-only .quickbar { display: flex; }
body.display-only .app { grid-template-rows: 1fr; width: min(100vw, calc(100vh * 1.58)); height: min(100vh, calc(100vw / 1.58)); border: 0; }
body.display-only .board { grid-template-rows: 11% 10.5% 78.5%; padding: 0; }

@media (max-width: 720px) {
  .app { width: calc(100vw - 8px); height: calc((100vw - 8px) / 1.58); }
  .board { min-height: 0; grid-template-rows: 11% 10.5% 78.5%; padding: 5px 4px 7px; }
  .board-grid { grid-template-columns: 29.2% 20.8% 22% 28%; grid-template-rows: 33% 45% 12% 5% 5%; }
  .board-grid.no-ticker { grid-template-rows: 34% 47% 13% 6% 0; }
  .clock-panel { grid-column: 2 / 4; grid-row: 1; padding: 0; }
  .payouts-left { grid-column: 1; grid-row: 1; }
  .payouts-right { grid-column: 4; grid-row: 1; }
  .blinds-panel { grid-column: 1 / 3; grid-row: 2; min-height: 0; }
  .details-panel { grid-column: 3 / 5; grid-row: 2 / 4; }
  .stats-panel { grid-column: 1 / 3; grid-row: 3; grid-template-columns: 1fr 1fr; }
  .quickbar { grid-column: 1 / 5; grid-row: 4; }
  .ticker { grid-column: 1 / 5; grid-row: 5; }
  .main-timer { font-size: clamp(36px, 8vw, 58px); }
  .screen-state, .player-readout { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker { justify-content: center; }
  .ticker span { animation: none; }
}
