/* Self-hosted Nordic typography: IBM Plex Sans (UI & editorial) + IBM Plex Mono (clocks, metrics, timetables).
   Served locally from app/fonts/ with zero third-party requests. Latin covers full Norwegian (ÆØÅæøå); latin-ext loads on demand for Sámi glyphs. */
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
}

/* RundtNorge. Colours are set by the theme (js/theme.js); these are the Fjord defaults. */
:root {
  --bg: #08131c;
  --surface: #0d1b26;
  --surface2: #132533;
  --raise: rgba(140, 190, 225, 0.06);
  --raise2: rgba(140, 190, 225, 0.12);
  --line: rgba(140, 190, 225, 0.14);
  --text: #e6eef3;
  --muted: #8fa6b7;
  --dim: #829aab; /* faint text: raised to 4.5:1 contrast on every background (WCAG AA) */
  --accent: #5cc8ff;
  --accent-ink: #03141f;
  --accent-soft: rgba(92, 200, 255, 0.14);
  --accent-line: rgba(92, 200, 255, 0.44);
  --accent2: #4fd1c5;
  --good: #45d08a;
  --warn: #ffc145;
  --bad: #ff5c5c;
  --shadow: rgba(0, 6, 12, 0.48);
  --scrim: rgba(4, 10, 16, 0.58);
  --mapbg: #021619;
  --badge-ink: #08131c;

  --head: 50px;
  --rail: 68px;
  --drawer: 340px;
  --r: 6px;
  --font: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --display: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="midnattssol"], :root[data-theme="sjokart"] { --badge-ink: #ffffff; }
/* the logo's dot: ice blue; a deeper ice blue on the light themes, where the light one would fade into the paper */
:root { --logo-dot: #5cc8ff; }
:root[data-theme="midnattssol"], :root[data-theme="sjokart"] { --logo-dot: #1f8fd6; }

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
  font: 13.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; stroke: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--raise2); border-radius: 3px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
kbd {
  display: inline-block; min-width: 21px; text-align: center; padding: 1px 5px; border-radius: 3px;
  border: 1px solid var(--line); background: var(--raise); font: 500 11px var(--mono); color: var(--muted);
}

/* ---------- brand ---------- */
.logo { width: 25px; height: 25px; min-width: 25px; color: var(--text); flex: none; }
.logo.big { width: 42px; height: 42px; }
.wordmark { font: 400 17.5px/1 var(--display); letter-spacing: -0.02em; color: var(--text); white-space: nowrap; }
.wordmark b { font-weight: 700; }

/* ---------- title bar: logo, search, clock (window buttons sit on the right) ---------- */
#titlebar {
  position: fixed; inset: 0 0 auto 0; height: var(--head); z-index: 30;
  display: grid; grid-template-columns: 1fr minmax(280px, 540px) 1fr; align-items: center; gap: 16px; padding: 0 150px 0 16px;
  background: var(--bg); border-bottom: 1px solid var(--line);
  -webkit-app-region: drag; user-select: none;
}
body.fullscreen #titlebar { padding-right: 16px; }
body.touring .search, body.touring .hc-state { visibility: hidden; }
#titlebar button, #titlebar input, .search-results { -webkit-app-region: no-drag; }
.brand { display: flex; align-items: center; gap: 9px; }
.hright { justify-self: end; display: flex; align-items: center; gap: 14px; }
.hclock { display: flex; align-items: center; gap: 9px; -webkit-app-region: no-drag; }
.hlang { margin: 0; -webkit-app-region: no-drag; }
.hlang button { flex: none; padding: 3px 8px; font: 600 11px var(--mono); letter-spacing: 0.03em; }
body.touring .hlang { visibility: hidden; }
#clock { font: 500 15px var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.hc-state { display: inline-flex; align-items: center; gap: 6px; font: 600 11px var(--font); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.hc-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--good) 22%, transparent); }
body.replaying .hc-state { color: var(--warn); }
body.replaying .hc-state::before { background: var(--warn); box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--warn) 22%, transparent); }

.search { position: relative; display: flex; align-items: center; }
.search > svg { position: absolute; left: 11px; width: 15px; height: 15px; color: var(--dim); pointer-events: none; }
.search input {
  width: 100%; height: 34px; padding: 0 34px 0 35px; border-radius: 5px; border: 1px solid var(--line);
  background: var(--surface); outline: none; transition: border-color 0.15s, background 0.15s;
}
.search input:focus { border-color: var(--accent-line); background: var(--surface2); }
.search input::placeholder { color: var(--dim); }
.search kbd { position: absolute; right: 8px; pointer-events: none; }
.search-results {
  position: absolute; top: 40px; left: 0; right: 0; max-height: 460px; overflow: auto; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 32px var(--shadow);
}
.sr { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 4px; cursor: pointer; }
.sr.active, .sr:hover { background: var(--raise2); }
.sr .t { font-weight: 600; }
.sr .s { color: var(--muted); font-size: 12px; }
.sr-empty { padding: 10px; color: var(--muted); }
.sr-head { padding: 8px 8px 4px; color: var(--muted); font: 600 11.5px var(--font); }
.jump { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 6px 8px; }
.jump button { border: 1px solid var(--line); background: var(--raise); border-radius: 4px; padding: 4px 10px; font-size: 12.5px; font-weight: 500; }
.jump button:hover, .jump button.active { border-color: var(--accent-line); background: var(--accent-soft); }

/* ---------- map ---------- */
#map { position: fixed; inset: var(--head) 0 0 var(--rail); background: var(--mapbg); }
body.bare #map, body.touring #map { left: 0; }
.maplibregl-ctrl-bottom-right { bottom: 32px; right: 6px; }
.maplibregl-ctrl-group { background: var(--surface) !important; border: 1px solid var(--line); box-shadow: 0 4px 14px var(--shadow) !important; border-radius: 5px !important; overflow: hidden; }
.maplibregl-ctrl-group button { width: 32px !important; height: 32px !important; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line) !important; }
:root:not([data-theme="midnattssol"]):not([data-theme="sjokart"]) .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1) brightness(0.9); }
.maplibregl-ctrl-scale { background: transparent; color: var(--muted); border-color: var(--muted); font: 500 10.5px var(--mono); }
.maplibregl-ctrl-attrib { display: none; }
body.bare .maplibregl-ctrl-bottom-right, body.touring .maplibregl-ctrl-bottom-right { opacity: 0; pointer-events: none; }

/* ---------- left rail ---------- */
.rail {
  position: fixed; top: var(--head); bottom: 0; left: 0; width: var(--rail); z-index: 22;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0;
  background: var(--bg); border-right: 1px solid var(--line);
}
.rb {
  position: relative; width: 60px; height: 52px; border: 0; border-radius: 5px; background: transparent; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; transition: color 0.15s, background 0.15s;
}
.rb svg { width: 20px; height: 20px; flex: none; }
.rb span { font: 500 11px var(--font); letter-spacing: 0.01em; }
.rb:hover { color: var(--text); background: var(--raise); }
.rb.on { color: var(--text); background: var(--raise2); }
.rb.on::before { content: ""; position: absolute; left: -4px; top: 10px; bottom: 10px; width: 2.5px; border-radius: 0 2px 2px 0; background: var(--accent); }
.rb.small { height: 44px; }
.rb.small svg { width: 18px; height: 18px; }
.rb-count {
  position: absolute; top: 5px; right: 8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 3px;
  background: var(--accent); color: var(--accent-ink); font: 600 10.5px/16px var(--mono); font-style: normal; text-align: center;
}
.rb-count:empty { display: none; }
.rail-sep { width: 28px; height: 1px; background: var(--line); margin: 5px 0; }
.rail-fill { flex: 1; }
body.touring #btnTour { color: var(--accent); }
body.bare .rail, body.touring .rail { transform: translateX(-100%); }

