/* FishPicker. The tank is the one loud thing on every page; everything around it stays quiet. */
:root {
  --bg: #F2F6F7; --surface: #FFFFFF; --sunk: #E6EEF0;
  --ink: #0B2832; --muted: #55707A; --rule: #D3DFE2;
  --accent: #0A7B83; --accent-ink: #FFFFFF; --accent-soft: #D8F0F1;
  --shop: #C9431B;
  --ok: #177245; --ok-bg: #DCF2E5; --warn: #855600; --warn-bg: #FBEAC6; --crit: #B3261E; --crit-bg: #FBE0DD;
  --tank-top: #C3E5EB; --tank-bot: #62AABB; --sand: #D9C7A0; --wood: #6B4A32;
  --shadow: 0 1px 2px rgba(11, 40, 50, 0.06), 0 10px 28px rgba(11, 40, 50, 0.10);
  --display: "Schibsted Grotesk", "Trebuchet MS", "Segoe UI", sans-serif;
  --body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: var(--body);
  --head-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071518; --surface: #0F2227; --sunk: #0A1B1F;
    --ink: #E3EEF0; --muted: #8FA9B0; --rule: #21393F;
    --accent: #4CC6CF; --accent-ink: #052226; --accent-soft: #12353A;
    --shop: #FF9A76;
    --ok: #62D39A; --ok-bg: #11301F; --warn: #EDB95A; --warn-bg: #3A2C0E; --crit: #FF968C; --crit-bg: #421A17;
    --tank-top: #1F5969; --tank-bot: #0C2A33; --sand: #74674A; --wood: #4A3424;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--head-h) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--body); -webkit-text-size-adjust: 100%; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.12; text-wrap: balance; letter-spacing: -0.015em; }
h2 { font-size: 24px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
img { max-width: 100%; }
.muted { color: var(--muted); } .small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---- frame ---- */
.site-head { background: var(--surface); border-bottom: 1px solid var(--rule); }
.site-head .in { max-width: 1200px; margin: 0 auto; min-height: var(--head-h); display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); }
.logo { display: inline-flex; align-items: center; gap: 9px; font: 800 24px var(--display); letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.logo svg { width: 30px; height: 30px; flex: none; }
.nav { display: flex; gap: 2px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { font-weight: 600; font-size: 15px; color: var(--muted); text-decoration: none; padding: 9px 13px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--sunk); }
.nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); }
.wrap { max-width: 1200px; margin: 0 auto; padding-block: 28px 56px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 40px; }
.wrap.app { max-width: 1480px; padding-block: 18px 56px; }
.wrap.app .view { gap: 16px; }
.site-head.app .in { max-width: 1480px; }
.view { display: flex; flex-direction: column; gap: 36px; min-width: 0; }
.site-foot { border-top: 1px solid var(--rule); padding-top: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--muted); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-foot a, .foot a { color: var(--muted); }
.site-foot p { max-width: 80ch; }
.foot { font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 900px) { .site-head { position: sticky; top: 0; z-index: 20; } }

