:root {
  --page: #f7f7f5;
  --surface: #ffffff;
  --surface-soft: #f0f2ef;
  --ink: #171918;
  --muted: #666c68;
  --faint: #8b918d;
  --line: #d9ddd9;
  --line-strong: #bcc3bd;
  --green: #2f654a;
  --green-dark: #234d39;
  --green-soft: #e7f0ea;
  --gold: #946824;
  --gold-soft: #f6eddc;
  --blue: #3d6682;
  --blue-soft: #e8f0f5;
  --red: #934b42;
  --red-soft: #f7e9e7;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 24px rgba(23, 25, 24, .07);
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: var(--sans);
  --content: 1280px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--page); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, select, input { font: inherit; }
button { color: inherit; }
img { max-width: 100%; }

.app-shell { min-height: 100vh; }
.topbar {
  min-height: 68px;
  padding: 12px max(20px, calc((100vw - var(--content)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 245, .96);
  backdrop-filter: blur(10px);
}
.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.brand-copy strong {
  display: block;
  font-size: 16px;
  line-height: 1.1;
  font-weight: 750;
  letter-spacing: -.02em;
}
.brand-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}
.top-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}
.top-nav-button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.top-nav-button:hover { background: var(--surface-soft); color: var(--ink); }
.source-note {
  margin-left: 10px;
  color: var(--faint);
  font-size: 11px;
  white-space: nowrap;
}

.app {
  width: min(var(--content), 100%);
  margin: 0 auto;
  padding: 48px 24px 80px;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 14px;
  max-width: 900px;
  font-family: var(--sans);
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.02;
  font-weight: 760;
  letter-spacing: -.04em;
}
h2 {
  margin-bottom: 10px;
  font-family: var(--sans);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.1;
  font-weight: 740;
  letter-spacing: -.03em;
}
h3 {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 720;
}
.eyebrow {
  margin: 0 0 9px;
  color: var(--green);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.lede {
  max-width: 740px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.7vw, 18px);
  line-height: 1.65;
}