/* ---------- drawer ---------- */
.drawer {
  position: fixed; top: var(--head); bottom: 0; left: var(--rail); width: var(--drawer); z-index: 21;
  display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line);
  box-shadow: 8px 0 24px color-mix(in srgb, var(--shadow) 65%, transparent); animation: slide 0.16s ease-out;
}
@keyframes slide { from { transform: translateX(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 14px 14px 12px 16px; border-bottom: 1px solid var(--line);
}
.drawer-head h2 { margin: 0; font: 600 17px/1.2 var(--display); letter-spacing: -0.015em; }
.drawer-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 10px 14px 18px 16px; }
body.bare .drawer, body.touring .drawer { display: none; }

/* ---------- the live line (bottom left) ---------- */
.ticker {
  position: fixed; left: calc(var(--rail) + 12px); bottom: 12px; z-index: 12;
  display: inline-flex; align-items: center; gap: 9px; height: 36px; padding: 0 13px 0 11px; border-radius: 5px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 16px var(--shadow);
  font: 500 12.5px var(--font); color: var(--text); transition: left 0.2s, border-color 0.15s;
}
.ticker:hover { border-color: var(--accent-line); }
#tickerText { display: inline-flex; align-items: center; gap: 7px; }
.ticker b { font: 600 12.5px var(--mono); font-variant-numeric: tabular-nums; }
.ticker .tsep { color: var(--dim); }
.ticker .ti { display: none; width: 13px; height: 13px; fill: var(--muted); margin-right: 4px; vertical-align: -2px; }
/* the live line moved up above the replay bar when they would meet (narrow window, or a side panel open) */
body.bottom-tight .ticker { bottom: 56px; }
.health { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); flex: none; }
.health.ok { background: var(--good); box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--good) 22%, transparent); }
.health.warn { background: var(--warn); }
.health.error { background: var(--bad); }
.health.connecting { background: var(--warn); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
body.drawer-open .ticker { left: calc(var(--rail) + var(--drawer) + 12px); }
body.bare .ticker, body.touring .ticker { opacity: 0; pointer-events: none; }

/* ---------- replay (bottom centre): a compact bar that unfolds into the timeline ---------- */
.timeline {
  position: fixed; left: calc(50% + var(--rail) / 2); bottom: 12px; transform: translateX(-50%); z-index: 12;
  display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 5px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 5px; box-shadow: 0 4px 16px var(--shadow);
}
.tl-body { display: none; align-items: center; gap: 10px; width: min(700px, calc(100vw - 680px)); min-width: 380px; padding-left: 4px; }
body.drawer-open .tl-body { width: min(600px, calc(100vw - var(--rail) - var(--drawer) - 210px)); min-width: 320px; }
body.tl-open .tl-body, body.replaying .tl-body { display: flex; }
body.tl-open .tl-btn, body.replaying .tl-btn { display: none; }
.tl-btn { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font: 500 12.5px var(--font); }
.tl-btn svg { width: 15px; height: 15px; }
.tl-btn:hover { color: var(--text); background: var(--raise); }
.tl-arch { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--raise); color: var(--muted); font: 500 12px var(--font); white-space: nowrap; flex: none; }
.tl-arch[hidden] { display: none; }
.tl-arch svg { width: 13px; height: 13px; flex: none; }
.tl-arch:hover, .tl-arch.on { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); }
.archive-pop {
  position: fixed; left: calc(50% + var(--rail) / 2); bottom: 56px; transform: translateX(-50%); z-index: 35;
  width: min(440px, calc(100vw - 32px)); padding: 12px 14px; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 32px var(--shadow);
  font-size: 12.5px; color: var(--text);
}
.archive-pop[hidden] { display: none; }
body.drawer-open .archive-pop { left: calc(50% + (var(--rail) + var(--drawer)) / 2); }
.ap-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ap-head b { font: 600 13.5px var(--display); }
.ap-meta { color: var(--muted); font: 400 11.5px var(--mono); margin-right: auto; }
.ap-days { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: thin; }
.ap-day { flex: none; border: 1px solid var(--line); background: var(--raise); color: var(--muted); border-radius: 4px; padding: 4px 9px; font-size: 12px; white-space: nowrap; }
.ap-day:hover { color: var(--text); }
.ap-day.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text); font-weight: 600; }
.ap-hours { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.ap-hr { border: 1px solid var(--line); background: var(--raise); color: var(--text); border-radius: 4px; padding: 5px 0; font: 500 11.5px var(--mono); font-variant-numeric: tabular-nums; }
.ap-hr:hover:not(:disabled) { border-color: var(--accent-line); background: var(--accent-soft); }
.ap-hr.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.ap-hr:disabled { opacity: 0.24; cursor: default; }
.ap-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; white-space: nowrap; flex: none; height: 26px; border: 0; background: var(--raise); border-radius: 4px; padding: 0 10px; font: 600 11px var(--font); letter-spacing: 0.05em; color: var(--muted); }
.pill.live.on { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.pill.live.on::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--bad); margin-right: 6px; flex: none; animation: blink 1.6s infinite; }
.tbtn { width: 28px; height: 28px; border-radius: 4px; border: 0; background: transparent; display: grid; place-items: center; color: var(--text); flex: none; }
.tbtn:disabled { color: var(--dim); cursor: default; }
.tbtn svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.tbtn .i-pause { display: none; }
body.playing .tbtn .i-play { display: none; }
body.playing .tbtn .i-pause { display: block; }
#scrub { flex: 1; accent-color: var(--accent); min-width: 0; }
#scrub:disabled { opacity: 0.35; }
.speeds { display: flex; gap: 2px; padding: 2px; border-radius: 4px; background: var(--raise); }
.speeds button { border: 0; background: transparent; color: var(--muted); border-radius: 3px; padding: 2px 6px; font: 500 11.5px var(--mono); }
.speeds button.on { background: var(--surface2); color: var(--text); }
.time-label { min-width: 140px; text-align: right; color: var(--muted); font: 500 12px var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
body.replaying .time-label { color: var(--warn); }
.timeline .card-close { font-size: 18px; padding: 0 6px; }
body.bare .timeline, body.touring .timeline { opacity: 0; pointer-events: none; }
/* with a side panel open, the replay bar sits in the middle of the map that is left, not under the panel */
body.drawer-open .timeline { left: calc(50% + (var(--rail) + var(--drawer)) / 2); }
body.replaying #map::after {
  content: "REPLAY"; position: absolute; top: 14px; left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--warn); font: 600 11px var(--font); letter-spacing: 0.1em; pointer-events: none;
}

