/* Fiskekart — premium redesign. Refined utilitarian; the map is the product. */

:root {
  /* Core */
  --fk-natt: #1B3A4B;
  --fk-fjord: #2D5F7A;
  --fk-vatn: #4A90D9;
  --fk-gull: #D97706;
  --fk-gull-light: #FEF3C7;
  --fk-gull-text: #92400E;
  --fk-skog: #22C55E;
  /* Moss green — the 3D entry action. Deliberately yellow-leaning so it stays
     distinct from the tier greens (#16A34A dots, --fk-skog above), which carry
     confidence meaning. Never use --fk-mose for a tier, or a tier green here. */
  --fk-mose: #4E8A17;
  --fk-mose-dark: #3B6D11;   /* hover, one step down */
  --fk-snø: #FAFAF7;
  --fk-snø-dark: #F5F0E8;

  /* Text */
  --fk-text-primary: #1C1917;
  --fk-text-secondary: #78716C;
  --fk-text-muted: #A8A29E;
  --fk-text-on-dark: #F1F5F9;
  --fk-text-on-dark-muted: rgba(255,255,255,0.5);

  /* Borders */
  --fk-border: #E5E2DB;
  --fk-border-dark: rgba(255,255,255,0.06);

  /* Routes / elevation */
  --fk-route-blue: #4285F4;
  --fk-route-blue-light: #93C5FD;
  --fk-elevation-line: #60A5FA;
  --fk-elevation-bg: #0C1C28;
  --fk-ascent: #4ADE80;
  --fk-descent: #F87171;

  /* Shape */
  --fk-radius: 12px;
  --fk-radius-sm: 8px;
  --fk-radius-lg: 14px;

  --fk-font: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --fk-shadow: 0 2px 12px rgba(27,58,75,0.10), 0 1px 3px rgba(27,58,75,0.06);
  --fk-shadow-lg: 0 8px 30px rgba(27,58,75,0.18);

  /* ── Sidebar / trips redesign tokens (feat/sidebar-redesign) ────────────────
     One cool blue-gray system for every /kart lake-sidebar + trips surface. All
     grays below are cool (blue-tinted) — never the legacy warm --fk-* grays. Used
     EVERYWHERE in those surfaces; components must not hardcode colours. */
  --sb-ground:        #EBF0F3;   /* panel background (the sheet/rail ground) */
  --sb-card:          #FFFFFF;   /* card background */
  --sb-card-border:   #DEE6EB;   /* card border */
  --sb-hairline:      #EDF2F5;   /* internal hairline between rows within a card */
  --sb-text:          #1C2933;   /* primary text */
  --sb-text-2:        #57646D;   /* secondary text */
  --sb-text-muted:    #84939E;   /* muted text */
  --sb-label:         #75858F;   /* section labels */
  /* Species status band (welded under the header) */
  --sb-species-bg:     #D8E7F5;
  --sb-species-border: #C4D8EA;
  --sb-species-text:   #0C447C;
  --sb-species-link:   #185FA5;
  /* Nudge (membership banner) */
  --sb-nudge-bg:      #FBF3E4;
  --sb-nudge-border:  #EEDFC2;
  --sb-nudge-text:    #57451F;
  --sb-nudge-accent:  #B45309;   /* link / strong inside the nudge + membership card */
  /* Accents */
  --sb-accent:        #2563EB;   /* primary action blue: Kjøp, links */
  --sb-gold:          #E3A94C;   /* gold — only where it exists today (header star) */
  --sb-gold-link:     #8A6A2A;   /* gold-band source ("Kilde") link */
  /* Badges */
  --sb-badge-report-bg:   #FBF3E4;   /* stranger "Rapportert av bruker" */
  --sb-badge-report-text: #8A5A10;
  --sb-badge-own-bg:      #E7F0FB;   /* own public "Din tur" (blue tint, cool-gray-safe) */
  --sb-badge-own-text:    #57646D;
  --sb-badge-private-bg:  #EDF2F5;   /* own private "Bare for deg" */
  --sb-badge-private-text:#57646D;
  /* Shape */
  --sb-radius-card: 11px;
  --sb-radius-el:   9px;
}

* { box-sizing: border-box; }
html, body { margin: 0;
  height: 100vh;                  /* fallback */
  height: -webkit-fill-available; /* older iOS Safari */
  height: 100lvh;                 /* LARGE viewport — full screen, fills under the URL bar */
  /* The map page never scrolls as a page. Without this, iPhone Safari pulls the
     document (100lvh is taller than the screen while the URL bar shows) on a
     sheet swipe and can pull-to-refresh: the page reloads and the lake reopens
     from the link, which looks like the sheet "loading again". */
  overscroll-behavior: none;
}
body {
  font-family: var(--fk-font);
  color: var(--fk-text-primary);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
button { font-family: inherit; }
a { color: var(--fk-vatn); text-decoration: none; }

/* Fixed + lvh (large viewport) so the basemap fills the full screen and renders UNDER
   Safari's translucent URL bar — dvh would stop at the docked bar. vh / -webkit-fill-available
   fallbacks for older browsers. */
#map { position: fixed; top: 0; left: 0; right: 0;
  height: 100vh; height: -webkit-fill-available; height: 100lvh; }

.fk-ic { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.125em; }

/* ── Floating search + filters (top-left) — light, separate elements ──────── */
#search-container {
  position: absolute; top: 20px; left: 20px; z-index: 20;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  width: 300px; max-width: calc(100vw - 40px);
}

/* Bottom filter row: "Kun vann med data" + the minimize toggle share the width. */
.filter-bottom-row { display: flex; gap: 6px; width: 100%; }

/* Minimize toggle — mobile only (shown in the media query); sits beside "Kun vann med data". */
.filter-toggle {
  display: none; align-items: center; justify-content: center; gap: 6px; flex: 1; min-width: 0;
  background: #fff; border: 1.5px solid rgba(27,58,75,0.25); border-radius: 10px;
  padding: 8px 10px; font-size: 12px; font-weight: 500; color: #1B3A4B; font-family: inherit;
  cursor: pointer; box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.filter-toggle .fk-ic { width: 15px; height: 15px; flex: none; }
.filter-toggle-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-toggle-chevron { width: 12px; height: 12px; color: #A8A29E; transition: transform 150ms;
  transform: rotate(180deg); }                                  /* expanded → points up */
#search-container.minimized .filter-toggle-chevron { transform: rotate(0deg); }  /* minimized → points down */

/* Cluster A (search + filter chips) shares one border-radius (10px) and a
   consistent control height so the search box and the filter chips/buttons read
   as one set. */
#search-box {
  display: flex; align-items: center; gap: 9px; width: 100%;
  background: #fff; border: 1.5px solid rgba(27,58,75,0.25);
  border-radius: 10px; padding: 9px 14px; box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
#search-box .search-icon { width: 17px; height: 17px; color: #1B3A4B; flex: none; }
#search-input {
  border: 0; outline: 0; background: transparent; width: 100%;
  font-size: 14px; font-family: inherit; color: #1C1917;
}
#search-input::placeholder { color: #A8A29E; font-size: 14px; }

/* Search results — light floating panel */
#search-results { width: 100%; background: rgba(250,250,247,0.98);
  border: 0.5px solid rgba(0,0,0,0.08); border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  /* Scrollable so all returned matches are reachable (e.g. the many same-named
     "Storvatnet" lakes) without the list running off-screen. Capped height keeps
     it from covering the map; overscroll-contain stops the scroll chaining to the
     map behind it on touch. overflow-x hidden preserves the rounded corners. */
  max-height: min(55vh, 440px);
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
#search-results:empty { display: none; }
.search-result {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 9px 12px; border: 0; background: none; cursor: pointer;
  text-align: left; border-bottom: 0.5px solid rgba(0,0,0,0.06);
}
.search-result:last-child { border-bottom: 0; }
.search-result:hover, .search-result.focused { background: rgba(0,0,0,0.04); }
.result-name { font-size: 14px; font-weight: 500; color: #1C1917; }
.result-meta { font-size: 11.5px; color: #78716C; margin-top: 1px; }
.result-badges { display: flex; gap: 5px; flex: none; }
.result-badge { font-size: 10px; padding: 2px 6px; border-radius: 5px; font-weight: 600; }
.result-badge.species { background: #EAF2FB; color: var(--fk-vatn); }
.result-badge.size { background: var(--fk-gull-light); }
.search-empty { padding: 12px; font-size: 13px; color: #A8A29E; }
/* Map search's "Områder" group (fylker, kommuner, område pages) above the lakes:
   a small heading, and a firmer line where the lakes start. */
.search-group-h { padding: 8px 12px 3px; font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: #78716C; }
.search-area:has(+ .search-result:not(.search-area)) { border-bottom: 1px solid rgba(0,0,0,0.12); }

/* Filter pills row (matches search width) + toggle, stacked with 6px gaps */
#filter-row { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; }
.filter-pills { display: flex; gap: 6px; width: 100%; }
.species-filter { position: relative; flex: 1; min-width: 0; }
.species-filter-btn {
  display: flex; align-items: center; gap: 6px; width: 100%;
  background: #fff; border: 1.5px solid rgba(27,58,75,0.25); border-radius: 10px;
  padding: 8px 12px; font-size: 12px; font-weight: 500; color: #1B3A4B;
  cursor: pointer; box-shadow: 0 2px 12px rgba(0,0,0,0.1); transition: background 150ms, border-color 150ms;
}
.species-filter-btn > span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.species-filter-btn:hover { background: #FAFAF7; }
.species-filter-btn .fk-ic { width: 14px; height: 14px; color: #1B3A4B; flex: none; }
.species-filter-btn.has-selection { border-color: rgba(27,58,75,0.5); }
.species-filter-chevron { width: 11px; height: 11px; color: #A8A29E; margin-left: auto; flex: none; }

/* Filter dropdown menus — light */
.species-filter-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 184px; max-height: 60vh; overflow-y: auto;
  background: rgba(250,250,247,0.98); border: 0.5px solid rgba(0,0,0,0.08); border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1); padding: 6px; z-index: 30;
}
#tier-filter .species-filter-menu { left: auto; right: 0; }
.species-filter-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 7px;
  font-size: 13px; cursor: pointer; color: #1C1917;
}
.species-filter-item:hover { background: rgba(0,0,0,0.04); }
.species-filter-item input { accent-color: var(--fk-fjord); width: 15px; height: 15px; }
.species-filter-divider { height: 0.5px; background: rgba(0,0,0,0.08); margin: 5px 4px; }
.tier-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.tier-dot-gray { background: #78716C; } .tier-dot-blue { background: #2563EB; }
.tier-dot-green { background: #16A34A; } .tier-dot-gold { background: var(--fk-gull); }
.tier-filter-shortcut {
  display: block; width: 100%; text-align: left; background: rgba(45,95,122,0.1); color: var(--fk-fjord);
  border: 0.5px solid rgba(45,95,122,0.2); border-radius: 7px; padding: 8px 12px; font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.tier-filter-shortcut:hover { background: rgba(45,95,122,0.18); }

/* ── Filters v2 ───────────────────────────────────────────────────────────────
   New unified filter UI: single "Filtre" button + removable chips + one
   inline panel with all three groups (Arter, Kategori, Avstand fra vei).
   Controlled by the `filters-v2` class on #search-container, toggled at
   runtime from /api/auth/config.new_filters_enabled. With the class:
     - The legacy .filter-pills + .filter-bottom-row are hidden.
     - The new .filters-v2-bar + #filter-chips + #filters-panel are shown.
   Without it: exactly the reverse — legacy stays untouched. */
#search-container.filters-v2 .filter-pills,
#search-container.filters-v2 .filter-bottom-row { display: none; }
#search-container:not(.filters-v2) .filters-v2-bar,
#search-container:not(.filters-v2) #filter-chips,
#search-container:not(.filters-v2) #filters-panel { display: none; }

/* Bar = the Filtre button alone. The active-filter chips moved into the panel
   (2026-11-10); the button's count badge is the on-map cue. */
.filters-v2-bar {
  display: flex; align-items: flex-start;
  gap: 6px; width: 100%;
}
.filters-v2-btn {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  background: #fff; border: 1.5px solid rgba(27,58,75,0.25); border-radius: 10px;
  padding: 8px 12px; font-size: 12px; font-weight: 500; color: var(--fk-natt);
  font-family: inherit; cursor: pointer; box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  transition: background 150ms, border-color 150ms;
}
.filters-v2-btn:hover { background: var(--fk-snø); }
.filters-v2-btn[aria-expanded="true"] {
  background: var(--fk-natt); color: #fff; border-color: var(--fk-natt);
}
.filters-v2-btn .fk-ic { width: 14px; height: 14px; flex: none; }
.filters-v2-btn-label { line-height: 1; }
.filters-v2-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--fk-gull); color: #fff; font-size: 11px; font-weight: 600;
  line-height: 1;
}
.filters-v2-btn[aria-expanded="true"] .filters-v2-count { background: #fff; color: var(--fk-natt); }

/* Active filters, inside the panel under Samlinger: wrapping chips, each with ×. */
.filter-chips {
  display: flex; flex-wrap: wrap; gap: 6px; min-width: 0;
  padding: 2px 0 8px; margin-bottom: 4px; border-bottom: 0.5px solid var(--fk-border);
}
.filter-chips[hidden] { display: none; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid rgba(27,58,75,0.25); border-radius: 10px;
  padding: 4px 4px 4px 10px; font-size: 12px; font-weight: 500; color: var(--fk-natt);
  font-family: inherit; max-width: 100%;
  /* Whole chip is clickable (expands the matching section); the ✕ inside is
     its own button. cursor + hover so the
     affordance is obvious; focus ring for keyboard users (role=button). */
  cursor: pointer; transition: background 120ms, border-color 120ms;
}
.filter-chip:hover { background: var(--fk-snø); border-color: rgba(27,58,75,0.45); }
.filter-chip:focus-visible {
  outline: 2px solid var(--fk-vatn); outline-offset: 2px;
}
.filter-chip-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.filter-chip-dot-gray  { background: #78716C; }
.filter-chip-dot-blue  { background: #2563EB; }
.filter-chip-dot-green { background: #16A34A; }
.filter-chip-dot-gold  { background: var(--fk-gull); }
/* Side-by-side cluster (Kategori chip when 2+ tiers selected). Tight 2 px
   inter-dot gap keeps the chip narrow so the mobile horizontal-scroll chip
   row doesn't break. Max width covers 3 dots (max possible — 4 = full set =
   no chip), comfortably under the chip's 140 px label cap on mobile. */
.filter-chip-dots { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.filter-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.filter-chip-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer;
  background: transparent; color: var(--fk-text-muted); padding: 0;
  transition: background 150ms, color 150ms;
}
.filter-chip-close:hover { background: rgba(27,58,75,0.08); color: var(--fk-natt); }
.filter-chip-close .fk-ic { width: 12px; height: 12px; }

/* The panel — anchored under the bar on desktop. Flat, dropdown-ish; one open
   at a time across the UI (see popovers.js). Maxed below screen so the section
   scrolls if the device is short on vertical room. */
.filters-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  z-index: 30; background: var(--fk-snø);
  border: 0.5px solid rgba(0,0,0,0.08); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(27,58,75,0.18);
  padding: 12px 14px 14px;
  max-height: min(75vh, 640px); overflow-y: auto;
}
.filters-v2-bar { position: relative; }
#filters-panel { position: absolute; top: 100%; margin-top: 6px; left: 0; right: 0; }

.filters-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.filters-panel-title { font-size: 14px; font-weight: 600; color: var(--fk-text-primary); }
.filters-panel-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer;
  background: transparent; color: var(--fk-text-muted);
}
.filters-panel-close:hover { background: rgba(0,0,0,0.06); color: var(--fk-natt); }
.filters-panel-close .fk-ic { width: 16px; height: 16px; }

/* Sections are COLLAPSED by default. Each section is a single tappable row
   (title + live summary + chevron). Opening one expands its body and the JS
   collapses any other open section — only one expanded at a time so the
   panel stays short. The whole row is a button for full-width hit target. */
.filters-panel-section { border-top: 0.5px solid rgba(0,0,0,0.08); }
.filters-panel-section:first-of-type { border-top: 0; }
.filters-panel-section-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: 0; padding: 10px 4px; font: inherit; cursor: pointer;
  color: var(--fk-text-primary); text-align: left;
}
.filters-panel-section-toggle:hover { background: rgba(0,0,0,0.03); }
.filters-panel-section-title {
  font-size: 13px; font-weight: 600; color: var(--fk-text-primary); flex: none;
}
.filters-panel-section-summary {
  flex: 1; min-width: 0; text-align: right;
  font-size: 12.5px; color: var(--fk-text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end;
}
.filters-panel-section-summary-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block;
}
/* Cluster wrapper for the Kategori section summary when 2+ tiers selected.
   Inline-flex with a 2 px gap so dots sit tight together; the parent summary
   span already provides the 6 px gap to the trailing text. */
.filters-panel-section-summary-dots {
  display: inline-flex; align-items: center; gap: 2px; flex: none;
}
.filters-panel-section-chevron {
  width: 14px; height: 14px; color: var(--fk-text-muted); flex: none;
  transition: transform 150ms;
}
.filters-panel-section.open .filters-panel-section-chevron { transform: rotate(180deg); }
.filters-panel-section-body { padding: 0 4px 12px; }
.filters-panel-section-actions {
  display: flex; justify-content: flex-end; margin-bottom: 6px;
}
.filters-panel-helper {
  margin: 4px 0 8px; font-size: 12px; color: var(--fk-text-secondary); line-height: 1.4;
}
.filters-panel-reset {
  background: none; border: 0; padding: 2px 4px; font: inherit;
  font-size: 12px; font-weight: 500; color: var(--fk-vatn); cursor: pointer;
}
.filters-panel-reset:hover { text-decoration: underline; }

/* Nullstill — last row of the panel. Disabled (muted, no hover) while every
   filter is where the map starts, so it never looks like it did nothing. */
.filters-panel-foot {
  display: flex; justify-content: flex-end;
  margin-top: 6px; padding-top: 8px; border-top: 0.5px solid var(--fk-border);
}
.filters-panel-nullstill {
  min-height: 36px; padding: 0 14px; border-radius: 10px; cursor: pointer;
  background: #fff; border: 1px solid rgba(27,58,75,0.25);
  font: inherit; font-size: 13px; font-weight: 500; color: var(--fk-natt);
}
.filters-panel-nullstill:hover:not(:disabled) { background: var(--fk-snø); border-color: rgba(27,58,75,0.45); }
.filters-panel-nullstill:disabled { color: var(--fk-text-muted); border-color: var(--fk-border); cursor: default; }

/* Two-column-ish grid for option rows so the panel stays compact on desktop.
   Kategori is forced to one column — its labels ("Arter bekreftet", "Gode tegn")
   get truncated under two columns at the 300 px panel width. Species stays
   two-column even though some species names are long; the "+N flere" reveal
   keeps the visible primary list short. Distance is two-column too — its
   bucket labels are uniformly short. */
.filters-panel-options { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
#search-container #fp-tier-options { grid-template-columns: 1fr; }
.filters-panel-option {
  display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 6px;
  font-size: 13px; color: var(--fk-text-primary); cursor: pointer; min-width: 0;
}
.filters-panel-option:hover { background: rgba(0,0,0,0.04); }
.filters-panel-option input { accent-color: var(--fk-fjord); width: 15px; height: 15px; flex: none; }
.fp-option-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.filters-panel-more {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 6px;
  background: none; border: 0; padding: 4px 2px; font: inherit;
  font-size: 12.5px; color: var(--fk-vatn); cursor: pointer;
}
.filters-panel-more:hover { text-decoration: underline; }

.filters-panel-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px; background: rgba(45,95,122,0.08);
  font-size: 13px; color: var(--fk-fjord); cursor: pointer;
}
.filters-panel-toggle input { accent-color: var(--fk-fjord); width: 15px; height: 15px; flex: none; }
/* The "Kun vann med data" row sits at the panel bottom, separated from the
   collapsible section list. It's a single control, not a group. */
.filters-panel-footer-toggle {
  margin-top: 10px;
  border-top: 0.5px solid rgba(0,0,0,0.08);
  border-top-left-radius: 0; border-top-right-radius: 0;
  padding-top: 12px;
}

/* ── Hover tooltip (dark) ─────────────────────────────────────────────────── */
#map-tooltip {
  position: fixed; z-index: 40; pointer-events: none; opacity: 0; transform: translateY(4px);
  background: var(--fk-natt); color: var(--fk-text-on-dark); border-radius: 10px;
  padding: 9px 12px; max-width: 230px; box-shadow: var(--fk-shadow-lg);
  transition: opacity 120ms ease, transform 120ms ease;
}
#map-tooltip.visible { opacity: 1; transform: translateY(0); }
#map-tooltip::after {
  content: ''; position: absolute; left: 18px; bottom: -6px; width: 12px; height: 12px;
  background: var(--fk-natt); transform: rotate(45deg); border-radius: 2px;
}
.tooltip-name { font-size: 14px; font-weight: 500; }
.tooltip-meta { font-size: 12px; color: var(--fk-text-on-dark-muted); margin-top: 2px; }
.tooltip-size { font-size: 12px; color: #FCD34D; margin-top: 4px; font-weight: 500; }

/* ── Trail click panel ────────────────────────────────────────────────────── */
#trail-panel {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(8px);
  z-index: 18; background: #fff; border: 0.5px solid var(--fk-border); border-radius: var(--fk-radius);
  box-shadow: var(--fk-shadow-lg); padding: 14px 18px; min-width: 220px; max-width: 320px;
  opacity: 0; pointer-events: none; transition: opacity 160ms, transform 160ms;
}
#trail-panel.visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.trail-panel-name { font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.trail-panel-type { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--fk-text-muted); }
.trail-panel-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; color: var(--fk-text-secondary); }
.trail-panel-close { position: absolute; top: 8px; right: 8px; background: none; border: 0; cursor: pointer;
  color: var(--fk-text-muted); font-size: 15px; line-height: 1; padding: 4px; }

/* ── Gray zoom-gate hint (centered bottom toast) ──────────────────────────── */
/* Shown when "vann uten data" (gray) is toggled on while zoomed out past
   GRAY_MIN_ZOOM, where gray dots are withheld from the tiles for performance. */
#gray-zoom-hint {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(8px);
  z-index: 18; background: var(--fk-natt); color: var(--fk-text-on-dark);
  border-radius: 10px; box-shadow: var(--fk-shadow-lg);
  padding: 9px 16px; font-size: 13px; font-weight: 500; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 160ms, transform 160ms;
}
#gray-zoom-hint.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* The fallback's corner note: bottom-left stack, above the scale bar. Small and
   quiet on purpose: it explains a plainer map, it is not an error. */
.basemap-fallback-note {
  max-width: min(280px, calc(100vw - 120px)); padding: 3px 8px; border-radius: 6px;
  background: rgba(255,255,255,0.88); color: var(--fk-text-secondary);
  font-size: 11px; line-height: 1.35; box-shadow: 0 1px 2px rgba(27,58,75,0.12);
}

/* ── Samlinger: the collection group at the top of the Filtre panel ─────────── */
/* Favoritter / Mine fangster / Delte fangster. MODES, not attribute filters —
   while any is on it overrides + greys out the attribute sections below. Each row
   is a pure FILTER — collection membership is deliberately not drawn on the dots
   (there is only room for one channel at dot scale and the tier owns it), so these
   rows carry no colour swatch that would imply a dot colour. */
.filters-panel-collections { border-bottom: 0.5px solid var(--fk-border); margin-bottom: 4px; padding-bottom: 6px; }
.filters-panel-collections[hidden] { display: none; }
.filters-panel-collections-title {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--fk-text-secondary); padding: 2px 4px 4px;
}
.collection-row { display: flex; flex-direction: column; }
.collection-toggle {
  display: flex; align-items: center; gap: 9px; width: 100%;
  background: none; border: 0; cursor: pointer; padding: 9px 4px; border-radius: 8px;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--fk-text-primary);
}
.collection-toggle:hover:not(:disabled) { background: var(--fk-snø); }
/* A collection with nothing in it is disabled, not hidden: the row is the discovery
   surface for the feature that would fill it, so it stays visible and explains
   itself (.collection-empty) rather than vanishing. */
.collection-toggle:disabled { cursor: default; opacity: 0.45; }
.collection-label { flex: 1 1 auto; text-align: left; }
.collection-count {
  flex: none; font-size: 12px; font-weight: 600; color: var(--fk-text-secondary);
  font-variant-numeric: tabular-nums;
}
/* Pill switch on the right; fills with the collection's ring colour when on. */
.collection-switch {
  flex: none; width: 34px; height: 20px; border-radius: 999px; background: #E5E2DB; position: relative;
  transition: background 150ms;
}
.collection-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 150ms;
}
.collection-toggle[aria-pressed="true"] .collection-switch { background: var(--fk-natt); }
.collection-toggle[aria-pressed="true"] .collection-switch::after { transform: translateX(14px); }
.collection-empty {
  font-size: 12px; color: var(--fk-text-secondary); margin: -4px 0 6px 4px; line-height: 1.35;
}
/* The line that makes the override VISIBLE: what is showing, and that the filters
   below are not applying. */
