/* PowPowPilot site styles. Every colour, size and radius comes from tokens.css. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--surface-base); color: var(--ink-primary);
  padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  font: var(--body-weight) var(--body-size)/var(--body-line) var(--font-sans);
}
img, svg { display: block; max-width: 100%; height: auto; }
ol, ul { list-style: none; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: var(--r-sm); }
.col { width: 100%; max-width: var(--col-max); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s-2); top: var(--s-2); z-index: 5; padding: var(--s-2) var(--s-3); background: var(--surface-base); }

/* shared type roles */
.label, .unit, .kind, dt, .tkt-l, .tkt-top, .kick, .lgt, .sub, .sec span {
  font: var(--label-weight) var(--label-size)/var(--label-line) var(--font-sans);
  letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-secondary);
}
.unit { letter-spacing: 0.04em; }
.rg { font-size: 14px; color: var(--ink-secondary); }
.fine { font-size: 13px; color: var(--ink-secondary); margin-top: var(--s-3); }

/* ---------- header ---------- */
.bar { background: var(--deep); color: var(--on-deep); }
.bar-in { display: flex; justify-content: space-between; align-items: center; min-height: 52px; padding: 0 var(--margin-mobile); }
.bar a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--on-deep); }
.bar-btn {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); padding: 0 var(--s-1) 0 var(--s-3);
  background: none; border: 0; color: var(--on-deep); font-size: 13px; font-weight: 600; cursor: pointer;
}
.bar-btn svg, .btn svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.bar :focus-visible { outline-color: var(--highlight); }

/* ---------- page head ---------- */
.hero { width: 100%; }
.hero-b picture { display: block; }
.hero-t { padding: var(--s-4) var(--margin-mobile) 0; }
.hd-s { padding-top: 0; }
/* the tab strip is where a day link without JS lands */
.tabs { scroll-margin-top: var(--s-4); }
.hd { padding: var(--s-5) var(--margin-mobile) 0; }
h1 { font-size: var(--display-size); line-height: 0.98; font-weight: 700; letter-spacing: -0.035em; color: var(--deep); overflow-wrap: break-word; hyphens: manual; }
/* Start claim: twice the display size (Regis); the sub-line is clearly smaller and slightly blue. */
/* The claim always stands on one line (Regis): its width is about 6.2 times its font size, so the size
   follows the width of its own column (a container unit), whatever stands beside it. */
.hero-t { container-type: inline-size; }
.hero-t > * { --claim: min(calc(var(--display-size) * 2), calc(100cqw / 6.6)); }
.hero-t h1 { font-size: var(--claim); line-height: 0.92; letter-spacing: -0.045em; white-space: nowrap; }
/* phones: the illustration is a flat band, cropped to the skier, so the first figures come into view sooner */
@media (max-width: 699.98px) {
  .hero { aspect-ratio: 2 / 1; height: auto; object-fit: cover; object-position: 50% 60%; }
  .hero-t .lead { font-size: 18px; margin-top: var(--s-2); }
}
/* The sub-line starts where the ink of the "C" starts: a large glyph sits a little inside its box. */
.hero-t .lead { color: var(--primary); font-weight: 500; font-size: 20px; margin-left: calc(var(--claim) * 0.021); }
.sub { margin-top: var(--s-3); }
.ruler { width: 100%; margin-top: var(--s-4); }
.tk { stroke: var(--primary); stroke-width: 1.25; }
.tkm { stroke: var(--track); stroke-width: 1; }

/* day tabs: active filled primary, inactive text only */
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-1); margin: var(--s-4) 0 var(--s-5); }
.tabs a {
  display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 52px;
  padding: var(--s-1) var(--s-2); border-radius: var(--r-full); color: var(--deep); text-decoration: none; text-align: center;
}
.tabs b { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.tabs small { font-size: 12px; color: var(--ink-secondary); }
.tabs a[aria-current] { background: var(--primary); color: var(--on-deep); }
.tabs a[aria-current] small { color: var(--on-deep); }

.body { padding: 0 var(--margin-mobile) var(--s-2); }
.lede { font-size: 17px; font-weight: 600; color: var(--deep); margin-bottom: var(--s-4); }

/* ---------- panel surface (the Top card is the large tile: see "component: tiles") ---------- */
.card { position: relative; background: var(--surface-panel); border-radius: var(--r-lg); padding: var(--s-4); }
.stretch { color: inherit; text-decoration: none; }
.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.stretch:focus-visible { outline: none; }

/* snow gauge */
.gz { margin: var(--s-2) auto 0; width: 100%; max-width: 300px; }
.gz .tr { fill: none; stroke: var(--track); stroke-width: 2; }
.gz .fl { fill: none; stroke: var(--primary); }
.gz .nd { stroke: var(--deep); stroke-width: 2.5; }
.gz .tk { stroke: var(--ink-secondary); }
.gz .nu {
  fill: var(--deep); font-family: var(--font-mono); font-weight: var(--reading-weight); font-size: 88px;
  letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
}
.lb { fill: var(--ink-secondary); font: 12px var(--font-mono); font-variant-numeric: tabular-nums; }
.lb-u { font: var(--label-weight) 11px var(--font-sans); letter-spacing: var(--label-tracking); }
.kind-c { text-align: center; }

.ro b, .row-s b {
  font: var(--reading-sm-weight) var(--reading-sm-size)/var(--reading-sm-line) var(--font-mono);
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--deep);
}

/* ---------- danger chip, states, notice ---------- */
.chip { display: inline-flex; align-items: center; gap: var(--s-2); font-size: 15px; font-weight: 600; color: var(--ink-primary); }
.dg {
  display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 5px;
  border-radius: var(--r-sm); border: 1px solid var(--ink-primary); color: var(--on-danger);
  font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; flex: 0 0 auto;
}
.dg-1 { background: var(--danger-1); }
.dg-2 { background: var(--danger-2); }
.dg-3 { background: var(--danger-3); }
.dg-4 { background: var(--danger-4); }
/* level 5: red and black checker with hard edges; the number sits on a red field */
.dg-5 {
  padding: 0; min-width: 28px;
  background: conic-gradient(var(--on-danger) 25%, var(--danger-5) 0 50%, var(--on-danger) 0 75%, var(--danger-5) 0) 0 0 / 8px 8px;
}
.dg-5 > span { background: var(--danger-5); padding: 0 4px; line-height: 18px; }
.state { font-size: 13px; font-weight: 600; color: var(--ink-secondary); }
.state-link { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: var(--s-1); min-height: var(--tap); color: var(--primary); }
.warn { display: flex; margin-top: var(--s-2); border-radius: var(--r-md); overflow: hidden; background: var(--deep); color: var(--on-deep); }
.warn i { flex: 0 0 10px; background: var(--danger-4); }
.warn p { padding: 11px 13px 12px; font-size: 16px; line-height: 1.3; }
.warn.s4 { margin: calc(-1 * var(--s-2)) var(--margin-mobile) var(--s-5); background: var(--surface-base); color: var(--ink-primary); border: 2px solid var(--deep); }
.warn.s4 i { flex-basis: 12px; }

.arrow-link { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.lg { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--hairline); }
.lg .lgt { flex: 0 0 100%; }
.lg .chip { font-size: 13px; font-weight: 400; gap: 6px; }

/* ---------- Alle Gebiete ---------- */
}
.rows { margin-top: var(--s-4); border-bottom: 1px solid var(--hairline); }
.row {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto 112px; gap: var(--s-3); align-items: center;
  min-height: 64px; padding: var(--s-3) 0 var(--s-1); border-top: 1px solid var(--hairline);
}
.row-a { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: calc(-1 * var(--s-2)); }
.row-t { font-size: 17px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; color: var(--deep); overflow-wrap: break-word; hyphens: manual; }
.row-n { min-width: 0; }
.row .rg { font-size: 13px; }
.row-s { text-align: right; white-space: nowrap; }
.row:has(.stretch:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: var(--r-sm); }

/* ---------- resort ticket ---------- */
.tkt { position: relative; margin: var(--s-4) var(--margin-mobile) var(--s-5); background: var(--deep); color: var(--on-deep); border-radius: var(--r-md); }
.tkt-m { padding: var(--s-4) 18px 18px; }
.tkt-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-3); color: var(--track); }
.tkt-top img { flex: 0 0 auto; }
.tkt h1, .tkt-t { font-size: var(--display-sm-size); line-height: 1.04; margin-top: var(--s-2); color: var(--on-deep); }
.tkt-t { font-weight: 700; letter-spacing: -0.035em; overflow-wrap: break-word; hyphens: manual; }   /* the title where the ticket is not the head of a page (styleguide) */
.tkt-f { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); margin-top: 18px; }
.tkt-f > div { border-top: 1px solid var(--primary); padding-top: var(--s-2); }
.tkt dt, .tkt-l { color: var(--track); }
.tkt-f dd { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.tkt-note { font-size: 12px; line-height: 1.35; color: var(--track); margin-top: var(--s-2); }
.tkt-p { position: relative; height: 0; margin: 0 22px; border-top: 3px dotted var(--surface-base); }
.tkt-p::before, .tkt-p::after { content: ""; position: absolute; top: -12.5px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-base); }
.tkt-p::before { left: -33px; }
.tkt-p::after { right: -33px; }
/* lower part of the ticket (tkt-s): new snow and danger, then current snow depth and weather, two columns */
.tkt-s { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); justify-content: space-between; align-items: start; gap: var(--s-3) var(--s-4); padding: 15px 18px 17px; }
.tkt-n { margin: var(--s-1) 0; }
.tkt-n b {
  font: var(--reading-weight) var(--reading-size)/var(--reading-line) var(--font-mono);
  letter-spacing: var(--reading-tracking); font-variant-numeric: tabular-nums;
}
.tkt-n .unit { color: var(--on-deep); font-size: 15px; }
.tkt-d { max-width: none; text-align: left; }
.tkt-c { display: inline-flex; margin-top: var(--s-2); padding: 5px 13px 5px 5px; border-radius: 11px; background: var(--surface-base); }
.tkt-c .chip { font-size: 17px; font-weight: 700; }
.tkt-st { margin-top: var(--s-2); }
.tkt-st .state { color: var(--on-deep); font-size: 14px; }
.tkt :focus-visible { outline-color: var(--highlight); }

/* ---------- sections, tape ---------- */
.sec { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); margin: var(--s-6) 2px var(--s-3); }
.body > section:first-child > .sec { margin-top: var(--s-2); }
.nb { white-space: nowrap; }
.sec h2, .prose h2 { font-size: var(--title-size); font-weight: 700; line-height: var(--title-line); letter-spacing: -0.03em; color: var(--deep); }
.sc, .tp { width: 100%; }
.tp .tb { fill: var(--track-pale); }
.tp .tf { fill: var(--primary); }
.tp .tt { stroke: var(--primary); stroke-width: 1; }
.tp .to { stroke: var(--surface-base); stroke-width: 1; }

/* ---------- empty state ---------- */
.empty { padding: var(--s-4); border: 1px solid var(--hairline); border-radius: var(--r-md); color: var(--ink-secondary); }

/* ---------- Über die Daten ---------- */
.resp { font-size: 17px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; color: var(--deep); }

/* ---------- footer ---------- */
.foot { padding: var(--s-6) var(--margin-mobile) var(--s-6); }
.foot .divider { width: 100%; margin-bottom: var(--s-5); }
.foot p { font-size: 13px; color: var(--ink-secondary); }
.foot p.resp { font-size: 17px; color: var(--deep); margin-bottom: var(--s-1); }
.foot a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--ink-secondary); }
.foot .signoff { margin-top: var(--s-5); }

/* ---------- motion: one-time gauge draw, only when motion is welcome ---------- */
@media (prefers-reduced-motion: no-preference) {
  .gz .fl { stroke-dasharray: 1; animation: gz-draw 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .gz .nd { animation: gz-needle 0.3s 0.8s linear both; }
  @keyframes gz-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes gz-needle { from { opacity: 0; } to { opacity: 1; } }
}

/* ================= app shell and interactions ================= */
.lead { margin-top: var(--s-3); font-size: 17px; line-height: 1.3; font-weight: 600; color: var(--deep); }
.sec-l { margin: calc(-1 * var(--s-2)) 2px var(--s-3); color: var(--ink-secondary); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--tap); padding: 0 var(--s-4);
  border: 1px solid var(--primary); border-radius: var(--r-full); background: var(--primary); color: var(--on-deep);
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn-2 { background: var(--surface-base); color: var(--deep); }
.btn-s { font-size: 13px; padding: 0 var(--s-3); }
.pill {
  min-height: var(--tap); padding: 0 var(--s-4); border: 1px solid var(--primary); border-radius: var(--r-full);
  background: var(--surface-base); color: var(--deep); font-size: 14px; font-weight: 600; cursor: pointer;
}
.pill[aria-pressed="true"] { background: var(--primary); color: var(--on-deep); }

/* bottom tab bar */
.tb { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface-base); border-top: 1px solid var(--hairline); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tb ul { display: grid; grid-template-columns: repeat(5, 1fr); max-width: var(--col-max); margin-inline: auto; }
.tb a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.01em; color: var(--ink-secondary); text-decoration: none;
}
.tb svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.tb-x, .tb-n { display: none; }
.tb a[aria-current], .tb a.is-up { color: var(--deep); }
.tb a[aria-current]::before, .tb a.is-up::before { content: ""; position: absolute; top: -1px; left: 50%; width: 36px; height: 3px; margin-left: -18px; border-radius: 0 0 var(--r-sm) var(--r-sm); background: var(--primary); }
.tb a[aria-current] svg, .tb a.is-up svg { stroke: var(--primary); stroke-width: 2; }

