/* lake_sheet.css — the lake sheet (lake_sheet.js), "Nordic Outdoor" theme.
   One sheet on every surface: the bottom sheet on a phone, the right-hand panel
   on desktop. Keyed on #sidebar.ls-mode (set by sidebar.js when it renders the
   sheet). Shared rules carry no query; the phone-only parts (peek, fold fade,
   rounded top) sit in the ≤768px block and the desktop differences in the
   ≥769px block at the end. Loaded after style.css.

   TOKENS. Every colour, radius, font size, spacing and shadow below comes from
   the --ls-* block at the top; the rules hold no literal values. A restyle is an
   edit to that block. tests/js/lake_sheet_tokens.test.mjs enforces it.
   Values are measured from lake-sheet-reference-390.png (the retheme brief). */

#sidebar.ls-mode {
  /* ── Colour: sheet ── */
  --ls-sheet-bg: #F6F8F7;
  --ls-surface: #FFFFFF;
  --ls-white: #FFFFFF;
  --ls-surface-fade: rgba(246, 248, 247, 0);
  --ls-text: #1E2D3B;
  --ls-muted: #6B7A86;
  --ls-muted-2: #89979D;
  --ls-label: #84939A;
  --ls-disabled: #9AA4AB;
  --ls-hair: #E0E8E9;
  --ls-handle: #D3DADF;
  --ls-btn: #EEF1F4;            /* header star / share discs */
  --ls-close-bg: #1E2D3B;
  --ls-close-ink: #FFFFFF;
  --ls-primary: #175B6D;
  --ls-on-primary: #FFFFFF;
  --ls-link: #175B6D;
  --ls-gold: var(--fk-gull);    /* favourite star */
  --ls-skel-1: #E6ECEE;
  --ls-skel-2: #F0F4F5;
  --ls-skel-block: #E9EDF0;     /* flat skeleton blocks, no shimmer */
  --ls-shadow-badge: 0 1px 3px rgba(30, 45, 59, 0.25);
  /* Route mode: the header + route stats become one surface in the Rute
     button's colour; everything under it stays on the sheet. */
  --ls-route-surface: var(--ls-rute-fill);
  --ls-route-text: #FFFFFF;
  --ls-route-muted: #DCE6F2;         /* "RUTE TIL VANNET — KORTESTE", kommune line, units */
  --ls-route-btn: rgba(255, 255, 255, 0.18);
  --ls-route-cell: rgba(255, 255, 255, 0.12);
  --ls-route-up: #8FE3B0;            /* ascent arrow */
  --ls-route-down: #F3A6A6;          /* descent arrow */

  /* ── Colour: gold card (state A) ── */
  /* Card images (web/frontend/assets/img/sheet/). Cover, anchored right. */
  --ls-img-gold-orret: url("../assets/img/sheet/gold_orret.webp");
  --ls-img-gold-roye: url("../assets/img/sheet/gold_roye.webp");
  --ls-img-blue-orret: url("../assets/img/sheet/blue_orret.webp");
  --ls-img-blue-roye: url("../assets/img/sheet/blue_roye.webp");
  --ls-img-blue-abbor: url("../assets/img/sheet/blue_abbor.webp");
  --ls-img-blue-gjedde: url("../assets/img/sheet/blue_gjedde.webp");
  --ls-img-blue-sik: url("../assets/img/sheet/blue_sik.webp");
  /* blue_empty.webp (state C, no species) is not delivered yet: no reference to it
     until it exists, so the empty card is the flat --ls-s-empty-bg. */
  --ls-a-fallback: #F8E2AB;
  --ls-a-label: #C9631A;
  --ls-a-weight: #80501C;
  --ls-a-sub: #946B35;
  --ls-a-chev: #80501C;
  --ls-a-foot-line: rgba(90, 63, 3, 0.18);

  /* ── Colour: species card (members' B and C) ── */
  --ls-s-fallback: #DFEAF0;
  --ls-s-label: #176078;
  --ls-s-title: #1E3D4A;
  --ls-s-sub: #4F6B78;
  --ls-s-chev: #1F4B5A;
  --ls-s-empty-bg: #E8EEF0;
  --ls-s-empty-label: #6B7A86;
  --ls-s-foot-line: rgba(23, 96, 120, 0.18);   /* the membership footer's hairline */

  /* ── Colour: other band states (no borders except D) ── */
  --ls-b-bg: #EDF5EF;   --ls-b-text: #164B2E;  --ls-b-disc: #DCECDF;  --ls-b-disc-ic: #164B2E;
  --ls-b2-bg: #E4F3E9;  --ls-b2-text: #164B2E; --ls-b2-disc: #CFE9D7; --ls-b2-disc-ic: #164B2E;
  --ls-c-bg: #EDF1F3;   --ls-c-text: #4A565F;  --ls-c-disc: #E0E6EA;  --ls-c-disc-ic: #4A565F;
  --ls-d-bg: #FFFFFF;   --ls-d-text: #1E2D3B;  --ls-d-disc: #FFF6D8;  --ls-d-disc-ic: #8A6A10;
  --ls-d-border: #E6C766;
  --ls-d-accent: #8A6A10;

  /* ── Colour: stats ("Om vannet") ── */
  --ls-stat-ic: #52717D;
  --ls-stat-v: #253E4A;
  --ls-stat-cap: #89979D;
  /* The reference draws on a 32-unit grid; Lucide's is 24, so the same visual
     weight is the spec's 1.8 × 24/32. */
  --ls-stat-stroke: 1.35;
  --ls-act-stroke: 1.5;

  /* ── Colour: feature buttons ("Utforsk vannet") — solid fills, white ink ── */
  --ls-3d-fill: #2F6B4C;
  --ls-rute-fill: #3A6390;
  --ls-catch-fill: #1D6A80;
  --ls-ticket-fill: #A3772F;
  --ls-on-fill: #FFFFFF;
  --ls-on-fill-dim: rgba(255, 255, 255, 0.85);   /* disabled label */
  --ls-fill-lip: rgba(0, 0, 0, 0.14);
  --ls-fill-drop: rgba(24, 55, 70, 0.14);
  --ls-fill-sel-ring: rgba(255, 255, 255, 0.55);
  /* Disabled = the fill at 45 %, precomputed for browsers without color-mix. */
  --ls-3d-off-fb: rgba(47, 107, 76, 0.45);
  --ls-rute-off-fb: rgba(58, 99, 144, 0.45);
  --ls-catch-off-fb: rgba(29, 106, 128, 0.45);
  --ls-ticket-off-fb: rgba(163, 119, 47, 0.45);

  /* ── Type ── */
  --ls-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ls-font-display: "Fraunces", Georgia, "Times New Roman", serif;   /* the lake name */
  --ls-fs-name: 30px;
  --ls-fs-name-narrow: 22px;
  --ls-fs-where: 14px;
  --ls-fs-section: 17px;
  --ls-fs-title: 15px;
  --ls-fs-a-weight: 30px;
  --ls-fs-a-over-narrow: 26px;   /* "Over N kg" under 360 px, clear of the fish */
  --ls-fs-big: 26px;         /* B2 weight */
  --ls-fs-s-title: 26px;     /* species card title */
  --ls-fs-big-unit: 14px;
  --ls-fs-body: 14px;
  --ls-fs-stat: 14px;
  --ls-fs-stat-narrow: 12px;
  --ls-fs-meta: 13px;
  --ls-fs-foot: 12.5px;
  --ls-fs-small: 12px;
  --ls-fs-label: 11px;       /* "OM VANNET" / "UTFORSK VANNET" */
  --ls-fs-a-label: 10.5px;   /* "DOKUMENTERT STORØRRET" */
  --ls-fs-tiny: 10px;
  --ls-fs-route-v: 24px;     /* route stats value */
  --ls-fw-route-v: 700;
  --ls-fs-badge: 11px;
  --ls-fw-act: 650;
  --ls-ls-name: -0.3px;
  --ls-ls-a-weight: -0.02em;
  --ls-ls-a-label: 0.11em;
  --ls-ls-label: 1.7px;
  --ls-ls-cap: 0.5px;
  --ls-lh-a-label: 15px;
  --ls-lh-a-weight: 36px;
  --ls-underline-offset: 2px;

  /* ── Radius ── */
  --ls-r-sheet: 24px;
  --ls-r-card: 20px;
  --ls-r-band: 14px;
  --ls-r-btn: 14px;
  --ls-r-skel: 6px;
  --ls-r-pill: 9px;
  --ls-r-round: 50%;

  /* ── Size ── */
  --ls-hair-w: 1px;
  --ls-ic: 1em;
  --ls-hbtn: 34px;
  --ls-hbtn-hit: -5px;
  --ls-hbtn-ic: 18px;
  --ls-disc: 40px;
  --ls-disc-ic: 22px;
  --ls-chev: 18px;
  --ls-a-min-h: 120px;
  --ls-stat-ic-size: 25px;
  --ls-stat-ic-narrow: 21px;
  --ls-act-h: 64px;
  --ls-act-ic: 22px;
  --ls-act-ic-muted: 18px;
  --ls-mark: 18px;
  --ls-mark-off: -5px;
  --ls-mark-ic: 10px;
  --ls-free-fs: 9px;           /* "Midlertidig gratis": the 3D button's second line */
  --ls-foot-ic: 14px;
  --ls-skel-w: 120px;
  --ls-skel-h: 11px;
  --ls-hint-h: 18px;           /* the Vær line's value: same height skeleton or text */
  --ls-wx-meta-h: 26px;        /* weather meta: always two lines, so wraps never resize the card */
  --ls-wx-icon: 40px;
  --ls-trip-row-h: 64px;       /* a Fangst row in the sheet: headline + "name · date" */
  --ls-trip-more-h: 44px;      /* "Vis alle N rapporter" */
  --ls-arter-row-h: 52px;
  --ls-q: 16px;                /* the Arter row's "?" (flagged for review) */      /* an Arter row: name + tillit, then its sources — always two lines */
  --ls-skel-line-h: 12px;
  --ls-skel-short: 40%;
  --ls-fade-out: 300ms;        /* an empty section fades this long before it collapses */
  /* Below the fold every section is a white card on the off-white sheet. */
  --ls-card-bg: #FFFFFF;
  --ls-card-r: 18px;
  --ls-card-pad: 16px;
  --ls-card-border: rgba(30, 60, 75, 0.06);
  --ls-card-gap: 12px;
  --ls-btn-h: 46px;
  --ls-fade: 34px;
  --ls-peek-fallback: 440px;
  --ls-head-fallback: 110px;
  --ls-lip: 2px;             /* the button's bottom lip */
  --ls-press: 1px;

  /* ── Spacing ── */
  --ls-gutter: 20px;
  --ls-a-bleed: -8px;        /* gold card overhangs the gutter on both sides */
  --ls-a-pad: 26px 12px 14px 18px;
  --ls-a-pad-r: 12px;        /* the same insets, for the footer under the row */
  --ls-a-pad-b: 14px;
  --ls-a-pad-l: 18px;
  --ls-a-label-mt: -14px;
  --ls-sp-1: 2px;
  --ls-sp-2: 3px;
  --ls-sp-3: 4px;
  --ls-sp-4: 6px;
  --ls-sp-5: 8px;
  --ls-sp-6: 9px;
  --ls-sp-7: 10px;
  --ls-sp-8: 11px;
  --ls-sp-9: 12px;
  --ls-sp-10: 14px;
  --ls-sp-11: 16px;
  --ls-sp-12: 18px;
  --ls-sp-13: 22px;
  --ls-sp-14: 24px;
  --ls-band-pad-y: 11px;
  --ls-band-pad-x: 12px;
  --ls-head-top: 22px;       /* includes the drag handle */
  --ls-label-m: 18px 0 8px 2px;

  /* ── Desktop panel (≥769px) ── */
  --ls-act-h-desk: 48px;        /* the two wide buttons, icon beside the label */
  --ls-act-ic-desk: 20px;
  --ls-head-top-desk: 20px;     /* no drag handle to clear */
  --ls-hover-lift: -1px;
  --ls-hover-t: 120ms;

  /* ── Motion / emphasis ── */
  --ls-press-round: 0.94;
  --ls-dim: 0.9;
  --ls-dim-chev: 0.6;

  background: var(--ls-sheet-bg); color: var(--ls-text);
  font-family: var(--ls-font);
}
/* No color-mix (iOS Safari 16.0–16.1): the disabled fills, precomputed. */
@supports not (color: color-mix(in srgb, red, blue)) {
  #sidebar.ls-mode .ls-act-3d     { --off: var(--ls-3d-off-fb); }
  #sidebar.ls-mode .ls-act-route  { --off: var(--ls-rute-off-fb); }
  #sidebar.ls-mode .ls-act-catch  { --off: var(--ls-catch-off-fb); }
  #sidebar.ls-mode .ls-act-ticket { --off: var(--ls-ticket-off-fb); }
}
#sidebar.ls-mode #sidebar-inner { overscroll-behavior: contain; }