.filters-panel-collections-note {
  font-size: 12px; font-weight: 500; color: var(--fk-natt);
  background: var(--fk-snø); border-radius: 6px;
  margin: 4px 0 2px; padding: 6px 8px; line-height: 1.35;
}
.filters-panel-collections-note[hidden] { display: none; }
/* While ANY collection is on, the attribute filters are inert + dimmed (the
   collection rows stay live; the Filtre button stays clickable). The chips get their
   own treatment below — dimming alone doesn't tell you a chip stopped applying. */
#search-container.collections-mode .filters-panel-section,
#search-container.collections-mode .filters-panel-footer-toggle,
#search-container.collections-mode .filters-panel-foot,
#search-container.collections-mode .filter-pills,
#search-container.collections-mode .filter-bottom-row {
  opacity: 0.4; pointer-events: none;
}
/* Active-filter chips while suppressed: struck through and faded, so someone with
   "3 arter" selected can SEE that species is no longer applying rather than
   wondering why the map ignores it. Still not clickable. */
#search-container.collections-mode #filter-chips { pointer-events: none; }
#search-container.collections-mode #filter-chips .filter-chip {
  opacity: 0.45; text-decoration: line-through;
}

/* "Mine favoritter" panel — floating top-right under the avatar; single-open. */
/* SAFE AREA. 52px clears a classic notch (44-47px) but NOT a Dynamic Island
   (59px), so on iPhone 14 Pro and later the panel header was clipped by ~7px.
   Less severe than the map controls — this is not a control you must reach to
   escape a screen — but it is most phones in use, so it gets the same treatment.
   Flat values first as the no-env() fallback. */
.favorites-panel {
  position: fixed; top: 52px; right: 14px; z-index: 60;
  top: calc(52px + env(safe-area-inset-top, 0px));
  right: calc(14px + env(safe-area-inset-right, 0px));
  /* Roomy on desktop so notes are readable; capped to the viewport on mobile. */
  width: 420px; max-width: calc(100vw - 28px); max-height: min(78vh, 640px); overflow-y: auto;
  background: #fff; border: 0.5px solid var(--fk-border); border-radius: 12px; box-shadow: var(--fk-shadow-lg);
}
.favorites-panel[hidden] { display: none; }
/* Docked = a lake sidebar is stacked on top of the list ("Mine favoritter" /
   "Min fangstlogg"). DESKTOP: the list stays open and slides to the LEFT of the
   sidebar (--sidebar-w), so the list and the lake are side by side and the reader keeps
   their place in the list while hopping between lakes. Width is clamped to what's
   left of the viewport so it can never run off-screen on a narrow desktop window.
   (≤768px overrides this to display:none — see the mobile block below.) */
.favorites-panel { transition: right 250ms ease-out, max-width 250ms ease-out; }
.favorites-panel.is-docked {
  right: calc(var(--sidebar-w) + 14px);  /* the sidebar + the panel's 14px gutter */
  /* Docked is display:none under 768px, but a landscape iPhone is ~852px wide and
     so gets these rules — with the notch on a SIDE rather than the top. Without
     this the base rule's right inset is overridden away exactly where it is
     needed. */
  right: calc(var(--sidebar-w) + 14px + env(safe-area-inset-right, 0px));
  max-width: calc(100vw - var(--sidebar-w) - 28px);
}
@media (prefers-reduced-motion: reduce) { .favorites-panel { transition: none; } }
.favorites-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 8px; position: sticky; top: 0; background: #fff;
}
.favorites-panel-title { font-size: 15px; font-weight: 600; color: var(--fk-text-primary); margin: 0; }
.favorites-panel-close { background: none; border: 0; cursor: pointer; color: var(--fk-text-muted); padding: 4px; display: inline-flex; }
.favorites-panel-close .fk-ic { width: 16px; height: 16px; }
.favorites-panel-list { padding: 4px 8px 10px; }
.favorites-panel-empty { font-size: 13px; color: var(--fk-text-secondary); line-height: 1.5; padding: 6px 6px 12px; }
.fav-row {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left;
  background: none; border: 0; cursor: pointer; padding: 9px 8px; border-radius: 8px; font: inherit;
}
.fav-row:hover { background: var(--fk-snø); }
.fav-row .tier-dot { margin-top: 4px; }
.fav-row-main { min-width: 0; flex: 1 1 auto; }
.fav-row-name { display: block; font-size: 14px; font-weight: 500; color: var(--fk-text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-row-sub { display: block; font-size: 12px; color: var(--fk-text-secondary); }
/* Full note — wraps to as many lines as needed (preserves the note's own line
   breaks); the row grows and the panel scrolls. */
.fav-row-note { font-size: 12px; color: var(--fk-text-muted); margin-top: 4px; line-height: 1.45;
  white-space: pre-wrap; overflow-wrap: anywhere; }

/* ── Sidebar shell ────────────────────────────────────────────────────────── */
/* The desktop panel's width: 420px, 460px on wide screens. map.js and
   routeview.js read the rendered width, so this is the one place it is set. */
:root { --sidebar-w: 420px; }
@media (min-width: 1600px) { :root { --sidebar-w: 460px; } }
#sidebar {
  position: absolute; top: 0; right: 0; height: 100%; width: var(--sidebar-w); max-width: 100vw;
  z-index: 50; background: var(--sb-ground); box-shadow: none;
  transform: translateX(100%); transition: transform 250ms ease-in, box-shadow 250ms ease-in;
  display: flex; flex-direction: column;
}
#sidebar.open { transform: translateX(0); box-shadow: -8px 0 24px rgba(0,0,0,0.08);
  transition: transform 300ms ease-out, box-shadow 300ms ease-out; }
#sidebar-inner { height: 100%; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
#sidebar-body { display: block; }

