/* ================================================================
   cEDH League - public, read-only
   ================================================================ */

:root {
  --bg:          #0e0f13;
  --surface:     #171922;
  --surface-2:   #1d2030;
  --surface-3:   #252939;
  --border:      #2b3043;
  --border-soft: #22273a;

  --text:      #e7e9f0;
  --text-dim:  #a4aabd;
  --muted:     #7d8299;

  --accent:      #7c5cff;
  --accent-dim:  #5b41c9;
  --accent-soft: rgba(124, 92, 255, 0.14);

  --ok:     #3fb950;
  --warn:   #d9a11a;
  --danger: #f2545b;
  --info:   #4aa3df;
  --gold:   #e3c04a;

  --w: #f6f2da; --u: #1f6fb2; --b: #3a3230; --r: #d6403a; --g: #12855a; --c: #9d9a92;

  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 2px 14px rgba(0, 0, 0, 0.4);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* Any class here that sets `display` outranks the user-agent's
   [hidden] { display: none }, so scripts toggling `hidden` would be ignored
   without this. */
[hidden] { display: none !important; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; }

h1 { font-size: 1.6rem; margin: 0 0 .2rem; letter-spacing: -.01em; }
h2 { font-size: 1.02rem; margin: 0; letter-spacing: .01em; }
h3 { font-size: .9rem; margin: 0; }
p  { margin: .3rem 0; }
code { font-family: var(--mono); font-size: .85em; color: var(--text-dim);
       background: var(--surface-2); padding: .05rem .3rem; border-radius: 4px; }
hr.rule { border: 0; border-top: 1px solid var(--border-soft); margin: 1rem 0; }

.muted  { color: var(--muted); }
.small  { font-size: .85rem; }
.strong { font-weight: 700; }
.num    { text-align: right; font-variant-numeric: tabular-nums; }
.warn   { color: var(--warn); }

/* ------------------------------------------------------------ top bar */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 15, 19, .93); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: .6rem 1.25rem;
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .55rem; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark {
  background: linear-gradient(135deg, var(--accent), #b06cff);
  color: #fff; font-weight: 800; font-size: .72rem; letter-spacing: .06em;
  padding: .25rem .45rem; border-radius: 6px;
}
.brand-name { font-weight: 650; font-size: .96rem; }

.mainnav { display: flex; gap: .15rem; flex: 1; flex-wrap: wrap; }
.mainnav a {
  padding: .38rem .7rem; border-radius: var(--radius-sm);
  color: var(--text-dim); font-size: .9rem; font-weight: 500;
}
.mainnav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.mainnav a.active { background: var(--accent-soft); color: #cbbaff; }

.week-chip {
  font-size: .78rem; font-weight: 650; white-space: nowrap;
  color: #cbbaff; background: var(--accent-soft);
  border: 1px solid var(--accent-dim); border-radius: 999px; padding: .2rem .6rem;
}

/* ------------------------------------------------------------- layout */

.page { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }

.page-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.head-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

.grid-2 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 1rem; margin-bottom: 1rem;
}

.footer {
  max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.25rem 2rem;
  color: var(--muted); font-size: .82rem; border-top: 1px solid var(--border-soft);
}
.footer .dot { margin: 0 .4rem; }
.footer a { color: var(--text-dim); }

/* -------------------------------------------------------------- panel */

.panel {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem;
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; margin-bottom: .85rem; padding-bottom: .6rem;
  border-bottom: 1px solid var(--border-soft);
}
.panel-accent { border-color: var(--accent-dim); box-shadow: 0 0 0 1px var(--accent-soft) inset; }
.week-panel.is-current { border-color: var(--accent-dim); }

.link { color: var(--accent); font-size: .85rem; }
.link:hover { color: #a795ff; }

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .45rem .85rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font-size: .86rem; font-weight: 550; font-family: inherit;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-3); text-decoration: none; color: #fff; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #8f72ff; border-color: #8f72ff; }
.btn-ghost { background: transparent; }
.btn-sm { padding: .3rem .6rem; font-size: .8rem; }

/* ------------------------------------------------------------ callouts */

.callout {
  background: var(--surface-2); border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: .8rem 1rem; margin-bottom: 1rem;
}
.callout-warning { border-left-color: var(--warn); }
.callout p { margin: .25rem 0; }

/* --------------------------------------------------------------- stats */

.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: .7rem; margin-bottom: 1rem;
}
.stat-tile {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: .85rem 1rem;
}
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.stat-label { font-size: .74rem; color: var(--muted); text-transform: uppercase;
              letter-spacing: .05em; margin-top: .15rem; }