/* ── Phone only: the bottom sheet's rounded top, peek and fold ── */
@media (max-width: 768px) {
#sidebar.ls-mode { border-radius: var(--ls-r-sheet) var(--ls-r-sheet) 0 0; }
/* Peek = the measured content (sidebar.js → sheetPeekHeight) plus the home
   indicator / gesture bar. Route mode and full keep their own rules. */
#sidebar.open.ls-mode:not(.sheet-full):not(.route-active) {
  transform: translateY(calc(100% - var(--lake-peek, var(--ls-peek-fallback)) - env(safe-area-inset-bottom, 0px)));
}

/* The fold's fade: the sheet's visible bottom, transparent → sheet. --ls-fade-h
   (set by sidebar.js) is --ls-fade, less when the cap has pulled the fold up to
   the action row: the fade may cover the hint line, never the buttons. */
#sidebar.open.ls-mode:not(.sheet-full):not(.route-active) .ls-fold-fade {
  display: block; position: absolute; left: 0; right: 0; z-index: 4; pointer-events: none;
  top: calc(var(--lake-peek, var(--ls-peek-fallback)) - var(--ls-fade-h, var(--ls-fade)));
  height: calc(var(--ls-fade-h, var(--ls-fade)) + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to bottom, var(--ls-surface-fade) 0, var(--ls-sheet-bg) var(--ls-fade-h, var(--ls-fade)));
}
#sidebar.open.ls-mode:not(.sheet-full):not(.route-active) .ls-header { padding-bottom: var(--ls-sp-4); }
}
.ls-fold-fade { display: none; }

/* ── Header ── */
#sidebar.ls-mode .ls-header {
  background: var(--ls-sheet-bg); color: var(--ls-text);
  padding: var(--ls-head-top) var(--ls-gutter) var(--ls-sp-4);
  position: sticky; top: 0; z-index: 3;
}
#sidebar.ls-mode .ls-handle::before { background: var(--ls-handle); }
.ls-head-row { display: flex; align-items: flex-start; gap: var(--ls-sp-7); }
.ls-head-text { flex: 1; min-width: 0; }
#sidebar.ls-mode .ls-name {
  font-family: var(--ls-font-display); font-size: var(--ls-fs-name); font-weight: 700;
  line-height: 1.1; letter-spacing: var(--ls-ls-name); color: var(--ls-text);
  margin: 0; overflow-wrap: anywhere;   /* last resort; sidebar.js fitName() shrinks first */
}
/* Narrow phones: a long name beside three buttons would take four lines. */
@media (max-width: 359px) { #sidebar.ls-mode .ls-name { font-size: var(--ls-fs-name-narrow); } }
.ls-where { font-size: var(--ls-fs-where); color: var(--ls-muted); margin-top: var(--ls-sp-3); line-height: 1.35; }
.ls-head-actions { display: flex; gap: var(--ls-sp-4); flex: none; }
#sidebar.ls-mode .ls-hbtn {
  position: relative; width: var(--ls-hbtn); height: var(--ls-hbtn); border-radius: var(--ls-r-round);
  border: 0; padding: 0; margin: 0; flex: none; cursor: pointer; touch-action: manipulation;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ls-btn); color: var(--ls-text);
}
#sidebar.ls-mode .ls-hbtn::before { content: ''; position: absolute; inset: var(--ls-hbtn-hit); }
#sidebar.ls-mode .ls-hbtn .ls-ic { width: var(--ls-hbtn-ic); height: var(--ls-hbtn-ic); }
#sidebar.ls-mode .ls-hbtn-close { background: var(--ls-close-bg); color: var(--ls-close-ink); }
#sidebar.ls-mode .ls-hbtn.is-fav { color: var(--ls-gold); }
#sidebar.ls-mode .ls-hbtn.is-fav .ls-ic { fill: var(--ls-gold); }
#sidebar.ls-mode .ls-hbtn:active { transform: scale(var(--ls-press-round)); }

/* Route mode: the header + route stats are their own surface, in the Rute
   button's blue, white ink. Below this block the sheet stays off-white. (The
   sheet's header rule above outranks style.css's old route gradient, which is
   how white text ended up on the off-white sheet.) */
#sidebar.ls-mode.route-active .ls-header { background: var(--ls-route-surface); color: var(--ls-route-text); }
#sidebar.ls-mode.route-active .ls-handle::before { background: var(--ls-route-btn); }
#sidebar.ls-mode.route-active .ls-name { color: var(--ls-route-text); opacity: 1; }
#sidebar.ls-mode.route-active .ls-where { color: var(--ls-route-muted); }
#sidebar.ls-mode.route-active .ls-hbtn,
#sidebar.ls-mode.route-active .ls-hbtn-close,
#sidebar.ls-mode.route-active .ls-hbtn.is-fav { background: var(--ls-route-btn); color: var(--ls-route-text); }
.ls-route-label { display: none; }
#sidebar.ls-mode.route-active .ls-route-label {
  display: block; color: var(--ls-route-muted); font-size: var(--ls-fs-a-label); font-weight: 700;
  letter-spacing: var(--ls-ls-a-label); text-transform: uppercase; line-height: var(--ls-lh-a-label);
  margin-bottom: var(--ls-sp-2);
}
#sidebar.ls-mode .ls-route-stats { margin-top: var(--ls-sp-7); gap: var(--ls-sp-4); }
/* The stat cells show in route mode on every width (style.css turns them on for
   phones only — the old desktop header never had them). */
#sidebar.ls-mode.route-active .ls-route-stats { display: flex; }
#sidebar.ls-mode.route-active .ls-route-stats .sb-stat {
  background: var(--ls-route-cell); border-radius: var(--ls-r-btn); padding: var(--ls-sp-4) var(--ls-sp-2);
}
#sidebar.ls-mode.route-active .ls-route-stats .sb-stat-num {
  font-size: var(--ls-fs-route-v); font-weight: var(--ls-fw-route-v); color: var(--ls-route-text);
  line-height: 1.1; font-variant-numeric: tabular-nums;
}
#sidebar.ls-mode.route-active .ls-route-stats .sb-stat-label {
  font-size: var(--ls-fs-tiny); text-transform: uppercase; letter-spacing: var(--ls-ls-cap);
  color: var(--ls-route-muted);
}
#sidebar.ls-mode.route-active .ls-route-stats .rs-arrow.up { color: var(--ls-route-up); }
#sidebar.ls-mode.route-active .ls-route-stats .rs-arrow.down { color: var(--ls-route-down); }

/* The Rute section's trigger is pressed by the action-row Rute button and never
   shown ([hidden] alone loses to style.css's .sb-route-btn display). */
#sidebar.ls-mode #route-btn.ls-route-trigger { display: none; }

/* The selected route card is the route the header block describes: same blue. */
#sidebar.ls-mode .sb-route-card.selected { background: var(--ls-route-surface); }
/* Its text was tuned for navy (white 50 % falls to 2.8:1 on this blue): the card
   reuses the header block's route tokens instead. */
