/* Tightline — outdoor design system. Themes: sun (bright light, max contrast), indoor (soft light), dawn (dark), red (night vision). */
:root, [data-theme="sun"] {
  --bg: #FFFFFF; --surface: #FFFFFF; --surface2: #EEF3F4; --ink: #031014; --muted: #2C3F45; --line: #B9C7CB;
  --accent: #00616B; --accent-ink: #FFFFFF; --accent-text: #004A52; --good: #11692F; --good-bg: #D9F2E0; --bad: #A8231B; --bad-bg: #FBE3E0;
  --warn: #8A5A00; --focus: #0050D8; --shadow: 0 1px 0 rgba(0,0,0,.1);
  --s0: #00616B; --s1: #C2410C; --s2: #11692F; --s3: #6D28D9; --target: #F3F7F7;
  --great: #11692F; --goodb: #00616B; --fair: #A16207; --slow: #9A3412;
  color-scheme: light;
}
[data-theme="sun"] .card, [data-theme="sun"] .stat { border-width: 2.5px; border-color: #7F9399; }
[data-theme="indoor"] {
  --bg: #EDF2F2; --surface: #FAFCFC; --surface2: #E1E9EA; --ink: #10201F; --muted: #4A5D60; --line: #CBD6D8;
  --accent: #0F7C86; --accent-ink: #FFFFFF; --accent-text: #0B5F67; --good: #1C6E35; --good-bg: #DDF2E2; --bad: #A8231B; --bad-bg: #FBE3E0;
  --warn: #8A5A00; --focus: #0050D8; --shadow: 0 1px 2px rgba(16,32,31,.06), 0 4px 14px rgba(16,32,31,.06);
  --s0: #0F7C86; --s1: #D9622B; --s2: #1C6E35; --s3: #7A3DB8; --target: #F3F7F7;
  --great: #1C6E35; --goodb: #0F7C86; --fair: #B7791F; --slow: #B4532A;
  color-scheme: light;
}
[data-theme="dawn"] {
  --bg: #0B1416; --surface: #122023; --surface2: #1B2C30; --ink: #EEF6F5; --muted: #A9BFC0; --line: #2E4549;
  --accent: #4FD1C5; --accent-ink: #04201D; --accent-text: #7FE3D9; --good: #63D487; --good-bg: #173322; --bad: #FF7A6E; --bad-bg: #3A1714;
  --warn: #F2C14E; --focus: #7DB3FF; --shadow: 0 1px 0 rgba(0,0,0,.4);
  --s0: #4FD1C5; --s1: #FF9F5A; --s2: #63D487; --s3: #C9A2FF; --target: #1B2C30;
  --great: #63D487; --goodb: #4FD1C5; --fair: #F2C14E; --slow: #FF9F5A;
  color-scheme: dark;
}
[data-theme="red"] {
  --bg: #000000; --surface: #0E0000; --surface2: #1A0302; --ink: #FF4A3D; --muted: #C4362B; --line: #3D0B07;
  --accent: #FF4A3D; --accent-ink: #000; --accent-text: #FF6A5E; --good: #FF6A5E; --good-bg: #2A0503; --bad: #FFA197; --bad-bg: #2A0503;
  --warn: #FF6A5E; --focus: #FF8A80; --shadow: none;
  --s0: #FF4A3D; --s1: #B3261E; --s2: #FF8A80; --s3: #7A140D; --target: #140100;
  --great: #FF6A5E; --goodb: #FF4A3D; --fair: #C4362B; --slow: #7A140D;
  color-scheme: dark;
}
[data-theme="red"] img, [data-theme="red"] canvas, [data-theme="red"] .leaflet-tile-pane { filter: grayscale(1) brightness(.55) sepia(1) hue-rotate(-50deg) saturate(5); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 18px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-variant-numeric: tabular-nums;
  overflow-x: clip; min-height: 100dvh;
}
a { color: var(--accent-text); font-weight: 600; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; font-weight: 850; }
h2 { font-size: 1.3rem; font-weight: 800; }
h3 { font-size: 1.08rem; font-weight: 750; }
p { margin: 0 0 .75em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); } .small { font-size: .88rem; } .big { font-size: 1.4rem; font-weight: 800; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--surface); padding: 10px 14px; }
.skip:focus { left: 8px; }

