:root {
  --shell-top: #eef2f7;
  --bg: #eef2f7;
  --bg-soft: #f8fafc;
  --panel: rgba(255, 255, 255, 0.98);
  --panel-strong: #ffffff;
  --surface-muted: #edf3f8;
  --surface-card: #f8fafc;
  --control-well: #ffffff;
  --field-bg: rgba(255, 255, 255, 0.98);
  --ink: #1f2937;
  --ink-soft: #667085;
  --line: rgba(86, 100, 120, 0.16);
  --line-strong: rgba(86, 100, 120, 0.28);
  --accent: #356fbe;
  --accent-deep: #255899;
  --accent-soft: rgba(53, 111, 190, 0.1);
  --navy-soft: rgba(20, 32, 50, 0.04);
  --hero-bg: #ffffff;
  --hero-ink: #1f2937;
  --hero-soft: #6b7280;
  --hero-border: rgba(100, 116, 139, 0.18);
  --hero-chip: #ffffff;
  --hero-chip-border: rgba(100, 116, 139, 0.22);
  --hero-glow: none;
  --page-orb-a: transparent;
  --page-orb-b: transparent;
  --table-stripe: #ffffff;
  --table-hover: rgba(47, 104, 186, 0.06);
  --selection-bg: rgba(47, 104, 186, 0.085);
  --selection-bar: #2f68ba;
  --table-divider: rgba(112, 126, 146, 0.28);
  --tooltip-bg: rgba(255, 255, 255, 0.98);
  --tooltip-border: rgba(112, 131, 156, 0.38);
  --gold: #a78638;
  --success: #14744d;
  --danger: #c54633;
  --neutral: #6d7787;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
  --panel-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 28px rgba(15, 23, 42, 0.03);
  --active-surface: #356fbe;
  --active-ink: #ffffff;
  --active-border: #255899;
  --field-focus: rgba(47, 104, 186, 0.16);
  --series-price: #2e63b8;
  --series-price-soft: #5e8de0;
  --series-listings: #7f3bf0;
  --series-listings-soft: #a06dff;
  --series-tickets: #138357;
  --series-tickets-soft: #3ebb85;
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 14px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at top left, rgba(53, 111, 190, 0.045), transparent 24%) 0 0 / 100% 220px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0)) 0 0 / 100% 140px no-repeat,
    linear-gradient(180deg, var(--bg-soft) 0, var(--bg) 100%);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    opacity 140ms ease,
    transform 140ms ease;
}

button:hover {
  transform: none;
}

button:disabled {
  opacity: 0.68;
  cursor: wait;
  transform: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--field-focus);
  outline-offset: 2px;
}

.page-shell {
  width: min(1780px, calc(100vw - 18px));
  margin: 0 auto;
  padding: 10px 0 16px;
}

.board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(340px, 22vw, 390px);
  gap: 10px;
  align-items: start;
}

.board-main,
.board-rail {
  min-width: 0;
}

.board-rail {
  position: sticky;
  top: 8px;
  align-self: start;
}

.selected-game-panel {
  margin-bottom: 0;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--panel-shadow);
  backdrop-filter: none;
}

.section-panel {
  margin-bottom: 8px;
}

.section-panel.collapsed .section-body {
  display: none;
}

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcfe, #eef4fa);
}

.section-heading h2 {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0;
}

.section-toggle {
  min-height: 24px;
  min-width: 48px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}

.section-body {
  min-width: 0;
}

[data-section-key="controls"] .section-bar,
[data-section-key="summary"] .section-bar {
  padding: 6px 12px;
}

[data-section-key="masthead"]:not(.collapsed) .section-bar,
[data-section-key="controls"]:not(.collapsed) .section-bar,
[data-section-key="summary"] {
  display: none;
}

.panel::before {
  content: none;
}

.masthead,
.controls,
.table-panel {
  padding: 10px 11px;
}

.masthead {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 0;
  padding: 8px 9px;
}

.masthead-copy {
  display: grid;
  gap: 7px;
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 2px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow.muted {
  color: var(--ink-soft);
}

.masthead h1,
.table-panel h2 {
  margin: 0;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.masthead h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.7rem, 2vw, 2.25rem);
  line-height: 0.98;
}

.lead {
  max-width: 56ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.68rem;
  line-height: 1.45;
}

.masthead-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: none;
}

.masthead-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff, #f6f9fc);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.masthead-stat span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.44rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.masthead-stat strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.86rem;
  line-height: 1;
  letter-spacing: 0;
  color: var(--ink);
}

.masthead-actions {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 6px 7px;
  min-width: 0;
  align-items: center;
  justify-content: end;
}

.header-actions,
.head-actions,
.controls-toolbar,
.preset-bar,
.sort-bar,
.active-filters,
.card-tags,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.header-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-soft);
  font-size: 0.52rem;
  font-weight: 600;
  white-space: nowrap;
}