#sidebar.ls-mode .sb-route-card.selected :is(.sb-rc-breakdown, .sb-rc-types, .sb-rc-time) { color: var(--ls-route-muted); }
#sidebar.ls-mode .sb-route-card.selected :is(.sb-rc-nav, .sb-rc-badge) { color: var(--ls-route-text); }
#sidebar.ls-mode .sb-route-card.selected .sb-rc-badge { background: var(--ls-route-btn); }
#sidebar.ls-mode .sb-route-card.selected .sb-rc-elev .up { color: var(--ls-route-up); }
#sidebar.ls-mode .sb-route-card.selected .sb-rc-elev .down { color: var(--ls-route-down); }

/* Route buttons speak the feature buttons' language: the Rute fill, white ink,
   the same lip and press. One button language on the sheet. */
#sidebar.ls-mode .sb-route-hide {
  --lift: 0 var(--ls-lip) 0 var(--ls-fill-lip), 0 var(--ls-sp-3) var(--ls-sp-7) var(--ls-fill-drop);
  display: flex; align-items: center; justify-content: center; gap: var(--ls-sp-3);
  width: 100%; min-height: var(--ls-btn-h); border: 0; border-radius: var(--ls-r-btn);
  background: var(--ls-rute-fill); color: var(--ls-on-fill); box-shadow: var(--lift);
  font: inherit; font-size: var(--ls-fs-title); font-weight: 700; cursor: pointer; touch-action: manipulation;
}
#sidebar.ls-mode .sb-route-hide { margin-top: var(--ls-sp-7); }
#sidebar.ls-mode .sb-route-hide .fk-ic { width: var(--ls-act-ic-muted); height: var(--ls-act-ic-muted); }
#sidebar.ls-mode .sb-route-hide:active {
  transform: translateY(var(--ls-press));
  box-shadow: 0 var(--ls-sp-1) var(--ls-sp-4) var(--ls-fill-drop);
}

/* ── Body ── */
#sidebar.ls-mode .sb-body.ls-sheet {
  display: block; background: var(--ls-sheet-bg);
  padding: 0 0 calc(var(--ls-sp-14) + env(safe-area-inset-bottom, 0px));
}
.ls-ic { width: var(--ls-ic); height: var(--ls-ic); flex: none; }
.ls-peek { padding: 0 var(--ls-gutter); }
.ls-label {
  margin: var(--ls-label-m); font-size: var(--ls-fs-label); font-weight: 800;
  letter-spacing: var(--ls-ls-label); text-transform: uppercase; color: var(--ls-label); line-height: 1.2;
}
/* Short screens (iPhone SE class): the two section labels give way so the action
   row still fits inside the peek. */
@media (max-width: 768px) and (max-height: 600px) { .ls-label { display: none; } }