/* favourite star and destination link: own tap targets above the stretched card link */
.fav {
  position: relative; z-index: 1; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); margin-left: auto; border: 0; border-radius: var(--r-full); background: none; color: var(--primary); cursor: pointer;
}
.fav svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.fav[aria-pressed="true"] svg { fill: var(--primary); }
.dest { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: var(--s-1); min-height: var(--tap); font-size: 14px; font-weight: 600; white-space: nowrap; }
.dest .vf { font-weight: 400; color: var(--ink-secondary); margin-right: var(--s-1); }
/* ticket actions, the "counter" above the perforation: the outbound buttons (Skipass primary, Destination
   secondary), then four equal icon buttons */
.tkt-a { margin-top: var(--s-4); }
.tkt-go { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-3); }
.tkt-go .btn { flex: 1 1 0; min-width: 0; padding: 0 var(--s-2); font-size: 14px; white-space: nowrap; }
.tkt-buy { background: var(--on-deep); border-color: var(--on-deep); color: var(--deep); }
.tkt-web { background: none; border-color: var(--track); color: var(--on-deep); }
.tkt-4 { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.tkt-b {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 56px;
  padding: 6px 0; border: 1px solid var(--primary); border-radius: var(--r-md); background: none; color: var(--on-deep);
  font-size: 11px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; cursor: pointer;
}
.tkt-b svg { flex: 0 0 auto; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tkt-b span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tkt-b[aria-pressed="true"], .tkt-b[aria-expanded="true"] { background: var(--on-deep); border-color: var(--on-deep); color: var(--deep); }
.tkt-b[data-fav][aria-pressed="true"] svg { fill: currentColor; }
.outs { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-3); min-width: 0; }
.arrow-sm { font-size: 15px; }

/* expired notice (guard.js) */
.warn-x { margin-top: var(--s-2); padding: var(--s-3); border: 1px solid var(--hairline); border-radius: var(--r-md); }
.warn + .body-sheet, .warn-x + .body-sheet { margin-top: 0; }
.tkt + .warn-x { margin: calc(-1 * var(--s-2)) var(--margin-mobile) var(--s-5); }

/* share sheet, forms */
.body-sheet { padding-bottom: 0; }
.sheet { margin: 0 0 var(--s-5); padding: var(--s-4); border: 1px solid var(--primary); border-radius: var(--r-md); }
.more + .sheet { margin-top: var(--s-3); }
.sheet-t { margin-top: var(--s-2); font-size: 14px; overflow-wrap: break-word; }
.sheet-b { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.sheet-ok { margin-top: var(--s-2); font-weight: 600; color: var(--deep); }
.sheet-ok:empty { display: none; }
/* the status line with one action (undo): a filled strip, text left, action right (macro `status` with a call block) */
.sheet-ok-a { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-3); padding: 0 var(--s-3); border-radius: var(--r-md); background: var(--surface-panel); }
.logf { margin-top: var(--s-2); }

/* maps: sizes are divided by the zoom factor --k so dots, rings and outlines keep their size on screen */
.map { width: 100%; }
.map:focus { outline: none; }
.map-land { fill: var(--surface-base); stroke: var(--primary); stroke-width: calc(1.2px / var(--k, 1)); stroke-linejoin: round; }
.map-lake { fill: var(--track-pale); }
.mk-r { fill: none; stroke: var(--deep); stroke-width: 1.4; }
.mk { fill: var(--deep); stroke: var(--surface-base); stroke-width: 2.5; }
.mk-t { font: 600 12px var(--font-sans); fill: var(--deep); stroke: var(--surface-base); stroke-width: 3.5; stroke-linejoin: round; paint-order: stroke; }
[data-mk], .hm { pointer-events: none; }
.hm path { fill: var(--surface-base); stroke: var(--deep); stroke-width: 2; stroke-linejoin: round; }
.mapc .fine { margin: var(--s-2) var(--s-2) 0; }
.mapv { position: relative; overflow: hidden; border-radius: var(--r-md); touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.mapv.is-zoomed { touch-action: none; cursor: grab; }
.mapv.is-drag { cursor: grabbing; }
.mapv:focus-visible { outline-offset: -3px; }

/* snow scale: five blues from light to dark, a ring for "no value", ivory for zero */
.dot, .sw { --r: 2px; --f: var(--surface-base); --s: var(--hairline); --sw: 1.1px; }
[data-c="0"] { --r: 2.2px; --f: var(--surface-base); --s: var(--track); --sw: 1px; }
[data-c="1"] { --r: 2.6px; --f: var(--track-pale); --s: var(--track); --sw: 0.8px; }
[data-c="2"] { --r: 3.1px; --f: var(--track); --s: var(--highlight); --sw: 0.9px; }
[data-c="3"] { --r: 3.7px; --f: var(--highlight); --s: var(--deep); --sw: 0.9px; }
[data-c="4"] { --r: 4.4px; --f: var(--primary); --s: var(--surface-base); --sw: 0.9px; }
[data-c="5"] { --r: 5.2px; --f: var(--deep); --s: var(--surface-base); --sw: 1px; }
.dot-h { fill: none; pointer-events: all; r: calc(10px / var(--k, 1)); }
.dot-v { fill: var(--f); stroke: var(--s); stroke-width: calc(var(--sw) / var(--k, 1)); r: calc(var(--r) / var(--k, 1)); }
.dot { cursor: pointer; }
.dot[data-c="n"] .dot-v { fill: none; }
.dot-r { fill: var(--surface-base); stroke: var(--deep); stroke-width: calc(1.2px / var(--k, 1)); r: calc((var(--r) + 2.6px) / var(--k, 1)); }
.dot-s { fill: none; stroke: var(--deep); stroke-width: calc(2px / var(--k, 1)); r: calc(9px / var(--k, 1)); pointer-events: none; }
.dot.is-off { display: none; }
.dot.is-hi .dot-v { stroke: var(--deep); stroke-width: calc(2.2px / var(--k, 1)); r: calc((var(--r) + 2px) / var(--k, 1)); }
.row.is-hi, .row.is-sel { background: var(--surface-panel); }
/* the chosen row's line on the left: a bar behind the content, inside the row (no shadow, nothing shifts) */
.row.is-sel { isolation: isolate; }
.row.is-sel::before { content: ""; position: absolute; inset: 0; z-index: -1; border-left: 3px solid var(--primary); border-radius: inherit; pointer-events: none; }
.dot:focus { outline: none; }
.dot:focus-visible .dot-v, .dot:hover .dot-v { stroke: var(--deep); stroke-width: calc(2.2px / var(--k, 1)); }
.map-dots { fill: none; stroke: var(--f); stroke-width: calc(var(--r) * 2); stroke-linecap: round; --r: 1.6px; --f: var(--hairline); }
.map-dots[data-c="0"] { --f: var(--track-pale); --r: 1.4px; }

.lay { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--s-2); padding: 2px; }
.pill-s { flex: 0 0 auto; padding: 0 var(--s-3); font-size: 13px; white-space: nowrap; }
.pill-t { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }
.zm { position: absolute; left: 6px; top: 6px; display: flex; gap: 4px; }
.zm button {
  display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border: 1px solid var(--primary);
  border-radius: var(--r-full); background: var(--surface-base); color: var(--deep); cursor: pointer;
}
.zm button:disabled { color: var(--hairline); border-color: var(--hairline); cursor: default; }
.zm svg, .tray-x svg, .cmp-b svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tip {
  position: absolute; left: 0; top: 0; z-index: 2; max-width: min(240px, 80%); padding: 6px 10px 7px; border-radius: var(--r-sm);
  background: var(--deep); color: var(--on-deep); font-size: 13px; line-height: 1.25; pointer-events: none;
}
.tip b { display: block; font-weight: 600; }
.tip small { display: block; font-size: 11px; color: var(--track-pale); }
.mlg { margin: var(--s-2) var(--s-2) 0; }
.mlg ul { display: flex; flex-wrap: wrap; gap: 2px var(--s-3); margin-top: var(--s-1); font-size: 12px; color: var(--ink-secondary); font-variant-numeric: tabular-nums; }
.mlg li { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sw { flex: 0 0 auto; width: calc(var(--r) * 2 + 2px); height: calc(var(--r) * 2 + 2px); border-radius: 50%; background: var(--f); border: 1px solid var(--s); }
.sw[data-c="n"] { background: none; }
.sw-fav { width: 14px; height: 14px; background: radial-gradient(var(--primary) 0 3px, var(--surface-base) 3.5px); border-color: var(--deep); }
.sw-home { width: 10px; height: 10px; border-radius: 0; transform: rotate(45deg); background: var(--surface-base); border: 2px solid var(--deep); margin: 0 2px; }
.h-mouse { display: none; }
@media (hover: hover) and (pointer: fine) {
  .h-touch { display: none; }
  .h-mouse { display: inline; }
}


/* channel and season filters (the video card: see "components: media and dashboard") */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-3) 0 var(--s-2); }

/* logbook */
.wall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
.stub { display: flex; flex-direction: column; gap: var(--s-1); min-height: 104px; padding: var(--s-3); border-radius: var(--r-md); background: var(--deep); color: var(--on-deep); border-left: 3px dotted var(--surface-base); }
.stub img { margin-bottom: var(--s-1); }
.stub b { font-size: 15px; line-height: 1.2; overflow-wrap: break-word; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.stub > span { margin-top: auto; font: 13px var(--font-mono); color: var(--track); }

@media (prefers-reduced-motion: no-preference) {
  .fav.pop svg { animation: fav-pop 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
  @keyframes fav-pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
  .tb a[aria-current]::before { animation: tb-in 0.25s ease-out both; }
  @keyframes tb-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  .sheet, .form { animation: sheet-in 0.2s ease-out; }
  @keyframes sheet-in { from { transform: translateY(-6px); } to { transform: translateY(0); } }
  .pill, .btn { transition: background-color 0.15s, color 0.15s; }
}

/* ================= experience round ================= */
/* header refresh: label with the time of the data */
.bar-l { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: left; }
.bar-l small { font-size: 11px; font-weight: 400; color: var(--track-pale); font-variant-numeric: tabular-nums; }
html[data-fresh] .bar-btn { padding-right: var(--s-3); border: 1px solid var(--highlight); border-radius: var(--r-full); }

/* outlook: head, switch and empty state of the five-day strip (its columns are day tiles: see "component: tiles") */
.ol .sec { margin: var(--s-4) 0 var(--s-2); }
.ol .sec h2 { font-size: 20px; }
.ol .sec-l { margin: 0 0 var(--s-2); font-weight: 600; color: var(--deep); }
/* "Meiste" or "Favoriten": which resorts the strip looks at */
.ol .seg-o { max-width: 320px; margin: 0 0 var(--s-3); }
.ol-0 { margin: 0 0 var(--s-3); padding: var(--s-4); border-radius: var(--r-md); background: var(--surface-panel); color: var(--ink-primary); }
.ol-0 a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; color: var(--deep); }

/* source of a figure */
.tkt-src { margin-top: var(--s-1); font-size: 12px; color: var(--track-pale); }

/* Start: Deine Gebiete, quick jump (the note for favourites is a bar: "components: app bars") */
/* round icon button: the close slot of a bar, the remove button of a Bucket List card */
.tray-x { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border: 0; border-radius: var(--r-full); background: none; color: inherit; cursor: pointer; }
.mine .sec { margin-top: var(--s-5); }
.jump { margin-top: var(--s-5); }
.jump input {
  width: 100%; min-height: 48px; margin-top: var(--s-1); padding: 0 var(--s-4); border: 1px solid var(--primary); border-radius: var(--r-full);
  background: var(--surface-base); font-size: 16px; -webkit-appearance: none; appearance: none;
}

/* Alle Gebiete: figures and distance in the list rows (the controls: "components: list page") */
.row-h.row-f5 { display: none; }
.s-f5 .row-h.row-f5 { display: block; }
.dist { display: block; color: var(--primary); font-weight: 600; }

/* comparison: toggle, table (the tray is a bar: "components: app bars") */
.cmp-b {
  position: relative; z-index: 1; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); margin-left: auto; border: 0; border-radius: var(--r-full); background: none; color: var(--primary); cursor: pointer;
}
.cmp-b + .fav { margin-left: 0; }
.cmp-b[aria-pressed="true"] { background: radial-gradient(circle, var(--primary) 0 17px, transparent 17.5px); color: var(--on-deep); }
.btn[data-cmp][aria-pressed="true"] { background: var(--on-deep); color: var(--deep); }
.cmp-x { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0; border: 0; background: none; color: var(--primary); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ================= Bucket List and account ================= */
/* toggle: a checklist on a square tile, where the favourite is a star */
.sl-b {
  position: relative; z-index: 1; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); margin-left: auto; border: 0; border-radius: var(--r-full); background: none; color: var(--primary); cursor: pointer;
}
.sl-b svg, .sl-t svg, .ic-in { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sl-b svg { width: 30px; height: 30px; padding: 4px; border-radius: var(--r-sm); }
.sl-b[aria-pressed="true"] svg { background: var(--primary); color: var(--on-deep); stroke-width: 2; }
.sl-b + .fav, .cmp-b + .sl-b { margin-left: calc(-1 * var(--s-2)); }
.btn[data-sl][aria-pressed="true"] { background: var(--on-deep); color: var(--deep); }
.ic-in { display: inline; vertical-align: -4px; color: var(--primary); }

/* account in the header (phones); the rail carries its own entry */
.bar-acct { position: relative; justify-content: center; min-width: var(--tap); margin-left: auto; text-decoration: none; }
.bar-acct svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.bar-acct [data-acct-name] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bar-dot { position: absolute; right: 8px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--highlight); border: 2px solid var(--deep); }
.tb-w { display: none; }

/* segment rows: "Meine" (links) and the two views of the Bucket List (buttons) */
.seg { display: flex; gap: var(--s-1); margin: var(--s-4) var(--margin-mobile) 0; padding: 3px; border: 1px solid var(--hairline); border-radius: var(--r-full); }
.seg a, .seg button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 var(--s-2); border: 0;
  border-radius: var(--r-full); background: none; color: var(--deep); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.seg a[aria-current], .seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-deep); }
.seg-v { margin: var(--s-4) 0 0; }
.seg-m + .body { padding-top: var(--s-2); }

