:root {
  --bg: #F3F5F2; --card: #FFFFFF; --line: #DCE2DE; --line2: #EEF1EF;
  --ink: #12201B; --muted: #52615B; --accent: #0B6B5A; --accent-ink: #084F43; --accent-soft: #E2F0EC;
  --warn: #B4531A; --warn-ink: #8F4114; --cool: #2F5E8C;
  --radius: 14px;
  --display: "Barlow Condensed", "Avenir Next Condensed", "Arial Narrow", -apple-system, system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1513; --card: #17211E; --line: #2A3732; --line2: #213029;
    --ink: #E8EEEA; --muted: #9DACA6; --accent: #2FB592; --accent-ink: #7FDCC2; --accent-soft: #173A31;
    --warn: #E0874F; --warn-ink: #F0A779; --cool: #8AB6E0;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.4 var(--body); -webkit-tap-highlight-color: transparent; }
body.sheet-open { overflow: hidden; }
main { max-width: 560px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 96px); }
.screen { display: flex; flex-direction: column; gap: 14px; }
h1 { margin: 0; font: 700 34px/1.05 var(--display); letter-spacing: .01em; }
h2 { margin: 0; font: 700 22px/1.15 var(--display); }
p { margin: 0; }
a { color: var(--accent); }
.top { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.row.baseline { align-items: baseline; }
.row.wrap { flex-wrap: wrap; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }
.muted { color: var(--muted); }
.small { font-size: 14px; } .xsmall { font-size: 12px; }
.b { font-weight: 600; }
.label { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .03em; }
.eyebrow { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.big { font: 700 34px/1 var(--display); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hidden-file { display: none; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.card.flush { padding: 0; overflow: hidden; }
.badge { font-size: 12px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 999px; padding: 3px 10px; }
.badge.warm { background: var(--warn); } .badge.cool { background: var(--cool); }
.spark svg { display: block; }
.notice { background: var(--accent-soft); color: var(--ink); border-radius: 12px; padding: 10px 12px; font-size: 14px; display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px; text-align: center; font: inherit; color: inherit; }
.tile.tap { cursor: pointer; border-color: var(--accent); }
.tv { font-weight: 700; font-size: 16px; } .tv.sm { font-size: 14px; }

.btn { min-height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 600 15px var(--body); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.btn.small { min-height: 40px; padding: 0 12px; font-size: 14px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.warn { border: 2px solid var(--warn); color: var(--warn-ink); background: var(--card); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.huge { min-height: 56px; font: 700 20px var(--display); letter-spacing: .03em; border-radius: 14px; }
.btn:disabled { opacity: .45; }
.icon-btn { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.ic { display: inline-flex; }
.linkish { background: none; border: 0; color: var(--accent); font: 600 15px var(--body); padding: 8px 4px; min-height: 40px; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border: 1px solid var(--accent); border-radius: 12px; overflow: hidden; }
.seg button { min-height: 44px; border: 0; background: var(--card); color: var(--ink); font: 600 15px var(--body); padding: 0 6px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 400 15px var(--body); }
.chip.on { border: 2px solid var(--accent); background: var(--accent-soft); font-weight: 600; }
.chip.dashed { border: 1px dashed var(--accent); color: var(--accent); background: transparent; font-weight: 600; }
.kitchip { display: inline-flex; align-items: center; }
.kitmore { border: 0; background: none; color: var(--muted); font-size: 20px; width: 32px; min-height: 40px; }
.tag { font-size: 13px; padding: 5px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.tag.good { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); font-weight: 600; }
.good { color: var(--accent); font-weight: 600; } .bad { color: var(--warn-ink); font-weight: 600; }
.using { font-size: 14px; color: var(--accent); text-decoration: none; font-weight: 600; }

.thumb { border-radius: 10px; object-fit: cover; background: var(--line2); flex-shrink: 0; }
.thumb.lg { width: 96px; height: 72px; } .thumb.sm { width: 48px; height: 36px; } .thumb.xl { width: 100%; max-height: 180px; object-fit: contain; }
.thumb.empty { display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); border: 1px dashed var(--line); text-align: center; padding: 2px; }
.pickcard { border: 2px solid var(--accent); }
.lurename { font: 700 24px/1.1 var(--display); }
.retrieve { font: 700 22px/1.15 var(--display); }
.rodline { display: flex; gap: 8px; align-items: center; background: var(--bg); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.speedbar .bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 4px; }
.speedbar .bars div { height: 8px; border-radius: 4px; background: var(--line); }
.speedbar .bars div.on { background: var(--accent); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.listrow { display: flex; justify-content: space-between; gap: 10px; align-items: center; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font: inherit; color: inherit; }
.card.flush .listrow { border: 0; border-bottom: 1px solid var(--line2); border-radius: 0; }
.listrow.static { cursor: default; }

.grouphead { display: flex; justify-content: space-between; padding: 8px 12px; background: var(--bg); border-bottom: 1px solid var(--line2); font-size: 12px; font-weight: 700; color: var(--muted); }
.lurerow, .catchrow { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line2); }
.check { display: flex; align-items: center; justify-content: center; width: 32px; height: 44px; }
.check input { width: 24px; height: 24px; accent-color: var(--accent); }
.lureinfo { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 4px 0; font: inherit; color: inherit; }
.select, .input { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 16px var(--body); padding: 0 12px; width: 100%; }
.selectwrap .select { width: auto; }
.big-input { font-size: 28px; width: 140px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.catgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.catbtn { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 14px/1.15 var(--body); padding: 4px; }
.catbtn.on { border: 2px solid var(--accent); background: var(--accent-soft); font-weight: 600; }
.cropper { width: 100%; height: auto; border-radius: 12px; touch-action: none; display: block; background: #000; }
.catch-photo { width: 100%; border-radius: 12px; max-height: 260px; object-fit: cover; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
.tabs a { min-height: 58px; display: flex; align-items: center; justify-content: center; color: var(--muted); text-decoration: none; font-size: 14px; border-top: 3px solid transparent; }
.tabs a.on { color: var(--accent); font-weight: 700; border-top-color: var(--accent); }

.sheet-back { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 20px 16px calc(env(safe-area-inset-bottom) + 20px); }
#toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 76px); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; opacity: 0; transition: .2s; pointer-events: none; z-index: 30; max-width: 90vw; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
