/* Napp - light-mode water/sky palette, with a "night water" dark mode.
   Design tokens (spacing / type / radius) live in :root; dark mode flips the
   colour tokens only. Snap any new value to a token; avoid raw literals. */

:root {
  /* ---- colour ---- */
  --bg-page: #eef5fb;        /* soft sky */
  --bg-page-2: #e3eef8;
  --bg-card: #ffffff;
  --bg-soft: #f4f8fc;
  --bg-hover: #f0f6fc;
  --border: #d9e6f2;
  --border-strong: #c2d6e8;

  --text-heading: #0c2740;   /* deep navy */
  --text-primary: #1f3b52;
  --text-secondary: #5a7790;
  --text-faint: #6b8198;     /* AA on white */

  --accent: #1d7fd6;         /* lake blue */
  --accent-dark: #135fa6;
  --accent-soft: #e6f1fb;
  --teal: #0f9b9b;

  --high-bg: #e3f6ec; --high-fg: #0f8a4d;
  --med-bg: #fdf0dd; --med-fg: #b9711a;
  --low-bg2: #eef2f6; --low-fg2: #71889e;

  --shadow: 0 1px 2px rgba(16, 51, 84, .06), 0 6px 20px rgba(16, 51, 84, .07);
  --shadow-hover: 0 2px 6px rgba(16, 51, 84, .10), 0 14px 32px rgba(16, 51, 84, .12);
  --glow: #dcebf8;

  /* water-type tags (light) */
  --wtype-lake-bg: #e6f1fb; --wtype-lake-fg: #135fa6;
  --wtype-river-bg: #e4f4ef; --wtype-river-fg: #0f8a6a;
  --wtype-coast-bg: #e8eefb; --wtype-coast-fg: #3a52b9;

  /* ---- spacing scale ---- */
  --space-0: 2px;   /* hairline nudges */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  /* ---- type scale ---- */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-md: 18px;
  --text-lg: 22px;
  --text-xl: 28px;
  --text-2xl: 40px;
  --text-hero: 72px;        /* error code */

  /* ---- radius ---- */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 16px;        /* cards */
  --radius-xl: 18px;        /* modal */
  --radius-pill: 999px;

  /* ---- shared component metrics ---- */
  --card-pad: var(--space-4);
  --tap: 44px;              /* min touch target */
}