/* progress and the list of ticket stubs */
.sl-all { font-weight: 600; color: var(--deep); }
.sl-none p + p { margin-top: var(--s-2); }
.sl-none b { color: var(--deep); }
.sl-ask { margin-top: var(--s-3); font-weight: 600; }
.sl-chk { position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); cursor: pointer; }
.sl-chk input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sl-chk i { width: 26px; height: 26px; border: 2px solid var(--primary); border-radius: var(--r-sm); background: var(--surface-base); }
.sl-chk i::after { content: ""; display: none; width: 7px; height: 13px; margin: 1px auto 0; border: solid var(--on-deep); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.sl-chk input:checked ~ i { background: var(--primary); }
.sl-chk input:checked ~ i::after { display: block; }
.sl-chk input:focus-visible ~ i { outline: 3px solid var(--primary); outline-offset: 2px; }


/* map: Bucket List resorts wear a square frame, empty while open, filled once ticked off */
.dot-q { fill: none; stroke: var(--deep); stroke-width: 1.5px; transform-box: fill-box; transform-origin: center; transform: scale(calc(1 / var(--k, 1))); }
.dot-q[data-done="1"] { fill: var(--deep); }
.dot-q[data-done="1"] ~ .dot-v { stroke: var(--surface-base); }
.sw-sl { width: 12px; height: 12px; border-radius: 0; background: none; border: 2px solid var(--deep); }
.sw-sld { background: var(--deep); }


@media (prefers-reduced-motion: no-preference) {
  /* page changes: a short cross-fade where the browser supports it; header and tab bar stay put */
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.16s; }
  .bar { view-transition-name: ppp-bar; }
  .tb { view-transition-name: ppp-tabs; }
  .tip { transition: opacity 0.12s; }
  .ol-b .of { transform-box: fill-box; transform-origin: bottom; animation: bar-up 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  @keyframes bar-up { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  .barx-fix { animation: tray-in 0.2s ease-out; }
  @keyframes tray-in { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .sl-b.pop svg { animation: fav-pop 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .sstub.is-new .sstub-s::after { animation: sl-punch 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  @keyframes sl-punch { from { transform: scale(2.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  .seg a, .seg button { transition: background-color 0.15s, color 0.15s; }
  /* the cabin travels on when a resort is ticked off, and sways on its cable */
  .kb-car { transition: offset-distance 1.8s cubic-bezier(0.45, 0, 0.2, 1), transform 1.8s cubic-bezier(0.45, 0, 0.2, 1); }
  .kb-done { transition: stroke-dasharray 1.8s cubic-bezier(0.45, 0, 0.2, 1); }
  .kb-sway { animation: kb-sway 3.6s ease-in-out infinite alternate; }
  @keyframes kb-sway { from { transform: rotate(-3.5deg); } to { transform: rotate(3.5deg); } }
  /* light snowfall: each layer holds its flakes twice, one viewBox height apart, so the loop has no seam */
  .kb-fall-a { animation: kb-fall 16s linear infinite; }
  .kb-fall-b { animation: kb-fall 26s linear infinite; }
  @keyframes kb-fall { from { transform: translate(0, 0); } to { transform: translate(-14px, 300px); } }
  /* a newly earned award: the row crystal unveils, and the title brings confetti */
  .kom-ws li.is-new .crest { animation: crest-in 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
  .kom-xs .crest-x { animation: crest-float 6.5s ease-in-out infinite alternate; }
  .kom-xs li.is-new .crest-x { animation: crest-in 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.3) both, crest-float 6.5s ease-in-out 0.9s infinite alternate; }
  .kb-star.is-on { animation: kb-twinkle 2.8s ease-in-out infinite alternate; }
  .kom[data-level="king"] .kb-flag { transform-origin: 312px 22px; animation: kb-wave 1.8s ease-in-out infinite alternate; }
  @keyframes kb-wave { from { transform: skewY(-6deg) scaleX(0.92); } to { transform: skewY(6deg) scaleX(1); } }
  @keyframes kb-twinkle { from { opacity: 0.55; } to { opacity: 1; } }
  /* the title's crystal never stands still: it floats and turns a little, for as long as the title is held */
  .kom[data-level="king"] .kom-big [data-crest="king"] { animation: crest-float 5.5s ease-in-out infinite alternate; }
  .kom[data-level="king"] .kom-big.is-new [data-crest="king"] { animation: crest-in 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.3) both, crest-float 5.5s ease-in-out 0.7s infinite alternate; }
  @keyframes crest-float { from { transform: translateY(3px) rotate(-5deg); } to { transform: translateY(-4px) rotate(5deg); } }
  .kom-hd.is-new { animation: kom-up 0.7s ease-out both; }
  @keyframes kom-up { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
  .cf i { animation: cf-fall var(--cf-d, 4s) linear var(--cf-w, 0s) both; }
  @keyframes cf-fall { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(var(--cf-x, 0px), 112vh) rotate(var(--cf-r, 720deg)); } }
  .kom-big.is-new .crest { animation: crest-in 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
  @keyframes crest-in { from { transform: scale(0.4) rotate(-14deg); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* pointer: hover states for the mouse only; touch layouts keep their 44 px targets untouched */
@media (hover: hover) and (pointer: fine) {
  .row:hover { background: var(--surface-panel); }
  .pill:hover, .btn-2:hover, .zm button:not(:disabled):hover, .tabs a:not([aria-current]):hover { background: var(--surface-panel); }
  .pill[aria-pressed="true"]:hover, .btn:not(.btn-2):hover { background: var(--deep); border-color: var(--deep); }
  .barx-deep .btn:not(.btn-2):hover { background: var(--track-pale); border-color: var(--track-pale); }
  .tkt-a .tkt-web:hover, .tkt-b:not([aria-pressed="true"]):not([aria-expanded="true"]):hover { background: var(--primary); }
  .tkt-a .tkt-buy:hover { background: var(--track-pale); border-color: var(--track-pale); }
  .fav:hover, .cmp-b:not([aria-pressed="true"]):hover, .tray-x:hover { background: var(--surface-panel); }
  .barx-deep .tray-x:hover, .barx-deep .btn-2:hover { background: var(--primary); }
  .tb a:hover { color: var(--deep); }
  .ol-c:not(.is-on):has(a.ol-d:hover) { outline: 2px solid var(--highlight); outline-offset: -2px; }
  .bar-btn:hover [data-refresh-label] { text-decoration: underline; text-underline-offset: 3px; }
  .sl-b:hover, .sl-x:hover, .seg a:not([aria-current]):hover, .seg button[aria-pressed="false"]:hover { background: var(--surface-panel); }
  .sstub.is-done .sl-x:hover, .bar-acct:hover { background: var(--primary); }
}

/* ---------- iteration 03: weather icons, current snow depth, review, terrain map, unrated regions ---------- */
/* weather: own line icons in the palette's blue, always with a German label (visible, or as name and tooltip) */
.wxi { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; color: var(--primary); }
.wxi svg { flex: 0 0 auto; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.wxi-t > span { font-size: 15px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; color: var(--deep); }

.state-u { font-size: 14px; line-height: 1.35; color: var(--ink-primary); }
.state-u .state-link { display: flex; width: fit-content; font-size: 13px; }
.tkt-d .state-u .state-link { margin-left: 0; }
.dr .state-u { flex: 1 1 100%; }
.tkt .state-u a { color: var(--on-deep); }

/* outlook, window, forecast */
.ol-w { height: 22px; margin-top: 2px; }
.ol-w .wxi svg { width: 20px; height: 20px; }

/* list rows, favourites, season list, comparison, tooltip */
.row-s .wxi { margin-right: var(--s-2); vertical-align: 3px; }
.row-h { display: inline-block; margin-top: 2px; white-space: nowrap; }
.row-h .label { font-size: 10px; letter-spacing: 0.04em; }
.row-s .row-h b { font-size: 14px; letter-spacing: 0; }
.row-h .unit { font-size: 10px; }
.tip small.tip-w { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 10px; margin-top: 3px; }
.tip .wxi { gap: 4px; color: var(--track-pale); }
.tip .wxi svg { width: 16px; height: 16px; }
.tip .wxi-t > span { font-size: 11px; font-weight: 400; letter-spacing: 0; color: inherit; }

/* the ticket's figure cells (snow depth, weather): the one figure cell on the deep surface, dl.tl-f.tl-f-deep,
   styled with the figure cell in the block "component: tiles" */



/* ================= Ripper: solo level ================= */
/* the level card: a lift line as an instrument (cable = track, travelled part = primary, cabin = deep) */
.kom { display: grid; gap: var(--s-4); margin-top: var(--s-4); padding: var(--s-4); background: var(--surface-panel); border-radius: var(--r-lg); }
.kom-t { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-1); font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; color: var(--deep); overflow-wrap: anywhere; }
.kom-next { margin-top: var(--s-2); font-size: 16px; font-weight: 600; color: var(--deep); }
.kom-b { position: relative; --kom-p: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--deep); }
/* the lift scene by day: flat shapes in the blues of the start illustration */
.kb { display: block; width: 100%; height: auto; }
.kb-sky { fill: var(--highlight); }
.kb-cloud { fill: var(--on-deep); opacity: 0.85; }
.kb-far { fill: var(--track); }
.kb-mid { fill: var(--primary); }
.kb-cap { fill: var(--on-deep); }
.kb-p1 { fill: var(--on-deep); } .kb-p2 { fill: var(--track-pale); } .kb-p3 { fill: var(--primary); }
.kb-p4 { fill: var(--deep); } .kb-p5 { fill: var(--track); }
.kb-face { fill: var(--on-deep); }
.kb-lee { fill: var(--track-pale); }
.kb-rib { fill: none; stroke: var(--track); stroke-width: 2.5; stroke-linecap: round; }
.kb-line { fill: none; stroke: var(--track); stroke-width: 1.4; stroke-linecap: round; }
.kb-hill { fill: var(--track-pale); }
.kb-t1 { fill: var(--primary); } .kb-t2 { fill: var(--deep); } .kb-t3 { fill: var(--ink-primary); }
.kb-py { fill: none; stroke: var(--deep); stroke-width: 2.2; stroke-linecap: round; }
.kb-cable { fill: none; stroke: var(--deep); stroke-width: 1.6; }
.kb-done { fill: none; stroke: var(--on-deep); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: calc(var(--kom-p) * 1px) 100px; }
/* stations: reached ones are solid deep blue with a lit window, the ones ahead are light with a deep outline */
.kb-hut { fill: var(--on-deep); stroke: var(--deep); stroke-width: 1.8; stroke-linejoin: round; }
.kb-roof { fill: var(--deep); stroke: var(--deep); stroke-width: 1.8; stroke-linejoin: round; }
.kb-win { fill: var(--track); }
.kb-door { fill: var(--track); stroke: none; }
.kb-st.is-on .kb-hut { fill: var(--deep); }
.kb-st.is-on .kb-win { fill: var(--on-deep); }
.kb-st.is-on .kb-door { fill: var(--highlight); }
.kb-n { font: 700 12.5px var(--font-sans); fill: var(--deep); paint-order: stroke; stroke: var(--highlight); stroke-width: 3; stroke-linejoin: round; }
.kb-st:not(.is-on) .kb-n { opacity: 0.72; }
.kb-st[aria-current] .kb-n { text-decoration: underline; }
/* the summit flag: the pole always stands on the second summit; the flag flies once the title is reached */
.kb-pole { fill: none; stroke: var(--deep); stroke-width: 1.6; stroke-linecap: round; }
.kb-flag { fill: var(--deep); stroke: var(--on-deep); stroke-width: 1; stroke-linejoin: round; display: none; }
.kom[data-level="king"] .kb-flag { display: block; }
/* The cabin rides the cable: valley to the first summit is three quarters of the way, the span to the second,
   higher summit the last quarter, so every station is a quarter of the cable (--kom-p, 0 to 100). */
.kb-car { offset-path: path("M40 244L232 100L298 55"); offset-distance: calc(var(--kom-p) * 1%); offset-rotate: 0deg; }
@supports not (offset-path: path("M0 0")) {
  .kb-car { transform: translate(calc(40px + 2.58px * var(--kom-p)), calc(244px - 1.89px * var(--kom-p))); }
}
/* one star per hidden level, above the second summit; none shows before it is earned */
.kb-star { fill: var(--on-deep); stroke: var(--deep); stroke-width: 0.6; stroke-linejoin: round; display: none; }
.kb-star.is-on { display: block; }
.kb-sway { transform-origin: 0 0; }
.kb-arm { stroke: var(--deep); stroke-width: 2; stroke-linecap: round; }
.kb-grip { fill: var(--deep); }
.kb-cab { fill: var(--deep); stroke: var(--on-deep); stroke-width: 1.8; }
.kb-glass { fill: var(--on-deep); }
.kb-fall circle { fill: var(--on-deep); }
.kb-fall-b circle { opacity: 0.75; }
/* how the levels work: opens on a tap */
.kom-i { border-top: 1px solid var(--hairline); padding-top: var(--s-2); }
.kom-i summary { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); cursor: pointer; font-weight: 600; color: var(--primary); list-style: none; }
.kom-i summary::-webkit-details-marker { display: none; }
.kom-i summary svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.kom-i[open] summary { color: var(--deep); }
.kom-ib { max-width: 720px; padding-bottom: var(--s-2); font-size: 14px; color: var(--ink-secondary); }
.kom-ib p + p, .kom-il { margin-top: var(--s-2); }
.kom-il { list-style: none; padding: 0; border-top: 1px solid var(--hairline); }
.kom-il li { display: grid; grid-template-columns: minmax(120px, 0.4fr) 1fr; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--hairline); }
.kom-il b { color: var(--deep); }
/* the last award stays veiled until it is earned */
.cr-q { display: none; font: 700 40px var(--font-sans); fill: var(--primary); }
.is-off [data-crest="king"] g, .is-off [data-crest="king"] .cr-c, .is-off [data-crest="king"] .cr-in { display: none; }
.is-off [data-crest="king"] .cr-q { display: block; }
.is-off [data-crest="king"] .cr-sh { fill: var(--track-pale); stroke: var(--primary); stroke-dasharray: none; }
/* beyond the title: the hidden levels' crystals on a twelve-point star medal */
.kom-x { border-top: 1px solid var(--hairline); padding-top: var(--s-3); }
.kom-xl { margin-top: var(--s-1); font-weight: 600; color: var(--deep); }
.kom-xs { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.cr-star { fill: var(--highlight); stroke: var(--deep); stroke-width: 2; stroke-linejoin: round; }
.cr-ring { fill: none; stroke: var(--deep); stroke-width: 1.5; }
.cr-ring2 { stroke: var(--highlight); stroke-width: 1; }
.cr-tip { fill: var(--on-deep); stroke: var(--deep); stroke-width: 0.8; }
.cr-b7 .cr-sh, .cr-b9 .cr-sh, .cr-b11 .cr-sh { fill: var(--primary); }
.cr-b7 .cr-star { fill: var(--track); }
.cr-b8 .cr-star, .cr-b11 .cr-star { fill: var(--on-deep); }
.cr-b9 .cr-star { fill: var(--deep); }
.cr-b9 .cr-x, .cr-b11 .cr-x { stroke: var(--track-pale); }
.cr-b10 .cr-c, .cr-b11 .cr-c { fill: var(--on-deep); stroke: var(--deep); }
/* the last one turns the colours round: a light medal with a deep crystal */
.cr-b12 .cr-sh { fill: var(--on-deep); }
.cr-b12 .cr-star { fill: var(--deep); }
.cr-b12 .cr-in { stroke: var(--primary); }
.cr-b12 .cr-l { stroke: var(--deep); }
.cr-b12 .cr-x { stroke: var(--primary); }
.cr-b12 .cr-pip { fill: var(--deep); }
.cr-b12 .cr-c { fill: var(--highlight); stroke: var(--deep); }
.cr-b12 .cr-tip { fill: var(--highlight); }
/* confetti for the title: blue paper over the whole page, removed by saisonliste.js when it has fallen */
.cf { position: fixed; inset: 0; z-index: 90; overflow: hidden; pointer-events: none; }
.cf i { position: absolute; top: -24px; width: 9px; height: 15px; border-radius: 2px; }
.cf .c1 { background: var(--deep); } .cf .c2 { background: var(--primary); } .cf .c3 { background: var(--highlight); } .cf .c4 { background: var(--track); }
.cf .c5 { background: var(--on-deep); border: 1px solid var(--primary); }
/* shapes instead of paper: crystals, gondolas, skis, ski bunnies, mountains */
.cf i.sh { width: auto; height: auto; background: none; border: 0; border-radius: 0; }
.cf i.sh svg { display: block; width: var(--cf-s, 24px); height: var(--cf-s, 24px); }
.cf .c1.sh { color: var(--deep); } .cf .c2.sh { color: var(--primary); } .cf .c3.sh { color: var(--highlight); } .cf .c4.sh { color: var(--track); } .cf .c5.sh { color: var(--primary); }
/* Awards: a snow crystal on a hexagonal medal, richer with every level. Earned medals are deep blue with a
   light crystal; open ones are a dashed outline. */
.kom-h { display: flex; align-items: center; gap: var(--s-4); }
.kom-hd { min-width: 0; }
.kom-big { flex: none; width: 104px; height: 104px; }
.kom-big .crest { display: none; width: 104px; height: 104px; }
.kom[data-level="talstation"] .kom-big [data-crest="talstation"], .kom[data-level="mittelstation"] .kom-big [data-crest="mittelstation"],
.kom[data-level="bergstation"] .kom-big [data-crest="bergstation"], .kom[data-level="gipfel"] .kom-big [data-crest="gipfel"],
.kom[data-level="king"] .kom-big [data-crest="king"] { display: block; }
.cr-sh { fill: var(--deep); stroke: var(--deep); stroke-width: 3; stroke-linejoin: round; }
.cr-in { fill: none; stroke: var(--highlight); stroke-width: 1; stroke-linejoin: round; }
.cr-in2 { stroke: var(--on-deep); stroke-width: 0.6; opacity: 0.7; }
.cr-l { fill: none; stroke: var(--on-deep); stroke-width: 2.4; stroke-linecap: round; }
.cr-l2 { stroke-width: 1.6; }
.cr-x { fill: none; stroke: var(--highlight); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cr-pip { fill: var(--on-deep); }
.cr-c { fill: var(--highlight); stroke: var(--on-deep); stroke-width: 1.4; stroke-linejoin: round; }
[data-crest="king"] .cr-sh { fill: var(--primary); stroke: var(--deep); }
[data-crest="king"] .cr-x { stroke: var(--track-pale); }
[data-crest="king"] .cr-c { fill: var(--on-deep); stroke: var(--deep); }
.is-off .cr-sh { fill: var(--surface-base); stroke: var(--hairline); stroke-width: 1.5; stroke-dasharray: 4 3; }
.is-off .cr-in { stroke: none; }
.is-off .cr-l, .is-off .cr-x { stroke: var(--track-pale); }
.is-off .cr-pip { fill: var(--track-pale); }
.is-off .cr-c { fill: var(--surface-base); stroke: var(--track-pale); }
/* banner: a ribbon with notched ends under the title */
.kom-ban { display: inline-block; margin-top: var(--s-2); padding: 5px 18px; background: var(--primary); color: var(--on-deep); font: 700 11px/1.2 var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%, 8px 50%); }
.kom-new { margin-top: var(--s-3); font-weight: 700; color: var(--primary); }
.kom-w { border-top: 1px solid var(--hairline); padding-top: var(--s-3); }
/* the awards carry a real heading: they are the reward */
.kom-wt { font-size: 22px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; color: var(--deep); }
.kom-ws { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4) var(--s-2); margin-top: var(--s-3); list-style: none; padding: 0; }
.kom-ws li { display: grid; justify-items: center; gap: 2px; text-align: center; color: var(--deep); }
.kom-ws .crest { width: 100%; max-width: 72px; height: auto; margin-bottom: var(--s-1); }
.kom-ws b { font-size: 13px; font-weight: 700; line-height: 1.15; }
.kom-ws span { font: var(--label-weight) 10px/1.2 var(--font-sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-secondary); }
.kom-ws .is-off b { color: var(--ink-secondary); font-weight: 600; }
.kom .sl-all { margin-top: var(--s-3); }

/* ==== component: text pages, level line, logbook lists (round 4) ==== */
/* ---- Textseite (prose): running text on Daten, the legal pages and 404. Macros text_page, section, columns,
   item, defs, term and notice in templates/macros_text.html. The section heading shares the rule of .sec h2;
   the notice is the notice box (callout), the button row the form actions (sheet-b). ---- */
.prose-s { margin-top: var(--s-6); }
.prose h3 { font-size: 16px; font-weight: 600; color: var(--deep); margin-top: var(--s-4); }
.prose p { margin-top: var(--s-2); }
.prose a { overflow-wrap: anywhere; }
.prose > img { display: block; margin: var(--s-4) 0; }
.prose .resp { margin-top: var(--s-4); }
/* definition list: term above its explanation; defs-kv: key left, value right in the mono face */
.defs { margin-top: var(--s-3); border-bottom: 1px solid var(--hairline); }
.defs > div { padding: var(--s-3) 0; border-top: 1px solid var(--hairline); }
.defs dt { color: var(--primary); }
.defs dd { margin-top: var(--s-1); }
.defs-kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.defs-kv dt { color: var(--ink-secondary); }
.defs-kv dd { margin-top: 0; font: 14px var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
/* ---- Stufenzeile (macro level_line in templates/macros.html): the compact level, a sanctioned component of its
   own with two forms (styleguide "Stufenzeile · lv-c, tb-lv"; DESIGN.md, "Component system"). lv-c: a line in the page flow
   (Favoriten, Logbuch, Konto) with label, title, tallies (lv-s) and arrow. tb-lv: the title alone, as the second
   line of the Konto entry in the wide rail; inside the tab bar it shows from 1180 px (wide.css). ---- */
.lv-c { margin: 0 0 var(--s-3); }
.lv-c a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s-2); min-height: var(--tap); padding: var(--s-2) var(--s-3); border: 1px solid var(--hairline); border-radius: var(--r-md); color: var(--deep); text-decoration: none; }
.lv-c b { font-size: 16px; }
.lv-s { font: 13px var(--font-mono); color: var(--ink-secondary); }
.lv-c a > span:last-child { margin-left: auto; color: var(--primary); font-weight: 700; }
.tb-lv { display: block; font-size: 12px; font-weight: 600; color: var(--highlight); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb .tb-lv { display: none; }
/* ---- Logbuch lists (macros stamp_row and log_entry in templates/macros_text.html): stamps and entries are
   compact list rows (row row-c, see "compact list row"). Only what the two add to the row stands here. ---- */
.row-c > .row-s:last-child { grid-row: 1 / span 2; align-self: center; }   /* a reading alone: centred like a control */
.row-c .row-n > p { overflow-wrap: break-word; }
/* ==== end ==== */

/* ==== component: page layouts, map panel, ski-day button (round 4) ==== */
/* Macros: templates/macros_layout.html (hero, duo, side, more, map_panel) and templates/macros_gebiet.html (ski_day).
   Styleguide: templates/sg_round4_layout.html. Notes: docs/styleguide/round4-layout.md.
   Page layouts: hero (hero-b, hero, hero-t: its rules stay under "page head" above and under "Start" in wide.css),
   duo (two columns from 1180 px), side (a page with a side column, from 700 px), more (the line that closes a
   section). Phones show every layout in one column; the columns are in wide.css. */

/* layout "side" (resort page), one column: the extra block of the side column ends flush */
.side-x { padding-bottom: 0; }
.side-a:has(.side-x) + .side-b > section:first-child > .sec { margin-top: var(--s-6); }

/* layout "duo": the sections of its columns start one step closer than a page section */
.duo-a > section > .sec, .duo-b > .sec { margin-top: var(--s-5); }

/* layout "more": an arrow link on the left, one action on the right */
.more { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin: var(--s-4) 0 0; }
.more-t { margin-top: var(--s-2); }   /* close to a tile grid or a map panel */
/* more-rule: one full-width outbound link between two hairlines */
.more-rule { margin: var(--s-5) 2px 0; }
.more-rule .dest {
  flex: 1 1 auto; display: flex; justify-content: flex-start; gap: var(--s-2); align-items: center; min-height: 52px; border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; white-space: normal;
}
.more-rule .dest .vf { font-size: 15px; }
.more-rule + .fine { margin-inline: 2px; }

/* hero in the styleguide: the claim is a paragraph there (a page has one h1) */
.hero-t .hero-h { font-size: var(--claim); line-height: 0.92; letter-spacing: -0.045em; white-space: nowrap; }

/* map panel: the panel (card) around a map or a map embed. The map reaches close to the edge; from 1180 px the
   panel has its usual padding (wide.css), except where the panel is a column of its own (card-map-fill). */
.card-map { padding: var(--s-2) var(--s-2) var(--s-3); }
.card-map-fill { margin-top: var(--s-3); }
.card-map + .note { margin: var(--s-3) 2px 0; font-weight: 600; color: var(--ink-primary); }
/* embed: a map from another site, created only after a tap and shown unmodified (app.js, [data-geo]) */
.card-map-l { display: flex; flex-wrap: wrap; gap: 2px var(--s-4); margin: var(--s-1) var(--s-2) var(--s-3); font-size: 13px; color: var(--ink-secondary); }
.card-map-l li { padding-left: var(--s-3); border-left: 2px solid var(--track); }
.card-map-f { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2); min-height: 180px; padding: var(--s-4); border-radius: var(--r-md); background: var(--track-pale); text-align: center; }
.card-map-f:not(.is-on):has([data-geo-load][hidden]) { display: none; }
.card-map-f.is-on { display: block; min-height: 0; padding: 0; background: none; }
.card-map-f iframe { display: block; width: 100%; height: min(70vh, 480px); border: 1px solid var(--hairline); }
.card-map-f .fine { margin-top: 0; color: var(--ink-primary); }
.card-map-a { margin: var(--s-2) var(--s-2) 0; }
.card-map-c { margin-inline: var(--s-2); font-size: 12px; color: var(--ink-secondary); }
/* parts the map writes into its panel (m.map_box, map.js): the read-out of the chosen point (card-map-info), on
   Alle Gebiete with the list row of that resort (card-map-rows), and the row with "Ganze Schweiz" (card-map-focus) */
.card-map-focus { margin: var(--s-2) var(--s-2) 0; }
.card-map-info { margin: var(--s-2) var(--s-2) var(--s-3); }
.card-map-info .fine { margin: 0 0 var(--s-1); font-weight: 600; color: var(--deep); }
.card-map-rows { margin-top: 0; border-bottom: 0; }
.card-map-rows .row { border-top: 1px solid var(--hairline); }

/* ski-day button (resort ticket): the button variant btn-day on deep blue; pressed it looks like the pressed
   toggles above it. Under it the status line (sheet-ok) with the undo link (cmp-x), then two links. */
.skiday { margin-top: var(--s-3); }
.btn-day { display: flex; width: 100%; min-height: 48px; border-color: var(--highlight); border-radius: var(--r-md); font-size: 16px; font-weight: 700; }
.btn-day svg { flex: 0 0 auto; stroke-width: 2; }
.btn-day-1, .btn-day.is-on .btn-day-0 { display: none; }
.btn-day.is-on .btn-day-1 { display: inline; }
.btn-day.is-on { background: var(--on-deep); border-color: var(--on-deep); color: var(--deep); cursor: default; }
.skiday-s { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--s-3); margin-top: var(--s-2); font-size: 14px; }
.skiday-s .sheet-ok { margin-top: 0; color: var(--on-deep); }
.skiday-s .cmp-x { color: var(--track); }
.skiday-l { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-2); margin-top: var(--s-1); font-size: 13px; color: var(--track); }
.skiday-l a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--on-deep); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .btn-day:not(.is-on):hover { background: var(--highlight); border-color: var(--highlight); color: var(--deep); }
  .btn-day.is-on:hover { background: var(--on-deep); border-color: var(--on-deep); }
}
/* ==== end ==== */


/* ==== styleguide frame (sg, sg-*) ====
   The frame of /styleguide/ (templates/styleguide.html and its partials sg_*.html): headings, sample boxes,
   swatches and width caps around the live components. Nothing here styles a component, and no page other than
   the styleguide may use these classes. All sg rules of the two stylesheets stand in this one block.
   The list of classes is closed: tests/site/test_components_round4_cleanup.py fixes it (SG_CLASSES). A new entry
   takes one of the classes below; a new class needs a reason and a change of that test.
     page       sg (the page body; resets .sec, .tabs, .bul and a section head inside a panel), sg-j (jump link),
                sg-h (heading and use line of an entry), sg-p (a paragraph in the same voice)
     layout     sg-row (samples side by side; sg-c centres them), sg-stack (samples one below the other, 720 px),
                sg-box (a sample on the panel tone), sg-ls (a list of samples with their names beside)
     width caps sg-n 420 px, sg-i 720 px; by content 440 px: sg-fr (any sample: a list, a panel), sg-form, sg-jump,
                sg-tapes; 420 px: sg-tkt, sg-tape; 380 px: sg-cal; 300 px: sg-g, sg-prog; 320 px: sg-seg;
                200 px: sg-wall; 620 px: sg-ws. They also take the page margins off the component they hold.
     basics     sg-sw (colour swatches), sg-mono (a value in mono), sg-ty (type specimen rows), sg-h1, sg-sec,
                sg-rd, sg-rs (display, section head, large and small reading as type samples), sg-wx (weather grid)
     resets     sg-f (figure cells in a box), sg-tg (toggles in a row); notice boxes in a stack (.sg-stack .callout)
   ids with the prefix sg- (sg-data, sg-rows, sg-f-name ...) are hooks of styleguide.js and labels, not classes. ==== */
.sg > section { scroll-margin-top: var(--s-4); }
.sg .sec { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 2px solid var(--deep); }
.sg-j { display: inline-flex; align-items: center; text-decoration: none; }
.sg-h { margin: var(--s-5) 0 var(--s-3); max-width: 720px; }
.sg-h h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--deep); }
.sg-h p, .sg-p { margin-top: 2px; color: var(--ink-secondary); max-width: 720px; }
.sg-sw { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-3); }
.sg-sw li { display: grid; gap: 2px; }
.sg-sw i { height: 56px; border: 1px solid var(--hairline); border-radius: var(--r-sm); }
.sg-sw b { font-size: 14px; color: var(--deep); }
.sg-sw span, .sg-mono { font: 13px var(--font-mono); color: var(--ink-secondary); }
.sg-ls { display: grid; gap: var(--s-2); }
.sg-ls li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); }
.sg-ty > div { display: grid; gap: var(--s-1); padding: var(--s-3) 0; border-top: 1px solid var(--hairline); }
.sg-h1 { font-size: var(--display-size); line-height: 0.98; font-weight: 700; letter-spacing: -0.035em; color: var(--deep); }
.sg .sg-sec { margin: 0; padding: 0; border: 0; }
.sg-rd { font: var(--reading-weight) var(--reading-size)/var(--reading-line) var(--font-mono); letter-spacing: var(--reading-tracking); color: var(--deep); }
.sg-rs { font: var(--reading-sm-weight) var(--reading-sm-size)/var(--reading-sm-line) var(--font-mono); color: var(--deep); }
.sg-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s-3); }
.sg-c { align-items: center; }
.sg-box { min-width: 0; padding: var(--s-4); border-radius: var(--r-md); background: var(--surface-panel); }
.sg-box .ro { margin-top: 0; min-width: 260px; }
.sg-g { width: 300px; max-width: 100%; }
.sg-g .gz { margin-top: 0; }
.sg-f { padding: 0; min-width: 220px; }
.sg-tape { display: grid; gap: var(--s-2); max-width: 420px; }
.sg-wx { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s-3); }
.sg .seg.sg-seg { max-width: 320px; margin: 0; }
.sg .tabs { margin: 0; max-width: 440px; }
.sg-tg .cmp-b, .sg-tg .sl-b, .sg-tg .fav { margin-left: 0; }
.sg-tkt .tkt { margin: 0; }
.sg-tkt .sheet { margin-top: var(--s-3); }
.sg-wall { max-width: 200px; grid-template-columns: minmax(0, 1fr); }
.sg-stack { display: grid; gap: var(--s-3); max-width: 720px; }
.sg-stack .warn, .sg-stack .warn.s4, .sg-stack .sheet-ok-a { margin: 0; }
.sg-stack .sheet-ok-a { min-height: var(--tap); }
.sg .sg-ws { max-width: 620px; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-4) var(--s-2); }
/* width caps by content */
.sg-n, .sg-tkt { max-width: 420px; }
.sg-fr, .sg-jump { max-width: 440px; }
.sg-i { max-width: 720px; }
.sg-cal { max-width: 380px; }
.sg-prog { max-width: 300px; }
.sg-form { flex: 1 1 320px; max-width: 440px; }
.sg-tapes > .tapes { flex: 1 1 280px; max-width: 440px; }
.sg-jump { margin-top: var(--s-3); }
/* resets inside the frame */
.sg .card > .sec { margin: 0 0 2px; padding: 0; border: 0; }
.sg .bul { margin: 0; }
.sg-stack .callout { margin-top: 0; }