/* ---- shared pieces ---- */
.pitch { font: 800 clamp(32px, 5.2vw, 54px)/1.04 var(--display); letter-spacing: -0.03em; max-width: 16ch; }
.pitch.wide { max-width: 22ch; }
.pitch-sub { color: var(--muted); font-size: 18px; max-width: 56ch; margin-top: 12px; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.link { font-weight: 600; font-size: 15px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 18px; }
.btn { font: 600 15px var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; padding: 9px 18px; min-height: 42px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.quiet { background: none; border-color: transparent; color: var(--muted); padding-inline: 8px; }
.btn.quiet:hover { color: var(--ink); }
.shop { color: var(--shop); font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.chip { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.chip.warn { background: var(--warn-bg); color: var(--warn); } .chip.info { background: var(--accent-soft); color: var(--accent); }
.pills { display: flex; flex-wrap: wrap; gap: 5px; }
.pills span { font-size: 12.5px; font-weight: 500; color: var(--muted); background: var(--sunk); border-radius: 6px; padding: 2px 7px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; font-size: 14.5px; }
.seg { display: inline-flex; background: var(--sunk); border-radius: 999px; padding: 3px; }
.seg button { font: 600 13.5px var(--body); border: 0; background: transparent; color: var(--muted); padding: 6px 12px; cursor: pointer; border-radius: 999px; min-height: 32px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(11, 40, 50, 0.15); }
.step { display: inline-flex; align-items: center; gap: 6px; }
.step button { font: 700 17px var(--body); width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); cursor: pointer; }
.step button:hover { border-color: var(--ink); }
.step .num { min-width: 2.2ch; text-align: center; font-weight: 700; font-size: 16px; }
.issues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.issues li { padding: 9px 12px; border-radius: 10px; font-size: 14.5px; }
.issues .crit { background: var(--crit-bg); color: var(--crit); } .issues .warn { background: var(--warn-bg); color: var(--warn); } .issues .ok { background: var(--ok-bg); color: var(--ok); }

/* ---- lists and cards on content pages ---- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.rows li { border-bottom: 1px solid var(--rule); padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; }
.rows .who { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rows .who b { font-weight: 700; font-size: 17px; }
.rows .who > span { font-size: 14.5px; color: var(--muted); }
.rows .do { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rows a.title { color: var(--ink); text-decoration: none; } .rows a.title:hover b { text-decoration: underline; }
.rows.tips li { display: block; max-width: 72ch; }
.spr { flex: none; width: 72px; height: 50px; border-radius: 10px; background: var(--tank-bot) url(/assets/img/decor/water.webp) center / cover; display: grid; place-items: center; overflow: hidden; }
.spr img { display: block; width: 86%; height: 86%; object-fit: contain; }
.spr.big { width: 100%; height: 132px; border-radius: 12px; }
.parade { display: flex; flex-wrap: wrap; gap: 10px; } .parade .spr { width: 96px; height: 64px; } .prose .parade a { display: block; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card > a:first-child { display: block; }
.card h3 a.plain { color: var(--ink); text-decoration: none; } .card h3 a.plain:hover { text-decoration: underline; }
.card .do { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; padding-top: 4px; }
.card.pad { padding: 18px; gap: 10px; }
.plainlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.taglist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.taglist a { display: inline-block; border: 1px solid var(--rule); border-radius: 999px; padding: 8px 14px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15px; background: var(--surface); }
.taglist a:hover { border-color: var(--ink); }
.prose { max-width: 68ch; display: flex; flex-direction: column; gap: 14px; font-size: 17px; }
.prose h2 { font-size: 23px; margin-top: 10px; }
.prose ol, .prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.prose-line { max-width: 64ch; }

/* ---- home ---- */
.home-hero { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .home-hero { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 44px; } }
.tank-shot { display: block; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); line-height: 0; }
.tank-shot img { width: 100%; height: auto; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 28px; counter-reset: step; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 3px solid var(--accent); }
.steps li::before { content: counter(step); font: 800 15px var(--display); color: var(--accent); }
.steps b { font: 700 19px var(--display); }
.steps span { color: var(--muted); }

/* ---- fish, plant and pairing pages ---- */
.hero-img { background: var(--tank-bot) url(/assets/img/decor/water.webp) center / cover; border-radius: 20px; height: clamp(200px, 40vw, 360px); display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: var(--shadow); }
.hero-img img { width: 80%; height: 84%; min-height: 0; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(0, 20, 30, 0.35)); }
.detail { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .detail { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; } .detail .hero-img { position: sticky; top: calc(var(--head-h) + 20px); } }
.pair-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pair-hero .hero-img { height: clamp(120px, 26vw, 260px); }
.facts-table, .compare { width: 100%; border-collapse: collapse; }
.facts-table th, .facts-table td, .compare th, .compare td { text-align: left; padding: 11px 12px 11px 0; border-bottom: 1px solid var(--rule); vertical-align: top; font-variant-numeric: tabular-nums; }
.facts-table th, .compare tbody th { color: var(--muted); font-weight: 500; width: 40%; }
.facts-table td { font-weight: 600; }
.compare { min-width: 520px; } .compare thead th { font: 700 17px var(--display); }
.verdict-box { border-radius: 20px; padding: 22px 24px; display: flex; flex-direction: column; gap: 4px; }
.verdict-box b { font: 800 40px/1.05 var(--display); letter-spacing: -0.03em; }
.verdict-box p { color: var(--ink); max-width: 60ch; font-size: 17px; }
.verdict-box.yes { background: var(--ok-bg); color: var(--ok); } .verdict-box.care { background: var(--warn-bg); color: var(--warn); } .verdict-box.no { background: var(--crit-bg); color: var(--crit); }
.matrix-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 16px; background: var(--surface); }
.matrix-wrap.flat { border: 0; background: none; border-radius: 0; }
.matrix { border-collapse: collapse; font-size: 13px; }
.matrix th.col { writing-mode: vertical-rl; transform: rotate(180deg); text-align: left; white-space: nowrap; padding: 12px 6px; font-weight: 600; vertical-align: top; }
.matrix th.row { text-align: left; white-space: nowrap; padding: 0 14px; position: sticky; left: 0; background: var(--surface); font-weight: 600; }
.matrix th.row a { color: var(--ink); text-decoration: none; }
.matrix td { padding: 1px; }
.cell { display: inline-block; width: 30px; height: 30px; line-height: 30px; text-align: center; text-decoration: none; font-weight: 700; font-size: 13px; border-radius: 6px; }
.cell.yes { background: var(--ok-bg); color: var(--ok); } .cell.care { background: var(--warn-bg); color: var(--warn); } .cell.no { background: var(--crit-bg); color: var(--crit); } .cell.none { color: var(--muted); }
a.cell:hover { outline: 2px solid var(--ink); }
p.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-size: 14px; }
p.legend > span { display: inline-flex; align-items: center; gap: 8px; }