/* ---------- attribution & subtle web links (bottom right) ---------- */
.foot-right {
  position: fixed; right: 10px; bottom: 8px; z-index: 5;
  display: flex; align-items: center; gap: 10px; padding: 3px 8px; border-radius: 4px;
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  font-size: 11.5px; color: var(--muted);
}
.map-links { display: none; align-items: center; gap: 10px; }
body.web .map-links { display: flex; }
.map-links a { color: inherit; text-decoration: none; }
.map-links a:hover { color: var(--text); text-decoration: underline; }
.map-links::after { content: "·"; opacity: 0.45; }
.attribution { border: 0; background: transparent; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.attribution:hover { color: var(--text); text-decoration: underline; }
.sources {
  position: fixed; right: 12px; bottom: 34px; z-index: 40; width: 390px; padding: 12px 14px; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 28px var(--shadow); font-size: 12px; color: var(--muted); line-height: 1.6;
}
.sources a { color: var(--text); cursor: pointer; text-decoration: none; }
.sources a:hover { text-decoration: underline; }
.sources-more { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line, rgba(127, 127, 127, 0.25)); }
.sources-more a { text-decoration: underline; }
body.bare .foot-right, body.touring .foot-right { opacity: 0.45; }
body.bare .map-links, body.touring .map-links, body.tl-open .map-links, body.drawer-open .map-links { display: none; }
@media (max-width: 1360px) { .map-links { display: none !important; } }
@media (max-width: 1540px) { body.drawer-open.tl-open .foot-right, body.drawer-open.replaying .foot-right { opacity: 0; pointer-events: none; } }