/* ==== components: list page (filter panel, filter chips, comparison table) ==== */
/* The controls of "Alle Gebiete" and the comparison table (DESIGN.md, "Component system"; shown live on
   /styleguide/, section 4). Markup: macros search, select, pill, pill_group, panel_pill, filter_chip,
   filter_chips, count_line, to_top, compare_table (templates/macros_list.html). The search field itself is
   .jump (above, with the quick jump of Start); pill, btn and card are defined with the app shell. */

/* ---- control row (ctl): buttons, pills and one select in a row that wraps ---- */
.ctl { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: var(--s-4) 0 var(--s-2); }
.ctl + .sheet { margin: var(--s-2) 0 0; }

/* ---- Auswahl: a labelled select. sel: label above (small: a second line in plain type), select at full width,
   ctl-h: a hint line under it; is-on: a value other than the default is chosen. sort: label beside the select,
   pushed to the end of a control row. ---- */
.sel select, .sort select {
  min-height: var(--tap); padding: 0 var(--s-3); border: 1px solid var(--primary); border-radius: var(--r-full);
  background: var(--surface-base); color: var(--deep); font: 600 15px var(--font-sans);
}
.sort { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
.sort select { max-width: 190px; }
.sheet .sort { margin-left: 0; }
.sel { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
.sel select { width: 100%; }
.sel .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel .label small { display: block; font-size: 11px; font-weight: 400; letter-spacing: 0; text-transform: none; overflow: hidden; text-overflow: ellipsis; }
.sel select.is-on { background: var(--surface-panel); border-color: var(--deep); outline: 1px solid var(--deep); outline-offset: -2px; }
.sel select.is-on:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.ctl-h { display: block; font-size: 12px; line-height: 1.3; color: var(--ink-secondary); }

/* ---- pill variants. pill-i: an icon, a danger level square or a count badge beside the word; pill-k: a short
   code (canton); pill-n: the count badge; pill-x: the filter chip, one active filter with a cross that removes
   it. A pill that opens a panel (aria-expanded) is filled while the panel is open. pills: pills in a list that
   wraps; pills-g: such a list with a label above (fieldset) and an optional hint line. ---- */
.pill-i, .pill-x { display: inline-flex; align-items: center; gap: 6px; }
.pill-i .wxi > svg { width: 20px; height: 20px; }
.pill-i[aria-pressed="true"] .wxi { color: inherit; }
.pill-i .dg { min-width: 22px; height: 22px; padding: 0 4px; font-size: 13px; }
.pill-k { min-width: var(--tap); padding: 0 10px; }
.pill-n {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: var(--r-full); background: var(--primary); color: var(--on-deep); font: 700 12px/1 var(--font-sans);
  font-variant-numeric: tabular-nums;
}
.pill[aria-expanded="true"]:not([aria-pressed="true"]) { background: var(--surface-panel); }
.pill-x { background: var(--surface-panel); border-color: var(--surface-panel); text-align: left; white-space: normal; }
.pill-x > span { font-size: 17px; line-height: 1; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills-g { min-width: 0; border: 0; }
.pills-g legend { margin-bottom: var(--s-1); }
.pills-g .ctl-h { margin-top: var(--s-1); }
@media (hover: hover) {
  .card .pill:not([aria-pressed="true"]):hover { background: var(--track-pale); }
}

/* filter panel. The filter bar (find) of "Alle Gebiete" lays the controls out: search field, the pill that opens
   the panel and "Filter löschen", the panel (fp: the thresholds fp-bar as selects, the pill groups on a panel
   card fp-more), the filter chips and the count line. Phones: the whole panel sits behind "Filter" (badge =
   number of active filters); from 700 px the thresholds always show and the pill groups open with "Mehr Filter"
   (wide.css). find-p / find-w: what only phones / only wider screens show. */
.find .jump, .find .jump input { margin-top: 0; }
.find > .ctl { margin: var(--s-2) 0 0; }
.find-w { display: none; }
.fp { margin-top: var(--s-2); }
.fp.is-js:not(.is-open) { display: none; }
.fp-bar { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: var(--s-3) var(--s-2); align-items: start; }
.fp-more { margin-top: var(--s-3); }
.fp-more .pills-g + .pills-g { margin-top: var(--s-3); }
.find > .pills { margin-top: var(--s-2); }
/* ---- Zähler-Zeile (count): how many entries the filters leave ---- */
.count { margin-top: var(--s-2); font-size: 13px; font-weight: 600; color: var(--ink-secondary); font-variant-numeric: tabular-nums; }
#no-match p + p { margin-top: var(--s-3); }

/* ---- icon button (btn btn-o): the button as a circle with one icon and a spoken name. totop places it as the
   "Nach oben" button in the lower corner, above the tab bar and the compare tray, ringed in the page colour. ---- */
.btn-o { width: var(--tap); padding: 0; }
.btn-o svg { width: 20px; height: 20px; stroke-width: 2; }
.totop {
  position: fixed; right: max(var(--margin-mobile), calc(50% - var(--col-max) / 2 + var(--margin-mobile))); bottom: calc(70px + env(safe-area-inset-bottom, 0px)); z-index: 18;
  border: 2px solid var(--surface-base);
}
html.has-tray .totop { bottom: calc(130px + env(safe-area-inset-bottom, 0px)); }

/* ---- table, comparison variant (tbl tbl-x in card tbl-c tbl-c-x; filled by P.cmpTable, vergleich.js): the
   table (tbl, below) turned. Fixed layout with equal columns; the column heads are the things compared (name
   as a link, small: canton, a remove link), the first cell of a line is its label, cells start at the top, may
   wrap and are left-aligned. From 700 px the head stays in view (wide.css). ---- */
.tbl-c.tbl-c-x { margin-top: var(--s-2); padding: 4px var(--s-2); }
.tbl.tbl-x { table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.tbl.tbl-x th, .tbl.tbl-x td { padding: var(--s-2) 4px var(--s-2) 0; vertical-align: top; text-align: left; white-space: normal; overflow-wrap: break-word; }
.tbl.tbl-x th:last-child, .tbl.tbl-x td:last-child { padding-right: 0; text-align: left; }
.tbl.tbl-x thead th, .tbl.tbl-x thead td { border-top: 0; border-bottom: 2px solid var(--deep); vertical-align: bottom; }
.tbl.tbl-x tbody tr:first-child > * { border-top: 0; }
.tbl.tbl-x thead td, .tbl.tbl-x tbody th { width: 88px; }
.tbl.tbl-x thead th { font: 700 15px/1.2 var(--font-sans); letter-spacing: -0.01em; text-transform: none; color: var(--deep); hyphens: auto; }
.tbl.tbl-x thead a { color: inherit; }
.tbl.tbl-x thead small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--ink-secondary); }
.tbl.tbl-x tbody th { padding-top: 12px; font: var(--label-weight) 10px/var(--label-line) var(--font-sans); letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-secondary); hyphens: manual; }
.tbl.tbl-x td { font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl.tbl-x .nb { white-space: nowrap; font-size: 12px; letter-spacing: -0.03em; }
.tbl.tbl-x .chip { font-size: 13px; gap: 5px; flex-wrap: wrap; }
.tbl.tbl-x .dg { min-width: 22px; height: 22px; font-size: 13px; }
.tbl.tbl-x td .wxi { margin-top: 2px; }
.tbl.tbl-x .wxi-t { flex-wrap: wrap; gap: 2px 6px; }
.tbl.tbl-x td .wxi-t > span { font-size: 13px; }

/* ==== components: forms and Bucket List (form field, card head, progress, friends list) ==== */
/* Shown live on /styleguide/ (templates/sg_forms.html); markup in templates/macros_forms.html, browser twins in
   saisonliste.js (tickHead, listRow, friendPanel) and konto.js (friendRow). Colours from tokens.css only; no
   danger colours, shadows or gradients here. */

/* ---- form (form; macro form): fields one under the other, then the actions (sheet-b) and a status line
   (sheet-ok). On a panel it is "card form"; inside a notice box it stands without one. ---- */
.form { margin-top: var(--s-3); }
.form > .field + .field { margin-top: var(--s-3); }
.form > .fine { margin-top: var(--s-3); }

/* ---- field (field; macros field, field_value, password, error): label above, one input in the look of the
   search field, hint (field-h) and error line (field-e) under it. field-v: a value that is only shown.
   field-mono: a value to copy (the invitation link). field-pw: the input with its show / hide button. ---- */
.field-l { display: block; margin-bottom: var(--s-1); font-size: 13px; font-weight: 600; color: var(--ink-secondary); }
.field input {
  width: 100%; min-width: 0; min-height: 48px; padding: 0 var(--s-4); border: 1px solid var(--primary); border-radius: var(--r-full);
  background: var(--surface-base); font-size: 16px;
}
.field input:focus-visible { border-radius: var(--r-full); }
.field input[aria-invalid="true"] { border-width: 2px; border-color: var(--deep); }
.field-mono input { font: 14px var(--font-mono); }
.field-h { display: block; margin-top: var(--s-1); font-size: 13px; color: var(--ink-secondary); }
.field-v { display: block; font-size: 16px; overflow-wrap: anywhere; }
.field-pw { display: flex; gap: var(--s-2); }
.field-pw input { flex: 1; }
.field-pw .btn-eye { flex: 0 0 auto; width: var(--tap); min-width: var(--tap); padding: 0; justify-content: center; }
.ic-eye-x { display: none; }
.btn-eye[aria-pressed="true"] .ic-eye-x { display: inline; }
.field-e { display: block; margin-top: var(--s-2); padding-left: var(--s-3); border-left: 4px solid var(--deep); font-weight: 600; color: var(--ink-primary); }
.field-e:empty { display: none; }

/* ---- switch (switch; macro switch): one setting, on or off: a checkbox drawn as a track with a knob ---- */
.switch { display: flex; align-items: center; gap: var(--s-3); min-height: var(--tap); margin-top: var(--s-2); font-weight: 600; color: var(--deep); cursor: pointer; }
.switch input {
  flex: 0 0 auto; position: relative; width: 46px; height: 26px; border: 2px solid var(--primary); border-radius: var(--r-full);
  background: var(--surface-base); -webkit-appearance: none; appearance: none; cursor: pointer;
}
.switch input::before { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); }
.switch input:checked { background: var(--primary); }
.switch input:checked::before { left: 23px; background: var(--on-deep); }
.switch input:focus-visible { border-radius: var(--r-full); }
.switch-h { margin-top: 0; }

/* ---- notice box (callout; macro callout): something to know before going on. Neutral: a thin outline.
   callout-care: a step that cannot be taken back, deep blue outline (never a danger colour). ---- */
.callout { margin-top: var(--s-4); padding: var(--s-3) var(--s-4); border: 1px solid var(--primary); border-radius: var(--r-md); }
p.callout { font-weight: 600; color: var(--deep); }
.callout-care { margin-top: var(--s-6); padding-bottom: var(--s-4); border: 2px solid var(--deep); }
.callout > .lead:first-child { margin-top: 0; }

/* ---- account page: where the components stand ---- */
.pg-konto .sec { margin-top: var(--s-5); }
.pg-konto .callout > .sec { margin-top: var(--s-2); }
.pg-konto .empty { margin-top: var(--s-4); }
.pg-konto .empty p + p { margin-top: var(--s-3); }
.pg-konto .sheet-ok + p { margin-top: var(--s-2); }

/* ---- head with tick (sstub-m, sstub-n, sstub-p; macro tick_head, builder tickHead): tick box (sl-chk), name
   with place, "also on the list of" (sl-also), remove button (sl-x), then the perforation. The head of the medium
   tile with tick and of the ticket stub. ---- */
.sstub-m { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-1); align-items: start; padding: var(--s-1) var(--s-1) var(--s-2); }
.sstub-m > .sstub-n:first-child { padding-left: var(--s-3); grid-column: 1 / span 2; }
.sstub-n .row-t a { display: block; padding: 11px 0 2px; color: inherit; text-decoration: none; }
.sstub-n .row-t:not(:has(a)) { padding: 11px 0 2px; }
.sl-also { margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--primary); }
.sl-x { color: var(--primary); }
.sstub-p { position: relative; height: 0; margin: 0 16px; border-top: 2px dotted var(--hairline); }
.sstub-p::before, .sstub-p::after { content: ""; position: absolute; top: -8px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface-base); }
.sstub-p::before { left: -23px; }
.sstub-p::after { right: -23px; }
/* above the stretched link of the name, on open and on ticked cards: a tap on the tick must toggle it, not open the resort */
.tile-tick .sl-chk, .tile-tick .sl-x, .sstub .sl-chk, .sstub .sl-x { position: relative; z-index: 1; }