/* ---- planner ---- */
.pl-top { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.pl-top h1 { font-size: clamp(24px, 3vw, 30px); font-weight: 800; letter-spacing: -0.02em; }
.pl { display: flex; flex-direction: column; gap: 18px; }
.pl-tank { display: contents; }
.tank-stick { position: sticky; top: 0; z-index: 10; background: var(--bg); padding-bottom: 6px; margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); }
.scene { position: relative; background: var(--tank-bot); overflow: hidden; line-height: 0; }
.scene canvas { display: block; width: 100%; aspect-ratio: 16 / 10; max-height: 46vh; }
.tank-tag { position: absolute; left: 12px; top: 12px; line-height: 1.2; font-size: 13px; font-weight: 700; color: #FFFFFF; background: rgba(4, 22, 28, 0.55); border-radius: 999px; padding: 5px 11px; }
.strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px max(16px, env(safe-area-inset-right, 0px)) 9px max(16px, env(safe-area-inset-left, 0px)); font-size: 14.5px; line-height: 1.3; background: var(--sunk); color: var(--ink); }
.strip b { font-weight: 700; } .strip span { font-variant-numeric: tabular-nums; white-space: nowrap; }
.strip.ok { background: var(--ok-bg); color: var(--ok); } .strip.warn { background: var(--warn-bg); color: var(--warn); } .strip.crit { background: var(--crit-bg); color: var(--crit); }
.tank-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, auto)); justify-content: start; gap: 12px 26px; background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 14px 16px; }
.ctl { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ctl.full { grid-column: 1 / -1; }
.ctl-name { font-size: 13px; font-weight: 600; color: var(--muted); }
.picks { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { font: 600 14px var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 7px 11px; min-height: 38px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.pick:hover { border-color: var(--ink); }
.pick[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sw { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.25); flex: none; }
.sw.sand { background: #E3D2AC; } .sw.gravel { background: #9C7B56; } .sw.soil { background: #3A2C22; }
.switch { display: inline-flex; align-items: center; gap: 9px; min-height: 38px; font-weight: 600; font-size: 14px; cursor: pointer; }
.switch input, .check input { width: 20px; height: 20px; accent-color: var(--accent); }
.tank-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; }
.tank-foot .btn { min-height: 38px; padding: 7px 14px; font-size: 14px; }
#shareUrl { font: 400 14px var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 9px 11px; width: 100%; }
.pl-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.verdict h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.verdict.ok h2 { color: var(--ok); } .verdict.warn h2 { color: var(--warn); } .verdict.crit h2 { color: var(--crit); }
.meter { height: 12px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.meter div { height: 100%; border-radius: 999px; background: var(--ok); }
.meter div.warn { background: var(--warn); } .meter div.crit { background: var(--crit); }
@media (prefers-reduced-motion: no-preference) { .meter div { transition: width 0.3s ease; } }
.meter-line { font-size: 14.5px; margin-top: -6px; } .meter-line span { color: var(--muted); }
.targets { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.targets div { background: var(--sunk); border-radius: 12px; padding: 10px 12px; }
.targets dt { font-size: 13px; color: var(--muted); font-weight: 500; }
.targets dd { margin: 0; font: 700 20px var(--display); font-variant-numeric: tabular-nums; }
.mine-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mine-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 9px 0; border-top: 1px solid var(--rule); }
.mine-list li:first-child { border-top: 0; padding-top: 0; }
.mine-list .spr { width: 56px; height: 40px; }
.mine-list .nm { display: flex; flex-direction: column; min-width: 0; }
.mine-list .nm a { color: var(--ink); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; line-height: 1.25; }
.mine-list .nm a:hover { text-decoration: underline; }
.mine-list .nm a.shop { font-size: 13px; color: var(--shop); text-decoration: underline; }
.mine-list .empty { display: block; color: var(--muted); }
.plant-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.plant-chips button { font: 500 14px var(--body); color: var(--ink); background: var(--sunk); border: 0; border-radius: 999px; padding: 6px 10px 6px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; }
.plant-chips button:hover { background: var(--rule); }
.plant-chips i { font-style: normal; font-weight: 700; color: var(--muted); }
.picker-top { display: flex; flex-direction: column; gap: 12px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--rule); }
.tabs button { font: 700 16px var(--display); color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 4px; margin: 0 14px -1px 0; cursor: pointer; }
.tabs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.picker-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.picker-tools input[type="search"] { font: 400 16px var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; padding: 9px 16px; min-height: 42px; flex: 1 1 180px; min-width: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 500; cursor: pointer; min-height: 42px; }
.pgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.pcard { background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.pcard.in { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pcard.off .pimg, .pcard.off .pname { opacity: 0.55; }
.pimg { display: block; height: 96px; border-radius: 10px; background: var(--tank-bot) url(/assets/img/decor/water.webp) center / cover; overflow: hidden; }
.pimg img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.pname { font: 700 16.5px/1.2 var(--display); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.pname:hover { text-decoration: underline; }
.match { font-size: 13.5px; font-weight: 600; line-height: 1.3; display: flex; gap: 7px; align-items: baseline; }
.match::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; transform: translateY(-1px); }
.match.ok { color: var(--ok); } .match.warn { color: var(--warn); } .match.crit { color: var(--crit); }
.pact { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pact .btn { flex: 1 1 auto; min-height: 40px; padding: 7px 12px; }
.pick-empty { color: var(--muted); padding: 18px 0; }
@media (min-width: 1000px) {
  .pl { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(380px, 1fr); gap: 28px; align-items: start; }
  .pl-tank { display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--head-h) + 16px); min-width: 0; }
  .tank-stick { position: static; padding: 0; margin: 0; background: none; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
  .scene canvas { aspect-ratio: 3 / 2; max-height: calc(100vh - var(--head-h) - 350px); min-height: 260px; }
  .strip { padding-inline: 18px; font-size: 15.5px; }
}

/* ---- small moments ---- */
.scene canvas { cursor: pointer; touch-action: manipulation; }
.tank-btn { position: absolute; right: 12px; top: 12px; font: 700 13px/1.2 var(--body); color: #FFFFFF; background: rgba(4, 22, 28, 0.55); border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.tank-btn:hover { background: rgba(4, 22, 28, 0.8); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 40; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 10px 10px 10px 18px; font-size: 14.5px; font-weight: 500; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.toast button { font: 700 14px var(--body); color: var(--ink); background: var(--bg); border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.hero-img.flip img { scale: -1 1; }
@media (prefers-reduced-motion: no-preference) {
  .strip.pop { animation: pop 0.45s ease-out; }
  .pcard.just { animation: pop 0.35s ease-out; }
  .toast { animation: rise 0.2s ease-out; }
  .hero-img.swim img { animation: swim 6s ease-in-out infinite; }
  .hero-img.swim.flip img { animation-delay: -3s; }
  @keyframes pop { 0% { transform: scale(0.97); } 55% { transform: scale(1.015); } 100% { transform: none; } }
  @keyframes rise { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translateX(-50%); } }
  @keyframes swim { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -9px; rotate: -1.5deg; } }
}

/* ---- shopping list ---- */
.gear { list-style: none; margin: 0; padding: 0; }
.gear li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--rule); align-items: baseline; }
.gear li:first-child { border-top: 0; padding-top: 0; }
.gear .gn { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.gear .gn b { font-weight: 700; }
.gear .gn span { font-variant-numeric: tabular-nums; }
.gear .gw { grid-column: 1; grid-row: 2; font-size: 13.5px; color: var(--muted); }
.gear .shop { grid-row: 1 / span 2; grid-column: 2; align-self: center; }

/* ---- calculators, cycle tracker, two-fish checker ---- */
.panel h2 { font-size: 22px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 16px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; color: var(--muted); }
.field input, .field select, .save-row input { font: 400 16px var(--body); color: var(--ink); background: var(--bg); border: 1px solid var(--rule); border-radius: 10px; padding: 9px 12px; min-height: 44px; width: 100%; }
.units { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14.5px; }
.units legend { padding: 0; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.units label { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; cursor: pointer; }
.units input { accent-color: var(--accent); width: 18px; height: 18px; }
.tool { display: grid; gap: 18px; align-items: start; }
@media (min-width: 860px) { .tool { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.result { background: var(--accent-soft); border-color: transparent; gap: 10px; }
.result .big { font: 800 clamp(26px, 4vw, 36px)/1.1 var(--display); letter-spacing: -0.02em; }
.err { color: var(--crit); font-size: 14.5px; }
.verdict-box.none { background: var(--sunk); color: var(--ink); }
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; }
@media (prefers-color-scheme: dark) { :root { --s1: #3987e5; --s2: #d95926; --s3: #199e70; } }
.charts-wrap { position: relative; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.mini { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 12px 12px 6px; }
.mini figcaption { font: 700 16px var(--display); }
.mini figcaption .muted { font: 400 13px var(--body); }
.mini svg { display: block; width: 100%; height: auto; overflow: visible; }
.mini .g { stroke: var(--rule); stroke-width: 1; }
.mini .t { fill: var(--muted); font: 400 11px var(--body); }
.mini .v { fill: var(--ink); font: 700 12px var(--body); }
.mini .d { stroke: transparent; stroke-width: 16px; pointer-events: all; cursor: default; }
.tip { position: absolute; z-index: 5; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 500; padding: 5px 10px; border-radius: 8px; pointer-events: none; white-space: nowrap; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; }
#log .compare { min-width: 620px; } #log .compare thead th { font: 600 14px var(--body); color: var(--muted); }
.saved summary { cursor: pointer; font-weight: 600; font-size: 15px; color: var(--muted); padding: 4px 0; }
.save-row { display: flex; gap: 8px; margin-top: 10px; } .save-row input { flex: 1 1 auto; min-width: 0; background: var(--surface); }
.saved-list { list-style: none; margin: 10px 0 0; padding: 0; }
.saved-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--rule); }
.saved-list b { overflow-wrap: anywhere; } .saved-list span { display: flex; gap: 4px; flex: none; }
.saved-list .btn { min-height: 34px; padding: 5px 12px; font-size: 14px; }

/* live pair checker */
.pair-result { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--rule); scroll-margin-top: calc(var(--head-h) + 12px); }
.pair-result .pair-title { font-size: clamp(1.3rem, 3.4vw, 1.75rem); margin: 0; text-wrap: balance; }
.pair-result h3 { margin: 0; font-size: 1.1rem; }
.picker-tools select { min-height: 44px; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); padding: 0 14px; font: inherit; max-width: 100%; }