/* ---------- shared bits ---------- */
.card-close { border: 0; background: transparent; color: var(--muted); font-size: 21px; line-height: 1; padding: 0 2px; }
.card-close:hover { color: var(--text); }
.switch { position: relative; width: 30px; height: 17px; flex: none; border-radius: 999px; background: var(--raise2); transition: background 0.2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--muted); transition: transform 0.2s, background 0.2s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(13px); background: var(--accent-ink); }
.seg { display: flex; gap: 2px; padding: 2px; border-radius: 5px; background: var(--raise); border: 1px solid var(--line); margin: 4px 0 2px; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--muted); border-radius: 3px; padding: 4px 8px; font-size: 12.5px; font-weight: 500; }
.seg button.on { background: var(--surface2); color: var(--text); }
.badge {
  min-width: 30px; height: 21px; padding: 0 6px; border-radius: 3px; display: inline-flex; align-items: center; justify-content: center;
  font: 600 11.5px var(--mono); letter-spacing: 0.01em; color: var(--badge-ink); flex: none;
}
button.mini { border: 1px solid var(--line); background: var(--raise); border-radius: 4px; padding: 4px 10px; font-size: 12px; font-weight: 500; color: var(--text); }
button.mini:hover { background: var(--raise2); }
button.link { border: 0; background: transparent; color: var(--accent); padding: 2px 0; font-weight: 500; }
button.link:hover { text-decoration: underline; }
.empty-note { color: var(--muted); font-size: 12.5px; padding: 4px 0; }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.note { color: var(--muted); font-size: 12px; line-height: 1.48; padding: 4px 4px 5px; }
.legend { display: flex; flex-wrap: wrap; gap: 5px 12px; padding: 5px 2px 5px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: -0.5px; }
.sub { padding: 6px 2px 2px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.sub input[type=range] { flex: 1; accent-color: var(--accent); }

/* ---------- Layers drawer: hairline-separated groups, clean flat rows, left-ruled sub-options ---------- */
.lgroup { margin-top: 2px; padding: 5px 0 4px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.lg-head { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-radius: 4px; cursor: pointer; user-select: none; }
.lg-head:hover { background: var(--raise); }
.lg-chev { width: 14px; height: 14px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; transition: transform 0.18s; }
.lgroup.folded .lg-chev { transform: rotate(-90deg); }
.lg-name { flex: 1; font: 600 13.5px var(--display); color: var(--text); }
.lg-sum { color: var(--muted); font: 400 12px var(--mono); font-variant-numeric: tabular-nums; }
.lg-sw { display: flex; padding: 4px 0 4px 6px; }
.lg-body { padding: 2px 0 4px; }
.lgroup.folded .lg-body { display: none; }
.lrow { display: flex; align-items: center; gap: 9px; padding: 6px 4px; border-radius: 4px; cursor: pointer; user-select: none; }
.lrow:hover { background: var(--raise); }
.lr-ico { width: 22px; height: 22px; border-radius: 4px; display: grid; place-items: center; flex: none; }
.lr-ico svg { width: 14px; height: 14px; stroke-width: 1.9; }
.lr-name { flex: 1; min-width: 0; font: 500 13.5px/1.3 var(--font); color: var(--text); }
.lr-count { color: var(--muted); font: 400 12px var(--mono); font-variant-numeric: tabular-nums; }
.lr-more { width: 22px; height: 22px; flex: none; border: 0; border-radius: 4px; background: transparent; color: var(--muted); display: grid; place-items: center; }
button.lr-more:hover { background: var(--raise2); color: var(--text); }
.lr-more svg { width: 13px; height: 13px; transition: transform 0.18s; }
.lrow.open { background: var(--accent-soft); }
.lrow.open .lr-more svg { transform: rotate(180deg); }
.lrow.off .lr-name { color: var(--muted); }
.lrow.off .lr-ico { filter: grayscale(1); opacity: 0.45; }
.lopts { margin: 3px 0 8px 15px; padding: 4px 2px 4px 13px; border: 0; border-left: 1.5px solid var(--accent-line); border-radius: 0; background: transparent; }
.row { display: flex; align-items: center; gap: 9px; padding: 5px 5px; border-radius: 4px; cursor: pointer; user-select: none; }
.row:hover { background: var(--raise); }
.row .sw { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.row .sw.ring { background: transparent !important; border: 2px solid; }
.row .rl { flex: 1; color: var(--text); font-size: 13px; }
.row .rc { color: var(--muted); font: 400 12px var(--mono); font-variant-numeric: tabular-nums; }
.row.off .rl, .row.off .rc { color: var(--dim); }
.row.off .sw { opacity: 0.3; }
.radar-ctl { display: flex; align-items: center; gap: 8px; padding: 4px 4px; }
.radar-ctl .rt { color: var(--muted); font: 400 12px var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- Now drawer: hairlined metric matrix + flat editorial sections ---------- */
.hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; margin-bottom: 4px;
}
.hero .tile { padding: 11px 12px 10px; border-radius: 0; background: var(--surface); border: 0; }
.hero .tile .v { font: 600 23px/1.1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.hero .tile .l { color: var(--text); font-size: 12.5px; font-weight: 500; margin-top: 4px; }
.hero .tile .s { color: var(--muted); font-size: 12px; margin-top: 1px; }
.section { margin-top: 14px; padding: 13px 0 2px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.section h3 { margin: 0 0 10px; font: 600 12.5px var(--display); color: var(--muted); }
.punct { display: flex; height: 6px; border-radius: 2px; overflow: hidden; background: var(--raise2); }
.punct i { display: block; height: 100%; transition: width 0.6s; }
.punct-legend { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.big-line { display: flex; align-items: baseline; gap: 7px; margin-bottom: 9px; font-size: 13px; }
.big-line b { font: 600 21px var(--mono); }
.list-item { display: flex; align-items: center; gap: 9px; padding: 6px 5px; border-radius: 4px; cursor: pointer; }
.list-item:hover { background: var(--raise); }
.li-main { flex: 1; min-width: 0; }
.li-main .a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 500; }
.li-main .b { color: var(--muted); font-size: 12px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-val { font: 500 12.5px var(--mono); font-variant-numeric: tabular-nums; }
.li-val.bad { color: var(--bad); }
.li-val.warn { color: var(--warn); }
.li-val.good { color: var(--good); }
.bar-row { display: grid; grid-template-columns: 1fr 100px 44px; align-items: center; gap: 8px; padding: 4px 0; font-size: 12.5px; cursor: pointer; }
.bar-row .bt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .bb { height: 5px; border-radius: 2px; background: var(--raise2); overflow: hidden; }
.bar-row .bb i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.bar-row .bn { text-align: right; color: var(--muted); font: 400 12px var(--mono); font-variant-numeric: tabular-nums; }
canvas.spark { width: 100%; height: 64px; display: block; }
.spark-legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.spark-legend i { display: inline-block; width: 8px; height: 3px; border-radius: 1px; margin-right: 5px; vertical-align: middle; }

/* ---------- details card (right) ---------- */
.card {
  position: fixed; right: 12px; top: calc(var(--head) + 12px); width: 370px; z-index: 15; padding: 15px 17px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--shadow) 75%, transparent); animation: rise 0.16s ease-out;
  max-height: calc(100vh - var(--head) - 180px); overflow-y: auto;
}
.card.wide { width: 540px; }
@keyframes rise { from { transform: translateY(5px); opacity: 0; } to { transform: none; opacity: 1; } }
.card-head { display: flex; align-items: flex-start; gap: 10px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.card-icon { width: 34px; height: 34px; border-radius: 5px; display: grid; place-items: center; flex: none; color: var(--badge-ink); font: 600 12px var(--mono); }
.card-icon svg { width: 18px; height: 18px; stroke: var(--badge-ink); }
.card-title { flex: 1; min-width: 0; }
.card-title .t { font: 600 16.5px/1.25 var(--display); letter-spacing: -0.015em; word-break: break-word; }
.card-title .s { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 12px 0 12px; }
.fact .k { color: var(--muted); font: 500 11.5px var(--font); margin-bottom: 2px; }
.fact .v { font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.fact.wide { grid-column: span 2; }
.card-note {
  color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0 0 10px; padding: 8px 11px;
  border-radius: 0 4px 4px 0; border-left: 2px solid var(--accent-line); background: var(--raise);
}
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 2px; }
.cbtn { border: 1px solid var(--line); background: var(--raise); border-radius: 4px; padding: 5px 11px; font-size: 12.5px; font-weight: 500; }
.cbtn:hover { background: var(--raise2); border-color: var(--accent-line); }
.cbtn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.alert-desc { font-size: 13px; line-height: 1.55; color: color-mix(in srgb, var(--text) 90%, transparent); margin: 11px 0; max-height: 180px; overflow: auto; }
.star { border: 0; background: transparent; color: var(--dim); font-size: 18px; line-height: 1; padding: 0 4px; margin-right: 2px; }
.star:hover, .star.on { color: var(--accent); }
body.bare .card, body.touring .card { opacity: 0; pointer-events: none; }

/* ---------- tooltip ---------- */
.tooltip {
  position: fixed; z-index: 25; pointer-events: none; padding: 7px 10px; border-radius: 5px; max-width: 280px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 6px 18px var(--shadow); font-size: 12.5px;
}
.tooltip .t { font-weight: 600; }
.tooltip .s { color: var(--muted); }
.tip-img { display: block; width: 260px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; margin-bottom: 6px; background: #000; }

/* ---------- tour ---------- */
.tour-caption {
  position: fixed; left: 34px; bottom: 40px; z-index: 20; max-width: 660px; pointer-events: none; color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85); animation: rise 0.6s ease-out;
}
.tc-kicker { color: var(--accent); font: 600 12.5px var(--font); letter-spacing: 0.1em; text-transform: uppercase; }
.tc-title { font: 600 42px/1.08 var(--display); letter-spacing: -0.025em; margin-top: 5px; }
.tc-sub { font-size: 16.5px; color: #d6dee8; margin-top: 6px; }
.tc-hint { margin-top: 16px; display: flex; align-items: center; gap: 7px; font-size: 12px; color: rgba(255, 255, 255, 0.65); }
.tc-hint .logo { width: 16px; height: 16px; color: #fff; }
.tc-tap { display: none; }
:root[data-theme="midnattssol"] .tour-caption, :root[data-theme="sjokart"] .tour-caption { color: var(--text); text-shadow: 0 1px 14px rgba(255, 255, 255, 0.9); }
:root[data-theme="midnattssol"] .tc-sub, :root[data-theme="sjokart"] .tc-sub { color: var(--muted); }
:root[data-theme="midnattssol"] .tc-hint, :root[data-theme="sjokart"] .tc-hint { color: var(--dim); }
:root[data-theme="midnattssol"] .tc-hint .logo, :root[data-theme="sjokart"] .tc-hint .logo { color: var(--text); }
.tour-cam {
  position: fixed; right: 34px; bottom: 40px; width: min(640px, 44vw); z-index: 20; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 18px 48px var(--shadow); animation: rise 0.6s ease-out; background: #000;
}
.tour-cam img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tc-cam-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.75)); font-weight: 600; color: #fff; }

/* ---------- toasts ---------- */
.toasts { position: fixed; top: calc(var(--head) + 14px); left: calc(50% + var(--rail) / 2); transform: translateX(-50%); z-index: 40; display: grid; gap: 6px; }
.toast { padding: 8px 14px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); border-left: 2.5px solid var(--accent); box-shadow: 0 8px 24px var(--shadow); animation: rise 0.16s; }

/* ---------- cameras ---------- */
.cam-media { position: relative; aspect-ratio: 4 / 3; margin: 11px 0 8px; border-radius: 4px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.cam-media img, .cam-media video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.cam-badge { position: absolute; left: 8px; bottom: 8px; padding: 2px 7px; border-radius: 3px; font: 500 11.5px var(--mono); background: rgba(0, 0, 0, 0.68); color: #e6edf5; pointer-events: none; }
.cam-badge.live { color: #fff; background: var(--accent); font-weight: 600; letter-spacing: 0.04em; }
.cam-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; color: #c9d2dc; background: rgba(0, 0, 0, 0.55); }
.cam-seg { margin: 0 0 6px; }
.cam-dirs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }

.gallery {
  position: fixed; inset: var(--head) 0 0 var(--rail); z-index: 26; display: flex; flex-direction: column;
  background: var(--bg); animation: rise 0.16s ease-out;
}
.gal-head { display: flex; align-items: center; gap: 16px; padding: 14px 20px 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.gal-head h2 { margin: 0; font: 600 18.5px var(--display); letter-spacing: -0.015em; white-space: nowrap; }
.gal-modes { margin: 0; min-width: 0; }
.gal-modes button { padding: 5px 12px; white-space: nowrap; }
.gal-head .muted { margin-left: auto; white-space: nowrap; font-size: 13px; }
/* grid-auto-rows: max-content keeps each tile its full height (image and name); without it the rows were
   squeezed to fit the wall's height, cutting the images to strips and hiding the names */
.gal-grid { flex: 1; overflow-y: auto; padding: 0 20px 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); grid-auto-rows: max-content; gap: 12px; align-content: start; }
.gal-grid .tile { margin: 0; border-radius: 5px; overflow: hidden; background: var(--surface); cursor: pointer; border: 1px solid var(--line); transition: border-color 0.15s; }
.gal-grid .tile:hover { border-color: var(--accent); }
.tile-img { position: relative; aspect-ratio: 4 / 3; background: #000; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-live, .tile-temp { position: absolute; top: 8px; padding: 2px 7px; border-radius: 3px; font: 600 11.5px var(--mono); background: rgba(0, 0, 0, 0.7); }
.tile-live { left: 8px; color: #fff; background: var(--accent); }
.tile-temp { right: 8px; color: #e6edf5; }
.gal-grid figcaption { display: grid; gap: 1px; padding: 9px 11px 10px; }
.gal-grid figcaption b { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gal-grid figcaption span { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gal-empty { grid-column: 1 / -1; padding: 60px; text-align: center; color: var(--muted); }

/* ---------- dialogs: help and settings ---------- */
.dialog {
  position: fixed; top: 50%; left: calc(50% + var(--rail) / 2); transform: translate(-50%, -50%); z-index: 35; width: min(880px, 92vw); max-height: 86vh; overflow: auto;
  padding: 20px 24px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 20px 56px var(--shadow);
  animation: pop 0.16s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.dialog .card-head { align-items: center; }
.dialog .card-title .t.wordmark { font-size: 20px; }
.help-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 6px; }
.dialog h3 { margin: 18px 0 8px; font: 600 12.5px var(--display); color: var(--muted); }
.help p { margin: 0 0 10px; color: var(--text); opacity: 0.92; }
.help a { color: var(--accent); text-decoration: none; }
.help a:hover { text-decoration: underline; }
.help-links { font-size: 12.5px; line-height: 1.75; }
.help table { border-collapse: collapse; }
.help td { padding: 4px 10px 4px 0; vertical-align: top; }
.settings { width: min(640px, 92vw); }
.set-row {
  display: flex; align-items: center; gap: 16px; padding: 11px 6px; border-radius: 0;
  background: transparent; border-bottom: 1px solid var(--line); margin-bottom: 0; cursor: pointer; transition: background 0.12s;
}
.set-row:hover { background: var(--raise); }
.set-row:last-of-type { border-bottom: 0; }
.set-row > div:first-child { flex: 1; }
.set-t { font-weight: 600; font-size: 13.5px; }
.set-s { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.set-row select { background: var(--surface2); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; }
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.theme-opt { border: 1.5px solid var(--line); border-radius: 6px; padding: 0; overflow: hidden; background: transparent; text-align: left; transition: border-color 0.15s; }
.theme-opt:hover { border-color: var(--accent-line); }
.theme-opt.on { border-color: var(--accent); }
.theme-opt .tp { height: 70px; position: relative; }
.theme-opt .tp .tp-rail { position: absolute; left: 0; top: 0; bottom: 0; width: 14px; }
.theme-opt .tp .tp-dots { position: absolute; left: 22px; bottom: 9px; display: flex; gap: 4px; }
.theme-opt .tp .tp-dots i { width: 9px; height: 9px; border-radius: 50%; }
.theme-opt .tp .tp-acc { position: absolute; right: 9px; top: 9px; width: 22px; height: 6px; border-radius: 2px; }
.theme-opt .tn { padding: 8px 9px 9px; background: var(--surface2); }
.theme-opt .tn b { display: block; font: 600 13px var(--display); }
.theme-opt .tn span { color: var(--muted); font-size: 11.5px; }

/* ---------- next stops ---------- */
.route { margin: 2px 0 10px; padding: 9px 10px; border-radius: 4px; border: 1px solid var(--line); background: color-mix(in srgb, var(--raise) 65%, transparent); }
.route-head { font: 600 12px var(--display); color: var(--muted); margin-bottom: 5px; }
ol.stops { list-style: none; margin: 0; padding: 0; }
ol.stops li { display: grid; grid-template-columns: 48px 1fr auto 54px; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 3px; cursor: pointer; }
ol.stops li:hover { background: var(--raise2); }
ol.stops li.cancelled .st-name { text-decoration: line-through; color: var(--dim); }
.st-time { font: 500 12.5px var(--mono); font-variant-numeric: tabular-nums; }
.st-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-name small { color: var(--dim); }
.st-delay { font: 600 11px var(--mono); padding: 1px 5px; border-radius: 3px; color: var(--badge-ink); }
.st-delay.warn { background: var(--warn); color: #241800; }
.st-delay.bad { background: var(--bad); color: #fff; }
.st-delay.early { background: var(--accent2); }
.st-in { color: var(--muted); font: 400 12px var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.route .link { margin-top: 4px; font-size: 12.5px; }

/* ---------- departure boards (stops and airports) ---------- */
.board { margin: 10px 0 8px; max-height: 380px; overflow-y: auto; border-radius: 4px; border: 1px solid var(--line); background: color-mix(in srgb, var(--raise) 65%, transparent); padding: 4px; }
.brow { display: grid; grid-template-columns: 54px auto 1fr 34px 88px; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 3px; cursor: pointer; }
.brow:hover { background: var(--raise2); }
.brow.cancelled .b-dest { text-decoration: line-through; color: var(--dim); }
.b-time { font: 500 12.5px/1.15 var(--mono); font-variant-numeric: tabular-nums; display: flex; flex-direction: column; }
.b-time small { font: 400 11px var(--mono); }
.b-dest { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-plat { color: var(--muted); font: 400 12px var(--mono); text-align: center; }
.b-in { color: var(--muted); font: 400 12px var(--mono); text-align: right; white-space: nowrap; }
.badge.flight { background: var(--surface2); color: var(--text); min-width: 56px; border: 1px solid var(--line); }
.on-map { color: var(--accent); font-weight: 600; }
.air-tabs { margin: 10px 0 0; }

/* ---------- right-click menu ---------- */
.ctxmenu {
  position: fixed; z-index: 45; min-width: 235px; padding: 5px; border-radius: 6px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: 0 12px 32px var(--shadow); animation: rise 0.12s ease-out;
}
.ctxmenu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 7px 10px; border-radius: 4px; font-size: 13px; }
.ctxmenu button:hover { background: var(--raise2); }
.cm-title { padding: 4px 10px 6px; color: var(--muted); font: 400 11.5px var(--mono); font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.cm-save { display: flex; gap: 6px; padding: 6px 4px 2px; }
.cm-save input { flex: 1; min-width: 0; padding: 5px 8px; border-radius: 4px; border: 1px solid var(--line); background: var(--raise); outline: none; }
.cm-save button { width: auto; background: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* ---------- weather card ---------- */
.wx-now { display: flex; align-items: baseline; gap: 12px; margin: 12px 0 8px; flex-wrap: wrap; }
.wx-temp { font: 600 28px var(--mono); letter-spacing: -0.02em; }
.hours { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; margin: 4px 0 8px; padding: 7px 4px; border-radius: 4px; border: 1px solid var(--line); background: color-mix(in srgb, var(--raise) 65%, transparent); }
.hour { display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 11.5px; }
.h-t { color: var(--muted); font: 400 10.5px var(--mono); }
.h-i { font-size: 15px; }
.h-v { font: 600 11.5px var(--mono); }
.h-p { color: var(--accent2); font: 400 10.5px var(--mono); min-height: 13px; }

/* ---------- Mine ---------- */
.mine-add { display: flex; gap: 6px; margin-bottom: 8px; }
.mine-add input {
  flex: 1; min-width: 0; height: 32px; padding: 0 9px; border-radius: 4px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font-size: 12.5px; outline: none;
}
.mine-add input:focus { border-color: var(--accent-line); }
.mine-add input::placeholder { color: var(--dim); }
.mine-pick { margin: -4px 0 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface2); overflow: hidden; }
.mp-item { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 7px 9px; }
.mp-item:last-child { border-bottom: 0; }
.mp-item:hover { background: var(--raise2); }
.mp-item b { display: block; font-size: 13px; color: var(--text); }
.mp-item span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place {
  margin-bottom: 10px; border: 1px solid var(--line); border-radius: 5px;
  background: color-mix(in srgb, var(--raise) 55%, transparent); overflow: hidden;
}
.place:last-child { margin-bottom: 2px; }
.place.is-home { border-color: var(--accent-line); border-left: 2.5px solid var(--accent); }
.pl-head { display: flex; align-items: center; gap: 7px; padding: 9px 10px 8px; border-bottom: 1px solid var(--line); }
.pl-star { color: var(--accent); font-size: 13px; line-height: 1; flex: none; }
.pl-head b { flex: 1; font: 600 14px/1.2 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-home-tag {
  font: 500 10.5px var(--font); padding: 1px 6px; border-radius: 3px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); flex: none;
}
.pl-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.pl-metric {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px;
  border: 0; background: var(--surface); text-align: left; min-width: 0; transition: background 0.12s;
}
.pl-metric:hover { background: var(--surface2); }
.pl-mk { font: 500 11px var(--font); color: var(--muted); }
.pl-mv { display: inline-flex; align-items: center; gap: 5px; font: 600 14.5px/1.2 var(--mono); font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.pl-mv i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.pl-mv small { font: 400 11px var(--font); color: var(--muted); }
.pl-ms { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pl-status { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; }
.pl-status.calm { opacity: 0.78; }
.pl-row { display: flex; align-items: center; gap: 7px; font-size: 12.5px; line-height: 1.35; color: var(--text); }
.pl-row i { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.pl-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.pl-act {
  border: 0; background: var(--surface); color: var(--muted); padding: 7px 4px;
  font: 500 11.5px var(--font); text-align: center; white-space: nowrap; transition: background 0.12s, color 0.12s;
}
.pl-act:hover { background: var(--raise2); color: var(--text); }
.pl-act.on { color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); font-weight: 600; }
button.mini.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
button.x { border: 0; background: transparent; color: var(--dim); font-size: 16px; line-height: 1; padding: 0 4px; }
button.x:hover { color: var(--bad); }
.list-item button.x { opacity: 0; }
.list-item:hover button.x { opacity: 1; }
.log-item { padding: 6px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.log-item:last-of-type { border-bottom: 0; }

/* ---------- narrower windows ---------- */
@media (max-width: 1300px) {
  #titlebar { grid-template-columns: auto minmax(220px, 1fr) auto; }
  .tl-body { width: min(520px, calc(100vw - 560px)); }
}
@media (max-width: 1150px) {
  .wordmark { display: none; }
  .card.wide { width: 460px; }
}

/* ---------- toll stations and speed cameras ---------- */
.speed-sign {
  width: 36px; height: 36px; flex: none; border-radius: 50%; background: #fff; border: 3.5px solid #d62828;
  display: grid; place-items: center; color: #141418; font: 700 13.5px var(--mono); letter-spacing: -0.04em;
}
.speed-badge { background: #fff !important; color: #141418 !important; box-shadow: inset 0 0 0 2px #d62828; border-radius: 5px; }
.toll-now { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 2px; padding: 9px 11px; border-radius: 4px; border: 1px solid var(--accent-line); background: var(--accent-soft); }
.toll-now .tn-v { font: 600 24px/1 var(--mono); font-variant-numeric: tabular-nums; }
.toll-now .tn-s { color: var(--muted); font-size: 12.5px; }
.toll-now .tn-s b { color: var(--text); font-weight: 600; }
.toll-row { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 5px 2px; border-top: 1px solid var(--line); }
.toll-row:first-of-type { border-top: 0; }
.toll-row .muted { grid-column: 1 / -1; font-size: 12px; }

/* ---------- "Now": foldable sections ---------- */
.section h3.fold-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; user-select: none; }
.section h3.fold-h:hover { color: var(--text); }
.section.folded h3.fold-h { margin-bottom: 0; }
.chev { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5.5px solid currentColor; transition: transform 0.18s; flex: none; opacity: 0.7; }
.section.folded .chev { transform: rotate(-90deg); }
.pdot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin: 0 4px 0 2px; }

/* ---------- transport notices ---------- */
.notice { display: flex; gap: 9px; padding: 6px 4px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.notice:hover { background: var(--raise); }
.notice > i { width: 3px; border-radius: 1px; flex: none; }
.notices .route-head { margin-bottom: 2px; }

/* ---------- mountain passes ---------- */
.pass-status { display: flex; flex-direction: column; gap: 2px; margin: 12px 0 4px; padding: 9px 11px; border-radius: 0 4px 4px 0; background: var(--raise); border-left: 3px solid; }
.pass-status b { font: 600 16px var(--display); }
.pass-cam { cursor: pointer; }
.pass-msg { padding: 6px 2px; border-top: 1px solid var(--line); }
.pass-msg:first-of-type { border-top: 0; }
.pass-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 2px 0 4px; }
.pass-chips button { border: 1px solid var(--line); background: var(--raise); border-radius: 4px; padding: 4px 10px; font-size: 12px; font-weight: 500; }
.pass-chips button:hover { border-color: var(--accent-line); background: var(--accent-soft); }

/* ---------- offshore oil and gas ---------- */
#btnOffshore.on, #btnPower.on { color: var(--text); background: var(--raise2); }
.offshore .gal-head .cbtn { margin-left: auto; }
.power .gal-head .pwr-mva { margin-left: auto; flex: none; }
.power .gal-head .pwr-mva button { white-space: nowrap; }
.power .gal-head .cbtn { margin-left: 0; }
/* shared calm editorial tabbed dashboard layout (Strøm & Sokkel) */
.dash-wrap { max-width: 1080px; margin: 0 auto; padding-bottom: 18px; }
.dash-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; padding-bottom: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.dash-tabs::-webkit-scrollbar { display: none; }
.dash-tabs button {
  border: 0; background: transparent; color: var(--muted);
  font: 500 14px var(--display); padding: 8px 14px 10px; border-radius: 0;
  cursor: pointer; white-space: nowrap; transition: color 0.15s, box-shadow 0.15s;
}
.dash-tabs button:hover { color: var(--text); }
.dash-tabs button.on { color: var(--text); font-weight: 600; background: transparent; box-shadow: inset 0 -2px 0 var(--accent); }
.dash-lead { margin: 0 0 16px; font-size: 15.5px; line-height: 1.55; color: var(--text); max-width: 78ch; }
.dash-hero3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.dash-hero3 .tile { padding: 14px 16px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); }
.dash-hero3 .tile .v { font: 600 26px/1.1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.dash-hero3 .tile .l { font-size: 13.5px; font-weight: 500; margin-top: 6px; color: var(--text); }
.dash-hero3 .tile .s { font-size: 12.5px; margin-top: 3px; color: var(--muted); }
.dash-block { margin-bottom: 14px; }
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.dash-stack { display: flex; flex-direction: column; gap: 12px; }
.dash-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 11px 13px; margin-bottom: 10px; border-radius: 4px; border: 1px solid var(--line); background: color-mix(in srgb, var(--raise) 65%, transparent); }
.dash-strip span { display: block; font: 500 11.5px var(--font); color: var(--muted); margin-bottom: 2px; }
.dash-strip b { font: 600 14.5px var(--mono); font-variant-numeric: tabular-nums; }
.dash-strip small { font-weight: 400; color: var(--muted); font-size: 12px; }
.dash-foot { margin: 12px 2px 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.dash-foot a { color: var(--accent); text-decoration: none; }
.dash-foot a:hover { text-decoration: underline; }
/* Strøm: regional price cards, reservoir gauges, power mix */
.pwr-zones { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px; }
.pwr-zcard { padding: 13px 14px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color 0.15s, background 0.15s; min-width: 0; }
.pwr-zcard:hover { background: var(--surface2); border-color: var(--accent-line); }
.pwr-zcard.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-line); }
.pwr-zhead { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.pwr-zhead b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwr-zdot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.pwr-zcode-soft { font: 500 11.5px var(--mono); color: var(--muted); flex: none; }
.pwr-zplace { font-size: 12.5px; color: var(--muted); margin: 3px 0 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwr-zgo { margin-left: auto; border: 1px solid var(--line); background: var(--raise); color: var(--muted); font: 500 11.5px var(--font); padding: 2px 7px; border-radius: 3px; cursor: pointer; flex: none; }
.pwr-zgo:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.pwr-zprice { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; font: 600 22px/1.1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pwr-zprice small { font: 400 12px var(--font); color: var(--muted); }
.pwr-tag { font: 500 12px var(--font); opacity: 0.92; }
.pwr-zsub { color: var(--muted); font-size: 12px; margin-top: 7px; font-variant-numeric: tabular-nums; }
.pwr-maglist { display: flex; flex-direction: column; gap: 4px; }
.pwr-magrow { display: grid; grid-template-columns: minmax(150px, 1.1fr) 1.5fr 145px; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 4px; cursor: pointer; transition: background 0.12s; }
.pwr-magrow:hover { background: var(--raise); }
.pwr-magrow.on { background: var(--raise2); box-shadow: inset 0 0 0 1px var(--accent-line); }
.pwr-maginfo b { font-size: 13.5px; }
.pwr-maginfo small { color: var(--muted); font-size: 12px; }
.pwr-magtrack { position: relative; height: 8px; border-radius: 2px; background: var(--raise2); }
.pwr-magfill { display: block; height: 100%; border-radius: 2px; }
.pwr-magnorm { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; background: var(--text); opacity: 0.85; }
.pwr-magnum { text-align: right; font-variant-numeric: tabular-nums; }
.pwr-magnum b { display: block; font: 600 14px var(--mono); }
.pwr-magnum small { font-size: 11.5px; color: var(--muted); }
.pwr-mixbar { display: flex; height: 10px; border-radius: 2px; overflow: hidden; gap: 2px; background: var(--raise2); margin: 6px 0 10px; }
.pwr-mixbar i { display: block; height: 100%; }
.pwr-mixleg { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--text); }
.pwr-mixleg i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.pwr-mixleg small { color: var(--muted); font-variant-numeric: tabular-nums; }
.pwr-nordic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pwr-ncard { padding: 10px 12px; border-radius: 4px; border: 1px solid var(--line); background: color-mix(in srgb, var(--raise) 65%, transparent); font-size: 13px; }
.pwr-ncard b { display: block; font-size: 13.5px; margin-bottom: 3px; }
.pwr-mbar { height: 6px; border-radius: 2px; background: var(--raise2); overflow: hidden; }
.pwr-mbar i { display: block; height: 100%; border-radius: 2px; }
.off-bar[data-phydro], .off-bar[data-pwind] { cursor: pointer; grid-template-columns: minmax(0, 1.5fr) 0.9fr 68px; }
.off-bar[data-phydro]:hover, .off-bar[data-pwind]:hover { background: var(--raise2); }
.off-bar b { text-align: right; font: 500 12.5px var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); }
.trunc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .pwr-zones { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) {
  .pwr-zones, .dash-hero3, .dash-cols, .pwr-nordic { grid-template-columns: 1fr; }
  .dash-strip { grid-template-columns: 1fr 1fr; }
  .pwr-magrow { grid-template-columns: 1fr 90px; }
  .pwr-magtrack { grid-column: 1 / -1; order: 3; }
}
.offshore .gal-head .cbtn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.offshore .gal-head .muted { margin-left: 0; }
.off-body { flex: 1; overflow-y: auto; padding: 0 20px 20px; }
.off-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 12px; }
.off-kpis .tile { padding: 12px 13px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); }
.off-kpis .tile .v { font: 600 24px/1.1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.off-kpis .tile .l { font-size: 12.5px; font-weight: 500; margin-top: 5px; }
.off-kpis .tile .s { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.off-kpis .tile.live { border-color: var(--accent-line); }
.off-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; }
.off-card { padding: 15px 17px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.off-card.off-wide { grid-column: 1 / -1; }
.off-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.off-h h3 { margin: 0; font: 600 13px var(--display); color: var(--text); }
.off-range { margin: 0; flex: none; }
.off-range button { white-space: nowrap; }
.off-sub { color: var(--muted); font-size: 12.5px; margin: -4px 0 9px; }
.off-chart { position: relative; }
.off-chart canvas { width: 100%; display: block; cursor: crosshair; }
.off-tip { position: absolute; pointer-events: none; padding: 7px 10px; border-radius: 5px; background: var(--surface2); border: 1px solid var(--line); box-shadow: 0 6px 18px var(--shadow); font-size: 12.5px; min-width: 150px; }
.off-tip b { font: 600 13px var(--mono); }
.off-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin-top: 7px; }
.off-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.off-bar { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr 48px; align-items: center; gap: 8px; padding: 5px 2px; border-radius: 3px; font-size: 13px; }
.off-bar[data-field] { cursor: pointer; }
.off-bar[data-field]:hover { background: var(--raise2); }
.ob-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-l small { color: var(--dim); }
.ob-b { height: 6px; border-radius: 2px; background: var(--raise2); overflow: hidden; }
.ob-b i { display: block; height: 100%; border-radius: 2px; }
.ob-v { text-align: right; color: var(--muted); font: 400 12px var(--mono); font-variant-numeric: tabular-nums; }
.off-fact { display: flex; justify-content: space-between; gap: 10px; padding: 6px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.off-fact:last-child { border-bottom: 0; }
.off-fact span { color: var(--muted); }
.off-fact b { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.off-fact[data-field], .off-fact[data-fac] { cursor: pointer; }
.off-fact[data-field]:hover b, .off-fact[data-fac]:hover b { color: var(--accent); }
.off-res { margin: -2px 0 10px; }
.off-res-bar { height: 6px; border-radius: 2px; background: var(--raise2); overflow: hidden; margin-bottom: 4px; }
.off-res-bar i { display: block; height: 100%; background: var(--accent); }
.small-chart { margin-top: 4px; }
@media (max-width: 1300px) { .off-kpis { grid-template-columns: repeat(3, 1fr); } .off-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- keyboard focus: a clear ring on whatever Tab has reached ----------
   Only once Tab has been pressed in the app (body.kbd-nav, see app.js): coming back to the window with Alt+Tab
   otherwise counts as keyboard use, and drew an orange frame round the whole map. */
:focus-visible { outline: none; }
body.kbd-nav :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.kbd-nav .maplibregl-canvas:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; } /* the map: arrow keys move it, + and - zoom */
.search input:focus-visible { outline: none; } /* the search field has its own highlight */

/* ---------- less motion (Settings -> Motion, or the device's "reduce motion"): nothing slides, pulses or blinks ---------- */
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}

/* ---------- start-up: the logo puts itself together ----------
   The two halves slide in, then the dot runs down the slope from the top joint and lands in the middle.
   Hidden until the theme is set (theme.js adds .go), so a light day theme does not flash dark first. */
.intro { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: var(--bg); color: var(--text); opacity: 0; transition: opacity 0.45s ease, visibility 0.45s; cursor: pointer; }
.intro.go { opacity: 1; }
.intro.go.done { opacity: 0; visibility: hidden; pointer-events: none; }
.intro svg { width: 120px; height: 120px; overflow: visible; }
.intro .idot circle { fill: var(--logo-dot); }
.intro-wm { font-size: 28px; }
.intro.go .ih-l { animation: ih-l 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.intro.go .ih-r { animation: ih-r 0.5s 0.08s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.intro.go .idot { animation: idot 0.6s 0.36s cubic-bezier(0.25, 1.25, 0.5, 1) both; }
.intro.go .intro-wm { animation: iwm 0.45s 0.62s ease-out both; }
@keyframes ih-l { from { transform: translate(-9px, 5px); opacity: 0; } }
@keyframes ih-r { from { transform: translate(9px, -5px); opacity: 0; } }
@keyframes idot { from { transform: translate(-13px, -14px); opacity: 0; } 30% { opacity: 1; } }
@keyframes iwm { from { opacity: 0; transform: translateY(5px); } }

/* ---------- the plane card: photo, route strip, key numbers ---------- */
.pl-photo { margin: 10px 0 0; }
.pl-img { display: block; border-radius: 4px; overflow: hidden; background: var(--raise); border: 1px solid var(--line); aspect-ratio: 3 / 2; }
.pl-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-credit { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.pl-credit a { color: inherit; }
.pl-route { display: grid; grid-template-columns: auto minmax(40px, 1fr) auto; align-items: center; gap: 10px; margin: 10px 0 6px; padding: 10px 12px; border-radius: 4px; border: 1px solid var(--line); background: color-mix(in srgb, var(--raise) 65%, transparent); }
.pl-ap { border: 0; background: transparent; padding: 0; display: flex; flex-direction: column; align-items: flex-start; color: var(--text); min-width: 0; max-width: 120px; text-align: left; }
.pl-ap.to { align-items: flex-end; text-align: right; }
.pl-ap b { font: 600 19px/1.1 var(--mono); letter-spacing: 0.04em; }
.pl-ap span { font-size: 12px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-ap small { font: 400 11.5px var(--mono); margin-top: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-ap:hover b { color: var(--accent); }
.pl-track { position: relative; height: 26px; }
.pl-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--raise2); }
.pl-done { position: absolute; left: 0; top: calc(50% - 1px); height: 2px; border-radius: 1px; background: var(--pc); }
.pl-dot { position: absolute; top: 50%; width: 22px; height: 22px; transform: translate(-50%, -50%); color: var(--pc); }
.pl-dot svg { width: 22px; height: 22px; }
.pl-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 8px 0; background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.pl-stat { padding: 8px 10px; border-radius: 0; background: var(--surface); min-width: 0; }
.pl-stat .v { font: 600 14.5px var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-stat .k { font: 500 11.5px var(--font); color: var(--muted); margin-top: 2px; }
details.pl-more { margin: 2px 0 8px; }
details.pl-more summary { cursor: pointer; color: var(--muted); font-size: 12.5px; padding: 4px 2px; user-select: none; }
details.pl-more summary:hover { color: var(--text); }
details.pl-more .facts { margin-top: 6px; }

/* ---------- the logo reloads the page ---------- */
.brand { cursor: pointer; border-radius: 5px; }
.brand:hover .logo { filter: brightness(1.15); }
.brand:active .logo { transform: scale(0.94); }

/* ---------- Layers: "Quick choice" at the top, then the four groups ---------- */
.lt-choose {
  display: flex; align-items: center; gap: 9px; width: 100%; margin: 2px 0 10px; padding: 8px 10px; border-radius: 5px;
  border: 1px solid var(--line); background: var(--raise); color: var(--text); font: 500 12.5px var(--font); text-align: left;
  transition: background 0.15s, border-color 0.15s;
}
.lt-choose:hover { background: var(--raise2); border-color: var(--accent-line); }
.lt-choose svg { width: 16px; height: 16px; flex: none; stroke: var(--muted); stroke-width: 1.9; fill: none; }
.lt-choose:hover svg { stroke: var(--accent); }

/* ---------- the first-start chooser (welcome.js) ---------- */
.welcome { width: min(640px, 94vw); z-index: 60; }
body.welcoming::after { content: ""; position: fixed; inset: 0; z-index: 55; background: rgba(0, 6, 12, 0.45); }
.welcome .card-title .t { font: 600 19px var(--display); letter-spacing: -0.015em; }
.welcome .card-title .s { margin-top: 3px; }
.wl-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.wl-group { border: 1px solid var(--line); border-radius: 6px; padding: 11px; background: transparent; transition: border-color 0.15s, background 0.15s; }
.wl-group.on { border-color: var(--accent-line); background: var(--accent-soft); }
.wl-gh { display: flex; align-items: flex-start; gap: 10px; width: 100%; border: 0; background: transparent; color: var(--text); text-align: left; padding: 2px; }
.wl-check { width: 18px; height: 18px; flex: none; margin-top: 1px; border-radius: 4px; border: 1.5px solid var(--line); display: grid; place-items: center; }
.wl-group.on .wl-check { background: var(--accent); border-color: var(--accent); }
.wl-group.on .wl-check::after { content: ""; width: 8px; height: 4.5px; border: solid var(--accent-ink); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.wl-gt b { display: block; font: 600 14.5px var(--display); }
.wl-gt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }
.wl-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.wl-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px 4px 7px; border-radius: 4px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-size: 12px; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.wl-chip svg { width: 13px; height: 13px; stroke-width: 1.9; }
.wl-chip:hover { border-color: var(--accent-line); color: var(--text); }
.wl-chip.on { background: var(--surface2); color: var(--text); border-color: var(--accent-line); }
.wl-chip.on svg { color: var(--accent); }
.wl-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.cbtn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; padding: 6px 15px; }
.cbtn.primary:hover { filter: brightness(1.08); background: var(--accent); }

/* ---------- the tour: a button to end it (Esc does too) ---------- */
.tour-exit {
  display: none; position: fixed; top: calc(var(--head) + 14px); right: 16px; z-index: 22; align-items: center; gap: 7px;
  padding: 7px 13px 7px 10px; border-radius: 5px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--text); font: 500 12.5px var(--font); box-shadow: 0 4px 16px var(--shadow); opacity: 0.7; transition: opacity 0.2s;
}
.tour-exit:hover, .tour-exit:focus-visible { opacity: 1; }
.tour-exit svg { width: 15px; height: 15px; stroke-width: 2.2; }
body.touring .tour-exit { display: flex; }