/* ---- medium tile with tick (tile tile-m tile-tick; macro tile_tick, built by stub()): the open card of the
   Bucket List. The head with tick, then the parts of the medium tile; one more row for the perforation. ---- */
@supports (grid-template-rows: subgrid) {
  .tile-m.tile-tick { grid-row: span 6; }
}
.tile-tick .sstub-n .row-t, .tile-tick .sstub-n .row-t:not(:has(a)) { margin: 11px 0 2px; padding: 0; }
.tile-tick .sstub-n .row-t a { display: inline; padding: 0; }
.tile-tick .sstub-m { padding-bottom: 0; }
.tile-tick .sstub-s { min-height: var(--s-2); padding: 0; }

/* ---- ticket stub (sstub is-done; macro ticket_stub, built by stub()): a ticked resort, dark, with the punched
   hole and its date (sl-date) in the foot (sstub-s). is-new: the hole is punched once (motion block). ---- */
.sstub { position: relative; border-radius: var(--r-md); background: var(--surface-panel); }
.sstub-s { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-1) var(--s-4); padding: var(--s-2) var(--s-4) var(--s-3); }
.sstub.is-done { align-self: start; background: var(--deep); color: var(--on-deep); }   /* keeps its own height beside a taller one */
.sstub.is-done .row-t { color: var(--on-deep); }
.sstub.is-done .rg, .sstub.is-done .sl-also { color: var(--track); }
.sstub.is-done .sstub-p { border-top-color: var(--surface-base); }
.sstub.is-done .sl-chk i { border-color: var(--on-deep); background: var(--on-deep); }
.sstub.is-done .sl-chk i::after { border-color: var(--deep); }
.sstub.is-done .sl-x { color: var(--on-deep); }
.sstub.is-done :focus-visible, .sstub.is-done .sl-chk input:focus-visible ~ i { outline-color: var(--highlight); }
.sstub.is-done .sstub-s { min-height: 44px; padding-right: 52px; }
.sstub.is-done .sstub-s::after { content: ""; position: absolute; right: 18px; top: 50%; width: 20px; height: 20px; margin-top: -12px; border-radius: 50%; background: var(--surface-base); }
.sl-date { font: 13px var(--font-mono); color: var(--track); }

