:root {
  --bg: #101614; --surface: #1A2320; --surface-2: #2B413C; --line: #3A4A45;
  --text: #EEF2EE; --muted: #A9B5AE; --soft: #C4CEC8;
  --accent: #FF8A3D; --accent-ink: #101614;
  --typ: #6F8C85; --curve: #8FB0A8; --band: #2B413C; --grid: #24302C;
  --exp-bg: #3A3326; --exp-fg: #FFC58A; --ok-bg: #20352C; --ok-fg: #9FD8B5; --cold: #9FC3DA;
  --body: 'Barlow', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --display: 'Barlow Condensed', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101614; --surface: #1A2320; --surface-2: #2B413C; --line: #3A4A45;
    --text: #EEF2EE; --muted: #A9B5AE; --soft: #C4CEC8;
    --accent: #FF8A3D; --accent-ink: #101614;
    --typ: #6F8C85; --curve: #8FB0A8; --band: #2B413C; --grid: #24302C;
    --exp-bg: #3A3326; --exp-fg: #FFC58A; --ok-bg: #20352C; --ok-fg: #9FD8B5; --cold: #9FC3DA;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101614; --surface: #1A2320; --surface-2: #2B413C; --line: #3A4A45;
  --text: #EEF2EE; --muted: #A9B5AE; --soft: #C4CEC8;
  --accent: #FF8A3D; --accent-ink: #101614;
  --typ: #6F8C85; --curve: #8FB0A8; --band: #2B413C; --grid: #24302C;
  --exp-bg: #3A3326; --exp-fg: #FFC58A; --ok-bg: #20352C; --ok-fg: #9FD8B5; --cold: #9FC3DA;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F1F4F2; --surface: #FFFFFF; --surface-2: #DCE6E2; --line: #C6D2CD;
  --text: #13201C; --muted: #56655F; --soft: #37443F;
  --accent: #B8500C; --accent-ink: #FFFFFF;
  --typ: #7D958E; --curve: #4F7068; --band: #DCE6E2; --grid: #E6ECE9;
  --exp-bg: #FBE7CF; --exp-fg: #7A4308; --ok-bg: #DDF0E5; --ok-fg: #1E5A38; --cold: #2F6F95;
  color-scheme: light;
}
html { height: 100%; scroll-padding-top: env(safe-area-inset-top, 0px); }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app { max-width: 440px; margin: 0 auto; padding: 16px 22px 40px; }
.screen { display: none; flex-direction: column; gap: 22px; }
.screen.active { display: flex; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: 0.02em; }
.topbar-right { display: flex; gap: 8px; align-items: center; min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 22px; border: none; background: var(--surface); color: var(--text); font-size: 15px; font-weight: 500; max-width: 230px; }
.pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 22px; border: none; background: var(--surface); color: var(--text); }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border: none; background: none; color: var(--soft); font-size: 16px; }
.icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.card { background: var(--surface); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.label { font-size: 13px; font-weight: 600; color: var(--muted); }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.display { font-family: var(--display); font-weight: 700; }
.divider { border-top: 1px solid var(--line); padding-top: 12px; }
.fine { font-size: 12px; color: var(--muted); }

.exp { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); font-size: 14px; color: var(--soft); }
.tag { flex-shrink: 0; padding: 2px 8px; border-radius: 6px; background: var(--exp-bg); color: var(--exp-fg); font-size: 12px; font-weight: 600; }
.tag.ok { background: var(--ok-bg); color: var(--ok-fg); }

.best { align-items: center; text-align: center; gap: 6px; padding: 22px 20px 18px; }
.best-day { font-size: 28px; line-height: 1; }
.best-gauge { display: block; width: 250px; max-width: 100%; height: auto; margin-top: 8px; }
.best-odds { font-size: 16px; margin-top: 10px; }
.best .why { justify-content: center; text-align: left; margin-top: 4px; max-width: 320px; }
.why { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.why .icon { margin-top: 3px; color: var(--accent); }
.why.cold .icon { color: var(--cold); }
.linkish { border: none; background: none; padding: 0; min-height: 36px; color: var(--accent); font-weight: 600; font-size: 15px; }

.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 10px; height: 10px; border-radius: 5px; background: var(--accent); }
.dot.past { background: none; border: 2px solid var(--muted); }
.swatch { width: 14px; height: 10px; border-radius: 2px; background: var(--band); }