/* Dark "night water" palette: same tokens, flipped colour values. */
html.dark {
  --bg-page: #0e1722;
  --bg-page-2: #0a111a;
  --bg-card: #16212e;
  --bg-soft: #1b2734;
  --bg-hover: #20303f;
  --border: #2a3a4d;
  --border-strong: #38506a;

  --text-heading: #eaf2fa;
  --text-primary: #cddcea;
  --text-secondary: #a3b6c8;
  --text-faint: #9fb3c6;

  --accent: #3b9eea;
  --accent-dark: #6bb8f3;
  --accent-soft: #15324a;
  --teal: #2bb7b7;

  --high-bg: #14362a; --high-fg: #5fd699;
  --med-bg: #3a2c15; --med-fg: #e3a955;
  --low-bg2: #212e3b; --low-fg2: #9fb3c6;

  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-hover: 0 2px 8px rgba(0, 0, 0, .45), 0 16px 36px rgba(0, 0, 0, .5);
  --glow: #12273a;

  /* water-type tags (dark) */
  --wtype-lake-bg: #15324a; --wtype-lake-fg: #7cc1f4;
  --wtype-river-bg: #123a30; --wtype-river-fg: #58cda6;
  --wtype-coast-bg: #1d2a52; --wtype-coast-fg: #93a6f0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 80% -10%, var(--glow) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-page) 0%, var(--bg-page-2) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 var(--space-5); }

/* ---- header ---- */
.site-header { padding: var(--space-5) 0 var(--space-2); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.nav { display: flex; align-items: center; gap: var(--space-2); }
.nav-link {
  font-size: var(--text-sm); font-weight: 600; color: var(--text-secondary);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
}
.nav-link:hover { background: var(--bg-hover); color: var(--accent-dark); }
/* inline icon base: sizes to surrounding font-size, inherits colour */
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; flex: none; fill: currentColor; }

.nav-btn {
  font-size: var(--text-sm); font-weight: 700; cursor: pointer; min-width: 40px;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); background: var(--bg-card);
  border: 1px solid var(--border-strong); color: var(--text-primary);
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-btn .ic { width: 18px; height: 18px; }
.fav-toggle .ic { width: 18px; height: 18px; }
.license-free { display: flex; align-items: center; gap: var(--space-2); }
.license-free .ic { color: #2e9e6b; }
.nav-btn:hover { background: var(--bg-hover); border-color: var(--accent); }
/* active nav (About page) */
.nav-link[aria-current="page"] {
  color: var(--accent-dark); background: var(--accent-soft);
}
.brand { display: flex; align-items: center; gap: var(--space-3); }
.brand-logo { width: 44px; height: 44px; border-radius: var(--radius-md); box-shadow: 0 6px 16px rgba(29,127,214,.28); flex: none; }
.nav-coffee { text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: var(--radius-md);
  background: linear-gradient(160deg, var(--accent) 0%, var(--teal) 100%);
  display: grid; place-items: center; color: #fff; font-size: var(--text-lg);
  box-shadow: 0 6px 16px rgba(29,127,214,.32);
}
.brand-text h1 { margin: 0; font-size: var(--text-lg); letter-spacing: -.02em; color: var(--text-heading); font-weight: 800; }
.brand-text p { margin: var(--space-0) 0 0; font-size: var(--text-sm); color: var(--text-secondary); }

/* ---- location bar ---- */
.locbar {
  margin: var(--space-4) 0 var(--space-2); background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: var(--card-pad);
}
.locbar-row { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; }
.loc-input {
  flex: 1 1 240px; min-width: 200px; padding: var(--space-3) var(--space-4); font-size: var(--text-base);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-soft);
  color: var(--text-primary); outline: none;
}
.loc-input:focus { border-color: var(--accent); background: var(--bg-card); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn {
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer;
  font-size: var(--text-sm); font-weight: 600; display: inline-flex; align-items: center; gap: var(--space-2);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: var(--bg-soft); color: var(--text-primary); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--bg-hover); }

/* region chips + favourites filter, in the locbar */
.chips { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); align-items: center; }
.chip {
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-pill); font-size: var(--text-sm); cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-secondary);
}
.chip:hover { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent); }
.chip.is-active {
  background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600;
}
.chip.is-active:hover { background: var(--accent-dark); color: #fff; }

/* favourites filter chip (toggles the saved-only view) */
.fav-filter {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-pill); font-size: var(--text-sm);
  cursor: pointer; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-secondary);
  font-weight: 600;
}
.fav-filter:hover { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent); }
.fav-filter.is-active {
  background: #fff5d6; color: #9a6a00; border-color: #f0cf6a;
}
html.dark .fav-filter.is-active { background: #3a2c15; color: #e3a955; border-color: #6a5320; }

.status-line { font-size: var(--text-sm); color: var(--text-secondary); margin: var(--space-4) var(--space-0) var(--space-3); }
.status-line strong { color: var(--text-heading); }

/* ---- spot cards ---- */
.spot-list { display: flex; flex-direction: column; gap: var(--space-4); padding-bottom: var(--space-2); }
.spot-card {
  position: relative;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: var(--card-pad); cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  display: grid; grid-template-columns: 1fr auto; gap: var(--space-4); align-items: start;
}
.spot-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--border-strong); }

.spot-head { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; }
.spot-name { font-size: var(--text-md); font-weight: 700; color: var(--text-heading); letter-spacing: -.01em; }
.spot-meta { font-size: var(--text-sm); color: var(--text-secondary); }
.spot-dist { font-size: var(--text-sm); color: var(--accent-dark); font-weight: 600; }
.map-link { font-size: var(--text-sm); color: var(--accent-dark); font-weight: 600; }
.map-link:hover { text-decoration: underline; }