/* ---- progress (macro progress_fig): a figure cell with a tape (tl-tape) under its reading; kom-n places the
   two cells in the level card ---- */
.kom-n { margin-top: var(--s-4); }
.kom-n > .tl-f { padding: 0; }
.kom-n > .tl-f dd { margin-top: 0; }
.tl-f dd.tl-tape { display: block; min-height: 0; margin-top: var(--s-2); padding: 0; }
.tl-tape .tp { display: block; height: 18px; }

/* ---- compact list row (row row-c in rows rows-c; macro list_row, builders listRow and friendRow): the list row
   inside a panel or a narrow column. Name with one small line; a reading with the danger level under it; one
   control. is-done: the small line says "abgehakt". ---- */
.rows-c { margin-top: var(--s-4); }
.rows-c:empty { display: none; }
.card > .rows-c { margin: var(--s-2) 0 calc(-1 * var(--s-2)); border-bottom: 0; }
.row.row-c { grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px var(--s-2); min-height: 60px; padding: var(--s-2) 0; border-radius: 0; background: none; }
.row-c > .row-n { grid-column: 1; grid-row: 1 / span 2; }
.row-c > .row-s { grid-column: 2; grid-row: 1; align-self: end; }
.row-c > .row-d { grid-column: 2; grid-row: 2; justify-self: end; align-self: start; }
.row-c > .row-a { grid-column: 3; grid-row: 1 / span 2; margin-top: 0; }
.row-c .row-t { overflow-wrap: anywhere; }
.row-c .row-s p { display: inline; }
.row-c .row-s p + p { margin-left: 4px; }
.row-c .row-s b { font-size: 20px; }
.row-c .chip { font-size: 13px; }
.row-c .dg { min-width: 22px; height: 22px; font-size: 13px; }
.row-c .sl-b { margin-left: 0; }
.row-c.is-done .rg { font-weight: 600; color: var(--primary); }

/* ---- friend's panel (card; macro friend_panel, builder friendPanel): a panel with a section head (name,
   progress), the level as a small line and compact list rows ---- */
.card > .sec { margin: 0 0 2px; }
.card > .sec h2 { font-size: 20px; overflow-wrap: anywhere; }
#sl-fr { margin-top: var(--s-4); }

@media (hover: hover) and (pointer: fine) {
  .row-c:has(.stretch):hover .row-t { text-decoration: underline; text-underline-offset: 3px; }
}

/* ==== components: app bars and tile variants (bars, compact large tile, figure cell) ==== */
/* Leiste (barx): the one bar of the site. Macro leiste() and its five instances bar_offline, bar_note,
   bar_install, bar_consent, bar_tray (templates/macros.html); shown live on /styleguide/ (sg_shell.html).
   position  in the flow (default) or barx-fix: a bar of the dock at the bottom of the window.
   tone      light on surface-panel (default) or barx-deep.
   slots     barx-in (the row) holds barx-t (text), barx-a (actions) and barx-x (close: the round icon button
             tray-x); barx-m is a status line under the row; barx-w lets the actions wrap under a long text. */
.barx { background: var(--surface-panel); color: var(--deep); border-bottom: 1px solid var(--hairline); }
.barx-in { display: flex; align-items: center; gap: var(--s-2) var(--s-3); min-height: var(--tap); padding: var(--s-1) var(--margin-mobile); }
.barx-t { flex: 1 1 0; min-width: 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.barx-t .label { margin-right: var(--s-1); }
.barx-t .chip { vertical-align: middle; margin-left: var(--s-1); font-size: 13px; }
.barx-t .dg { min-width: 22px; height: 22px; font-size: 13px; }
.barx-a { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.barx-x { margin-right: calc(var(--s-1) - var(--margin-mobile)); }
.barx-m { padding: 0 var(--margin-mobile) var(--s-2); font-size: 13px; }
.barx-m:empty { display: none; }
/* a long text: it keeps a readable width and the actions wrap under it */
.barx-w > .barx-in { flex-wrap: wrap; padding-block: var(--s-3); }
.barx-w .barx-t { flex-basis: 280px; font-weight: 400; }
.barx-w .barx-t b { font-weight: 600; }
/* tone: deep */
.barx-deep { background: var(--deep); color: var(--on-deep); border-bottom: 0; }
.barx-deep .label { color: var(--track-pale); }
.barx-deep a:not(.btn) { color: var(--on-deep); }
.barx-deep .btn { background: var(--on-deep); border-color: var(--on-deep); color: var(--deep); }
.barx-deep .btn-2 { background: none; color: var(--on-deep); }
.barx-deep :focus-visible { outline-color: var(--highlight); }
/* position: the bars of a page stand in the flow; a bar after the content keeps its distance from it */
main + .barx { margin-top: var(--s-5); border-top: 1px solid var(--hairline); }
html[data-offline] .barx[data-net][hidden] { display: block !important; }   /* served from the cache: shown before any script runs */
/* position: fixed. The dock holds every fixed bar and stacks them above the tab bar (59 px on phones), so two
   bars never cover each other or the navigation; body keeps room for the compare tray, as before. */
.barx-dock { position: fixed; left: 0; right: 0; bottom: calc(59px + env(safe-area-inset-bottom, 0px)); z-index: 19; }
.barx-fix { border-top: 2px solid var(--highlight); }
.barx-fix > .barx-in { min-height: 56px; }
html.has-tray body { padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px)); }

/* ==== components: resort page (window day row, bulletin block, link tile, station row, table) ==== */
/* The components of a resort page (DESIGN.md, "Component system"; shown live on /styleguide/, section 5).
   Markup: macros day_row, day_scale, day_state, fig_line, bulletin_block, link_tile, station_row, table,
   review_table (templates/macros_gebiet.html). The resort ticket (macro ticket_head) keeps its own block above. */

/* ---- window day row (day): one day of "Das Fenster." in a panel (card fen). Weekday and date, new snow figure
   and kind, the tape on the shared scale, danger state, temperature and wind. day sch: the scale above the rows.
   is-sel: the day chosen on Start (app.js). fen-st: the one danger state all days share, above the panel. ---- */
.fen { padding: 6px 14px 4px; }
.day { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding: 11px 0 12px; border-top: 1px solid var(--hairline); }
.day.sch { border-top: 0; padding: 4px 0 0; }
.day.sch small { text-align: right; padding-right: 2px; margin: 0; }
.day.sch + .day { border-top: 0; padding-top: 4px; }
.day .d { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: var(--deep); }
.day .d small { display: block; font: 12px var(--font-mono); letter-spacing: 0; color: var(--ink-secondary); margin-top: 2px; }
.day .d em { display: block; font-style: normal; font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--primary); }
.day .d .wxi { display: flex; margin-top: 6px; }
.day .d .wxi svg { width: 24px; height: 24px; }
.day .l1 { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3px; }
.day .l1 .cm b { font: var(--reading-weight) 28px/1 var(--font-mono); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--deep); }
.day .l3 { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 2px var(--s-2); margin-top: 6px; min-height: 28px; }
.day .l3 .chip { font-size: 14px; gap: 6px; }
.day .l3 .dg { min-width: 22px; height: 22px; font-size: 14px; padding: 0 4px; }
.day .wx { color: var(--ink-secondary); white-space: nowrap; margin-left: auto; }
.day .wx b { font: var(--reading-sm-weight) 14px/var(--reading-sm-line) var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; color: var(--ink-primary); }
.day .wx .unit { font-size: 11px; }
.day.is-sel { margin-inline: -8px; padding-inline: 8px; background: var(--surface-base); border-radius: var(--r-sm); border-top-color: var(--surface-base); border-left: 3px solid var(--primary); }
.day.is-sel + .day { border-top-color: var(--surface-panel); }
.fen-st { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s-2); margin: calc(-1 * var(--s-1)) 2px var(--s-3); }