/* ── Trout band: B / B2 / C / D ── one band; each state picks its tokens. */
.ls-band {
  --band-bg: var(--ls-d-bg); --band-text: var(--ls-d-text);
  --band-disc: var(--ls-d-disc); --band-disc-ic: var(--ls-d-disc-ic);
  margin-top: var(--ls-sp-11);
  background: var(--band-bg); border-radius: var(--ls-r-band); color: var(--band-text); position: relative;
}
.ls-band-B  { --band-bg: var(--ls-b-bg);  --band-text: var(--ls-b-text);  --band-disc: var(--ls-b-disc);  --band-disc-ic: var(--ls-b-disc-ic); }
.ls-band-B2 { --band-bg: var(--ls-b2-bg); --band-text: var(--ls-b2-text); --band-disc: var(--ls-b2-disc); --band-disc-ic: var(--ls-b2-disc-ic); }
.ls-band-C  { --band-bg: var(--ls-c-bg);  --band-text: var(--ls-c-text);  --band-disc: var(--ls-c-disc);  --band-disc-ic: var(--ls-c-disc-ic); }
.ls-band-main {
  width: 100%; display: flex; align-items: center; gap: var(--ls-sp-9);
  padding: var(--ls-band-pad-y) var(--ls-band-pad-x); background: none; border: 0; color: inherit;
  text-align: left; font: inherit; cursor: pointer; touch-action: manipulation;
}
.ls-band-disc {
  width: var(--ls-disc); height: var(--ls-disc); border-radius: var(--ls-r-round); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--band-disc); color: var(--band-disc-ic);
}
.ls-band-disc .ls-ic { width: var(--ls-disc-ic); height: var(--ls-disc-ic); }
.ls-band-body { flex: 1; min-width: 0; display: block; }
.ls-band-big { line-height: 1.15; margin-top: var(--ls-sp-1); }
.ls-band-big b { font-size: var(--ls-fs-big); font-weight: 800; white-space: nowrap; }
.ls-band-big span { font-size: var(--ls-fs-big-unit); font-weight: 500; }
.ls-band-label { font-size: var(--ls-fs-a-label); font-weight: 700; text-transform: uppercase; letter-spacing: var(--ls-ls-a-label); line-height: 1.3; }
.ls-band-title { font-size: var(--ls-fs-title); font-weight: 700; line-height: 1.3; }
.ls-band-sub { font-size: var(--ls-fs-small); line-height: 1.35; margin-top: var(--ls-sp-1); opacity: var(--ls-dim); }
.ls-oneline { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-band-u { text-decoration: underline; text-underline-offset: var(--ls-underline-offset); }
.ls-band-chev { flex: none; display: inline-flex; opacity: var(--ls-dim-chev); }
.ls-band-chev .ls-ic { width: var(--ls-chev); height: var(--ls-chev); }
.ls-band-se { flex: none; font-size: var(--ls-fs-meta); font-weight: 700; color: var(--ls-d-accent); }

/* ── Gold card (A, and showcase A + footer) ── the image carries the look:
   cover, anchored right, so the trout stays on the right at every size. */
/* The card is the flat fill; the picture is on the CONTENT ROW (.ls-band-row),
   which is the same box with or without the membership footer under it — so the
   fish renders identically in both, and the footer sits on plain colour. */
.ls-band-A, .ls-band-S {
  margin: var(--ls-sp-11) var(--ls-a-bleed) 0; border-radius: var(--ls-r-card); overflow: hidden;
  padding: 0; display: block;
}
.ls-band-A .ls-band-row, .ls-band-S .ls-band-row {
  min-height: var(--ls-a-min-h); padding: var(--ls-a-pad);
  display: flex; flex-direction: column; justify-content: center;
  background: var(--row-img) right center / cover no-repeat;
}
.ls-band-A {
  --a-img: var(--ls-img-gold-orret); --row-img: var(--a-img);
  background: var(--ls-a-fallback);
  color: var(--ls-a-weight);
}
.ls-band-A.ls-gold-roye { --a-img: var(--ls-img-gold-roye); --row-img: var(--a-img); }
.ls-band-A .ls-band-main { padding: 0; gap: var(--ls-sp-7); }
.ls-band-A .ls-band-label {
  color: var(--ls-a-label); font-weight: 600; white-space: nowrap;
  margin-top: var(--ls-a-label-mt); margin-bottom: var(--ls-sp-7); line-height: var(--ls-lh-a-label);
}
.ls-band-A .ls-band-label b { font-weight: 800; }
.ls-band-A .ls-band-big { margin: 0; line-height: var(--ls-lh-a-weight); }
/* "Over N kg" is wider than a weight; under 360 px it would run into the fish.
   Weights keep their size. */
@media (max-width: 359px) { .ls-band-A .ls-band-big.is-over b { font-size: var(--ls-fs-a-over-narrow); } }
.ls-band-A .ls-band-big b {
  font-size: var(--ls-fs-a-weight); font-weight: 600; letter-spacing: var(--ls-ls-a-weight); color: var(--ls-a-weight);
}
.ls-band-A .ls-band-sub { color: var(--ls-a-sub); margin-top: var(--ls-sp-2); opacity: 1; }
.ls-band-A .ls-band-chev { color: var(--ls-a-chev); }

/* ── Species card (members' B and C) ── same geometry as the gold card; the
   image is the lead species (lake_sheet.js leadSpecies). */
.ls-band-S {
  --s-img: var(--ls-img-blue-sik); --row-img: var(--s-img);
  background: var(--ls-s-fallback);
  color: var(--ls-s-title);
}
.ls-band-S.ls-img-orret  { --s-img: var(--ls-img-blue-orret); --row-img: var(--s-img); }
.ls-band-S.ls-img-roye   { --s-img: var(--ls-img-blue-roye); --row-img: var(--s-img); }
.ls-band-S.ls-img-abbor  { --s-img: var(--ls-img-blue-abbor); --row-img: var(--s-img); }
.ls-band-S.ls-img-gjedde { --s-img: var(--ls-img-blue-gjedde); --row-img: var(--s-img); }
.ls-band-S.ls-img-sik    { --s-img: var(--ls-img-blue-sik); --row-img: var(--s-img); }
.ls-band-S.is-empty { background: var(--ls-s-empty-bg); }   /* no image until blue_empty.webp exists */
.ls-band-S.is-empty .ls-band-row { background: none; }
/* The membership footer (non-members) takes the card's own colours. */
.ls-band-S { --foot-ink: var(--ls-s-sub); --foot-line: var(--ls-s-foot-line); }
.ls-band-S .ls-band-main { padding: 0; gap: var(--ls-sp-7); }
.ls-band-S .ls-band-label {
  color: var(--ls-s-label); font-weight: 600; white-space: nowrap;
  margin-top: var(--ls-a-label-mt); margin-bottom: var(--ls-sp-7); line-height: var(--ls-lh-a-label);
}
.ls-band-S .ls-band-label b { font-weight: 800; }
.ls-band-S.is-empty .ls-band-label { color: var(--ls-s-empty-label); }
.ls-band-S .ls-band-big { margin: 0; line-height: var(--ls-lh-a-weight); }
.ls-band-S .ls-band-big b { font-size: var(--ls-fs-s-title); font-weight: 600; color: var(--ls-s-title); }
.ls-band-S .ls-band-sub { color: var(--ls-s-sub); margin-top: var(--ls-sp-2); opacity: 1; }
.ls-band-S .ls-band-chev { color: var(--ls-s-chev); opacity: 1; }

/* The membership footer (non-members, slot.nudge): a row under the text, inside
   the same card (species card or showcase gold card), over the image too. */
.ls-band-foot {
  display: flex; align-items: flex-start; gap: var(--ls-sp-5);
  margin: 0 var(--ls-a-pad-r) 0 var(--ls-a-pad-l); padding: var(--ls-sp-5) 0 var(--ls-a-pad-b);
  border-top: var(--ls-hair-w) solid var(--foot-line, var(--ls-a-foot-line));
  font-size: var(--ls-fs-foot); line-height: 1.35; color: var(--foot-ink, var(--ls-a-sub)); text-decoration: none;
  touch-action: manipulation;
}
.ls-band-foot b { font-weight: 700; }
.ls-band-foot u { text-underline-offset: var(--ls-underline-offset); white-space: nowrap; }
.ls-band-foot-ic { width: var(--ls-foot-ic); height: var(--ls-foot-ic); margin-top: var(--ls-sp-1); }

/* ── "Om vannet" stats ── */
.ls-nums {
  display: grid; grid-template-columns: repeat(var(--ls-cols, 3), 1fr);
  padding: var(--ls-sp-8) 0 var(--ls-sp-9);
  border-top: var(--ls-hair-w) solid var(--ls-hair); border-bottom: var(--ls-hair-w) solid var(--ls-hair);
}
.ls-num { display: flex; align-items: center; justify-content: center; gap: var(--ls-sp-5); min-width: 0; padding: 0 var(--ls-sp-3); }
.ls-num + .ls-num { border-left: var(--ls-hair-w) solid var(--ls-hair); }
.ls-num-ic { width: var(--ls-stat-ic-size); height: var(--ls-stat-ic-size); color: var(--ls-stat-ic); stroke-width: var(--ls-stat-stroke); }
.ls-num-t { min-width: 0; }
.ls-num-v { font-size: var(--ls-fs-stat); font-weight: 700; color: var(--ls-stat-v); line-height: 1.3; white-space: nowrap; }
.ls-num-v.is-muted { color: var(--ls-disabled); font-weight: 600; }
.ls-num-k { font-size: var(--ls-fs-tiny); text-transform: uppercase; letter-spacing: var(--ls-ls-cap); color: var(--ls-stat-cap); line-height: 1.3; }
/* Under 350px, and whenever there are four cells: icon above the text. */
.ls-nums.is-4 .ls-num { flex-direction: column; gap: var(--ls-sp-1); text-align: center; }
.ls-nums.is-4 .ls-num-ic { width: var(--ls-stat-ic-narrow); height: var(--ls-stat-ic-narrow); }
@media (max-width: 349px) {
  .ls-num { flex-direction: column; gap: var(--ls-sp-1); text-align: center; }
  .ls-num-ic { width: var(--ls-stat-ic-narrow); height: var(--ls-stat-ic-narrow); }
  .ls-num-v { font-size: var(--ls-fs-stat-narrow); }
}

/* ── "Utforsk vannet" feature buttons ── solid fills, white icon + label. */
.ls-actions { display: grid; grid-template-columns: repeat(var(--ls-cols, 4), 1fr); gap: var(--ls-sp-6); }
.ls-act {
  --off: color-mix(in srgb, var(--fill) 45%, transparent);
  --lift: 0 var(--ls-lip) 0 var(--ls-fill-lip), 0 var(--ls-sp-3) var(--ls-sp-7) var(--ls-fill-drop);
  position: relative; height: var(--ls-act-h); border-radius: var(--ls-r-btn); border: 0;
  background: var(--fill); color: var(--ls-on-fill); box-shadow: var(--lift);
  font: inherit; cursor: pointer; padding: var(--ls-sp-4) var(--ls-sp-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--ls-sp-3); touch-action: manipulation;
}
.ls-act-3d     { --fill: var(--ls-3d-fill); }
.ls-act-route  { --fill: var(--ls-rute-fill); }
.ls-act-catch  { --fill: var(--ls-catch-fill); }
.ls-act-ticket { --fill: var(--ls-ticket-fill); }
.ls-act .ls-ic { width: var(--ls-act-ic); height: var(--ls-act-ic); stroke-width: var(--ls-act-stroke); }
.ls-act-label { font-size: var(--ls-fs-small); font-weight: var(--ls-fw-act); line-height: 1.15; white-space: nowrap; }
.ls-act-sub { font-size: var(--ls-fs-tiny); line-height: 1; }
.ls-act-long { display: none; }   /* the desktop label (lake_sheet.js actions → long) */
/* Selected: 3D only, and only while the 3D view is actually open. */
.ls-act[aria-pressed="true"] { box-shadow: inset 0 0 0 var(--ls-sp-1) var(--ls-fill-sel-ring), var(--lift); }
/* Pressed: down 1px, the lip gone. No hover state. */
.ls-act:not([aria-disabled="true"]):active {
  transform: translateY(var(--ls-press));
  box-shadow: 0 var(--ls-sp-1) var(--ls-sp-4) var(--ls-fill-drop);
}
/* Disabled (ingen sti / ingen info): the fill at 45 %, label at 85 %, no lip. */
.ls-act.is-muted { background: var(--off); color: var(--ls-on-fill-dim); box-shadow: none; }
.ls-act.is-muted .ls-ic { width: var(--ls-act-ic-muted); height: var(--ls-act-ic-muted); }
.ls-act[aria-disabled="true"] { cursor: default; }
.ls-lock, .ls-badge {
  position: absolute; top: var(--ls-mark-off); right: var(--ls-mark-off);
  width: var(--ls-mark); height: var(--ls-mark); border-radius: var(--ls-r-round);
  display: inline-flex; align-items: center; justify-content: center;
}
.ls-free, .ls-free-note {
  font-size: var(--ls-free-fs); font-weight: 700; line-height: 1; text-transform: uppercase;
  letter-spacing: var(--ls-ls-cap); white-space: nowrap;
}
.ls-free { display: none; color: var(--ls-on-fill-dim); }
.ls-free-note { color: var(--ls-3d-fill); margin-top: var(--ls-sp-5); padding-left: var(--ls-sp-1); }
.ls-lock { background: var(--ls-surface); color: var(--ls-text); box-shadow: var(--ls-shadow-badge); }
.ls-lock .ls-ic { width: var(--ls-mark-ic); height: var(--ls-mark-ic); }
.ls-badge {
  background: var(--ls-primary); color: var(--ls-on-primary); font-size: var(--ls-fs-badge); font-weight: 700;
  min-width: var(--ls-mark); width: auto; padding: 0 var(--ls-sp-2); border-radius: var(--ls-r-pill);
}

/* ── Vær: the first card; its title row is the peek's scroll hint ── */
.ls-hint .ls-sec-title { flex: none; }
.ls-hint-v {
  font-size: var(--ls-fs-meta); color: var(--ls-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
  height: var(--ls-hint-h); line-height: var(--ls-hint-h);   /* skeleton and text: one height */
  flex: 1; text-align: right;    /* a fixed box: the value changes inside it, the box never moves */
}
.ls-skel {
  display: inline-block; width: var(--ls-skel-w); height: var(--ls-skel-h); border-radius: var(--ls-r-skel);
  vertical-align: middle; background: var(--ls-skel-block);
}

/* ── Zero layout shift: every async box has its final height from first paint ── */
/* Weather: the skeleton is the card's own markup (weather.js skeletonHtml). */
.ls-sheet .sb-wx-meta { height: var(--ls-wx-meta-h); overflow: hidden; }
.ls-sheet .sb-wx-label { white-space: nowrap; }
.ls-sheet .sb-wx-stale { display: none; }          /* its stamp rides on the Vær line */
.ls-sheet .sb-wx-card.is-skel { color: transparent; pointer-events: none; }
.ls-sheet .sb-wx-card.is-skel * { color: transparent; text-decoration: none; }   /* the blocks keep the text's size, not its ink */
.ls-sheet .sb-wx-card.is-skel :is(.sb-wx-label, .sb-wx-temps, .sb-wx-meta, .sb-wx-credit) {
  background: var(--ls-skel-block); border-radius: var(--ls-r-skel);
}
.ls-sheet .sb-wx-card.is-skel .sb-wx-ic-wrap {
  width: var(--ls-wx-icon); height: var(--ls-wx-icon); border-radius: var(--ls-r-round); background: var(--ls-skel-block);
}
/* Fangst: fixed-height rows, real or skeleton (lake_sheet.js tripSkeleton). The
   sheet row is compact — headline, then "name · date"; the detail is a tap away. */
.ls-sheet #sb-trips .sb-trip-row { height: var(--ls-trip-row-h); overflow: hidden; align-items: center; padding-top: 0; padding-bottom: 0; }
.ls-sheet #sb-trips .sb-trip-main { display: block; width: 100%; }
.ls-sheet #sb-trips :is(.sb-trip-badge, .sb-trip-gear, .sb-trip-note, .sb-trip-pending) { display: none; }
.ls-sheet #sb-trips .sb-trip-headline { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-sheet #sb-trips .sb-trip-meta { display: inline; margin-top: 0; }
.ls-sheet #sb-trips .sb-trip-date::before { content: " · "; }
.ls-sheet #sb-trips .sb-trip-thumbs { margin-top: 0; }
.ls-sheet #sb-trips .sb-trips-expand { height: var(--ls-trip-more-h); padding-top: 0; padding-bottom: 0; }
.ls-sheet #sb-trips .ls-skel-row { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: var(--ls-sp-4); }
.ls-sheet #sb-trips .sb-trips-expand.ls-skel-row { align-items: center; }
.ls-skel-line { display: block; width: 100%; height: var(--ls-skel-line-h); border-radius: var(--ls-r-skel); background: var(--ls-skel-block); }
.ls-skel-line.is-short { width: var(--ls-skel-short); }
/* An empty result never collapses on arrival: fade, then [hidden]. */
.ls-sheet .ls-fading { opacity: 0; transition: opacity var(--ls-fade-out) ease; }
.ls-peek-end { height: 0; }

/* Weather: the existing 5-day card, unchanged; the Vær line above is its heading. */
.ls-sheet #sb-weather { margin-top: 0; }
.ls-sheet #sb-weather .sb-h { display: none; }
/* The 5-day strip sits flat inside the Vær card (no card in a card). */
.ls-sheet #sb-weather .sb-wx-card { background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; }

/* ── Sections: one white card each (Vær · Rute · Fangst · Fiskekort · Kilder ·
   then the extra blocks: utsetting, reguleringer, Omtaler) ── */
.ls-sec, .ls-sheet .ls-extra > .sb-section {
  margin: var(--ls-card-gap) var(--ls-gutter) 0; padding: var(--ls-card-pad);
  background: var(--ls-card-bg); border: var(--ls-hair-w) solid var(--ls-card-border); border-radius: var(--ls-card-r);
  scroll-margin-top: var(--ls-head-h, var(--ls-head-fallback));
}
.ls-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--ls-sp-9); margin-bottom: var(--ls-sp-7); }
.ls-sec > :last-child, .ls-sec > .ls-p:last-of-type { margin-bottom: 0; }
.ls-sec-title { font-size: var(--ls-fs-section); font-weight: 700; margin: 0; color: var(--ls-text); }
.ls-sec-link {
  font-size: var(--ls-fs-meta); font-weight: 600; color: var(--ls-link); text-decoration: none;
  background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; white-space: nowrap;
}
.ls-sec-link.is-static { color: var(--ls-muted); cursor: default; font-weight: 500; }
.ls-p { font-size: var(--ls-fs-body); line-height: 1.45; margin: 0 0 var(--ls-sp-7); color: var(--ls-text); }
.ls-muted { color: var(--ls-muted); }
.ls-link { font-size: var(--ls-fs-body); font-weight: 600; color: var(--ls-link); text-decoration: none; }
.ls-btn-primary, .ls-btn-secondary {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: var(--ls-btn-h);
  border-radius: var(--ls-r-btn); border: 0; font: inherit; font-size: var(--ls-fs-title); font-weight: 700;
  cursor: pointer; text-decoration: none; touch-action: manipulation;
}
.ls-btn-primary { background: var(--ls-primary); color: var(--ls-on-primary); margin-top: var(--ls-sp-7); }
#sidebar.ls-mode .ls-btn-secondary { background: var(--ls-btn); color: var(--ls-text); box-shadow: none; }
.ls-page-btn { margin-top: var(--ls-sp-10); }