/* Skeleton loader */
#sidebar-loading { padding: 90px 22px 22px; }
.sk-line { height: 14px; border-radius: 6px; background: linear-gradient(90deg, #E3EAEF 25%, #EDF2F5 50%, #E3EAEF 75%);
  background-size: 200% 100%; animation: sk 1.3s infinite; margin-bottom: 12px; }
.sk-title { height: 26px; width: 60%; } .sk-subtitle { width: 40%; } .sk-short { width: 30%; }
.sk-medium { width: 70%; } .sk-long { width: 90%; } .sk-spacer { height: 16px; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Sidebar dark header ──────────────────────────────────────────────────── */
.sb-header { background: linear-gradient(135deg, var(--fk-natt) 0%, var(--fk-fjord) 100%);
  padding: 18px 22px 20px; color: #fff; }
.sb-header-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sb-loc { font-size: 11px; text-transform: uppercase; letter-spacing: 2px;
  color: var(--fk-text-on-dark-muted); font-weight: 500; padding-top: 4px; min-height: 15px; }
.sb-header-actions { display: flex; gap: 8px; flex: none; }
.sb-icon-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,0.1); color: #fff; display: inline-flex; align-items: center; justify-content: center;
  transition: background 150ms;
}
.sb-icon-btn:hover { background: rgba(255,255,255,0.2); }
.sb-icon-btn .fk-ic { width: 16px; height: 16px; }
/* "Del" — the share action, labelled so it reads as an action rather than the
   bare grey glyph it replaced. Solid light fill + navy text for contrast on the
   navy header; deliberately NOT orange (that is the star, gold tier and membership
   CTA). The extra right margin separates the action from the dismiss beside it. */
.sb-share-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 13px 0 11px; margin-right: 8px; border-radius: 999px; cursor: pointer;
  background: #F1F5F8; border: 0; color: var(--fk-natt);
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.2px;
  transition: background 150ms;
}
.sb-share-btn:hover { background: #fff; }
.sb-share-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sb-share-btn .fk-ic { width: 15px; height: 15px; }
.sb-name { font-size: 28px; font-weight: 400; letter-spacing: -0.8px; margin: 6px 0 0; line-height: 1.1; }

/* ── Favorites: name-line star + private "Mitt notat" ───────────────────────── */
/* Star sits at the right end of the lake-name line, centered with it — a primary
   affordance, clearly separate from the share/close cluster above. */
.sb-name-row { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.sb-name-row .sb-name { margin: 0; flex: 1 1 auto; min-width: 0; }
.sb-star-btn {
  flex: none; width: 44px; height: 44px; margin: -8px -6px -8px 0;  /* big tap target, glyph hugs the edge */
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 50%; cursor: pointer;
  color: #E89A2C;                  /* gold outline — visible on the navy gradient */
  transition: background 150ms, color 150ms, transform 100ms;
}
.sb-star-btn .fk-ic { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8;
  transition: fill 150ms, stroke 150ms; }
.sb-star-btn:hover { background: rgba(255,255,255,0.14); }
.sb-star-btn:active { transform: scale(0.92); }
.sb-star-btn.is-fav { color: #D97706; }                 /* favorited = solid gold */
.sb-star-btn.is-fav .fk-ic { fill: #D97706; stroke: #D97706; }

/* Warm tint marks the note as the user's own space, distinct from public cards. */
.sb-note-card { background: var(--fk-gull-light); border-color: rgba(217,119,6,0.25); }
/* Filled state: note text + an inline "Rediger" affordance (no modal). */
.sb-note-display { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
/* An explicit `display` defeats the HTML `hidden` attribute (class beats the UA
   [hidden] rule), so the JS show/hide had no effect — "Rediger" showed with no
   note, and clearing a note left the stale text visible (delete looked broken).
   Restore `hidden` for the elements that set their own display. */
.sb-note-display[hidden], .sb-note-add[hidden] { display: none; }
.sb-note-text { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 14px; line-height: 1.5;
  color: var(--fk-text-primary); white-space: pre-wrap; overflow-wrap: anywhere; }
.sb-note-edit, .sb-note-cancel, .sb-note-delete {
  flex: none; background: none; border: 0; padding: 6px 8px; margin: -6px 0; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 500;
}
.sb-note-edit { color: var(--fk-gull-text); }
.sb-note-edit:hover { text-decoration: underline; }
.sb-note-cancel { color: var(--fk-text-secondary); }
.sb-note-cancel:hover { color: var(--fk-text-primary); }
/* Delete sits to the far left of the actions row, set apart as destructive. */
.sb-note-delete { color: #B91C1C; margin-right: auto; }
.sb-note-delete:hover { text-decoration: underline; }
.sb-note-delete:disabled { opacity: 0.45; cursor: default; text-decoration: none; }
/* Char count + transient save status, under the textarea. */
.sb-note-editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.sb-note-count { font-size: 11.5px; color: var(--fk-text-muted); font-variant-numeric: tabular-nums; }
/* Empty state: a clear "Legg til notat" button that expands the inline editor. */
.sb-note-add {
  display: block; width: 100%; box-sizing: border-box; text-align: center;
  background: transparent; border: 1px dashed #D3CCBA; border-radius: 11px;
  padding: 11px; font: inherit; font-size: 14px; font-weight: 500; color: #1B3A4B; cursor: pointer;
  transition: background 150ms, border-color 150ms;
}
.sb-note-add:hover { border-color: #B9AF96; background: rgba(27, 58, 75, 0.03); }
.sb-note-input {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 64px;
  border: 0.5px solid var(--fk-border); border-radius: var(--fk-radius-sm);
  padding: 10px 12px; font: inherit; font-size: 14px; color: var(--fk-text-primary); background: #fff;
}
.sb-note-input:focus { outline: 2px solid var(--fk-gull); outline-offset: 0; border-color: transparent; }
.sb-note-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.sb-note-status { font-size: 12px; color: var(--fk-text-secondary); }
.sb-note-save {
  background: var(--fk-natt); color: #fff; border: 0; border-radius: 8px;
  padding: 7px 16px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: opacity 150ms;
}
.sb-note-save:disabled { opacity: 0.45; cursor: default; }
.sb-note-save:not(:disabled):hover { opacity: 0.88; }
.sb-note-hint { font-size: 11.5px; color: var(--fk-text-muted); margin: 8px 0 0; }

/* Transient toast (e.g. "Lagt til i favoritter" when a note auto-favorites).
   Bottom-center, floats above the sidebar/sheet (z above #sidebar). */
.pelgo-toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); z-index: 70;
  display: inline-flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px);
  background: var(--fk-natt); color: #fff; font-size: 13px; font-weight: 500;
  padding: 10px 16px; border-radius: 999px; box-shadow: var(--fk-shadow-lg);
  opacity: 0; transform: translateX(-50%) translateY(8px); pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.pelgo-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.pelgo-toast .fk-ic { width: 15px; height: 15px; flex: none; fill: var(--fk-gull); stroke: var(--fk-gull); }

/* Route-mode banner above the lake name — hidden until route mode (mobile, see media query). */
.sb-route-label { display: none; }
.sb-route-label-text { font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.5px; color: #DCEAF8; }

.sb-stats { display: flex; gap: 2px; margin-top: 16px; }
/* Route stats live in the header but only ever show on the mobile peek (see media query). */
.sb-stats-route { display: none; gap: 6px; }
.sb-stat { flex: 1; background: rgba(255,255,255,0.04); padding: 9px 6px; text-align: center; }
.sb-stat:first-child { border-radius: var(--fk-radius-sm) 0 0 var(--fk-radius-sm); }
.sb-stat:last-child { border-radius: 0 var(--fk-radius-sm) var(--fk-radius-sm) 0; }
.sb-stat-num { display: block; font-size: 22px; font-weight: 500; color: #fff; line-height: 1.1; }
.sb-stat-label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--fk-text-on-dark-muted); margin-top: 3px; }

/* Route-mode stat tiles: translucent white tiles on the light-blue header — mirrors the lake
   header's tile pattern (white-on-dark) with white-on-light-blue. Individually rounded. */
.sb-stats-route .sb-stat { background: rgba(255,255,255,0.15); border-radius: 8px; }
.sb-stats-route .sb-stat-label { color: rgba(255,255,255,0.7); }   /* labels read as secondary */
/* ↑/↓ as small (≈75% of the number) inline accents beside the number, not equal-weight glyphs */
.sb-stats-route .rs-arrow { font-size: 0.72em; font-weight: 500; margin-left: 1px; }
.sb-stats-route .rs-arrow.up   { color: #4ADE80; }
.sb-stats-route .rs-arrow.down { color: #F87171; }

/* ── Species status band (welded full-bleed under the header) ─────────────────── */
.sb-species-band {
  background: var(--sb-species-bg);
  border-bottom: 1px solid var(--sb-species-border);
  color: var(--sb-species-text);
  padding: 11px 16px 12px;
}
.sb-sb-top { display: flex; align-items: center; gap: 12px; }
.sb-sb-primary { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1 1 auto; }
.sb-species-band .sb-conf-dot { width: 9px; height: 9px; }
.sb-sb-primary-txt {
  font-size: 13.5px; font-weight: 600; color: var(--sb-species-text);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sb-sb-actions { display: flex; align-items: center; gap: 16px; flex: none; }
.sb-sb-expand, .sb-sb-correct {
  background: none; border: 0; padding: 2px 0; cursor: pointer; font: inherit;
  font-size: 12.5px; font-weight: 600; color: var(--sb-species-link); white-space: nowrap;
}
.sb-sb-expand:hover, .sb-sb-correct:hover { text-decoration: underline; }
.sb-sb-caret { font-size: 10px; }
/* Expanded list — grows the band in place below an internal hairline. */
.sb-sb-list { margin-top: 11px; padding-top: 3px; border-top: 1px solid var(--sb-species-border); }
.sb-sb-list[hidden] { display: none; }
.sb-sb-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; }
.sb-sb-row + .sb-sb-row { border-top: 1px solid rgba(196,216,234,0.55); }
.sb-sb-row-name { font-size: 13.5px; color: var(--sb-species-text); flex: none; }
.sb-sb-row-conf { margin-left: auto; font-size: 11.5px; color: var(--sb-species-link); }
/* Expanded trophy value: weight + source ("Kilde" link, or the full plain name which
   may wrap within the row). No ellipsis — expanded rows show the source in full. */
.sb-sb-row-val { margin-left: auto; flex: 0 1 auto; min-width: 0; padding-left: 12px;
  text-align: right; overflow-wrap: anywhere;
  font-size: 12px; font-weight: 600; color: var(--sb-species-text); }
.sb-sb-correct-foot { display: inline-block; margin-top: 9px; }
/* Species with a documented big catch: gold trophy dot (species dot colours as today). */
.sb-conf-dot.sb-fish-dot-trophy { width: 10px; height: 10px; background: var(--fk-gull); }

/* ── Gold variant — documented trophy visible to the viewer (member / showcase) ── */
.sb-species-band-gold { background: var(--sb-nudge-bg); border-bottom-color: var(--sb-nudge-border);
  color: var(--sb-nudge-text); }
.sb-conf-dot.sb-sb-dot-gold { width: 9px; height: 9px; background: var(--sb-gold); }
/* Gold-band source segment: a "Kilde" link (gold-brown, underlined) when the record
   has a URL, else the plain source name as a fallback. Mirrors the reguleringer
   "Kilde: …" convention, adapted to the band's colours. */
.sb-sb-src-link { color: var(--sb-gold-link); text-decoration: underline; font-weight: 500; }
.sb-sb-src-link:hover { color: #6E541F; }
.sb-sb-src-name { color: var(--sb-nudge-text); font-weight: 400; opacity: 0.85; }
/* Collapsed gold line 1: weight + "Kilde" are constant-width; the title and a plain
   name fallback may ellipsize freely, so the weight is always intact. */
.sb-sb-gold-line { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.sb-sb-gold-title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-weight: 600; color: var(--sb-nudge-text); }
.sb-sb-gold-weight { flex: none; font-weight: 600; color: var(--sb-nudge-text); white-space: nowrap; }
.sb-sb-gold-line .sb-sb-sep { flex: none; color: var(--sb-nudge-accent); }
.sb-sb-gold-line .sb-sb-src-link { flex: none; white-space: nowrap; }
.sb-sb-gold-line .sb-sb-src-name { flex: 1 1 auto; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
/* Gold-family styling throughout the expanded list. */
.sb-species-band-gold .sb-sb-expand, .sb-species-band-gold .sb-sb-correct { color: var(--sb-nudge-accent); }
.sb-species-band-gold .sb-sb-list { border-top-color: var(--sb-nudge-border); }
.sb-species-band-gold .sb-sb-row + .sb-sb-row { border-top-color: var(--sb-nudge-border); }
.sb-species-band-gold .sb-sb-row-name { color: var(--sb-nudge-text); }
.sb-species-band-gold .sb-sb-row-conf { color: var(--sb-nudge-accent); }
.sb-species-band-gold .sb-sb-row-val { color: var(--sb-nudge-text); }
.sb-species-band-gold .sb-conf-dot.sb-fish-dot-trophy { background: var(--sb-gold); }
/* Gold collapsed: line 1 is full width (never shares with controls); line 2 carries
   only "+N arter", indented to align with line 1's text (past the dot). */
.sb-sb-line1 { width: 100%; }
.sb-sb-line2 { padding-left: 18px; margin-top: 6px; }

/* ── GOLD_BAND_PROMINENT — the prominent gold band ────────────────────────────
   Every selector below needs .sb-sb-gold-v2 or .sb-sb-v2-* , and those exist only in
   the markup goldBandProminent() emits. With the flag off nothing here matches, so the
   rollback path is the untouched band above; and because the v2 class always rides
   alongside .sb-species-band-gold, the blue/green band is unreachable from here by
   construction rather than by care.

   Colours: the amber ground and its text are the existing nudge tokens
   (--sb-nudge-bg / --sb-nudge-text); the navy is --fk-natt, the same navy as the
   sidebar header this band is welded to; and the gold is --fk-gull (#D97706), the
   product's orange-gold — the favorited star, the gold map dot, the gold tier and
   filter chips, and the featured plan border on /medlemskap. Using it here means the
   band's figure is literally the same colour as the dot the reader clicked to get here.

   NO DISPLAY FACE. An earlier revision set the figure in a ui-serif stack; on any
   machine that fell through to Georgia the old-style figures rendered the digits
   shorter than the "kg" beside them, which reads as broken. The figure uses the panel's
   own sans (inherited --fk-font) at weight 700; size and colour carry the emphasis
   instead of a second family.

   --sb-gold-kicker sits on the band rather than on :root, so with the flag off it is
   not even inherited as a custom property: the rollback render matches the previous
   band down to the computed style of every node, not merely down to what it paints.

   13px top and bottom: the goal is louder, not taller. The extra height the band takes
   is spent on the number itself, not on air. 22px left and right so the figure and the
   kicker are not jammed against the panel edge — this band is full-bleed, so it has no
   card inset of its own to sit inside. */
.sb-sb-gold-v2 {
  --sb-gold-kicker: #8A5A12;   /* "DOKUMENTERT STORØRRET" — a muted gold against the amber */
  padding: 13px 22px; border-bottom: 3px solid var(--fk-gull);
}
.sb-sb-v2-kicker {
  font-size: 10px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--sb-gold-kicker); line-height: 1.1; margin-bottom: 3px;
  /* Bounded by trophyKicker()'s whitelist, so this is always short — but never let it
     become a two-line block if a future species or translation stretches it. */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Figure and source share one baseline. The figure is fixed; the source is the only
   shrinkable item, so the number is never the thing that gets cut. */
.sb-sb-v2-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sb-sb-v2-weight {
  flex: none; font-size: 32px; line-height: 1; font-weight: 700; letter-spacing: -0.015em;
  color: var(--fk-gull); white-space: nowrap;
  font-variant-numeric: lining-nums tabular-nums;
}
/* The unit is not the measurement. At 0.6em it reads as an annotation on the figure
   rather than a second word competing with it; both live in the same inline box, so
   they share a baseline without any alignment of their own. */
.sb-sb-v2-unit {
  font-size: 0.6em; font-weight: 600; letter-spacing: 0; margin-left: 0.18em;
}
/* A threshold claim ("over 1 kg") is an inference from a source, not a fish anyone
   weighed, and it must not borrow a measurement's authority. It gives up the size
   (19px, not 32) and the strong gold (the muted kicker brown), so it still leads the
   line and still sits on the same baseline — it just reads as a statement about the
   water rather than a number off a scale. */
.sb-sb-v2-weight-tier {
  font-size: 19px; font-weight: 700; letter-spacing: -0.01em; color: var(--sb-gold-kicker);
}
/* Scoped to .sb-sb-v2-head, NOT to the band: the expanded species list underneath is
   shared with the legacy presentation and must keep its own type sizes and its
   gold-brown source links, so opening the list looks the same either way. */
.sb-sb-v2-head .sb-sb-sep { flex: none; font-size: 14px; color: var(--sb-gold-kicker); }
/* The source is set in navy here rather than in the band's older gold-brown link
   colour (--sb-gold-link): it sits on the figure's baseline and should read as quiet
   supporting text next to the gold number, with the underline carrying the affordance. */
.sb-sb-v2-head .sb-sb-src-link { flex: none; font-size: 14px; white-space: nowrap; color: var(--fk-natt); }
.sb-sb-v2-head .sb-sb-src-link:hover { color: var(--fk-gull); }
.sb-sb-v2-head .sb-sb-src-name {
  flex: 0 1 auto; min-width: 0; font-size: 14px; color: var(--fk-natt); opacity: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* No dot on this presentation, so line 2 aligns with the kicker and the weight
   instead of being indented past one. Its 6px top margin is the band's existing one. */
.sb-sb-gold-v2 .sb-sb-line2 { padding-left: 0; }
.sb-sb-gold-v2 .sb-sb-expand { font-size: 13px; color: var(--sb-gold-kicker); }

/* Narrow screens: keep "Foreslå endring" priority on the BLUE band — its collapsed
   expander compresses to "+N". The gold expander lives on its own full-width line 2,
   so it keeps the "arter" word. */
@media (max-width: 400px) {
  .sb-sb-actions .sb-sb-word { display: none; }
  .sb-sb-actions { gap: 12px; }
}

/* ── The free-signup wall ──────────────────────────────────────────────────────
   ONE component, six triggers (wall.js). MOBILE FIRST: 71% of purchases happen on
   a phone, so every size here is chosen for the 390px sheet and only relaxed
   upward. The whole card — reassurance, Google, e-mail field, send button — fits
   above the fold at the full snap point on a 667px screen.

   THE CARD, NOT THE PANEL. The wall is a 340px card that floats in the sidebar
   rather than filling it (docs/ui/soft-wall-reference.html). Every hex below is
   written out rather than tokenised: they come from the reference, which is the
   design's source of truth, and a var() here would silently follow a token change
   the design did not ask for.

   TWO HEADERS, and the LAKE picks — .wall-header-gold for a gold lake, plain navy
   for everything else. The body varies by trigger (doors or none), but the auth
   block is one and the same everywhere: one to maintain and one to measure. */
/* NOT A DIALOG. The wall is a STATE OF THE SIDEBAR — it replaces the lake dossier,
   which runs full width with a full-bleed header — so it fills its container at
   every width and owns none of the chrome the container already has: no
   max-width, no radius, no shadow, no vertical centring. It shipped as a 340px
   floating card, which left the desktop sidebar with empty space above and below
   it and the phone with grey gutters down both sides.
   The header's and the body's own padding are the design's and stay. */
.wall-shell { box-sizing: border-box; }
.wall-panel { width: 100%; background: #fff; }

/* Mobile only: a strip above the card for the sheet's drag handle, which belongs
   to the SHEET and not to the wall. The handle is absolutely positioned, so making
   the header un-positioned hands its containing block to .wall-shell and it lands
   on the sheet's ground above the navy instead of floating inside it. It stays a
   descendant of .sb-header in the DOM, so wireSheetDrag's `closest('.sb-header')`
   still reads a touch on it as a drag.
   None of this applies above the breakpoint — the handle is display:none there and
   the header sits flush against the top of the sidebar. */
@media (max-width: 768px) {
  .wall-shell { position: relative; padding-top: 22px; }
  /* .wall-panel .wall-header, not .wall-header: the mobile sheet block further
     down this file makes .sb-header sticky, and at equal specificity that would
     win — leaving the header as the handle's containing block and the handle
     back inside the navy. */
  /* padding-top too: the mobile sheet block below reserves 26px inside .sb-header
     for the drag handle, and on the wall the handle moved OUT of the header in
     #333 — so that 26px has been holding space for something that is not there.
     14px, matching the strip's own padding. Scoped to .wall-panel: the LAKE sheet
     still carries its handle inside .sb-header and keeps the 26px. */
  .wall-panel .wall-header { position: static; padding-top: 14px; }
  .wall-header .sb-drag-handle { top: 0; height: 22px; }
  /* The pill is white-on-navy everywhere else; on the sheet's light ground it has
     to invert or it is invisible. */
  .wall-header .sb-drag-handle::before { background: rgba(27, 58, 75, .25); }
}

/* The header owns its own gradient here rather than inheriting .sb-header's, so
   the gold variant can layer a glow behind it.
   14px 16px, not 22px: it carries context now, not the ask, and at the old
   padding a two-line strip still read as a title block. */
.wall-header {
  padding: 14px 16px;
  background: linear-gradient(160deg, #1B3A4B 0%, #234a5f 100%);
}
/* Amber rising from the bottom of the strip: the "gold lake" signal. */
.wall-header-gold {
  background:
    radial-gradient(120% 90% at 50% 100%, rgba(217,119,6,.32) 0%, rgba(217,119,6,0) 55%),
    linear-gradient(160deg, #1B3A4B 0%, #234a5f 100%);
}
.wall-header .sb-icon-btn {
  width: 30px; height: 30px; background: rgba(255,255,255,.14);
}
/* ── The navy strip: where the visitor was ──────────────────────────────────
   Two quiet lines. Uppercase at 10.5px with wide tracking is this codebase's
   eyebrow (cf. .sb-loc), and it keeps a sentence-shaped phrase — "Du prøvde å
   åpne" — reading as a label rather than as a statement competing with the ask. */
.wall-header .wall-eyebrow {
  font-size: 10.5px; font-weight: 600; line-height: 1.3;
  letter-spacing: .12em; text-transform: uppercase;
  color: #9FB6C4; padding-top: 3px;
}
/* The lake. Semibold, not bold, and 20px, not 30 — it identifies the card, it is
   not the thing being asked. */
.wall-lake {
  font-size: 20px; font-weight: 600; letter-spacing: -0.2px;
  line-height: 1.2; margin: 3px 0 0; color: #fff;
}

/* The body sits directly on the card — the old section/card chrome would have
   been a card inside a card now that the panel is one. */
.wall-body { padding: 18px 20px 20px; gap: 0; }
.wall-body .sb-section { margin: 0; }
/* .sb-card.wall-card, not .wall-card: .sb-card is declared further down this file,
   so at equal specificity it would win the cascade and put a bordered card back
   inside the panel. */
.sb-card.wall-card {
  display: flex; flex-direction: column; gap: 0;
  background: transparent; border: 0; box-shadow: none; padding: 0; border-radius: 0;
}

/* The cause line — why the card appeared ("Du har åpnet 5 av 5 gratis vann"). Small,
   muted and ABOVE the ask: it is the reason the card appeared, not the decision.
   Deliberately quieter than .wall-reassure below — that line answers an objection
   and has to be seen; this one only has to be there when the visitor wonders why
   they were stopped. Anything louder and it competes with the ask for the glance
   the ask needs. */
.wall-count {
  margin: 0 0 6px; font-size: 13px; font-weight: 600; color: #6B7C85;
}

/* THE ASK, on white, directly above the buttons that answer it. Navy rather than
   the body's usual ink: it is the one line on this card that has to carry weight,
   and the header's own colour is what makes it read as the same voice. */
.wall-headline {
  font-size: 24px; font-weight: 700; letter-spacing: -0.4px;
  line-height: 1.15; margin: 0 0 10px; color: #1B3A4B;
}

/* Line two of the body, and green on purpose: the objection that stops people
   here is a card field, not a missing feature. */
.wall-reassure {
  display: flex; align-items: center; gap: 7px; margin: 0 0 14px;
  font-size: 13px; font-weight: 600; color: #2B7A4B;
}
.wall-reassure-ic { width: 15px; height: 15px; flex: none; color: #2B7A4B; }

.wall-auth { display: flex; flex-direction: column; }

/* ── Google's button, not ours ────────────────────────────────────────────────
   White surface, the four-colour mark, Roboto — still Google's button and still
   deliberately NOT restyled to match our controls, because the recognisability IS
   the conversion. The stroke, radius and type size follow the reference design's
   Google spec (1.5px #DADCE0, 10px, 15px/500 #3C4043) rather than the tighter
   40px/4px one it replaces; both are Google's own neutrals, and this one sits at
   the same weight as the e-mail panel below it instead of looking like a
   left-over. Roboto is loaded in index.html; the fallbacks are Google's own. */
.wall-gsi {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 13px; box-sizing: border-box;
  background: #FFFFFF; border: 1.5px solid #DADCE0; border-radius: 10px;
  font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px; font-weight: 500; color: #3C4043;
  text-decoration: none; cursor: pointer;
}
.wall-gsi:hover { background: #F7F8F8; }
.wall-gsi:focus-visible { outline: 2px solid var(--fk-vatn); outline-offset: 2px; }
.wall-gsi-icon { width: 20px; height: 20px; flex: none; }
.wall-gsi-text { color: #3C4043; }

/* The e-mail field and its button: full width, stacked. Side by side the button
   could only be as wide as the field left over, and on a 320px phone it squeezed
   the placeholder until an address truncated mid-domain. 16px on the input because
   anything smaller makes Safari zoom the page on focus — which reads as the form
   breaking. */
.wall-email-input {
  width: 100%; box-sizing: border-box; padding: 12px 14px; margin-bottom: 10px;
  border: 1.5px solid #DADCE0; border-radius: 9px;
  font-family: inherit; font-size: 16px; color: var(--sb-text); background: #fff;
}
.wall-email-input::placeholder { color: var(--fk-text-secondary); opacity: .7; }
.wall-email-input:focus { outline: none; border-color: #D97706;
  box-shadow: 0 0 0 3px rgba(217,119,6,0.16); }
/* Amber, not the product blue: this is the one thing on the card we want pressed,
   and the shadow lifts it off the box it sits in. */
.wall-email-btn {
  width: 100%; padding: 13px; border: 0; cursor: pointer;
  border-radius: 9px; background: #D97706; color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(217,119,6,.35);
}
.wall-email-btn:hover { background: #C2660B; }
.wall-email-btn:focus-visible { outline: 2px solid #1B3A4B; outline-offset: 2px; }
.wall-email-arrow { margin-left: 2px; }
.wall-msg { margin: 12px 0 0; font-size: 13px; line-height: 1.45; display: none; }
.wall-msg.show { display: block; }
.wall-msg.error { color: #B91C1C; }

.wall-login {
  margin: 16px 0 0; font-size: 13.5px; color: #57534E; text-align: center;
}
/* Underlined explicitly: the reference leans on the browser default, and this
   stylesheet resets `a { text-decoration: none }` globally (line ~100). Without
   this the one way back for an existing user stops looking like a link. */
.wall-login a { color: #2563EB; font-weight: 600; text-decoration: underline; }

/* ── The quiet membership line ───────────────────────────────────────────────
   Rendered only on a gold lake's no-door cards (favorites, catch_log, terrain3d) —
   twoDoorMshipLine() in wall.js. A card with doors carries the paid door instead.

   SECONDARY IN THE STYLING TOO, not just in the position. No button, no fill, no
   accent ground: the same 13px body grey as the login line above it, with only
   the link itself in blue. The hairline is doing the one job that matters here —
   making this a SECOND door rather than a footnote hanging off the login line —
   and it is the lightest thing that does it. If this line ever earns promotion,
   the event that proves it (wall_membership_click) is what should move it, and
   this is where that change lands. */
.wall-mship {
  margin: 14px 0 0; padding-top: 13px;
  border-top: 1px solid var(--sb-card-border);
  font-size: 13px; line-height: 1.5; color: #57534E; text-align: center;
}
/* Same explicit underline as .wall-login a, and for the same reason: this
   stylesheet resets `a { text-decoration: none }` globally, so without it the
   link stops looking like one. nowrap keeps "Se medlemskap →" off two lines at
   340px, where the arrow would otherwise orphan. */
.wall-mship-link {
  color: #2563EB; font-weight: 600; text-decoration: underline; white-space: nowrap;
}

/* ── The two doors ────────────────────────────────────────────────────────────
   THE CARD THIS REPLACES SHOWED FOUR BLOCKS OF IDENTICAL WEIGHT: two plan tiles
   and two auth panels, stacked, with nothing saying which were choices and which
   was the action. Three things were missing and all three are cheap: a selection
   state, a sequence, and one action instead of two. */

/* The ask is a SENTENCE ("Registrer deg eller bli medlem for å
   fortsette"), not a phrase. At the shared 24px it makes a three-line h1 and stops
   being one scannable line, which is the property .wall-headline is built around. */
.wall-headline-sentence { font-size: 20px; letter-spacing: -0.3px; line-height: 1.2; }

/* Step labels. The cheapest thing that encodes order: the same 11px caps the
   auth panels already use, with the number in the amber that means "act" here. */
.wall-step {
  display: flex; align-items: center; gap: 7px; margin: 0 0 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #57534E;
}
.wall-choice + .wall-step { margin-top: 16px; }
.wall-step-n {
  width: 17px; height: 17px; border-radius: 50%; background: #D97706; color: #fff;
  flex: none; display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; letter-spacing: 0;
}

/* ── The choice group ────────────────────────────────────────────────────────
   COLOUR IS TAXONOMY, BORDER IS STATE. The pill says which KIND of access a row is
   — green free, gold paid — and never changes. Selection is carried by the border,
   the ground and the filled radio, so the two jobs cannot be confused with each
   other.

   The green is #2B7A4B, the same green .wall-reassure uses, which on this card
   already means "no payment here". Deliberately NOT a tier green (#16A34A dots,
   --fk-skog): those carry confidence meaning on the map and must not be spent on
   a price. */
.wall-choice { display: grid; gap: 8px; margin: 0 0 16px; }
.wall-opt {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 11px 12px; border-radius: 11px; border: 1.5px solid #E5E2DB;
  background: #fff; font: inherit; color: inherit; cursor: pointer;
}
.wall-opt.on        { border-color: #2B7A4B; background: #F1F8F4; box-shadow: 0 2px 10px rgba(43,122,75,.14); }
.wall-opt.on.paid   { border-color: #B45309; background: #FBF3E4; box-shadow: 0 2px 10px rgba(180,83,9,.14); }
.wall-opt:focus-visible { outline: 2px solid var(--fk-vatn); outline-offset: 2px; }
.wall-radio {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid #C9C4BA; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.wall-opt.on .wall-radio { border-color: #2B7A4B; }
.wall-opt.on .wall-radio::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #2B7A4B; }
.wall-opt.on.paid .wall-radio { border-color: #B45309; }
.wall-opt.on.paid .wall-radio::after { background: #B45309; }
.wall-opt-txt { min-width: 0; flex: 1 1 auto; }
/* A VERB PHRASE, ALWAYS — "Se rutene til Femunden", never "Ruter til Femunden".
   The number lives inside that sentence rather than in a column of its own: an
   orphan figure beside a noun makes the reader join two fragments the copy should
   have joined. <b> is the figure, coloured to its plan. */
.wall-opt-t { display: block; font-size: 14px; font-weight: 700; color: #1C1917; line-height: 1.25; }
.wall-opt-t b { color: #2B7A4B; font-variant-numeric: tabular-nums; }
.wall-opt.paid .wall-opt-t b { color: #B45309; }
.wall-opt-s { display: block; font-size: 12px; color: #78716C; margin-top: 2px; line-height: 1.35; }
.wall-opt-tag {
  font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 5px; border-radius: 5px; flex: none;
  background: #2B7A4B; color: #fff; border: 1px solid #2B7A4B;
}
.wall-opt.paid .wall-opt-tag { background: #B45309; border-color: #B45309; }

/* ── ONE registration box ────────────────────────────────────────────────────
   The two wells become one. The invariant that mattered was that Google and
   e-mail WEIGH THE SAME — same width, same prominence, no recommendation — and
   that is unchanged: both controls are still full width and neither is favoured.
   What changes is that registration is visibly ONE step with two inputs rather
   than two offers competing with the two choice cards above it. */
.wall-auth-one {
  border: 1.5px solid #E5E2DB; border-radius: 12px; padding: 12px; background: #FAFAF7;
}
.wall-auth-one .wall-authgroup { display: block; }
.wall-auth-one .wall-gsi { width: 100%; }
/* NOT .wall-divider — that element was removed with the old asymmetric layout and a
   test asserts it stays gone. This is a different thing in a different place: a
   separator INSIDE one box between two controls of equal weight, not a divider
   between a promoted button and a demoted well. */
.wall-auth-one .wall-auth-or {
  display: flex; align-items: center; gap: 9px; margin: 10px 0;
  font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: #A8A29E;
}
.wall-auth-one .wall-auth-or::before,
.wall-auth-one .wall-auth-or::after { content: ''; height: 1px; background: #E5E2DB; flex: 1 1 auto; }
/* Webview order (EMAIL_OTP_REORDER_ENABLED + a detected Meta browser). Google is
   never removed — it still completes for a third of those visitors — it just
   stops being the first thing. A class swap, not a node move: the anchor keeps
   its href, its handler and its notice, so a reordering bug cannot break the path
   that still works. The separator sits between them in both orders. */
.wall-auth-one.wall-email-first { display: flex; flex-direction: column; }
.wall-auth-one.wall-email-first #sb-wall-email-panel  { order: 1; }
.wall-auth-one.wall-email-first #sb-wall-or           { order: 2; }
.wall-auth-one.wall-email-first #sb-wall-google-panel { order: 3; }

/* ── Density, measured ────────────────────────────────────────────────────────
   Named .wall-body-two-door because this card was the `two_door` arm of a split
   whose control is now gone; every wall body carries the class.

   The card carries a cause line, a two-line ask, two choice cards and two step
   labels, so it is tall by construction. Re-measured 2026-10-21 on the live /kart
   page in headless Chrome (iPhone UA, touch, DPR 2), the sheet at its full snap
   point, WITHOUT the Compact rules below (which now apply at every negative row).
   "margin" is the gap between the bottom of "Send kode" and the bottom of
   the viewport; negative means it needs a scroll. Google is above the fold at all
   of these.

     viewport                         blue lake   gold lake
     320x568  SE, no toolbars           -72px       -54px
     320x460  SE, Safari toolbars      -169px      -151px
     390x844  no toolbars              +194px      +194px
     390x664  Safari toolbars           +32px       +32px
     390x600  in-app browser            -25px       -25px

   At 320 the paid door's title wraps to two lines on a non-gold lake ("Se kartet
   + alle 352 gullvann"), which is the 18px between the two columns. Everything
   below is spacing only; no type size moves, and the 16px on the e-mail input is
   untouched because anything smaller makes Safari zoom the page on focus. */
.wall-body-two-door { padding-top: 14px; }
.wall-body-two-door .wall-headline { margin-bottom: 8px; }
.wall-body-two-door .wall-step { margin-bottom: 6px; }
.wall-body-two-door .wall-choice { gap: 6px; margin-bottom: 12px; }
.wall-body-two-door .wall-choice + .wall-step { margin-top: 12px; }
.wall-body-two-door .wall-opt { padding: 9px 12px; }
.wall-body-two-door .wall-auth-one { padding: 10px; }
.wall-body-two-door .wall-auth-one .wall-gsi { padding: 11px; }
.wall-body-two-door .wall-auth-one .wall-auth-or { margin: 7px 0; }
.wall-body-two-door .wall-auth-one .wall-email-input { margin-bottom: 8px; }
.wall-body-two-door .wall-login { margin-top: 12px; }

/* ── Compact: small or short phone screens ───────────────────────────────────
   THE RULE: the e-mail field and "Send kode" are on screen without a scroll at
   320x460 (an SE-sized phone in Safari with its toolbars showing). Before this the
   button sat 151-169px below the fold there, 54-72px at 320x568 and 25px at
   390x600 (an in-app browser). The trigger is width OR height, because the in-app
   browsers fail on height at 390 wide, and a 375px iPhone in Safari (553 tall)
   fails the same way an SE does.

   What goes, in order of what it bought at 320x460:
     sheet full height, no map strip above it      46px
     step labels "1 Velg…" / "2 Registrer deg"   ~60px  the radio cards and the
                                                         one box still read as
                                                         choose-then-register
     header on one line: lake + close, no eyebrow ~35px  the cause line below
                                                         already says what happened
     paid title on one line ("Se alle 352 gullvann") ~17px  its qualifier stays
     padding in the doors and the box             ~30px
   No type size moves on the input (16px stops Safari zooming on focus), and the
   paid door keeps "37 kr/mnd · betales årlig".

   Measured after, same method as the table above ("Send kode" margin):
   320x460 +37, 320x568 +145, 375x553 +130, 360x640 +217, 390x600 +177,
   390x664 +241; 390x844 is outside the query and unchanged at +194. */
@media (max-width: 768px) and (max-height: 700px), (max-width: 359px) {
  #sidebar.open.sheet-full:has(.wall-shell) { height: 100vh; height: 100dvh; }

  .wall-panel .wall-header {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
    column-gap: 10px; padding: 8px 12px 8px 16px;
  }
  .wall-header .sb-header-top { display: contents; }
  .wall-header .wall-eyebrow { display: none; }
  .wall-header .sb-header-actions { grid-column: 2; grid-row: 1; }
  .wall-header .wall-lake {
    grid-column: 1; grid-row: 1; margin: 0; font-size: 17px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  .wall-body-two-door { padding: 10px 16px 14px; }
  .wall-body-two-door .wall-count { margin-bottom: 4px; }
  .wall-body-two-door .wall-headline { font-size: 18px; margin-bottom: 8px; text-wrap: balance; }
  .wall-body-two-door .wall-step { display: none; }
  .wall-body-two-door .wall-choice { gap: 5px; margin-bottom: 8px; }
  .wall-body-two-door .wall-opt { padding: 7px 10px; }
  .wall-opt-plus { display: none; }
  .wall-body-two-door .wall-auth-one { padding: 8px; }
  .wall-body-two-door .wall-auth-one .wall-gsi { padding: 9px; }
  .wall-body-two-door .wall-auth-one .wall-auth-or { margin: 4px 0; }
  .wall-body-two-door .wall-auth-one .wall-email-input { padding: 9px 12px; margin-bottom: 6px; }
  .wall-body-two-door .wall-email-btn { padding: 10px; }
  .wall-body-two-door .wall-login { margin-top: 8px; }
}

/* The e-mail code panel the OTP controller swaps in place of .wall-auth. It ships
   its own markup (otp.js) styled for the auth PAGE, so these few rules are what
   make it sit correctly inside a sidebar card. */
.wall-card .auth-otp-h { font-size: 18px; font-weight: 700; margin: 0 0 4px; color: var(--sb-text); }
.wall-card .auth-sub { font-size: 13.5px; color: var(--fk-text-secondary); margin: 0 0 12px; }
.wall-card .auth-code-input {
  width: 100%; height: 52px; box-sizing: border-box; text-align: center;
  font-size: 26px; font-weight: 700; letter-spacing: 8px;
  border: 1px solid var(--sb-card-border); border-radius: var(--sb-radius-el);
  font-family: inherit; color: var(--sb-text);
}
.wall-card .auth-code-input:focus { outline: none; border-color: var(--sb-accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.14); }
.wall-card .auth-helper { font-size: 12px; color: var(--fk-text-secondary); margin: 8px 0 0; }
.wall-card .auth-resend-row { margin-top: 12px; }
.wall-card .auth-foot { margin-top: 10px; font-size: 12.5px; text-align: center; }

/* ── Membership CTA (free-tier conversion card, under the gold band) ────────── */
/* Renders inside .sb-fish, directly under the gold trophy band, only on a showcase
   gold lake shown to a free user with the paywall live (see membershipCtaHtml). */
.sb-mship { margin: 4px 0; padding: 14px 16px; background: var(--sb-nudge-bg);
  border: 1px solid var(--sb-nudge-border); border-radius: var(--sb-radius-card); }
.sb-mship-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.sb-mship-lock { color: var(--sb-nudge-accent); flex: none; }
.sb-mship-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--sb-nudge-accent); font-weight: 700; }
.sb-mship-copy { font-size: 14.5px; line-height: 1.45; color: var(--sb-nudge-text); margin: 0 0 12px; }
.sb-mship-copy strong { color: var(--sb-text); font-weight: 700; }
/* Both tiles are the same three-line shape — price, binding, billing detail — so the
   plans read as siblings. The top margin is the badge's overhang, not spacing. */
.sb-mship-tiles { display: flex; gap: 10px; margin: 13px 0 12px; }
.sb-mship-tile { position: relative; flex: 1; background: var(--sb-card);
  border-radius: var(--sb-radius-el); padding: 11px 8px 10px; text-align: center; }
.sb-mship-tile-annual { border: 1.5px solid var(--sb-accent); }
.sb-mship-tile-monthly { border: 1px solid var(--sb-card-border); }
/* Savings badge, straddling the annual tile's top border. Its % is computed from the
   two prices in membership_cta.js, never typed in. */
.sb-mship-badge { position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; background: var(--sb-nudge-accent); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em; line-height: 1;
  padding: 4px 8px; border-radius: 999px; }
.sb-mship-price { font-size: 19px; font-weight: 700; color: var(--sb-text); line-height: 1.1; }
.sb-mship-per { font-size: 13px; font-weight: 600; color: var(--sb-text-2); }
.sb-mship-tile-monthly .sb-mship-price { font-weight: 600; color: var(--sb-text-2); }
/* Line 2 — the binding, the thing that actually separates the two plans. Same size and
   weight on both tiles; only the colour differs (accent on the annual, quiet on the
   monthly) so the shape stays identical. */
.sb-mship-term { font-size: 12px; font-weight: 600; color: var(--sb-text-2); margin-top: 5px; }
.sb-mship-term-bind { color: var(--sb-nudge-accent); }
/* Line 3 — the billing detail. On the annual tile this is where the real 449 lives. */
.sb-mship-note { font-size: 11px; color: var(--sb-text-muted); margin-top: 3px; }
/* On the narrowest phones "449 kr, trekkes én gang" wraps to two lines and the annual
   tile stops matching the monthly one. Buy the ~15px it needs back from the padding
   and the type rather than dropping the amount. */
@media (max-width: 360px) {
  .sb-mship { padding-left: 12px; padding-right: 12px; }
  .sb-mship-tiles { gap: 8px; }
  .sb-mship-tile { padding-left: 4px; padding-right: 4px; }
  .sb-mship-note { font-size: 10px; }
}
.sb-mship-btn { display: block; width: 100%; box-sizing: border-box; text-align: center;
  background: var(--sb-accent); color: #fff; font-weight: 700; font-size: 14px; padding: 13px 0;
  border-radius: var(--sb-radius-card); text-decoration: none; }
.sb-mship-btn:hover { background: #1D4FD0; }

/* Low-emphasis "gold nudge" — the quiet, fylke-level membership line on NON-gold
   sidebars. Deliberately the whisper version of .sb-mship: a calm tinted row, not a
   filled orange button. Sits as a direct .sb-body flex child, so the 22px column gap
   handles its spacing (no margin needed). */
.sb-nudge {
  display: flex; align-items: flex-start; gap: 9px;
  background: var(--sb-nudge-bg); border: 1px solid var(--sb-nudge-border); border-radius: var(--sb-radius-card);
  padding: 11px 13px; margin: 4px 0;
}
.sb-nudge-lock { color: var(--sb-nudge-accent); flex: none; margin-top: 1px; }
.sb-nudge-text { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--sb-nudge-text); }
.sb-nudge-text strong { color: var(--sb-nudge-accent); font-weight: 700; }
.sb-nudge-link {
  display: block; margin-top: 5px; color: var(--sb-nudge-accent); font-weight: 600; text-decoration: none;
}
.sb-nudge-link:hover { text-decoration: underline; }

/* ── Content body (grouped-card system) ───────────────────────────────────────
   Section labels sit OUTSIDE the cards; one white card per section, rows within a
   card divided by cool hairlines. No drop shadows anywhere. */
.sb-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.sb-section { display: block; }
.sb-h { display: flex; align-items: center; gap: 6px; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 1.4px; color: var(--sb-label); font-weight: 600; margin: 8px 0 6px; }
.sb-body > .sb-section:first-child .sb-h { margin-top: 0; }
.sb-h .fk-ic { width: 13px; height: 13px; }
.sb-card { background: var(--sb-card); border: 1px solid var(--sb-card-border);
  border-radius: var(--sb-radius-card); padding: 14px; box-shadow: none; }
.sb-empty { font-size: 13px; color: var(--sb-text-muted); padding: 2px 0; }

/* Species cards */
.sb-species-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sb-species-card { background: #fff; border: 0.5px solid var(--fk-border); border-radius: var(--fk-radius); padding: 12px 13px; }
.sb-species-top { display: flex; align-items: center; gap: 7px; }
.sb-conf-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--fk-skog); }
.sb-species-name { font-size: 15px; font-weight: 500; color: var(--fk-text-primary); }
.sb-species-conf { font-size: 12px; color: var(--fk-text-secondary); margin-top: 5px; }
.sb-species-obs { font-size: 11.5px; color: var(--fk-text-muted); margin-top: 2px; }
.sb-species-uncertain { opacity: 0.7; }
.sb-uncertain-mark { color: var(--fk-gull); font-weight: 700; margin-left: 3px; cursor: help; }

.sb-species-more { margin-top: 10px; }
.sb-species-more-btn { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0;
  font-size: 12.5px; color: var(--fk-text-secondary); cursor: pointer; padding: 4px 0; font-family: inherit; }
.sb-species-more-btn .fk-ic { width: 13px; height: 13px; transition: transform 150ms; }
.sb-species-more-btn[aria-expanded="true"] .fk-ic { transform: rotate(180deg); }
.sb-species-row { display: flex; align-items: center; gap: 7px; padding: 7px 0;
  border-top: 0.5px solid var(--fk-border); font-size: 13.5px; }
.sb-species-row .sb-conf-dot { width: 7px; height: 7px; }
.sb-species-row-meta { margin-left: auto; font-size: 11.5px; color: var(--fk-text-muted); }

.sb-uncertain-banner { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--fk-gull-light); color: var(--fk-gull-text); border-radius: var(--fk-radius-sm);
  padding: 8px 11px; font-size: 12px; margin-bottom: 10px; }
.sb-uncertain-toggle { background: none; border: 0; color: var(--fk-vatn); font-size: 12.5px; font-weight: 500;
  cursor: pointer; padding: 6px 0; font-family: inherit; }

/* Tilkomst */
.sb-access-row { display: flex; align-items: center; justify-content: space-between; }
.sb-access-label { font-size: 13px; color: var(--sb-text-2); }
.sb-access-val { font-size: 15px; font-weight: 500; color: var(--sb-text); }
.sb-access-warn { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 9px;
  border-radius: 8px; background: var(--sb-nudge-bg); color: var(--sb-nudge-accent);
  font-size: 12px; font-weight: 500; }
.sb-access-warn .fk-ic { width: 14px; height: 14px; color: var(--sb-nudge-accent); flex: none; }
.sb-divider { height: 1px; background: var(--sb-hairline); margin: 12px -14px; }
.sb-route-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: var(--fk-natt); color: #fff; border: 0; border-radius: var(--fk-radius); padding: 12px;
  font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit; transition: background 150ms; }
.sb-route-btn:hover:not(:disabled) { background: var(--fk-fjord); }
.sb-route-btn:disabled { opacity: 0.7; cursor: default; }
.sb-route-btn .fk-ic { width: 16px; height: 16px; }
.sb-byroad { font-size: 13px; color: var(--sb-text-2); }

/* ── Vær (5-day forecast strip) ───────────────────────────────────────────────
   One white grouped card like every other body section — no new visual language.
   Five equal columns that shrink together rather than scrolling: the strip is a
   glance, and a horizontally scrollable row would hide days two and three on the
   narrowest phones. Everything is centred on a fixed row rhythm so the icons line
   up across columns even when one day has a mm/wind line and its neighbour does
   not (the empty .sb-wx-meta reserves that row). */
.sb-wx-card { padding: 12px 8px 10px; }
.sb-wx-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.sb-wx-day { display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 2px 0; min-width: 0; }
.sb-wx-label { font-size: 11.5px; font-weight: 500; color: var(--sb-text-2);
  text-transform: capitalize; white-space: nowrap; }
/* Today reads as the anchor of the strip; the label also carries the fact that
   its min/max covers only the REST of the day (see renderDay in weather.js). */
.sb-wx-day.is-partial .sb-wx-label { color: var(--sb-text); font-weight: 600; }
.sb-wx-ic { width: 40px; height: 40px; display: block; }
.sb-wx-ic-neutral { color: var(--sb-text-muted); }
.sb-wx-ic-wrap { display: block; width: 40px; height: 40px; }
.sb-wx-temps { display: flex; align-items: baseline; gap: 4px; }
.sb-wx-max { font-size: 14px; font-weight: 600; color: var(--sb-text); }
.sb-wx-min { font-size: 12.5px; color: var(--sb-text-muted); }
/* Reserved even when empty, so icons stay on one baseline across the row. */
.sb-wx-meta { font-size: 10.5px; color: var(--sb-text-2); min-height: 13px;
  text-align: center; line-height: 1.25; }
.sb-wx-stale { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--sb-hairline);
  font-size: 11.5px; color: var(--sb-text-muted); text-align: center; }
.sb-wx-credit { margin: 8px 0 0; font-size: 10.5px; line-height: 1.4;
  color: var(--sb-text-muted); text-align: center; }
.sb-wx-credit a { color: var(--sb-text-muted); text-decoration: underline; }
.sb-wx-credit a:hover { color: var(--sb-text-2); }

/* Narrow phones: the strip is the one place five columns can crowd. Shrink the
   glyph and the gap rather than dropping a day — a four-day strip would silently
   change what the section claims to show. */
@media (max-width: 380px) {
  .sb-wx-card { padding: 10px 4px 8px; }
  .sb-wx-ic, .sb-wx-ic-wrap { width: 34px; height: 34px; }
  .sb-wx-label { font-size: 10.5px; }
  .sb-wx-max { font-size: 13px; }
  .sb-wx-min { font-size: 11.5px; }
  .sb-wx-meta { font-size: 9.5px; }
}

/* ── 3D-visning (entry button) ────────────────────────────────────────────────
   Filled moss green: as an outline button it read as subordinate to the filled
   "Registrer tur eller fangst" CTA, which inverted the intent. Colour only —
   the box (border, radius, padding, weight) is deliberately untouched. */
.sb-t3d-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: var(--fk-mose); color: #fff; border: 1px solid var(--sb-card-border);
  border-radius: var(--fk-radius); padding: 11px; font-size: 14px; font-weight: 500;
  cursor: pointer; font-family: inherit; transition: background 150ms, border-color 150ms; }
.sb-t3d-btn:hover { background: var(--fk-mose-dark); border-color: var(--sb-text-muted); }
.sb-t3d-btn .fk-ic { width: 16px; height: 16px; color: #fff; }
/* "Midlertidig gratis" — this is free to any account until spring, when it may move
   behind membership. Saying so up front is cheaper than explaining it later.
   Outline-only on the fill: as a pale-blue solid it read as a sticker stuck onto
   the button rather than part of it. */
.sb-t3d-free { font-size: 10.5px; font-weight: 600; letter-spacing: 0.4px;
  text-transform: uppercase; color: #fff; background: transparent;
  /* 0.75, not 0.72: at 72% this composites to #CDDEBE = 2.97:1 on the fill, which
     misses WCAG 1.4.11's 3:1 for non-text boundaries by a hair. 0.75 -> 3.11:1. */
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
/* Chip pinned right, icon + label centred: equal flex:1 bookends either side of the
   centre group. The wrapper keeps min-width:auto so it never shrinks below the chip.
   That floor is also why this only balances while the spacer's share can match the
   chip's ~122px — i.e. once the sidebar is at its full 460px. */
.sb-t3d-spacer, .sb-t3d-free-wrap { flex: 1 1 0; }
.sb-t3d-free-wrap { display: flex; justify-content: flex-end; }
/* Below that the chip is the wider bookend and the centre group would drift left —
   32px at 390px, 47px at 360px. Phones are most of the traffic, so there we drop the
   bookends and let the whole row centre as it did before the chip was pinned. */
@media (max-width: 453px) {
  .sb-t3d-spacer { display: none; }
  .sb-t3d-free-wrap { flex: none; }
}

/* Shown IN PLACE OF the button when the server refuses a key to a signed-in user —
   the per-user daily cap, the month's ceiling, or a failed request. Deliberately
   quiet: it replaces the card's contents only, so the lake dossier around it is
   untouched, and it reads as a temporary state rather than an error the user has
   done something to deserve. No button, because there is no action that helps. */
.sb-t3d-unavailable {
  margin: 0; padding: 2px 0; text-align: center;
  font-size: 13px; line-height: 1.5; color: var(--fk-text-secondary);
}

/* ── .overlay-header — the one definition of the status-bar inset ─────────────
   Every full-screen overlay in this app hand-rolls its own header and its own
   close button: .t3d-chrome, .trip-modal-head, .sg-head, .fl-intro-head,
   .fav-intro-header, and the headerless .fb-modal. Six designs, six close
   buttons, and — before this class — six independent chances to forget that an
   overlay which reaches the top of the screen is sitting under the status bar.
   It was forgotten four times: the username card, the 3D close (#312), the soft
   wall, and the catch-log modal.

   WHAT THIS CLASS IS, AND WHAT IT DELIBERATELY IS NOT
   It is NOT a visual component. These six headers are a transparent gradient
   over a 3D map, a white card header with a hairline, two navy gradient blocks,
   a petrol bar, and no header at all. Merging those into one look would be a
   redesign, and a shared header that breaks one overlay's layout is a worse
   trade than the six patches it replaces. So this class carries no colour, no
   background, no spacing of its own — each overlay keeps exactly the look it
   has.

   What it carries is the CONTRACT: "this element is an overlay's header, and the
   overlay's close control lives inside it." That is the thing worth sharing,
   because it is the thing the safe-area guard can check. Every overlay header
   wears .overlay-header so none can be added without being seen.

   .is-flush is the half that does work: the overlay goes edge-to-edge at the
   top, so this header IS the top of the screen and must clear the status bar.
   --overlay-header-pad is the header's own top padding, declared next to its
   visual rule, so the inset ADDS to the design rather than replacing it.

   Two-declaration form, flat value first, as everywhere else in this file: a
   browser without env() keeps the plain padding. The compound selector is load-
   bearing — it outranks each overlay's own single-class `padding` shorthand,
   which is declared later in the cascade (style.css loads before trips.css and
   suggestions.css) and would otherwise win. */
.overlay-header { /* contract only — see above. No visual declarations by design. */ }
.overlay-header.is-flush {
  padding-top: var(--overlay-header-pad, 0px);
  padding-top: calc(var(--overlay-header-pad, 0px) + env(safe-area-inset-top, 0px));
}

/* ── 3D terrain overlay ───────────────────────────────────────────────────────
   Above everything including the sheet. The canvas host fills it; MapLibre's own
   controls (navigation + attribution) render inside .t3d-canvas, so the close
   button sits in a chrome layer above them. */
.terrain3d-view { position: fixed; inset: 0; z-index: 3000; background: #0C1C28; }
.terrain3d-view[hidden] { display: none; }
.t3d-canvas { position: absolute; inset: 0; }
/* SAFE AREA. This bit ONLY in the installed web app, which is why it survived
   testing in mobile Safari: index.html set apple-mobile-web-app-status-bar-style
   to black-translucent (it is "default" since 2026-11-10) and the manifest is
   display:standalone, so the installed app owned the full screen and the iOS
   status bar was painted OVER page content. Kept: an app installed before the
   switch keeps the old style until it is re-added, and landscape notches still
   need the side insets.
   In Safari the URL bar occupies that strip, so nothing overlaps and the bug is
   invisible.

   Without this padding the close button renders under the battery/clock, and iOS
   does not forward taps in the status-bar strip to the page — so 3D became a room
   with no door on every notched iPhone.

   env() resolves only because index.html carries viewport-fit=cover; without it
   these all evaluate to 0 and this fix silently does nothing. The plain
   declaration is kept first as the fallback: a browser with no env() support
   discards the calc() line and keeps the flat padding. Left/right are for
   landscape, where the notch takes a side rather than the top. */
.t3d-chrome { position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 12px 14px; pointer-events: none;
  /* The top inset now comes from .overlay-header.is-flush; this is the base it
     adds to. Left/right stay here: they are the landscape case, which is this
     overlay's alone — it is the only one that is full-screen at tablet widths. */
  --overlay-header-pad: 12px;
  padding-left: calc(14px + env(safe-area-inset-left, 0px));
  padding-right: calc(14px + env(safe-area-inset-right, 0px));
  background: linear-gradient(to bottom, rgba(12,28,40,0.55), rgba(12,28,40,0)); }
/* min-width:0 is the load-bearing part: a flex item defaults to min-width:auto,
   which refuses to shrink below its text and lets a long lake name run straight
   under the close button instead of truncating. */
.t3d-title { font-size: 17px; font-weight: 600; color: #fff; pointer-events: none;
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.t3d-close { pointer-events: auto; width: 36px; height: 36px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12,28,40,0.72); color: #fff; border: 0; border-radius: 50%;
  font-size: 16px; line-height: 1; cursor: pointer; font-family: inherit; }
.t3d-close:hover { background: rgba(12,28,40,0.9); }
.t3d-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 1; color: var(--fk-text-on-dark); font-size: 13.5px; letter-spacing: 0.2px; }
/* The MapLibre control stack needs clearing room under the close button, and the
   attribution must stay legible over satellite imagery (it is a licence term, not
   a nicety) — hence the solid-ish backing rather than the map's default. */
/* 56px clears the close button; the inset then clears the status bar on top of
   that, and the right inset handles a landscape notch. Bottom controls are
   already lifted by the global .maplibregl-ctrl-bottom-* rule further down, so
   the home indicator is covered. Flat value first as the no-env() fallback. */
.terrain3d-view .maplibregl-ctrl-top-right {
  top: 56px;
  top: calc(56px + env(safe-area-inset-top, 0px));
  right: env(safe-area-inset-right, 0px); }
.terrain3d-view .maplibregl-ctrl-attrib { background: rgba(255,255,255,0.9); }

/* Overlay controls are 44px, not MapLibre's default 29px. This is a phone-in-the-
   field surface with gloves and cold hands, and 29px is below every touch-target
   guideline. Applied to the WHOLE stack rather than just the new rotate group:
   sizing one group and not the other would make them visibly different objects,
   and "same size, same buttons" is the point. Scoped to .terrain3d-view, so the
   main map's controls are untouched. */
.terrain3d-view .maplibregl-ctrl-group button { width: 44px; height: 44px; }
.terrain3d-view .maplibregl-ctrl-group button .maplibregl-ctrl-icon { padding: 6px; }

/* The compass is its own NavigationControl, so it gets its own white rounded box
   and shadow. Pushed down so it reads as a distinct control rather than a third
   zoom button — MapLibre's own inter-control margin is 10px; 16 makes the split
   unambiguous. Targeted by adjacency (zoom group, then compass group) rather than
   :has(), which keeps it working on older mobile Safari. */
.terrain3d-view .maplibregl-ctrl-top-right .maplibregl-ctrl-group + .maplibregl-ctrl-group {
  margin-top: 16px !important;
}

/* THE AFFORDANCE. A bare needle reads as an INDICATOR — "this shows where north
   is" — so nobody presses it, and the 3D view looks like a fixed picture. A ring
   of curved arrows around the needle says "this turns" without changing what it
   does: the arrows are painted on the BUTTON, while the needle lives on the inner
   .maplibregl-ctrl-icon span which MapLibre rotates. Putting them on the icon
   would spin the arrows along with the needle and destroy the cue. */
.terrain3d-view .maplibregl-ctrl-compass {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpath d='M32.29 7.84A17.5 17.5 0 0 1 32.29 36.16 M11.71 36.16A17.5 17.5 0 0 1 11.71 7.84' fill='none' stroke='%2355707F' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M32.29 36.16L39.26 35.54L35.02 29.72Z M11.71 7.84L4.74 8.46L8.98 14.28Z' fill='%2355707F'/%3E%3C/svg%3E");
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: 44px 44px;
}
/* cursor:grab / :active grabbing already come from maplibre-gl.css — the second
   affordance, and the reason the compass must keep its own class rather than being
   re-skinned as a plain button. */

/* First-run hint. Non-blocking, once ever, and the only cue beyond the arrow ring
   that a TOUCH user gets — there is no cursor and no tooltip on a phone. */
.t3d-hint { position: absolute; top: 108px; right: 62px; z-index: 3;
  top: calc(108px + env(safe-area-inset-top, 0px));
  right: calc(62px + env(safe-area-inset-right, 0px));
  max-width: 190px; padding: 8px 11px; border-radius: var(--fk-radius-sm);
  background: rgba(12,28,40,0.9); color: var(--fk-text-on-dark);
  font-size: 12.5px; line-height: 1.35; pointer-events: none;
  animation: t3dHintIn 200ms ease-out; }
/* Little pointer aimed at the compass. */
.t3d-hint::after { content: ''; position: absolute; top: 14px; right: -5px;
  width: 0; height: 0; border-top: 5px solid transparent;
  border-bottom: 5px solid transparent; border-left: 6px solid rgba(12,28,40,0.9); }
@keyframes t3dHintIn { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .t3d-hint { animation: none; } }
/* Lock the page behind the overlay so a touch-scroll does not move the sheet
   underneath while the user is dragging to rotate. */
body.t3d-open { overflow: hidden; }

/* Route results */
.sb-route-results { display: flex; flex-direction: column; gap: 9px; }
/* The cards' own wrapper (redrawn in place when the elevation profile arrives), so
   it carries the same spacing; once settled, a redraw must not replay the fade-in. */
.sb-route-cards { display: flex; flex-direction: column; gap: 9px; }
.sb-route-cards.settled .sb-route-card { animation: none; }
/* "Trykk på en rute …" tap hint above the cards; fades + collapses after the first tap. */
.sb-route-hint { font-size: 12.5px; color: var(--sb-text-2); margin: 0 2px 2px; overflow: hidden;
  max-height: 40px; transition: opacity 180ms ease, max-height 220ms ease, margin 220ms ease; }
.sb-route-hint.dismissed { opacity: 0; max-height: 0; margin: 0; }
.sb-route-card { border-radius: var(--sb-radius-card); padding: 13px 14px; cursor: pointer;
  background: rgba(27,58,75,0.06); border: 1px solid var(--sb-card-border); opacity: 0.7;
  transition: opacity 150ms, background 150ms, transform 150ms, box-shadow 150ms; animation: rc-in 250ms ease-out backwards; }
/* Unselected cards lift like buttons on hover; the selected (already-shown) card stays put. */
.sb-route-card:not(.selected):hover { opacity: 1; background: rgba(27,58,75,0.10);
  transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.sb-route-card.selected { background: var(--fk-natt); border: 2px solid var(--fk-route-blue); opacity: 1; cursor: default; color: #fff; }
.sb-rc-head { display: flex; align-items: center; gap: 8px; }
.sb-rc-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fk-route-blue);
  box-shadow: 0 0 0 4px rgba(66,133,244,0.25); flex: none; }
.sb-rc-title { font-size: 13.5px; font-weight: 500; }
.sb-route-card.selected .sb-rc-title { color: #fff; }
.sb-rc-badge { margin-left: auto; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.5px;
  background: rgba(66,133,244,0.25); color: var(--fk-route-blue-light); padding: 2px 7px; border-radius: 5px; font-weight: 600; }
/* A faster alternative's note (route_presentation.chooser_note). */
.sb-rc-note { font-size: 12px; font-weight: 600; color: var(--fk-route-blue, #2563eb); margin: 2px 0 4px; }
.sb-rc-dist { font-size: 17px; font-weight: 500; color: #fff; margin-top: 9px; }
.sb-rc-breakdown { font-size: 12.5px; color: var(--fk-text-on-dark-muted); font-weight: 400; margin-top: 2px; }
.sb-rc-elev { display: flex; gap: 16px; margin-top: 7px; font-size: 13px; font-weight: 500; }
.sb-rc-elev .up { color: var(--fk-ascent); } .sb-rc-elev .down { color: var(--fk-descent); }
.sb-rc-elev .fk-ic { width: 14px; height: 14px; }
.sb-rc-elev span { display: inline-flex; align-items: center; gap: 4px; }
.sb-rc-types { font-size: 12px; color: var(--fk-text-on-dark-muted); margin-top: 8px; }
.sb-rc-time { font-size: 12.5px; color: var(--fk-text-on-dark-muted); margin-top: 4px; }
.sb-rc-bom { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #FCD34D; margin-top: 8px; }
.sb-rc-bom .fk-ic { width: 14px; height: 14px; color: var(--fk-gull); }
.sb-rc-nav { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px;
  color: var(--fk-route-blue-light); font-weight: 500; }
.sb-rc-nav:hover { text-decoration: underline; }
.sb-rc-nav .fk-ic { width: 14px; height: 14px; }
.sb-rc-nav .fk-ic.ext { width: 12px; height: 12px; opacity: 0.7; }

/* Unselected compact card */
.sb-rc-compact { display: flex; align-items: center; gap: 10px; }
.sb-rc-compact .sb-rc-name { font-size: 13px; font-weight: 500; color: var(--fk-text-primary); }
.sb-rc-compact .sb-rc-mini-dist { font-size: 13px; color: var(--fk-text-secondary); margin-left: auto; }
.sb-rc-compact .sb-rc-mini-elev { display: flex; gap: 9px; font-size: 11.5px; }
.sb-rc-compact .up { color: #16A34A; } .sb-rc-compact .down { color: #DC2626; }
.sb-rc-compact .sb-rc-bom-mini { color: var(--fk-gull); display: inline-flex; }
.sb-rc-compact .fk-ic { width: 12px; height: 12px; }

/* Selected vs compact card body */
.sb-rc-full { display: none; }
.sb-route-card.selected .sb-rc-full { display: block; }
.sb-route-card.selected .sb-rc-compact { display: none; }

/* Elevation chart */
.sb-elev-chart { background: var(--fk-elevation-bg); border-radius: var(--fk-radius-sm);
  height: 56px; margin-top: 4px; padding: 0; overflow: hidden; }
.sb-elev-chart svg { display: block; width: 100%; height: 100%; }
/* While the profile is on its way (it comes from Kartverket after the route). */
.sb-elev-pending { margin: 0; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; color: var(--sb-text-2); }
.elev-lbl { fill: rgba(255,255,255,0.45); font-size: 9px; font-family: var(--fk-font); }
.elev-peak { fill: rgba(255,255,255,0.7); font-size: 9px; font-family: var(--fk-font); }

.sb-route-hide { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%;
  background: none; border: 0; color: var(--sb-text-muted); font-size: 12.5px; cursor: pointer;
  padding: 8px 0; font-family: inherit; }
.sb-route-hide:hover { color: var(--sb-text-2); }
.sb-route-hide .fk-ic { width: 13px; height: 13px; }
.sb-route-none h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--sb-text-muted); margin: 0 0 6px; }
.sb-route-none p { font-size: 13px; color: var(--sb-text-2); margin: 4px 0; line-height: 1.5; }
.sb-route-error { font-size: 13px; color: #DC2626; }

/* Fiskekort */
.sb-fk-area { font-size: 14px; font-weight: 500; color: var(--sb-text); }
.sb-fk-provider { font-size: 12px; color: var(--sb-text-2); margin-top: 2px; }
.sb-fk-buy { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; background: var(--sb-accent);
  color: #fff; border-radius: var(--sb-radius-el); padding: 9px 16px; font-size: 13px; font-weight: 600; }
.sb-fk-buy:hover { background: #1D4FD0; }
.sb-fk-buy .fk-ic { width: 13px; height: 13px; }
.sb-fk-note { font-size: 12.5px; color: var(--sb-text-muted); margin-top: 8px; }
.sb-fk-sep { height: 1px; background: var(--sb-hairline); margin: 14px 0 12px; }

/* Omtaler */
.sb-omtale { padding: 9px 0 9px 12px; border-left: 3px solid var(--fk-skog); }
.sb-omtale + .sb-omtale { border-top: 1px solid var(--sb-hairline); margin-top: 2px; }
.sb-omtale.neg { border-left-color: var(--fk-descent); }
.sb-omtale-text { font-style: italic; font-size: 13px; color: var(--sb-text); line-height: 1.5; }
.sb-omtale-src { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px;
  color: var(--sb-text-muted); margin-top: 5px; }
.sb-omtale-src .fk-ic { width: 11px; height: 11px; }
.sb-omtale-toggle { background: none; border: 0; color: var(--sb-accent); font-size: 12.5px; font-weight: 500;
  cursor: pointer; padding: 8px 0 0; font-family: inherit; }

/* Search section / fiskekvalitet / stocking / regs */
/* Quiet "ghost-chip" search action — full-width (spans the card like .sb-note-add)
   but reads quiet on every tier. Deliberately not the filled-navy primary: that role
   belongs solely to the .sb-route-btn ("Vis ruter til vannet"), left untouched. */
.sb-search-btn { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%;
  min-height: 44px;   /* iOS minimum tap target (padding alone lands a touch under) */
  background: rgba(27,58,75,0.05); color: #1B3A4B; border: 1px solid rgba(27,58,75,0.12);
  border-radius: 10px; padding: 11px 15px; cursor: pointer; font-family: inherit;
  font-size: 14.5px; font-weight: 600; transition: background 150ms, opacity 150ms; }
.sb-search-btn:hover:not(:disabled) { background: rgba(27,58,75,0.09); }
.sb-search-btn:disabled { cursor: not-allowed; opacity: 0.65; }
.sb-search-btn .fk-ic { width: 16px; height: 16px; opacity: 0.85; flex: none; }
.sb-search-btn-lbl { font-size: 14.5px; font-weight: 600; color: #1B3A4B; }
.sb-search-btn .sb-search-spinner { border-color: rgba(27,58,75,0.25); border-top-color: #1B3A4B; }

/* "Sist sjekket …" — muted context line under the always-active search button. */
.sb-search-last { font-size: 11px; color: var(--fk-text-muted); margin-top: 6px; text-align: center; line-height: 1.4; }

/* Rotating loading narration — each new message fades in (a fresh span per tick). */
.sb-search-narrate { animation: fadeInMsg 450ms ease; }
@keyframes fadeInMsg { from { opacity: 0; } to { opacity: 1; } }

/* ── Embedded in-app browser (INAPP_BROWSER_NOTICE_ENABLED) ───────────────────
   Meta's apps open ad links in their own webview, where Google refuses OAuth
   (403 disallowed_useragent). The notice explains that above the Google button.
   It used to carry a second half — a restyle that promoted the e-mail LINK to a
   button so the two choices weighed the same. The redesigned wall has no link to
   promote: e-mail is already a field and a send button, the same size as Google's
   control on every visit. All that remains of the levelling is the order swap,
   which lives with the wall's own rules (.wall-auth-one.wall-email-first). */
.inapp-notice {
  background: #FFF7ED; border: 1px solid #FED7AA; border-radius: var(--fk-radius-sm);
  padding: 11px 13px; margin: 2px 0 0;
  font-size: 12.5px; line-height: 1.45; color: #9A3412; text-align: left;
}
.inapp-notice-text { margin: 0 0 9px; }
.inapp-notice-text strong { font-weight: 700; }
.inapp-notice-copy {
  display: block; width: 100%;
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  padding: 9px 12px; border-radius: 8px;
  border: 1px solid #FDBA74; background: #fff; color: #9A3412;
  cursor: pointer; transition: background 150ms, border-color 150ms;
}
.inapp-notice-copy:hover { background: #FFFBF5; }
.inapp-notice-copy.is-copied { background: #F0FDF4; border-color: #BBF7D0; color: #15803D; }
.inapp-notice-copy.is-failed { background: #fff; border-color: #FECACA; color: #B91C1C; }

/* Friendly fallback used for 429 / 5xx / network errors on lake-detail. */
.sb-soft-error { font-size: 14px; line-height: 1.5; color: var(--fk-text-secondary);
  padding: 16px; text-align: center; }

.sb-search-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(74,144,217,0.3);
  border-top-color: var(--fk-vatn); animation: spin 700ms linear infinite; }
.sb-search-banner { border-radius: var(--fk-radius); padding: 13px 14px; font-size: 13.5px; font-weight: 500;
  background: #EAF2FB; color: var(--fk-natt); }
.sb-search-banner.gold { background: var(--fk-gull-light); color: var(--fk-gull-text); }

.sb-kv-list { list-style: none; margin: 0; padding: 0; }
.sb-kv-list li { font-size: 13px; color: var(--sb-text-2); padding: 3px 0; }
.sb-kv-toggle { background: none; border: 0; color: var(--sb-accent); font-size: 12.5px; cursor: pointer; padding: 6px 0; font-family: inherit; }
.sb-kv-collapsed li:nth-child(n+6) { display: none; }
.sb-kv-list.stocking-expanded li { display: list-item; }
.sb-reg-item { font-size: 13px; color: var(--sb-text-2); line-height: 1.6; }
.sb-reg-item + .sb-reg-item { border-top: 1px solid var(--sb-hairline); margin-top: 8px; padding-top: 8px; }
.sb-reg-src { font-size: 11.5px; color: var(--sb-text-muted); margin-top: 8px; }

/* Footer — the coordinates row under the last card. */
.sb-footer { display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--sb-hairline); padding-top: 14px; margin-top: 4px; }
.sb-coords { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  color: var(--sb-text-2); cursor: pointer; background: none; border: 0; font-family: inherit; }
.sb-coords .fk-ic { width: 13px; height: 13px; color: var(--sb-text-muted); }
.sb-copy { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--sb-accent);
  cursor: pointer; background: none; border: 0; font-family: inherit; }
.sb-copy .fk-ic { width: 13px; height: 13px; }

/* MapLibre control polish */
.maplibregl-ctrl-group { border-radius: 9px !important; box-shadow: var(--fk-shadow) !important; border: 0.5px solid var(--fk-border) !important; }
/* Lift the scale bar + attribution above the home-indicator safe area (web-app/standalone). */
.maplibregl-ctrl-bottom-left, .maplibregl-ctrl-bottom-right { margin-bottom: max(0px, calc(env(safe-area-inset-bottom, 0px) - 8px)); }
/* Drop the top-right control group (zoom on desktop, geolocate) below the
   menu pill (top:10px, ~38px tall) so it stacks pill → zoom → geolocate
   with a small gap and never overlaps the pill. The pill now renders in BOTH auth
   states (session.js), so the offset is unconditional.

   SAFE AREA. The same installed-web-app problem #312 fixed for the 3D overlay,
   which was scoped to .terrain3d-view and therefore left the main map with the
   original bug: 48px is under the status bar on a notched iPhone (44-47px) and
   fully under a Dynamic Island (59px), so the layers button sat behind the
   battery and iOS does not forward taps in that strip to the page.

   The pill's own offset moves by the same inset just below, and it has to: this
   48px is DERIVED from the pill (10px + ~38px). Moving one without the other
   would overlap them. Flat value first, so a browser without env() keeps the
   original layout rather than losing the offset entirely. */
.maplibregl-ctrl-top-right {
  top: 48px;
  top: calc(48px + env(safe-area-inset-top, 0px));
  right: env(safe-area-inset-right, 0px); }

/* Drag handle (mobile only) */
.sb-drag-handle { display: none; }

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rc-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ── Install prompt — one-time, dismissable banner (shown by JS on mobile, not installed) ─── */
.install-banner {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 25;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; max-width: calc(100vw - 24px);
  background: var(--fk-natt); color: #fff; border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.28);
}
.install-banner[hidden] { display: none; }
.install-action {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0;
  background: none; border: 0; color: #fff; font-family: inherit;
  font-size: 13px; font-weight: 600; cursor: pointer; padding: 11px 4px 11px 18px;
}
.install-action span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.install-action .fk-ic { width: 16px; height: 16px; flex: none; }
.install-dismiss {
  display: inline-flex; flex: none; background: none; border: 0; cursor: pointer;
  color: rgba(255,255,255,0.65); padding: 11px 14px 11px 6px;
}
.install-dismiss:hover { color: #fff; }
.install-dismiss .fk-ic { width: 16px; height: 16px; }
.install-help {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 60;
  width: min(320px, calc(100vw - 32px)); background: #fff; border-radius: 14px;
  padding: 18px 18px 16px; box-shadow: var(--fk-shadow-lg); color: var(--fk-text-primary);
}
.install-help[hidden] { display: none; }
.install-help-close { position: absolute; top: 8px; right: 8px; background: none; border: 0;
  cursor: pointer; color: var(--fk-text-muted); padding: 4px; display: inline-flex; }
.install-help-close .fk-ic { width: 18px; height: 18px; }
.install-help-title { font-size: 15px; font-weight: 700; margin: 0 0 12px; }
.install-help-steps { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.7; color: var(--fk-text-secondary); }
.install-help-steps strong { color: var(--fk-text-primary); }
.install-help-steps .fk-ic { width: 15px; height: 15px; vertical-align: -3px; color: var(--fk-vatn); }

/* ── Mobile: bottom sheet ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Narrower than full width so the right edge clears the top-right corner
     avatar (which owns that corner and sits above everything). */
  #search-container { width: calc(100vw - 70px); top: calc(10px + env(safe-area-inset-top, 0px)); left: 10px; }
  #search-box { width: 100%; }
  /* #filter-row keeps the stacked column layout; pills fit the full-width card.
     No overflow here — it would clip the filter dropdowns. */
  .species-filter-btn { white-space: nowrap; }
  /* Minimize control: on mobile the search + filters can collapse to just this pill. */
  .filter-toggle { display: inline-flex; }
  /* Collapse to just the toggle button: hide search + pills, keep #filter-toggle. */
  #search-container.minimized #search-box,
  #search-container.minimized #search-results,
  #search-container.minimized .filter-pills { display: none; }
  #search-container.minimized .filter-toggle { flex: 0 0 auto; }   /* compact when alone */

  /* Filters v2 minimize: the bar collapses together with the legacy pills. */
  #search-container.filters-v2.minimized .filters-v2-bar { display: none; }

  /* Sheet stacking. The lake sheet covers ~90vh from the bottom, so there is no
     room to show a list panel beside it: the docked list is HIDDEN, not closed —
     dismissing the lake sheet brings it straight back at the same scroll offset.
     Cancels the desktop side-by-side offsets. */
  .favorites-panel.is-docked { display: none; right: 14px; max-width: calc(100vw - 28px); }

  #sidebar {
    position: fixed;   /* anchor to the viewport, not the document, so the closed transform reliably clears */
    top: auto; bottom: 0; right: 0; left: 0; width: 100%;
    height: 90vh; height: 90dvh;   /* dvh tracks the visible area past the mobile toolbar */
    border-radius: 18px 18px 0 0; overflow: hidden;
    transform: translateY(calc(100% + 60px));   /* +60px so the rounded top edge clears the viewport (no warm-grey leak) */
    transition: transform 300ms ease-out;
  }
  /* Two snap points only: peek and full (~90vh). */
  /* Lake peek = measured from what rendered (sidebar.js applyLakePeek → sheet_peek.js),
     so the fold lands inside the first body block instead of on the seam above it.
     The 300px fallback is the constant this replaced: it still applies on any sheet
     JS has not measured, so an unmeasured sheet looks exactly as it did before. */
  #sidebar.open { transform: translateY(calc(100% - var(--lake-peek, 300px))); }   /* lake peek */
  /* Route peek = the measured header height (set in JS) so only the blue box shows —
     no white strip below it, no route card peeking through. */
  #sidebar.open.route-active { transform: translateY(calc(100% - var(--route-peek, 200px))); }
  #sidebar.open.sheet-full { transform: translateY(0); }                    /* full (wins when both classes set) */

  .sb-drag-handle { display: block; position: absolute; top: 0; left: 0; right: 0; height: 26px; z-index: 5;
    cursor: grab; touch-action: none; }
  .sb-drag-handle::before { content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    width: 40px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.4); }
  /* Whole header is the drag grab area; none = vertical drags become sheet drags,
     not content scroll. Buttons opt back out so taps stay crisp. Sticky so the
     lake/route info stays pinned while the content below scrolls. */
  .sb-header { padding-top: 26px; touch-action: none; cursor: grab;
    position: sticky; top: 0; z-index: 3; }
  /* At peek the header sits at the screen bottom — pad it past the home indicator so the
     stats stay clear (also grows the measured route-peek height accordingly). */
  #sidebar.open:not(.sheet-full) .sb-header { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
  .sb-header-actions { touch-action: auto; }
  /* Route mode: header shows route numbers, surfaces a route label, de-emphasises the
     lake name, and turns a lighter blue (matching the route line) — distinct from the
     dark navy lake header. */
  #sidebar.route-active .sb-stats-lake  { display: none; }
  #sidebar.route-active .sb-stats-route { display: flex; }
  #sidebar.route-active .sb-route-label { display: flex; }
  #sidebar.route-active .sb-name { font-size: 19px; opacity: 0.7; margin-top: 3px; }
  #sidebar.route-active .sb-header {
    background: linear-gradient(135deg, #2C6BB3 0%, #4A90D9 100%);
  }
  /* At route peek, hide everything below the header so the route card can't peek through.
     The strip below the box stays the sheet's normal white. (Reverts at full —
     :not(.sheet-full) — where the body content is shown normally.) */
  #sidebar.open.route-active:not(.sheet-full) #sidebar-body > *:not(.sb-header) { visibility: hidden; }
}

/* ── Filters v2 — mobile (≤768px) ─────────────────────────────────────────────
   The agent's first pass made the panel a fixed bottom sheet. Per spec it
   must remain an anchored dropdown on phones too:
     - No chips on the map: they live inside the panel (2026-11-10).
     - Panel remains an anchored dropdown (position: absolute) like desktop,
       capped at 75svh with internal scroll; the map must stay visible beneath.
     - Typography + gaps shrink so all three sections fit without an expand
       step. Text floor 11px (no smaller).
     - Safe-area insets + max-width caps so the panel never overflows or causes
       horizontal page scroll on notched phones.
   svh (small viewport) keeps the cap honest even when the browser chrome is
   fully extended — vh would let the panel disappear behind iOS Safari's URL
   bar when it collapses. Source-ordered AFTER the 768px block so its rules
   win the cascade when both apply. */
@media (max-width: 768px) {

  /* Filtre button — slightly tighter. */
  #search-container.filters-v2 .filters-v2-btn {
    padding: 6px 9px; font-size: 12px;
  }

  /* Panel: anchored dropdown (NOT a bottom sheet). Capped at 75svh + internal
     scroll. Width capped to viewport minus safe-area insets so a landscape
     notch can't push it off-screen. */
  #search-container.filters-v2 #filters-panel {
    position: absolute; top: 100%; bottom: auto;
    left: 0; right: auto;
    margin-top: 6px;
    width: min(
      320px,
      calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))
    );
    max-width: calc(100vw - 24px);
    max-height: 75svh;
    overflow-y: auto;
    padding: 10px 12px 12px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(27,58,75,0.22);
    z-index: 30;
  }

  /* Section + option compaction. Title stays at 13px (already the floor for
     a tap target). Summary drops to 11px (floor). Helper subtext to 11px. */
  #search-container.filters-v2 .filters-panel-section-toggle { padding: 8px 4px; }
  #search-container.filters-v2 .filters-panel-section-title { font-size: 12.5px; }
  #search-container.filters-v2 .filters-panel-section-summary { font-size: 11px; }
  #search-container.filters-v2 .filters-panel-section-body { padding: 0 4px 8px; }
  #search-container.filters-v2 .filters-panel-helper { font-size: 11px; margin: 2px 0 6px; }
  #search-container.filters-v2 .filters-panel-reset { font-size: 11.5px; padding: 2px 2px; }

  /* Two columns for option rows still — tighter gap, smaller text, smaller
     checkboxes. Keeps all three groups visible without scrolling on a typical
     phone (~700px svh after browser chrome). */
  #search-container.filters-v2 .filters-panel-options {
    grid-template-columns: 1fr 1fr;
    gap: 2px 8px;
  }
  #search-container.filters-v2 .filters-panel-option {
    padding: 5px 3px; font-size: 12px; gap: 6px;
  }
  #search-container.filters-v2 .filters-panel-option input { width: 14px; height: 14px; }
  #search-container.filters-v2 .filters-panel-more { font-size: 11.5px; margin-top: 4px; }
  #search-container.filters-v2 .filters-panel-toggle {
    margin-top: 8px; padding: 6px 8px; font-size: 12px;
  }
  #search-container.filters-v2 .filters-panel-toggle input { width: 14px; height: 14px; }
}

/* ── Menu pill (top-right corner, above search + all map controls) ─────────────
   The single top-right cluster: one pill that opens a dropdown folding in the
   former Forslag / Tilbakemelding / basemap-adjacent nav. Renders in BOTH auth
   states (session.js) — logged-in = hamburger + avatar, logged-out = hamburger +
   "Meny". Highest z-index so the search bar can't cover it; the map control stack
   is offset below it (see .maplibregl-ctrl-top-right). */
/* The menu pill. Moves with the control stack above it — the stack's 48px offset
   is measured from this pill, so both take the same inset or they collide. */
#user-menu { position: fixed; top: 10px; right: 10px; z-index: 30;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: calc(10px + env(safe-area-inset-right, 0px)); }
.user-menu-btn {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
  border: 0.5px solid rgba(27,58,75,0.10); border-radius: 999px;
  padding: 5px; cursor: pointer; font: inherit; color: var(--fk-natt);
  box-shadow: 0 2px 10px rgba(27,58,75,0.16);
  transition: box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}
.user-menu-btn:hover { background: #fff; box-shadow: 0 4px 16px rgba(27,58,75,0.22); transform: translateY(-1px); }
.user-menu-btn:active { transform: translateY(0); }
.user-menu-btn[aria-expanded="true"] { box-shadow: 0 4px 16px rgba(27,58,75,0.22); }
.user-menu-burger {
  width: 20px; height: 20px; flex: none; margin-left: 3px;
  stroke: var(--fk-natt); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.user-menu-label { font-size: 14px; font-weight: 600; padding: 0 8px 0 3px; line-height: 1; }
.user-avatar {
  width: 29px; height: 29px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--fk-natt) 0%, var(--fk-fjord) 100%);
  color: #fff; font-weight: 600; font-size: 13px;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
}
.user-menu-pop {
  position: absolute; top: 44px; right: 0; min-width: 230px;
  background: #fff; border: 1px solid #E5E2DB; border-radius: 12px;
  box-shadow: 0 8px 26px rgba(27, 58, 75, 0.18); padding: 8px; overflow: hidden;
}
.user-menu-pop[hidden] { display: none; }
/* Gradient header strip: avatar + "Min profil" + email; bleeds to the pop edges. */
.user-menu-head {
  display: flex; align-items: center; gap: 11px;
  margin: -8px -8px 6px; padding: 13px 14px;
  background: linear-gradient(135deg, var(--fk-natt) 0%, var(--fk-fjord) 100%);
  border-radius: 12px 12px 0 0;
}
.user-avatar-lg {
  width: 38px; height: 38px; font-size: 15px;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.18), 0 0 0 2px rgba(255,255,255,0.30);
}
.user-menu-head-text { min-width: 0; }
.user-menu-head-title { font-size: 13px; font-weight: 600; color: #fff; line-height: 1.2; }
.user-menu-email {
  font-size: 12px; color: rgba(255,255,255,0.82); margin-top: 2px; max-width: 170px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-menu-item {
  display: block; box-sizing: border-box; width: 100%; text-align: left;
  background: none; border: none; text-decoration: none;
  padding: 9px 8px; border-radius: 7px; cursor: pointer;
  font: inherit; font-size: 14px; color: #1B3A4B;
}
.user-menu-item:hover { background: #F2F1ED; }
.user-menu-item[hidden] { display: none; }
/* Logged-out sign-in row: a filled navy CTA at the top of the dropdown. */
.user-menu-item-primary {
  background: linear-gradient(135deg, var(--fk-natt) 0%, var(--fk-fjord) 100%);
  color: #fff; font-weight: 600; margin-bottom: 4px;
}
.user-menu-item-primary:hover { background: linear-gradient(135deg, var(--fk-natt) 0%, var(--fk-fjord) 100%); filter: brightness(1.07); }
.user-menu-divider { height: 0.5px; background: #E5E2DB; margin: 5px 6px; }

@media (max-width: 768px) {
  /* Compact pill (the corner is tight beside the search bar): hamburger only. */
  .user-menu-avatar, .user-menu-label { display: none; }
  .user-menu-btn { padding: 7px; gap: 0; }
  .user-menu-burger { margin-left: 0; }
  /* Dropdown becomes a full-width sheet dropping from the top edge. */
  .user-menu-pop {
    position: fixed; top: 0; left: 0; right: 0; width: 100%; min-width: 0;
    border-radius: 0 0 16px 16px;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 12px;
    box-shadow: 0 12px 30px rgba(27,58,75,0.22);
  }
  .user-menu-head { margin: calc((8px + env(safe-area-inset-top, 0px)) * -1) -12px 8px; border-radius: 0; }
  .user-menu-item { padding: 12px; font-size: 15px; }
}

/* ── Beta feedback widget (logged-in app only) ─────────────────────────────── */
/* Opened from the menu pill ("Tilbakemelding"); the floating button was removed. */
.fb-overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(27,58,75,0.42); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.fb-overlay[hidden] { display: none; }
.fb-modal {
  position: relative; width: min(440px, 100%);
  background: #fff; border-radius: var(--fk-radius); box-shadow: 0 18px 60px rgba(27,58,75,0.35);
  padding: 22px 22px 18px; font-family: var(--fk-font);
}
.fb-close {
  position: absolute; top: 10px; right: 12px; border: 0; background: none;
  font-size: 22px; line-height: 1; color: var(--fk-text-muted); cursor: pointer;
}
.fb-close:hover { color: var(--fk-text-primary); }
.fb-title { margin: 0 0 12px; font-size: 17px; font-weight: 600; color: var(--fk-natt); }
#feedback-text {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 110px;
  font-family: var(--fk-font); font-size: 14px; line-height: 1.5; color: var(--fk-text-primary);
  border: 1px solid var(--fk-border); border-radius: var(--fk-radius-sm); padding: 10px 12px;
}
#feedback-text:focus { outline: none; border-color: var(--fk-fjord); }
.fb-send {
  margin-top: 12px; width: 100%; background: var(--fk-natt); color: #fff; border: 0;
  font-family: var(--fk-font); font-size: 14px; font-weight: 600; padding: 10px; border-radius: var(--fk-radius-sm);
  cursor: pointer; transition: background .15s ease;
}
.fb-send:hover { background: #234a5f; }
.fb-send:disabled { opacity: 0.6; cursor: default; }
.fb-thanks { margin: 12px 0 0; text-align: center; font-size: 15px; font-weight: 600; color: var(--fk-skog); }
.fb-thanks.fb-error { color: #B91C1C; }

/* ── "Om kartet" panel ─────────────────────────────────────────────────────── */
/* Reuses the feedback modal's overlay + card (centred, padded, never edge-flush,
   so it stays clear of the status bar). Longer content, so it scrolls inside. */
.om-kartet {
  width: min(520px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
  overflow-y: auto; box-sizing: border-box;
  font-size: 14px; line-height: 1.55; color: var(--fk-text-primary);
}
.om-kartet h2 { margin: 18px 0 6px; font-size: 15px; font-weight: 600; color: var(--fk-natt); }
.om-kartet p { margin: 0 0 10px; }
.om-kartet ul { margin: 0 0 10px; padding-left: 18px; }
.om-kartet a { color: var(--fk-fjord); }
.om-kartet-fylker { columns: 2; column-gap: 16px; }

/* ── One-time favorites intro modal ─────────────────────────────────────────── */
/* Same overlay/modal component as the feedback modal; above the sidebar (z:50)
   and toast (z:70). The pulse is scoped to .fav-intro-star — the real sidebar
   star is never animated. */
@keyframes favIntroPulse {
  0%   { box-shadow: 0 0 0 0   rgba(217,119,6,0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(217,119,6,0); }
  100% { box-shadow: 0 0 0 0   rgba(217,119,6,0); }
}
.fav-intro-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(27,58,75,0.45); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.fav-intro-modal {
  width: min(368px, 100%); background: var(--fk-snø);
  border-radius: 16px; padding: 22px 22px 24px; font-family: var(--fk-font);
  box-shadow: 0 18px 60px rgba(27,58,75,0.35);
}
/* White frame signals "this is an example of the side window". */
.fav-intro-frame { background: #fff; border: 1.5px solid var(--fk-border); border-radius: 13px; padding: 7px; margin-bottom: 20px; }
.fav-intro-header {
  background: linear-gradient(135deg, var(--fk-natt) 0%, var(--fk-fjord) 100%);
  border-radius: 9px; padding: 15px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.fav-intro-loc { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fk-text-on-dark-muted); }
.fav-intro-name { font-size: 18px; font-weight: 500; color: #fff; margin-top: 2px; }
.fav-intro-star-wrap { position: relative; flex: none; }
.fav-intro-star {
  width: 46px; height: 46px; border-radius: 50%; background: var(--fk-gull);
  display: flex; align-items: center; justify-content: center;
  animation: favIntroPulse 1.8s infinite;
}
.fav-intro-star-ic { width: 25px; height: 25px; fill: #fff; }
.fav-intro-badge {
  position: absolute; top: -8px; right: -12px;
  background: #fff; color: var(--fk-gull-text); border: 1px solid rgba(217,119,6,0.4);
  font-size: 10px; font-weight: 500; letter-spacing: 0.03em; padding: 2px 7px; border-radius: 9px;
}
/* Title sits at the top of the modal, above the example frame. */
.fav-intro-title { font-size: 21px; font-weight: 600; line-height: 1.25; letter-spacing: -0.2px;
  color: var(--fk-natt); margin: 2px 0 16px; }
.fav-intro-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 13px; }
.fav-intro-row:last-of-type { margin-bottom: 22px; }
.fav-intro-row-ic { width: 19px; height: 19px; flex: none; margin-top: 1px; color: var(--fk-gull);
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fav-intro-row-ic.is-fill { fill: currentColor; stroke: none; }
.fav-intro-row-text { font-size: 14px; line-height: 1.5; color: var(--fk-text-primary); }
.fav-intro-btn {
  width: 100%; background: var(--fk-gull); color: #fff; border: 0; border-radius: 10px;
  padding: 12px; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
  transition: background 150ms;
}
.fav-intro-btn:hover { background: #C26905; }



/* ── Guide-traffic gate (guide_gate.js) ──────────────────────────────────────
   The gate arm of the guide-traffic A/B: the map stays on screen, blurred, under
   a card that asks for a free account before it can be used. HARD — no close
   control; the soft wall's X is exactly what this arm is testing the absence of.
   html.guide-gated is set by app.js before the map paints, so the map is never
   usable for a beat first. The search box and the sidebar are hidden rather than
   blurred: crisp UI under a translucent scrim reads as clickable.
   z 92: above the sidebar (50) and the intro modals (90), under the incident
   notice (95), which must still be able to say the site is broken. */
html.guide-gated #map { filter: blur(7px) saturate(.85); pointer-events: none; }
html.guide-gated #search-container,
html.guide-gated #user-menu,
html.guide-gated #sidebar { visibility: hidden; }
.guide-gate-overlay {
  position: fixed; inset: 0; z-index: 92;
  background: rgba(27,58,75,0.28);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  overflow-y: auto;
}
.guide-gate-card {
  width: min(380px, 100%); margin: auto; box-sizing: border-box;
  background: #fff; border-radius: 16px; box-shadow: 0 18px 60px rgba(27,58,75,0.35);
  padding: 22px 20px 16px; font-family: var(--fk-font);
}
.guide-gate-title {
  font-size: 21px; font-weight: 700; letter-spacing: -0.3px; line-height: 1.22;
  margin: 0 0 8px; color: #1B3A4B; text-wrap: balance;
}
/* The ask under the gold line: the action, one step quieter than the fact. */
.guide-gate-ask { margin: 0 0 12px; font-size: 16px; font-weight: 600; color: #1B3A4B; line-height: 1.35; text-wrap: balance; }
.guide-gate-card .wall-login { margin-top: 12px; }
.guide-gate-about { margin: 8px 0 0; text-align: center; }
.guide-gate-about button {
  background: none; border: 0; padding: 4px; cursor: pointer;
  font: inherit; font-size: 13px; color: #57534E; text-decoration: underline;
}
/* "Om kartet" over the gate: it is /kart's indexable text, and a gated visitor
   must be able to read what a crawler can (Google treats text the user cannot
   reach as the cloaking signal). Its own z is 40, under the sidebar. */
html.guide-gated #om-kartet-overlay { z-index: 94; }
@media (max-height: 520px) {
  .guide-gate-overlay { align-items: flex-start; padding: 8px; }
  .guide-gate-card { padding: 16px 16px 12px; }
  .guide-gate-title { font-size: 18px; }
  .guide-gate-ask { font-size: 15px; margin-bottom: 10px; }
}

/* ── "Slik leser du kartet" (map-legend.js) ──────────────────────────────────
   The one-time popup after signup. Shown once the map has drawn, so the scrim is
   light (.22): the dots it explains stay visible behind it. Centred card, no
   header and no X — one button, plus the backdrop and Esc, all of which close it.
   z 93: over the sidebar (50) and the intro modals (90), under the incident
   notice (95). It is a logged-in popup, so it never meets the guide gate (92).
   MUST FIT 320x460 WITHOUT A SCROLL — measured, see the PR. */
.map-legend-overlay {
  position: fixed; inset: 0; z-index: 93;
  background: rgba(27,58,75,0.22);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  overflow-y: auto;
}
.map-legend-card {
  width: min(380px, 100%); margin: auto; box-sizing: border-box;
  background: #fff; border-radius: 16px; box-shadow: 0 18px 60px rgba(27,58,75,0.35);
  padding: 20px 20px 18px; font-family: var(--fk-font); color: #1C1917;
}
.map-legend-title { margin: 0 0 12px; font-size: 20px; font-weight: 700; letter-spacing: -0.3px; color: #1B3A4B; }
.map-legend-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.map-legend-row { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.38; }
/* The filter panel's own dot, a touch larger here, nudged onto the first line's
   x-height so it reads as a bullet for the bold label. */
.map-legend-row .tier-dot { width: 12px; height: 12px; margin-top: 4px; }
.map-legend-row b { font-weight: 700; }
.map-legend-tip { margin: 14px 0 0; font-size: 14px; line-height: 1.4; color: #44403C; }
.map-legend-btn {
  display: block; width: 100%; margin-top: 16px; padding: 13px; border: 0; cursor: pointer;
  border-radius: 10px; background: #1B3A4B; color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 700;
}
.map-legend-btn:hover { background: #234a5f; }
.map-legend-btn:focus-visible { outline: 2px solid #D97706; outline-offset: 2px; }
@media (max-height: 520px) {
  .map-legend-overlay { padding: 10px; }
  .map-legend-card { padding: 16px 16px 14px; }
  .map-legend-title { font-size: 18px; margin-bottom: 10px; }
  .map-legend-rows { gap: 7px; }
  .map-legend-row { font-size: 13.5px; }
  .map-legend-tip { margin-top: 11px; font-size: 13.5px; }
  .map-legend-btn { margin-top: 13px; padding: 11px; }
}

/* ── Status notice — the operational-incident modal ───────────────────────────
   Rendered by status-notice.js when /api/auth/config carries a status_notice
   object (STATUS_NOTICE_ENABLED). Off on a normal day; none of this is reachable.

   COLOUR: the two levels do NOT reuse --sb-nudge-* despite that palette being the
   nearest amber in the file. Those tokens mean "gold lake / membership" everywhere
   else in the app, and an outage notice wearing the gold tint would be the first
   place that association breaks. The warn tokens below are declared locally and
   deliberately redder than gold; 'info' sits in the petrol family instead, so a
   maintenance heads-up doesn't borrow the alarm of a real incident.

   z-index 95: above .fl-intro-overlay / .fav-intro-overlay (90) — both are
   suppressed while this is up (see app.js), but if one ever does escape that
   guard, the incident is the thing that must be on top. */
.status-notice-overlay {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(27,58,75,0.45); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.status-notice-modal {
  position: relative;
  width: min(380px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto;
  background: var(--fk-snø); border-radius: 16px; font-family: var(--fk-font);
  box-shadow: 0 18px 60px rgba(27,58,75,0.35);
  padding: 30px 26px 24px; text-align: center;
  /* Defaults are the warn palette; .status-notice-info overrides the three. */
  --sn-accent: #B91C1C;     /* icon + heading — red-amber, NOT the gold nudge */
  --sn-disc:   #FEF2F2;     /* icon disc ground */
  --sn-ring:   #FEE2E2;     /* icon disc ring */
}
.status-notice-info {
  --sn-accent: var(--fk-fjord);
  --sn-disc:   #EEF4F8;
  --sn-ring:   #DCE8F0;
}

.status-notice-close {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: 50%;
  color: var(--fk-text-secondary); cursor: pointer; padding: 0;
}
.status-notice-close:hover { background: var(--fk-snø-dark); color: var(--fk-text-primary); }
.status-notice-close .fk-ic {
  width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.status-notice-icon {
  width: 52px; height: 52px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--sn-disc); border: 1px solid var(--sn-ring); border-radius: 50%;
  color: var(--sn-accent);
}
.status-notice-icon .fk-ic {
  width: 25px; height: 25px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.status-notice-title {
  margin: 0; font-size: 19px; font-weight: 600; line-height: 1.3;
  letter-spacing: -0.2px; color: var(--fk-natt);
}
/* pre-line, so a literal \n in the .env body renders as a paragraph break. That
   is the only formatting an operator gets — the text is set with textContent and
   never parsed as HTML (see status-notice.js). */
.status-notice-body {
  margin: 10px 0 0; font-size: 14.5px; line-height: 1.55;
  color: var(--fk-text-secondary); white-space: pre-line;
}

.status-notice-btn {
  width: 100%; margin-top: 22px; cursor: pointer; font: inherit;
  font-size: 15px; font-weight: 600; color: #fff;
  background: var(--fk-natt); border: 0; border-radius: 10px; padding: 13px;
  transition: background 150ms;
}
.status-notice-btn:hover { background: var(--fk-fjord); }

@media (max-width: 480px) {
  .status-notice-overlay { padding: 14px; }
  .status-notice-modal { padding: 28px 20px 20px; }
  .status-notice-title { font-size: 18px; }
}

/* "Mente du …@outlook.com?" under an e-mail field (otp.js createTypoCheck). On the
   wall card and the guide gate. The suggestion is the tap target, so it reads as a
   link and carries the corrected domain in bold — the one part that changed. */
.auth-typo { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--sb-text); text-align: left; }
.auth-typo[hidden] { display: none; }
.auth-typo-fix { background: none; border: 0; padding: 0; font: inherit; color: var(--sb-accent);
  text-decoration: underline; cursor: pointer; word-break: break-all; }
.auth-typo-keep { display: block; margin-top: 2px; font-size: 12px; color: var(--fk-text-secondary); }