/* ---- figure line (fig-line): label, mono figure and unit in one line under a panel ---- */
.fig-line { margin: var(--s-3) 2px 0; display: flex; align-items: baseline; gap: var(--s-2); }
.fig-line b { font: var(--reading-sm-weight) var(--reading-sm-size)/var(--reading-sm-line) var(--font-mono); color: var(--deep); }
.fig-line + .fig-line { margin-top: var(--s-1); }

/* ---- bulletin block (bul): the level the SLF issued, on deep blue, with the way to the bulletin. States: valid
   level (bul-lv), a plain line for expired / not rated / no bulletin (bul-st). val: issue and validity. ---- */
.bul { background: var(--deep); color: var(--on-deep); border-radius: var(--r-md); padding: var(--s-4); margin: var(--s-6) 0 var(--s-2); }
.bul :focus-visible { outline-color: var(--highlight); }
.bul .kick { color: var(--highlight); }
.bul-lv { margin-top: var(--s-3); }
.bul .chip { color: var(--on-deep); font-size: 21px; font-weight: 700; letter-spacing: -0.02em; gap: var(--s-3); }
.bul .dg { min-width: 32px; height: 32px; font-size: 18px; }
.bul-st { margin-top: var(--s-3); font-size: 19px; font-weight: 600; line-height: 1.25; }
.bul .state { color: var(--on-deep); font-size: 19px; }
.val { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--primary); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.note { font-size: 14px; }   /* a plain remark under a figure or a map; also under the terrain map (card-map + note) */
.bul .note { margin-top: var(--s-1); }
.bul-ref { margin-top: var(--s-3); color: var(--on-deep); }
.bul-a .bul-go { background: var(--on-deep); color: var(--deep); padding: 0 var(--s-4); border-radius: var(--r-full); }
.bul-a a { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); margin-top: var(--s-2); color: var(--on-deep); font-weight: 600; }

/* ---- link tile (tile tile-m tile-link): the medium tile shell as one outbound link, a list item of grid-m.
   Surface, radius, hover and focus come from the shell (block "tiles"); the tile adds only its content: icon,
   title, one line, arrow. In one column (phones) the parts stand in a row, from two columns on the icon and the
   arrow stand above the text. ---- */
.tile-m.tile-link { display: flex; grid-row: auto; }
.tlk { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); width: 100%; min-height: 72px; padding: var(--s-3) var(--s-4); color: var(--ink-primary); }
.live-i { flex: 0 0 auto; width: 32px; height: 32px; fill: none; stroke: var(--primary); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.live-i2 { stroke: var(--highlight); }
.tlk-x { display: grid; gap: 2px; min-width: 0; }
.tlk-x b { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; color: var(--deep); }
.tlk-x span { font-size: 13px; line-height: 1.35; color: var(--ink-secondary); }
.tlk-o { font-size: 18px; font-weight: 600; color: var(--primary); }
.live .fine { margin-top: var(--s-2); }
@media (min-width: 520px) {
  .tlk { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr; align-items: start; gap: var(--s-3) var(--s-2); padding: var(--s-4); }
  .tlk .live-i { grid-column: 1; grid-row: 1; }
  .tlk-o { grid-column: 2; grid-row: 1; line-height: 1; }
  .tlk-x { grid-column: 1 / -1; grid-row: 2; }
}

/* ---- station row (st-row): a measuring station in a panel list (card st-rows). Name and facts on the left, two
   figure cells (macro fig) on the right, right-aligned, the kind word under its figure. ---- */
.st-rows { padding: 2px 14px; }
.st-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--hairline); }
.st-row:first-child { border-top: 0; }
.st-t { font-size: 17px; font-weight: 600; color: var(--deep); }
.st-row .rg { font-size: 13px; }
.st-f { display: grid; grid-template-columns: auto auto; gap: var(--s-4); text-align: right; }
.st-f dt { font-size: 11px; }
.st-f b { font: var(--reading-sm-weight) var(--reading-sm-size)/var(--reading-sm-line) var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--deep); }
.st-f .kind { display: block; }

/* ---- table (tbl): the one data table, in a panel (card tbl-c). Column heads are labels, the first cell of a
   row is its heading (small: date, em: "heute"), figures in mono with their unit, the kind word under its
   figure, the last column right-aligned. tbl-w: a cell that may wrap (weather word, running text). ---- */
.tbl-c { padding: 4px 14px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 7px 6px 7px 0; border-top: 1px solid var(--hairline); text-align: left; vertical-align: middle; }
.tbl thead th { border-top: 0; font: var(--label-weight) 10px/var(--label-line) var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-secondary); }
.tbl tbody th { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: var(--deep); white-space: nowrap; }
.tbl tbody th small { display: block; font: 12px var(--font-mono); letter-spacing: 0; color: var(--ink-secondary); }
.tbl tbody th em { display: block; font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--primary); }
.tbl td { font-size: 14px; white-space: nowrap; }
.tbl td b { font: var(--reading-sm-weight) 18px/1.1 var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--deep); }
.tbl td .kind { display: block; font-size: 10px; letter-spacing: 0.03em; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; text-align: right; }
.tbl .tbl-w { white-space: normal; }
.tbl-w .wxi-t > span { font-size: 13px; font-weight: 500; }

/* ==== components: media and dashboard (video card, dashboard panels) ==== */
/* Shown live on /styleguide/ (templates/sg_media.html); markup in templates/macros_media.html, browser twins
   P.hitRow and P.tapeRow in app.js. Colours from tokens.css only; no danger colours, shadows or gradients here. */

/* ---- video card (tile tile-m tile-video; macro video_card): the medium tile shell with the thumbnail on top,
   the title on two lines, channel and date. A list item of the medium grid (five per row on desktop).
   Parts: th (thumbnail; th-on once videos.js has put the player in), play (the mark), tl-h / tl-t / rg (head of
   the medium tile), tv-o (link to YouTube at the foot). ---- */
.tile-m.tile-video { display: flex; grid-row: auto; gap: 0; scroll-margin-top: var(--s-4); }
.th { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-md) var(--r-md) 0 0; background: var(--deep); }
.th img, .th iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.th::before { content: ""; position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 2px solid var(--track); }
.th::after { content: ""; position: absolute; left: 50%; top: 50%; margin: -9px 0 0 -5px; border-left: 15px solid var(--track); border-top: 9px solid var(--deep); border-bottom: 9px solid var(--deep); }
.th img { z-index: 1; }
.th .play { position: absolute; z-index: 2; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: var(--deep); border: 2px solid var(--on-deep); }
.th .play::after { content: ""; position: absolute; left: 16px; top: 12px; border-left: 15px solid var(--on-deep); border-top: 9px solid var(--deep); border-bottom: 9px solid var(--deep); }
.th-on::before, .th-on::after { display: none; }
a.th:focus-visible { outline-offset: -3px; }
.tile-video .tl-t { font-size: 15px; font-weight: 600; line-height: 1.25; }
.tile-video > .tl-h:last-child { padding-bottom: var(--s-4); }
.tv-o { margin-top: auto; padding: var(--s-1) var(--s-4) var(--s-2); }
/* the open card: the whole row, the player across the full width; later cards fill the row it left */
.vids { grid-auto-flow: dense; }
.tile-video.is-open { grid-column: 1 / -1; scroll-margin-top: var(--s-3); }
.tile-video.is-open .th { max-height: 78vh; }
.tile-video.is-open .tl-t { font-size: 20px; -webkit-line-clamp: unset; display: block; }
.tile-video.is-open .tv-o { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); margin-top: 0; }
.vids { margin-top: var(--s-4); }
/* vids-1 (Start teaser): one row of cards, so only as many as stand in a row are shown */
@media (max-width: 519.98px) { .vids-1 > :nth-child(n+2) { display: none; } }
@media (min-width: 520px) and (max-width: 699.98px) { .vids-1 > :nth-child(n+3) { display: none; } }

/* ---- search result row (hits > li > .hit; builder P.hitRow): name with one small line, a link (Start) or a
   button (quick add). jump-r is the list of Start, whose template still carries the old class name. ---- */
.hits, .jump-r { margin-top: var(--s-2); border-bottom: 1px solid var(--hairline); }
.hit { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; width: 100%; min-height: 52px; padding: var(--s-1) 0; border: 0; border-top: 1px solid var(--hairline); background: none; color: var(--deep); font-size: 17px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.hit small { font-size: 13px; font-weight: 400; color: var(--ink-secondary); }

/* ---- quick add (card add): a panel with the search field (.jump), a date field and one button; the hits under
   it are search result rows ---- */
.add { margin-top: var(--s-2); }
.add-f { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-2); margin-top: var(--s-2); }
.add-f .jump, .add-f .jump input { min-width: 0; margin-top: 0; }
.add-q { grid-column: 1 / -1; }
/* the date field keeps the look and height of the other fields on iOS too, where a native date input is
   lower, centred and wider than its box */
.add-d { min-width: 0; margin: 0; }
.add-d input { box-sizing: border-box; display: flex; align-items: center; width: 100%; min-width: 0; height: 48px; padding: 0 var(--s-3); line-height: 46px; -webkit-appearance: none; appearance: none; text-align: left; }
/* Safari on iOS draws the value in its own box at the top of the field: give it the field's height */
.add-d input::-webkit-date-and-time-value { display: block; min-height: 46px; margin: 0; line-height: 46px; text-align: left; }
.add-f .btn { min-height: 48px; white-space: nowrap; }
.add .sheet-ok-a { min-height: var(--tap); background: var(--surface-base); }
.add ~ .empty { margin-top: var(--s-4); }

/* ---- figure cells on a panel (dl.tl-f in a card): no tile padding; figs-2 stands two cells in a row ---- */
.card > .tl-f, .card > div > .tl-f { padding: 0; }
.card > .tl-f dd { margin-top: 0; }   /* readings start on one line, with or without an addition */
.tl-f.figs-2 > div { flex-basis: 40%; }
.tl-f dd:has(> .kind:empty) > .kind { display: none; }

/* ---- Saisonkalender (cal; macros cal_month and cal_key, filled by logbuch.js): one small grid per month, a
   cell per day. Cell states: is-on ski day, is-pow powder day (with is-on), is-now today, is-far after today. ---- */
.cal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.cal-t { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--s-1); font-size: 13px; font-weight: 700; color: var(--deep); }
.cal-t b { font: 13px var(--font-mono); color: var(--primary); }
.cal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-w { font: 600 9px/1.8 var(--font-sans); text-align: center; color: var(--ink-secondary); }
.cal-c { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: var(--r-sm); background: var(--surface-panel); font: 10px/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink-secondary); }
.cal-c0, .cal-c.is-far { background: none; }
.cal-c.is-far { color: var(--hairline); }
.cal-c.is-on { background: var(--primary); color: var(--on-deep); font-weight: 700; }
.cal-c.is-pow { background: var(--deep); }
.cal-c.is-pow::after { content: ""; position: absolute; top: 2px; right: 2px; width: 4px; height: 4px; border-radius: var(--r-full); background: var(--highlight); }
.cal-c.is-now { outline: 2px solid var(--deep); outline-offset: 1px; }
.cal-key { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); margin-top: var(--s-3); font-size: 12px; color: var(--ink-secondary); }
.cal-key li { display: flex; align-items: center; gap: 6px; }
.cal-key .cal-c { width: 16px; }

/* ---- tape rows (tapes > li.tape-r; builder P.tapeRow): label, tape (.tp), count. tapes-s: the label stands
   above the tape (long names). ---- */
.tapes { display: grid; gap: var(--s-2); }
.tape-r { display: grid; grid-template-columns: 44px minmax(0, 1fr) 32px; align-items: center; gap: var(--s-3); }
.tape-r .tp { display: block; }
.tape-l { font-size: 14px; font-weight: 600; color: var(--deep); overflow-wrap: anywhere; }
.tape-n { font: var(--reading-sm-weight) 18px/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--deep); text-align: right; }
.tapes-s .tape-r { grid-template-columns: minmax(0, 1fr) 32px; gap: 0 var(--s-3); }
.tapes-s .tape-l { grid-column: 1 / -1; display: flex; align-items: flex-end; min-height: 36px; padding-bottom: var(--s-1); font-size: 15px; }
.tapes-s a.tape-l { text-underline-offset: 3px; }

/* ---- split bar (split): two shares of one total as one bar; split-k is the key square beside a label ---- */
.split { display: flex; gap: 2px; height: 14px; margin-bottom: var(--s-3); }
.split span { flex: 1 1 0; min-width: 4px; border-radius: 2px; }
.split-a { background: var(--deep); }
.split-b { background: var(--track); }
.split-k { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; }

/* ---- the Logbuch dashboard lays these components out: ds the page grid, ds-top the panel with the ski-day
   gauge (large gauge, .gz) and the headline figures ---- */
.ds { margin-top: var(--s-5); }
.ds-g .gz { display: block; height: auto; }
.ds-next { margin-top: var(--s-2); font-weight: 600; color: var(--deep); text-align: center; }
.ds-top > .tl-f { margin-top: var(--s-5); }
@media (hover: hover) and (pointer: fine) {
  .hit:hover { background: var(--surface-panel); }
  .card .hit:hover { background: var(--surface-base); }
  .tile-video:hover .tl-t { text-decoration: underline; text-underline-offset: 3px; }
}

/* ==== component: tiles (large, medium) and their grids ==== */
/* Anything that shows one resort or one day as a card is one of two tiles on one of two grids (DESIGN.md,
   "Component system"; shown live on /styleguide/). There is no third size.
   Markup: macros tile_l, tile_m, tile_day (templates/macros.html); in the browser P.tileL and P.tile (app.js).
   grid-l  large tiles: one column, two from 780 px, three from 1180 px (wide.css).
   grid-m  medium tiles: one column, two from 520 px, three from 700 px, five from 1180 px (wide.css). In a
           narrower column (beside a map) the same tile keeps its minimum width and fewer stand in a row.
   grid-m-5  the five-day strip: always its five columns, because it is always exactly five days. */