.tl-scroll { overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; overscroll-behavior-x: contain; }
.tl-scroll::-webkit-scrollbar { display: none; }
.tl-inner { position: relative; }
.tl-inner svg { display: block; }
.tl-days { display: flex; }
.tl-day { scroll-snap-align: start; width: 56px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 60px; border-radius: 10px; border: none; background: none; color: var(--muted); font-size: 12px; padding: 4px 0; }
.tl-day b { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--text); line-height: 1.1; }
.tl-day small { font-size: 11px; }
.tl-day.past b { color: var(--muted); }
.tl-day.typ b { color: var(--muted); font-weight: 600; }
.tl-today { position: absolute; top: 0; bottom: 0; width: 52px; border-radius: 12px; background: var(--surface-2); z-index: 0; }
.tl-inner svg, .tl-days { position: relative; z-index: 1; }
.tl-day.today { color: var(--text); }
.tl-day.typ { opacity: 0.45; }
.tl-day.best b, .tl-day.best span { color: var(--accent); }
.tl-day:hover b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.swipe-hint { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 0 6px; }

.season-wrap { position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.season-wrap svg { display: block; width: 100%; height: auto; pointer-events: none; }
.season-touch { position: absolute; inset: 0; z-index: 2; touch-action: pan-y; -webkit-touch-callout: none; }
.zoom-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px; }
.zoom-btns { display: flex; gap: 6px; }
.zoom-btns button { min-width: 44px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: none; color: var(--soft); font-size: 15px; padding: 0 10px; }
.zoom-btns button:disabled { opacity: 0.4; }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; border-radius: 14px; border: none; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 17px; width: 100%; }
.btn:disabled { background: var(--surface); color: var(--muted); }
.btn.secondary { background: none; border: 1px solid var(--line); color: var(--text); }
.btn.dashed { background: none; border: 1px dashed var(--line); color: var(--soft); font-weight: 500; font-size: 15px; min-height: 48px; }

.detail-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 8px; }
.big-score { font-size: 150px; line-height: 0.95; }
.chip-bar { display: flex; align-items: center; gap: 10px; font-size: 15px; flex-wrap: wrap; justify-content: center; }
.chip { padding: 3px 10px; border-radius: 12px; background: var(--surface); font-weight: 600; }
.bar { position: relative; height: 10px; border-radius: 5px; background: var(--band); }
.bar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--accent); }
.bar .tick { position: absolute; top: -4px; width: 2px; height: 18px; background: var(--text); }
.chips { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px; }
.chips::-webkit-scrollbar { display: none; }
.chips button { scroll-snap-align: center; flex: 0 0 52px; min-height: 64px; border-radius: 12px; border: none; background: var(--surface); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 0; }
.chips button span { font-size: 12px; font-weight: 600; }
.chips button small { font-size: 11px; color: var(--muted); }
.chips button b { font-family: var(--display); font-weight: 700; font-size: 20px; }
.chips button.past b, .chips button.typ b { color: var(--muted); }
.chips button.typ { opacity: 0.5; }
.chips button.today { box-shadow: inset 0 0 0 1.5px var(--curve); }
.chips button[aria-pressed="true"] { opacity: 1; box-shadow: none; }
.chips button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.chips button[aria-pressed="true"] b, .chips button[aria-pressed="true"] small { color: var(--accent-ink); }