/* favourite star toggle on a spot card */
.fav-toggle {
  flex: none; width: 32px; height: 32px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-faint);
  font-size: var(--text-md); line-height: 1; cursor: pointer; padding: 0;
  transition: color .12s ease, border-color .12s ease, background .12s ease, transform .12s ease;
}
.fav-toggle:hover { border-color: #f0cf6a; color: #d8a200; background: var(--bg-hover); }
.fav-toggle.is-active { color: #e2a900; border-color: #f0cf6a; background: #fff7da; }
html.dark .fav-toggle.is-active { background: #3a2c15; border-color: #6a5320; color: #e3a955; }

.wtype { font-size: var(--text-xs); font-weight: 600; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent-dark); }
.wtype.lake { background: var(--wtype-lake-bg); color: var(--wtype-lake-fg); }
.wtype.river { background: var(--wtype-river-bg); color: var(--wtype-river-fg); }
.wtype.coast { background: var(--wtype-coast-bg); color: var(--wtype-coast-fg); }

/* conditions block (top-right of card) */
.cond { display: flex; align-items: center; gap: var(--space-4); justify-content: flex-end; }
.cond-temp { font-size: var(--text-xl); font-weight: 800; color: var(--text-heading); line-height: 1; }
.cond-temp small { font-size: var(--text-sm); font-weight: 600; color: var(--text-secondary); }
.cond-icon { font-size: var(--text-xl); line-height: 1; }
.cond-detail { font-size: var(--text-xs); color: var(--text-secondary); text-align: right; }
.access-tag {
  display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--text-xs); font-weight: 600;
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); background: var(--accent-soft);
  color: var(--accent-dark); border: 1px solid var(--border); white-space: nowrap;
}

/* fish row */
.fish-row { grid-column: 1 / -1; display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-1); }
.fish-thumb { width: 46px; height: 46px; border-radius: var(--radius-sm); object-fit: cover; background: var(--accent-soft); flex: none; }
.fish-info { min-width: 0; flex: 1; }
.fish-name { font-size: var(--text-sm); font-weight: 700; color: var(--text-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fish-sub { font-size: var(--text-xs); color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pill { font-size: var(--text-xs); font-weight: 700; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); white-space: nowrap; flex: none; }
.pill-high { background: var(--high-bg); color: var(--high-fg); }
.pill-medium { background: var(--med-bg); color: var(--med-fg); }
.pill-low { background: var(--low-bg2); color: var(--low-fg2); }

.empty, .loading { text-align: center; color: var(--text-secondary); padding: var(--space-6) 0; font-size: var(--text-base); }
.show-more-wrap { text-align: center; margin: var(--space-4) 0 var(--space-2); }
#show-more { padding: var(--space-3) var(--space-5); font-size: var(--text-base); }
#show-more[disabled] { opacity: .6; cursor: default; }
/* loading state for "show more" */
#show-more.is-loading { opacity: .7; cursor: default; pointer-events: none; }
#show-more.is-loading::before {
  content: ""; width: 14px; height: 14px; margin-right: var(--space-1);
  border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%;
  display: inline-block; vertical-align: -2px; animation: napp-spin .7s linear infinite;
}
@keyframes napp-spin { to { transform: rotate(360deg); } }

/* home: clickable fish pill (opens the modal). napp.js generates .fish-item. */
.fish-item { flex: 1 1 220px; min-width: 190px; display: flex; align-items: center; gap: var(--space-3);
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-2); cursor: pointer; transition: border-color .12s ease, transform .12s ease; }
.fish-item:hover { border-color: var(--accent); transform: translateY(-1px); }

/* ---- detail page ---- */
.back-link { display: inline-flex; gap: var(--space-2); align-items: center; font-size: var(--text-sm); color: var(--accent-dark); margin: var(--space-4) 0 var(--space-1); font-weight: 600; }
.detail-head { margin: var(--space-2) 0 var(--space-4); }
.detail-head h2 { margin: 0; font-size: var(--text-xl); color: var(--text-heading); letter-spacing: -.02em; }
.detail-head .sub { color: var(--text-secondary); font-size: var(--text-sm); margin-top: var(--space-1); }
.detail-desc { color: var(--text-primary); font-size: var(--text-base); margin-top: var(--space-3); max-width: 70ch; }
.spot-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-4); }
.spot-actions .btn { text-decoration: none; }

.panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: var(--card-pad); margin-bottom: var(--space-4); }
.panel h3 { margin: 0 0 var(--space-4); font-size: var(--text-base); color: var(--text-heading); text-transform: uppercase; letter-spacing: .04em; }

/* smaller conditions values (replaces inline font-size) */
.v--sm { font-size: var(--text-md) !important; }