/* Trips: the existing list, under our header and our one primary button. */
.ls-sheet #sb-trips > .sb-h,
.ls-sheet #sb-trips .sb-trips-row-cta,
.ls-sheet #sb-trips .sb-trips-empty,
.ls-sheet #sb-trips .sb-trips-help { display: none; }
.ls-sheet #sb-trips .sb-trips-card:not(:has(.sb-trip-row)) { display: none; }

.ls-kv { margin: 0; }
.ls-kv-row { display: flex; justify-content: space-between; gap: var(--ls-sp-11); padding: var(--ls-sp-5) 0; border-bottom: var(--ls-hair-w) solid var(--ls-hair); }
.ls-kv-row dt { font-size: var(--ls-fs-meta); color: var(--ls-muted); flex: none; }
.ls-kv-row dd { font-size: var(--ls-fs-body); font-weight: 600; margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.ls-kv-sep { height: var(--ls-sp-4); }
/* A product's own Kjøp link. It keeps .sb-fk-buy (sidebar.js counts purchase
   clicks by that class) but not style.css's blue button. */
#sidebar.ls-mode .ls-fk-link {
  display: inline-block; margin-top: var(--ls-sp-5); padding: 0; border-radius: 0;
  background: none; color: var(--ls-link); font-size: var(--ls-fs-meta); font-weight: 600;
}
.ls-fk-req { margin: var(--ls-sp-5) 0 0; font-size: var(--ls-fs-meta); }
.ls-kv-row:last-child { border-bottom: 0; padding-bottom: 0; }   /* the card's edge is the last line */
/* "og N til ›" in Kilder reads as a link, not a browser button. */
.ls-more {
  background: none; border: 0; padding: 0; margin: 0; font: inherit; font-weight: 600;
  color: var(--ls-link); cursor: pointer; touch-action: manipulation;
}

/* Arter: one fixed-height row per visible species (lake_sheet.js speciesRows).
   Both lines are single-line with an ellipsis, so the card is rows × row height
   at any width and nothing below it moves. */
.ls-arter { list-style: none; margin: 0; padding: 0; }
.ls-art {
  box-sizing: border-box; height: var(--ls-arter-row-h); overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: var(--ls-sp-1);
  border-bottom: var(--ls-hair-w) solid var(--ls-hair);
}
.ls-art:first-child { margin-top: calc(-1 * var(--ls-sp-4)); }
.ls-art:last-child { border-bottom: 0; margin-bottom: calc(-1 * var(--ls-sp-4)); }
.ls-art-l1 { display: flex; align-items: baseline; justify-content: space-between; gap: var(--ls-sp-9); min-width: 0; }
.ls-art-name { font-size: var(--ls-fs-body); color: var(--ls-text); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-art-name b { font-weight: 700; }
.ls-art-rec { font-weight: 600; color: var(--ls-text); }
.ls-art-tillit { flex: none; font-size: var(--ls-fs-meta); font-weight: 600; color: var(--ls-text); }
.ls-art-tillit.is-low { font-weight: 500; color: var(--ls-muted); }
.ls-art-q {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  width: var(--ls-q); height: var(--ls-q); margin-left: var(--ls-sp-3); padding: 0; border: 0;
  border-radius: var(--ls-r-round); background: var(--ls-btn); color: var(--ls-muted);
  font: inherit; font-size: var(--ls-fs-tiny); font-weight: 700; line-height: 1; cursor: help; touch-action: manipulation;
}
.ls-art-src { font-size: var(--ls-fs-small); color: var(--ls-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }

.ls-kilde-h { font-size: var(--ls-fs-meta); color: var(--ls-muted); margin: 0 0 var(--ls-sp-4); }
.ls-kilder { margin: 0 0 var(--ls-sp-9); padding-left: var(--ls-sp-12); font-size: var(--ls-fs-body); line-height: 1.5; }
.ls-kilder a, .ls-sheet .ls-p a { color: var(--ls-link); }

/* The shared desktop blocks (utsetting, reguleringer, Omtaler), as sheet cards:
   the same 17 px title, no uppercase eyebrow or icon, the inner card flat. */
.ls-extra { padding: 0; }
.ls-sheet .ls-extra > .sb-section > .sb-h {
  font-size: var(--ls-fs-section); font-weight: 700; text-transform: none; letter-spacing: 0;
  color: var(--ls-text); margin: 0 0 var(--ls-sp-7);
}
.ls-sheet .ls-extra > .sb-section > .sb-h .fk-ic { display: none; }
.ls-sheet .ls-extra > .sb-section > .sb-card { background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
.ls-sheet .ls-extra > .sb-footer { margin: var(--ls-card-gap) var(--ls-gutter) 0; }
/* The trip list sits flat inside the Fangst card (real and skeleton alike). */
.ls-sheet #sb-trips .sb-trips-card { background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; }

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  #sidebar.ls-mode, #sidebar.ls-mode.open { transition: none; }
}

/* ── Desktop panel (≥769px): the same sheet, always fully open, on the right ──
   No peek, fold or fade (the phone block above owns them). The action row is
   two wide buttons — 3D and Rute/Kjør dit — with the icon beside the label;
   Fangst and Fiskekort are the cards further down. Only hover is new. */
@media (min-width: 769px) {
  #sidebar.ls-mode { --ls-head-top: var(--ls-head-top-desk); }
  #sidebar.ls-mode .ls-actions { display: flex; }
  #sidebar.ls-mode .ls-act {
    flex: 1 1 0; min-width: 0; height: var(--ls-act-h-desk);
    flex-direction: row; gap: var(--ls-sp-5); padding: 0 var(--ls-sp-9);
  }
  #sidebar.ls-mode .ls-act-phone { display: none; }
  #sidebar.ls-mode .ls-act .ls-ic { width: var(--ls-act-ic-desk); height: var(--ls-act-ic-desk); }
  #sidebar.ls-mode .ls-act-label { font-size: var(--ls-fs-body); overflow: hidden; text-overflow: ellipsis; }
  #sidebar.ls-mode .ls-act-short { display: none; }
  #sidebar.ls-mode .ls-act-long { display: inline; }
  #sidebar.ls-mode .ls-act-sub::before { content: "· "; }
  /* 3D: icon beside a two-line text — the label, "Midlertidig gratis" under it. */
  #sidebar.ls-mode .ls-act-3d {
    display: grid; grid-template-columns: auto auto; align-content: center; justify-content: center;
    column-gap: var(--ls-sp-5); row-gap: var(--ls-sp-2);
  }
  #sidebar.ls-mode .ls-act-3d .ls-ic { grid-row: 1 / 3; align-self: center; }
  #sidebar.ls-mode .ls-act-3d .ls-act-label, #sidebar.ls-mode .ls-act-3d .ls-free { justify-self: start; }
  #sidebar.ls-mode .ls-free { display: inline; }
  #sidebar.ls-mode .ls-free-note { display: none; }
}
@media (min-width: 769px) and (hover: hover) {
  #sidebar.ls-mode .ls-act, #sidebar.ls-mode .ls-hbtn { transition: transform var(--ls-hover-t) ease; }
  #sidebar.ls-mode .ls-act:not([aria-disabled="true"]):hover,
  #sidebar.ls-mode .ls-hbtn:hover { transform: translateY(var(--ls-hover-lift)); }
}
@media (min-width: 769px) and (prefers-reduced-motion: reduce) {
  #sidebar.ls-mode .ls-act, #sidebar.ls-mode .ls-hbtn { transition: none; }
}

/* ══ Route mode (phone) — route_mode.js, wired by sidebar.js ═════════════════
   Source of truth: route-mode-ref/route-mode-reference.html (390 px). Its own
   panel (#route-mode) in #sidebar-inner; in route mode #sidebar-body (the lake
   sheet) is not displayed at all. Two heights: compact (`route-active`, down to
   the hint line, measured into --rm-compact) and expanded (`route-expanded`).
   The start-point chooser is a fixed bottom sheet on <body> (#rm-chooser-root),
   so the route tokens are defined for it too. */