.filter-pill,
.tag,
.change-chip,
.fresh-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(86, 100, 120, 0.18);
  background: #fff;
  color: var(--ink-soft);
  font-size: 0.54rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill.live {
  color: var(--ink);
}

.status-pill.ok {
  color: var(--success);
  background: rgba(15, 123, 70, 0.08);
  border-color: rgba(15, 123, 70, 0.18);
}

.status-pill.warn {
  color: #8a6514;
  background: rgba(185, 131, 31, 0.08);
  border-color: rgba(185, 131, 31, 0.2);
}

.status-pill.error {
  color: var(--danger);
  background: rgba(180, 35, 24, 0.08);
  border-color: rgba(180, 35, 24, 0.18);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.status-pill.ok .live-dot {
  background: var(--success);
}

.status-pill.warn .live-dot {
  background: var(--gold);
}

.status-pill.error .live-dot {
  background: var(--danger);
}

.ghost-btn:hover,
.board-tab-btn:hover,
.window-btn:hover,
.preset-btn:hover,
.sort-chip:hover,
.refresh-row-btn:hover,
.section-toggle:hover {
  background: var(--surface-muted);
  border-color: var(--line-strong);
  box-shadow: none;
}

#refreshAllBtn,
.board-tab-btn,
.ghost-btn,
.window-btn,
.preset-btn,
.sort-chip,
.refresh-row-btn {
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  font-weight: 600;
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.ghost-btn,
.board-tab-btn,
.window-btn,
.preset-btn,
.sort-chip,
.refresh-row-btn {
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  color: var(--ink);
}

#refreshAllBtn {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent-deep);
  box-shadow: 0 8px 18px rgba(47, 104, 186, 0.18);
}

#refreshAllBtn:hover {
  background: var(--accent-deep);
}

.board-tab-btn.active,
.window-btn.active,
.preset-btn.active,
.sort-chip.active {
  background: linear-gradient(180deg, var(--active-surface), var(--accent-deep));
  color: var(--active-ink);
  border-color: var(--active-border);
  box-shadow: 0 10px 18px rgba(47, 104, 186, 0.14);
}

.pin-btn.pinned {
  background: rgba(155, 123, 46, 0.08);
  color: #7c6120;
  border-color: rgba(155, 123, 46, 0.28);
}

.controls {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
  padding: 8px 10px 10px;
}

.controls-top,
.table-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.table-panel-head h2 {
  font-size: 1.08rem;
}

