:root {
  color-scheme: dark;
  --bg: #101213;
  --sidebar: #171a1d;
  --surface: #1d2125;
  --surface-2: #242a30;
  --line: #303840;
  --text: #f1f4f5;
  --muted: #9aa6ad;
  --accent: #54d6a6;
  --accent-2: #f6c85f;
  --danger: #ff6b6b;
  --blue: #69a7ff;
}

* {
  box-sizing: border-box;
}

.is-hidden {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: #101213;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.boot-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-card {
  width: min(440px, calc(100vw - 40px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

.boot-card h2 {
  font-size: 22px;
  margin: 3px 0 6px;
}

.boot-card span {
  color: var(--muted);
  font-size: 13px;
}

.boot-bar {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #12171a;
}

.boot-bar i {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  animation: boot-slide 1.05s ease-in-out infinite alternate;
}

@keyframes boot-slide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(138%);
  }
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--sidebar);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark,
.brand-logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #0c1110;
  font-weight: 900;
  background: var(--accent);
}

.brand-logo-mark {
  display: block;
  object-fit: contain;
  background: #08111f;
  box-shadow: 0 0 0 1px rgba(24, 214, 163, 0.24), 0 8px 18px rgba(0, 0, 0, 0.28);
}

.boot-logo {
  width: 58px;
  height: 58px;
  border-radius: 14px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.topbar-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: #08111f;
  box-shadow: 0 0 0 1px rgba(24, 214, 163, 0.22);
}

h1,
h2,
h3,
p {
  margin: 0;
}

.brand h1 {
  font-size: 18px;
}

.brand p,
.eyebrow,
.section-heading span,
.drop-copy,
.panel p {
  color: var(--muted);
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dropzone {
  min-height: 150px;
  border: 1px dashed #4d5a62;
  border-radius: 8px;
  background: #131619;
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone.is-over {
  border-color: var(--accent);
  background: #17201d;
}

.dropzone input {
  display: none;
}

.drop-title {
  font-size: 18px;
  font-weight: 800;
}

.import-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111518;
  color: var(--muted);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.4;
}

.import-status strong {
  color: var(--text);
}

.import-status.error {
  border-color: rgba(255, 107, 107, 0.55);
  color: #ffb6b6;
}

.import-status.success {
  border-color: rgba(84, 214, 166, 0.55);
}

.panel,
.surface {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.panel {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.panel.compact {
  margin-top: auto;
}

.auto-import-panel {
  display: grid;
  gap: 8px;
}

.auto-import-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.auto-import-actions .ghost-button {
  min-width: 0;
  width: 100%;
  padding-inline: 8px;
}

.auto-import-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.auto-import-folder-list {
  display: grid;
  gap: 6px;
}

.auto-import-folder-list span {
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(7, 10, 12, 0.42);
  color: var(--text);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel h2 {
  font-size: 14px;
  color: #d7dee2;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

select,
input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: #111518;
  padding: 10px 11px;
  outline: none;
}

select:focus,
input[type="search"]:focus {
  border-color: var(--accent);
}

.workspace {
  min-width: 0;
  padding: 24px;
  display: grid;
  gap: 18px;
}

.topbar,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tab-buttons {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 3px;
  display: flex;
  gap: 3px;
}

.tab-button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 8px 11px;
  cursor: pointer;
}

.tab-button.is-active {
  background: #2a3035;
  color: var(--text);
}

.tab-view {
  display: none;
}

.tab-view.is-active {
  display: grid;
  gap: 18px;
}

.topbar h2 {
  font-size: clamp(24px, 3vw, 38px);
}

.eyebrow {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ghost-button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
  cursor: pointer;
}

.ghost-button:hover {
  border-color: var(--accent);
}

.desktop-only {
  border-color: rgba(84, 214, 166, 0.42);
  color: var(--accent);
}

.danger-button:hover {
  border-color: var(--danger);
  color: #ffd5d5;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 15px;
  min-height: 96px;
  display: grid;
  align-content: space-between;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  font-size: 26px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15191d;
  min-height: 78px;
  padding: 12px;
  display: grid;
  gap: 5px;
}

.stat-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-card strong {
  font-size: 22px;
}

.stat-card small {
  color: var(--muted);
  font-size: 11px;
}

.stats-page {
  display: grid;
  gap: 16px;
}

.stats-hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stats-hero h3 {
  margin: 0;
  font-size: 24px;
}

.stats-filter-panel {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.stats-filter-panel select,
.stats-filter-panel input {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f1316;
  color: var(--text);
  padding: 0 10px;
  font-weight: 800;
}

.stats-date-range {
  display: none;
  gap: 8px;
  align-items: end;
}

.stats-date-range.is-active {
  display: flex;
}

.stats-date-range label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.legend span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #15191d;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

.good-dot {
  background: var(--accent);
}

.warn-dot {
  background: var(--accent-2);
}

.bad-dot {
  background: var(--danger);
}

.stats-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
}

.stats-workbench {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
}

.stats-nav {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.stats-nav-button {
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 10px 11px;
  cursor: pointer;
  font-weight: 750;
}

.stats-nav-button:hover {
  color: var(--text);
  border-color: var(--line);
}

.stats-nav-button.is-active {
  background: #17201d;
  border-color: rgba(84, 214, 166, 0.45);
  color: var(--accent);
}

.stats-content-section {
  display: none;
}

.stats-content-section.is-active {
  display: block;
}

.stats-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  min-width: 0;
}

.stats-panel.wide {
  grid-column: span 2;
}

.stats-panel.full {
  min-height: 430px;
}

.srp-panel {
  min-height: 560px;
  overflow: hidden;
}

.srp-toolbar,
.srp-segmented,
.srp-street-tabs,
.srp-path-bar {
  display: flex;
  align-items: center;
}

.srp-toolbar {
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.srp-segmented,
.srp-street-tabs {
  gap: 2px;
}

.srp-segmented button,
.srp-street-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  min-height: 38px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.srp-segmented button:hover,
.srp-street-tabs button:hover,
.srp-segmented button.is-active,
.srp-street-tabs button.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.srp-segmented button span {
  color: var(--accent);
  padding: 0 4px;
}

.srp-sample-caption {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.srp-street-tabs {
  border-bottom: 1px solid var(--line);
}

.srp-path-bar {
  gap: 10px;
  padding: 12px 0 4px;
}

.srp-path-bar label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.srp-path-bar select {
  min-width: 230px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 10px;
}

.srp-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  padding: 24px 8px;
}

.srp-role-panel {
  min-width: 0;
}

.srp-role-panel h3 {
  margin: 0 0 14px;
  text-align: center;
  color: var(--text);
  font-size: 18px;
}

.srp-role-head,
.srp-stat-row {
  display: grid;
  grid-template-columns: minmax(138px, 1fr) 64px 68px;
  gap: 8px;
  align-items: center;
}

.srp-role-head {
  min-height: 28px;
  color: var(--muted);
  font-size: 11px;
  border-bottom: 1px solid var(--line);
}

.srp-stat-row {
  min-height: 29px;
  border: 0;
  border-bottom: 1px solid #303840;
  background: transparent;
  color: var(--text);
  width: 100%;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.srp-stat-row:hover,
.srp-stat-row:focus {
  background: rgba(62, 162, 255, 0.12);
  outline: 1px solid rgba(62, 162, 255, 0.35);
}

.srp-stat-row strong {
  color: var(--accent);
  font-size: 13px;
}

.srp-stat-row small {
  color: var(--muted);
  font-size: 11px;
}

.srp-loading,
.srp-empty {
  color: var(--muted);
  padding: 44px 12px;
  text-align: center;
}

.srp-loading[hidden],
.srp-path-bar[hidden] {
  display: none;
}

.blind-war-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 18px 0 4px;
}

.blind-war-group {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.blind-war-group.is-wide {
  grid-column: 1 / -1;
}

.blind-war-group h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 15px;
}

.blind-war-matrix-head,
.blind-war-stat-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) repeat(3, minmax(64px, 78px));
  gap: 5px;
  align-items: center;
}

.blind-war-matrix-head {
  min-height: 27px;
  color: var(--muted);
  font-size: 11px;
  border-bottom: 1px solid var(--line);
}

.blind-war-matrix-head span:not(:first-child) {
  text-align: center;
}

.blind-war-stat-row {
  min-height: 30px;
  border-bottom: 1px solid #303840;
}

.blind-war-stat-row > span {
  color: var(--text);
  font-size: 13px;
}

.blind-war-stat-cell {
  min-width: 0;
  min-height: 24px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-weight: 750;
  font-size: 12px;
}

.blind-war-stat-cell:hover,
.blind-war-stat-cell:focus {
  background: rgba(62, 162, 255, 0.12);
  outline: 1px solid rgba(62, 162, 255, 0.35);
}

.blind-war-stat-cell:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.7;
}

.blind-war-stat-cell:disabled:hover {
  background: transparent;
  outline: 0;
}

.blind-war-stat-cell small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  margin-left: 2px;
}