.cond-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--space-4); }
.cond-cell .k { font-size: var(--text-xs); color: var(--text-secondary); text-transform: uppercase; letter-spacing: .03em; }
.cond-cell .v { font-size: var(--text-lg); font-weight: 800; color: var(--text-heading); margin-top: var(--space-0); }
.cond-cell .v small { font-size: var(--text-sm); font-weight: 600; color: var(--text-secondary); }
.cond-note { font-size: var(--text-xs); color: var(--text-faint); margin: var(--space-4) 0 0; font-style: italic; }

.hourly { display: flex; gap: var(--space-3); overflow-x: auto; padding-bottom: var(--space-2); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hourly::-webkit-scrollbar { display: none; }
.hour { flex: none; width: 76px; text-align: center; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-2); }
.hour .h { font-size: var(--text-xs); color: var(--text-secondary); }
.hour .i { font-size: var(--text-lg); margin: var(--space-1) 0; }
.hour .t { font-size: var(--text-base); font-weight: 700; color: var(--text-heading); }

/* spot tips panel */
.tips-list { display: flex; flex-direction: column; gap: var(--space-3); }
.tip-row { display: flex; gap: var(--space-3); align-items: flex-start; }
.tip-kind {
  flex: none; font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--accent-dark); background: var(--accent-soft); border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2); min-width: 64px; text-align: center;
}
.tip-text { font-size: var(--text-base); color: var(--text-primary); line-height: 1.5; }

.fish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-4); align-items: stretch; }
.fish-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--card-pad); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.fish-card.expandable, .fish-card.fish-open { cursor: pointer; }
.fish-card.expandable:hover, .fish-card.fish-open:hover { border-color: var(--accent); transform: translateY(-2px); transition: transform .12s ease, border-color .12s ease; }
.fish-card-head { display: flex; gap: var(--space-4); }
.fish-card-head img { width: 84px; height: 84px; border-radius: var(--radius-md); object-fit: cover; background: var(--accent-soft); flex: none; }
.fish-card .body { min-width: 0; flex: 1; }
.fish-card .top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.fish-card .nm { font-size: var(--text-md); font-weight: 700; color: var(--text-heading); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fish-card .sci { font-size: var(--text-xs); font-style: italic; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fish-card .why { font-size: var(--text-sm); color: var(--text-secondary); margin-top: var(--space-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(2 * 1.4em); }
.expand-hint { font-size: var(--text-xs); font-weight: 600; color: var(--accent-dark); margin-top: var(--space-2); }
.expand-hint .chev { display: inline-block; transition: transform .15s ease; }
.fish-card.expanded .expand-hint .chev { transform: rotate(180deg); }

/* per-fish colour guidance line (detail card + modal) */
.fish-colours { font-size: var(--text-sm); color: var(--text-secondary); margin-top: var(--space-2); }
.fish-colours strong { color: var(--text-heading); font-weight: 700; }

/* collapsible lure section (detail + home share .fish-lures) */
.fish-lures { display: none; margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px dashed var(--border); }
.fish-card.expanded .fish-lures, .fish-item.expanded .fish-lures { display: block; }
.lures-title { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); margin-bottom: var(--space-3); }
.lure { display: flex; gap: var(--space-3); margin-bottom: var(--space-3); }
.lure:last-child { margin-bottom: 0; }
.lure-img { width: 60px; height: 60px; border-radius: var(--radius-sm); object-fit: cover; background: var(--accent-soft); flex: none; }
.lure-body { min-width: 0; }
.lure-name { font-size: var(--text-sm); font-weight: 700; color: var(--text-heading); }
.lure-note { font-weight: 500; color: var(--accent-dark); font-size: var(--text-sm); }
.lure-howto { font-size: var(--text-sm); color: var(--text-secondary); margin-top: var(--space-0); line-height: 1.45; }

/* footer + buy me a coffee */
.site-footer { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); padding-top: var(--space-4); }
.bmc-btn {
  display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-5); border-radius: var(--radius-md);
  background: #ffdd00; color: #1a1a1a; font-weight: 700; font-size: var(--text-base);
  box-shadow: 0 6px 18px rgba(0,0,0,.12); transition: transform .12s ease, box-shadow .12s ease;
}
.bmc-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.16); }
.bmc-emoji { font-size: var(--text-md); }
.footer-links { display: flex; gap: var(--space-5); justify-content: center; }
.footer-links a { font-size: var(--text-sm); font-weight: 600; color: var(--text-secondary); }
.footer-links a:hover { color: var(--accent-dark); }
.footer-links a[aria-current="page"] { color: var(--accent-dark); }
.disclaimer { font-size: var(--text-xs); color: var(--text-faint); text-align: center; padding: var(--space-1) 0 var(--space-6); max-width: 60ch; margin: 0 auto; line-height: 1.5; }