h1 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1.02; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > .label, .field > label { font-size: 14px; font-weight: 600; color: var(--soft); }
.seg { display: grid; gap: 8px; }
.seg button { min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 500; padding: 0 4px; }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.input { min-height: 52px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 17px; width: 100%; }
textarea.input { padding: 12px 14px; min-height: 88px; resize: vertical; font-size: 16px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stepper { display: flex; align-items: center; justify-content: space-between; padding: 4px; border-radius: 12px; background: var(--surface); }
.stepper.readonly { background: none; border: 1px dashed var(--line); }
.stepper button { width: 44px; height: 44px; border-radius: 10px; border: none; background: var(--surface-2); color: var(--text); font-size: 22px; line-height: 1; }
.stepper button:disabled { opacity: 0.3; }
.stepper output { font-family: var(--display); font-weight: 700; font-size: 28px; }
.stepper.readonly output { color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); }
.species { display: flex; flex-direction: column; gap: 4px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; }
.species-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 0 16px; border: none; background: none; color: var(--text); text-align: left; width: 100%; }
.species-toggle .chev { transition: transform 0.15s; }
.species-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.species-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.species-body h3 { margin: 10px 0 2px; font-size: 13px; font-weight: 600; color: var(--muted); }
.sp-row { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.sp-row .name { flex-grow: 1; font-size: 16px; }
.sp-row.zero .name, .sp-row.zero output { color: var(--muted); }
.sp-row button { width: 44px; height: 44px; border-radius: 10px; border: none; background: var(--surface); color: var(--text); font-size: 22px; line-height: 1; }
.sp-row button:disabled { opacity: 0.35; }
.sp-row button.plus { background: var(--surface-2); }
.sp-row output { width: 28px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 24px; }

.loc-item { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--surface); min-height: 64px; }
.loc-item.active { outline: 1.5px solid var(--accent); }
.loc-main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; border: none; background: none; text-align: left; padding: 6px 0; color: var(--text); }
.loc-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.loc-main .row { gap: 6px; }
.in-use { font-size: 12px; font-weight: 600; color: var(--accent); }

.hunt { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; background: var(--surface); border: none; color: var(--text); text-align: left; width: 100%; }
.hunt:hover { background: var(--surface-2); }
.hunt .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.totals { display: flex; flex-wrap: wrap; gap: 8px; }
.totals span { padding: 4px 10px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.empty { padding: 28px 18px; border-radius: 14px; border: 1px dashed var(--line); color: var(--soft); text-align: center; }
.proto-note { font-size: 12px; color: var(--muted); text-align: center; margin: 0; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 10px 14px 10px 16px; border-radius: 14px; background: var(--surface); border: none; color: var(--text); text-align: left; width: 100%; }
.switch-row .sub { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.switch { position: relative; flex-shrink: 0; width: 52px; height: 32px; border-radius: 16px; background: var(--surface-2); transition: background 0.15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 13px; background: var(--muted); transition: transform 0.15s, background 0.15s; }
.switch-row[aria-checked="true"] .switch { background: var(--accent); }
.switch-row[aria-checked="true"] .switch::after { transform: translateX(20px); background: var(--accent-ink); }
.code { font-family: var(--display); font-weight: 700; font-size: 46px; letter-spacing: 0.06em; line-height: 1; }
.gday { display: flex; flex-direction: column; gap: 8px; }
.gday-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 4px 0; }
.gentry { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: none; color: var(--text); text-align: left; width: 100%; font-size: 15px; }
button.gentry:hover { background: var(--surface-2); }
.gentry .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.gtag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--soft); font-size: 12px; font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 20px); max-width: 90vw; padding: 12px 18px; margin-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast, .species-toggle .chev, .switch, .switch::after { transition: none; } }

/* ---- additions for the real app (prototype look kept) ---- */
.sample-banner { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; text-align: center; line-height: 1.25; }
.sample-banner .icon { width: 16px; height: 16px; }
.notice { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--accent); font-size: 14px; color: var(--soft); }
.notice strong { color: var(--text); }
.updated { font-size: 12px; color: var(--muted); }
.tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sync-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--exp-bg); color: var(--exp-fg); font-size: 12px; font-weight: 600; }
.choices { display: flex; flex-direction: column; gap: 6px; }
.choices:empty { display: none; }
.choices button { min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; padding: 0 14px; font-size: 16px; }
.best-odds .star { color: var(--accent); }
.limit-fine { margin: 0; text-align: center; }
.btn.danger { background: none; border: 1px solid var(--line); color: var(--soft); font-weight: 500; }
.btn.danger.armed { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.code-input { text-transform: uppercase; letter-spacing: 0.08em; }
.empty.area { display: flex; flex-direction: column; gap: 8px; align-items: center; }