/* ---- layout ---- */
#sidenav { display: none; }
#main { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); max-width: 980px; margin: 0 auto; outline: none; }
.page > * + * { margin-top: 16px; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: env(safe-area-inset-top); }
.pagehead h1 { margin: 0; }
.pagehead p { margin: 4px 0 0; }
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 2px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
#tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 64px; color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 700; gap: 2px; }
#tabs a .ni { font-size: 1.45rem; line-height: 1; }
#tabs a[aria-current="true"] { color: var(--accent-text); box-shadow: inset 0 3px 0 var(--accent); }
@media (min-width: 900px) {
  body { display: grid; grid-template-columns: 250px minmax(0, 1fr); }
  #tabs { display: none; }
  #sidenav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: 16px 12px; background: var(--surface); border-right: 2px solid var(--line); }
  #sidenav a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 650; }
  #sidenav a .ni { width: 24px; text-align: center; font-size: 1.2rem; }
  #sidenav a[aria-current="true"] { background: var(--surface2); color: var(--accent-text); box-shadow: inset 4px 0 0 var(--accent); }
  #sidenav a:hover { background: var(--surface2); }
  #sidenav .brand { font-size: 1.35rem; font-weight: 850; margin-bottom: 12px; color: var(--ink); }
  #sidenav .brand img { border-radius: 9px; }
  #main { padding: 28px 32px 48px; width: 100%; }
}