.grid-l, .grid-m { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
@media (min-width: 520px) {
  .grid-m { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.grid-m.grid-m-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }

/* the shell both sizes share */
.tile { position: relative; min-width: 0; background: var(--surface-panel); }
.tile:has(.stretch:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }
.tile.is-on { outline: 2px solid var(--primary); outline-offset: -2px; }   /* the day shown on the page */
@media (hover: hover) and (pointer: fine) {
  .tile:has(.stretch):hover { outline: 2px solid var(--primary); outline-offset: -2px; }
}

/* ---- large tile (tile-l): the Top card. Head (rank optional), full gauge, kind and station, two rows of
   cells, danger row, links and toggles. ---- */
.slot { min-width: 0; }
.tile-l { border-radius: var(--r-lg); padding: var(--s-4); }
.who { display: flex; gap: var(--s-3); align-items: flex-start; }
.rk { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--primary); }
.who .rk { font-size: 30px; line-height: 1; letter-spacing: -0.04em; padding-top: 1px; }
.nm {
  font-size: 21px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: var(--deep); overflow-wrap: break-word; hyphens: manual;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.who > div { min-width: 0; }
.tile-l .kind-c { margin-top: var(--s-1); }
.src { margin-top: var(--s-1); font-size: 12px; color: var(--ink-secondary); }
.src-c { text-align: center; }
/* cells: current snow depth and weather, then wind and temperature. One figure cell for both tiles (macros fig
   and fig_wx, figCell() in app.js): div[data-f] > dt + dd; a missing value is a dash with hidden text. */
.ro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--s-4); margin-top: var(--s-4); }
.ro > div { border-top: 1px solid var(--hairline); padding-top: var(--s-2); }
.ro-d b { font-size: 34px; font-weight: var(--reading-weight); line-height: 1; letter-spacing: -0.03em; }
.ro-d .kind { display: block; margin-top: 2px; }
.ro-s { margin-top: 2px; font-size: 12px; line-height: 1.3; color: var(--ink-secondary); }
.ro-w { display: flex; align-items: center; min-height: 36px; }
.ro-w .wxi { gap: 0 var(--s-2); flex-wrap: wrap; }
.ro-w .wxi-t > span { overflow-wrap: anywhere; }
.ro-w + .kind { margin-top: 2px; }
.ro-w .wxi svg { width: 36px; height: 36px; stroke-width: 1.5; }
.ro-w .wxi-t > span { font-size: 17px; }
.dr {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2) var(--s-3);
  margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--hairline); min-height: 37px;
}
/* links and toggles: own tap targets above the stretched link of the name */
.acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--s-3); margin: var(--s-1) 0 calc(-1 * var(--s-2)); }
.acts-b { display: flex; align-items: center; margin-left: auto; }   /* the toggles stay together when the row wraps */
.acts-b > :first-child { margin-left: 0; }

/* ---- medium tile (tile-m): the compact card. Head, small gauge, danger, figure cells. The rows of a tile sit
   on the grid of the list (subgrid), so the parts line up across the tiles of a row. ---- */
.tile-m { display: flex; flex-direction: column; gap: var(--s-3); border-radius: var(--r-md); }
@supports (grid-template-rows: subgrid) {
  .tile-m { display: grid; grid-template-rows: subgrid; grid-row: span 5; }
}
.tl-h { min-width: 0; padding: var(--s-3) var(--s-4) 0; }
.tl-t, .tile-m .row-t {
  font-size: 17px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; color: var(--deep); overflow-wrap: break-word; hyphens: manual;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.tile-m .rg { margin-top: 2px; font-size: 13px; }
/* with a rank (Start, ranks 2 and 3): the number stands left of name and place */
.tl-h:has(> .rk) { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s-3); align-items: start; align-content: start; }
.tl-h > .rk { grid-row: span 2; font-size: 26px; line-height: 1; letter-spacing: -0.04em; padding-top: 1px; }
.tl-g { padding: 0 var(--s-4); text-align: center; }
.gz-t { display: block; width: 150px; max-width: 100%; height: auto; margin: 0 auto; }
.gz-t .nu { font-size: 40px; letter-spacing: -0.03em; }
.gz-t .lb { font-size: 10px; }
.gz-t .tk, .gz-t .tkm { stroke-width: 1; }
.tl-u { margin-top: 2px; font: var(--label-weight) 11px/var(--label-line) var(--font-sans); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-secondary); }
.tl-g .kind { min-height: 16px; color: var(--primary); }
/* two cells side by side; in a tile too narrow for both (beside a map at 1180 px) they stand one above the other */
.tl-f { display: flex; flex-wrap: wrap; align-content: flex-start; gap: var(--s-2) var(--s-3); padding: 0 var(--s-4); }
.tl-f > div { flex: 1 1 0; display: flex; flex-direction: column; min-width: min-content; border-top: 1px solid var(--hairline); padding-top: 6px; }
.tl-f dt { font-size: 10px; letter-spacing: 0.04em; }
.tl-f dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 5px; min-height: 28px; margin-top: auto; padding-top: 2px; }
.tl-f b { font: var(--reading-sm-weight) 20px/1.2 var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--deep); white-space: nowrap; }
.tl-f .unit, .tl-f .kind { font-size: 10px; letter-spacing: 0.04em; }
/* weather: icon above its word, so the word has the whole cell ("Starker Schneefall" in a narrow tile) */
.tl-f .wxi { flex-direction: column; align-items: flex-start; gap: 0; min-width: 0; }
.tl-f .wxi svg { width: 24px; height: 24px; }
.tl-f .wxi-t > span { font-size: 13px; overflow-wrap: break-word; hyphens: auto; }
.tl-f-k b { font-size: 26px; font-weight: var(--reading-weight); letter-spacing: -0.03em; }
.tl-f-s dd { min-height: 0; }
.tl-f-s b { font-size: 16px; }
/* on the deep surface (tl-f-deep; the resort ticket, macro fig_deep): two cells per row across the ticket's lower
   part, label in track, reading 26 px in on-deep with unit and addition in one line, the weather icon beside
   its word in its on-deep form. Each rule answers the rule of .tl-f above it. */
.tl-f-deep { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 0 var(--s-4); padding: 0; }
.tl-f-deep > div { display: block; min-width: 0; border-top-color: var(--primary); padding-top: var(--s-2); }
.tl-f-deep dt { font-size: var(--label-size); letter-spacing: var(--label-tracking); }
.tl-f-deep dd { display: block; min-height: 30px; margin-top: 2px; padding-top: 0; }
.tl-f-deep b { font: var(--reading-sm-weight) 26px/1.15 var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; color: inherit; white-space: normal; }
.tl-f-deep .unit, .tl-f-deep .kind { font-size: var(--label-size); }
.tl-f-deep .unit { color: var(--on-deep); }
.tl-f-deep .kind { letter-spacing: var(--label-tracking); color: var(--track); }
.tl-f-deep .wxi { flex-direction: row; align-items: center; gap: 6px; min-width: auto; color: var(--highlight); }
.tl-f-deep .wxi svg { width: 28px; height: 28px; }
.tl-f-deep .wxi-t > span { font-size: 17px; color: var(--on-deep); overflow-wrap: inherit; hyphens: inherit; }
.tl-d { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px var(--s-2); min-height: 37px; margin: 0 var(--s-4); padding-top: var(--s-2); border-top: 1px solid var(--hairline); }
.tl-d .chip { font-size: 14px; }
.tl-d .dg { min-width: 22px; height: 22px; font-size: 14px; }
.tile-m > .tl-d:last-child, .tile-m > .tl-f:last-child { padding-bottom: var(--s-4); }

/* ---- Start, Top 3: rank 1 is the large tile at every width; ranks 2 and 3 are large tiles from 1180 px
   (wide.css) and medium tiles below. Both forms stand in the list item of their rank (slot-l, slot-m) and
   exactly one is displayed. From 520 px the two medium tiles stand side by side under rank 1. ---- */
.slot > .tile-l.slot-l { display: none; }
.slot:has(> .slot-m) { display: flex; flex-direction: column; }
.slot > .slot-m { flex: 1; padding-bottom: var(--s-4); }
@media (min-width: 520px) and (max-width: 779.98px) {
  .top.grid-l { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top.grid-l > .slot:first-child { grid-column: 1 / -1; }
}

/* ---- medium tile, day variant (tile-m ol-c): one day of the five-day outlook: weekday, bar, figure, resort ---- */
.tile-m.ol-c { display: flex; grid-row: auto; align-items: center; gap: 2px; padding: var(--s-2) 3px; text-align: center; }
.ol-d { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; min-height: var(--tap); color: var(--deep); text-decoration: none; border-radius: var(--r-sm); }
.ol-d > b { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.ol-d > small { font: 11px var(--font-mono); color: var(--ink-secondary); }
.ol-b { width: 22px; height: 52px; margin: var(--s-1) 0 2px; }
.ol-b .ob { fill: var(--track-pale); }
.ol-b .of { fill: var(--primary); }
.ol-n { white-space: nowrap; }
.ol-n b { font: var(--reading-sm-weight) 20px/1 var(--font-mono); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--deep); }
.ol-n .unit { font-size: 10px; }
.ol-g .kind { font-size: 10px; letter-spacing: 0.02em; }
.ol-k { font-size: 11px; line-height: 1.25; color: var(--ink-secondary); margin-top: 2px; }
.ol-k b { color: var(--deep); }
.ol-t { width: 100%; font-size: 11.5px; line-height: 1.2; font-weight: 600; color: var(--deep); overflow-wrap: break-word; hyphens: auto; }
.ol-t a { display: flex; align-items: center; justify-content: center; min-height: var(--tap); }

/* ---- tiles (Favoriten, Bucket List) ---- */

/* the lists on the Bucket List change above and below the reader: the browser must not re-anchor the view to a moved card */
.pg-saisonliste { overflow-anchor: none; }

/* ---- resort list: canton headings, rows shown step by step ---- */
.row-g { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); padding: var(--s-5) 0 var(--s-2); border-bottom: 2px solid var(--deep); grid-column: 1 / -1; list-style: none; }
.row-g:first-child { padding-top: var(--s-2); }
.row-gt { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--deep); }
.row-gn { font: 600 13px var(--font-mono); color: var(--ink-secondary); }
.rows-more { display: flex; justify-content: center; margin-top: var(--s-4); }

/* ---- legal pages, footer links (the consent notice is a bar: "components: app bars") ---- */
.foot-l { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); }
/* language switch in the footer (phones only, see wide.css): four short codes, the current one bold, not a link */
.foot-lang ul { display: flex; gap: var(--s-1); margin: var(--s-2) 0 0; padding: 0; list-style: none; }
.foot-lang a, .foot-lang span { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); font: var(--label-weight) 13px/1 var(--font-sans); letter-spacing: 0.06em; }
.foot-lang span { color: var(--deep); font-weight: 700; }
.foot-b { min-height: var(--tap); padding: 0; border: 0; background: none; font: inherit; color: var(--ink-secondary); text-decoration: underline; cursor: pointer; }

/* ==== phone review 2026-11-18 (Regis, on an iPhone) ==== */
/* status bar tint of Safari on iOS 26: see base.html */
.edge { position: fixed; inset: 0 0 auto 0; z-index: 60; height: 6px; background: var(--deep); pointer-events: none; }
@media (min-width: 1180px) { .edge { display: none; } }   /* the rail stands at the left there */
/* Alle Gebiete: air between the ruler and the search field */
.pg-gebiete .hd + .find, .pg-gebiete .find { margin-top: var(--s-4); }
/* Bucket List: share and sort stand on one line, at the two edges */
.pg-saisonliste .ctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-3); }
.pg-saisonliste .ctl[hidden] { display: none; }
.pg-saisonliste .ctl .sort { margin: 0 0 0 auto; }
/* Deine Kristalle on a phone: one small row under the lift; the state word is read out, not shown */
@media (max-width: 699.98px) {
  .kom-ws { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-1); }
  .kom-ws .crest { max-width: 40px; margin-bottom: 2px; }
  .kom-ws b { font-size: 9.5px; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
  .kom-ws span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .kom-ws li { position: relative; }
  .kom-wt { font-size: 17px; }
}
/* ==== end ==== */

/* ---- dashboard (Skitage) ---- */

/* day medals (the other parts of the dashboard: see "components: media and dashboard"): round medal on a ribbon; open ones are a dashed outline */
.md { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); }
.md-m { display: grid; justify-items: center; align-content: start; gap: 2px; text-align: center; color: var(--ink-secondary); }
.md-svg { width: 100%; max-width: 64px; height: auto; margin-bottom: var(--s-1); }
.md-m b { font-size: 13px; font-weight: 600; line-height: 1.2; }
.md-m span { font: var(--label-weight) 10px/1.2 var(--font-sans); letter-spacing: 0.04em; text-transform: uppercase; }
.md-r, .md-d { fill: var(--surface-base); stroke: var(--primary); stroke-width: 1.25; stroke-dasharray: 3 3; stroke-linejoin: round; }
.md-i { fill: none; stroke: none; }
.md-n { fill: var(--ink-secondary); font: 400 20px var(--font-mono); font-variant-numeric: tabular-nums; }
.md-m.is-on { color: var(--deep); }
.md-m.is-on b { font-weight: 700; }
.md-m.is-on .md-r, .md-m.is-on .md-d { stroke: none; stroke-dasharray: none; }
.md-m.is-on .md-r1 { fill: var(--primary); }
.md-m.is-on .md-r2 { fill: var(--highlight); }
.md-m.is-on .md-d { fill: var(--deep); }
.md-m.is-on .md-i { stroke: var(--highlight); stroke-width: 1.5; }
.md-m.is-on .md-n { fill: var(--on-deep); }