.blind-war-response-head,
.blind-war-response-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) repeat(3, minmax(72px, 90px));
  gap: 5px;
  align-items: center;
}

.blind-war-response-head {
  min-height: 27px;
  color: var(--muted);
  font-size: 11px;
  border-bottom: 1px solid var(--line);
}

.blind-war-response-head span:not(:first-child) {
  text-align: center;
}

.blind-war-response-row {
  min-height: 30px;
  border-bottom: 1px solid #303840;
}

.blind-war-response-row > span {
  color: var(--text);
  font-size: 13px;
}

.stats-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.stats-panel-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
}

.stats-panel-head span {
  color: var(--muted);
  font-size: 12px;
}

.hud-stat-table,
.hud-matrix {
  display: grid;
  gap: 4px;
}

.hud-row,
.hud-matrix-row {
  display: grid;
  grid-template-columns: minmax(132px, 1fr) 56px 82px 76px;
  align-items: center;
  min-height: 26px;
  color: #e0e0e0;
  font-size: 13px;
  gap: 8px;
}

.compact-table .hud-row {
  grid-template-columns: 44px 52px 68px 68px;
}

.hud-matrix-row {
  grid-template-columns: minmax(132px, 1fr) 58px 58px 58px;
}

.hud-row span,
.hud-matrix-row span {
  border-bottom: 1px solid #303840;
  min-height: 22px;
  display: flex;
  align-items: center;
}