.stat-hint  { font-size: .76rem; color: var(--text-dim); margin-top: .2rem; }

/* -------------------------------------------------------------- tables */

.table { width: 100%; border-collapse: collapse; font-size: .89rem; }
.table th {
  text-align: left; padding: .45rem .6rem;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); border-bottom: 1px solid var(--border);
}
.table td { padding: .5rem .6rem; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }
.table .rank { color: var(--muted); font-weight: 700; width: 2.2rem; }
.table tr.is-me { background: var(--accent-soft); }
.table tr.is-me:hover { background: rgba(124, 92, 255, .2); }
.table tr.below-cut td { opacity: .58; }

.player-cell { display: inline-flex; align-items: center; gap: .5rem; }

.cut-line td {
  padding: 0; border: none; height: 0; position: relative;
  border-top: 2px dashed rgba(242, 84, 91, .5);
}
.cut-line span {
  position: absolute; right: .6rem; top: -.62rem;
  background: var(--surface); padding: 0 .4rem;
  font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
  color: #ff9ea2;
}

.barcell { width: 90px; }
.bar { display: block; height: 6px; border-radius: 3px; min-width: 2px;
       background: linear-gradient(90deg, var(--accent-dim), var(--accent)); }

.field-hint { font-size: .8rem; color: var(--muted); margin: .5rem 0 0; }

/* --------------------------------------------------------------- badges */

