:root {
  --ink: #e8edf7;
  --muted: #91a0b9;
  --faint: #5f6f89;
  --canvas: #080d17;
  --surface: #0e1728;
  --surface-raised: #142036;
  --line: #24334d;
  --long: #36d399;
  --long-dark: #0ca678;
  --short: #fb7185;
  --short-dark: #e11d48;
  --accent: #f3c95f;
  --radius: 18px;
  --page: min(1180px, calc(100vw - 40px));
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--canvas); scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% -10%, rgba(48, 102, 190, 0.18), transparent 34rem),
    var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
a:hover { color: #fff; }
button, input { font: inherit; }
button { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.035em; }
h1 { font-size: clamp(2.55rem, 6vw, 5.9rem); }
h2 { font-size: clamp(2rem, 4vw, 3.7rem); }
h3 { font-size: 1.22rem; }

.site-header {
  width: var(--page);
  height: 72px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(360px, 1fr);
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid rgba(145, 160, 185, 0.16);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 780;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark { width: 34px; height: 34px; display: block; }
.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: clamp(13px, 2.4vw, 26px); color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.site-nav { grid-column: 3; }
.site-nav a { text-decoration: none; }
.site-nav .account-link { color: var(--ink); }
.site-nav form { margin: 0; }
.nav-button { padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }

.header-game-status { grid-column: 2; display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.header-game-status span { display: inline-flex; align-items: baseline; gap: 5px; }
.header-game-status strong { color: var(--ink); font-size: 0.87rem; }
.header-game-status .text-long strong { color: var(--long); }
.header-game-status .text-short strong { color: var(--short); }

.hero {
  width: var(--page);
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 70px 0 90px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(480px, 1.08fr);
  gap: clamp(44px, 7vw, 100px);
  align-items: center;
}

.hero h1 { margin-bottom: 26px; color: #fff; }
.hero-intro { max-width: 580px; color: var(--muted); font-size: clamp(1.05rem, 1.8vw, 1.3rem); }
.fine-print { margin: 13px 0 0; color: var(--faint); font-size: 0.83rem; }
.text-long { color: var(--long); }
.text-short { color: var(--short); }

.eyebrow {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.04em;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(20, 32, 54, 0.98), rgba(10, 18, 31, 0.98));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.35);
  transform: rotate(1.2deg);
}

.ticker-strip, .decision-preview { display: flex; align-items: center; justify-content: space-between; }
.ticker-strip { padding: 18px 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.72rem; font-weight: 750; letter-spacing: 0.05em; }
.ticker-strip span:first-child, .ticker-strip span:last-child { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); }
.hero-card svg { display: block; width: 100%; height: auto; }
.hero-grid { fill: none; stroke: rgba(145, 160, 185, 0.1); stroke-width: 1; }
.hero-line { fill: none; stroke: var(--long); stroke-width: 5; filter: drop-shadow(0 0 8px rgba(54, 211, 153, 0.36)); }
.decision-preview { padding: 17px 22px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.72rem; font-weight: 760; letter-spacing: 0.04em; }
.decision-preview span:first-child { color: var(--long); }
.decision-preview span:last-child { color: var(--short); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 19px;
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.button:hover { transform: translateY(-1px); }
.button--primary { color: #07130f; background: var(--long); box-shadow: 0 12px 28px rgba(54, 211, 153, 0.16); }
.button--primary:hover { color: #07130f; background: #57e5ad; }
.button--secondary { color: var(--ink); border-color: var(--line); background: var(--surface); }
.button--secondary:hover { background: var(--surface-raised); }
.button--large { min-height: 52px; padding-inline: 27px; font-size: 1rem; }

.page-section, .page-shell, .game-shell { width: var(--page); margin: 0 auto; }
.page-section { padding: 110px 0; }
.page-shell { min-height: calc(100vh - 204px); padding: 78px 0 100px; }
.page-shell > h1 { max-width: 950px; margin-bottom: 22px; font-size: clamp(2.8rem, 5vw, 5.2rem); }
.narrow-shell { max-width: 700px; }
.lede { max-width: 760px; color: var(--muted); font-size: 1.15rem; }

.how-it-works { border-top: 1px solid var(--line); }
.how-it-works h2 { max-width: 720px; }
.steps { margin-top: 58px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.steps article { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(14, 23, 40, 0.76); }
.steps article > span { color: var(--accent); font: 700 0.72rem ui-monospace, monospace; }
.steps h3 { margin: 35px 0 10px; }
.steps p { margin: 0; color: var(--muted); }

.balance-card { margin: 30px 0; padding: 24px; display: grid; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.balance-card span, .balance-card small { color: var(--muted); }
.balance-card strong { font-size: 2rem; }

.content-shell { width: min(1040px, calc(100vw - 40px)); margin: 0 auto; padding: 72px 0 110px; }
.content-shell--short { min-height: calc(100vh - 204px); }
.content-hero { max-width: 820px; margin: 0 auto 36px; }
.content-hero h1 { margin-bottom: 16px; font-size: clamp(3.1rem, 7vw, 6.4rem); }
.content-hero > p:not(.eyebrow) { max-width: 720px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); }
.content-hero small { color: var(--faint); }
.prose-card { max-width: 820px; margin: 0 auto; }
.prose-card > section { padding: 34px 0; border-top: 1px solid var(--line); }
.prose-card h2 { margin-bottom: 20px; font-size: clamp(1.75rem, 3vw, 2.6rem); }
.prose-card h3 { margin: 26px 0 8px; color: var(--ink); }
.prose-card p, .prose-card li { color: var(--muted); font-size: 1.02rem; line-height: 1.75; }
.prose-card a { color: var(--ink); }
.content-callout { margin: 8px 0 38px; padding: 28px 30px; border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line)); border-radius: var(--radius); background: linear-gradient(135deg, rgba(243, 201, 95, 0.08), rgba(54, 211, 153, 0.04)); }
.content-callout h2 { font-size: 1.35rem; }
.content-callout p:last-child { margin-bottom: 0; }
.numbered-sections { counter-reset: legal-section; }
.numbered-sections > section { position: relative; padding-left: 58px; counter-increment: legal-section; }
.numbered-sections > section::before { content: counter(legal-section); position: absolute; top: 39px; left: 0; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); font-weight: 750; }
.contact-card { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(14, 23, 40, 0.68); }
.contact-link { color: var(--long) !important; font-size: clamp(1.2rem, 3vw, 1.7rem); font-weight: 750; }
.history-timeline { margin-top: 28px; border-left: 1px solid var(--line); }
.history-timeline > div { position: relative; padding: 0 0 28px 30px; }
.history-timeline > div::before { content: ""; position: absolute; top: 7px; left: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--long); box-shadow: 0 0 0 5px var(--canvas); }
.history-timeline time { color: var(--accent); font-weight: 780; }
.history-timeline p { margin: 5px 0 0; }
.content-cta { padding-top: 36px; text-align: center; }
.content-cta p { color: var(--ink); font-size: 1.25rem; }

.gameplay-page { height: 100svh; min-height: 0; overflow: hidden; }
.gameplay-page .site-footer { display: none; }
.gameplay-page .flash { position: fixed; top: 76px; left: 50%; z-index: 20; transform: translateX(-50%); }
.game-shell { height: calc(100svh - 72px); padding: 12px 0 14px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; overflow: hidden; }
.round-heading { margin: 0 auto; max-width: 900px; text-align: center; }
.round-heading h1 { margin-bottom: 4px; font-size: clamp(1.45rem, 3.2vh, 2.45rem); }
.round-heading > p:last-child { margin: 0; color: var(--muted); font-size: clamp(0.78rem, 1.65vh, 0.98rem); line-height: 1.35; }
.result-heading > p:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.market-chart { min-height: 0; margin: 0; overflow: hidden; background: transparent; }
.market-chart svg { display: block; width: 100%; height: 100%; }
.chart-gridline { stroke: rgba(145, 160, 185, 0.15); stroke-width: 1; }
.chart-axis-label, .chart-date-label, .entry-label { fill: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.chart-watermark { fill: rgba(145, 160, 185, 0.065); font-size: 42px; font-weight: 800; letter-spacing: 0.04em; }
.candle line { stroke-width: 1.25; }
.candle--up line, .candle--up rect { stroke: var(--long); fill: var(--long); }
.candle--down line, .candle--down rect { stroke: var(--short); fill: var(--short); }
.entry-marker { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 5; }
.entry-label { fill: var(--accent); font-weight: 760; }

.trade-actions { margin: 0 auto; width: min(100%, 820px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.trade-actions form, .trade-actions form > div { display: contents; }
.trade-button { position: relative; min-height: clamp(66px, 11vh, 94px); display: grid; place-items: center; align-content: center; gap: 0; border: 1px solid var(--line); border-radius: 14px; background: rgba(14, 23, 40, 0.84); cursor: pointer; transition: transform 120ms ease, border-color 120ms ease, background 120ms ease; }
.trade-button:hover { transform: translateY(-2px); background: var(--surface-raised); }
.trade-button > span { font-size: 1.2rem; }
.trade-button strong { font-size: 0.95rem; }
.trade-button small { color: var(--muted); font-size: 0.72rem; }
.trade-button--long { color: var(--long); }
.trade-button--long:hover { border-color: var(--long-dark); }
.trade-button--short { color: var(--short); }
.trade-button--short:hover { border-color: var(--short-dark); }
.trade-button--none { color: var(--ink); }
.shortcut-key, .inline-shortcut { border: 1px solid var(--line-strong); border-radius: 5px; background: rgba(5, 11, 22, 0.72); color: var(--muted); font: 700 0.68rem/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08); }
.shortcut-key { position: absolute; top: 8px; right: 8px; min-width: 20px; padding: 4px 5px; text-align: center; }
.inline-shortcut { display: inline-block; margin-left: 7px; padding: 4px 5px; vertical-align: 1px; }
.next-action { margin: 0; text-align: center; }

.milestone-modal {
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 100;
  width: min(560px, calc(100vw - 30px));
  max-height: calc(100svh - 30px);
  margin: 0;
  padding: clamp(28px, 5vw, 48px);
  transform: translate(-50%, -50%);
  overflow: hidden;
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--long) 42%, var(--line));
  border-radius: 24px;
  background: linear-gradient(150deg, #15253d, #0b1322 70%);
  box-shadow: 0 0 0 100vmax rgba(2, 6, 14, 0.84), 0 36px 100px rgba(0, 0, 0, 0.6);
  text-align: center;
}
.milestone-modal h2 { position: relative; margin: 8px 0 16px; font-size: clamp(2.15rem, 6vw, 3.8rem); }
.milestone-modal > p { position: relative; color: var(--muted); }
.milestone-modal strong { color: var(--long); }
.modal-kicker { color: var(--accent) !important; font-weight: 760; }
.modal-note { font-size: 0.9rem; }
.modal-actions { position: relative; margin-top: 26px; display: flex; justify-content: center; gap: 10px; }
.modal-actions form { margin: 0; }
.milestone-glow { position: absolute; width: 260px; height: 260px; top: -170px; left: 50%; transform: translateX(-50%); border-radius: 50%; background: rgba(54, 211, 153, 0.28); filter: blur(42px); }

.asset-list { margin-top: 44px; border-top: 1px solid var(--line); }
.asset-list-header, .asset-row { display: grid; grid-template-columns: minmax(250px, 1.4fr) minmax(260px, 1.25fr) minmax(90px, 0.45fr) minmax(90px, 0.45fr); gap: 20px; align-items: center; }
.asset-list-header { padding: 12px 18px; color: var(--faint); font-size: 0.76rem; }
.asset-row { min-height: 82px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.asset-row:hover { background: rgba(20, 32, 54, 0.42); }
.asset-row > div { display: grid; gap: 2px; }
.asset-row small { display: none; color: var(--faint); }
.asset-row span { color: var(--muted); font-size: 0.9rem; }
.asset-name strong { color: var(--accent); font: 780 1rem ui-monospace, monospace; }
.asset-name span { color: var(--ink); }

.leaderboard-page > .lede { margin-bottom: 48px; }
.leaderboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.leaderboard-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(14, 23, 40, 0.72); }
.leaderboard-heading { padding: 24px; display: flex; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.leaderboard-heading span { color: var(--accent); font-size: 0.75rem; font-weight: 750; }
.leaderboard-heading h2 { margin: 4px 0 0; font-size: 1.75rem; }
.leaderboard-heading p { max-width: 180px; margin: 0; color: var(--muted); font-size: 0.8rem; text-align: right; }
.score-list { margin: 0; padding: 0; list-style: none; }
.score-list li { min-height: 68px; padding: 12px 20px; display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; border-bottom: 1px solid rgba(36, 51, 77, 0.72); }
.score-list li:last-child { border-bottom: 0; }
.score-rank { color: var(--faint); font: 760 0.85rem ui-monospace, monospace; }
.score-list li:nth-child(-n+3) .score-rank { color: var(--accent); }
.score-player { display: grid; font-weight: 700; }
.score-player small { color: var(--faint); font-weight: 500; }
.score-list li > strong { color: var(--long); font-size: 1.02rem; }
.empty-board { min-height: 230px; padding: 38px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-board p { color: var(--muted); }

.account-page { padding-top: 56px; }
.account-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding-bottom: 32px; }
.account-hero h1 { margin: 0 0 4px; font-size: clamp(2.4rem, 5vw, 4.5rem); }
.account-hero p:last-child { margin: 0; color: var(--muted); }
.account-avatar { display: grid; width: 70px; height: 70px; place-items: center; border: 1px solid var(--line); border-radius: 20px; color: var(--accent); background: var(--surface); font-size: 1.8rem; font-weight: 800; }
.account-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.account-stats > div { padding: 22px; display: grid; gap: 3px; }
.account-stats > div + div { border-left: 1px solid var(--line); }
.account-stats span { color: var(--muted); font-size: 0.8rem; }
.account-stats strong { font-size: 1.5rem; }
.account-layout { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr); gap: 54px; align-items: start; }
.account-section, .account-settings { min-width: 0; }
.section-heading { margin-bottom: 22px; display: flex; justify-content: space-between; gap: 18px; align-items: end; }
.section-heading h2 { margin: 0; font-size: 2rem; }
.section-heading .eyebrow { margin-bottom: 6px; }
.game-history-list { border-top: 1px solid var(--line); }
.game-history-list article { padding: 17px 12px; display: grid; grid-template-columns: minmax(150px, 1fr) repeat(3, minmax(95px, 0.7fr)); gap: 18px; align-items: center; border-bottom: 1px solid var(--line); }
.game-history-list article > div { display: grid; }
.game-history-list span, .game-history-list small { color: var(--faint); font-size: 0.76rem; }
.game-history-list article > div:not(:first-child) strong { font-size: 0.92rem; }
.empty-copy { padding: 34px 0; color: var(--muted); }
.account-settings { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(14, 23, 40, 0.72); }
.settings-block { padding: 24px 0; border-top: 1px solid var(--line); }
.settings-block h3 { margin-bottom: 5px; }
.settings-block > p { color: var(--muted); font-size: 0.83rem; }
.compact-form { display: grid; gap: 9px; }
.cooldown-note { margin: 14px 0 0; padding: 12px; border-radius: 9px; background: rgba(243, 201, 95, 0.08); }
.form-errors { margin-bottom: 22px; padding: 16px 20px; border: 1px solid color-mix(in srgb, var(--short) 55%, var(--line)); border-radius: 12px; background: rgba(251, 113, 133, 0.08); }
.form-errors ul { margin-bottom: 0; }

.flash { width: var(--page); margin: 14px auto 0; padding: 11px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.flash--alert { border-color: color-mix(in srgb, var(--short) 55%, var(--line)); }
.flash--notice { border-color: color-mix(in srgb, var(--long) 55%, var(--line)); }

.auth-shell { width: var(--page); min-height: calc(100vh - 204px); margin: 0 auto; padding: 54px 0 80px; display: grid; place-items: start center; }
.auth-card { width: min(100%, 500px); padding: clamp(24px, 5vw, 40px); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(14, 23, 40, 0.92); box-shadow: 0 28px 70px rgba(0, 0, 0, 0.24); }
.auth-card--wide { width: min(100%, 620px); }
.auth-card h1 { margin-bottom: 18px; font-size: clamp(2.2rem, 5vw, 3.4rem); }
.auth-intro { margin-bottom: 20px; color: var(--muted); font-size: 0.9rem; }
.auth-card .actions { margin: 20px 0 14px; }
.auth-card .field input[type="checkbox"] + label { display: inline; margin-left: 6px; }
.auth-card > a { display: inline-block; margin: 4px 14px 0 0; color: var(--muted); font-size: 0.9rem; }
.auth-card br + a { margin-top: 8px; }
.auth-card em, .auth-card i { color: var(--faint); font-size: 0.8rem; }
#error_explanation { margin-bottom: 16px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--short) 52%, var(--line)); border-radius: 10px; background: rgba(251, 113, 133, 0.07); }
#error_explanation h2 { margin-bottom: 6px; font-size: 0.95rem; letter-spacing: 0; }
#error_explanation ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 0.8rem; }

.signup-page { height: 100svh; min-height: 0; overflow: hidden; }
.signup-page .site-footer { display: none; }
.signup-page .auth-shell { height: calc(100svh - 72px); min-height: 0; padding: 12px 0; place-items: center; overflow: hidden; }
.signup-page .auth-card { max-height: 100%; padding: 16px clamp(20px, 4vw, 34px); }
.signup-page .auth-card h1 { margin-bottom: 8px; font-size: clamp(1.85rem, 4.2vh, 2.7rem); }
.signup-page .auth-card .eyebrow { margin-bottom: 6px; }
.signup-page .auth-intro { margin-bottom: 12px; }
.signup-page form .field { margin-bottom: 9px; }
.signup-page label { margin-bottom: 3px; font-size: 0.78rem; }
.signup-page input[type="email"], .signup-page input[type="password"], .signup-page input[type="text"] { padding-block: 9px; }
.signup-page .auth-card .actions { margin: 13px 0 8px; }

.site-footer { width: var(--page); margin: 0 auto; padding: 28px 0 40px; display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.78rem; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }

form .field { margin-bottom: 16px; }
label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.88rem; }
input[type="email"], input[type="password"], input[type="text"] { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); outline: none; background: var(--surface); }
input:focus { border-color: color-mix(in srgb, var(--long) 64%, var(--line)); box-shadow: 0 0 0 3px rgba(54, 211, 153, 0.08); }
input[type="submit"] { min-height: 42px; padding: 10px 17px; border: 0; border-radius: 9px; color: #07130f; background: var(--long); font-weight: 750; cursor: pointer; }

@media (max-width: 980px) {
  .site-header { grid-template-columns: auto 1fr auto; }
  .site-nav { min-width: 0; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { max-width: 680px; }
  .hero-card { max-width: 680px; transform: none; }
  .steps { grid-template-columns: 1fr; }
  .leaderboard-grid { grid-template-columns: 1fr; }
  .account-layout { grid-template-columns: 1fr; gap: 40px; }
  .asset-list-header, .asset-row { grid-template-columns: minmax(220px, 1.2fr) minmax(240px, 1fr) 80px 80px; }
}

@media (max-width: 760px) {
  .site-header { gap: 12px; }
  .site-nav a:nth-child(1), .site-nav a:nth-child(2) { display: none; }
  .asset-list-header { display: none; }
  .asset-row { grid-template-columns: 1fr 1fr; gap: 12px 20px; }
  .asset-row small { display: block; }
  .account-stats { grid-template-columns: 1fr; }
  .account-stats > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .game-history-list article { grid-template-columns: 1fr 1fr; }
  .gameplay-page .brand > span { display: none; }
  .gameplay-page .site-header { grid-template-columns: auto 1fr auto; }
}

@media (max-width: 620px) {
  :root { --page: min(100% - 24px, 1180px); }
  .site-header { height: 62px; grid-template-columns: auto 1fr auto; }
  .brand-mark { width: 32px; height: 32px; }
  .site-nav { gap: 12px; font-size: 0.8rem; }
  .site-nav a:nth-child(3) { display: none; }
  .hero { padding: 52px 0 70px; }
  .hero h1 { font-size: 3.4rem; }
  .page-shell { padding: 58px 0 76px; }
  .page-section { padding: 74px 0; }
  .content-shell { width: min(100% - 28px, 1040px); padding: 56px 0 78px; }
  .content-hero { margin-bottom: 28px; }
  .content-callout { padding: 22px; }
  .numbered-sections > section { padding-left: 0; padding-top: 64px; }
  .numbered-sections > section::before { top: 22px; }
  .site-footer { flex-direction: column; }
  .site-footer nav { justify-content: flex-start; }
  .leaderboard-heading { display: block; }
  .leaderboard-heading p { margin-top: 9px; max-width: none; text-align: left; }
  .account-hero { grid-template-columns: auto 1fr; }
  .account-hero > form { grid-column: 1 / -1; }
  .account-avatar { width: 54px; height: 54px; border-radius: 15px; }
  .account-settings { padding: 20px; }
  .asset-row { padding-inline: 8px; }

  .gameplay-page .site-header { height: 62px; grid-template-columns: auto 1fr auto; gap: 8px; }
  .gameplay-page .site-nav a:not(.account-link) { display: none; }
  .gameplay-page .site-nav { font-size: 0.73rem; }
  .header-game-status { justify-content: center; gap: 8px; font-size: 0.68rem; }
  .header-game-status span { display: grid; gap: 0; }
  .header-game-status strong { font-size: 0.75rem; }
  .game-shell { height: calc(100svh - 62px); padding: 8px 0 10px; gap: 7px; }
  .round-heading h1 { font-size: clamp(1.22rem, 3.2vh, 1.72rem); }
  .round-heading > p:last-child { font-size: 0.72rem; }
  .market-chart svg { height: 100%; }
  .trade-actions { gap: 7px; }
  .trade-button { min-height: clamp(60px, 10vh, 76px); border-radius: 10px; }
  .trade-button small { display: none; }
  .next-action .button { min-height: 42px; }
  .result-heading > p:last-child { display: none; }
  .modal-actions { flex-direction: column; }
  .modal-actions .button, .modal-actions form { width: 100%; }

  .signup-page .site-header { height: 62px; }
  .signup-page .auth-shell { height: calc(100svh - 62px); }
  .signup-page .site-nav a:nth-child(3) { display: inline; }
  .signup-page .auth-card { padding: 16px 18px; }
  .signup-page .auth-intro { font-size: 0.78rem; }
}

@media (max-height: 700px) {
  .game-shell { padding-block: 6px 8px; gap: 5px; }
  .round-heading h1 { font-size: 1.35rem; }
  .round-heading > p:last-child { font-size: 0.72rem; }
  .trade-button { min-height: 60px; }
  .trade-button small { display: none; }
  .signup-page .auth-intro { display: none; }
  .signup-page .auth-card { padding-block: 13px; }
  .signup-page .auth-card h1 { font-size: 1.75rem; }
  .signup-page form .field { margin-bottom: 6px; }
  .signup-page input[type="email"], .signup-page input[type="password"], .signup-page input[type="text"] { padding-block: 7px; }
}