.hud-matrix-stat {
  min-height: 22px;
  border: 0;
  border-bottom: 1px solid #303840;
  background: transparent;
  color: #e0e0e0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.hud-matrix-stat:hover,
.hud-matrix-stat:focus {
  color: #ffffff;
  background: rgba(62, 162, 255, 0.12);
  outline: 1px solid rgba(62, 162, 255, 0.35);
}

.hud-row.is-clickable {
  border-radius: 6px;
  cursor: pointer;
  padding: 0 4px;
  margin: 0 -4px;
}

.hud-row.is-clickable:hover,
.hud-row.is-clickable:focus {
  background: rgba(62, 162, 255, 0.12);
  outline: 1px solid rgba(62, 162, 255, 0.35);
}

.hud-value.good {
  color: var(--accent);
}

.hud-value.warn {
  color: var(--accent-2);
}

.hud-value.bad {
  color: var(--danger);
}

.hud-muted,
.hud-reference {
  color: var(--muted);
  font-size: 12px;
}

.stat-popup {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  background: rgba(4, 7, 9, 0.46);
  padding: 12px;
}

.stat-popup[hidden] {
  display: none;
}

.stat-popup-workspace {
  width: min(520px, calc(100vw - 24px));
  height: calc(100vh - 24px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  overflow: hidden;
  transition: width 160ms ease;
}

.stat-popup-workspace.has-hands {
  width: min(900px, calc(100vw - 24px));
  grid-template-columns: minmax(400px, 1.25fr) minmax(300px, 0.9fr);
}

.stat-popup-workspace.has-replay {
  width: calc(100vw - 24px);
  grid-template-columns: minmax(340px, 0.8fr) minmax(280px, 0.68fr) minmax(520px, 1.45fr);
}

.stat-popup-card {
  min-width: 0;
  min-height: 0;
  border: 1px solid #303840;
  border-radius: 8px;
  background: #101417;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.46);
  overflow: hidden;
}

.stat-popup-card[hidden] {
  display: none;
}

.stat-inspector-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.stat-hands-panel,
.stat-replay-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.stat-replay-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.stat-popup-head {
  border-bottom: 1px solid #303840;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stat-popup-head h3 {
  margin: 2px 0 4px;
  font-size: 16px;
  letter-spacing: 0;
}

.stat-popup-head span {
  color: var(--muted);
  font-size: 12px;
}

.stat-popup-subhead {
  min-height: 74px;
}

.stat-popup-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid #303840;
}

.stat-popup-summary div {
  min-width: 0;
  padding: 9px 12px;
  border-right: 1px solid #272e34;
  border-bottom: 1px solid #272e34;
  display: grid;
  gap: 2px;
}

.stat-popup-summary div:nth-child(3n) {
  border-right: 0;
}

.stat-popup-summary span {
  color: #7f8d95;
  font-size: 10px;
  text-transform: uppercase;
}

.stat-popup-summary strong {
  color: #e9f1f4;
  font-size: 16px;
  font-weight: 760;
}

.stat-popup-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 42px;
  padding: 5px 10px 0;
  border-bottom: 1px solid #303840;
  overflow-x: auto;
  scrollbar-width: none;
}

.stat-popup-tabs::-webkit-scrollbar {
  display: none;
}

.stat-popup-tabs button {
  flex: 0 0 auto;
  align-self: stretch;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #89969d;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.stat-popup-tabs button:hover,
.stat-popup-tabs button.is-active {
  color: #f0f5f6;
  border-bottom-color: var(--accent);
}

.stat-popup-content {
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.stat-range-grid {
  display: grid;
  grid-template-columns: repeat(13, minmax(24px, 1fr));
  gap: 2px;
  width: 100%;
}

.stat-range-cell {
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid #242c31;
  border-radius: 2px;
  background: #151a1e;
  color: #67757d;
  padding: 2px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1px;
  cursor: default;
}

.stat-range-cell.has-hands {
  border-color: rgba(84, 214, 166, 0.4);
  background: rgba(84, 214, 166, var(--range-alpha));
  color: #f4fffb;
  cursor: pointer;
}

.stat-range-cell.has-hands:hover,
.stat-range-cell.has-hands:focus {
  border-color: #d5fff0;
  outline: 1px solid rgba(213, 255, 240, 0.6);
}

.stat-range-cell span {
  font-size: clamp(8px, 0.72vw, 10px);
  line-height: 1;
}

.stat-range-cell strong {
  font-size: 8px;
  font-weight: 650;
  line-height: 1;
}

.stat-distribution {
  display: grid;
  gap: 2px;
}

.stat-distribution button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-bottom: 1px solid #2c343a;
  background: transparent;
  color: #dce6e9;
  display: grid;
  grid-template-columns: 64px minmax(80px, 1fr) 48px 58px;
  align-items: center;
  gap: 10px;
  padding: 5px 4px;
  text-align: left;
  cursor: pointer;
}

.stat-distribution button:hover {
  background: rgba(62, 162, 255, 0.09);
}

.stat-distribution i {
  height: 7px;
  border-radius: 2px;
  background: #1b2227;
  overflow: hidden;
}

.stat-distribution i b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #3ea2ff);
}

.stat-distribution strong,
.stat-distribution small {
  text-align: right;
  font-size: 12px;
}

.stat-distribution small {
  color: #7f8d95;
}

.stat-strength-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-bottom: 10px;
  color: #98a6ad;
  font-size: 9px;
}

.stat-strength-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stat-strength-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.stat-bet-size-table {
  display: grid;
  min-width: 0;
}

.stat-bet-size-head,
.stat-bet-size-row {
  display: grid;
  grid-template-columns: minmax(98px, 1.05fr) 52px 66px minmax(105px, 1.55fr) 42px;
  align-items: center;
  gap: 8px;
}

.stat-bet-size-head {
  min-height: 30px;
  border-bottom: 1px solid #343d43;
  color: #7e8b92;
  font-size: 10px;
}

.stat-bet-size-row {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid #293137;
  background: transparent;
  color: #dce5e8;
  padding: 4px 0;
  text-align: left;
  cursor: pointer;
}

.stat-bet-size-row:hover:not(:disabled) {
  background: rgba(62, 162, 255, 0.09);
}

.stat-bet-size-row:disabled {
  opacity: 0.42;
  cursor: default;
}

.stat-bet-size-row strong,
.stat-bet-size-row em,
.stat-bet-size-row small {
  font-size: 11px;
  font-style: normal;
  text-align: right;
}

.stat-bet-size-row strong {
  color: #edf3f5;
}

.stat-bet-size-row em {
  color: #9de7c6;
}

.stat-bet-size-row em.is-negative {
  color: #ff7b78;
}

.stat-bet-size-row small {
  color: #7f8d95;
}

.stat-strength-bar {
  display: flex;
  width: 100%;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  background: #172027;
  overflow: hidden;
}

.stat-strength-bar i {
  display: block;
  height: 100%;
}

.stat-strength-empty {
  color: #68777f;
  text-align: center;
}