/* ---- fish detail modal ---- */
body.modal-open { overflow: hidden; }
.modal-overlay { position: fixed; inset: 0; background: rgba(8,20,33,.55); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; padding: var(--space-5) var(--space-4); overflow-y: auto;
  z-index: 1000; animation: napp-fade .15s ease; }
@keyframes napp-fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-hover); width: 100%; max-width: 600px; margin: auto; position: relative;
  animation: napp-pop .18s ease; }
@keyframes napp-pop { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close { position: absolute; top: var(--space-2); right: var(--space-3); width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-heading); font-size: var(--text-lg);
  line-height: 1; cursor: pointer; z-index: 2; display: inline-flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--bg-hover); }
.modal-hero { display: flex; gap: var(--space-4); padding: var(--space-5) var(--card-pad) 0; }
.modal-hero--media { flex-direction: column; align-items: stretch; }
.modal-hero--media .modal-gallery { width: 100%; }
.modal-hero--media .modal-title { padding: 0; }
.modal-img { width: 120px; height: 120px; border-radius: var(--radius-md); object-fit: cover; background: var(--accent-soft); flex: none; }
.modal-title { min-width: 0; padding-top: var(--space-0); padding-right: var(--space-6); }
.modal-name { font-size: var(--text-lg); font-weight: 800; color: var(--text-heading); letter-spacing: -.02em; }
.modal-sci { font-size: var(--text-sm); color: var(--text-secondary); font-style: italic; margin-top: var(--space-0); }
.modal-now { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-3); flex-wrap: wrap; }
.modal-reason { font-size: var(--text-sm); color: var(--text-secondary); }
.modal-body { padding: var(--card-pad); padding-top: var(--space-4); }
.mchips { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-4); }
.mchip { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); }
.mchip-k { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); }
.mchip-v { font-size: var(--text-sm); font-weight: 700; color: var(--text-heading); margin-top: 1px; }
.modal-about { font-size: var(--text-base); line-height: 1.55; color: var(--text-primary); margin: 0 0 var(--space-4); }
.modal-lures { border-top: 1px dashed var(--border); padding-top: var(--space-4); }
.amazon-btn { display: inline-flex; align-items: center; gap: var(--space-2); margin-top: var(--space-3); padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill); background: linear-gradient(180deg, #ffd089 0%, #ff9f1c 55%, #f08a00 100%); color: #1a1208;
  font-size: var(--text-sm); font-weight: 800; letter-spacing: .01em; text-decoration: none;
  border: 1px solid rgba(0,0,0,.08); box-shadow: 0 2px 10px rgba(240,138,0,.32);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease; }
.amazon-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(240,138,0,.45); filter: brightness(1.03); }
.amazon-btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(240,138,0,.3); }
.affiliate-note { font-size: var(--text-xs); color: var(--text-faint); font-style: italic; margin: var(--space-3) 0 0; }

/* fish image gallery inside the modal (napp.js builds the slides) */
.modal-gallery { position: relative; }
.gallery-track {
  display: flex; overflow-x: auto; overflow-y: hidden; border-radius: var(--radius-md);
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; scroll-snap-align: start; }
.gallery-slide img {
  display: block; width: 100%; height: 220px; object-fit: cover;
  background: var(--accent-soft); border-radius: var(--radius-md);
}
.gallery-prev, .gallery-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(8,20,33,.55); color: #fff; font-size: var(--text-md); line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 2; transition: background .12s ease;
}
.gallery-prev:hover, .gallery-next:hover { background: rgba(8,20,33,.78); }
.gallery-prev { left: var(--space-2); }
.gallery-next { right: var(--space-2); }
.gallery-dots { display: flex; justify-content: center; gap: var(--space-2); margin-top: var(--space-3); }
.gallery-dot {
  width: 8px; height: 8px; border-radius: 50%; padding: 0; border: none; cursor: pointer;
  background: var(--border-strong); transition: background .12s ease, transform .12s ease;
}
.gallery-dot.is-active { background: var(--accent); transform: scale(1.25); }

