:root {
  --bg: #121210;
  --card: #2c2c2a;
  --card2: #3a3a37;
  --line: #6a675f;
  --chalk: #f5efe0;
  --muted: #ada99e;
  --faint: #86827a;
  --clay: #ef9f27;
  --clay-ink: #412402;
  --gold: #ef9f27;
  --gold-bg: #ef9f27;
  --good: #a3c464;
  --bad: #e88d85;
  --ov: rgba(0, 0, 0, 0.34);
  --ov2: rgba(0, 0, 0, 0.45);
  --navbg: rgba(18, 18, 16, 0.97);
  --tint: rgba(245, 239, 224, 0.1);
  --line2: #78756c;
  --err-ink: #f6c3be;
  --warn-ink: #f6dca4;
  --on-good: #1a1a18;
  color-scheme: dark;
  --radius: 16px;
  --display: Rockwell, "Rockwell Nova", "Roboto Slab", "Arvo", Georgia, "Times New Roman", serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
:root[data-theme=light] {
  --bg: #fbf8f1;
  --card: #ffffff;
  --card2: #f5efe0;
  --line: #ded8c9;
  --chalk: #2c2c2a;
  --muted: #5f5e5a;
  --faint: #847f75;
  --clay: #ef9f27;
  --clay-ink: #412402;
  --gold: #9a5f0f;
  --gold-bg: #ef9f27;
  --good: #5f7a2b;
  --bad: #b3322a;
  --ov: rgba(44, 44, 42, 0.05);
  --ov2: rgba(44, 44, 42, 0.09);
  --navbg: rgba(251, 248, 241, 0.96);
  --tint: rgba(44, 44, 42, 0.08);
  --line2: rgba(44, 44, 42, 0.18);
  --err-ink: #7a1d14;
  --warn-ink: #5c3d00;
  --on-good: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme=dark]) {
    --bg: #fbf8f1;
    --card: #ffffff;
    --card2: #f5efe0;
    --line: #ded8c9;
    --chalk: #2c2c2a;
    --muted: #5f5e5a;
    --faint: #847f75;
    --clay: #ef9f27;
    --clay-ink: #412402;
    --gold: #9a5f0f;
    --gold-bg: #ef9f27;
    --good: #5f7a2b;
    --bad: #b3322a;
    --ov: rgba(44, 44, 42, 0.05);
    --ov2: rgba(44, 44, 42, 0.09);
    --navbg: rgba(251, 248, 241, 0.96);
    --tint: rgba(44, 44, 42, 0.08);
    --line2: rgba(44, 44, 42, 0.18);
    --err-ink: #7a1d14;
    --warn-ink: #5c3d00;
    --on-good: #ffffff;
    color-scheme: light;
  }
}
.theme-btn { background: var(--ov); border: 1px solid var(--line); color: var(--chalk); width: 44px; height: 44px; border-radius: 50%; font-size: 1.15rem; cursor: pointer; flex: none; display: grid; place-items: center; }
html[data-theme=light] body, :root:not([data-theme=dark]) body { }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--chalk);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
  background-image: radial-gradient(1200px 400px at 50% -120px, rgba(239, 159, 39, 0.14), transparent 70%);
  background-repeat: no-repeat;
}
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: 0.01em; margin: 0; }
h2 { font-size: 1.5rem; line-height: 1.15; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 12px; }
a { color: var(--gold); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold-bg); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Header */
.top, main, #banner { max-width: 640px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.top { padding-top: calc(14px + env(safe-area-inset-top)); padding-bottom: 6px; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.brand .logo { width: 44px; height: 44px; flex: none; }
.brand .logo-light { display: none; }
.brand-text { display: grid; min-width: 0; }
.brand .h1 { font-family: var(--display); font-size: 1.45rem; line-height: 1.1; letter-spacing: 0.01em; }
html[data-theme=light] .brand .logo-light { display: block; } html[data-theme=light] .brand .logo-dark { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme=dark]) .brand .logo-light { display: block; } :root:not([data-theme=dark]) .brand .logo-dark { display: none; } }
.tag { color: var(--muted); font-size: 0.8rem; margin: 2px 0 0; }
.who {
  background: var(--card); color: var(--chalk); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 0.9rem; font-weight: 600;
  max-width: 38%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.progress { margin-top: 10px; }
.bar { height: 8px; border-radius: 999px; background: var(--card); overflow: hidden; border: 1px solid var(--line); }
.bar span { display: block; height: 100%; width: 0; background: var(--gold-bg); transition: width 0.4s; }
.progress p { font-size: 0.8rem; color: var(--muted); margin: 6px 0 0; }

main { padding-top: 14px; outline: none; }
#banner:empty { display: none; }
.notice {
  background: rgba(239, 159, 39, 0.12); border: 1px solid rgba(239, 159, 39, 0.45);
  border-radius: 12px; padding: 10px 14px; font-size: 0.9rem; margin-top: 10px;
}

/* Cards and layout */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px;
}
.card h3 { margin-bottom: 10px; }
.hero { padding: 24px 20px; background: linear-gradient(160deg, var(--card2), var(--card)); }
.hero h2 { font-size: 1.9rem; margin-bottom: 10px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; color: var(--gold); font-weight: 700; margin-bottom: 8px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }

/* Stat blocks */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 4px; }
.stats.four { grid-template-columns: repeat(4, 1fr); }
.stat { background: var(--ov); border: 1px solid var(--line); border-radius: 12px; padding: 12px 6px; text-align: center; min-width: 0; }
.stat b { display: block; font-family: var(--display); font-size: 1.35rem; font-weight: 400; color: var(--gold); line-height: 1.1; }
.stat span { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; }
.steps li::before {
  content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--clay); color: var(--clay-ink); font-weight: 800; display: grid; place-items: center;
}

/* Buttons */
.btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 800;
  background: var(--clay); color: var(--clay-ink); padding: 14px 20px; border-radius: 14px;
  min-height: 48px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: translateY(1px); }
.btn.block { display: flex; width: 100%; }
.btn.ghost { background: transparent; color: var(--chalk); border: 1px solid var(--line); font-weight: 700; }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid rgba(255, 139, 125, 0.5); }
.btn.small { min-height: 38px; padding: 8px 14px; font-size: 0.9rem; border-radius: 10px; }
.link { background: none; border: 0; color: var(--gold); font: inherit; text-decoration: underline; cursor: pointer; padding: 6px 2px; }

/* Forms */
label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=search], input[type=date], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--chalk);
  background: var(--ov); border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-height: 48px;
}
select option { color: #000; }
input::placeholder { color: var(--faint); }
.field { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { font-size: 0.82rem; color: var(--muted); margin-top: 6px; }
.error { background: rgba(255, 139, 125, 0.12); border: 1px solid rgba(255, 139, 125, 0.5); color: var(--err-ink); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 0.92rem; }
.error ul { margin: 0; padding-left: 18px; }

/* Segmented control */
.seg { display: flex; background: var(--ov2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.seg button { flex: 1; font: inherit; font-weight: 700; border: 0; background: transparent; color: var(--muted); padding: 10px 6px; border-radius: 9px; cursor: pointer; min-height: 44px; }
.seg button[aria-pressed=true] { background: var(--card2); color: var(--gold); box-shadow: inset 0 0 0 1px var(--line); }

/* Steppers */
.steppers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stepper { background: var(--ov); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.stepper label { margin: 0 0 6px; text-align: center; }
.stepper .ctl { display: grid; grid-template-columns: 44px 1fr 44px; gap: 6px; align-items: center; }
.stepper button { height: 44px; border: 0; border-radius: 10px; background: var(--card2); color: var(--chalk); font-size: 1.5rem; font-weight: 700; cursor: pointer; line-height: 1; }
.stepper button:active { background: var(--clay); color: var(--clay-ink); }
.stepper input { text-align: center; font-weight: 800; font-size: 1.2rem; padding: 6px; min-height: 44px; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper.wide { grid-column: 1 / -1; }

/* Stat tiles and tables */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { background: var(--ov); border: 1px solid var(--line); border-radius: 12px; padding: 10px 4px; text-align: center; min-width: 0; }
.tile b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.2rem; }
.tile.hl b { color: var(--gold); }
.tile span { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
table { border-collapse: collapse; width: 100%; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; position: sticky; left: 0; background: var(--card); }
th { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
.level { display: inline-block; font-size: 0.7rem; background: var(--card2); border: 1px solid var(--line); color: var(--gold); padding: 1px 8px; border-radius: 999px; margin-left: 6px; font-weight: 700; }

/* Chart */
.chart-wrap svg { width: 100%; height: auto; display: block; }
.chart-wrap .grid { stroke: var(--line); stroke-width: 1; }
.chart-wrap .line { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-wrap .dot { fill: var(--clay); }
.chart-wrap text { fill: var(--muted); font-size: 10px; font-family: var(--body); }

/* Path timeline */
.path { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.path li { position: relative; padding: 0 0 14px 16px; }
.path li::before { content: ""; position: absolute; left: -22px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--clay); border: 2px solid var(--bg); }
.path li:last-child { padding-bottom: 0; }
.path b { display: block; }

/* Game list */
.games { list-style: none; margin: 0; padding: 0; }
.games li { padding: 12px 0; border-top: 1px solid var(--line); }
.games li:first-child { border-top: 0; }
.games .meta { font-size: 0.82rem; color: var(--muted); }
.games .line { font-weight: 700; }
.pill { display: inline-block; font-size: 0.72rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; margin-right: 6px; background: var(--card2); }
.pill.W { color: var(--good); } .pill.L { color: var(--bad); } .pill.T { color: var(--gold); }

/* Badges */
.badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.badge { background: var(--ov); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; gap: 10px; align-items: flex-start; }
.badge .ic { font-size: 1.7rem; line-height: 1; filter: grayscale(1); opacity: 0.4; }
.badge.on { border-color: rgba(239, 159, 39, 0.6); background: rgba(239, 159, 39, 0.08); }
.badge.on .ic { filter: none; opacity: 1; }
.badge b { display: block; font-size: 0.92rem; }
.badge span { display: block; font-size: 0.78rem; color: var(--muted); }

/* Goals */
.goal { padding: 12px 0; border-top: 1px solid var(--line); }
.goal:first-child { border-top: 0; }
.goal .meter { height: 8px; border-radius: 999px; background: var(--ov2); overflow: hidden; margin: 8px 0 4px; }
.goal .meter span { display: block; height: 100%; background: var(--clay); }
.goal.met .meter span { background: var(--good); }

/* Bottom tabs */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center;
  background: var(--navbg); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  flex: 1; max-width: 128px; text-decoration: none; color: var(--muted); display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 9px 4px 8px; font-size: 0.7rem; font-weight: 700; min-height: 56px;
}
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs a[aria-current=page] { color: var(--gold); }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); z-index: 50; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto; }
.modal h3 { font-size: 1.3rem; margin-bottom: 10px; }
.modal .actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.modal .actions .btn { flex: 1; }
.celebrate { text-align: center; font-size: 2.6rem; margin-bottom: 4px; }
.earned { background: rgba(239, 159, 39, 0.1); border: 1px solid rgba(239, 159, 39, 0.5); border-radius: 12px; padding: 10px 12px; margin-top: 10px; font-weight: 700; }
textarea.copybox { min-height: 120px; resize: vertical; }

.footer { text-align: center; color: var(--muted); font-size: 0.78rem; padding: 6px 0 12px; }
.empty { text-align: center; padding: 26px 10px; color: var(--muted); }
.empty .big { font-size: 2.2rem; }

@media (min-width: 560px) {
  .hero h2 { font-size: 2.2rem; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .badges { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Share cards */
.share-canvas { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); margin: 4px 0 14px; display: block; background: #1a1a18; }
.check { display: flex; gap: 10px; align-items: center; font-size: 0.92rem; color: var(--chalk); font-weight: 600; margin-bottom: 12px; }
.check input { width: 22px; height: 22px; accent-color: var(--clay); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { background: var(--ov); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 0.85rem; }

/* ===== Printable sheets ===== */
@page land { size: landscape; margin: 0.5in; }
.tips { padding-left: 18px; margin: 12px 0 8px; }
.sheets { margin: 0 auto; width: max-content; max-width: none; }
.paper {
  background: #fff; color: #111; width: 7.5in; margin: 0 0 18px; padding: 0.3in; border-radius: 6px;
  font: 12px/1.25 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}
.paper.land { width: 10in; page: land; }
.ps-head { display: flex; align-items: flex-end; gap: 18px; border-bottom: 3px solid #111; padding-bottom: 6px; margin-bottom: 8px; }
.ps-title { font-weight: 900; font-size: 19px; letter-spacing: 0.04em; white-space: nowrap; }
.ps-title small { display: block; font-size: 10px; letter-spacing: 0.14em; font-weight: 700; color: #444; }
.ps-grow { flex: 1; }
.ps-f > span { display: block; font-size: 8.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #444; }
.ps-line { border-bottom: 1.5px solid #111; min-height: 0.3in; font-size: 14px; font-weight: 700; padding: 3px 4px 0; display: flex; align-items: flex-end; }
.ps-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 14px; margin-bottom: 6px; }
.ps-info.four { grid-template-columns: repeat(4, 1fr); }
.ps-h { font: 900 12px/1 system-ui, sans-serif; letter-spacing: 0.1em; margin: 9px 0 5px; padding: 3px 6px; background: #111; color: #fff; border-radius: 3px; }
.ps-h small { font-weight: 500; letter-spacing: 0; font-size: 9.5px; margin-left: 8px; opacity: 0.9; }
.ps-ab { display: flex; align-items: center; gap: 8px; height: 0.37in; border-bottom: 1px solid #999; }
.ps-n { width: 0.26in; height: 0.26in; border: 1.5px solid #111; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 11px; flex: none; }
.ps-in { width: 0.5in; height: 0.27in; border: 1.5px solid #111; border-radius: 4px; position: relative; flex: none; }
.ps-in em { position: absolute; top: -7px; left: 4px; background: #fff; padding: 0 2px; font: 700 8px/1 system-ui, sans-serif; font-style: normal; color: #444; }
.ps-opts { display: flex; gap: 5px; flex-wrap: nowrap; flex: 1; align-items: center; }
.ps-opts i { font-style: normal; font-weight: 800; font-size: 10.5px; border: 1.5px solid #111; border-radius: 999px; min-width: 0.33in; padding: 2px 5px; text-align: center; }
.ps-line .ps-opts { padding-bottom: 3px; }
.ps-sub { font: 800 9px/1 system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.08em; color: #444; margin: 8px 0 3px; }
.ps-boxes { display: flex; gap: 5px; }
.ps-bw { flex: 1; min-width: 0; }
.ps-box { border: 2px solid #111; border-radius: 6px; height: 0.52in; }
.ps-lab { text-align: center; line-height: 1.1; margin-top: 2px; }
.ps-lab b { display: block; font-size: 11px; }
.ps-lab span { display: block; font-size: 7px; color: #444; white-space: nowrap; overflow: hidden; }
.ps-row { display: flex; gap: 12px; align-items: flex-end; }
.ps-narrow { width: 3.6in; flex: none; }
.ps-note { font-size: 9px; color: #333; margin: 5px 0 0; }
.ps-lines div { border-bottom: 1px solid #777; height: 0.3in; }
.ps-foot { margin-top: 8px; padding-top: 5px; border-top: 1px dashed #777; font-size: 8.5px; color: #333; text-align: center; }
.ps-grid { width: 100%; border-collapse: collapse; table-layout: fixed; margin-top: 4px; }
.ps-grid th, .ps-grid td { border: 1.5px solid #111; height: 0.36in; text-align: center; padding: 0; background: #fff; position: static; white-space: normal; color: #111; }
.ps-grid thead th { background: #111; color: #fff; font-size: 10px; height: 0.3in; letter-spacing: 0.04em; }
.ps-grid th:first-child { width: 0.3in; background: #eee; color: #111; font-size: 10px; }
.ps-grid thead th:first-child { background: #111; color: #fff; }
.ps-grid .wd { width: 0.95in; }
.ps-grid .ps-tot td, .ps-grid .ps-tot th { background: #eee; font-weight: 800; font-size: 10px; }

@media print {
  @page { margin: 0.5in; }
  html, body { background: #fff !important; color: #000 !important; padding: 0 !important; margin: 0 !important; }
  body { background-image: none !important; }
  .top, #banner, .tabs, #modal-root, .noprint, .skip, noscript { display: none !important; }
  main { max-width: none !important; padding: 0 !important; margin: 0 !important; }
  .sheets { zoom: 1 !important; width: auto !important; margin: 0 !important; }
  .paper { width: 100% !important; margin: 0 !important; padding: 0 !important; border-radius: 0 !important; box-shadow: none !important; break-after: page; page-break-after: always; }
  .paper:last-child { break-after: auto; page-break-after: auto; }
  .ps-h, .ps-grid thead th, .ps-title { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Rule hints, live summary, soft warnings */
.error.warn { background: rgba(239, 159, 39, 0.12); border-color: rgba(239, 159, 39, 0.55); color: var(--warn-ink); }
.live { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--ov); border: 1px dashed var(--line); font-size: 0.88rem; color: var(--gold); font-weight: 600; }

/* By-inning fielding rows */
.fi-row { background: var(--ov); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.fi-top { display: grid; grid-template-columns: 0.8fr 1.4fr auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.fi-top .field { margin: 0; }
.fi-x { align-self: end; min-height: 48px; }
.steppers.three { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.steppers.three .stepper { padding: 8px 6px; }
.steppers.three .ctl { grid-template-columns: 1fr 1fr; gap: 6px; }
.steppers.three .ctl input { grid-column: 1 / -1; order: -1; }
.steppers.three .stepper button { height: 40px; }
.ps-inn { margin-top: 2px; }
.ps-inn th, .ps-inn td { height: 0.255in; }
.ps-inn thead th { height: 0.22in; }
.ps-inn th.wd { width: 2in; }
h3.sub-h { font-size: 1rem; margin: 14px 0 8px; color: var(--gold); }

/* identity, PIN, terms */
.pid { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.08em; color: var(--gold); font-weight: 700; }
.recovery { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.6rem; letter-spacing: 0.1em; text-align: center; color: var(--gold); background: var(--ov2); border-radius: 14px; padding: 16px 8px; margin: 12px 0; user-select: all; }
.pin-opt { margin: 4px 0 14px; }
.pin-opt summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.check.agree { align-items: flex-start; font-weight: 500; }
.check.agree span { line-height: 1.4; }
.player-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.player-pick small { font-weight: 500; opacity: 0.8; font-size: 0.78rem; }
.terms h4 { margin: 14px 0 4px; font-size: 1rem; }
.terms p, .terms li { line-height: 1.5; }
.terms ul, .terms ol { padding-left: 1.2rem; margin: 6px 0; }
.terms li { margin-bottom: 6px; }
.footer a { color: inherit; text-decoration: underline; }

/* Game IQ simulator */
.sb { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; align-items: center; background: var(--ov2); border-radius: 12px; padding: 8px 12px; font-size: 0.9rem; margin: 4px 0 10px; }
.sb b { color: var(--gold); }
.outs { display: inline-flex; align-items: center; gap: 5px; }
.outs span { margin-left: 4px; }
.out { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--muted); display: inline-block; }
.out.on { background: var(--clay); border-color: var(--clay); }
.diamond { display: block; width: 100%; max-width: 360px; margin: 0 auto; }
.diamond .grass { fill: #2f6a2c; }
.diamond .dirt { fill: #94623a; }
.diamond .turf { fill: #2f6a2c; }
.diamond .mound { fill: #a8764a; }
.diamond .chalk { stroke: rgba(244,241,232,0.7); stroke-width: 1.5; }
.diamond .bag { fill: #f4f1e8; stroke: #1b2c18; stroke-width: 1; }
.diamond .plate { fill: #f4f1e8; stroke: #1b2c18; stroke-width: 1; }
.diamond .runner { fill: var(--clay); stroke: #1d0f07; stroke-width: 1.5; }
.diamond .you { fill: rgba(239,159,39,0.15); stroke: var(--gold); stroke-width: 3; }
.sim-q { font-family: var(--body); font-weight: 700; font-size: 1.08rem; line-height: 1.4; margin: 12px 0; letter-spacing: 0; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; min-height: 56px; padding: 12px 14px; border-radius: 14px; border: 2px solid rgba(244,241,232,0.2); background: var(--ov); color: var(--chalk); font: inherit; cursor: pointer; }
.opt b { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--tint); display: grid; place-items: center; font-size: 0.85rem; }
.opt span { line-height: 1.35; padding-top: 3px; }
.opt:not(:disabled):active { transform: scale(0.99); border-color: var(--gold); }
.opt:disabled { cursor: default; color: var(--chalk); opacity: 1; }
.opt.right { border-color: var(--good); background: rgba(94,190,120,0.18); }
.opt.right b { background: var(--good); color: var(--on-good); }
.opt.wrong { border-color: #e0685a; background: rgba(224,104,90,0.16); }
.opt.wrong b { background: #e0685a; color: #1d0f07; }
.opt:disabled:not(.right):not(.wrong) { opacity: 0.55; }
.feedback { margin-top: 14px; border-radius: 14px; padding: 14px; border: 2px solid var(--good); background: rgba(94,190,120,0.1); }
.feedback.bad { border-color: #e0685a; background: rgba(224,104,90,0.09); }
.feedback p { margin: 8px 0; line-height: 1.45; }
.feedback .best { font-weight: 700; color: var(--gold); }
.feedback .tipline { color: var(--gold); font-weight: 600; }
.dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); display: inline-block; }
.dot.cur { border-color: var(--gold); }
.dot.ok { background: var(--good); border-color: var(--good); }
.dot.no { background: #e0685a; border-color: #e0685a; }
.cats { display: grid; gap: 10px; }
.cat { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--ov); color: var(--chalk); font: inherit; text-align: left; cursor: pointer; }
.cat b, .cat .muted { display: block; }
.cat-ic { font-size: 1.5rem; }
.cat-go { font-size: 1.6rem; color: var(--muted); }
.rank { display: flex; gap: 12px; align-items: center; margin-top: 14px; }
.rank-ic { font-size: 2rem; }
.recap { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.recap li { display: flex; gap: 12px; align-items: flex-start; }
.recap .mark { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; }
.recap .ok .mark { background: var(--good); color: var(--on-good); }
.recap .no .mark { background: #e0685a; color: #1d0f07; }
.tabs a span { font-size: 0.66rem; }
.rank .meter { height: 8px; border-radius: 999px; background: var(--ov2); overflow: hidden; margin: 8px 0 4px; }
.rank .meter span { display: block; height: 100%; background: var(--clay); }
.rank .grow { min-width: 0; }
.cat .grow { min-width: 0; }
.edit-bar { border-color: var(--gold); }

/* ---- Learn, directory and Content Studio ---- */
a.link { color: var(--gold); text-decoration: none; font-weight: 700; display: inline-block; padding: 6px 0; }
.chip { color: var(--chalk); font: inherit; font-size: 0.85rem; }
button.chip { cursor: pointer; min-height: 36px; }
button.chip.on { background: var(--gold-bg); color: #412402; border-color: var(--gold); font-weight: 700; }
a.cat { text-decoration: none; color: inherit; }
.article h2 { margin-bottom: 10px; }
.article p, .article li { line-height: 1.55; }
.article ul { padding-left: 20px; }
.article h4 { margin: 18px 0 6px; color: var(--gold); }
.gloss dt { font-weight: 800; margin-top: 12px; }
.gloss dd { margin: 2px 0 0; color: var(--muted); line-height: 1.45; }
.listing h3 { margin: 4px 0; }
.svc { margin: 8px 0; padding-left: 20px; }
.ansset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; margin: 0 0 14px; }
.ansset legend { padding: 0 6px; font-weight: 700; }
.ansrow { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.ansrow input[type=text] { flex: 1; min-width: 0; }
.ansrow input[type=radio] { width: 22px; height: 22px; flex: none; accent-color: var(--gold); }
.qblock { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.check.inline { display: inline-flex; margin: 0 10px 0 0; }
.srows { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.srows li { display: grid; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.srows li:last-child { border-bottom: 0; padding-bottom: 0; }
.srows li.dim b { opacity: 0.55; }
.steps.small li { font-size: 0.9rem; }

html[data-theme=light] body { background-image: radial-gradient(1200px 400px at 50% -120px, rgba(239, 159, 39, 0.16), transparent 70%); }
@media (prefers-color-scheme: light) { :root:not([data-theme=dark]) body { background-image: radial-gradient(1200px 400px at 50% -120px, rgba(239, 159, 39, 0.16), transparent 70%); } }

/* Dark mode: clearer separation between page, cards and controls */
:root:not([data-theme=light]) .card, :root:not([data-theme=light]) .notice { box-shadow: 0 1px 0 rgba(245, 239, 224, 0.06) inset, 0 6px 16px rgba(0, 0, 0, 0.45); border-width: 1.5px; }
@media (prefers-color-scheme: light) { :root:not([data-theme=dark]) .card, :root:not([data-theme=dark]) .notice { box-shadow: none; border-width: 1px; } }
html[data-theme=light] .card, html[data-theme=light] .notice { box-shadow: none; border-width: 1px; }