.controls-top {
  display: grid;
  gap: 10px;
  padding: 12px 14px 11px;
  border: 1px solid rgba(86, 100, 120, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 251, 254, 0.96));
  box-shadow:
    0 12px 24px rgba(15, 23, 42, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.controls-toolbar {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px 14px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(86, 100, 120, 0.14);
}

.control-group {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.control-group-board {
  grid-column: span 3;
}

.control-group-window {
  grid-column: span 3;
}

.control-group-label {
  padding-left: 2px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.control-group-sort {
  grid-column: span 4;
  min-width: 0;
}

.control-group-actions {
  grid-column: span 2;
  justify-items: end;
  align-content: start;
}

.control-group-actions .head-actions {
  justify-content: flex-end;
}

.controls .board-tab-bar,
.controls .window-toggle,
.controls .preset-bar,
.controls .sort-bar {
  gap: 8px;
}

.board-tab-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0;
}

.controls .board-tab-btn,
.controls .window-btn,
.controls .preset-btn,
.controls .sort-chip,
.controls .ghost-btn {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 11px;
  border-color: rgba(86, 100, 120, 0.16);
  background: linear-gradient(180deg, #ffffff, #f4f7fb);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 2px 6px rgba(15, 23, 42, 0.035);
  font-size: 0.86rem;
  white-space: nowrap;
}

.controls .board-tab-btn.active,
.controls .window-btn.active,
.controls .preset-btn.active,
.controls .sort-chip.active {
  background: linear-gradient(180deg, var(--active-surface), var(--accent-deep));
  color: var(--active-ink);
  border-color: var(--active-border);
  box-shadow:
    0 12px 24px rgba(53, 111, 190, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.controls .board-tab-btn.active:hover,
.controls .window-btn.active:hover,
.controls .preset-btn.active:hover,
.controls .sort-chip.active:hover {
  background: linear-gradient(180deg, var(--active-surface), var(--accent-deep));
  color: var(--active-ink);
  border-color: var(--active-border);
}

.board-tab-btn {
  min-width: 98px;
  border-color: var(--line);
  background: var(--panel-strong);
}

.window-toggle {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.window-btn {
  min-width: 44px;
  border-color: var(--line);
  background: var(--panel-strong);
}

.preset-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.preset-bar {
  gap: 6px;
}

.preset-btn {
  border-radius: 5px;
}

.preset-state-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(53, 111, 190, 0.2);
  border-radius: 999px;
  background: rgba(53, 111, 190, 0.09);
  color: var(--accent-deep);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.53rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sort-bar {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.sort-chip {
  min-width: 0;
  border-color: var(--line);
  background: var(--panel-strong);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.field span,
.toggle-field > span:first-child {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(86, 100, 120, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 1px 2px rgba(15, 23, 42, 0.03);
}

.field input::placeholder {
  color: rgba(31, 41, 55, 0.55);
}

.field input:focus,
.field select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px var(--field-focus);
}

.field-search {
  grid-column: span 4;
}

.field-team,
.field-trend,
.field-date {
  grid-column: span 2;
}

.field-price,
.field-rivalries,
.field-watchlist {
  grid-column: span 4;
}

.toggle-field {
  align-content: start;
}

.toggle-box {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(86, 100, 120, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 1px 2px rgba(15, 23, 42, 0.03);
}

.toggle-box input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent-deep);
}

.toggle-box em {
  font-style: normal;
  color: var(--ink);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
}

.board-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 0;
  padding: 10px 2px 0;
  border-top: 1px solid rgba(86, 100, 120, 0.14);
}

[data-section-key="selectedCharts"] .section-body,
[data-section-key="summary"] .section-body {
  padding: 9px 10px;
}

.selected-game-head {
  display: grid;
  gap: 5px;
  margin-bottom: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.selected-game-title {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.selected-game-meta {
  color: var(--ink-soft);
  font-size: 0.62rem;
}

.selected-game-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.selected-game-pills .filter-pill {
  background: var(--surface-card);
}

.selected-game-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.marketplace-link-strip {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.marketplace-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: none;
  transition:
    transform 120ms ease,
    opacity 120ms ease;
}

.marketplace-logo-link--disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

.marketplace-logo-link:focus-visible {
  outline: 2px solid rgba(47, 104, 186, 0.34);
  outline-offset: 2px;
}

.marketplace-logo-link:hover {
  transform: translateY(-1px);
  opacity: 0.88;
}

.marketplace-logo-link--disabled:hover {
  transform: none;
  opacity: 0.4;
}

.marketplace-logo-link--panel {
  min-height: 18px;
  min-width: 18px;
}

.marketplace-logo-link--table {
  min-height: 14px;
  min-width: 14px;
}

.marketplace-logo-image {
  display: block;
  width: auto;
}

.marketplace-logo-link--panel .marketplace-logo-image {
  height: 16px;
}

.marketplace-logo-link--table .marketplace-logo-image {
  height: 14px;
}

.selected-chart-controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
}

.selected-chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.selected-chart-range {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chart-range-btn {
  min-height: 24px;
  min-width: 40px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  color: var(--ink-soft);
  font-size: 0.53rem;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.chart-range-btn.active {
  background: linear-gradient(180deg, var(--active-surface), var(--accent-deep));
  border-color: var(--active-border);
  color: var(--active-ink);
}

.selected-chart-toolbar-note {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  color: var(--ink-soft);
  font-size: 0.52rem;
}

.selected-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.chart-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
  padding: 8px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.035);
}

.chart-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.055);
  transform: none;
}

.chart-card:focus-visible {
  outline: 2px solid var(--active-border);
  outline-offset: 3px;
}

.chart-card > * {
  position: relative;
  z-index: 1;
}

.chart-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: #cbd5e1;
}

.chart-card::after {
  content: none;
}

.chart-card.price-card::before {
  background: var(--series-price);
}

.chart-card.listings-card::before {
  background: var(--series-listings);
}

.chart-card.tickets-card::before {
  background: var(--series-tickets);
}

.chart-card.price-card {
  border-top-color: var(--series-price);
}

.chart-card.listings-card {
  border-top-color: var(--series-listings);
}

.chart-card.tickets-card {
  border-top-color: var(--series-tickets);
}

.chart-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.chart-card-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.chart-card-label {
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.chart-card-subtitle {
  color: var(--ink-soft);
  font-size: 0.56rem;
  line-height: 1.25;
}

.chart-card-value-stack {
  display: grid;
  justify-items: end;
  gap: 2px;
  flex: 0 0 auto;
}

.chart-card-expand {
  min-height: 20px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  color: var(--ink-soft);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: none;
}

.chart-card-expand:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.chart-card-head strong {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.08rem;
  letter-spacing: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.chart-card-delta {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-card);
  color: var(--ink-soft);
  font-size: 0.56rem;
  font-weight: 700;
}

.chart-card-delta.up {
  background: rgba(15, 123, 70, 0.1);
  color: var(--success);
}

.chart-card-delta.down {
  background: rgba(180, 35, 24, 0.1);
  color: var(--danger);
}

.chart-card-delta.flat {
  background: rgba(75, 85, 99, 0.12);
  color: var(--ink-soft);
}

.detail-chart {
  min-height: 236px;
}

.detail-chart-empty {
  display: grid;
  place-items: center;
  min-height: 236px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 0.68rem;
  background: var(--surface-card);
}

.detail-chart-stage {
  position: relative;
  width: 100%;
  height: 194px;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  overflow: hidden;
  cursor: crosshair;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.detail-chart-svg {
  display: block;
  width: 100%;
  height: 194px;
}

.detail-chart-stage::before {
  content: none;
}

.detail-chart-stage::after {
  content: none;
}

.detail-chart-stage > * {
  position: relative;
  z-index: 1;
}

.detail-chart-gridline {
  stroke: rgba(15, 23, 42, 0.09);
  stroke-width: 1;
}

.detail-chart-axis {
  stroke: rgba(15, 23, 42, 0.24);
  stroke-width: 1.15;
}

.detail-chart-ylabel,
.detail-chart-xlabel {
  fill: rgba(97, 113, 137, 0.9);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}

.detail-chart-callout {
  fill: rgba(86, 101, 126, 0.96);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9.2px;
  pointer-events: none;
}

.detail-chart-callout.low {
  opacity: 0.88;
}

.detail-chart-line {
  fill: none;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-chart-area {
  opacity: 0.18;
}

.detail-chart-gradient-stop.price {
  stop-color: var(--series-price-soft);
}

.detail-chart-gradient-stop.listings {
  stop-color: var(--series-listings-soft);
}

.detail-chart-gradient-stop.tickets {
  stop-color: var(--series-tickets-soft);
}

.detail-chart-line.price {
  stroke: var(--series-price);
  filter: none;
}

.detail-chart-line.listings {
  stroke: var(--series-listings);
  filter: none;
}

.detail-chart-line.tickets {
  stroke: var(--series-tickets);
  filter: none;
}

.detail-chart-dot {
  fill: currentColor;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 2.4;
}

.detail-chart-dot.secondary {
  opacity: 0.52;
}

.detail-chart-dot.hover {
  r: 5;
  filter: none;
}

.detail-chart-dot.price {
  color: var(--series-price);
}

.detail-chart-dot.listings {
  color: var(--series-listings);
}

.detail-chart-dot.tickets {
  color: var(--series-tickets);
}

.detail-chart-guide {
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-dasharray: 4 4;
  opacity: 0.52;
}

.detail-chart-guide.price {
  color: var(--series-price);
}

.detail-chart-guide.listings {
  color: var(--series-listings);
}

.detail-chart-guide.tickets {
  color: var(--series-tickets);
}

.detail-chart-crosshair {
  stroke: rgba(15, 23, 42, 0.28);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.detail-chart-hoverline {
  stroke: rgba(15, 23, 42, 0.12);
  stroke-width: 1;
}

.detail-chart-tooltip {
  position: absolute;
  width: min(156px, calc(100% - 12px));
  max-width: calc(100% - 12px);
  padding: 8px 9px 7px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: none;
  box-shadow: 0 14px 24px rgba(16, 24, 40, 0.1);
  pointer-events: none;
  display: grid;
  gap: 3px;
  z-index: 2;
  transform: translateY(-108%);
  overflow: hidden;
}

.detail-chart-tooltip.below {
  transform: translateY(12px);
}

.detail-chart-tooltip::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--series-price);
}

.detail-chart-tooltip.listings::before {
  background: var(--series-listings);
}

.detail-chart-tooltip.tickets::before {
  background: var(--series-tickets);
}

.detail-chart-tooltip-label {
  color: var(--ink-soft);
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-chart-tooltip strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
}

.detail-chart-tooltip span:last-child {
  color: var(--ink-soft);
  font-size: 0.58rem;
}

.detail-chart-insights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.detail-chart-chip {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-card);
  color: var(--ink-soft);
  font-size: 0.52rem;
  font-weight: 700;
  box-shadow: none;
}

.detail-chart-meta,
.detail-chart-hint {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.55rem;
  line-height: 1.35;
}

.detail-chart-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 10px;
}

.detail-chart-hint {
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.detail-chart-note {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 0.58rem;
  line-height: 1.3;
}

.result-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.result-summary strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.92rem;
  line-height: 1;
  color: var(--ink);
}

.result-summary-divider {
  color: rgba(102, 112, 133, 0.58);
}

.board-meta .active-filters {
  justify-content: flex-end;
}

.board-meta .filter-pill {
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(86, 100, 120, 0.16);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.filter-pill-accent {
  background: rgba(53, 111, 190, 0.1);
  border-color: rgba(53, 111, 190, 0.22);
  color: var(--accent-deep);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 0;
}

.summary-card {
  padding: 9px 9px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.summary-card span {
  display: block;
}

.summary-card span {
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.summary-card strong {
  display: block;
  margin-top: 3px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.96rem;
  letter-spacing: -0.03em;
}

.warning-banner,
.error-banner {
  display: none;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-weight: 700;
}

.warning-banner {
  border: 1px solid rgba(180, 131, 31, 0.28);
  background: rgba(185, 131, 31, 0.08);
  color: #7c5407;
}

.warning-line + .warning-line {
  margin-top: 4px;
}

.error-banner {
  border: 1px solid rgba(181, 58, 45, 0.22);
  background: rgba(181, 58, 45, 0.08);
  color: var(--danger);
}

.table-panel-head {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.table-note {
  max-width: 34ch;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.3;
  font-size: 0.66rem;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.98)),
    linear-gradient(90deg, rgba(47, 104, 186, 0.03), transparent 12%, transparent 88%, rgba(47, 104, 186, 0.03));
  box-shadow:
    0 14px 28px rgba(15, 23, 42, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.market-table {
  width: 100%;
  min-width: 1260px;
  border-collapse: separate;
  border-spacing: 0;
}

.col-pin {
  width: 42px;
}

.col-matchup {
  width: 21%;
}

.col-when {
  width: 104px;
}

.col-price {
  width: 82px;
}

.col-listings,
.col-tickets {
  width: 90px;
}

.col-move {
  width: 104px;
}

.col-action {
  width: 120px;
}

.col-freshness {
  width: 134px;
}

.market-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 7px 8px;
  border-right: 2px solid var(--table-divider);
  border-bottom: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #f9fbfd, #eaf1f8);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.52rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ink-soft);
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.05);
}

.table-sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  text-align: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  font: inherit;
}

.table-sort-btn:hover {
  transform: none;
}

.table-sort-label {
  min-width: 0;
  line-height: 1.16;
  white-space: nowrap;
}

.table-sort-indicator {
  margin-left: auto;
  min-width: 0.65rem;
  text-align: right;
  opacity: 0.42;
}

.market-table thead th.sorted .table-sort-indicator,
.table-sort-btn.active .table-sort-indicator {
  opacity: 1;
}

.market-table thead th:last-child {
  border-right: 0;
}

.market-table thead th:nth-child(4),
.market-table thead th:nth-child(5),
.market-table thead th:nth-child(6),
.market-table thead th:nth-child(7),
.market-table thead th:nth-child(8),
.market-table thead th:nth-child(9),
.market-table thead th:nth-child(10) {
  text-align: right;
}

.market-table thead th:nth-child(4) .table-sort-btn,
.market-table thead th:nth-child(5) .table-sort-btn,
.market-table thead th:nth-child(6) .table-sort-btn,
.market-table thead th:nth-child(7) .table-sort-btn,
.market-table thead th:nth-child(8) .table-sort-btn,
.market-table thead th:nth-child(9) .table-sort-btn,
.market-table thead th:nth-child(10) .table-sort-btn {
  justify-content: flex-end;
}

.market-table thead th:nth-child(3) {
  background: linear-gradient(180deg, rgba(68, 92, 128, 0.05), rgba(68, 92, 128, 0.02));
  color: #67788f;
}

.market-table thead th:nth-child(4),
.market-table thead th:nth-child(5) {
  background: linear-gradient(180deg, rgba(46, 99, 184, 0.12), rgba(46, 99, 184, 0.04));
  color: var(--series-price);
}

.market-table thead th:nth-child(6),
.market-table thead th:nth-child(7) {
  background: linear-gradient(180deg, rgba(82, 96, 118, 0.06), rgba(82, 96, 118, 0.02));
  color: var(--series-listings);
}

.market-table thead th:nth-child(8),
.market-table thead th:nth-child(9) {
  background: linear-gradient(180deg, rgba(82, 96, 118, 0.06), rgba(82, 96, 118, 0.02));
  color: var(--series-tickets);
}

.market-table thead th:nth-child(12) {
  background: linear-gradient(180deg, rgba(68, 92, 128, 0.06), rgba(68, 92, 128, 0.02));
  color: #5f7086;
}

.market-table tbody td {
  padding: 9px 8px;
  vertical-align: top;
  border-right: 2px solid var(--table-divider);
  border-bottom: 1px solid var(--line);
  background: transparent;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.market-table tbody td:last-child {
  border-right: 0;
}

.market-table tbody tr:nth-child(odd) td {
  background: rgba(248, 250, 252, 0.62);
}

.market-table tbody td.price-cell {
  background: linear-gradient(90deg, rgba(46, 99, 184, 0.11) 0%, rgba(46, 99, 184, 0.05) 48%, rgba(46, 99, 184, 0.015) 100%);
  box-shadow: inset 2px 0 0 rgba(46, 99, 184, 0.16);
}

.market-table tbody td.listings-cell {
  background: linear-gradient(90deg, rgba(127, 59, 240, 0.07) 0%, rgba(127, 59, 240, 0.028) 46%, rgba(127, 59, 240, 0.008) 100%);
  box-shadow: inset 2px 0 0 rgba(127, 59, 240, 0.12);
}

.market-table tbody td.tickets-cell {
  background: linear-gradient(90deg, rgba(19, 131, 87, 0.066) 0%, rgba(19, 131, 87, 0.026) 46%, rgba(19, 131, 87, 0.008) 100%);
  box-shadow: inset 2px 0 0 rgba(19, 131, 87, 0.12);
}

.market-table tbody tr:nth-child(odd) td.price-cell {
  background: linear-gradient(90deg, rgba(46, 99, 184, 0.125) 0%, rgba(46, 99, 184, 0.058) 48%, rgba(46, 99, 184, 0.018) 100%);
}

.market-table tbody tr:nth-child(odd) td.listings-cell {
  background: linear-gradient(90deg, rgba(127, 59, 240, 0.082) 0%, rgba(127, 59, 240, 0.034) 46%, rgba(127, 59, 240, 0.01) 100%);
}

.market-table tbody tr:nth-child(odd) td.tickets-cell {
  background: linear-gradient(90deg, rgba(19, 131, 87, 0.08) 0%, rgba(19, 131, 87, 0.032) 46%, rgba(19, 131, 87, 0.01) 100%);
}

.market-table tbody tr:hover td {
  background: linear-gradient(180deg, rgba(47, 104, 186, 0.075), rgba(47, 104, 186, 0.05));
}

.market-table tbody tr:hover td.price-cell,
.market-table tbody tr:hover td.listings-cell,
.market-table tbody tr:hover td.tickets-cell {
  background: linear-gradient(180deg, rgba(47, 104, 186, 0.075), rgba(47, 104, 186, 0.05));
}

.price-cell,
.listings-cell,
.tickets-cell,
.move-cell {
  text-align: right;
}

.when-cell .card-note,
.table-metric,
.table-freshness,
.freshness-text,
.move-note,
.table-price,
.table-move {
  font-variant-numeric: tabular-nums;
}

.market-row {
  cursor: pointer;
}

.market-row:hover {
  background: transparent;
}

.market-row.selected td {
  background: linear-gradient(180deg, rgba(47, 104, 186, 0.12), rgba(47, 104, 186, 0.085));
}

.market-row.selected td:first-child {
  box-shadow: inset 3px 0 0 var(--selection-bar);
}

.table-more-row td {
  padding: 10px 12px;
  background: #ffffff;
}

.table-more-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.table-load-more-btn {
  min-height: 28px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.pin-cell {
  width: 42px;
}

.pin-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  font-size: 0.68rem;
  color: var(--gold);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.matchup-cell-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  min-height: 52px;
}

.matchup-copy {
  min-width: 0;
}

.table-title {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.table-title a,
.table-price a {
  text-decoration: none;
}

.table-title a:hover,
.table-price a:hover {
  text-decoration: underline;
}

.matchup-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--ink-soft);
  line-height: 1.2;
}

.matchup-meta-item {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border: 1px solid rgba(86, 100, 120, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: #6c7a8f;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.matchup-meta-divider {
  display: none;
}

.matchup-marketplace-links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  align-self: end;
  gap: 4px;
  max-width: 128px;
}

.table-strong {
  font-weight: 700;
}

.when-cell .table-strong {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.15;
}

.table-price,
.table-move {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.1;
}

.price-cell .table-price,
.price-cell .table-price a {
  color: var(--series-price);
}

.table-metric {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.1;
}

.gametime-cell {
  box-shadow: inset 1px 0 0 rgba(15, 23, 42, 0.08);
}

.gametime-value,
.gametime-value a {
  color: #1d4ed8;
}

.listings-cell .table-metric {
  color: var(--ink);
}

.tickets-cell .table-metric {
  color: var(--ink);
}

.table-freshness {
  color: #334155;
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.25;
}

.card-note,
.history-line,
.freshness-text,
.move-note {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.66rem;
  line-height: 1.28;
}

.when-cell .card-note {
  color: #7b8798;
}

.freshness-cell .freshness-text {
  color: #7b8798;
}

.market-table .card-note,
.market-table .freshness-text,
.market-table .move-note {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fresh-pill {
  min-height: 18px;
  padding: 0 6px;
}

.change-chip {
  margin-top: 4px;
  min-height: 18px;
  padding: 0 6px;
}

.table-move.up,
.change-chip.up {
  color: var(--success);
}

.table-move.down,
.change-chip.down {
  color: var(--danger);
}

.table-move.flat,
.change-chip.flat,
.table-move.na,
.change-chip.na,
.move-note.flat,
.move-note.na {
  color: var(--neutral);
}

.move-note.up {
  color: var(--success);
}

.move-note.down {
  color: var(--danger);
}

.action-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  align-items: center;
}

.refresh-row-btn {
  min-height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  font-size: 0.5rem;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

[data-section-key="masthead"] {
  border-color: var(--hero-border);
  background: var(--hero-bg);
  box-shadow: none;
}

[data-section-key="masthead"] .section-bar {
  background: transparent;
  border-color: var(--hero-border);
}

[data-section-key="masthead"]::after {
  content: none;
}

[data-section-key="masthead"] .section-heading h2,
[data-section-key="masthead"] .eyebrow,
[data-section-key="masthead"] .masthead h1 {
  color: var(--hero-ink);
}

[data-section-key="masthead"] .lead {
  color: var(--hero-soft);
}

[data-section-key="masthead"] .section-toggle,
[data-section-key="masthead"] .ghost-btn,
[data-section-key="masthead"] .status-pill {
  background: var(--hero-chip);
  border-color: var(--hero-chip-border);
  color: var(--hero-ink);
}

[data-section-key="masthead"] .status-pill.live {
  color: var(--hero-ink);
}

[data-section-key="masthead"] .status-pill.ok {
  background: rgba(15, 123, 70, 0.08);
  border-color: rgba(15, 123, 70, 0.18);
  color: var(--success);
}

[data-section-key="masthead"] .status-pill.warn {
  color: #8a6514;
  background: rgba(185, 131, 31, 0.08);
  border-color: rgba(185, 131, 31, 0.2);
}

[data-section-key="masthead"] .status-pill.error {
  color: var(--danger);
  background: rgba(180, 35, 24, 0.08);
  border-color: rgba(180, 35, 24, 0.18);
}

[data-section-key="masthead"] .section-toggle:hover,
[data-section-key="masthead"] .ghost-btn:hover {
  background: var(--surface-muted);
  border-color: var(--hero-chip-border);
  box-shadow: none;
}

[data-section-key="masthead"] #refreshAllBtn {
  box-shadow: none;
}

.refresh-row-btn {
  color: var(--ink);
}

.empty-state {
  padding: 22px 12px;
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.empty-state p {
  margin: 0;
  color: var(--ink-soft);
}

body.modal-open {
  overflow: hidden;
}

.chart-modal[hidden] {
  display: none;
}

.chart-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.chart-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 32, 50, 0.16);
  backdrop-filter: none;
}

.chart-modal-panel {
  position: relative;
  width: min(1040px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 24px 54px rgba(12, 18, 28, 0.16);
}

.chart-modal-head {
  position: sticky;
  top: -18px;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: -18px -18px 14px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.96));
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.chart-modal-head h2 {
  margin: 2px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.72rem);
  letter-spacing: -0.04em;
}

.chart-modal-subtitle {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.chart-modal-head-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
  flex: 0 0 auto;
}

.chart-modal-value-stack {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: 110px;
}

.chart-modal-value-stack > span:first-child {
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chart-modal-value-stack strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.chart-modal[data-chart-series="price"] .chart-modal-value-stack strong {
  color: var(--series-price);
}

.chart-modal[data-chart-series="listings"] .chart-modal-value-stack strong {
  color: var(--series-listings);
}

.chart-modal[data-chart-series="tickets"] .chart-modal-value-stack strong {
  color: var(--series-tickets);
}

.chart-modal-close {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  color: var(--ink);
  font-size: 0.66rem;
  font-weight: 800;
}

.chart-modal-close:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.chart-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.chart-modal-chart.detail-chart {
  min-height: clamp(410px, 66vh, 660px);
}

.chart-modal-chart .detail-chart-empty {
  min-height: clamp(360px, 58vh, 580px);
}

.chart-modal-chart .detail-chart-stage,
.chart-modal-chart .detail-chart-svg {
  height: clamp(360px, 58vh, 580px);
}

.chart-modal-chart .detail-chart-tooltip {
  width: min(184px, calc(100% - 18px));
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(25, 37, 52, 0.94);
  color: white;
  box-shadow: 0 8px 16px rgba(20, 33, 61, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1280px) {
  .board-layout {
    grid-template-columns: 1fr;
  }

  .board-rail {
    position: static;
    top: auto;
  }

  .selected-chart-grid,
  .summary-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .field-search {
    grid-column: span 6;
  }

  .field-team,
  .field-trend,
  .field-date {
    grid-column: span 2;
  }

  .field-price,
  .field-rivalries,
  .field-watchlist {
    grid-column: span 3;
  }

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

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

  .window-toggle {
    flex-wrap: wrap;
  }

  .control-group-board,
  .control-group-window,
  .control-group-sort,
  .control-group-actions {
    grid-column: span 1;
  }

  .control-group-actions {
    justify-items: start;
  }

  .control-group-actions .head-actions {
    justify-content: flex-start;
  }
}

@media (min-width: 1281px) {
  .selected-game-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    max-height: calc(100vh - 16px);
  }

  .selected-game-panel .section-body {
    min-height: 0;
    overflow: auto;
  }

  .selected-game-panel .selected-chart-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .selected-game-panel .price-card {
    grid-column: auto;
  }

  .selected-game-panel .chart-card {
    padding: 8px;
  }

  .selected-game-panel .chart-card-head {
    margin-bottom: 7px;
  }

  .selected-game-panel .chart-card-head strong {
    font-size: 1.12rem;
  }

  .selected-game-panel .chart-card-subtitle {
    font-size: 0.62rem;
  }

  .selected-game-panel .selected-game-head {
    margin-bottom: 8px;
  }

  .selected-game-panel .selected-chart-controls {
    margin-bottom: 8px;
  }

  .selected-game-panel .selected-chart-toolbar {
    padding: 7px 8px;
  }

  .selected-game-panel .detail-chart {
    min-height: 242px;
  }

  .selected-game-panel .detail-chart-empty {
    min-height: 214px;
  }

  .selected-game-panel .detail-chart-stage,
  .selected-game-panel .detail-chart-svg {
    height: 214px;
  }

  .selected-game-panel .price-card .detail-chart {
    min-height: 286px;
  }

  .selected-game-panel .price-card .detail-chart-empty {
    min-height: 254px;
  }

  .selected-game-panel .price-card .detail-chart-stage,
  .selected-game-panel .price-card .detail-chart-svg {
    height: 254px;
  }

  .selected-game-panel .detail-chart-insights {
    gap: 5px;
    margin-top: 8px;
  }

  .selected-game-panel .detail-chart-chip {
    min-height: 19px;
    padding: 0 6px;
    font-size: 0.54rem;
  }

  .selected-game-panel .detail-chart-meta,
  .selected-game-panel .detail-chart-hint,
  .selected-game-panel .detail-chart-note {
    font-size: 0.54rem;
  }

  .board-main .summary-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .market-table thead th {
    padding: 8px 10px;
  }

  .market-table tbody td {
    padding: 9px 10px;
  }

  .table-title {
    font-size: 0.9rem;
  }

  .table-price,
  .table-move {
    font-size: 1.02rem;
  }

  .card-note,
  .history-line,
  .freshness-text,
  .move-note {
    font-size: 0.64rem;
  }

  .sparkline-wrap {
    width: 100px;
  }

  .sparkline {
    width: 100px;
    height: 26px;
  }
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100vw - 12px, 1600px);
    padding-top: 6px;
  }

  .masthead,
  .selected-game-topline,
  .selected-chart-toolbar,
  .table-panel-head {
    flex-direction: column;
  }

  .section-bar,
  .chart-card-head,
  .detail-chart-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-card-value-stack {
    justify-items: start;
  }

  .masthead-actions,
  .sort-bar {
    justify-items: start;
    justify-content: flex-start;
  }

  .masthead-actions {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .header-actions {
    grid-column: auto;
    justify-content: stretch;
  }

  .selected-chart-grid,
  .summary-strip,
  .filters-grid,
  .masthead-stats {
    grid-template-columns: 1fr;
  }

  .controls-toolbar {
    grid-template-columns: 1fr;
  }

  .controls-top {
    gap: 10px;
    padding: 12px;
  }

  .field-search,
  .field-team,
  .field-trend,
  .field-date,
  .field-price,
  .field-rivalries,
  .field-watchlist {
    grid-column: span 1;
  }

  .header-actions,
  .head-actions,
  .controls-toolbar,
  .board-tab-bar,
  .window-toggle,
  .preset-bar,
  .sort-bar,
  .active-filters,
  .card-actions,
  .selected-chart-range {
    width: 100%;
  }

  .header-actions > *,
  .head-actions > *,
  .controls-toolbar > *,
  .board-tab-bar > *,
  .window-toggle > *,
  .preset-bar > *,
  .sort-bar > *,
  .selected-chart-range > *,
  .masthead-actions > * {
    flex: 1 1 auto;
  }

  .control-group-actions {
    justify-items: stretch;
  }

  .control-group-actions .head-actions {
    justify-content: stretch;
  }

  .preset-strip,
  .board-meta {
    width: 100%;
  }

  .board-meta .active-filters,
  .selected-chart-toolbar-note {
    width: 100%;
    justify-content: flex-start;
  }

  .selected-chart-toolbar-note {
    justify-content: flex-start;
  }

  .detail-chart-tooltip {
    max-width: min(180px, calc(100% - 24px));
  }

  .chart-modal {
    padding: 10px;
  }

  .chart-modal-panel {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 12px;
    border-radius: 14px;
  }

  .chart-modal-head {
    flex-direction: column;
    gap: 10px;
    top: -12px;
    margin: -12px -12px 12px;
    padding: 12px;
  }

  .chart-modal-head-actions {
    width: 100%;
  }

  .chart-modal-value-stack {
    justify-items: start;
    margin-right: auto;
  }

  .chart-modal-close {
    width: auto;
  }

  .chart-modal-chart.detail-chart {
    min-height: 360px;
  }

  .chart-modal-chart .detail-chart-empty,
  .chart-modal-chart .detail-chart-stage,
  .chart-modal-chart .detail-chart-svg {
    min-height: 320px;
    height: 320px;
  }
}