/* ---- surfaces ---- */
.card { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card.tap { cursor: pointer; transition: transform .08s, border-color .15s; }
.card.tap:hover { border-color: var(--accent); }
.card.tap:active { transform: scale(.99); }
.card h3 { margin: 0 0 4px; }
.cards { display: grid; gap: 12px; }
@media (min-width: 700px) { .cards.two, .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid2 { display: grid; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.hero { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.hero .muted { color: var(--accent-ink); opacity: .85; }
.callout { border-left: 6px solid var(--accent); background: var(--surface2); padding: 12px 14px; border-radius: 10px; }
.callout.good { border-color: var(--good); background: var(--good-bg); }
.callout.bad { border-color: var(--bad); background: var(--bad-bg); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 750; padding: 3px 9px; border-radius: 99px; background: var(--surface2); border: 1.5px solid var(--line); color: var(--ink); white-space: nowrap; }
.tag.good { background: var(--good-bg); border-color: var(--good); color: var(--good); }
.tag.bad { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.tag.acc { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cardrow { display: flex; gap: 12px; align-items: center; min-width: 0; }
.cardrow > .grow { flex: 1; min-width: 0; }
.cardrow .thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface2); }
.right-num { font-size: 1.5rem; font-weight: 850; text-align: right; flex: none; }
.right-num small { display: block; font-size: .72rem; font-weight: 700; color: var(--muted); }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 14px; border: 2px solid var(--ink);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 750; cursor: pointer; text-decoration: none; touch-action: manipulation; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
[data-theme="red"] .btn.danger { color: #000; }
.btn.ghost { border-color: var(--line); }
.btn.block { width: 100%; }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: .92rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { min-width: 48px; min-height: 48px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 1.1rem; font-weight: 800; cursor: pointer; }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .actions { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.action { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px; min-height: 92px; padding: 14px; border-radius: 16px; border: 2px solid var(--line);
  background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 800; }
.action .ai { font-size: 1.6rem; line-height: 1; }
.action.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---- forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field .lbl { font-weight: 750; font-size: .95rem; }
.field .hint { font-size: .82rem; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; min-height: 52px; padding: 10px 12px; width: 100%; min-width: 0; }
select { -webkit-appearance: none; appearance: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding-right: 40px; background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; }
textarea { min-height: 96px; resize: vertical; }
.fields { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fields > .full { grid-column: 1 / -1; }
@media (min-width: 700px) { .fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { flex: 1 1 auto; min-height: 48px; min-width: 56px; padding: 0 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 750; cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.stepper { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; gap: 6px; }
.stepper input { text-align: center; font-size: 1.4rem; font-weight: 850; }
.stepper button { min-height: 56px; border-radius: 12px; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); font-size: 1.6rem; font-weight: 800; cursor: pointer; }

/* ---- lists ---- */
.listbar { display: flex; gap: 8px; flex-wrap: wrap; }
.listbar .search { flex: 1 1 180px; }
.sortwrap { display: flex; gap: 6px; flex: 1 1 200px; }
.sortsel { flex: 1; min-width: 96px; }
/* hour bars are a chart: bars touch edge to edge so the whole strip is tappable, and Best times lists the same windows as full-size cards */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 99px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .92rem; font-weight: 700; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chips[hidden] { display: none; }
.filterbtn { min-height: 44px; white-space: nowrap; }
.filterbtn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.listmeta { margin: 10px 2px 8px; font-size: .85rem; color: var(--muted); font-weight: 650; }

/* ---- stats, bars, kv ---- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line); color: var(--ink); font: inherit; text-align: left; min-width: 0; }
.stat.tap { cursor: pointer; } .stat.tap:hover { border-color: var(--accent); }
.stat-v { font-size: 1.7rem; font-weight: 850; line-height: 1.1; }
.stat-l { font-size: .85rem; font-weight: 750; color: var(--muted); }
.stat-s { font-size: .78rem; color: var(--muted); }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: minmax(64px, auto) minmax(60px, 1fr) auto; gap: 10px; align-items: center; background: none; border: 0; padding: 4px 0; font: inherit; color: var(--ink); text-align: left; min-height: 44px; }
.bar.tap { cursor: pointer; }
.bar-l { font-weight: 800; }
.bar-t { position: relative; height: 22px; background: var(--surface2); border-radius: 8px; overflow: hidden; border: 1.5px solid var(--line); }
.bar-f { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.bar-f.good { background: var(--good); }
.bar-goal { position: absolute; top: -2px; bottom: -2px; width: 3px; background: var(--ink); }
.bar-v { font-weight: 800; text-align: right; }
.kv { display: grid; grid-template-columns: fit-content(55%) minmax(0, 1fr); gap: 6px 16px; margin: 0; }
/* long labels and long values: label on its own line, value under it */
.kv.stacked { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.kv.stacked dd { text-align: left; margin-bottom: 8px; }
.kv dt { color: var(--muted); font-weight: 650; }
.kv dd { margin: 0; font-weight: 750; text-align: right; overflow-wrap: break-word; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 10px 6px; border-bottom: 1.5px solid var(--line); text-align: right; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl th { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tbl td { font-weight: 750; }
.tbl tr.hl td { color: var(--accent-text); }

/* ---- charts ---- */
.chartwrap { width: 100%; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 10px; font-weight: 600; }
.chart .ln { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.chart .ln.s0, .sw.s0 { stroke: var(--s0); background: var(--s0); } .chart .dot.s0 { fill: var(--s0); }
.chart .ln.s1, .sw.s1 { stroke: var(--s1); background: var(--s1); } .chart .dot.s1 { fill: var(--s1); }
.chart .ln.s2, .sw.s2 { stroke: var(--s2); background: var(--s2); } .chart .dot.s2 { fill: var(--s2); }
.chart .ln.s3, .sw.s3 { stroke: var(--s3); background: var(--s3); } .chart .dot.s3 { fill: var(--s3); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .85rem; font-weight: 700; margin-top: 6px; }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---- states ---- */
.state { text-align: center; padding: 36px 16px; border: 2px dashed var(--line); border-radius: 16px; }
.state-icon { font-size: 2.4rem; margin-bottom: 8px; }
.state.error { border-color: var(--bad); background: var(--bad-bg); }
.state.loading { border: 0; }
.spinner { width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: var(--surface2); border-radius: 12px; min-height: 80px; }

/* ---- sheet ---- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); color: var(--ink); width: 100%; max-height: 92dvh; display: flex; flex-direction: column; border-radius: 20px 20px 0 0; border: 2px solid var(--line); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 18px; border-bottom: 2px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 1.2rem; }
.sheet-body { padding: 16px 18px calc(20px + env(safe-area-inset-bottom)); overflow-y: auto; }
.sheet-body > * + * { margin-top: 14px; }
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { width: 620px; border-radius: 20px; } .sheet.wide { width: 860px; } }

/* ---- toast ---- */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 60; display: grid; gap: 8px; width: min(92vw, 440px); }
.toast { background: var(--ink); color: var(--bg); padding: 14px 16px; border-radius: 14px; font-weight: 700; box-shadow: 0 6px 24px rgba(0,0,0,.3); transition: opacity .3s; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.out { opacity: 0; }
.toast:has(.toastbtn) { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.toastbtn { flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.toastbtn:focus-visible { outline: 3px solid var(--bg); outline-offset: 2px; }

/* ---- scene ---- */
.scene { width: 100%; border-radius: 16px; overflow: hidden; border: 2px solid var(--line); display: block; }
.scene svg { display: block; width: 100%; height: auto; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print { #tabs, #sidenav { display: none; } }

/* home + more */
h2.section { margin: 22px 0 10px; font-size: 1.1rem; }
.moregrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .moregrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.right-num.good { color: var(--good); }
details > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
tr.tap { cursor: pointer; }


/* ================= Tightline ================= */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.stack.tight > * + * { margin-top: 6px; }
.chev { color: var(--muted); font-size: 1.2rem; }
.bigicon { font-size: 1.8rem; line-height: 1; width: 40px; text-align: center; flex: none; }

/* top bar (phones) */
#topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: var(--surface); border-bottom: 2px solid var(--line); }
.topbrand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.topbrand img { border-radius: 8px; }
.topbrand span { font-size: 1.2rem; font-weight: 850; letter-spacing: -.01em; }
#topbar .icon-btn { width: 48px; height: 48px; font-size: 1.3rem; }
@media (min-width: 900px) { #topbar { display: none; } }
.pagehead { padding-top: 0; }

/* sub-tabs keep each screen to one phone screen */
.tabset > .subtabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 -2px; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button { flex: 1 0 auto; min-height: 48px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 750; font-size: .95rem; cursor: pointer; white-space: nowrap; }
.subtabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tabbody { margin-top: 14px; }
.tabbody > * + * { margin-top: 14px; }

/* today */
.todayhead .spotbtn { display: flex; align-items: center; max-width: 100%; min-height: 48px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 1.6rem; font-weight: 850; letter-spacing: -.01em; cursor: pointer; text-align: left; }
.todayhead .spotbtn span:last-child { color: var(--accent-text); flex: none; }
.cond > * + * { margin-top: 14px; }
.cond.busy { opacity: .6; }
.updated { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; font-weight: 650; }
.updated .icon-btn { margin-left: auto; }
.icon-btn.sm { width: 44px; height: 44px; font-size: 1.15rem; }
.hero-bite { position: relative; display: block; width: 100%; padding: 0; border: 3px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--surface2); cursor: pointer; color: #fff; text-align: left; font: inherit; }
.hero-bite .scene { border: 0; border-radius: 0; }
.hero-bite .scene svg { aspect-ratio: 16 / 7; object-fit: cover; }
.hero-over { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; gap: 14px; padding: 14px 16px; background: linear-gradient(transparent, rgba(0,0,0,.72)); }
.score { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 92px; padding: 8px 12px; border-radius: 16px; background: var(--lvl, #0F7C86); color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.score .n { font-size: 2.6rem; font-weight: 900; line-height: 1; }
.score .l { font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.hero-side { display: flex; flex-direction: column; gap: 2px; min-width: 0; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.hero-side .why { font-weight: 800; font-size: 1.05rem; }
.lvl-great { --lvl: var(--great); } .lvl-good { --lvl: var(--goodb); } .lvl-fair { --lvl: var(--fair); } .lvl-slow { --lvl: var(--slow); }
.right-num.lvl-great, .right-num.lvl-good, .right-num.lvl-fair, .right-num.lvl-slow { color: var(--lvl); }
.fishline { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.chip.fishchip { min-height: 48px; font-size: 1rem; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tiles .stat { min-height: 96px; }
.tiles .stat-v { font-size: 1.45rem; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.skel.hero-skel { height: 190px; border-radius: 20px; }
.tiles .skel { height: 96px; border-radius: 14px; }

.hourbars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(16px, 1fr); gap: 0; align-items: end; height: 150px; overflow-x: auto; padding-bottom: 22px; position: relative; }
.hb { position: relative; height: 100%; border: 0; background: none; padding: 0 1.5px; display: flex; align-items: flex-end; cursor: pointer; }
.hbf { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--lvl); }
.hb.top .hbf { box-shadow: 0 0 0 2px var(--ink); }
.hbl { position: absolute; top: calc(100% + 4px); left: 0; font-size: .72rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.legend .sw.lvl-great, .legend .sw.lvl-good, .legend .sw.lvl-fair, .legend .sw.lvl-slow { background: var(--lvl); }
.reasons { display: grid; gap: 6px; }
.reason { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface2); }
.reason b.up { color: var(--good); } .reason b.down { color: var(--bad); } .reason b.flat { color: var(--muted); }
.card.compact { padding: 10px 14px; border-radius: 12px; }
.card.win { border-left: 8px solid var(--lvl); }
.card.lure .tag:empty { display: none; }

/* pickers */
.pickgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 700px) { .pickgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pick { min-height: 56px; padding: 8px 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 750; cursor: pointer; text-align: center; }
.pick[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pick[aria-pressed="true"]::before { content: "✓ "; }
.pickrow { display: block; width: 100%; text-align: left; font: inherit; color: var(--ink); }
.pickrow[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.favcard .right-num { min-width: 64px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 700; }
.check input { width: 26px; height: 26px; accent-color: var(--accent); }

/* maps */
body[data-view="map"] #main { padding: 0; max-width: none; }
.mappage { position: relative; }
.mapfull { height: calc(100dvh - 64px - 66px - env(safe-area-inset-bottom) - env(safe-area-inset-top)); min-height: 320px; background: var(--surface2); }
@media (min-width: 900px) { .mapfull { height: 100dvh; } }
.minimap { height: 300px; border-radius: 16px; overflow: hidden; border: 2px solid var(--line); background: var(--surface2); }
.mapbtns { position: absolute; left: 12px; right: 12px; bottom: 30px; z-index: 500; display: flex; gap: 10px; justify-content: space-between; pointer-events: none; }
.mapbtn { pointer-events: auto; min-width: 56px; min-height: 56px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 1.5rem; font-weight: 800; box-shadow: 0 2px 10px rgba(0,0,0,.25); cursor: pointer; }
.mapbtn.wide { font-size: 1.05rem; padding: 0 18px; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.mapseg { display: flex; border-radius: 12px; overflow: hidden; border: 2px solid var(--line); background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.mapseg button { min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--ink); font: 700 .9rem system-ui, sans-serif; cursor: pointer; }
.mapseg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.leaflet-container { font: inherit; background: var(--surface2); }
.leaflet-bar a { width: 40px !important; height: 40px !important; line-height: 40px !important; font-size: 20px !important; }
.leaflet-popup-content { margin: 12px 14px; font-size: 1rem; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
.pop { display: grid; gap: 6px; min-width: 170px; }
.pin { display: grid !important; place-items: center; border-radius: 50%; border: 3px solid #fff; font-size: 17px; font-weight: 900; line-height: 1; box-shadow: 0 2px 6px rgba(0,0,0,.45); color: #fff; }
.pin-fav { background: #E8590C; } .pin-catch { background: #1C6E35; } .pin-feat { background: #1F4E79; } .pin-me { background: #0050D8; font-size: 12px; } .pin-water { background: #0F7C86; }
.progress { height: 12px; border-radius: 6px; background: var(--surface2); overflow: hidden; border: 1px solid var(--line); }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* fish */
.fishimg { display: block; width: 100%; max-width: 160px; aspect-ratio: 5 / 2; object-fit: contain; border-radius: 10px; background: #FFFFFF; }
.fishimg.big { max-width: none; aspect-ratio: 5 / 2; }
.fishimg.drawn { display: grid; place-items: center; background: var(--surface2); }
.fishimg.drawn svg { width: 100%; height: 100%; }
.fishsvg { width: 100%; height: auto; display: block; }
.fishsvg .focus { stroke: #E8590C !important; stroke-width: 3.2 !important; }
.fishrow { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left; font: inherit; color: var(--ink); width: 100%; }
.fishrow .fishimg { max-width: 120px; }
.fishgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .fishgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fishcard { display: flex; flex-direction: column; gap: 6px; text-align: left; font: inherit; color: var(--ink); padding: 10px; }
.fishcard .fishimg { max-width: none; }
.keyq h2 { margin: 6px 0 12px; }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.answer { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 10px; min-height: 120px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 750; cursor: pointer; text-align: center; }
.answer svg { background: var(--surface2); border-radius: 10px; }
.answer[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
@media (min-width: 700px) { .answers { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* log */
.cardrow .thumb { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--surface2); font-size: 1.6rem; overflow: hidden; }
.fishthumb .fishimg { max-width: none; height: 100%; aspect-ratio: auto; border-radius: 0; }
.photo { width: 100%; border-radius: 14px; display: block; }
.photoprev img { max-width: 100%; max-height: 220px; border-radius: 12px; margin-top: 8px; display: block; }

/* knots */
.knotstep { padding: 16px; border-radius: 16px; background: var(--surface2); text-align: center; }
.knotart { width: 100%; max-width: 360px; height: auto; display: block; margin: 0 auto 8px; }
.knotart .k-eye, .knotart .k-shank { stroke: var(--muted); stroke-width: 5; fill: none; stroke-linecap: round; }
.knotart .k-line { stroke: var(--accent); stroke-width: 4; fill: none; stroke-linecap: round; }
.knotart .k-wrap { stroke: var(--accent); stroke-width: 4; fill: none; }
.knotart .k-done { stroke: var(--good); stroke-width: 6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.stepnum { font-weight: 800; color: var(--muted); }
.steptext { font-size: 1.35rem; font-weight: 750; line-height: 1.3; margin: 6px 0 0; }
.dots { display: flex; gap: 4px; }
.dot { display: block; width: 18px; height: 44px; position: relative; }
.dot::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--line); }
.dot.on::after { background: var(--accent); }

/* more */
.moretile { display: flex; flex-direction: column; gap: 6px; min-height: 120px; text-decoration: none; color: var(--ink); }
.moretile .bigicon { width: auto; text-align: left; }
button.moretile { font: inherit; text-align: left; width: 100%; cursor: pointer; align-items: flex-start; }
.linkcard { text-decoration: none; color: var(--ink); }

/* wordmark lockup: mark + "Tight" in ink, "line" in the accent */
.wordmark { font-weight: 850; letter-spacing: -.02em; }
.wordmark b { font-weight: inherit; color: var(--accent-text); }
#sidenav .brand { display: flex; align-items: center; gap: 10px; }
#sidenav .brand img, .topbrand img { border-radius: 22%; }