/* error page */
.error-page { text-align: center; padding: var(--space-6) 0; }
.error-code { font-size: var(--text-hero); font-weight: 800; color: var(--accent); line-height: 1; letter-spacing: -.03em; }
.error-page h2 { color: var(--text-heading); margin: var(--space-2) 0 var(--space-5); font-size: var(--text-lg); }

/* ---- wikipedia "about this water" ---- */
.wiki { display: flex; gap: var(--space-4); align-items: flex-start; }
.wiki-thumb { width: 140px; height: 140px; object-fit: cover; border-radius: var(--radius-md); flex: none; background: var(--accent-soft); }
.wiki-extract { color: var(--text-primary); font-size: var(--text-base); line-height: 1.55; margin: 0 0 var(--space-3); }
.wiki-link { color: var(--accent-dark); font-weight: 600; font-size: var(--text-sm); }
.wiki-link:hover { text-decoration: underline; }
.about-list { color: var(--text-primary); font-size: var(--text-base); line-height: 1.7; margin: 0 0 var(--space-3); padding-left: var(--space-5); }
.about-list strong { color: var(--text-heading); }

/* ---- responsive / mobile ----
   Two named breakpoints: --bp-sm 560px (modal/wiki stack) and --bp-md 640px (layout). */
@media (max-width: 640px) {
  .wrap { padding: 0 var(--space-4); }

  /* header: stack brand over a full-width nav (no space-between gaps) */
  .header-row { flex-wrap: wrap; gap: var(--space-3); }
  .nav { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .brand-text h1 { font-size: var(--text-md); }

  /* raise touch targets to >= 44px */
  .nav-btn, .nav-link {
    min-height: var(--tap); display: inline-flex; align-items: center; justify-content: center;
  }
  .chip { min-height: var(--tap); display: inline-flex; align-items: center; }
  .map-link, .spot-dist { display: inline-flex; align-items: center; min-height: var(--tap); }

  /* chips become a horizontal scroll row with an edge fade */
  .chips {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; margin-left: calc(var(--space-4) * -1); margin-right: calc(var(--space-4) * -1);
    padding-left: var(--space-4); padding-right: var(--space-4);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--space-4), #000 calc(100% - var(--space-4)), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 var(--space-4), #000 calc(100% - var(--space-4)), transparent 100%);
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip, .fav-filter { flex: none; white-space: nowrap; }

  .spot-card { grid-template-columns: 1fr; gap: var(--space-3); }
  .cond { justify-content: flex-start; gap: var(--space-3); }
  .cond-detail { text-align: left; }
  .fish-item { flex-basis: 100%; }
  .locbar-row { gap: var(--space-2); }
  .loc-input { flex: 1 1 100%; }
  .detail-head h2 { font-size: var(--text-lg); }
  .fish-grid { grid-template-columns: 1fr; }
  .spot-actions .btn { flex: 1 1 100%; justify-content: center; }
}

@media (max-width: 560px) {
  .modal-hero { flex-direction: column; }
  .modal-img { width: 100%; height: 180px; }
  /* keep the close button clear of the title even when stacked */
  .modal-title { padding-right: var(--space-6); }
  .modal-name { font-size: var(--text-lg); }
  /* enlarge close to ~44px touch target */
  .modal-close { width: var(--tap); height: var(--tap); font-size: var(--text-xl); }
  .wiki { flex-direction: column; }
  .wiki-thumb { width: 100%; height: 180px; }
}

/* don't pin the background on touch devices (jank + perf) */
@media (hover: none) {
  body { background-attachment: scroll; }
}

/* respect reduced-motion: no gallery slide animation, no spinner */
@media (prefers-reduced-motion: reduce) {
  .gallery-track { scroll-behavior: auto; }
  .gallery-dot { transition: none; }
  #show-more.is-loading::before { animation: none; }
  * { scroll-behavior: auto; }
}
