:root {
  color-scheme: dark;
  --ink: #f8f1df;
  --muted: #afa8b8;
  --night: #120f1d;
  --panel: #1b1628;
  --panel-2: #241d33;
  --line: #3a3047;
  --gold: #f7c948;
  --blue: #58c7d7;
  --red: #ed4e5c;
  --green: #53dd83;
  --shadow: #09070f;
  font-family: "Courier New", Courier, monospace;
}
* { box-sizing: border-box; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(247, 201, 72, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 201, 72, .035) 1px, transparent 1px),
    radial-gradient(circle at 50% -20%, #332647 0, var(--night) 58%);
  background-size: 24px 24px, 24px 24px, auto;
}
button, input, select, a { font: inherit; }
.hub-shell { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 60px; }
.hub-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-bottom: 22px; border-bottom: 2px solid var(--line); }
.hub-brand { color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: .08em; }
.hub-brand span, .kicker { color: var(--gold); }
.hub-links { display: flex; flex-wrap: wrap; gap: 18px; }
.hub-links a { color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 700; letter-spacing: .08em; }
.hub-links a:hover { color: var(--gold); }
.hero { padding: 54px 0 30px; }
.kicker { margin: 0 0 12px; font-size: .76rem; font-weight: 800; letter-spacing: .12em; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 12px; font-size: clamp(2.4rem, 7vw, 5.2rem); line-height: .95; }
.hero > p:last-child { max-width: 680px; color: var(--muted); line-height: 1.65; }
.panel { margin-top: 24px; border: 3px solid var(--ink); background: var(--panel); box-shadow: 8px 8px 0 var(--shadow); }
.panel-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; padding: 24px; border-bottom: 2px solid var(--line); }
.panel-heading h2 { margin: 0; font-size: clamp(1.3rem, 3vw, 2rem); }
.panel-body { padding: 24px; }
.form-grid { display: grid; gap: 16px; max-width: 560px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: .8rem; font-weight: 800; letter-spacing: .08em; }
input, select {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 0;
  outline: none; background: var(--panel-2); color: var(--ink);
}
input:focus, select:focus { border-color: var(--gold); }
.pixel-button {
  display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 11px 18px;
  border: 2px solid var(--ink); background: var(--gold); color: var(--night); cursor: pointer;
  font-weight: 900; letter-spacing: .06em; text-decoration: none; box-shadow: 4px 4px 0 var(--shadow);
}
.pixel-button.secondary { background: transparent; color: var(--ink); box-shadow: none; }
.pixel-button:disabled { cursor: wait; opacity: .55; }
.form-note, .empty, .status { color: var(--muted); line-height: 1.55; }
.status[data-kind="error"] { color: var(--red); }
.status[data-kind="success"] { color: var(--green); }
.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 20px 24px; border-bottom: 2px solid var(--line); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .74rem; letter-spacing: .1em; }
td:first-child { color: var(--gold); font-weight: 900; }
.profile-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.profile-row h2 { margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 26px 0; }
.metric-grid div { padding: 18px; background: var(--panel-2); }
.metric-grid dt { color: var(--muted); font-size: .7rem; letter-spacing: .1em; }
.metric-grid dd { margin: 8px 0 0; color: var(--gold); font-size: clamp(1.2rem, 4vw, 2rem); font-weight: 900; }
.trend-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; align-items: end; min-height: 210px; }
.trend-bar { display: grid; gap: 8px; align-content: end; min-height: 180px; color: var(--muted); font-size: .68rem; text-align: center; }
.trend-bar i { display: block; min-height: 4px; background: var(--blue); border-top: 3px solid var(--ink); }
.run-list { display: grid; gap: 10px; }
.run-item { display: grid; grid-template-columns: 1.5fr .7fr .8fr auto; gap: 12px; align-items: center; padding: 15px; background: var(--panel-2); }
.run-item small { color: var(--muted); }
.share-shell { display: grid; min-height: 100vh; align-content: center; gap: 28px; }
.share-card { padding: clamp(28px, 7vw, 64px); border: 4px solid var(--ink); background: var(--panel); box-shadow: 12px 12px 0 var(--shadow); text-align: center; }
.share-card h1 { max-width: none; margin-bottom: 8px; }
.share-game { color: var(--muted); }
.share-result { display: block; color: var(--gold); font-size: clamp(2rem, 8vw, 5rem); }
.share-shell .hub-links { justify-content: center; }
[hidden] { display: none !important; }
@media (max-width: 680px) {
  .hub-header, .panel-heading { align-items: flex-start; flex-direction: column; }
  .filters, .metric-grid { grid-template-columns: 1fr; }
  .run-item { grid-template-columns: 1fr auto; }
  .run-item > :nth-child(2), .run-item > :nth-child(3) { display: none; }
}