#sidebar.ls-mode, #rm-chooser-root, #rm-pill {
  --ls-rm-teal: #176078;
  --ls-rm-deep: #123F4C;
  --ls-rm-light: #DCECEE;
  --ls-rm-green: #287A5B;
  --ls-rm-down: #C8473B;
  --ls-rm-ink: #18313D;
  --ls-rm-muted: #71818A;
  --ls-rm-bg: #F8F7F2;
  --ls-rm-line: #E4E7E3;
  --ls-rm-white: #FFFFFF;
  --ls-rm-route-blue: #4285F4;      /* the map's selected-route blue (routeview.js) */
  --ls-rm-terrain: #C9A86A;
  --ls-rm-warn-bg: #FBF1DE;
  --ls-rm-warn-ink: #7A4F00;
  --ls-rm-grab: #CFD6D3;
  --ls-rm-skel: #E7EAE5;
  --ls-rm-skel-hi: #F4F6F2;         /* the shimmer's light band */
  --ls-rm-spin-track: rgba(255, 255, 255, 0.35);
  --ls-rm-mask: #000000;            /* mask-image opacity, not a colour on screen */
  --ls-rm-backdrop: rgba(10, 25, 32, 0.38);
  --ls-rm-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
  --ls-rm-img-mtn: url("../assets/img/sheet/route_mountains.webp");
  --ls-rm-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ls-rm-font-display: "Fraunces", Georgia, "Times New Roman", serif;

  --ls-rm-compact-fb: 399px;        /* until measured: down to the hint line */
  --ls-rm-compact-tail: 37px;       /* under the hint line: 436 px in all at 390 (the reference) */
  --ls-rm-gutter: 20px;
  --ls-rm-grab-w: 40px;
  --ls-rm-grab-h: 4px;
  --ls-rm-grab-mt: 10px;
  --ls-rm-grab-hit: -10px -60px;
  --ls-rm-head-h: 136px;
  --ls-rm-head-pt: 14px;
  --ls-rm-mtn-w: 300px;
  --ls-rm-mtn-h: 100px;
  --ls-rm-mtn-r: -10px;
  --ls-rm-mtn-b: -6px;
  --ls-rm-mtn-o: 0.9;
  --ls-rm-fs-lab: 11px;
  --ls-rm-ls-lab: 0.14em;
  --ls-rm-fs-name: 32px;
  --ls-rm-lh-name: 1.125;           /* 32/36, and stays in step when fitName shrinks it */
  --ls-rm-fs-name-narrow: 26px;
  --ls-rm-ls-name: -0.01em;
  --ls-rm-fs-where: 14px;
  --ls-rm-hbtn: 40px;
  --ls-rm-hbtn-narrow: 34px;        /* under 360 px: the lake sheet's size, so a long name fits */
  --ls-rm-hbtn-ic: 18px;
  --ls-rm-pill-h: 28px;
  --ls-rm-pill-w: 96px;             /* the skeleton's width */
  --ls-rm-pill-pad: 0 12px 0 10px;
  --ls-rm-fs-pill: 12.5px;
  --ls-rm-pill-ic: 14px;
  --ls-rm-stats-pad: 14px 0 12px;
  --ls-rm-st-ic: 22px;
  --ls-rm-num-h: 20px;
  --ls-rm-fs-num: 19px;
  --ls-rm-fs-unit: 12px;
  --ls-rm-ls-num: -0.01em;
  --ls-rm-skel-w: 44px;
  --ls-rm-skel-h: 16px;
  --ls-rm-pick-h: 62px;
  --ls-rm-pick-pad: 0 14px 0 12px;
  --ls-rm-p: 38px;
  --ls-rm-fs-p: 15px;
  --ls-rm-fs-pick: 14.5px;
  --ls-rm-fs-pick-sub: 12.5px;
  --ls-rm-fs-pick-r: 13px;
  --ls-rm-cta-h: 58px;
  --ls-rm-lip: 0 3px 0;
  --ls-rm-fs-cta: 16px;
  --ls-rm-fs-cta-sub: 12px;
  --ls-rm-cta-ic: 18px;
  --ls-rm-cta-sub-o: 0.8;
  --ls-rm-off-o: 0.55;
  --ls-rm-fs-hint: 12px;
  --ls-rm-fs-h: 11px;
  --ls-rm-ls-h: 0.12em;
  --ls-rm-prof-h: 120px;
  --ls-rm-prof-mb: 14px;            /* room for the km axis under the chart */
  --ls-rm-fs-axis: 10.5px;
  --ls-rm-prof-line-w: 2.5;
  --ls-rm-prof-g0-o: 0.45;
  --ls-rm-prof-g1-o: 0.2;
  --ls-rm-pt-h: 54px;
  --ls-rm-fs-pt-k: 10.5px;
  --ls-rm-fs-pt: 14px;
  --ls-rm-bar-h: 12px;
  --ls-rm-dot: 9px;
  --ls-rm-fs-leg: 13px;
  --ls-rm-warn-pad: 10px 12px;
  --ls-rm-lh-warn: 18px;
  --ls-rm-warn-ic: 16px;
  --ls-rm-btn-h: 50px;
  --ls-rm-fs-btn: 15px;
  --ls-rm-fs-chooser-h: 17px;
  --ls-rm-fs-badge: 11px;
  --ls-rm-badge-pad: 3px 8px;
  --ls-rm-badge-max: 76px;         /* "Anbefalt · mest sti" wraps to two lines at 390 px */
  --ls-rm-r-sheet: 24px;
  --ls-rm-r: 14px;
  --ls-rm-r-sm: 12px;
  --ls-rm-r-p: 10px;
  --ls-rm-r-skel: 6px;
  --ls-rm-pill-bar-h: 48px;         /* minimal route mode's pill */
  --ls-rm-pill-bar-pad: 0 20px;
  --ls-rm-pill-bar-b: 16px;         /* above the safe area */
  --ls-rm-fs-pill-bar: 15px;
  --ls-rm-pill-shadow: 0 6px 24px rgba(10, 25, 32, 0.28);
  --ls-rm-z-pill: 55;
  --ls-rm-pill-bar-edge: 32px;      /* the pill never runs closer than 16 px to either edge */
  --ls-rm-minimal-off: 40px;        /* minimal: past the bottom edge, shadow and all */
  --ls-rm-fs-pill-up: 12px;               /* over the map and #sidebar (50), under the chooser */
  --ls-rm-shimmer: 2.4s;            /* slow: a calm wait, not a busy one */
  --ls-rm-spin: 900ms;
  --ls-rm-spin-w: 2px;
  --ls-rm-chip-h: 24px;
  --ls-rm-chip-pad: 0 10px;
  --ls-rm-fs-chip: 12px;
  --ls-rm-fs-slow: 12.5px;
  --ls-rm-card-pad: 14px 16px;
  --ls-rm-fs-card-t: 16px;
  --ls-rm-r-bar: 6px;
  --ls-rm-hair: 1px;
  --ls-rm-sp-1: 1px;
  --ls-rm-sp-2: 2px;
  --ls-rm-sp-3: 3px;
  --ls-rm-sp-4: 4px;
  --ls-rm-sp-6: 6px;
  --ls-rm-sp-8: 8px;
  --ls-rm-sp-9: 9px;
  --ls-rm-sp-10: 10px;
  --ls-rm-sp-12: 12px;
  --ls-rm-sp-14: 14px;
  --ls-rm-sp-16: 16px;
  --ls-rm-sp-18: 18px;
  --ls-rm-sp-20: 20px;
  --ls-rm-sp-30: 30px;
  --ls-rm-chooser-max: 80dvh;
  --ls-rm-z-chooser: 60;            /* over #sidebar (50) */
}

#route-mode { display: none; }
/* Desktop keeps its route list in the Rute card; on the phone that card is gone
   (Rute goes straight into route mode). Same markup, hidden by width, as the
   action row's phone/desktop labels. */
@media (max-width: 768px) {
#sidebar.ls-mode #ls-sec-rute { display: none; }
#sidebar.ls-mode.route-active { background: var(--ls-rm-bg); }
#sidebar.ls-mode.route-active #sidebar-body,
#sidebar.ls-mode.route-active #sidebar-loading,
#sidebar.ls-mode.route-active > .ls-fold-fade { display: none; }
#sidebar.ls-mode.route-active #route-mode { display: block; }
#sidebar.ls-mode.route-active:not(.route-expanded) #sidebar-inner { overflow: hidden; }
#sidebar.open.ls-mode.route-active {
  /* The tail holds the home indicator; past it the safe area takes over. */
  transform: translateY(calc(100% - var(--rm-compact, var(--ls-rm-compact-fb))
    - max(var(--ls-rm-compact-tail), calc(env(safe-area-inset-bottom, 0px) + var(--ls-rm-sp-12)))));
}
#sidebar.open.ls-mode.route-active.route-expanded { transform: translateY(0); }
/* Minimal: the sheet goes all the way down (its shadow too); the route stays on
   the map and #rm-pill brings it back. */
#sidebar.open.ls-mode.route-active.route-minimal { transform: translateY(calc(100% + var(--ls-rm-minimal-off))); }
#sidebar.ls-mode.route-expanded .rm-hint { display: none; }
/* Compact ends at the hint: the expanded sections must not show in its tail. */
#sidebar.ls-mode.route-active:not(.route-expanded) .rm-more { visibility: hidden; }
}

