/* Product shell v2. Legacy data components remain in styles.css. */
:root {
  --bg: #f5f6f2; --bg-soft: #f8f9f6; --panel: #fff; --surface: #f7f8f5;
  --ink: #1c2924; --muted: #66716b; --line: #e0e5de; --line-strong: #cbd4cb;
  --accent: #116149; --accent-soft: #eaf2e9; --green: #116149; --green-soft: #eaf2e9;
  --amber: #8a641b; --red: #b74539; --red-soft: #fcf0ed;
  --shadow-sm: 0 2px 4px #20362a03; --shadow: 0 8px 30px #20362a08;
  --radius: 16px; --radius-sm: 10px; --radius-lg: 20px;
}
html { scroll-padding-top: 90px; }
body.lab-redesign, body.lab-redesign.analysis-mode, body.lab-redesign.analysis-mode.detail-mode {
  background: var(--bg); --mode-accent: var(--accent); --mode-accent-deep: #154b38; --mode-glow: transparent;
  color: var(--ink); letter-spacing: -.025em;
  overflow-x: clip; overflow-y: visible;
}
.lab-redesign [hidden] { display: none !important; }
.lab-redesign :is(button, a, input, select, summary):focus-visible { outline: 3px solid #4d9374; outline-offset: 3px; }
.lab-redesign button { cursor: pointer; }
.lab-redesign .topbar {
  position: sticky; top: 0; display: flex; flex-wrap: nowrap; min-height: 80px;
  padding: 16px max(28px, calc((100vw - 1240px) / 2)); gap: 28px;
  background: #fff; border-bottom: 1px solid var(--line); box-shadow: none; backdrop-filter: none;
  color: var(--ink); z-index: 40;
}
.lab-redesign .topbar > .brand-home { display: flex; align-items: center; gap: 11px; max-width: none; flex-shrink: 0; }
.brand-symbol { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--accent); color: #fff; }
.brand-symbol svg { width: 26px; height: 26px; }
.brand-wordmark { display: grid; gap: 2px; line-height: 1.15; }
.brand-wordmark strong { font-size: 18px; font-weight: 800; letter-spacing: -.6px; }
.brand-wordmark small { color: var(--muted); font-size: 10px; letter-spacing: 1.4px; }
.lab-redesign .topbar .site-nav { position: static; display: flex; flex: 1; align-items: center; gap: 8px; background: none; border: 0; padding: 0; border-radius: 0; width: auto; backdrop-filter: none; }
.lab-redesign .site-nav a { color: var(--muted); background: none; padding: 11px 17px; min-height: 44px; border: 0; border-radius: 8px; font-size: 14px; box-shadow: none; font-weight: 650; }
.lab-redesign .site-nav a.active { color: var(--accent); background: var(--accent-soft); }
.lab-redesign .site-nav a:hover { background: var(--surface); transform: none; }
.shell-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.shell-guide, .shell-install { display: inline-flex; gap: 7px; align-items: center; justify-content: center; min-height: 44px; padding: 10px 13px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.shell-guide svg, .shell-install svg { width: 17px; height: 17px; }
.shell-install { color: var(--accent); background: var(--surface); }
.lab-redesign .topbar #visitorStats { display: none; }
.lab-redesign .app-shell { display: block; width: min(1240px, calc(100% - 56px)); margin: 0 auto; padding: 38px 0 48px; }
.analysis-intro { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.section-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 1.6px; font-weight: 750; color: var(--accent); }
.section-kicker::before { content: ''; width: 6px; height: 6px; border-radius: 2px; background: currentColor; }
.analysis-intro h1 { margin: 9px 0 8px; font-size: clamp(26px, 3vw, 36px); line-height: 1.25; letter-spacing: -1.3px; }
.analysis-intro p { font-size: 14px; color: var(--muted); line-height: 1.7; }
.intro-policy { border-left: 1px solid var(--line-strong); padding: 5px 0 5px 24px; flex: 0 0 230px; }
.intro-policy strong { display: flex; gap: 7px; align-items: center; font-size: 13px; font-weight: 700; }
.intro-policy svg { width: 17px; height: 17px; color: var(--accent); }
.intro-policy span { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; }
.selection-panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 26px; overflow: hidden; }
.lab-redesign.analysis-mode .toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; padding: 18px 22px; border: 0; border-radius: 0; background: #fff; width: 100%; }
.lab-redesign.analysis-mode .toolbar label { display: grid; gap: 7px; flex: 0 1 160px; min-width: 100px; font-size: 11px; color: var(--muted); font-weight: 650; }
.lab-redesign.analysis-mode .toolbar label select, .lab-redesign.analysis-mode .toolbar label input[type=date] { width: 100%; min-width: 0; height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 650; box-shadow: none; color-scheme: light; }
.lab-redesign.analysis-mode .toolbar .toolbar-date { flex-basis: 180px; }
.date-shortcuts { display: flex; gap: 5px; margin-left: auto; }
.date-shortcuts button { display: grid; place-items: center; height: 44px; min-width: 44px; padding: 0 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-weight: 600; }
.date-shortcuts svg { width: 17px; height: 17px; }
.league-quick { display: flex; gap: 6px; padding: 0 22px 16px; overflow-x: auto; scrollbar-width: thin; }
.league-quick button { min-width: 74px; min-height: 40px; padding: 8px 15px; flex-shrink: 0; border: 1px solid transparent; border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 700; }
.league-quick button[aria-pressed=true] { background: var(--accent); color: #fff; }
.board-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 24px 0 15px; }
.board-toolbar h2 { font-size: 19px; letter-spacing: -.65px; }
.board-count { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 7px; }
.board-search { display: flex; align-items: center; gap: 7px; width: 220px; margin-left: auto; min-height: 44px; padding: 0 12px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.board-search svg { width: 17px; height: 17px; color: var(--muted); flex-shrink: 0; }
.board-search input { width: 100%; min-width: 0; height: 42px; padding: 0; background: none; border: 0; font-size: 13px; }
.board-filter { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: #ecefe8; }
.board-filter button { min-height: 36px; padding: 6px 13px; border: 0; border-radius: 6px; font-size: 12px; font-weight: 650; background: none; color: var(--muted); }
.board-filter button[aria-pressed=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px #2133230b; }
.lab-redesign.analysis-mode .status { min-height: 0; padding: 10px 0; margin: 0 0 16px; border: 0; background: none; box-shadow: none; font-size: 12px; color: var(--muted); border-radius: 0; }
.lab-redesign .pick-history { display: flex; margin-bottom: 16px; }
.lab-redesign .pick-history-archive { display: flex; margin: 28px 0 0; }
.lab-redesign.detail-mode .pick-history-quick { border: 0; padding: 0; }
.lab-redesign .game-feed { display: grid; gap: 16px; }
.bookmark-game { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 40px; min-width: 40px; padding: 6px 9px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 11px; font-weight: 600; }
.bookmark-game svg { width: 16px; height: 16px; }
.bookmark-game[aria-pressed=true] { color: var(--accent); background: var(--accent-soft); border-color: #c9dcc7; }
.bookmark-game[aria-pressed=true] svg { fill: #11614918; }
.filter-empty { display: grid; justify-items: center; text-align: center; padding: 48px 20px; background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.filter-empty strong { font-size: 17px; }
.filter-empty p { margin: 7px 0 18px; color: var(--muted); font-size: 13px; }
.filter-empty button { border: 0; border-radius: 8px; background: var(--accent); color: #fff; padding: 12px 17px; min-height: 44px; font-weight: 600; }
.board-note { font-size: 12px; color: var(--muted); margin: 18px 0 0; line-height: 1.7; }
.lab-footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; width: min(1240px, calc(100% - 56px)); margin: 0 auto; padding: 25px 0 36px; border-top: 1px solid var(--line); }
.lab-footer strong { font-size: 13px; }
.lab-footer p { font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.6; }
.lab-footer button { border: 0; padding: 10px 0 10px 15px; min-height: 44px; color: var(--muted); background: none; font-size: 12px; white-space: nowrap; }
.mobile-nav { display: none; }
.lab-dialog { width: min(540px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 28px; border: 1px solid var(--line); border-radius: 22px; color: var(--ink); background: #fff; box-shadow: 0 20px 100px #18281e33; }
.lab-dialog::backdrop { background: #17291f66; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.dialog-heading h2 { font-size: 22px; letter-spacing: -.8px; }
.dialog-close { width: 40px; height: 40px; display: grid; place-items: center; flex-shrink: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); }
.dialog-close svg { width: 20px; height: 20px; }
.guide-lead { color: var(--muted); font-size: 14px; line-height: 1.75; margin-bottom: 22px; }
.guide-item { padding: 16px 0; border-top: 1px solid var(--line); }
.guide-item h3 { font-size: 14px; margin-bottom: 6px; }
.guide-item p { font-size: 13px; color: var(--muted); line-height: 1.8; }
.guide-item b { color: var(--ink); font-weight: 650; }
.guide-actions { display: flex; gap: 8px; margin-top: 20px; }
.guide-actions a, .guide-actions button { min-height: 44px; flex: 1; text-decoration: none; padding: 12px; border-radius: 9px; border: 1px solid var(--line); text-align: center; font-size: 13px; font-weight: 700; background: var(--surface); color: var(--accent); }
.guide-actions a:first-child { color: #fff; background: var(--accent); border-color: var(--accent); }
.shell-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 100; padding: 12px 20px; width: max-content; max-width: calc(100% - 32px); border-radius: 12px; background: #223c2e; color: #fff; box-shadow: var(--shadow); font-size: 13px; text-align: center; }
.connection-notice { padding: 10px 20px; text-align: center; background: #fff4dd; color: #725118; font-size: 12px; }
.lab-redesign .admin-bottom-access { bottom: 5px; z-index: 45; }
@media (max-width: 1000px) {
  .lab-redesign .topbar { padding-inline: 24px; gap: 20px; }
  .brand-wordmark small { display: none; }
  .shell-guide { display: none; }
  .lab-redesign .site-nav a { padding-inline: 12px; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 78px; }
  .lab-redesign { padding-bottom: calc(75px + env(safe-area-inset-bottom)); }
  .lab-redesign .topbar { padding: max(12px, env(safe-area-inset-top)) 18px 12px; min-height: 67px; gap: 12px; }
  .lab-redesign .topbar .site-nav { display: none; }
  .brand-symbol { width: 34px; height: 34px; border-radius: 10px; }
  .brand-symbol svg { width: 23px; height: 23px; }
  .brand-wordmark strong { font-size: 16px; }
  .shell-actions { gap: 4px; }
  .shell-install { border: 0; padding: 8px; min-height: 40px; font-size: 11px; background: none; gap: 5px; }
  .lab-redesign .app-shell { display: block; width: calc(100% - 32px); padding: 25px 0 32px; }
  .analysis-intro { margin-bottom: 22px; }
  .section-kicker { font-size: 10px; letter-spacing: 1.3px; }
  .analysis-intro h1 { margin-top: 9px; font-size: 27px; }
  .analysis-intro p { font-size: 12px; max-width: 330px; }
  .intro-policy { display: none; }
  .selection-panel { margin-bottom: 20px; border-radius: 13px; }
  .lab-redesign.analysis-mode .toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 10px; padding: 15px; }
  .lab-redesign.analysis-mode .toolbar label { min-width: 0; font-size: 10px; gap: 5px; }
  .lab-redesign.analysis-mode .toolbar label select, .lab-redesign.analysis-mode .toolbar label input[type=date] { font-size: 14px; height: 44px; }
  .date-shortcuts { margin: 0; justify-content: end; gap: 4px; }
  .date-shortcuts button { padding: 0 9px; min-width: 36px; }
  .league-quick { padding: 0 15px 15px; gap: 7px; }
  .league-quick button { min-height: 40px; flex: 1 0 auto; min-width: 68px; font-size: 12px; }
  .board-toolbar { gap: 12px 8px; margin: 21px 0 14px; }
  .board-toolbar h2 { flex: 1; font-size: 18px; }
  .board-count { font-size: 11px; margin-left: 5px; }
  .board-search { order: 3; width: 100%; margin: 0; }
  .board-search input { font-size: 16px; }
  .board-filter { padding: 3px; gap: 0; }
  .board-filter button { font-size: 11px; padding: 5px 10px; min-height: 36px; }
  .lab-redesign .status { font-size: 11px; }
  .lab-redesign .pick-history { display: flex; }
  .lab-redesign .pick-history-archive { margin-top: 24px; }
  .lab-footer { width: calc(100% - 40px); padding: 22px 0; align-items: start; gap: 15px; }
  .lab-footer p { max-width: 265px; }
  .mobile-nav { position: fixed; z-index: 50; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 7px 10px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -3px 16px #20362a04; }
  .mobile-nav a, .mobile-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 49px; padding: 4px; border: 0; border-radius: 9px; background: none; text-decoration: none; color: #6d7770; font-size: 10px; font-weight: 600; }
  .mobile-nav svg { width: 21px; height: 21px; }
  .mobile-nav [aria-current=page] { color: var(--accent); background: var(--accent-soft); font-weight: 800; }
  .lab-dialog { padding: 23px; border-radius: 20px; max-height: calc(100dvh - 40px); }
  .lab-redesign .admin-bottom-access { bottom: calc(75px + env(safe-area-inset-bottom)); }
  .shell-toast { bottom: calc(87px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .lab-redesign *, .lab-redesign *::before, .lab-redesign *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