.strength-two-plus { background: #ff4d43; }
.strength-top-strong { background: #ff9417; }
.strength-pair-weak { background: #f2df1d; }
.strength-draw-strong { background: #8dca2f; }
.strength-draw-weak { background: #37aa57; }
.strength-ace-high { background: #169bd5; }
.strength-trash { background: #174f86; }

.stat-popup-list {
  min-height: 0;
  overflow: auto;
  padding: 6px;
}

.stat-popup-hand {
  width: 100%;
  min-height: 62px;
  border: 0;
  border-bottom: 1px solid #2d353b;
  border-left: 4px solid #7a858c;
  border-radius: 3px;
  background: #14191d;
  color: var(--text);
  padding: 7px 9px;
  display: grid;
  gap: 3px;
  text-align: left;
  cursor: pointer;
  content-visibility: auto;
  contain-intrinsic-size: auto 62px;
}

.stat-popup-hand:hover,
.stat-popup-hand.is-active {
  border-color: rgba(62, 162, 255, 0.65);
  background: #17212a;
}

.stat-popup-hand strong,
.stat-popup-hand small {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stat-popup-hand strong {
  font-size: 13px;
  font-weight: 700;
}

.stat-popup-hand span,
.stat-popup-hand small {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-popup-hand-middle {
  min-width: 0;
  min-height: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.stat-hand-board {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-width: 0;
}

.mini-board-card {
  width: 18px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 3px;
  display: grid;
  grid-template-rows: 1fr 1fr;
  place-items: center;
  color: #ffffff;
  font-style: normal;
  font-size: 8px;
  font-weight: 750;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.32);
}

.mini-board-card b {
  font-weight: 750;
}

.mini-club { background: #17865a; }
.mini-diamond { background: #1874bd; }
.mini-heart { background: #bd3e49; }
.mini-spade { background: #555f66; }

.stat-popup-hand em {
  font-style: normal;
  font-weight: 750;
}

.stat-popup-hand.is-won {
  border-left-color: var(--accent);
}

.stat-popup-hand.is-lost {
  border-left-color: var(--danger);
}

.stat-popup-hand.is-unplayed {
  border-left-color: #9aa6ad;
}

.stat-load-more {
  width: 100%;
  min-height: 38px;
  border: 1px solid #37434b;
  border-radius: 4px;
  background: #172027;
  color: #dce7eb;
  margin-top: 6px;
  cursor: pointer;
}

.stat-replay-controls {
  display: grid;
  grid-template-columns: repeat(2, 34px) minmax(48px, auto) 62px repeat(4, 34px) repeat(2, 34px);
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-bottom: 1px solid #303840;
  padding: 7px;
}

.stat-replay-controls button {
  width: 34px;
  height: 30px;
  border: 1px solid #3a454d;
  border-radius: 4px;
  background: #171d21;
  color: #e4ecef;
  font-size: 12px;
  cursor: pointer;
}

.stat-replay-controls button:hover:not(:disabled) {
  border-color: rgba(62, 162, 255, 0.8);
  background: #1b2b38;
}

.stat-replay-controls button:disabled {
  opacity: 0.32;
  cursor: default;
}

.stat-replay-controls span {
  min-width: 54px;
  color: #9ba9b0;
  text-align: center;
  font-size: 11px;
}

.stat-replay-unit {
  width: 62px;
  height: 30px;
  padding: 0 6px;
  border: 1px solid #3a454d;
  border-radius: 4px;
  background: #141a1e;
  color: #aebbc1;
  font-size: 11px;
  cursor: pointer;
}

.stat-replay-unit:hover,
.stat-replay-unit:focus {
  border-color: rgba(62, 162, 255, 0.72);
  color: #eef5f7;
  outline: none;
}

.stat-replay-panel .stat-replay-table {
  width: 100%;
  height: 100%;
  min-height: 430px;
  border: 0;
  border-radius: 0;
}

.stat-replay-table .seat {
  width: clamp(104px, 16cqw, 158px);
  min-height: clamp(46px, 8cqh, 64px);
  padding: 6px 10px;
}

.stat-replay-table .seat-hud {
  display: none;
}

.stat-replay-table .seat span,
.stat-replay-table .seat-position,
.stat-replay-table .seat strong {
  font-size: clamp(9px, 1cqw, 11px);
}

.stat-replay-table .card {
  width: clamp(26px, 4.6cqw, 42px);
  height: clamp(36px, 6.4cqh, 58px);
  font-size: clamp(11px, 1.6cqw, 16px);
}

@media (max-width: 1150px) {
  .stat-popup-workspace.has-replay {
    grid-template-columns: minmax(280px, 0.65fr) minmax(500px, 1.35fr);
  }

  .stat-popup-workspace.has-replay .stat-inspector-panel {
    display: none;
  }
}

@media (max-width: 780px) {
  .stat-popup-workspace.has-hands,
  .stat-popup-workspace.has-replay {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat-popup-workspace.has-replay .stat-hands-panel {
    display: none;
  }
}

.hud-n {
  color: #819098;
  font-size: 11px;
}

.report-table {
  min-width: 760px;
}

.report-table tfoot td,
.report-table .summary-row td {
  font-weight: 850;
  color: var(--text);
}

.number-positive {
  color: var(--accent);
}

.number-negative {
  color: var(--danger);
}

.graph-page {
  display: grid;
  gap: 16px;
}

.graph-surface {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #202326;
  padding: 22px;
  min-width: 0;
}

.graph-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.graph-head h3 {
  font-size: 22px;
}

.graph-head-tools {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-width: min(620px, 55%);
}

.graph-filter-panel {
  justify-content: flex-end;
}

.graph-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
  color: var(--muted);
  font-size: 12px;
}

.graph-summary span {
  display: grid;
  gap: 2px;
  text-align: right;
}

.graph-summary strong {
  color: var(--text);
  font-size: 17px;
}

.graph-canvas-wrap {
  border: 1px solid #30363a;
  border-radius: 6px;
  background: #202326;
  overflow: auto;
}

.graph-canvas-wrap canvas {
  display: block;
  max-width: none;
}

.graph-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 14px;
}

.net-dot {
  background: #00c783;
}

.ev-dot {
  background: #f5ec3d;
}

.sd-dot {
  background: #3ea2ff;
}

.nsd-dot {
  background: #e83f78;
}

.replayer-page {
  display: grid;
  grid-template-columns: 220px minmax(580px, 1fr) 240px;
  grid-template-rows: 1fr;
  gap: 12px;
  height: clamp(620px, calc(100vh - 150px), 900px);
  min-height: 0;
}

.replayer-browser,
.replayer-stage {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  min-width: 0;
}

.replayer-browser {
  padding: 10px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 9px;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.replayer-browser:nth-of-type(2) {
  grid-column: 3;
  grid-row: 1;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.replayer-stage {
  grid-column: 2;
  grid-row: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.replayer-panel-head h3,
.replayer-stage-head h3 {
  font-size: 17px;
}

.replayer-stage-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

.replay-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.replay-controls .ghost-button {
  flex: 1 1 82px;
  padding: 8px 10px;
  font-size: 12px;
}

.replay-controls .street-jump {
  flex: 0 0 76px;
  background: #24282c;
  text-transform: uppercase;
}

.replay-controls .ghost-button:disabled {
  opacity: 0.38;
  cursor: default;
}

.replay-controls span {
  flex: 0 0 54px;
  min-width: 54px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.replay-unit-select {
  flex: 0 0 136px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(62, 162, 255, 0.38);
  border-radius: 6px;
  background: #15191d;
  color: #eaf2f5;
  font-size: 12px;
  font-weight: 800;
}

.replay-unit-select:focus {
  border-color: rgba(62, 162, 255, 0.82);
  outline: 2px solid rgba(62, 162, 255, 0.18);
}

.replay-unit-select option {
  background: #15191d;
  color: #eaf2f5;
}

.action-timeline .action-row-item {
  flex: 0 0 96px;
  min-height: 48px;
  border: 1px solid #2f3942;
  border-radius: 6px;
  background: #171c20;
  color: var(--text);
  padding: 5px 6px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 5px;
  text-align: left;
  cursor: pointer;
}

.action-row-item:hover,
.action-row-item.is-active {
  border-color: rgba(62, 162, 255, 0.8);
  background: #192735;
}

.action-row-item span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.action-row-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 800;
}

.action-row-item p {
  grid-column: 1 / -1;
  margin: 0;
  color: #dce7eb;
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-row-item.folds {
  border-left: 3px solid #7a858c;
}

.action-row-item.calls {
  border-left: 3px solid #3ea2ff;
}

.action-row-item.bets,
.action-row-item.raises {
  border-left: 3px solid #f2c94c;
}

.action-row-item.show,
.action-row-item.showdown {
  border-left: 3px solid #d78bff;
}

.replay-notes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 28px;
}

.replay-notes span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.replay-notes button {
  border: 1px solid #3a444c;
  border-radius: 999px;
  background: #15191d;
  color: #d9e3e6;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.replay-notes button:hover,
.replay-notes button.is-active {
  border-color: rgba(84, 214, 166, 0.78);
  background: #173127;
  color: #9dffd8;
}

.replayer-filters {
  display: grid;
  gap: 8px;
}

.replay-date-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.replay-date-filters label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.replay-date-filters input {
  min-width: 0;
  padding: 8px 7px;
  font-size: 12px;
}

.replayer-list {
  display: grid;
  gap: 6px;
  align-content: start;
  overflow: auto;
  padding-right: 2px;
  min-height: 0;
}

.replay-card {
  width: 100%;
  border: 1px solid #303840;
  border-radius: 6px;
  background: #15191d;
  color: var(--text);
  padding: 8px;
  text-align: left;
  display: grid;
  gap: 3px;
  cursor: pointer;
}

.replay-card:hover,
.replay-card.is-active {
  border-color: rgba(84, 214, 166, 0.75);
  background: #18221f;
}

.replay-card strong {
  font-size: 13px;
  line-height: 1.25;
}

.replay-card span,
.replay-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

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

.hud-control-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.hud-control-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.hud-control-panel select {
  min-height: 36px;
}

.hud-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.hud-config-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.hud-policy-note {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.hud-check-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 9px !important;
  color: var(--text) !important;
  text-transform: none !important;
}

.hud-check-row input {
  width: 16px;
  height: 16px;
}

.hud-preview-wrap {
  min-height: 150px;
  border: 1px solid #303840;
  border-radius: 8px;
  background: #111518;
  display: grid;
  place-items: center;
  padding: 24px;
}

.hud-preview-card {
  position: relative;
  width: 160px;
  min-height: 86px;
  border: 1px solid rgba(84, 214, 166, 0.7);
  border-radius: 8px;
  background: #17241f;
  padding: 12px;
  display: grid;
  align-content: start;
  color: var(--text);
  font-weight: 900;
}

.hud-preview-card .seat-hud {
  top: calc(100% + 8px);
}

.hud-floating-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 8px;
  background: transparent;
}

.hud-floating-overlay[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.hud-floating-panel {
  --hud-float-scale: 1;
  width: max-content;
  max-width: calc(100vw - 16px);
  border: 1px solid rgba(84, 214, 166, 0.62);
  border-radius: 8px;
  background: rgba(6, 10, 12, 0.9);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  -webkit-app-region: drag;
}

.hud-floating-bar {
  height: 28px;
  padding: 0 7px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #d9f7ea;
  font-size: 11px;
  font-weight: 900;
  cursor: move;
}

.hud-floating-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  -webkit-app-region: no-drag;
}

.hud-floating-actions button {
  min-width: 26px;
  height: 20px;
  border: 1px solid rgba(147, 164, 176, 0.48);
  border-radius: 5px;
  background: rgba(17, 24, 28, 0.92);
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.hud-floating-content {
  padding: 5px 6px 7px;
  -webkit-app-region: drag;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 5px 7px;
}

.hud-floating-actions button {
  -webkit-app-region: no-drag;
}

.floating-hud-player {
  zoom: var(--hud-float-scale);
  margin: 0 auto;
  -webkit-app-region: drag;
}

.floating-hud-player > strong {
  display: block;
  margin: 0 0 2px 3px;
  color: #d9f7ea;
  font-size: 10px;
  font-weight: 600;
}

.floating-hud-player .seat-hud {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  width: max-content;
  min-width: 212px;
  pointer-events: none;
  -webkit-app-region: drag;
}

.hand-card strong {
  color: #f0f5f3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hand-card {
  position: relative;
  border-left: 4px solid #5e6970;
  padding: 6px 7px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.replayer-browser:nth-of-type(2) .replayer-list {
  gap: 4px;
}

.replayer-browser:nth-of-type(2) .replayer-panel-head h3 {
  font-size: 15px;
}

.hand-card strong {
  font-size: 12px;
}

.hand-card span,
.hand-card small {
  font-size: 10px;
}

.hand-card strong > span,
.hand-card > span,
.hand-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hand-card:hover {
  transform: translateX(1px);
}

.hand-card.is-won {
  border-left-color: var(--accent);
  background: linear-gradient(90deg, rgba(84, 214, 166, 0.17), #15191d 42%);
}

.hand-card.is-lost {
  border-left-color: var(--danger);
  background: linear-gradient(90deg, rgba(255, 107, 107, 0.16), #15191d 42%);
}

.hand-card.is-unplayed {
  border-left-color: #7a858c;
  background: linear-gradient(90deg, rgba(155, 168, 176, 0.13), #15191d 42%);
}

.hand-card.is-won.is-active,
.hand-card.is-won:hover {
  border-color: rgba(84, 214, 166, 0.82);
  border-left-color: var(--accent);
  background: linear-gradient(90deg, rgba(84, 214, 166, 0.26), #18221f 46%);
}

.hand-card.is-lost.is-active,
.hand-card.is-lost:hover {
  border-color: rgba(255, 107, 107, 0.75);
  border-left-color: var(--danger);
  background: linear-gradient(90deg, rgba(255, 107, 107, 0.24), #251919 46%);
}

.hand-card.is-unplayed.is-active,
.hand-card.is-unplayed:hover {
  border-color: rgba(166, 178, 186, 0.68);
  border-left-color: #9aa6ad;
  background: linear-gradient(90deg, rgba(155, 168, 176, 0.2), #1b2024 46%);
}

.replayer-browser:nth-of-type(2) .hand-card.is-active {
  border-color: rgba(62, 162, 255, 0.9);
  border-left-color: var(--blue);
  background:
    linear-gradient(90deg, rgba(62, 162, 255, 0.26), rgba(24, 34, 44, 0.98) 52%),
    #17212a;
  box-shadow: inset 0 0 0 1px rgba(62, 162, 255, 0.25), 0 0 0 1px rgba(62, 162, 255, 0.16);
}

.replayer-browser:nth-of-type(2) .hand-card.is-active .hand-result-badge {
  border-color: rgba(62, 162, 255, 0.65);
  color: #8fc8ff;
}

.hand-card small {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hand-note-badges {
  display: flex !important;
  flex-wrap: wrap;
  gap: 4px;
  white-space: normal !important;
}

.hand-note-badges i {
  border: 1px solid rgba(84, 214, 166, 0.42);
  border-radius: 999px;
  background: rgba(23, 49, 39, 0.74);
  color: #9dffd8;
  padding: 2px 5px;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.1;
}

.hand-card small em {
  color: #c9d2d6;
  font-style: normal;
  font-weight: 850;
}

.hand-result-badge {
  flex: 0 0 auto;
  border: 1px solid #3b454d;
  border-radius: 5px;
  padding: 2px 5px;
  color: #dce5e8;
  font-size: 10px;
  font-style: normal;
  line-height: 1.1;
}

.hand-card.is-won .hand-result-badge,
.hand-card.is-won small em {
  color: var(--accent);
}

.hand-card.is-lost .hand-result-badge,
.hand-card.is-lost small em {
  color: var(--danger);
}

.hand-card.is-unplayed .hand-result-badge,
.hand-card.is-unplayed small em {
  color: #aab4ba;
}

.poker-table {
  border: 1px solid #303840;
  border-radius: 8px;
  background: #111518;
  width: min(920px, 100%);
  height: clamp(480px, calc(100vh - 330px), 620px);
  max-width: 100%;
  container-type: size;
  flex: 1 1 auto;
  overflow: visible;
  align-self: center;
  display: grid;
  place-items: center;
}

.table-felt {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  background:
    radial-gradient(ellipse at center, rgba(84, 214, 166, 0.18), rgba(13, 17, 19, 0.05) 52%, rgba(13, 17, 19, 0.3) 70%),
    #151b1d;
  overflow: hidden;
}

.table-felt::before {
  content: "";
  position: absolute;
  inset: 15% 13%;
  border: 2px solid rgba(84, 214, 166, 0.35);
  border-radius: 50%;
  background: rgba(16, 34, 28, 0.72);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45);
}

.seat {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: clamp(124px, 15cqw, 150px);
  min-height: clamp(96px, 13.5cqh, 118px);
  border: 1px solid #3a4248;
  border-radius: 8px;
  background: #1d2327;
  padding: clamp(7px, 1.1cqw, 10px);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 3px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.seat.hero-seat {
  border-color: rgba(84, 214, 166, 0.9);
  background: #17241f;
}

.seat.active-seat {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px rgba(246, 200, 95, 0.35), 0 8px 18px rgba(0, 0, 0, 0.25);
}

.seat.pfa-seat {
  box-shadow: 0 0 0 1px rgba(242, 201, 76, 0.32), 0 10px 22px rgba(0, 0, 0, 0.42);
}

.seat.cbetter-seat {
  border-color: rgba(242, 201, 76, 0.66);
}

.seat.ip-seat {
  outline: 1px solid rgba(62, 162, 255, 0.36);
  outline-offset: 2px;
}

.seat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.seat span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
}

.seat strong {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.seat small {
  color: var(--muted);
  font-size: 11px;
  min-height: 12px;
}

.seat-hud {
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  transform: translateX(-50%);
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(7, minmax(24px, 1fr));
  width: clamp(186px, 23cqw, 224px);
  gap: 1px;
  border: 1px solid rgba(89, 106, 118, 0.72);
  border-radius: 6px;
  background: rgba(7, 11, 14, 0.94);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.38);
  padding: 3px;
  pointer-events: none;
}

.seat-hud.has-two-rows {
  width: clamp(212px, 26cqw, 252px);
}

.seat-hud span {
  display: grid;
  grid-template-rows: 10px 14px;
  min-width: 0;
  align-items: center;
  justify-items: center;
  gap: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
  padding: 0 2px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  white-space: nowrap;
}

.seat-hud span:last-child {
  border-right: 0;
}

.seat-hud b,
.seat-hud i {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: normal;
}

.seat-hud b {
  color: #93a4b0;
  font-size: 8px;
  letter-spacing: 0;
}

.seat-hud i {
  color: #f3f5f6;
  font-size: 12px;
  font-weight: 950;
}

.dealer-button {
  position: absolute;
  right: -8px;
  top: -8px;
  z-index: 4;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: #f3f5f6;
  color: #111518;
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  padding: 5px 6px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.32);
}

.seat-cards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.seat-action {
  border-radius: 999px;
  background: rgba(246, 200, 95, 0.14);
  color: var(--accent-2);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.2;
  min-height: 15px;
  overflow: hidden;
  padding: 2px 6px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-action.folds {
  background: rgba(154, 166, 173, 0.12);
  color: var(--muted);
}

.seat-action.checks {
  background: rgba(62, 162, 255, 0.14);
  color: var(--blue);
}

.seat-action.show {
  background: rgba(84, 214, 166, 0.14);
  color: var(--accent);
}

.seat-action.all-in {
  background: rgba(255, 91, 91, 0.18);
  color: #ff8a8a;
}

.poker-table {
  background: #090b0d;
}

.table-felt {
  background:
    radial-gradient(ellipse at center, rgba(65, 80, 69, 0.22), rgba(13, 17, 19, 0.08) 52%, rgba(2, 4, 5, 0.72) 82%),
    #090b0d;
}

.table-felt::before {
  border-color: rgba(148, 158, 150, 0.16);
  background: rgba(25, 31, 28, 0.58);
  box-shadow: inset 0 0 54px rgba(0, 0, 0, 0.72), 0 0 80px rgba(0, 0, 0, 0.5);
}

.seat {
  width: clamp(154px, 17cqw, 196px);
  min-height: clamp(58px, 8.5cqh, 78px);
  border-color: rgba(118, 128, 133, 0.36);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(43, 45, 45, 0.92), rgba(31, 34, 34, 0.92));
  padding: clamp(7px, 0.9cqw, 10px) clamp(12px, 1.3cqw, 16px);
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 2px 10px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.42);
}

.seat-top {
  grid-column: 1 / -1;
}

.seat-position {
  color: #c4a23a;
  font-size: clamp(10px, 1cqw, 13px);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-position.pos-btn { color: #00c783; }
.seat-position.pos-blind { color: #78aaff; }
.seat-position.pos-late { color: #b6c22e; }
.seat-position.pos-mid { color: #f2a63a; }
.seat-position.pos-early { color: #e36a6a; }

.seat-badges {
  grid-column: 1 / -1;
  display: flex;
  gap: 4px;
  min-width: 0;
}

.seat-badges i {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(7, 9, 10, 0.66);
  color: #dce7eb;
  padding: 1px 5px;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.2;
}

.seat-bounty {
  grid-column: 1;
  color: #f6c85f;
  font-size: clamp(9px, 0.9cqw, 11px);
  font-weight: 650;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-cards {
  grid-column: 2;
  grid-row: 2;
  min-width: 34px;
}

.seat-action {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  max-width: 86%;
}

.replay-center-info {
  position: absolute;
  left: 50%;
  top: 32%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  color: #9aa5aa;
  font-size: clamp(10px, 1cqw, 13px);
}

.replay-center-info span {
  border-radius: 999px;
  background: rgba(7, 9, 10, 0.74);
  padding: 4px 8px;
}

.table-quick-stats {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 4;
  display: grid;
  gap: 3px;
  color: rgba(210, 222, 226, 0.78);
  font-size: clamp(10px, 1cqw, 13px);
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

.table-quick-stats span {
  display: block;
}

.board {
  position: absolute;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  gap: clamp(6px, 1cqw, 11px);
  align-items: center;
}

.board {
  top: 49%;
}

.table-action {
  position: absolute;
  left: 50%;
  top: 25%;
  transform: translateX(-50%);
  z-index: 5;
  width: min(430px, 84%);
  border: 1px solid rgba(246, 200, 95, 0.5);
  border-radius: 8px;
  background: rgba(17, 21, 24, 0.92);
  padding: 9px 12px;
  display: grid;
  gap: 3px;
  text-align: center;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
}

.pot-display {
  position: absolute;
  left: 50%;
  top: 39%;
  transform: translateX(-50%);
  z-index: 4;
  border: 1px solid rgba(84, 214, 166, 0.45);
  border-radius: 999px;
  background: rgba(17, 21, 24, 0.88);
  color: var(--accent);
  padding: clamp(6px, 1cqw, 10px) clamp(11px, 1.5cqw, 16px);
  font-size: clamp(13px, 1.6cqw, 18px);
  font-weight: 900;
}

.bet-marker {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(246, 200, 95, 0.6);
  border-radius: 999px;
  background: rgba(17, 21, 24, 0.92);
  color: var(--accent-2);
  font-size: clamp(13px, 1.45cqw, 17px);
  font-weight: 900;
  padding: clamp(6px, 0.9cqw, 9px) clamp(10px, 1.35cqw, 15px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
  white-space: nowrap;
}

.bet-marker.all-in {
  border-color: rgba(255, 91, 91, 0.72);
  color: #ff8a8a;
}

.blind-marker {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(62, 162, 255, 0.6);
  border-radius: 999px;
  background: rgba(17, 21, 24, 0.92);
  color: #dcecff;
  display: flex;
  align-items: center;
  gap: clamp(5px, 0.7cqw, 8px);
  padding: clamp(5px, 0.8cqw, 8px) clamp(9px, 1.2cqw, 14px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  white-space: nowrap;
}

.blind-marker strong {
  color: var(--blue);
  font-size: clamp(10px, 1.15cqw, 13px);
}

.blind-marker span {
  font-size: clamp(12px, 1.35cqw, 16px);
  font-weight: 850;
}

.blind-marker.bb {
  border-color: rgba(84, 214, 166, 0.62);
}

.blind-marker.bb strong {
  color: var(--accent);
}

.table-action strong {
  color: var(--accent-2);
  font-size: 12px;
  text-transform: uppercase;
}

.table-action span {
  color: var(--text);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-action.muted-action {
  border-color: #3a4248;
}

.card {
  width: clamp(38px, 5.8cqw, 58px);
  height: clamp(52px, 8cqh, 78px);
  border-radius: clamp(6px, 0.9cqw, 9px);
  background: #f3f5f6;
  color: #111518;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: clamp(14px, 1.9cqw, 20px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.28);
  line-height: 1;
  grid-template-rows: 1fr 1fr;
  padding: clamp(4px, 0.7cqw, 7px);
  text-align: center;
}

.card b,
.card i {
  font-style: normal;
  display: block;
}

.red-card {
  color: #d43b4a;
}

.black-card {
  color: #111518;
}

.spade-card {
  color: #111518;
}

.heart-card {
  color: #d43b4a;
}

.diamond-card {
  color: #2f7df6;
}

.club-card {
  color: #1a9f5b;
}

.hero-seat-card {
  border: 2px solid var(--accent);
}

.hero-seat-card,
.shown-seat-card {
  width: clamp(23px, 3.8cqw, 36px);
  height: clamp(31px, 5.1cqh, 49px);
  border-radius: clamp(5px, 0.7cqw, 7px);
  font-size: clamp(11px, 1.35cqw, 15px);
  padding: clamp(2px, 0.45cqw, 4px);
  box-shadow: none;
}

.board-empty {
  color: var(--muted);
  font-size: 13px;
}

.action-timeline {
  border: 1px solid #303840;
  border-radius: 8px;
  background: #15191d;
  overflow: auto;
  padding: 8px;
  flex: 0 0 150px;
  min-height: 120px;
  max-height: 150px;
}

.action-row-item {
  width: 100%;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 34px 82px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #293036;
  min-height: 34px;
  color: #dbe3e6;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}

.action-timeline .action-row-item:last-child {
  border-bottom: 0;
}

.action-timeline .action-row-item:hover,
.action-timeline .action-row-item.is-active {
  background: #1b2422;
}

.action-timeline .action-row-item.street strong,
.action-timeline .action-row-item.showdown strong {
  color: var(--accent-2);
}

.action-timeline .action-row-item.show strong {
  color: var(--accent);
}

.action-timeline .action-row-item span {
  color: var(--muted);
  text-align: right;
}

.action-timeline .action-row-item strong {
  color: var(--accent);
}

.action-timeline .action-row-item p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-note {
  color: var(--muted);
  margin-top: 14px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
}

.surface {
  min-width: 0;
  padding: 16px;
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading h3 {
  font-size: 16px;
}

.bars {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.bar-track {
  height: 16px;
  border-radius: 4px;
  background: #101417;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  min-width: 2px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
}

.table-wrap {
  overflow: auto;
}

.table-wrap.tall {
  max-height: 44vh;
}

.tournament-results-wrap {
  height: 320px;
  overflow: auto;
  scrollbar-gutter: stable;
}

.tournament-results-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 9px;
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
}

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

td.positive {
  color: var(--accent);
}

td.negative {
  color: var(--danger);
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  background: #15191d;
  color: #dce5e8;
}

.replayer-window-mode .sidebar,
.replayer-window-mode .topbar,
.replayer-window-mode #dashboardView,
.replayer-window-mode #graphView,
.replayer-window-mode #statsView {
  display: none;
}

.replayer-window-mode .app-shell {
  grid-template-columns: 1fr;
}

.replayer-window-mode .workspace {
  padding: 14px;
}

.replayer-window-mode #replayerView {
  display: block;
}

.replayer-window-mode .replayer-page {
  height: calc(100vh - 28px);
  min-height: 0;
  grid-template-columns: 220px minmax(600px, 1fr) 250px;
  grid-template-rows: 1fr;
}

.replayer-window-mode .poker-table {
  width: min(1040px, 100%);
  height: clamp(540px, calc(100vh - 180px), 720px);
}

.hud-overlay-window-mode {
  background: transparent;
  overflow: hidden;
}

.hud-overlay-window-mode .sidebar,
.hud-overlay-window-mode .topbar,
.hud-overlay-window-mode .app-shell,
.hud-overlay-window-mode .stat-popup {
  display: none;
}

.hud-overlay-window-mode .hud-floating-overlay:not([hidden]) {
  display: grid;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metrics-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .blind-war-content {
    grid-template-columns: 1fr;
  }

  .replayer-page {
    grid-template-columns: 1fr;
  }

  .replayer-browser:nth-of-type(2),
  .replayer-stage {
    grid-column: 1;
    grid-row: auto;
  }

  .poker-table,
  .table-felt {
    width: min(520px, calc(100vw - 64px));
    height: 340px;
  }

  .graph-head {
    display: grid;
  }

  .graph-head-tools {
    justify-items: start;
    min-width: 0;
  }

  .graph-summary {
    justify-content: flex-start;
  }

  .graph-summary span {
    text-align: left;
  }

  .srp-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tournament-results-wrap {
    height: 260px;
  }

  .workspace,
  .sidebar {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .stats-layout {
    grid-template-columns: 1fr;
  }

  .stats-workbench {
    grid-template-columns: 1fr;
  }

  .stats-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .srp-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .srp-segmented {
    overflow-x: auto;
  }

  .stats-panel.wide {
    grid-column: span 1;
  }

  .stats-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