.rm {
  font-family: var(--ls-rm-font); color: var(--ls-rm-ink); background: var(--ls-rm-bg);
  padding-bottom: calc(var(--ls-rm-sp-30) + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
}
.rm-grab {
  position: relative; width: var(--ls-rm-grab-w); height: var(--ls-rm-grab-h);
  border-radius: var(--ls-rm-grab-h); background: var(--ls-rm-grab);
  margin: var(--ls-rm-grab-mt) auto 0; cursor: grab; touch-action: none;
}
.rm-grab::before { content: ''; position: absolute; inset: var(--ls-rm-grab-hit); }

/* Header: label, name, kommune · fylke; ☆ share ✕; the pill; the art. */
.rm-head {
  position: relative; overflow: hidden; touch-action: none;
  min-height: var(--ls-rm-head-h); padding: var(--ls-rm-head-pt) var(--ls-rm-gutter) 0;
}
.rm-mtn {
  position: absolute; right: var(--ls-rm-mtn-r); bottom: var(--ls-rm-mtn-b);
  width: var(--ls-rm-mtn-w); height: var(--ls-rm-mtn-h); pointer-events: none;
  background: var(--ls-rm-img-mtn) right bottom / cover no-repeat; opacity: var(--ls-rm-mtn-o);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, var(--ls-rm-mask) 30%);
  mask-image: linear-gradient(90deg, transparent 0, var(--ls-rm-mask) 30%);
}
.rm-row1 { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--ls-rm-sp-10); }
.rm-head-text { flex: 1; min-width: 0; }
.rm-lab {
  font-size: var(--ls-rm-fs-lab); letter-spacing: var(--ls-rm-ls-lab); text-transform: uppercase;
  color: var(--ls-rm-muted); font-weight: 600;
}
.rm-name {
  font-family: var(--ls-rm-font-display); font-size: var(--ls-rm-fs-name); line-height: var(--ls-rm-lh-name);
  font-weight: 700; letter-spacing: var(--ls-rm-ls-name); color: var(--ls-rm-ink);
  margin: var(--ls-rm-sp-4) 0 0; overflow-wrap: anywhere;
}
@media (max-width: 359px) {
  .rm-name { font-size: var(--ls-rm-fs-name-narrow); }
  .rm-icons { gap: var(--ls-rm-sp-6); }
  .rm-hbtn { width: var(--ls-rm-hbtn-narrow); height: var(--ls-rm-hbtn-narrow); }
}
.rm-where { font-size: var(--ls-rm-fs-where); color: var(--ls-rm-muted); margin-top: var(--ls-rm-sp-3); }
.rm-icons { display: flex; gap: var(--ls-rm-sp-8); flex: none; margin-top: var(--ls-rm-sp-2); }
.rm-hbtn {
  width: var(--ls-rm-hbtn); height: var(--ls-rm-hbtn); border-radius: 50%; padding: 0; margin: 0;
  display: grid; place-items: center; cursor: pointer; touch-action: manipulation;
  background: var(--ls-rm-white); border: var(--ls-rm-hair) solid var(--ls-rm-line); color: var(--ls-rm-ink);
}
.rm-hbtn .ls-ic { width: var(--ls-rm-hbtn-ic); height: var(--ls-rm-hbtn-ic); }
.rm-hbtn-close { background: var(--ls-rm-deep); border-color: var(--ls-rm-deep); color: var(--ls-rm-white); }
.rm-hbtn.is-fav { color: var(--ls-gold); }
.rm-hbtn.is-fav .ls-ic { fill: var(--ls-gold); }
.rm-hbtn:active { transform: scale(var(--ls-press-round)); }
.rm-diff {
  position: relative; display: inline-flex; align-items: center; gap: var(--ls-rm-sp-6);
  height: var(--ls-rm-pill-h); padding: var(--ls-rm-pill-pad); border-radius: var(--ls-rm-pill-h);
  background: var(--ls-rm-teal); color: var(--ls-rm-white);
  font-size: var(--ls-rm-fs-pill); font-weight: 600; margin-top: var(--ls-rm-sp-12);
}
.rm-diff.is-loading { background: none; padding: 0; }
.rm-diff-ic { width: var(--ls-rm-pill-ic); height: var(--ls-rm-pill-ic); }

/* Body: stats, start row, the button, the hint; then the expanded sections. */
.rm-body { padding: 0 var(--ls-rm-gutter); }
.rm-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); padding: var(--ls-rm-stats-pad);
  border-top: var(--ls-rm-hair) solid var(--ls-rm-line); border-bottom: var(--ls-rm-hair) solid var(--ls-rm-line);
}
.rm-st { text-align: center; border-left: var(--ls-rm-hair) solid var(--ls-rm-line); padding: 0 var(--ls-rm-sp-2); min-width: 0; }
.rm-st:first-child { border-left: 0; }
.rm-st-ic { display: block; margin: 0 auto var(--ls-rm-sp-8); width: var(--ls-rm-st-ic); height: var(--ls-rm-st-ic); color: var(--ls-rm-ink); }
.rm-ic-rm-up { color: var(--ls-rm-green); }
.rm-ic-rm-down { color: var(--ls-rm-down); }
.rm-st b {
  display: block; height: var(--ls-rm-num-h); line-height: var(--ls-rm-num-h); white-space: nowrap;
  font-size: var(--ls-rm-fs-num); font-weight: 700; letter-spacing: var(--ls-rm-ls-num);
  font-variant-numeric: tabular-nums;
}
.rm-st b small { font-size: var(--ls-rm-fs-unit); font-weight: 600; color: var(--ls-rm-muted); margin-left: var(--ls-rm-sp-1); }
.rm-skel {
  display: inline-block; vertical-align: middle; width: var(--ls-rm-skel-w); height: var(--ls-rm-skel-h);
  border-radius: var(--ls-rm-r-skel); background: var(--ls-rm-skel);
}
.rm-skel-pill { width: var(--ls-rm-pill-w); height: var(--ls-rm-pill-h); border-radius: var(--ls-rm-pill-h); }
.rm-skel-wide { display: block; width: 60%; margin-bottom: var(--ls-rm-sp-6); }
.rm-skel-block { display: block; width: 100%; height: var(--ls-rm-prof-h); }

.rm-pick {
  display: flex; align-items: center; gap: var(--ls-rm-sp-12); width: 100%; height: var(--ls-rm-pick-h);
  margin-top: var(--ls-rm-sp-12); padding: var(--ls-rm-pick-pad); border-radius: var(--ls-rm-r);
  background: var(--ls-rm-white); border: var(--ls-rm-hair) solid var(--ls-rm-line);
  font: inherit; color: inherit; text-align: left;
}
.rm-pick.is-choice { cursor: pointer; touch-action: manipulation; }
.rm-pick.is-choice:active { background: var(--ls-rm-bg); }
.rm-p {
  flex: none; width: var(--ls-rm-p); height: var(--ls-rm-p); border-radius: var(--ls-rm-r-p);
  background: var(--ls-rm-light); color: var(--ls-rm-deep); display: grid; place-items: center;
  font-weight: 800; font-size: var(--ls-rm-fs-p);
}
.rm-pick-t { flex: 1; min-width: 0; }
.rm-pick-t b, .rm-pick-t small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-pick-t b { font-size: var(--ls-rm-fs-pick); font-weight: 600; }
.rm-pick-t small { font-size: var(--ls-rm-fs-pick-sub); color: var(--ls-rm-muted); margin-top: var(--ls-rm-sp-2); }
.rm-pick-r { flex: none; font-size: var(--ls-rm-fs-pick-r); color: var(--ls-rm-teal); font-weight: 600; white-space: nowrap; }

.rm-cta {
  display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%;
  height: var(--ls-rm-cta-h); margin-top: var(--ls-rm-sp-12); border: 0; border-radius: var(--ls-rm-r);
  background: var(--ls-rm-teal); color: var(--ls-rm-white); box-shadow: var(--ls-rm-lip) var(--ls-rm-deep);
  font: inherit; cursor: pointer; touch-action: manipulation;
}
.rm-cta b { display: flex; align-items: center; gap: var(--ls-rm-sp-8); font-size: var(--ls-rm-fs-cta); font-weight: 700; }
.rm-cta small { font-size: var(--ls-rm-fs-cta-sub); opacity: var(--ls-rm-cta-sub-o); margin-top: var(--ls-rm-sp-1); }
.rm-cta-ic { width: var(--ls-rm-cta-ic); height: var(--ls-rm-cta-ic); }
.rm-cta:active:not(:disabled) { transform: translateY(var(--ls-rm-sp-2)); box-shadow: 0 var(--ls-rm-sp-1) 0 var(--ls-rm-deep); }
.rm-cta:disabled { opacity: var(--ls-rm-off-o); cursor: default; }
.rm-hint { text-align: center; font-size: var(--ls-rm-fs-hint); color: var(--ls-rm-muted); margin: var(--ls-rm-sp-12) 0 0; }
.rm-none { padding: var(--ls-rm-sp-16) 0 var(--ls-rm-sp-4); font-size: var(--ls-rm-fs-where); line-height: 1.45; }
.rm-none p { margin: 0; }

/* Loading (before the first answer, and while the server says "computing").
   Every row keeps the loaded height: the pill is hidden, not removed; the
   button's height is fixed; the skeleton bars sit where the numbers go. */
.rm-diff.is-hidden { visibility: hidden; }
[data-rm-state="loading"] .rm-skel {
  background: linear-gradient(90deg, var(--ls-rm-skel) 25%, var(--ls-rm-skel-hi) 50%, var(--ls-rm-skel) 75%);
  background-size: 200% 100%; animation: rm-shimmer var(--ls-rm-shimmer) ease-in-out infinite;
}
@keyframes rm-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.rm-cta-spin {
  flex: none; width: var(--ls-rm-cta-ic); height: var(--ls-rm-cta-ic); border-radius: 50%;
  border: var(--ls-rm-spin-w) solid var(--ls-rm-spin-track); border-top-color: var(--ls-rm-white);
  box-sizing: border-box; animation: rm-spin var(--ls-rm-spin) linear infinite;
}
@keyframes rm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  [data-rm-state="loading"] .rm-skel, .rm-cta-spin { animation: none; }
}
.rm-slow {
  margin: var(--ls-rm-sp-10) 0 0; text-align: center; font-size: var(--ls-rm-fs-slow);
  line-height: 1.4; color: var(--ls-rm-muted);
}