.message-card {
  max-width: 720px;
  margin: min(12vh, 100px) auto 0;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.home-intro { max-width: 820px; }

.set-bar {
  margin: 32px 0 22px;
  padding: 16px 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.select,
.player-name-edit input,
.account-form input {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  outline: none;
}
.select {
  min-width: 190px;
  min-height: 42px;
  padding: 9px 36px 9px 12px;
}
.select:focus,
.player-name-edit input:focus,
.account-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.set-meta { margin: 0; color: var(--faint); font-size: 12px; text-align: right; }

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.mode-card {
  position: relative;
  min-width: 0;
  min-height: 340px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(23,25,24,.03);
}
.mode-card.featured { border-color: #aab9ae; }
.mode-number {
  position: absolute;
  top: 24px;
  right: 26px;
  color: #c4c9c5;
  font-size: 34px;
  line-height: 1;
  font-weight: 760;
  letter-spacing: -.05em;
}
.mode-topline {
  width: calc(100% - 54px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mode-topline .eyebrow { margin-bottom: 0; }
.mode-card p:not(.eyebrow) { max-width: 520px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.mode-points {
  margin: 8px 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
}
.mode-points li { display: flex; gap: 8px; align-items: flex-start; }
.mode-points li::before { content: "•"; color: var(--green); }
.mode-card .button { margin-top: auto; }
.best-chip,
.streak-chip,
.milestone-chip,
.grade-badge,
.new-best,
.verdict {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  white-space: nowrap;
}
.best-chip {
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
}
.best-chip strong { color: var(--ink); font-size: 11px; }

.data-note {
  margin-top: 20px;
  padding: 16px 0;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.data-note strong { color: var(--ink); }

.button {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 750;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button.primary { border: 1px solid var(--green-dark); background: var(--green); color: #fff; }
.button.primary:hover:not(:disabled) { background: var(--green-dark); }
.button.secondary { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.button.secondary:hover:not(:disabled) { border-color: #8f9791; background: var(--surface-soft); }
.share-button { border: 1px solid #a9c0b0; background: var(--green-soft); color: var(--green-dark); }
.share-button:hover:not(:disabled) { border-color: var(--green); background: #dbeadf; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.text-button {
  border: 0;
  background: transparent;
  padding: 8px 0;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-button:hover { color: var(--ink); }

.daily-card {
  margin: 0 0 22px;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 28px;
  align-items: center;
  border: 1px solid #d4c6a9;
  border-radius: var(--radius);
  background: #fbf7ed;
}
.daily-copy h2 { margin: 8px 0 10px; }
.daily-copy p { max-width: 680px; margin-bottom: 0; color: var(--muted); line-height: 1.6; }
.daily-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #6c501f;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.streak-chip, .milestone-chip {
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid #d6c49f;
  background: rgba(255,255,255,.72);
  color: #6c501f;
  font-size: 10px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}
.milestone-row { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.daily-actions { display: grid; gap: 9px; align-content: center; }
.daily-actions > small { color: var(--muted); font-size: 10px; text-align: center; }
.daily-mode {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #d2c5aa;
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
}
.daily-mode:hover:not(:disabled) { border-color: #9f9278; transform: translateY(-1px); }
.daily-mode span { font-weight: 750; }
.daily-mode strong { color: var(--green); font-size: 11px; }
.daily-mode:disabled { opacity: .5; }

.game-heading {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}
.game-heading h1 { max-width: 860px; }
.game-heading.compact h1 { font-size: clamp(32px, 4vw, 46px); }
.game-instruction { margin: 0; max-width: 660px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.progress-track { height: 4px; margin: -8px 0 22px; background: #e7eae7; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); transition: width .18s ease; }

.pack-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.card-choice {
  position: relative;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  overflow: visible;
}
.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 63 / 88;
  overflow: hidden;
  border: 1px solid #cdd2ce;
  border-radius: 9px;
  background: #e6e8e5;
  transition: transform .12s ease, box-shadow .12s ease, outline-color .12s ease;
}
.card-choice:hover:not(:disabled) .card-image-wrap { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(23,25,24,.12); }
.card-choice.selected .card-image-wrap,
.card-choice.ranked-choice .card-image-wrap { outline: 3px solid var(--green); outline-offset: 2px; }
.card-choice.consensus .card-image-wrap { box-shadow: 0 0 0 3px var(--gold-soft); }
.card-choice:disabled { cursor: default; }
.card-image { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; }
.card-art-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  color: #777d79;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}
.user-rank-badge,
.consensus-badge {
  position: absolute;
  z-index: 2;
  top: 8px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.user-rank-badge { left: 8px; background: var(--green); color: #fff; }
.consensus-badge { right: 8px; border: 1px solid #cfad72; background: var(--gold-soft); color: #65491b; }
.card-footer { min-height: 54px; padding: 9px 2px 0; }
.card-footer strong { display: block; font-size: 12px; line-height: 1.35; }
.card-footer span { display: block; margin-top: 3px; color: var(--faint); font-size: 10px; line-height: 1.35; }

.action-dock {
  position: sticky;
  bottom: 14px;
  z-index: 10;
  margin: 24px auto 0;
  max-width: 780px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.action-dock div { min-width: 0; }
.action-dock strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.action-dock span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.inline-dock { max-width: none; }

.reveal-panel,
.pick-feedback,
.scorecard {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(23,25,24,.03);
}
.reveal-panel { padding: 30px; }
.reveal-heading,
.feedback-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.score-stamp {
  min-width: 108px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  text-align: center;
}
.score-stamp strong { display: block; font-size: 30px; line-height: 1; font-weight: 760; }
.score-stamp span { color: var(--muted); font-size: 10px; }
.top3-comparison { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 26px; margin-top: 20px; }
.rank-row {
  min-height: 44px;
  display: grid;
  grid-template-columns: 28px minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.rank-row > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); font-size: 11px; font-weight: 800; }
.rank-row strong { font-size: 13px; }
.rank-row small { color: var(--muted); font-size: 11px; }
.reveal-note { margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.full-pack-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 24px; align-items: start; }
.study-main { min-width: 0; }
.replay-sidebar { position: sticky; top: 18px; }
.sidebar-card { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.sidebar-card + .sidebar-card { margin-top: 12px; }
.sidebar-card.quiet { background: transparent; }
.sidebar-card.quiet p { margin-bottom: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.pool-list { display: grid; }
.pool-item { min-height: 34px; display: flex; justify-content: space-between; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.pool-item:last-child { border-bottom: 0; }
.empty-note { color: var(--muted); font-size: 12px; line-height: 1.55; }

.pick-feedback { padding: 20px; }
.pick-feedback h2 { margin-bottom: 0; font-size: 28px; }
.verdict { padding: 7px 9px; font-size: 10px; font-weight: 800; }
.verdict.consensus { background: var(--green-soft); color: var(--green-dark); }
.verdict.close { background: var(--blue-soft); color: var(--blue); }
.verdict.reasonable { background: var(--gold-soft); color: #6c4d1f; }
.verdict.miss { background: var(--red-soft); color: var(--red); }
.feedback-grid {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 1px;
  margin-top: 18px;
  border: 1px solid var(--line);
  background: var(--line);
  overflow: hidden;
  border-radius: 9px;
}
.feedback-grid > div { padding: 12px; background: var(--surface); }
.feedback-grid span { display: block; color: var(--muted); font-size: 10px; }
.feedback-grid strong { display: block; margin-top: 4px; font-size: 12px; line-height: 1.4; }

.score-hero {
  margin: 8px 0 24px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}
.score-orb,
.pick-score {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  align-content: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: var(--surface);
}
.score-orb { width: 108px; height: 108px; }
.score-orb strong { font-size: 44px; line-height: .9; font-weight: 780; letter-spacing: -.04em; }
.score-orb span { margin-top: 5px; font-size: 10px; font-weight: 750; }
.pick-score { width: 70px; height: 70px; }
.pick-score strong { font-size: 27px; line-height: .9; font-weight: 780; }
.pick-score span { margin-top: 3px; font-size: 9px; font-weight: 750; }
.score-copy h2 { margin: 6px 0 4px; }
.score-copy p { margin: 0; color: var(--muted); font-size: 12px; }
.grade-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.grade-badge, .new-best { min-height: 26px; padding: 5px 9px; font-size: 11px; font-weight: 800; }
.grade-badge { background: var(--ink); color: #fff; }
.new-best { border: 1px solid #d4b879; background: var(--gold-soft); color: #6b4b18; }
.score-high { color: var(--green); }
.score-mid { color: var(--gold); }
.score-low { color: var(--red); }
.result-actions { align-items: center; }
.result-lede { margin-top: 4px; }

.scorecard { max-width: 920px; margin: 28px auto 0; padding: 36px; }
.summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 28px 0; }
.summary-stat { padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.summary-stat strong { display: block; font-size: 31px; line-height: 1; font-weight: 760; letter-spacing: -.03em; }
.summary-stat span { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.review-section { margin-top: 30px; }
.review-section h2 { font-size: 27px; }
.miss-list { border-top: 1px solid var(--line); }
.miss-row { min-height: 56px; display: grid; grid-template-columns: 72px minmax(0,1fr) auto; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); }
.pick-number { color: var(--green); font-size: 11px; font-weight: 750; }
.miss-row strong { display: block; font-size: 13px; }
.miss-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.gap-number { min-width: 34px; color: var(--ink); font-size: 12px; font-weight: 750; text-align: right; }
.gap-number::after { content: "/100"; margin-left: 2px; color: var(--faint); font-size: 9px; font-weight: 600; }
.method-details { margin-top: 24px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.method-details summary { cursor: pointer; color: var(--ink); font-weight: 700; }
.method-details p { margin: 8px 0 0; }

.challenge-status { margin: 16px 0 4px; padding: 10px 12px; border-radius: 8px; font-size: 12px; line-height: 1.45; }
.challenge-status.pending { background: var(--blue-soft); color: var(--blue); }
.challenge-status.saved { background: var(--green-soft); color: var(--green-dark); }
.challenge-status.practice { border: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); }
.challenge-callout {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid #d5c19d;
  border-radius: 10px;
  background: #fbf7ed;
}
.challenge-callout span { color: var(--gold); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.challenge-callout strong { font-size: 16px; font-weight: 730; }
.challenge-callout em { color: var(--muted); font-size: 10px; font-weight: 700; font-style: normal; text-transform: uppercase; letter-spacing: .06em; }
.challenge-return { order: -1; }
.friend-comparison {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}
.friend-comparison > span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.friend-comparison > div { display: grid; grid-template-columns: minmax(0,1fr) auto auto minmax(0,1fr) auto; gap: 10px; align-items: baseline; }
.friend-comparison strong:nth-of-type(2) { text-align: right; }
.friend-comparison b { font-size: 28px; line-height: 1; }
.friend-comparison i { color: var(--faint); font-size: 10px; font-style: normal; text-transform: uppercase; }
.friend-comparison p { margin: 12px 0 0; color: var(--muted); }
.bold-take,
.community-panel { margin-top: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.bold-take { display: grid; gap: 3px; }
.bold-take span, .bold-take small { color: var(--muted); font-size: 12px; }
.bold-take strong { font-size: 15px; }
.community-panel h3 { margin: 2px 0 12px; }
.community-bars { display: grid; gap: 10px; }
.community-bars > div { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 10px; padding-bottom: 7px; overflow: hidden; }
.community-bars i { position: absolute; bottom: 0; left: 0; height: 3px; border-radius: 999px; background: var(--green); }
.versus-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin: 16px 0 20px; }
.versus-score > div { padding: 16px; border: 1px solid var(--line); border-radius: 10px; text-align: center; background: var(--surface); }
.versus-score span { display: block; color: var(--muted); font-size: 12px; }
.versus-score strong { font-size: 34px; line-height: 1.1; }
.versus-score b { color: var(--muted); font-size: 10px; letter-spacing: .1em; }

.leaderboard-shell,
.growth-page { max-width: 1080px; margin: 0 auto; }
.leaderboard-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.leaderboard-heading .lede { max-width: 760px; }
.leaderboard-toolbar {
  margin: 28px 0 16px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.period-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.period-tab { border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 9px 11px; color: var(--muted); font-weight: 700; cursor: pointer; }
.period-tab.active { border-color: var(--line-strong); background: var(--surface-soft); color: var(--ink); }
.leaderboard-filters { display: flex; gap: 10px; }
.leaderboard-filters label { display: grid; gap: 4px; }
.leaderboard-filters label > span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.leaderboard-filters .select { min-width: 140px; }
.player-card {
  margin-bottom: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}
.player-card span, .player-card small { display: block; color: var(--muted); font-size: 10px; }
.player-card strong { display: block; margin: 3px 0; font-size: 14px; }
.player-name-edit { display: flex; gap: 8px; }
.player-name-edit input { min-width: 190px; padding: 9px 10px; }
.leaderboard-content { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.leaderboard-loading, .leaderboard-empty { padding: 42px 24px; text-align: center; color: var(--muted); }
.leaderboard-empty strong { display: block; max-width: 680px; margin: 0 auto 6px; color: var(--ink); }
.leaderboard-empty span { display: block; font-size: 12px; }
.leaderboard-table-wrap { overflow-x: auto; }
.leaderboard-table { width: 100%; min-width: 680px; border-collapse: collapse; }
.leaderboard-table th, .leaderboard-table td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: right; font-size: 12px; }
.leaderboard-table th { background: var(--surface-soft); color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.leaderboard-table th:nth-child(2), .leaderboard-table td:nth-child(2) { text-align: left; }
.leaderboard-table td:first-child, .leaderboard-table th:first-child { width: 70px; text-align: center; }
.leaderboard-table tr:last-child td { border-bottom: 0; }
.leaderboard-table tr.is-me td { background: var(--green-soft); }
.leaderboard-table td strong { font-size: 13px; }
.leaderboard-table td small { margin-left: 7px; color: var(--green-dark); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.rank-cell { color: var(--muted); font-weight: 800; }
.points-cell { font-size: 18px !important; font-weight: 760; }
.leaderboard-note { margin: 0; padding: 11px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }

.growth-page { padding-bottom: 44px; }
.growth-page > header { margin-bottom: 24px; }
.growth-page > header h1 { margin-bottom: 12px; }
.growth-page > header p:last-child { max-width: 680px; color: var(--muted); line-height: 1.6; }
.stat-scoreboard { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 32px; }
.stat-scoreboard > div { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.stat-scoreboard span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.stat-scoreboard strong { display: block; margin-top: 8px; font-size: clamp(30px,5vw,46px); line-height: 1; font-weight: 780; letter-spacing: -.04em; }
.stats-split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 32px; }
.stats-split > div, .recent-games, .account-columns { min-width: 0; }
.stats-split h2, .recent-games h2, .account-columns h2 { margin: 0 0 12px; font-size: 24px; }
.stats-split table { width: 100%; border-collapse: collapse; font-size: 12px; }
.stats-split th, .stats-split td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.stats-split th { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.stats-split th:first-child, .stats-split td:first-child { text-align: left; }
.recent-games { margin-bottom: 28px; }
.recent-games ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.recent-games li { display: grid; grid-template-columns: minmax(0,1fr) 72px 110px; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.recent-games li strong { text-align: right; font-size: 24px; line-height: 1; font-weight: 760; }
.recent-games li em { text-align: right; color: var(--muted); font-size: 10px; font-style: normal; text-transform: uppercase; letter-spacing: .06em; }
.account-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 20px; }
.account-columns > div { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.account-form { display: grid; gap: 12px; }
.account-form label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.account-form input { width: 100%; min-height: 42px; padding: 9px 11px; text-transform: none; letter-spacing: 0; }
.form-error { min-height: 1.2em; color: var(--red); font-size: 12px; }
.account-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.account-note { margin-top: 18px; max-width: 620px; color: var(--muted); }

@media (max-width: 1180px) {
  .pack-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
}
@media (max-width: 920px) {
  .app { padding-top: 36px; }
  .mode-grid, .full-pack-layout, .daily-card { grid-template-columns: 1fr; }
  .replay-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .sidebar-card + .sidebar-card { margin-top: 0; }
  .pack-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .feedback-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .summary-grid, .stat-scoreboard { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stats-split, .account-columns { grid-template-columns: 1fr; }
  .leaderboard-toolbar, .player-card { align-items: stretch; flex-direction: column; }
  .leaderboard-filters { width: 100%; }
  .leaderboard-filters label { flex: 1; }
  .leaderboard-filters .select { width: 100%; }
  .player-name-edit { width: 100%; }
  .player-name-edit input { flex: 1; min-width: 0; }
}
@media (max-width: 680px) {
  .topbar { min-height: 60px; padding: 10px 14px; gap: 12px; align-items: flex-start; }
  .brand-mark { width: 36px; height: 36px; border-radius: 9px; }
  .brand-copy small, .source-note { display: none; }
  .top-actions { gap: 1px; }
  .top-nav-button { min-height: 34px; padding: 7px 6px; font-size: 11px; }
  .app { padding: 28px 14px 64px; }
  h1 { font-size: clamp(34px,11vw,44px); }
  h2 { font-size: 25px; }
  .set-bar { align-items: stretch; flex-direction: column; gap: 12px; }
  .set-meta { text-align: left; }
  .select { width: 100%; min-width: 0; }
  .mode-card { min-height: 0; padding: 22px; }
  .mode-number { top: 20px; right: 20px; font-size: 28px; }
  .mode-topline { width: calc(100% - 46px); }
  .data-note { grid-template-columns: 1fr; gap: 6px; }
  .daily-card { padding: 20px; }
  .game-heading { display: block; }
  .game-heading .text-button { margin-bottom: 10px; }
  .pack-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 10px; }
  .top3-comparison, .replay-sidebar { grid-template-columns: 1fr; }
  .action-dock { bottom: 8px; align-items: stretch; flex-direction: column; }
  .action-dock .button { width: 100%; }
  .reveal-panel, .scorecard { padding: 20px; }
  .score-hero { align-items: flex-start; padding: 16px; gap: 14px; }
  .score-orb { width: 86px; height: 86px; }
  .score-orb strong { font-size: 36px; }
  .score-copy h2 { font-size: 24px; }
  .feedback-title { align-items: center; }
  .pick-score { width: 60px; height: 60px; }
  .summary-grid, .stat-scoreboard { grid-template-columns: 1fr 1fr; }
  .miss-row { grid-template-columns: 54px minmax(0,1fr) auto; gap: 8px; }
  .leaderboard-heading { display: block; }
  .leaderboard-heading .text-button { margin-bottom: 10px; }
  .leaderboard-filters, .player-name-edit { flex-direction: column; }
  .account-columns > div { padding: 18px; }
  .recent-games li { grid-template-columns: minmax(0,1fr) 50px 78px; }
  .challenge-callout { grid-template-columns: 1fr; gap: 6px; }
  .challenge-callout em { display: none; }
  .friend-comparison > div { grid-template-columns: 1fr auto auto; }
  .friend-comparison > div strong:nth-of-type(2), .friend-comparison > div b:nth-of-type(2) { grid-row: 2; }
  .friend-comparison > div strong:nth-of-type(2) { grid-column: 1; text-align: left; }
  .friend-comparison > div b:nth-of-type(2) { grid-column: 2; }
  .friend-comparison i { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
}
@media (max-width: 390px) {
  .brand-copy strong { font-size: 15px; }
  .top-nav-button { padding-inline: 5px; }
  .stat-scoreboard > div, .summary-stat { padding: 14px; }
}
