:root {
  color-scheme: light;
  --bg: #eef2eb;
  --bg-soft: #f6f8f4;
  --panel: #ffffff;
  --surface: #f8faf7;
  --ink: #152019;
  --muted: #5f6d64;
  --line: #d5ddd6;
  --line-strong: #c3cec5;
  --accent: #0f6b52;
  --accent-soft: #e3f2eb;
  --green: #0f6b52;
  --green-soft: #e3f2eb;
  --red: #c53b2c;
  --red-soft: #fff1ee;
  --amber: #9a6408;
  --shadow-sm: 0 1px 2px rgba(21, 32, 25, 0.05);
  --shadow: 0 8px 24px rgba(21, 32, 25, 0.07);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --touch: 44px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: pretty; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: max(12px, env(safe-area-inset-left));
  top: max(12px, env(safe-area-inset-top));
  z-index: 40;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

main {
  scroll-margin-top: 88px;
}

.metric-card strong,
.data-chip strong,
.visitor-stats strong,
.record-table td,
.pick-method-rate strong,
.stats-impact-schedule strong {
  font-variant-numeric: tabular-nums;
}

button,
a,
select,
input,
summary {
  touch-action: manipulation;
}

a { color: inherit; }

/* ── Top bar ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 20px;
  padding: 16px max(16px, calc((100vw - 1440px) / 2 + 16px));
  padding-top: max(16px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: var(--shadow-sm);
}

.topbar > .brand-home {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 0 1 auto;
  max-width: calc(100% - 180px);
}

.brand-home {
  display: block;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand-home:hover .eyebrow,
.brand-home:focus-visible .eyebrow {
  color: var(--accent-strong, #0f766e);
}

.brand-home:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 8px;
}

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1 {
  margin-top: 4px;
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.site-nav {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  flex-shrink: 0;
  position: relative;
  z-index: 6;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.site-nav a.active {
  background: #fff;
  color: var(--green);
  box-shadow: var(--shadow-sm);
}

.topbar-center-wrap {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
  width: clamp(72px, 18vw, 140px);
  z-index: 5;
}

.topbar-center-hit {
  width: 100%;
  height: 100%;
  min-height: 44px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: default;
  opacity: 0;
}

.topbar-center-hit.is-admin {
  opacity: 0.08;
  background: rgba(127, 209, 173, 0.12);
}

.topbar-center-hit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  opacity: 0.16;
  background: rgba(127, 209, 173, 0.16);
}

.admin-login-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  min-width: 220px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-md);
  gap: 8px;
  grid-template-columns: 1fr auto auto;
  align-items: center;
}

.admin-login-panel.is-open {
  display: grid;
}

.admin-bottom-access {
  position: relative;
  width: 96px;
  height: 22px;
  margin: 0 auto 8px;
  z-index: 20;
}

.admin-bottom-access .topbar-center-hit,
.admin-bottom-access .topbar-center-hit.is-admin,
.admin-bottom-access .topbar-center-hit:focus-visible {
  width: 100%;
  height: 100%;
  min-height: 0;
  opacity: 0;
  background: transparent;
}

.admin-bottom-access .admin-login-panel {
  top: auto;
  bottom: calc(100% + 8px);
}

.admin-login-panel input {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.85rem;
}

.admin-login-submit,
.admin-login-cancel {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.admin-login-submit {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  width: 100%;
  flex: 1 1 100%;
}

.toolbar label {
  min-width: 0;
}

.toolbar label select,
.toolbar label input[type="date"] {
  display: block;
  width: 100%;
  min-width: 0;
  height: var(--touch);
  min-height: var(--touch);
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

.toolbar-date {
  grid-column: 1 / -1;
}

input[type="date"] {
  text-align: left;
}

input[type="date"]::-webkit-date-and-time-value {
  min-height: 1em;
  text-align: left;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.55;
  cursor: pointer;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

select,
input[type="date"],
input:not([type="hidden"]) {
  width: 100%;
  min-height: var(--touch);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: border-color 0.15s, box-shadow 0.15s;
}

select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 107, 82, 0.16);
}

.odds-panel {
  position: relative;
  min-width: 110px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.odds-panel[open] { min-width: 230px; }
.odds-panel label { margin-top: 10px; }

/* ── Layout ── */
.app-shell {
  width: min(1440px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px 0 calc(48px + env(safe-area-inset-bottom));
}

.status {
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

.status.is-loading {
  border-color: #b9dcc8;
  background: #f8fcfa;
  color: var(--ink);
}

.status.is-loading::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid #d5e8de;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

.status.warning {
  color: var(--amber);
  border-color: #ead4a8;
  background: #fffaf0;
}

.app-shell.is-page-loading #status {
  margin-bottom: 12px;
}

.app-shell.is-page-loading .pick-history {
  display: none;
}

.page-boot-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: clamp(180px, 32vh, 280px);
  padding: 28px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.page-boot-state-compact {
  min-height: clamp(140px, 24vh, 220px);
}

.page-boot-state.is-error {
  border-color: #ebc8c0;
  background: #fff7f5;
}

.page-boot-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #d5e8de;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

.page-boot-text {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
}

.page-boot-state .note {
  margin: 0;
  max-width: 28em;
}

.is-loading-placeholder {
  display: none;
}

.game-feed { display: grid; gap: 14px; }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.panel h3 {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

/* ── Pick history ── */
.pick-history {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 14px;
}

.pick-history:empty {
  display: none;
  margin: 0;
}

.pick-history-quick,
.pick-history-archive {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pick-history-quick:empty,
.pick-history-archive:empty {
  display: none;
}

body.detail-mode .pick-history-quick {
  border-left: 3px solid rgba(168, 85, 247, 0.45);
  padding-left: 10px;
}

.pick-history-dates {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0;
  padding: 2px 0 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.pick-history-dates::-webkit-scrollbar { display: none; }

.pick-history-dates button {
  flex: 0 0 auto;
  min-height: var(--touch);
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.pick-history-dates button.active {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.daily-top-picks {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.top-pick-block h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.top-pick-block .note { margin: 0; }

.top-pick-table-wrap {
  border: 0;
  border-radius: var(--radius-sm);
  background: #fff;
}

.top-pick-table {
  min-width: 0;
  width: 100%;
}

.top-pick-table th,
.top-pick-table td {
  padding: 10px 8px;
  font-size: 0.78rem;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}

.top-pick-table th.rank,
.top-pick-table td.rank,
.top-pick-table th.num,
.top-pick-table td.num {
  width: 52px;
  text-align: center;
  white-space: nowrap;
}

.top-pick-table td.num { font-weight: 800; color: var(--accent); }

.top-pick-table tbody tr:last-child td { border-bottom: 0; }

.confidence-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.confidence-table-block h4 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.stats-confidence { margin-bottom: 14px; }

.stats-confidence-block + .stats-confidence-block {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.confidence-panel .confidence-tables { margin-top: 12px; }

.guest-comments {
  margin-bottom: 14px;
  position: relative;
}

.guest-comment-form {
  display: grid;
  gap: 12px;
  margin: 12px 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.guest-comment-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.guest-comment-form input,
.guest-comment-form textarea {
  width: 100%;
  min-height: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  resize: vertical;
}

.guest-comment-form textarea { min-height: 96px; }

.guest-comment-form button {
  justify-self: start;
  min-height: var(--touch);
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.guest-comment-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.guest-comment-list {
  display: grid;
  gap: 10px;
}

.guest-comment {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.guest-comment-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.guest-comment-headline {
  align-items: center;
}

.guest-comment-head-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.comment-admin-trigger {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(120, 120, 120, 0.12);
  color: transparent;
  font-size: 0;
  line-height: 0;
  opacity: 0.18;
  cursor: pointer;
}

.comment-admin-trigger:hover,
.comment-admin-trigger:focus-visible {
  opacity: 0.55;
  background: rgba(15, 118, 110, 0.18);
}

.comment-admin-login {
  display: none;
  position: absolute;
  right: 10px;
  bottom: 24px;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
  z-index: 5;
}

.comment-admin-login.is-open {
  display: inline-flex;
}

.comment-admin-login input {
  width: 72px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.comment-admin-login-submit,
.comment-admin-login-cancel {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 0.72rem;
  cursor: pointer;
}

.comment-admin-login-submit {
  color: var(--accent);
  border-color: rgba(15, 118, 110, 0.25);
}

.comment-admin-logout {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.72rem;
  cursor: pointer;
}

.guest-comment-delete {
  margin-left: auto;
  padding: 2px 8px;
  border: 1px solid rgba(180, 35, 24, 0.18);
  border-radius: 999px;
  background: #fff;
  color: #b42318;
  font-size: 0.72rem;
  cursor: pointer;
}

.guest-comment-delete:hover,
.guest-comment-delete:focus-visible {
  background: #fff5f5;
}

.guest-comment-head strong {
  font-size: 0.84rem;
}

.guest-comment-head time {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.guest-comment-ip {
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.guest-comment p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.guest-comment-empty { margin-top: 4px; }

.guest-comment-count {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
}

/* ── Reel card (1080x1920 export) ── */
.reel-page {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #111814;
}

.reel-card {
  width: 1080px;
  height: 1920px;
  padding: 74px 72px 68px;
  background: #111d17;
  color: #fff;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.reel-brand {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #86d6b2;
}

.reel-card h1 {
  margin: 24px 0 0;
  font-size: 76px;
  line-height: 1.12;
  letter-spacing: 0;
}

.reel-card h1 em {
  color: #86d6b2;
  font-style: normal;
}

.reel-kicker {
  margin: 18px 0 0;
  color: #aab8b0;
  font-size: 25px;
  font-weight: 800;
}

.reel-hook {
  margin: 20px 0 28px;
  color: #d9e3dd;
  font-size: 31px;
  font-weight: 800;
}

.reel-proof {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  margin-bottom: 34px;
  border: 1px solid #3b4e43;
  border-left: 8px solid #d7a93b;
  border-radius: 8px;
  background: #1a2921;
  overflow: hidden;
}

.reel-proof div {
  padding: 26px 30px 18px;
}

.reel-proof div + div {
  border-left: 1px solid #3b4e43;
}

.reel-proof span,
.reel-proof strong {
  display: block;
}

.reel-proof span {
  color: #aab8b0;
  font-size: 22px;
  font-weight: 800;
}

.reel-proof strong {
  margin-top: 5px;
  color: #fff;
  font-size: 58px;
  font-variant-numeric: tabular-nums;
}

.reel-proof p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px 30px;
  border-top: 1px solid #3b4e43;
  color: #d7a93b;
  font-size: 22px;
  font-weight: 800;
}

.reel-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}

.reel-section-head span {
  color: #86d6b2;
  font-size: 24px;
  font-weight: 900;
}

.reel-section-head strong {
  color: #aab8b0;
  font-size: 22px;
}

.reel-picks {
  display: grid;
  gap: 14px;
}

.reel-pick {
  padding: 24px 28px;
  border: 1px solid #3b4e43;
  border-radius: 8px;
  background: #1b2c23;
}

.reel-pick-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reel-rank,
.reel-league-badge,
.reel-result {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 18px;
  font-weight: 900;
}

.reel-rank { background: #d7a93b; color: #172018; }
.reel-league-badge { background: #334b65; color: #dcecff; }
.reel-result { margin-left: auto; background: #3a4240; color: #dce2de; }
.reel-result.win { background: #165f48; color: #d7fff0; }

.reel-matchup {
  margin: 17px 0 5px;
  color: #aab8b0;
  font-size: 23px;
  font-weight: 700;
}

.reel-selection {
  display: block;
  font-size: 42px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.reel-pick-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 1px solid #3b4e43;
}

.reel-pick-metrics span {
  padding-top: 14px;
  color: #aab8b0;
  font-size: 21px;
}

.reel-pick-metrics b {
  margin-left: 7px;
  color: #fff;
  font-size: 25px;
}

.reel-tease {
  margin-top: 26px;
  padding: 22px 26px;
  border: 1px solid #5b4772;
  border-radius: 8px;
  background: #241f2c;
}

.reel-tease span {
  display: block;
  color: #c8a9ea;
  font-size: 18px;
  font-weight: 900;
}

.reel-tease strong {
  display: block;
  margin-top: 7px;
  font-size: 28px;
}

.reel-tease p {
  margin: 7px 0 0;
  color: #c5bacf;
  font-size: 20px;
  line-height: 1.4;
}

.reel-empty {
  padding: 32px;
  border: 1px solid #3b4e43;
  color: #aab8b0;
  font-size: 24px;
}

.reel-foot {
  margin: auto 0 0;
  padding-top: 22px;
  border-top: 1px solid #3b4e43;
  font-size: 25px;
  font-weight: 800;
  color: #86d6b2;
  text-align: center;
}

.reel-error {
  margin: auto;
  font-size: 40px;
  text-align: center;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.subheading {
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.cumulative-panel {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.cumulative-panel.sub-panel {
  padding-top: 16px;
}

.cumulative-note { margin-bottom: 8px; }
.cumulative-note strong { color: var(--ink); }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.metric-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.metric-card {
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-width: 0;
}

.metric-card span,
.metric-card em {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
}

.metric-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.metric-card em { margin-top: 4px; line-height: 1.35; }

.profit-pos { color: var(--accent); }
.profit-neg { color: var(--red); }

.profit-plain {
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.profit-plain strong {
  display: block;
  font-size: 0.98rem;
  line-height: 1.45;
}

.profit-plain p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.profit-plain-win { background: #edf7f1; border-color: #b9dcc8; }
.profit-plain-win strong { color: #0b674d; }
.profit-plain-loss { background: #fff3f0; border-color: #ebc8c0; }
.profit-plain-loss strong { color: #a33b2c; }

.yield-explainer {
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid #d7e4dc;
  border-radius: var(--radius);
  background: #f7fbf8;
}

.yield-explainer h4 {
  margin: 0 0 10px;
  color: #0b674d;
  font-size: 0.86rem;
}

.yield-explainer ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.65;
}

.yield-explainer li + li { margin-top: 6px; }
.yield-explainer strong { color: var(--ink); }

.daily-record {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.daily-record .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.daily-record-table-wrap {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  max-height: min(70vh, 720px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.daily-record-scroll-hint {
  display: none;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.daily-record-table {
  min-width: 760px;
}

.pick-cell-pick {
  min-width: 118px;
  white-space: normal;
  word-break: keep-all;
  line-height: 1.35;
}

.pick-cell-match {
  min-width: 168px;
  white-space: normal;
  word-break: keep-all;
  line-height: 1.35;
}

.pick-conf {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
  vertical-align: middle;
}

.daily-record-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f7f5;
  box-shadow: inset 0 -1px 0 var(--line);
}

.daily-record-table td.num,
.daily-record-table th.num {
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.daily-record-table .result-tag {
  font-size: 0.72rem;
  min-height: 24px;
  padding: 0 8px;
}

.untracked-row td {
  color: var(--muted);
  background: #fafafa;
}

.stats-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.stats-version-analysis {
  margin-bottom: 16px;
}

.stats-subhead {
  margin: 18px 0 8px;
  font-size: 0.92rem;
}

.stats-winner-note strong {
  color: var(--accent);
}

.stats-compare-table td.num,
.stats-compare-table th.num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.detail-list { margin-top: 10px; }

.record-archive {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.record-day {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}

.record-day summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  list-style: none;
  min-height: var(--touch);
}

.record-day summary::-webkit-details-marker { display: none; }

.record-day summary::before {
  content: "▸";
  margin-right: 8px;
  color: var(--muted);
}

.record-day[open] summary::before { content: "▾"; }

.record-day-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
}

.record-day-meta > span {
  color: var(--ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.record-day-meta small {
  color: var(--muted);
  font-size: 0.68rem;
  white-space: nowrap;
}

.record-scroll-hint {
  display: none;
  margin: 0;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: #f7faf8;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: center;
}

.record-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  border-top: 1px solid var(--line);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--accent) #e8eeea;
}

.record-table { min-width: 820px; }

.record-table th,
.record-table td {
  font-size: 0.76rem;
  padding: 10px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.highlight-row { background: #f7fbf8; }

.result-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.result-tag.win { background: var(--accent-soft); color: var(--accent); }
.result-tag.loss { background: var(--red-soft); color: var(--red); }
.result-tag.pending { background: var(--surface); color: var(--muted); }
.result-tag.void { background: #eef1ed; color: #78827c; }

.stat-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
}

.stat-line:first-of-type { border-top: 0; }
.stat-line span:last-child { text-align: right; font-weight: 800; }
.stat-line-stack { flex-wrap: wrap; }

.stat-line-detail {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 12px;
  margin: 0 -4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.stat-line-detail + .stat-line-detail { margin-top: 8px; }

.stat-line-detail .stat-primary {
  font-weight: 800;
  line-height: 1.4;
  font-size: 0.88rem;
}

.stat-line-detail .stat-primary em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 0.76rem;
  font-weight: 700;
}

.stat-line-detail .stat-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  text-align: left;
}

/* ── Stats dashboard ── */
.stats-overview { margin-bottom: 14px; }

.stats-today-stats {
  margin-bottom: 14px;
}

.stats-today-stats .stats-today-grid {
  margin-top: 4px;
}

.stats-today-version-list {
  display: grid;
  gap: 16px;
}

.stats-today-version {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft, #f7f9f8);
}

.stats-today-version.standard {
  border-left: 4px solid var(--green);
}

.stats-today-version.detail {
  border-left: 4px solid var(--amber);
}

.stats-today-version-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.stats-today-version-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.stats-today-version-head > span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.stats-today-card {
  border-top-color: var(--amber);
}

.stats-today-card .stats-league-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .stats-today-version-list {
    gap: 12px;
  }

  .stats-today-version {
    padding: 10px;
  }

  .stats-today-version-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .stats-today-card .stats-league-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Progressive analysis rendering: keep off-screen cards cheap on long mobile lists. */
.analysis-mode .game-card {
  content-visibility: auto;
  contain-intrinsic-size: 300px;
  scroll-margin-top: 12px;
}

.analysis-mode .game-card:first-child,
.analysis-mode .game-card:focus-within {
  content-visibility: visible;
  contain-intrinsic-size: auto;
}

.record-table .pick-cell-match,
.daily-record-table .pick-cell-match {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
  white-space: nowrap;
  overflow-wrap: normal;
}

.daily-record-table-wrap,
.record-archive .record-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: min(62vh, 560px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

@media (max-width: 720px) {
  .analysis-mode .game-feed {
    gap: 10px;
  }

  .analysis-mode .game-card {
    contain-intrinsic-size: 250px;
  }

  .analysis-mode .game-card.is-collapsed {
    contain-intrinsic-size: 150px;
  }

  .analysis-mode .game-card-head-actions {
    align-self: stretch;
  }

  .analysis-mode .game-card-toggle {
    min-height: 44px;
    touch-action: manipulation;
  }

  .record-day summary {
    align-items: flex-start;
    padding: 12px;
  }

  .record-day-date {
    flex: 0 0 auto;
    padding-top: 2px;
  }

  .record-day-meta {
    flex: 1;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    text-align: right;
  }

  .record-scroll-hint {
    display: block;
  }

  .record-archive .record-table-wrap {
    max-height: min(58vh, 440px);
    overflow: auto;
    touch-action: pan-x pan-y;
  }

  .daily-record-table-wrap {
    max-height: min(58vh, 440px);
    overflow: auto;
    overflow-x: auto;
    overflow-y: auto;
    touch-action: pan-x pan-y;
  }

  .record-archive .record-table th:first-child,
  .record-archive .record-table td:first-child,
  .record-archive .record-table thead th:first-child {
    position: static;
    left: auto;
    z-index: auto;
    background: inherit;
    box-shadow: none;
  }

  .record-archive .pick-cell-match {
    width: 88px;
    min-width: 88px;
    max-width: 88px;
    white-space: nowrap;
  }

  .daily-record-table .pick-cell-match {
    width: 88px;
    min-width: 88px;
    max-width: 88px;
  }
}

.stats-league-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stats-league-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 16px;
  box-shadow: none;
}

.stats-league-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 12px;
}

.stats-league-head h2 {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.stats-league-head span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.stats-league-metrics { display: grid; gap: 8px; }

.stats-metric {
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.stats-metric span,
.stats-metric em {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
}

.stats-metric strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.stats-metric em { margin-top: 4px; }

.stats-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  margin-top: 10px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.stats-best-days { margin-bottom: 14px; }

.stats-league-days {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.stats-league-days h3 {
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.stats-day-list { display: grid; gap: 8px; }

.stats-day-row {
  display: grid;
  grid-template-columns: 110px 70px repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: inherit;
  text-decoration: none;
  font-size: 0.8rem;
  transition: border-color 0.15s, background 0.15s;
}

.stats-day-row:active {
  background: var(--green-soft);
  border-color: #abd2c3;
}

.stats-day-date { font-weight: 900; }

.stats-day-meta {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.stats-day-row strong { color: var(--ink); }

/* ── Game cards ── */
.game-card {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.game-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.game-card-head-main {
  min-width: 0;
  flex: 1 1 auto;
}

.game-card-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.game-time {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.game-card h2 {
  margin-top: 6px;
  font-size: clamp(1.05rem, 4.2vw, 1.3rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.venue {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-live { background: var(--red-soft); color: var(--red); }
.badge-final { background: #eef1ed; color: #4d5a52; }
.badge-void { background: #fff8e8; color: var(--amber); }

.game-card-summary {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.game-card.is-collapsed .game-card-summary {
  display: grid;
}

.summary-pick-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(29, 42, 36, 0.06);
}

.summary-pick-chip.main {
  border-color: #e5c8c2;
  background: linear-gradient(180deg, #fff9f7 0%, #fff 100%);
}

.summary-pick-chip.sub {
  border-color: #cfe4d9;
  background: linear-gradient(180deg, #f7fcf9 0%, #fff 100%);
}

.summary-pick-label {
  display: none;
}

.summary-pick-type {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.summary-pick-chip strong {
  display: block;
  margin-top: 0;
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.35;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.summary-pick-meta {
  display: none;
}

.summary-pick-chip .result-tag {
  justify-self: end;
  white-space: nowrap;
}

.game-card-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: var(--touch);
  padding: 0 16px;
  border: 1px solid #bfd8ca;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8f5 100%);
  color: #1f5f49;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 18px rgba(31, 95, 73, 0.10);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.game-card-toggle:hover {
  border-color: #9cc7b2;
  box-shadow: 0 10px 20px rgba(31, 95, 73, 0.14);
}

.game-card-toggle:active {
  transform: translateY(1px);
}

.pitcher-profile { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }

.pitcher-profile img {
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  object-fit: cover;
  object-position: top center;
  background: #f3f5f1;
}

.bullpen-panel { grid-column: 1 / -1; min-width: 0; }
.bullpen-roster { min-width: 0; margin-top: 12px; }
.bullpen-roster h4 { margin-bottom: 7px; font-size: 0.84rem; }
.bullpen-roster .table-wrap { max-width: 100%; }
.bullpen-roster table { min-width: 760px; }

.analysis-body {
  padding: 0;
  min-height: 188px;
}

.game-card.is-collapsed .analysis-body {
  display: none;
}

.game-card.is-collapsed {
  min-height: 0;
}

.game-card-toggle {
  min-height: var(--touch);
}

.analysis-body:has(.analysis-layout),
.analysis-body:has(.loading-block.is-error) {
  padding: 14px;
  min-height: 0;
}

.loading-block {
  position: relative;
  width: 100%;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px 18px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: #fafcf9;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.55;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #d5e8de;
  border-top-color: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.loading-text {
  max-width: 22em;
  color: var(--ink);
}

.loading-block.is-loading {
  background: #f8fcfa;
}

.loading-block.is-loading .loading-spinner {
  animation: spin 0.75s linear infinite;
}

.loading-block.is-idle .loading-spinner {
  width: 28px;
  height: 28px;
  border-width: 2px;
  border-color: #c9ddd3;
  border-top-color: var(--accent);
  opacity: 0.85;
}

.loading-block.is-muted,
.loading-block.is-empty {
  min-height: 140px;
  padding-bottom: 24px;
  background: var(--surface);
}

.loading-block.is-empty .loading-spinner {
  width: 28px;
  height: 28px;
  border: 0;
  background: #eef1ed;
  position: relative;
}

.loading-block.is-empty .loading-spinner::after {
  content: "—";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 900;
}

.loading-block.is-idle .loading-spinner,
.loading-block.is-muted .loading-spinner,
.loading-block.is-empty .loading-spinner {
  animation: none;
}

.loading-block.is-error {
  min-height: auto;
  align-items: stretch;
  gap: 10px;
  padding: 16px;
  border-style: solid;
  border-color: #ebc8c0;
  background: #fff7f5;
  color: var(--ink);
  text-align: left;
}

.loading-block.is-error strong {
  display: block;
  color: var(--red);
  font-size: 0.9rem;
}

.loading-block.is-error pre {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.retry-analysis {
  align-self: flex-start;
  min-height: var(--touch);
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.boot-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.league-fallback-btn {
  min-height: var(--touch);
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: filter 160ms ease, transform 160ms ease;
}

.league-fallback-btn:hover {
  filter: brightness(0.93);
  transform: translateY(-1px);
}

.league-fallback-btn:active {
  transform: scale(0.97);
}

@keyframes spin { to { transform: rotate(360deg); } }

.analysis-layout {
  display: grid;
  grid-template-columns: minmax(310px, 0.75fr) minmax(600px, 1.45fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.mobile-detail-toggle {
  display: none;
}

.left-stack,
.right-stack {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.pick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pick-box {
  min-width: 0;
  padding: 12px 12px 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.pick-box.sub {
  border-color: var(--line);
  border-left-color: var(--accent);
  background: var(--panel);
}

.pick-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.pick-box strong {
  display: block;
  margin-top: 6px;
  font-size: 1.05rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.pick-box p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.score-board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  text-align: center;
}

.score-team { min-width: 0; }

.score-team span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.score-team strong {
  display: block;
  margin-top: 4px;
  font-size: 1.85rem;
}

.score-dash { color: var(--muted); font-weight: 900; }

.note {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.card-head > div { min-width: 0; }

.card-head h3 {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 0.95rem;
}

.insight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -2px 0 12px;
}

.insight-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.insight-tag.good { border-color: #abd2c3; background: #e7f4ee; color: #0b674d; }
.insight-tag.warn { border-color: #e4b8ae; background: #fff0ed; color: #a33b2c; }
.insight-tag.neutral { background: var(--surface); color: var(--muted); }

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 12px;
  margin-bottom: 12px;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  touch-action: pan-x pan-y;
  scrollbar-gutter: stable;
}

.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-track { background: #eef2ef; }
.table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #eef2ef;
  border-radius: 999px;
  background: #9eaea3;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th, td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
  font-size: 0.78rem;
}

th {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

th:first-child,
td:first-child { text-align: left; }

td:first-child { font-weight: 800; }

.no-sample {
  color: var(--muted);
  font-size: 0.74rem;
  text-align: left;
}

td:first-child span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
}

.data-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.data-chip {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.data-chip span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.data-chip strong {
  display: block;
  margin-top: 4px;
  font-size: 0.95rem;
}

.data-chip em {
  display: block;
  margin-top: 2px;
  color: var(--accent);
  font-size: 1.05rem;
  font-style: normal;
  font-weight: 900;
}

.odds-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 900;
}

.live-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(197, 59, 44, 0.12);
}

.odds-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(115px, auto);
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}

.odds-row strong { font-size: 0.92rem; }

.odds-trend { text-align: right; font-weight: 900; }
.odds-trend.strong { color: var(--accent); }
.odds-trend.weak { color: var(--red); }
.odds-trend.flat { color: var(--muted); }

.odds-updated {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: right;
}

.form-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 9px;
}

.form-head h3 { margin: 0; }

.form-head span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.form-head + .form-row { border-top: 0; }

.form-team { min-width: 0; }
.form-team strong,
.form-team span { display: block; overflow-wrap: anywhere; }
.form-team strong { font-size: 0.82rem; }
.form-team span { margin-top: 3px; color: var(--muted); font-size: 0.7rem; }

.form-sequence {
  display: grid;
  grid-template-columns: repeat(10, minmax(20px, 1fr));
  gap: 3px;
  width: 100%;
}

.form-result {
  width: 100%;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 900;
}

.form-result.win { background: var(--accent); }
.form-result.loss { background: var(--red); }
.form-result.draw { background: #78827c; }
.form-sequence.soccer-form { grid-template-columns: repeat(5, minmax(28px, 1fr)); }

.sweep-panel { border-color: #d7bd83; background: #fffaf0; }
.sweep-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.sweep-head h3 { margin: 3px 0 0; color: var(--ink); font-size: 1rem; }
.sweep-kicker { color: var(--amber); font-size: 0.68rem; font-weight: 900; }
.sweep-summary { margin-top: 9px; color: var(--muted); font-size: 0.78rem; line-height: 1.45; }
.sweep-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.sweep-metrics div { padding: 10px; border: 1px solid #e7d6ad; border-radius: var(--radius-sm); background: #fff; }
.sweep-metrics span, .sweep-metrics strong { display: block; }
.sweep-metrics span { color: var(--muted); font-size: 0.68rem; }
.sweep-metrics strong { margin-top: 4px; font-size: 0.9rem; }

/* ── Tablet ── */
@media (max-width: 1050px) {
  .analysis-layout { grid-template-columns: 1fr; }
  .right-stack { order: 2; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-league-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .game-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .game-card-head-actions {
    width: 100%;
    align-items: stretch;
  }

  .game-card-summary {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .summary-pick-chip {
    padding: 11px 12px;
    border-radius: 12px;
  }

  .summary-pick-chip strong {
    font-size: 0.9rem;
  }

  .summary-pick-meta {
    gap: 6px;
  }

  .game-card-toggle {
    width: 100%;
  }

  .mobile-detail-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: var(--touch);
    margin-top: 8px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
  }

  .game-card:not(.show-details) .analysis-layout .right-stack {
    display: none;
  }
}

/* ── Mobile ── */
@media (max-width: 720px) {
  html {
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
  }

  body {
    overflow-x: hidden;
    touch-action: manipulation;
  }

  .app-shell {
    display: flex;
    flex-direction: column;
  }

  #status {
    order: 0;
    flex-shrink: 0;
  }

  .pick-history {
    display: contents;
  }

  .pick-history-quick {
    order: 1;
    gap: 14px;
    margin-bottom: 0;
    min-width: 0;
    width: 100%;
  }

  .game-feed {
    order: 2;
  }

  .pick-history-archive {
    order: 3;
    gap: 14px;
    margin-top: 8px;
    min-width: 0;
    width: 100%;
  }

  .pick-history-dates {
    width: 100%;
    max-width: 100%;
    touch-action: pan-x;
  }

  .daily-record {
    min-width: 0;
    width: 100%;
  }

  .daily-record-scroll-hint {
    display: block;
  }

  .daily-record-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: none;
    margin-top: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
  }

  .daily-record-table-wrap .daily-record-table,
  .daily-record-table-wrap .record-table {
    min-width: 760px;
  }

  .daily-record-table th:first-child,
  .daily-record-table td:first-child {
    position: static;
    box-shadow: none;
    background: inherit;
  }

  .table-wrap {
    overscroll-behavior-x: contain;
    scroll-snap-type: none;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand nav"
      "tools tools";
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .topbar > .brand-home {
    grid-area: brand;
    min-width: 0;
    max-width: 100%;
  }

  .topbar-center-wrap {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    transform: translateX(-50%);
    width: clamp(84px, 24vw, 160px);
    z-index: 5;
  }

  .site-nav {
    grid-area: nav;
    justify-self: end;
    align-self: center;
  }

  .toolbar {
    grid-area: tools;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .toolbar-date {
    grid-column: 1 / -1;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .toolbar label {
    gap: 5px;
    font-size: 0.68rem;
    margin: 0;
  }

  .toolbar label select,
  .toolbar label input[type="date"] {
    height: var(--touch);
    min-height: var(--touch);
    font-size: 16px;
    border-radius: 10px;
  }

  .odds-panel { grid-column: 1 / -1; }

  .app-shell {
    width: calc(100% - 20px);
    padding-top: 10px;
  }

  .status {
    margin-bottom: 12px;
    padding: 12px 14px;
    font-size: 0.84rem;
  }

  .page-boot-state {
    min-height: clamp(160px, 28vh, 240px);
    padding: 24px 16px;
  }

  .pick-history { gap: 14px; }

  .daily-top-picks { padding: 12px; gap: 12px; }

  .confidence-tables { grid-template-columns: 1fr; gap: 12px; }

  .top-pick-table th,
  .top-pick-table td {
    padding: 9px 6px;
    font-size: 0.74rem;
  }

  .panel { padding: 14px; border-radius: var(--radius); }

  .game-card-head {
    flex-direction: row;
    align-items: flex-start;
    padding: 14px;
  }

  .game-card-head > div { min-width: 0; flex: 1; }

  .card-head {
    flex-wrap: wrap;
  }

  .pitcher-profile {
    max-width: 100%;
  }

  .pitcher-profile .badge {
    max-width: min(100%, 220px);
    min-height: 34px;
    height: auto;
    padding-block: 6px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .pick-grid,
  .metric-grid,
  .metric-grid-3,
  .data-strip {
    grid-template-columns: 1fr;
  }

  .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .odds-row { grid-template-columns: 1fr auto; }
  .odds-trend { grid-column: 1 / -1; text-align: left; }

  .form-sequence { grid-template-columns: repeat(10, minmax(18px, 1fr)); }

  .sweep-metrics { grid-template-columns: 1fr; }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .record-day summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px;
  }

  .record-day-meta { text-align: left; }

  .stat-line:not(.stat-line-detail) {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .stat-line:not(.stat-line-detail) span:last-child { text-align: left; }

  .pick-history-dates button {
    min-height: 40px;
    padding: 0 14px;
  }

  .stats-day-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    padding: 14px;
  }

  .stats-day-row > :first-child {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .stats-day-meta { font-size: 0.7rem; }

  .analysis-body,
  .loading-block {
    min-height: 160px;
  }

  .loading-block {
    padding: 18px 14px;
    font-size: 0.84rem;
  }

  .loading-spinner,
  .loading-block.is-loading .loading-spinner {
    width: 30px;
    height: 30px;
  }
}

/* Stats page: no toolbar */
.topbar:not(:has(.toolbar)) {
  grid-template-areas:
    "brand nav";
}

@media (max-width: 720px) {
  .topbar:not(:has(.toolbar)) {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }
}

.version-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.version-badge.standard {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.version-badge.detail {
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
}

body.detail-mode .pick-box.detail-pick {
  border-color: rgba(168, 85, 247, 0.35);
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.08), rgba(168, 85, 247, 0.02));
}

.detail-metrics-panel {
  border-color: rgba(168, 85, 247, 0.25);
}

.detail-pick-history {
  border-left: 3px solid rgba(168, 85, 247, 0.45);
}

/* Scan-first UI polish */
:root {
  --bg: #f1f4f0;
  --bg-soft: #f7f9f6;
  --surface: #f7f9f7;
  --line: #d2dad4;
  --line-strong: #b8c5bc;
  --shadow-sm: 0 1px 2px rgba(15, 31, 22, 0.05);
  --shadow: 0 6px 18px rgba(15, 31, 22, 0.07);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 8px;
}

body,
h1,
h2,
h3,
h4,
.eyebrow {
  letter-spacing: 0;
}

.topbar {
  align-items: center;
  padding-top: max(14px, env(safe-area-inset-top));
  padding-bottom: 14px;
  border-bottom-color: #304138;
  background: #17231d;
  color: #fff;
  box-shadow: 0 4px 16px rgba(10, 22, 15, 0.14);
}

.topbar .eyebrow { color: #7fd1ad; }
.topbar h1 { color: #fff; }

.site-nav {
  border-color: #3b4b42;
  background: #223129;
}

.site-nav a { color: #b9c5be; }

.site-nav a.active {
  background: #fff;
  color: var(--accent);
  box-shadow: none;
}

.topbar-center-hit.is-admin {
  background: rgba(127, 209, 173, 0.1);
}

.admin-login-panel {
  border-color: #42544a;
  background: #223129;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.admin-login-panel input {
  border-color: #42544a;
  background: #17231d;
  color: #fff;
}

.admin-login-cancel {
  border-color: #42544a;
  background: #17231d;
  color: #b9c5be;
}

.toolbar {
  grid-template-columns: minmax(120px, 0.7fr) minmax(140px, 0.8fr) minmax(220px, 1.5fr);
  gap: 12px;
}

.toolbar label { color: #c7d2cb; }
.toolbar-date { grid-column: auto; }

.toolbar label select,
.toolbar label input[type="date"],
.odds-panel {
  border-color: #516158;
  background: #fff;
}

.app-shell {
  width: min(1360px, calc(100% - 24px));
  padding-top: 14px;
}

.panel,
.game-card,
.stats-league-card,
.record-day,
.status {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.panel { padding: 16px; }

.section-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.section-head h2,
.section-head h3 {
  font-size: 1rem;
}

.section-badge,
.version-badge,
.result-tag,
.badge,
.insight-tag {
  border-radius: 6px;
}

.stats-version-analysis,
.stats-today-stats,
.stats-confidence,
.stats-best-days,
.feedback-banner,
.guest-comments {
  margin-bottom: 12px;
}

.feedback-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface) 0%, var(--accent-soft) 100%);
}

.feedback-banner-copy h2 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.feedback-banner-copy .note {
  margin: 0;
}

.feedback-openchat-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: 0 16px;
  border-radius: 999px;
  background: #fee500;
  color: #191919;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.feedback-openchat-link:hover,
.feedback-openchat-link:focus-visible {
  filter: brightness(0.97);
  outline: 2px solid rgba(15, 107, 82, 0.35);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .feedback-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .feedback-openchat-link {
    width: 100%;
  }
}

.visitor-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: -2px 0 12px;
}

.visitor-stats > div:not(.visitor-source-block) {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 8px;
  min-width: 150px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.visitor-stats span {
  color: var(--muted);
  font-size: 0.78rem;
}

.visitor-source-block {
  display: block;
  flex: 1 1 100%;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-sizing: border-box;
}

.visitor-source-block h4 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.visitor-source-block .table-wrap {
  width: 100%;
}

.visitor-source-block .top-pick-table th,
.visitor-source-block .top-pick-table td {
  white-space: nowrap;
}

.visitor-stats strong {
  color: var(--accent);
  font-size: 1.05rem;
  text-align: right;
}

@media (max-width: 480px) {
  .visitor-stats > div:not(.visitor-source-block) {
    flex: 1 1 130px;
    min-width: 0;
  }

  .visitor-source-block {
    flex: 1 1 100%;
    width: 100%;
  }
}

.stats-version-analysis .table-wrap,
.stats-confidence .table-wrap {
  margin-top: 8px;
}

.stats-version-analysis table,
.stats-confidence table {
  min-width: 620px;
  table-layout: fixed;
}

.stats-version-analysis th,
.stats-version-analysis td,
.stats-confidence th,
.stats-confidence td {
  padding: 9px 10px;
}

.stats-league-grid { gap: 10px; }

.stats-league-card {
  padding: 14px;
  border-top: 3px solid var(--accent);
}

.stats-league-head { margin-bottom: 9px; }

.stats-league-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.stats-metric {
  min-width: 0;
  padding: 8px 0;
  background: transparent;
}

.stats-metric strong {
  font-size: 0.94rem;
  font-variant-numeric: tabular-nums;
}

.stats-link {
  min-height: 36px;
  margin-top: 7px;
}

.stats-day-list { gap: 5px; }

.stats-day-row {
  grid-template-columns: 84px 58px repeat(3, minmax(0, 1fr));
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 6px;
}

.stats-day-row:hover {
  border-color: #9fbaab;
  background: #f6faf7;
}

.stats-league-days {
  margin-top: 12px;
  padding-top: 12px;
}

.game-card-head {
  padding: 14px 16px;
  border-top: 0;
  background: var(--panel);
}

body.detail-mode .game-card-head {
  border-top: 0;
  background: var(--panel);
}

body.detail-mode .pick-box.detail-pick {
  border-color: var(--line);
  border-left-color: var(--amber);
  background: var(--panel);
}

.analysis-body:has(.analysis-layout),
.analysis-body:has(.loading-block.is-error) {
  padding: 12px;
}

.analysis-layout { gap: 12px; }
.left-stack,
.right-stack { gap: 10px; }

.pick-grid { gap: 8px; }

.pick-box {
  padding: 12px;
  border-left-width: 3px;
}

.pick-box strong { font-size: 1rem; }
.pick-box p { font-size: 0.72rem; }

.mini-grid { gap: 0 10px; }

.table-wrap {
  scrollbar-width: thin;
  scrollbar-color: #a7b5ab #eef2ef;
}

th {
  background: #f1f5f2;
  color: #526158;
}

tbody tr:nth-child(even) td { background: #fafbfa; }
tbody tr:hover td { background: #f2f8f4; }

@media (max-width: 1050px) {
  .toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats-league-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  .topbar {
    position: relative;
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "tools";
    gap: 10px;
    padding: 12px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .topbar:not(:has(.toolbar)) {
    grid-template-columns: 1fr;
    grid-template-areas: "brand";
    min-height: 66px;
    position: sticky;
  }

  .topbar h1 {
    margin-top: 2px;
    font-size: 1.28rem;
  }

  .site-nav {
    position: fixed;
    z-index: 50;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    width: 100%;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid #34463c;
    border-radius: 0;
    background: #17231d;
    box-shadow: 0 -5px 18px rgba(10, 22, 15, 0.16);
  }

  .site-nav a {
    min-height: 44px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 0.76rem;
  }

  .site-nav a.active {
    background: #e8f3ed;
    color: #0c6049;
  }

  .toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-color: #42544a;
    border-radius: 8px;
  }

  .toolbar-date {
    grid-column: 1 / -1;
    padding-top: 8px;
  }

  .app-shell {
    width: calc(100% - 16px);
    padding-top: 8px;
    padding-bottom: 18px;
  }

  .panel { padding: 12px; }

  .status {
    min-height: 42px;
    margin-bottom: 8px;
    padding: 9px 11px;
    border-radius: 6px;
  }

  .section-head {
    gap: 5px;
    padding-bottom: 8px;
  }

  .stats-version-analysis,
  .stats-today-stats,
  .stats-confidence,
  .stats-best-days,
  .guest-comments {
    margin-bottom: 8px;
  }

  .confidence-table-block,
  .confidence-tables > * {
    min-width: 0;
  }

  .confidence-table-block .table-wrap {
    width: 100%;
    max-width: 100%;
  }

  .stats-league-grid { gap: 8px; }

  .stats-league-card {
    padding: 11px;
  }

  .stats-league-head {
    margin-bottom: 7px;
  }

  .stats-league-head h2 { font-size: 1rem; }

  .stats-league-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .stats-metric {
    padding: 8px 6px;
    text-align: center;
  }

  .stats-metric span,
  .stats-metric em {
    font-size: 0.62rem;
  }

  .stats-metric strong {
    font-size: 0.82rem;
    overflow-wrap: anywhere;
  }

  .stats-link {
    width: 100%;
    min-height: 36px;
    justify-content: center;
    margin-top: 6px;
    border-top: 1px solid var(--line);
  }

  .stats-day-row {
    grid-template-columns: 1fr 1fr;
    padding: 10px;
  }

  .stats-day-row > :first-child {
    grid-column: 1 / -1;
  }

  .stats-day-row > span:not(:first-child):not(.stats-day-meta) {
    padding-top: 6px;
    border-top: 1px solid var(--line);
  }

  .game-card {
    min-height: 180px;
    border-radius: 8px;
  }

  .game-card-head {
    padding: 11px 12px;
  }

  .game-card h2 {
    margin-top: 3px;
    font-size: 1rem;
  }

  .venue {
    margin-top: 3px;
    font-size: 0.7rem;
  }

  .analysis-body:has(.analysis-layout),
  .analysis-body:has(.loading-block.is-error) {
    padding: 8px;
  }

  .pick-grid,
  .data-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pick-box {
    min-height: 112px;
    padding: 10px;
  }

  .pick-box strong {
    font-size: 0.88rem;
  }

  .pick-box p {
    font-size: 0.67rem;
    line-height: 1.4;
  }

  .data-chip { padding: 10px; }

  .metric-grid,
  .metric-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .record-table th:first-child,
  .record-table td:first-child,
  .stats-compare-table th:first-child,
  .stats-compare-table td:first-child,
  .analysis-layout .table-wrap th:first-child,
  .analysis-layout .table-wrap td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    box-shadow: 1px 0 0 var(--line);
  }

  .record-table thead th:first-child,
  .stats-compare-table thead th:first-child,
  .analysis-layout .table-wrap thead th:first-child {
    z-index: 3;
    background: #edf3ef;
  }

  .analysis-layout .table-wrap tbody tr:nth-child(even) td:first-child {
    background: #fafbfa;
  }

  .table-wrap {
    margin-inline: 0;
    border-radius: 7px;
  }

  .odds-row {
    padding: 8px 0;
  }
}

@media (max-width: 480px) {
  .app-shell {
    width: calc(100% - 12px);
  }

  .analysis-body:has(.analysis-layout),
  .analysis-body:has(.loading-block.is-error) {
    padding: 6px;
  }

  .panel {
    padding: 10px;
  }

  .card-head {
    gap: 8px;
  }

  .pitcher-profile img {
    width: 48px;
    height: 48px;
  }

  table {
    min-width: 640px;
  }

  th,
  td {
    padding: 9px 8px;
  }
}

/* Card header polish shared by Standard and Detail. Keep this near the end so
   older responsive rules cannot flatten the controls back into plain text. */
.game-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 14px;
  align-items: start;
  padding: 15px 16px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

body.detail-mode .game-card-head {
  border-top: 0;
  background: var(--panel);
}

.game-card-head-main {
  min-width: 0;
}

.game-card-head-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  justify-items: stretch;
  min-width: 124px;
  max-width: 164px;
}

.game-card-head-actions .badge {
  justify-content: center;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(29, 42, 36, 0.05);
  border-radius: 10px;
  font-size: 0.76rem;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.game-card-toggle {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #c9d4ce;
  border-radius: 12px;
  background: #f0f1f3;
  color: #1d2a24;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 5px 12px rgba(29, 42, 36, 0.08);
  font-size: 0.9rem;
  font-weight: 850;
}

.game-card-toggle:hover {
  border-color: #9fb7aa;
  background: #e9efec;
}

.game-card-toggle[aria-expanded="true"] {
  border-color: #9fc8b7;
  background: #e8f4ee;
  color: #0f6048;
}

.game-card-summary {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.game-card.is-collapsed .game-card-summary {
  display: grid;
}

.summary-pick-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #dce6df;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

.summary-pick-chip.main {
  border-left: 3px solid #b84a3c;
  border-color: #e7d7d3;
  background: #fffaf8;
}

.summary-pick-chip.sub {
  border-left: 3px solid var(--accent);
  border-color: #d6e6dc;
  background: #f8fcf9;
}

.summary-pick-label {
  display: none;
}

.summary-pick-type {
  color: #6d7670;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.summary-pick-chip strong {
  margin-top: 0;
  color: #1c2520;
  font-size: 0.9rem;
  line-height: 1.35;
  font-weight: 850;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.summary-pick-meta {
  display: none;
}

.summary-pick-chip .result-tag {
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  justify-self: end;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .game-card-head {
    grid-template-columns: minmax(0, 1fr) minmax(104px, 128px);
    gap: 10px;
    padding: 13px 14px;
  }

  .game-card h2 {
    font-size: 1rem;
    line-height: 1.28;
  }

  .game-time {
    font-size: 0.76rem;
  }

  .venue {
    font-size: 0.72rem;
    line-height: 1.42;
  }

  .game-card-head-actions {
    min-width: 0;
    max-width: none;
  }

  .game-card-head-actions .badge {
    min-height: 32px;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 0.72rem;
  }

  .game-card-toggle {
    min-height: 40px;
    border-radius: 999px;
    font-size: 0.86rem;
  }

  .game-card-summary {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 10px;
  }

  .summary-pick-chip {
    padding: 9px 10px;
    border-radius: 7px;
    gap: 6px;
  }

  .summary-pick-chip strong {
    font-size: 0.86rem;
  }
}

@media (max-width: 390px) {
  .game-card-head {
    grid-template-columns: 1fr;
  }

  .game-card-head-actions {
    grid-template-columns: 1fr 1fr;
  }
}

/* Compact stats dashboard: aligned tables and mobile-first disclosures. */
.stats-section-disclosure,
.stats-today-version,
.stats-league-days {
  overflow: clip;
}

.stats-section-disclosure > summary,
.stats-today-version > summary,
.stats-league-days > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  font-weight: 900;
}

.stats-section-disclosure > summary::-webkit-details-marker,
.stats-today-version > summary::-webkit-details-marker,
.stats-league-days > summary::-webkit-details-marker {
  display: none;
}

.stats-section-disclosure > summary::after,
.stats-today-version > summary::after,
.stats-league-days > summary::after {
  content: "＋";
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
}

.stats-section-disclosure[open] > summary::after,
.stats-today-version[open] > summary::after,
.stats-league-days[open] > summary::after {
  content: "−";
}

.stats-section-disclosure > summary {
  min-height: 48px;
  padding: 4px 2px 12px;
  border-bottom: 1px solid transparent;
  font-size: 1rem;
}

.stats-section-disclosure[open] > summary {
  border-bottom-color: var(--line);
}

.stats-disclosure-body {
  padding-top: 14px;
}

.stats-today-version-head {
  min-height: 42px;
  margin: 0;
}

.stats-today-version-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 900;
}

.stats-today-version-meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.stats-today-version > summary::after {
  margin-left: 2px;
}

.stats-today-version:not([open]) .stats-today-grid {
  display: none;
}

.stats-league-days {
  margin-top: 10px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stats-league-days > summary {
  min-height: 46px;
  padding: 10px 12px;
}

.stats-league-days > summary > span {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.75rem;
}

.stats-league-days[open] > summary {
  border-bottom: 1px solid var(--line);
}

.stats-day-table-wrap {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.stats-day-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.stats-day-table th,
.stats-day-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.stats-day-table th {
  color: var(--muted);
  background: #f6f8f6;
  font-size: 0.7rem;
  font-weight: 800;
}

.stats-day-table th:nth-child(1) { width: 19%; }
.stats-day-table th:nth-child(2) { width: 14%; }
.stats-day-table th:nth-child(3),
.stats-day-table th:nth-child(4) { width: 33.5%; }

.stats-day-table .num {
  text-align: right;
}

.stats-day-table tbody tr:last-child td {
  border-bottom: 0;
}

.stats-day-link {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 720px) {
  .visitor-stats {
    position: sticky;
    top: 0;
    z-index: 4;
    justify-content: stretch;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(246, 249, 247, 0.96);
    backdrop-filter: blur(8px);
  }

  .visitor-stats > div:not(.visitor-source-block) {
    padding: 7px 9px;
    border: 0;
    background: transparent;
  }

  .visitor-stats span {
    font-size: 0.68rem;
  }

  .visitor-stats strong {
    font-size: 0.92rem;
  }

  .stats-section-disclosure > summary {
    min-height: 44px;
    padding: 2px 0 10px;
  }

  .stats-disclosure-body {
    padding-top: 10px;
  }

  .stats-today-version {
    padding: 9px 10px;
  }

  .stats-today-version-head {
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }

  .stats-today-version-meta {
    font-size: 0.68rem;
  }

  .stats-today-card .stats-league-head {
    align-items: center;
  }

  .stats-day-table {
    font-size: 0.72rem;
  }

  .stats-day-table th,
  .stats-day-table td {
    padding: 9px 7px;
  }

  .stats-day-table th:nth-child(1) { width: 17%; }
  .stats-day-table th:nth-child(2) { width: 13%; }
  .stats-day-table th:nth-child(3),
  .stats-day-table th:nth-child(4) { width: 35%; }
}

/* High-impact home summary. Keep the first screen focused on today's board. */
.stats-today-stats {
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.stats-impact-hero {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid #174d40;
  border-radius: 14px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 190, 71, 0.34), transparent 28%),
    linear-gradient(135deg, #071f19 0%, #0f5e49 64%, #177a5d 100%);
  box-shadow: 0 14px 30px rgba(7, 42, 33, 0.22);
}

.stats-impact-hero::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -68px;
  width: 180px;
  height: 180px;
  border: 28px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  pointer-events: none;
}

.stats-impact-head,
.stats-impact-version,
.stats-best-day-head,
.stats-best-day-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stats-impact-head {
  position: relative;
  z-index: 1;
}

.stats-impact-kicker {
  display: block;
  margin-bottom: 3px;
  color: #ffd26f;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.stats-impact-head h2,
.stats-best-days-head h2 {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  letter-spacing: -0.04em;
}

.stats-impact-schedule {
  display: grid;
  min-width: 78px;
  text-align: right;
}

.stats-impact-schedule strong {
  color: #ffd26f;
  font-size: 2.1rem;
  line-height: 0.95;
}

.stats-impact-schedule span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.68rem;
  font-weight: 800;
}

.stats-impact-leagues {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 15px 0;
}

.stats-impact-leagues span {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 0.72rem;
  font-weight: 750;
}

.stats-impact-leagues b {
  color: #ffd26f;
}

.stats-impact-rates {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stats-impact-rates article {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.stats-impact-rates article.detail {
  background: rgba(255, 214, 128, 0.12);
}

.stats-impact-version em {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
}

.stats-impact-main {
  display: grid;
  margin-top: 12px;
}

.stats-impact-main small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.68rem;
  font-weight: 800;
}

.stats-impact-main strong {
  margin-top: 2px;
  color: #fff;
  font-size: clamp(1.6rem, 6vw, 2.35rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.stats-impact-main > span {
  margin-top: 5px;
  color: #ffe6ad;
  font-size: 0.72rem;
  font-weight: 850;
}

.stats-impact-sub {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 750;
}

.stats-today-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 2px 7px;
}

.stats-today-detail-head strong {
  font-size: 0.84rem;
}

.stats-today-detail-head span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.stats-best-days {
  padding: 18px;
  border-color: #ecd69f;
  background: linear-gradient(180deg, #fffdf7, #fff);
}

.stats-best-days-head {
  align-items: flex-end;
}

.stats-best-days-head .stats-impact-kicker {
  color: #9a6408;
}

.stats-best-day-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stats-best-day-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 15px;
  border: 1px solid #ded8c8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(44, 35, 12, 0.07);
}

.stats-best-day-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
}

.stats-best-day-card.kbo::before { background: #d55044; }
.stats-best-day-card.npb::before { background: #7050ad; }

.stats-best-day-head strong {
  font-size: 1rem;
}

.stats-best-day-head span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.stats-best-day-score {
  display: grid;
  margin-top: 14px;
}

.stats-best-day-score small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.stats-best-day-score strong {
  margin-top: 2px;
  color: var(--accent);
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.stats-best-day-card.kbo .stats-best-day-score strong { color: #b13f36; }
.stats-best-day-card.npb .stats-best-day-score strong { color: #624698; }

.stats-best-day-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 10px;
}

.stats-best-day-meta span {
  padding: 4px 7px;
  border-radius: 999px;
  color: #44514c;
  background: #f0f4f1;
  font-size: 0.66rem;
  font-weight: 800;
}

.stats-best-day-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.72rem;
}

.stats-best-day-sub strong {
  color: var(--ink);
}

.stats-best-day-card > a {
  display: inline-flex;
  margin-top: 11px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 720px) {
  .stats-impact-hero {
    padding: 16px;
    border-radius: 11px;
  }

  .stats-impact-head h2 {
    font-size: 1.28rem;
  }

  .stats-impact-schedule strong {
    font-size: 1.85rem;
  }

  .stats-impact-rates {
    gap: 7px;
  }

  .stats-impact-rates article {
    padding: 11px;
  }

  .stats-impact-main strong {
    font-size: 1.72rem;
  }

  .stats-impact-main > span,
  .stats-impact-sub {
    font-size: 0.64rem;
  }

  .stats-best-days {
    padding: 13px;
  }

  .stats-best-days-head {
    flex-direction: row;
    align-items: flex-end;
  }

  .stats-best-day-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stats-best-day-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 12px 13px 12px 16px;
  }

  .stats-best-day-head {
    grid-column: 1 / -1;
  }

  .stats-best-day-score {
    margin-top: 4px;
  }

  .stats-best-day-score strong {
    font-size: 1.7rem;
  }

  .stats-best-day-meta {
    grid-column: 1;
    margin-top: 2px;
  }

  .stats-best-day-sub {
    grid-column: 2;
    grid-row: 2 / span 2;
    align-self: center;
    max-width: 104px;
    margin-top: 0;
    text-align: right;
  }

  .stats-best-day-card > a {
    grid-column: 1 / -1;
    margin-top: 3px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }
}

/* Header metrics on the home page. */
.stats-mode .topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.topbar-visitor-stats {
  position: static;
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  margin: 0;
  padding: 4px;
  border: 1px solid #3b4b42;
  border-radius: 8px;
  background: #223129;
}

.topbar-visitor-stats > div:not(.visitor-source-block) {
  display: grid;
  grid-template-columns: auto auto;
  gap: 6px;
  min-width: 0;
  padding: 5px 8px;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
}

.topbar-visitor-stats span {
  color: #aebdb4;
  font-size: 0.66rem;
  font-weight: 750;
  white-space: nowrap;
}

.topbar-visitor-stats strong {
  color: #ffd26f;
  font-size: 0.78rem;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.topbar-visitor-stats .visitor-source-block {
  display: none;
}

/* League-first version of the impact board. */
.stats-impact-league-board {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.stats-impact-league-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
}

.stats-impact-league-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(0, 0, 0, 0.12);
}

.stats-impact-league-card > header strong {
  color: #ffd26f;
  font-size: 1rem;
}

.stats-impact-league-card > header span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.72rem;
  font-weight: 850;
}

.stats-impact-league-versions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-impact-league-version {
  min-width: 0;
  padding: 11px;
}

.stats-impact-league-version + .stats-impact-league-version {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.stats-impact-league-version > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.stats-impact-league-version em {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
}

.stats-impact-league-rate {
  display: grid;
  margin-top: 10px;
}

.stats-impact-league-rate small {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.6rem;
  font-weight: 800;
}

.stats-impact-league-rate strong {
  margin-top: 2px;
  color: #fff;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.stats-impact-league-rate span {
  margin-top: 4px;
  color: #ffe6ad;
  font-size: 0.6rem;
  font-weight: 800;
}

.stats-impact-league-version p {
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.6rem;
  font-weight: 750;
}

/* Premium shared treatment for Standard and Detail. */
.analysis-mode {
  --mode-accent: #13795b;
  --mode-accent-deep: #083f32;
  --mode-glow: rgba(19, 121, 91, 0.16);
  background:
    radial-gradient(circle at 14% 0%, rgba(29, 135, 99, 0.12), transparent 30rem),
    linear-gradient(180deg, #e9f0eb 0, #f4f6f3 32rem, #edf1ed 100%);
}

.analysis-mode.detail-mode {
  --mode-accent: #7655aa;
  --mode-accent-deep: #33214f;
  --mode-glow: rgba(118, 85, 170, 0.17);
  background:
    radial-gradient(circle at 14% 0%, rgba(118, 85, 170, 0.13), transparent 30rem),
    linear-gradient(180deg, #efebf4 0, #f6f4f8 32rem, #efedf2 100%);
}

.analysis-mode .topbar {
  border-bottom-color: rgba(255, 255, 255, 0.09);
  background:
    radial-gradient(circle at 85% -20%, rgba(255, 205, 103, 0.18), transparent 28rem),
    linear-gradient(120deg, #081f19, var(--mode-accent-deep) 58%, #102d24);
  box-shadow: 0 12px 30px rgba(6, 24, 18, 0.2);
}

.analysis-mode.detail-mode .topbar {
  background:
    radial-gradient(circle at 85% -20%, rgba(225, 190, 255, 0.2), transparent 28rem),
    linear-gradient(120deg, #171020, var(--mode-accent-deep) 58%, #261d35);
}

.analysis-mode .topbar .eyebrow {
  color: #ffd26f;
  letter-spacing: 0.1em;
}

.analysis-mode.detail-mode .topbar .eyebrow {
  color: #dfc5ff;
}

.analysis-mode .toolbar {
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
}

.analysis-mode .toolbar label {
  font-size: 0.7rem;
  font-weight: 850;
}

.analysis-mode .toolbar label select,
.analysis-mode .toolbar label input[type="date"] {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.analysis-mode .status {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-left: 4px solid var(--mode-accent);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 24px var(--mode-glow);
  backdrop-filter: blur(10px);
}

.analysis-mode .pick-history-quick > section,
.analysis-mode .daily-record,
.analysis-mode .record-archive {
  border-radius: 12px;
  box-shadow: 0 10px 28px var(--mode-glow);
}

.analysis-mode .game-card {
  overflow: hidden;
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}

.analysis-mode .game-card:hover {
  transform: none;
  box-shadow: none;
}

.analysis-mode .game-card-head {
  border-top: 0;
  border-left: 3px solid var(--mode-accent);
  background: var(--panel);
}

.analysis-mode.detail-mode .game-card-head {
  border-top: 0;
  border-left-color: var(--mode-accent);
  background: var(--panel);
}

.analysis-mode .game-time {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--mode-accent);
  background: color-mix(in srgb, var(--mode-accent) 11%, white);
  font-size: 0.74rem;
  font-weight: 900;
}

.analysis-mode .game-card-head h2 {
  margin-top: 7px;
  letter-spacing: -0.035em;
}

.analysis-mode .game-card-toggle {
  border-color: color-mix(in srgb, var(--mode-accent) 28%, #ccd6cf);
  color: var(--mode-accent-deep);
  background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--mode-accent) 7%, white));
  box-shadow: 0 4px 12px var(--mode-glow);
}

.analysis-mode .game-card-toggle[aria-expanded="true"] {
  border-color: var(--mode-accent);
  color: #fff;
  background: linear-gradient(135deg, var(--mode-accent-deep), var(--mode-accent));
}

.analysis-mode .pick-box {
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.analysis-mode .pick-box:not(.sub) {
  border-left: 3px solid #c4493b;
  background: var(--panel);
}

.analysis-mode .pick-box.sub {
  border-left: 3px solid var(--mode-accent);
  background: var(--panel);
}

@media (max-width: 720px) {
  .stats-mode .topbar {
    grid-template-columns: 1fr;
    grid-template-areas: "brand";
    min-height: 68px;
  }

  .stats-mode .topbar > .brand-home {
    max-width: calc(100% - 132px);
  }

  .stats-mode .topbar-actions {
    position: absolute;
    top: 0;
    right: 10px;
    bottom: 0;
    height: fit-content;
    margin-block: auto;
    align-self: auto;
    justify-content: flex-end;
  }

  .stats-mode .topbar-actions .site-nav {
    position: fixed;
  }

  .topbar-visitor-stats {
    padding: 2px;
    border-radius: 7px;
  }

  .topbar-visitor-stats > div:not(.visitor-source-block) {
    grid-template-columns: 1fr;
    gap: 0;
    min-width: 48px;
    padding: 4px 6px;
    text-align: center;
  }

  .topbar-visitor-stats span {
    font-size: 0.58rem;
  }

  .topbar-visitor-stats strong {
    font-size: 0.7rem;
    text-align: center;
  }

  .stats-impact-league-board {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 12px;
  }

  .stats-impact-league-version {
    padding: 9px 10px;
  }

  .stats-impact-league-rate {
    grid-template-columns: auto auto;
    align-items: end;
    gap: 6px;
    margin-top: 7px;
  }

  .stats-impact-league-rate small {
    grid-column: 1 / -1;
  }

  .stats-impact-league-rate strong {
    font-size: 1.3rem;
  }

  .stats-impact-league-rate span {
    margin: 0 0 1px;
  }

  .analysis-mode .topbar {
    gap: 9px;
    padding: 11px;
  }

  .analysis-mode .toolbar {
    padding: 8px;
    border-radius: 9px;
  }

  .analysis-mode .game-card {
    border-radius: var(--radius);
    box-shadow: none;
  }

  .analysis-mode .game-card:hover {
    transform: none;
  }
}

/* Landing hero — first screen for reels/YouTube visitors */
.stats-landing-hero {
  display: grid;
  gap: 14px;
}

.stats-landing-brand {
  padding: 18px 16px;
  border: 1px solid #174d40;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, #0b3d31 0%, #0f5e49 100%);
  box-shadow: none;
}

.stats-landing-brand h2 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.stats-landing-tagline {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  line-height: 1.5;
}

.stats-landing-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stats-landing-columns-single {
  grid-template-columns: 1fr;
}

.stats-landing-sport-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-sport-block {
  display: grid;
  gap: 10px;
  margin: 16px 0 4px;
}

.stats-sport-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.stats-sport-block-head h2,
.stats-sport-block-head h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.stats-sport-block-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.stats-league-card .stats-link + .stats-link {
  margin-left: 12px;
}

.stats-landing-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.stats-landing-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.stats-landing-panel-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.stats-landing-panel h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.stats-landing-panel-score {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.stats-landing-pick-grid {
  display: grid;
  gap: 8px;
}

.stats-landing-pick-card {
  display: block;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
}

.stats-landing-pick-card:hover {
  border-color: var(--line);
  transform: none;
}

.stats-landing-yesterday-meta {
  margin: -4px 0 10px;
}

.stats-landing-pick-card.is-hit {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

.stats-landing-pick-grid > .stats-landing-pick-card:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.stats-landing-pick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.stats-landing-league {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
}

.stats-landing-confidence {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.stats-landing-match {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  line-height: 1.35;
}

.stats-landing-pick-lines {
  display: grid;
  gap: 6px;
}

.stats-landing-pick-lines > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.76rem;
}

.stats-landing-pick-lines em {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-style: normal;
  font-weight: 800;
}

.stats-landing-empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.stats-landing-empty a {
  color: var(--accent);
  font-weight: 800;
}

.stats-landing-cta {
  display: inline-flex;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.stats-landing-today .stats-landing-pick-grid {
  margin-bottom: 4px;
}

.stats-today-more {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.stats-today-more > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.stats-today-more > summary::-webkit-details-marker {
  display: none;
}

.stats-today-more-body {
  padding: 0 16px 16px;
}

.stats-impact-hero-compact {
  margin-bottom: 14px;
  padding: 16px;
}

@media (max-width: 980px) {
  .stats-landing-sport-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .stats-landing-columns {
    grid-template-columns: 1fr;
  }

  .stats-landing-brand {
    padding: 16px;
  }

  .stats-landing-panel header {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-landing-panel-score {
    white-space: normal;
  }
}

/* Final table-scroll override: both current-day and archived pick records pan in both axes. */
.daily-record-table-wrap,
.record-archive .record-table-wrap {
  max-height: min(62vh, 560px);
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior: contain;
}

@media (max-width: 720px) {
  .daily-record-table-wrap,
  .record-archive .record-table-wrap {
    max-height: min(58vh, 440px);
    overflow-x: auto;
    overflow-y: auto;
    touch-action: pan-x pan-y;
  }
}

/* Home analysis-method selector */
.pick-method-guide {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pick-method-guide-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.pick-method-guide-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.05rem, 3vw, 1.28rem);
  letter-spacing: -0.03em;
}

.pick-method-guide-head p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
  text-align: right;
}

.pick-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pick-method-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0;
  min-width: 0;
  min-height: var(--touch);
  padding: 14px 14px 14px 16px;
  overflow: hidden;
  border: 1px solid rgba(21, 32, 25, 0.08);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top left, rgba(15, 107, 82, 0.06), transparent 42%),
    linear-gradient(180deg, #ffffff, #f7faf8);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.pick-method-card.detail {
  border-color: rgba(21, 32, 25, 0.08);
  border-left-color: var(--amber);
  background:
    radial-gradient(circle at top left, rgba(193, 139, 28, 0.08), transparent 42%),
    linear-gradient(180deg, #ffffff, #fbf8f2);
}

.pick-method-card:hover,
.pick-method-card:focus-visible {
  z-index: 1;
  border-color: rgba(15, 107, 82, 0.2);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(21, 32, 25, 0.08);
}

.pick-method-card.detail:hover,
.pick-method-card.detail:focus-visible {
  border-color: var(--amber);
  outline-color: var(--amber);
}

.pick-method-card:active {
  transform: none;
}

.pick-method-number,
.pick-method-arrow {
  display: none;
}

.pick-method-copy {
  min-width: 0;
}

.pick-method-copy strong,
.pick-method-copy em {
  display: block;
}

.pick-method-copy strong {
  color: var(--ink);
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.pick-method-card.detail .pick-method-copy strong {
  color: var(--ink);
}

.pick-method-copy em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
}

.pick-method-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  word-break: keep-all;
}

.pick-method-rate {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  grid-template-areas:
    "ring label value"
    "ring record value";
  align-items: center;
  gap: 2px 10px;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.pick-method-card.detail .pick-method-rate {
  border: 0;
  background: transparent;
}

.pick-method-rate small {
  grid-area: label;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.pick-method-rate strong {
  grid-area: value;
  color: var(--ink);
  font-size: 1.28rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.pick-method-rate em {
  grid-area: record;
  margin: 0;
  color: var(--muted);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 700;
}

.pick-method-rate.is-strong {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.pick-method-rate.is-strong strong,
.pick-method-card.detail .pick-method-rate strong {
  color: var(--ink);
}

.pick-method-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 10px;
}

.pick-method-tags b {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.pick-method-card.detail .pick-method-tags b {
  background: transparent;
  color: var(--muted);
}

@media (max-width: 720px) {
  .pick-method-guide {
    padding: 0;
    border-radius: 0;
  }

  .pick-method-guide-head {
    display: block;
  }

  .pick-method-guide-head p {
    margin-top: 6px;
    text-align: left;
  }

  .pick-method-grid {
    grid-template-columns: 1fr;
  }

  .pick-method-card {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px 14px 14px 15px;
  }

  .pick-method-copy p,
  .pick-method-tags {
    display: none;
  }
}

.stats-landing-swoosh {
  display: block;
  width: min(240px, 72%);
  height: 14px;
  margin: 10px 0 2px;
  color: rgba(255, 210, 120, 0.92);
}

.js-motion-title .motion-char {
  display: inline-block;
}

.pick-method-rate {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  grid-template-areas:
    "ring label value"
    "ring record value";
}

.pick-method-rate.is-empty {
  grid-template-areas:
    "ring label label"
    "ring value value";
}

.viz-ring {
  grid-area: ring;
  flex: 0 0 auto;
  transform: rotate(-90deg);
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 2px 6px rgba(15, 107, 82, 0.12));
}

.viz-ring-track,
.viz-ring-value {
  fill: none;
  stroke-width: 4;
}

.viz-ring--md .viz-ring-track,
.viz-ring--md .viz-ring-value,
.viz-ring--lg .viz-ring-track,
.viz-ring--lg .viz-ring-value {
  stroke-width: 5;
}

.viz-ring-track {
  stroke: rgba(21, 32, 25, 0.1);
}

.viz-ring-value {
  stroke: url(#viz-ring-gradient-standard);
  stroke: #177a5d;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s ease;
}

.viz-ring--standard .viz-ring-value { stroke: #177a5d; }
.viz-ring--detail .viz-ring-value { stroke: #c18b1c; }
.viz-ring--mlb .viz-ring-value { stroke: #2f6eb8; }
.viz-ring--kbo .viz-ring-value { stroke: #c53b2c; }
.viz-ring--npb .viz-ring-value { stroke: #1f8f6d; }
.viz-ring--soccer_korea_kleague1 .viz-ring-value { stroke: #0f6b52; }
.viz-ring--soccer_epl .viz-ring-value { stroke: #3f2f88; }
.viz-ring--nba .viz-ring-value { stroke: #c45a12; }
.viz-ring--kbl .viz-ring-value { stroke: #1d4e89; }
.viz-ring--mlb-sub .viz-ring-value { stroke: #6a9fd4; }
.viz-ring--kbo-sub .viz-ring-value { stroke: #e07a72; }
.viz-ring--npb-sub .viz-ring-value { stroke: #5bc4a2; }
.viz-ring--soccer_korea_kleague1-sub .viz-ring-value { stroke: #4aa88a; }
.viz-ring--soccer_epl-sub .viz-ring-value { stroke: #7a6ab8; }
.viz-ring--nba-sub .viz-ring-value { stroke: #e08a45; }
.viz-ring--kbl-sub .viz-ring-value { stroke: #5a8fc4; }

.pick-method-card.detail .viz-ring-track { stroke: rgba(154, 100, 8, 0.14); }
.pick-method-card.detail .viz-ring-value,
.pick-method-rate.is-strong .viz-ring-value { stroke: #c18b1c; }

.viz-bar {
  width: 100%;
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(21, 32, 25, 0.08);
}

.viz-bar-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #177a5d, #3ecf9d);
  box-shadow: 0 0 12px rgba(23, 122, 93, 0.22);
}

.viz-bar.is-hot .viz-bar-fill,
.viz-bar--main.is-hot .viz-bar-fill {
  background: linear-gradient(90deg, #0f6b52, #2fd39a);
  box-shadow: 0 0 14px rgba(47, 211, 154, 0.28);
}

.viz-bar.is-mid .viz-bar-fill { background: linear-gradient(90deg, #5f7f73, #8fb5a7); }

.stats-league-card.mlb .viz-bar--mlb .viz-bar-fill,
.stats-league-card.mlb .viz-bar-fill { background: linear-gradient(90deg, #1d4e89, #3d7cc9); }
.stats-league-card.kbo .viz-bar--kbo .viz-bar-fill,
.stats-league-card.kbo .viz-bar-fill { background: linear-gradient(90deg, #8a1f24, #d24a4f); }
.stats-league-card.npb .viz-bar--npb .viz-bar-fill,
.stats-league-card.npb .viz-bar-fill { background: linear-gradient(90deg, #177a5d, #2aa37a); }
.stats-league-card.soccer_korea_kleague1 .viz-bar-fill { background: linear-gradient(90deg, #0f6b52, #3ecf9d); }
.stats-league-card.soccer_epl .viz-bar-fill { background: linear-gradient(90deg, #3f2f88, #6a5ab8); }
.stats-league-card.nba .viz-bar-fill { background: linear-gradient(90deg, #c45a12, #e88a3a); }
.stats-league-card.kbl .viz-bar-fill { background: linear-gradient(90deg, #1d4e89, #4a8fd4); }

.stats-metric--chart {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(21, 32, 25, 0.08);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 247, 0.88));
}

.stats-metric-copy {
  min-width: 0;
}

.stats-metric-copy strong {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.stats-metric--count {
  padding: 4px 2px 8px;
}

.viz-confidence-card {
  padding: 14px;
  border: 1px solid rgba(21, 32, 25, 0.08);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(15, 107, 82, 0.06), transparent 42%),
    linear-gradient(180deg, #ffffff, #f7faf8);
  box-shadow: var(--shadow-sm);
}

.viz-confidence-card h4 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.confidence-table .confidence-threshold {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
}

.confidence-table .viz-bar {
  margin-top: 0;
  height: 6px;
}

.confidence-table tbody tr.confidence-row.is-hot .confidence-rate {
  color: var(--accent);
}

.confidence-table tbody tr.confidence-row.is-hot .confidence-threshold {
  color: var(--ink);
}

.stats-best-day-score {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.stats-best-day-score-copy small {
  display: block;
}

.stats-best-day-score-copy strong {
  display: block;
  margin-top: 2px;
}

.stats-league-card {
  border: 1px solid rgba(21, 32, 25, 0.08);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 247, 0.94));
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.stats-league-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 107, 82, 0.18);
  box-shadow: 0 14px 28px rgba(21, 32, 25, 0.08);
}

.stats-best-day-card {
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top left, rgba(15, 107, 82, 0.05), transparent 38%),
    var(--panel);
  box-shadow: var(--shadow-sm);
}

.metric-card {
  padding: 12px;
  border: 1px solid rgba(21, 32, 25, 0.08);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff, #f8faf7);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(21, 32, 25, 0.06);
}

.metric-card strong {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.stats-disclosure-body {
  transform-origin: top center;
}

.stats-compare-table tbody tr:hover td {
  background: rgba(15, 107, 82, 0.04);
}

.stats-winner-note {
  padding: 10px 12px;
  border: 1px solid rgba(15, 107, 82, 0.14);
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(227, 242, 235, 0.9), rgba(255, 255, 255, 0.7));
}

@media (prefers-reduced-motion: reduce) {
  .js-motion-title .motion-char {
    display: inline;
  }
}

/* Motion.dev-style hover/press + Anime.js ripple on high-count buttons */
.site-nav a,
.pick-history-dates button,
.game-card-toggle,
.guest-comment-form button,
.admin-login-submit,
.admin-login-cancel,
.feedback-openchat-link,
.stats-link,
.stats-landing-cta,
.retry-analysis {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 180ms cubic-bezier(0.22, 1.2, 0.36, 1),
    box-shadow 180ms cubic-bezier(0.22, 1.2, 0.36, 1),
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.site-nav a:hover,
.pick-history-dates button:hover,
.game-card-toggle:hover,
.guest-comment-form button:hover,
.admin-login-submit:hover,
.feedback-openchat-link:hover,
.stats-link:hover,
.stats-landing-cta:hover,
.retry-analysis:hover {
  transform: translateY(-1px);
}

.site-nav a:active,
.pick-history-dates button:active,
.game-card-toggle:active,
.guest-comment-form button:active,
.admin-login-submit:active,
.admin-login-cancel:active,
.feedback-openchat-link:active,
.stats-link:active,
.stats-landing-cta:active,
.retry-analysis:active {
  transform: scale(0.97);
}

.motion-ripple {
  position: absolute;
  z-index: 1;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.2;
  pointer-events: none;
  transform: scale(0);
}

@media (prefers-reduced-motion: reduce) {
  .site-nav a,
  .pick-history-dates button,
  .game-card-toggle,
  .guest-comment-form button,
  .admin-login-submit,
  .admin-login-cancel,
  .feedback-openchat-link,
  .stats-link,
  .stats-landing-cta,
  .retry-analysis,
  .pick-method-card,
  .stats-landing-pick-card,
  .pick-method-arrow {
    transition: none;
  }

  .site-nav a:hover,
  .pick-history-dates button:hover,
  .game-card-toggle:hover,
  .guest-comment-form button:hover,
  .admin-login-submit:hover,
  .feedback-openchat-link:hover,
  .stats-link:hover,
  .stats-landing-cta:hover,
  .retry-analysis:hover,
  .site-nav a:active,
  .pick-history-dates button:active,
  .game-card-toggle:active,
  .guest-comment-form button:active,
  .admin-login-submit:active,
  .admin-login-cancel:active,
  .feedback-openchat-link:active,
  .stats-link:active,
  .stats-landing-cta:active,
  .retry-analysis:active,
  .pick-method-card:active,
  .stats-landing-pick-card:active,
  .pick-method-card:hover .pick-method-arrow {
    transform: none;
  }

  .motion-ripple {
    display: none;
  }
}