/* The route's labels under the stats row. */
.rm-labels { display: flex; flex-wrap: wrap; gap: var(--ls-rm-sp-6); margin-top: var(--ls-rm-sp-10); }
.rm-chip {
  display: inline-flex; align-items: center; height: var(--ls-rm-chip-h); padding: var(--ls-rm-chip-pad);
  border-radius: var(--ls-rm-chip-h); background: var(--ls-rm-warn-bg); color: var(--ls-rm-warn-ink);
  font-size: var(--ls-rm-fs-chip); font-weight: 600; white-space: nowrap;
}

/* Blocked / no route: a card, then (blocked) the drive button to the road. */
.rm-card {
  margin-top: var(--ls-rm-sp-16); padding: var(--ls-rm-card-pad); border-radius: var(--ls-rm-r);
  background: var(--ls-rm-white); border: var(--ls-rm-hair) solid var(--ls-rm-line);
}
.rm-card-t { display: block; font-size: var(--ls-rm-fs-card-t); font-weight: 700; line-height: 1.3; }
.rm-card-d { margin: var(--ls-rm-sp-4) 0 0; font-size: var(--ls-rm-fs-where); color: var(--ls-rm-muted); }

/* Minimal route mode's pill (phone): "Rute · 4,8 km · 2 t 30 min ▲", on <body>. */
.rm-pill {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: var(--ls-rm-z-pill);
  bottom: calc(env(safe-area-inset-bottom, 0px) + var(--ls-rm-pill-bar-b));
  display: inline-flex; align-items: center; max-width: calc(100vw - var(--ls-rm-pill-bar-edge));
  height: var(--ls-rm-pill-bar-h); padding: var(--ls-rm-pill-bar-pad); margin: 0;
  border-radius: var(--ls-rm-pill-bar-h); border: var(--ls-rm-hair) solid var(--ls-rm-line);
  background: var(--ls-rm-bg); color: var(--ls-rm-ink); box-shadow: var(--ls-rm-pill-shadow);
  font-family: var(--ls-rm-font); font-size: var(--ls-rm-fs-pill-bar); font-weight: 600;
  white-space: nowrap; cursor: pointer; touch-action: none; -webkit-font-smoothing: antialiased;
}
.rm-pill[hidden] { display: none; }
.rm-pill b { font-weight: 700; }
.rm-pill-t { overflow: hidden; text-overflow: ellipsis; }
.rm-pill-up { color: var(--ls-rm-teal); font-size: var(--ls-rm-fs-pill-up); margin-left: var(--ls-rm-sp-8); }
.rm-pill:active { transform: translateX(-50%) scale(0.97); }
@media (min-width: 769px) { .rm-pill { display: none; } }

/* The same rows in the desktop panel's Rute section (sidebar.js runRouting). */
.rm-inline { font-family: var(--ls-rm-font); color: var(--ls-rm-ink); -webkit-font-smoothing: antialiased; }

.rm-sec { margin-top: var(--ls-rm-sp-18); }
/* The expanded part's first line, "Gangtid 4 t 30 min én vei" (route_mode.oneWayHtml). */
.rm-oneway { margin: var(--ls-rm-sp-10) 0 0; color: var(--ls-rm-muted); font-size: var(--ls-rm-fs-h); }
.rm-oneway b { color: var(--ls-rm-ink); font-weight: 600; }
.rm-h {
  font-size: var(--ls-rm-fs-h); letter-spacing: var(--ls-rm-ls-h); text-transform: uppercase;
  color: var(--ls-rm-muted); font-weight: 600; margin: 0 0 var(--ls-rm-sp-10);
}
.rm-prof { min-height: var(--ls-rm-prof-h); margin-bottom: var(--ls-rm-prof-mb); }
.rm-prof-svg { display: block; width: 100%; height: auto; overflow: visible; }
.rm-prof-grid path { stroke: var(--ls-rm-line); stroke-dasharray: 3 3; }
.rm-prof-line { fill: none; stroke: var(--ls-rm-teal); stroke-width: var(--ls-rm-prof-line-w); stroke-linejoin: round; stroke-linecap: round; }
.rm-prof-g0 { stop-color: var(--ls-rm-teal); stop-opacity: var(--ls-rm-prof-g0-o); }
.rm-prof-g1 { stop-color: var(--ls-rm-light); stop-opacity: var(--ls-rm-prof-g1-o); }
.rm-prof-start { fill: var(--ls-rm-green); }
.rm-prof-end { fill: var(--ls-rm-route-blue); }
.rm-prof-y, .rm-prof-x { font-size: var(--ls-rm-fs-axis); fill: var(--ls-rm-muted); font-family: var(--ls-rm-font); }
.rm-prof-none { margin: 0; font-size: var(--ls-rm-fs-pick-sub); color: var(--ls-rm-muted); }
.rm-pts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--ls-rm-sp-8); }
.rm-pt {
  height: var(--ls-rm-pt-h); border-radius: var(--ls-rm-r-sm); background: var(--ls-rm-white);
  border: var(--ls-rm-hair) solid var(--ls-rm-line); padding: 0 var(--ls-rm-sp-10);
  display: flex; flex-direction: column; justify-content: center; min-width: 0;
}
.rm-pt small { font-size: var(--ls-rm-fs-pt-k); color: var(--ls-rm-muted); }
.rm-pt b { font-size: var(--ls-rm-fs-pt); font-weight: 700; white-space: nowrap; }
.rm-bar { display: flex; height: var(--ls-rm-bar-h); border-radius: var(--ls-rm-r-bar); overflow: hidden; margin-top: var(--ls-rm-sp-4); }
.rm-bar i { display: block; height: 100%; }
.rm-bar-sti, .rm-dot-sti { background: var(--ls-rm-green); }
.rm-bar-ter, .rm-dot-ter { background: var(--ls-rm-terrain); }
.rm-leg { display: flex; justify-content: space-between; gap: var(--ls-rm-sp-8); margin-top: var(--ls-rm-sp-8); font-size: var(--ls-rm-fs-leg); }
.rm-leg i { display: inline-block; width: var(--ls-rm-dot); height: var(--ls-rm-dot); border-radius: 50%; margin-right: var(--ls-rm-sp-6); }
.rm-warn {
  display: flex; gap: var(--ls-rm-sp-9); align-items: flex-start; margin-top: var(--ls-rm-sp-14);
  padding: var(--ls-rm-warn-pad); border-radius: var(--ls-rm-r-sm); background: var(--ls-rm-warn-bg);
  color: var(--ls-rm-warn-ink); font-size: var(--ls-rm-fs-leg); line-height: var(--ls-rm-lh-warn);
}
.rm-warn-ic { flex: none; width: var(--ls-rm-warn-ic); height: var(--ls-rm-warn-ic); margin-top: var(--ls-rm-sp-1); }
.rm-btns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ls-rm-sp-10); margin-top: var(--ls-rm-sp-16); }
.rm-btns.is-one { grid-template-columns: 1fr; }
.rm-btn {
  height: var(--ls-rm-btn-h); border-radius: var(--ls-rm-r); display: flex; align-items: center; justify-content: center;
  gap: var(--ls-rm-sp-8); font: inherit; font-size: var(--ls-rm-fs-btn); font-weight: 700; color: var(--ls-rm-ink);
  background: var(--ls-rm-white); border: var(--ls-rm-hair) solid var(--ls-rm-line); cursor: pointer;
}
.rm-btn .ls-ic { width: var(--ls-rm-hbtn-ic); height: var(--ls-rm-hbtn-ic); }

/* The start-point chooser. */
.rm-chooser-root { position: fixed; inset: 0; z-index: var(--ls-rm-z-chooser); font-family: var(--ls-rm-font); color: var(--ls-rm-ink); }
.rm-chooser-backdrop { position: absolute; inset: 0; background: var(--ls-rm-backdrop); }
.rm-chooser {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: var(--ls-rm-chooser-max); overflow-y: auto;
  background: var(--ls-rm-bg); border-radius: var(--ls-rm-r-sheet) var(--ls-rm-r-sheet) 0 0; box-shadow: var(--ls-rm-shadow);
  padding: 0 var(--ls-rm-gutter) calc(var(--ls-rm-sp-20) + env(safe-area-inset-bottom, 0px));
}
.rm-chooser-h { font-size: var(--ls-rm-fs-chooser-h); font-weight: 700; margin: var(--ls-rm-sp-14) 0 var(--ls-rm-sp-10); }
.rm-chooser-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ls-rm-sp-8); }
.rm-choice {
  display: flex; align-items: center; gap: var(--ls-rm-sp-12); width: 100%; height: var(--ls-rm-pick-h);
  padding: var(--ls-rm-pick-pad); border-radius: var(--ls-rm-r); background: var(--ls-rm-white);
  border: var(--ls-rm-hair) solid var(--ls-rm-line); font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.rm-choice.is-sel { border-color: var(--ls-rm-teal); box-shadow: inset 0 0 0 var(--ls-rm-hair) var(--ls-rm-teal); }
.rm-choice-t { flex: 1; min-width: 0; }
.rm-choice-t b, .rm-choice-t small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-choice-t b { font-size: var(--ls-rm-fs-pick); font-weight: 600; }
.rm-choice-t small { font-size: var(--ls-rm-fs-pick-sub); color: var(--ls-rm-muted); margin-top: var(--ls-rm-sp-2); }
/* Why a faster alternative isn't the recommended one (route_presentation.chooser_note):
   a third line, so that row grows; the others keep the fixed height. */
.rm-choice-t small.rm-choice-note { color: var(--ls-rm-teal); font-weight: 600; white-space: normal; }
.rm-choice:has(.rm-choice-note) { height: auto; min-height: var(--ls-rm-pick-h); padding-block: var(--ls-rm-sp-8); }
.rm-badge {
  /* Wraps to two centred lines rather than squeezing the row's facts: the main
     route's badge is "Anbefalt · mest sti" since 2026-11-17. */
  max-width: var(--ls-rm-badge-max); white-space: normal; text-align: center; line-height: 1.2;
  flex: none; font-size: var(--ls-rm-fs-badge); font-weight: 700; color: var(--ls-rm-white);
  background: var(--ls-rm-teal); border-radius: var(--ls-rm-r-p); padding: var(--ls-rm-badge-pad);
}