.badge {
  display: inline-block; padding: .12rem .45rem; border-radius: 5px;
  font-size: .73rem; font-weight: 650; white-space: nowrap;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-dim);
}
.badge-win      { border-color: rgba(63,185,80,.45);  background: rgba(63,185,80,.13);  color: #8fe19e; }
.badge-loss     { border-color: var(--border);        background: var(--surface-2);     color: var(--muted); }
.badge-draw     { border-color: rgba(217,161,26,.45); background: rgba(217,161,26,.13); color: #eecb70; }
.badge-ok       { border-color: rgba(63,185,80,.45);  background: rgba(63,185,80,.13);  color: #8fe19e; }
.badge-live     { border-color: rgba(124,92,255,.5);  background: var(--accent-soft);   color: #cbbaff; }
.badge-upcoming { border-color: rgba(74,163,223,.4);  background: rgba(74,163,223,.12); color: #8fcbf0; }
.badge-muted    { color: var(--muted); }

.badge-late { border-color: rgba(242,84,91,.45); background: rgba(242,84,91,.12); color: #ff9ea2; }

.crown { color: var(--gold); font-size: .9rem; }

.head-badges { display: inline-flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.locked-in { color: var(--info); font-size: .84rem; }
.lock-note {
  font-size: .84rem; color: var(--text-dim);
  background: var(--surface-2); border: 1px dashed var(--border);
  border-radius: var(--radius-sm); padding: .45rem .65rem; margin: 0 0 .6rem;
}

/* ----------------------------------------------------------- mana pips */

.pips { display: inline-flex; gap: 2px; vertical-align: middle; }
.pip {
  width: 15px; height: 15px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .6rem; font-weight: 800; color: #fff;
  border: 1px solid rgba(0, 0, 0, .35);
}
.pip-W { background: var(--w); color: #2b2620; }
.pip-U { background: var(--u); }
.pip-B { background: var(--b); }
.pip-R { background: var(--r); }
.pip-G { background: var(--g); }
.pip-C { background: var(--c); color: #26241f; }

/* -------------------------------------------------------------- avatar */

.avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-dim), #a06cff);
  color: #fff; font-weight: 750; font-size: .66rem; letter-spacing: .02em;
  vertical-align: middle;
}
.avatar-lg { width: 40px; height: 40px; font-size: .85rem; }
.avatar-xl { width: 64px; height: 64px; font-size: 1.25rem; }

/* ---------------------------------------------------------------- pods */

.pod-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .9rem; }
.pod-columns.wide { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

.pod-block {
  background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: .7rem .8rem; margin-bottom: .7rem;
}
.pod-block-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem;
  padding-bottom: .4rem; border-bottom: 1px solid var(--border-soft);
}
.pod-block-head h3 { font-size: .82rem; text-transform: uppercase;
                     letter-spacing: .06em; color: var(--text-dim); }

.seat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.seat-list li { display: flex; align-items: center; gap: .5rem; font-size: .88rem; padding: .12rem 0; }
.seat-list li.is-winner a { color: #8fe19e; font-weight: 650; }
.seat-list.seeded li { gap: .45rem; }

.seed-chip {
  min-width: 22px; text-align: center; font-size: .7rem; font-weight: 750;
  color: var(--text-dim); background: var(--surface-3);
  border: 1px solid var(--border); border-radius: 5px; padding: .05rem .3rem;
}

.bye-line { font-size: .85rem; margin-top: .6rem; }
.bye-line a { color: var(--text-dim); }

/* week detail: a card per seat with their commander */
.seat-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.seat-card {
  background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: .55rem .7rem;
}
.seat-card.is-winner { border-color: rgba(63,185,80,.45); background: rgba(63,185,80,.07); }
.seat-card-head { display: flex; align-items: center; gap: .5rem; }
.seat-name { font-weight: 620; font-size: .9rem; }
.seat-card-deck { margin-top: .25rem; padding-left: 2.1rem; display: flex;
                  gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.commander { font-size: .85rem; color: #cbbaff; }
.commander:hover { color: #e0d6ff; }

.result-note {
  margin-top: .5rem; padding-left: .7rem; border-left: 3px solid var(--border);
  color: var(--text-dim); font-size: .85rem;
}

/* ------------------------------------------------------- week strip/nav */

.week-strip {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem;
}
.week-strip li { flex: 1 0 auto; }
.week-strip a {
  display: block; text-align: center; padding: .5rem .7rem;
  background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); min-width: 92px;
}
.week-strip a:hover { background: var(--surface-3); text-decoration: none; }
.week-strip li.is-current a { border-color: var(--accent); background: var(--accent-soft); }
.week-strip li.is-playoff a { border-style: dashed; }
.week-strip-no { display: block; font-weight: 750; font-size: .85rem; }
.week-strip-dates { display: block; font-size: .7rem; color: var(--muted); }

.week-nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.week-nav a {
  width: 30px; height: 30px; display: inline-flex; align-items: center;
  justify-content: center; border-radius: 6px; font-size: .82rem;
  background: var(--surface-2); border: 1px solid var(--border-soft); color: var(--text-dim);
}
.week-nav a:hover { background: var(--surface-3); text-decoration: none; }
.week-nav a.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ------------------------------------------------------------- the flow */

.flow {
  list-style: none; margin: 0 0 1.2rem; padding: 0;
  display: flex; align-items: stretch; gap: .5rem; overflow-x: auto; padding-bottom: .4rem;
}
.flow-step {
  flex: 1 0 168px; display: flex; gap: .55rem; align-items: flex-start;
  background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: .6rem .7rem;
}
.flow-step.is-final { border-color: var(--accent-dim); background: var(--accent-soft); }
.flow-step strong { font-size: .87rem; }
.flow-step p { margin: .15rem 0 0; }
.flow-badge {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-size: .72rem; font-weight: 750;
}
.flow-arrow { display: flex; align-items: center; color: var(--muted); font-size: 1.1rem; }

/* ------------------------------------------------------------- bracket */

.bracket-wrap { overflow-x: auto; margin: .5rem 0 .3rem; }
.bracket { width: 100%; min-width: 720px; height: auto; display: block; }
.bracket-title { fill: var(--text); font-size: 15px; font-weight: 700;
                 font-family: var(--font); }
.bracket-seed  { fill: var(--muted); font-size: 12px; font-weight: 750;
                 font-family: var(--font); }
.bracket-name  { fill: var(--text-dim); font-size: 12.5px; font-family: var(--font); }
.bracket-foot  { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.bracket-place { fill: var(--gold); font-size: 13px; font-weight: 750;
                 font-family: var(--font); }

/* --------------------------------------------------------- viewer picker */

.viewer-picker { display: flex; align-items: center; gap: .5rem; }
.viewer-picker label {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 700;
}
.viewer-picker select {
  padding: .38rem .6rem; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-family: inherit; font-size: .86rem; cursor: pointer;
}
.viewer-picker select:focus { outline: none; border-color: var(--accent);
                              box-shadow: 0 0 0 3px var(--accent-soft); }

/* my-season strip on the standings page */
.my-weeks { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .8rem; }
.my-week {
  display: flex; align-items: center; gap: .45rem; padding: .35rem .6rem;
  background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); font-size: .82rem;
}
.my-week-no { font-weight: 750; color: var(--text-dim); }
.my-week.is-win  { border-color: rgba(63,185,80,.4); }
.my-week.is-loss { opacity: .72; }
.my-week.is-bye  { border-style: dashed; opacity: .65; }

/* ------------------------------------------------------------- history */

.history-list { display: grid; gap: .7rem; }
.history-card {
  background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: .7rem .85rem;
}
.history-card.is-bye { border-style: dashed; opacity: .7; }
.history-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
}
.history-week { font-weight: 700; font-size: .92rem; margin-right: .4rem; }
.history-body { margin-top: .4rem; display: flex; justify-content: space-between;
                gap: 1rem; flex-wrap: wrap; }
.history-pod  { font-size: .86rem; }
.history-deck { font-size: .86rem; }

/* ------------------------------------------------------------ timeline */

.season-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.timeline-week { display: flex; gap: .8rem; align-items: stretch; }
.timeline-marker {
  flex-shrink: 0; width: 92px; padding: .5rem .4rem; text-align: center;
  background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}
.timeline-week.state-current .timeline-marker { border-color: var(--accent); background: var(--accent-soft); }
.timeline-week.is-bye .timeline-marker { border-style: dashed; }
.timeline-week-no { display: block; font-weight: 750; font-size: .88rem; }
.timeline-dates { display: block; font-size: .68rem; color: var(--muted); }
.timeline-body {
  flex: 1; min-width: 0; padding: .5rem .8rem;
  background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}
.timeline-week.is-bye .timeline-body { opacity: .7; }
.timeline-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.timeline-row + .timeline-row { margin-top: .2rem; }
.timeline-deck { margin-top: .35rem; display: flex; gap: .5rem;
                 align-items: baseline; flex-wrap: wrap; }
.pod-link { font-weight: 650; font-size: .88rem; }

.submission-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.submission-list li { display: flex; flex-direction: column; gap: .1rem;
                      padding-bottom: .45rem; border-bottom: 1px solid var(--border-soft); }
.submission-list li:last-child { border-bottom: none; padding-bottom: 0; }

.ranked-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.ranked-list li { display: flex; align-items: center; gap: .5rem; font-size: .88rem; }
.ranked-list li.is-out { opacity: .6; }

/* -------------------------------------------------------------- players */

.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; }
.player-card {
  display: block; background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: .9rem;
}
.player-card:hover { border-color: var(--accent-dim); background: var(--surface-2); text-decoration: none; }
.player-card-head { display: flex; align-items: center; gap: .7rem; }
.player-name { font-weight: 650; }
.player-handle { font-size: .78rem; }
.player-deck-line { margin-top: .7rem; font-size: .85rem;
                    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.profile-head { display: flex; align-items: center; gap: 1rem;
                margin-bottom: 1.25rem; flex-wrap: wrap; }
.profile-links { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }

/* ------------------------------------------------------------ decklists */

.decklist-columns { columns: 3 210px; column-gap: 1.6rem; margin-top: .4rem; }
.decklist-group { break-inside: avoid; margin-bottom: 1.1rem; display: block; }
.decklist-group h3 {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 700; margin: 0 0 .35rem;
  padding-bottom: .25rem; border-bottom: 1px solid var(--border-soft);
  display: flex; justify-content: space-between; gap: .5rem;
}
.group-count { color: var(--text-dim); font-weight: 600; }

.card-list { list-style: none; margin: 0; padding: 0; }
.card-row {
  display: flex; align-items: baseline; gap: .4rem;
  padding: .1rem .25rem; border-radius: 4px; font-size: .85rem; cursor: default;
}
.card-row:hover { background: var(--surface-2); }
.card-qty { color: var(--muted); font-variant-numeric: tabular-nums;
            min-width: 1.1rem; text-align: right; font-size: .8rem; }
.card-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-cost { color: var(--muted); font-size: .74rem; font-family: var(--mono); white-space: nowrap; }
.card-row.is-unresolved .card-name { color: var(--warn); }
.card-warn { color: var(--warn); font-weight: 800; font-size: .78rem;
             border: 1px solid rgba(217,161,26,.45); border-radius: 3px; padding: 0 .22rem; }

.card-hover { position: fixed; z-index: 200; pointer-events: none;
              width: 240px; filter: drop-shadow(0 8px 22px rgba(0,0,0,.65)); }
.card-hover img { width: 100%; border-radius: 4.5% / 3.2%; display: block; }
.card-hover[hidden] { display: none; }

.curve { display: flex; gap: .4rem; align-items: flex-end; padding: .3rem 0 0; }
.curve-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.curve-bar-wrap { height: 72px; width: 100%; display: flex; align-items: flex-end; }
.curve-bar { width: 100%; border-radius: 4px 4px 0 0; min-height: 2px;
             background: linear-gradient(180deg, var(--accent), var(--accent-dim)); }
.curve-count { font-size: .72rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.curve-label { font-size: .7rem; color: var(--muted); font-weight: 600; }

.raw-list {
  font-family: var(--mono); font-size: .8rem; line-height: 1.5;
  background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: .8rem; overflow-x: auto;
  white-space: pre-wrap; color: var(--text-dim); margin: 0;
}
.raw-details { margin-top: .5rem; }
.raw-details summary { cursor: pointer; color: var(--muted); font-size: .84rem; padding: .3rem 0; }
.raw-details summary:hover { color: var(--text-dim); }

/* --------------------------------------------------------------- misc */

.empty { text-align: center; padding: 1.8rem 1rem; color: var(--muted); }
.empty p { margin-bottom: .8rem; }

.error-page { text-align: center; padding: 3.5rem 1rem; }
.error-code { font-size: 3.4rem; font-weight: 800; color: var(--surface-3); line-height: 1; }
.error-page h1 { margin-top: .6rem; }
.error-page p { color: var(--text-dim); margin: .5rem auto 1.2rem; max-width: 46ch; }

@media (max-width: 640px) {
  .page { padding: 1rem .8rem 3rem; }
  .topbar-inner { padding: .55rem .8rem; gap: .6rem; }
  .mainnav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .decklist-columns { columns: 1; }
  .card-hover { display: none; }
  .stat-row { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
  .stat-value { font-size: 1.25rem; }
  .timeline-marker { width: 74px; }
}
