@font-face { font-family: "Bricolage"; src: url(fonts/bricolage-grotesque-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url(fonts/bricolage-grotesque-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- themes: generated, every family has light / dark / auto ---------- */
:root {
  --bg: #eef1f3;
  --surface: #ffffff;
  --surface-2: #e5e9ec;
  --ink: #17242b;
  --muted: #5d6a72;
  --line: #d2d9dd;
  --accent: #1e5b4f;
  --accent-ink: #ffffff;
  --accent-soft: #dcebe6;
  --signal: #f2b705;
  --signal-ink: #2b2100;
  --t-high: #1e5b4f;
  --t-mid: #4f8f7d;
  --t-low: #9dbcb2;
  --t-rare: #c7d0d5;
  --ok: #1e7a4f;
  --ok-soft: #dff1e7;
  --warn: #8a5a00;
  --warn-soft: #fbefd0;
  --danger: #b3261e;
  --logo-ticket: var(--surface);
  --shadow: 0 1px 0 rgba(20,30,40,.04), 0 6px 20px -8px rgba(20,30,40,.18);
  --flag: none;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0f1619;
    --surface: #172126;
    --surface-2: #1f2b31;
    --ink: #e4ecef;
    --muted: #93a3aa;
    --line: #2b3a41;
    --accent: #6fd3b5;
    --accent-ink: #0b1f1a;
    --accent-soft: #1d3a33;
    --signal: #f2c94c;
    --signal-ink: #2b2100;
    --t-high: #6fd3b5;
    --t-mid: #4fa58c;
    --t-low: #3b6f61;
    --t-rare: #34454c;
    --ok: #6fd3b5;
    --ok-soft: #173a31;
    --warn: #f2c94c;
    --warn-soft: #3a3115;
    --danger: #ff8a80;
    --logo-ticket: var(--bg);
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
    --flag: none;
    color-scheme: dark;
  }
}
:root[data-theme="bahnsteig-light"], :root[data-theme="bahnsteig-auto"] {
  --bg: #eef1f3;
  --surface: #ffffff;
  --surface-2: #e5e9ec;
  --ink: #17242b;
  --muted: #5d6a72;
  --line: #d2d9dd;
  --accent: #1e5b4f;
  --accent-ink: #ffffff;
  --accent-soft: #dcebe6;
  --signal: #f2b705;
  --signal-ink: #2b2100;
  --t-high: #1e5b4f;
  --t-mid: #4f8f7d;
  --t-low: #9dbcb2;
  --t-rare: #c7d0d5;
  --ok: #1e7a4f;
  --ok-soft: #dff1e7;
  --warn: #8a5a00;
  --warn-soft: #fbefd0;
  --danger: #b3261e;
  --logo-ticket: var(--surface);
  --shadow: 0 1px 0 rgba(20,30,40,.04), 0 6px 20px -8px rgba(20,30,40,.18);
  --flag: none;
  color-scheme: light;
}
:root[data-theme="bahnsteig-dark"] {
  --bg: #0f1619;
  --surface: #172126;
  --surface-2: #1f2b31;
  --ink: #e4ecef;
  --muted: #93a3aa;
  --line: #2b3a41;
  --accent: #6fd3b5;
  --accent-ink: #0b1f1a;
  --accent-soft: #1d3a33;
  --signal: #f2c94c;
  --signal-ink: #2b2100;
  --t-high: #6fd3b5;
  --t-mid: #4fa58c;
  --t-low: #3b6f61;
  --t-rare: #34454c;
  --ok: #6fd3b5;
  --ok-soft: #173a31;
  --warn: #f2c94c;
  --warn-soft: #3a3115;
  --danger: #ff8a80;
  --logo-ticket: var(--bg);
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
  --flag: none;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="bahnsteig-auto"] {
    --bg: #0f1619;
    --surface: #172126;
    --surface-2: #1f2b31;
    --ink: #e4ecef;
    --muted: #93a3aa;
    --line: #2b3a41;
    --accent: #6fd3b5;
    --accent-ink: #0b1f1a;
    --accent-soft: #1d3a33;
    --signal: #f2c94c;
    --signal-ink: #2b2100;
    --t-high: #6fd3b5;
    --t-mid: #4fa58c;
    --t-low: #3b6f61;
    --t-rare: #34454c;
    --ok: #6fd3b5;
    --ok-soft: #173a31;
    --warn: #f2c94c;
    --warn-soft: #3a3115;
    --danger: #ff8a80;
    --logo-ticket: var(--bg);
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
    --flag: none;
    color-scheme: dark;
  }
}
:root[data-theme="rose-light"], :root[data-theme="rose-auto"] {
  --bg: #fbf4f5;
  --surface: #ffffff;
  --surface-2: #f6e8eb;
  --ink: #3b2a30;
  --muted: #765e65;
  --line: #eed8dd;
  --accent: #b05a77;
  --accent-ink: #ffffff;
  --accent-soft: #f8e1e8;
  --signal: #f6c2d1;
  --signal-ink: #5a2236;
  --t-high: #b05a77;
  --t-mid: #cf8aa1;
  --t-low: #e6b9c8;
  --t-rare: #ecdfe3;
  --ok: #8a4a63;
  --ok-soft: #f9e4ec;
  --warn: #9a5b2c;
  --warn-soft: #fbeadd;
  --danger: #b3261e;
  --logo-ticket: var(--surface);
  --shadow: 0 1px 0 rgba(20,30,40,.04), 0 6px 20px -8px rgba(20,30,40,.18);
  --flag: none;
  color-scheme: light;
}
:root[data-theme="rose-dark"] {
  --bg: #181116;
  --surface: #221820;
  --surface-2: #2c2029;
  --ink: #f6e8ef;
  --muted: #b59aa8;
  --line: #3c2b37;
  --accent: #f2a7c3;
  --accent-ink: #2b0f1c;
  --accent-soft: #3a2332;
  --signal: #ffd1df;
  --signal-ink: #3a1022;
  --t-high: #f2a7c3;
  --t-mid: #c77f9c;
  --t-low: #845569;
  --t-rare: #4a3743;
  --ok: #f2a7c3;
  --ok-soft: #3a2332;
  --warn: #ffc9a8;
  --warn-soft: #3d2a22;
  --danger: #ff9aa2;
  --logo-ticket: var(--bg);
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
  --flag: none;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="rose-auto"] {
    --bg: #181116;
    --surface: #221820;
    --surface-2: #2c2029;
    --ink: #f6e8ef;
    --muted: #b59aa8;
    --line: #3c2b37;
    --accent: #f2a7c3;
    --accent-ink: #2b0f1c;
    --accent-soft: #3a2332;
    --signal: #ffd1df;
    --signal-ink: #3a1022;
    --t-high: #f2a7c3;
    --t-mid: #c77f9c;
    --t-low: #845569;
    --t-rare: #4a3743;
    --ok: #f2a7c3;
    --ok-soft: #3a2332;
    --warn: #ffc9a8;
    --warn-soft: #3d2a22;
    --danger: #ff9aa2;
    --logo-ticket: var(--bg);
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
    --flag: none;
    color-scheme: dark;
  }
}
:root[data-theme="ostsee-light"], :root[data-theme="ostsee-auto"] {
  --bg: #edf2f6;
  --surface: #ffffff;
  --surface-2: #e2e9ef;
  --ink: #142334;
  --muted: #5a6b7c;
  --line: #cfd9e2;
  --accent: #1d5c8a;
  --accent-ink: #ffffff;
  --accent-soft: #dce8f2;
  --signal: #f2c078;
  --signal-ink: #3a2604;
  --t-high: #1d5c8a;
  --t-mid: #4f87b0;
  --t-low: #9dbbd3;
  --t-rare: #c8d4de;
  --ok: #1f7a5a;
  --ok-soft: #dcf0e7;
  --warn: #8a5a00;
  --warn-soft: #fbefd0;
  --danger: #b3261e;
  --logo-ticket: var(--surface);
  --shadow: 0 1px 0 rgba(20,30,40,.04), 0 6px 20px -8px rgba(20,30,40,.18);
  --flag: none;
  color-scheme: light;
}
:root[data-theme="ostsee-dark"] {
  --bg: #0c1620;
  --surface: #13212e;
  --surface-2: #1b2c3b;
  --ink: #e3edf5;
  --muted: #93a6b8;
  --line: #263a4b;
  --accent: #7db7e8;
  --accent-ink: #08182a;
  --accent-soft: #1a3349;
  --signal: #f2c078;
  --signal-ink: #3a2604;
  --t-high: #7db7e8;
  --t-mid: #5a8fbd;
  --t-low: #375f80;
  --t-rare: #2c3f50;
  --ok: #7fd6b0;
  --ok-soft: #173a2f;
  --warn: #f2c078;
  --warn-soft: #3a2f18;
  --danger: #ff8a80;
  --logo-ticket: var(--bg);
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
  --flag: none;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="ostsee-auto"] {
    --bg: #0c1620;
    --surface: #13212e;
    --surface-2: #1b2c3b;
    --ink: #e3edf5;
    --muted: #93a6b8;
    --line: #263a4b;
    --accent: #7db7e8;
    --accent-ink: #08182a;
    --accent-soft: #1a3349;
    --signal: #f2c078;
    --signal-ink: #3a2604;
    --t-high: #7db7e8;
    --t-mid: #5a8fbd;
    --t-low: #375f80;
    --t-rare: #2c3f50;
    --ok: #7fd6b0;
    --ok-soft: #173a2f;
    --warn: #f2c078;
    --warn-soft: #3a2f18;
    --danger: #ff8a80;
    --logo-ticket: var(--bg);
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
    --flag: none;
    color-scheme: dark;
  }
}
:root[data-theme="lavendel-light"], :root[data-theme="lavendel-auto"] {
  --bg: #f4f2f9;
  --surface: #ffffff;
  --surface-2: #ebe7f4;
  --ink: #2a2440;
  --muted: #6e6789;
  --line: #ddd7ec;
  --accent: #5b4fa0;
  --accent-ink: #ffffff;
  --accent-soft: #e6e2f5;
  --signal: #f3d36b;
  --signal-ink: #3b2f00;
  --t-high: #5b4fa0;
  --t-mid: #8a7fc4;
  --t-low: #c0b8e3;
  --t-rare: #dcd8ea;
  --ok: #2f7a5f;
  --ok-soft: #e0f1ea;
  --warn: #8a5a00;
  --warn-soft: #fbefd0;
  --danger: #b3261e;
  --logo-ticket: var(--surface);
  --shadow: 0 1px 0 rgba(20,30,40,.04), 0 6px 20px -8px rgba(20,30,40,.18);
  --flag: none;
  color-scheme: light;
}
:root[data-theme="lavendel-dark"] {
  --bg: #13111c;
  --surface: #1c1928;
  --surface-2: #252135;
  --ink: #ece8f7;
  --muted: #a59fbd;
  --line: #332d47;
  --accent: #b3a6f2;
  --accent-ink: #1b1430;
  --accent-soft: #2e2747;
  --signal: #f3d36b;
  --signal-ink: #3b2f00;
  --t-high: #b3a6f2;
  --t-mid: #8a7dc8;
  --t-low: #574d85;
  --t-rare: #3a3450;
  --ok: #8fd9b8;
  --ok-soft: #1d3a31;
  --warn: #f3d36b;
  --warn-soft: #3b3318;
  --danger: #ff9aa2;
  --logo-ticket: var(--bg);
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
  --flag: none;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="lavendel-auto"] {
    --bg: #13111c;
    --surface: #1c1928;
    --surface-2: #252135;
    --ink: #ece8f7;
    --muted: #a59fbd;
    --line: #332d47;
    --accent: #b3a6f2;
    --accent-ink: #1b1430;
    --accent-soft: #2e2747;
    --signal: #f3d36b;
    --signal-ink: #3b2f00;
    --t-high: #b3a6f2;
    --t-mid: #8a7dc8;
    --t-low: #574d85;
    --t-rare: #3a3450;
    --ok: #8fd9b8;
    --ok-soft: #1d3a31;
    --warn: #f3d36b;
    --warn-soft: #3b3318;
    --danger: #ff9aa2;
    --logo-ticket: var(--bg);
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
    --flag: none;
    color-scheme: dark;
  }
}
:root[data-theme="nebelwald-light"], :root[data-theme="nebelwald-auto"] {
  --bg: #f0f3ee;
  --surface: #fcfdfc;
  --surface-2: #e3e7e2;
  --ink: #1f2a22;
  --muted: #666e67;
  --line: #d3d7d1;
  --accent: #46684c;
  --accent-ink: #ffffff;
  --accent-soft: #e3e8e3;
  --signal: #d9b44a;
  --signal-ink: #302810;
  --t-high: #46684c;
  --t-mid: #829985;
  --t-low: #afbeb0;
  --t-rare: #cacfc9;
  --ok: #1f7a52;
  --ok-soft: #ddebe4;
  --warn: #8a5a00;
  --warn-soft: #fbefd0;
  --danger: #b3261e;
  --logo-ticket: var(--surface);
  --shadow: 0 1px 0 rgba(20,30,40,.04), 0 6px 20px -8px rgba(20,30,40,.18);
  --flag: none;
  color-scheme: light;
}
:root[data-theme="nebelwald-dark"] {
  --bg: #111712;
  --surface: #1d231e;
  --surface-2: #292e2a;
  --ink: #e2eadf;
  --muted: #8e968d;
  --line: #393e3a;
  --accent: #9cc79f;
  --accent-ink: #1c241d;
  --accent-soft: #2d3a2e;
  --signal: #e3c46a;
  --signal-ink: #2d2715;
  --t-high: #9cc79f;
  --t-mid: #708f72;
  --t-low: #495d4a;
  --t-rare: #3b413b;
  --ok: #7fd6b0;
  --ok-soft: #25392e;
  --warn: #e3c46a;
  --warn-soft: #333320;
  --danger: #ff8a80;
  --logo-ticket: var(--bg);
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
  --flag: none;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="nebelwald-auto"] {
    --bg: #111712;
    --surface: #1d231e;
    --surface-2: #292e2a;
    --ink: #e2eadf;
    --muted: #8e968d;
    --line: #393e3a;
    --accent: #9cc79f;
    --accent-ink: #1c241d;
    --accent-soft: #2d3a2e;
    --signal: #e3c46a;
    --signal-ink: #2d2715;
    --t-high: #9cc79f;
    --t-mid: #708f72;
    --t-low: #495d4a;
    --t-rare: #3b413b;
    --ok: #7fd6b0;
    --ok-soft: #25392e;
    --warn: #e3c46a;
    --warn-soft: #333320;
    --danger: #ff8a80;
    --logo-ticket: var(--bg);
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
    --flag: none;
    color-scheme: dark;
  }
}
:root[data-theme="mitternacht-light"], :root[data-theme="mitternacht-auto"] {
  --bg: #eef0f7;
  --surface: #fcfcfd;
  --surface-2: #e1e3eb;
  --ink: #1a1d33;
  --muted: #626576;
  --line: #d0d2dc;
  --accent: #363c86;
  --accent-ink: #ffffff;
  --accent-soft: #e0e1ec;
  --signal: #f0a830;
  --signal-ink: #35250b;
  --t-high: #363c86;
  --t-mid: #767bae;
  --t-low: #a8accc;
  --t-rare: #c8cad4;
  --ok: #1f7a52;
  --ok-soft: #ddeae5;
  --warn: #8a5a00;
  --warn-soft: #fbefd0;
  --danger: #b3261e;
  --logo-ticket: var(--surface);
  --shadow: 0 1px 0 rgba(20,30,40,.04), 0 6px 20px -8px rgba(20,30,40,.18);
  --flag: none;
  color-scheme: light;
}
:root[data-theme="mitternacht-dark"] {
  --bg: #0d0f22;
  --surface: #191b2d;
  --surface-2: #252738;
  --ink: #e6e7f5;
  --muted: #8f91a1;
  --line: #363848;
  --accent: #a3abff;
  --accent-ink: #1d1f2e;
  --accent-soft: #2b2e4e;
  --signal: #f5b748;
  --signal-ink: #31250e;
  --t-high: #a3abff;
  --t-mid: #7379b8;
  --t-low: #494d7a;
  --t-rare: #383a4c;
  --ok: #7fd6b0;
  --ok-soft: #22333c;
  --warn: #f5b748;
  --warn-soft: #322a28;
  --danger: #ff8a80;
  --logo-ticket: var(--bg);
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
  --flag: none;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="mitternacht-auto"] {
    --bg: #0d0f22;
    --surface: #191b2d;
    --surface-2: #252738;
    --ink: #e6e7f5;
    --muted: #8f91a1;
    --line: #363848;
    --accent: #a3abff;
    --accent-ink: #1d1f2e;
    --accent-soft: #2b2e4e;
    --signal: #f5b748;
    --signal-ink: #31250e;
    --t-high: #a3abff;
    --t-mid: #7379b8;
    --t-low: #494d7a;
    --t-rare: #383a4c;
    --ok: #7fd6b0;
    --ok-soft: #22333c;
    --warn: #f5b748;
    --warn-soft: #322a28;
    --danger: #ff8a80;
    --logo-ticket: var(--bg);
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
    --flag: none;
    color-scheme: dark;
  }
}
:root[data-theme="polarlicht-light"], :root[data-theme="polarlicht-auto"] {
  --bg: #edf4f4;
  --surface: #fbfdfd;
  --surface-2: #e0e8e8;
  --ink: #102a2c;
  --muted: #5b6f70;
  --line: #ced8d8;
  --accent: #0e6c71;
  --accent-ink: #ffffff;
  --accent-soft: #dae9e9;
  --signal: #9b6fe6;
  --signal-ink: #221833;
  --t-high: #0e6c71;
  --t-mid: #5c9c9f;
  --t-low: #98c0c2;
  --t-rare: #c5d0d0;
  --ok: #1f7a52;
  --ok-soft: #dcebe5;
  --warn: #8a5a00;
  --warn-soft: #fbefd0;
  --danger: #b3261e;
  --logo-ticket: var(--surface);
  --shadow: 0 1px 0 rgba(20,30,40,.04), 0 6px 20px -8px rgba(20,30,40,.18);
  --flag: none;
  color-scheme: light;
}
:root[data-theme="polarlicht-dark"] {
  --bg: #09161a;
  --surface: #152225;
  --surface-2: #222d31;
  --ink: #ddf0ef;
  --muted: #88999a;
  --line: #333e41;
  --accent: #5fd6cf;
  --accent-ink: #112725;
  --accent-soft: #1a3c3e;
  --signal: #c4a3ff;
  --signal-ink: #272133;
  --t-high: #5fd6cf;
  --t-mid: #439995;
  --t-low: #2b6362;
  --t-rare: #334245;
  --ok: #7fd6b0;
  --ok-soft: #1e3935;
  --warn: #c4a3ff;
  --warn-soft: #272d3f;
  --danger: #ff8a80;
  --logo-ticket: var(--bg);
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
  --flag: none;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="polarlicht-auto"] {
    --bg: #09161a;
    --surface: #152225;
    --surface-2: #222d31;
    --ink: #ddf0ef;
    --muted: #88999a;
    --line: #333e41;
    --accent: #5fd6cf;
    --accent-ink: #112725;
    --accent-soft: #1a3c3e;
    --signal: #c4a3ff;
    --signal-ink: #272133;
    --t-high: #5fd6cf;
    --t-mid: #439995;
    --t-low: #2b6362;
    --t-rare: #334245;
    --ok: #7fd6b0;
    --ok-soft: #1e3935;
    --warn: #c4a3ff;
    --warn-soft: #272d3f;
    --danger: #ff8a80;
    --logo-ticket: var(--bg);
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
    --flag: none;
    color-scheme: dark;
  }
}
:root[data-theme="eisvogel-light"], :root[data-theme="eisvogel-auto"] {
  --bg: #eef6f6;
  --surface: #fcfdfd;
  --surface-2: #e1eaea;
  --ink: #0f2a2e;
  --muted: #5b6f72;
  --line: #cfd9da;
  --accent: #00727e;
  --accent-ink: #ffffff;
  --accent-soft: #d9eaeb;
  --signal: #f07a2b;
  --signal-ink: #351b09;
  --t-high: #00727e;
  --t-mid: #53a0a8;
  --t-low: #94c4c8;
  --t-rare: #c6d1d2;
  --ok: #1f7a52;
  --ok-soft: #ddebe5;
  --warn: #8a5a00;
  --warn-soft: #fbefd0;
  --danger: #b3261e;
  --logo-ticket: var(--surface);
  --shadow: 0 1px 0 rgba(20,30,40,.04), 0 6px 20px -8px rgba(20,30,40,.18);
  --flag: none;
  color-scheme: light;
}
:root[data-theme="eisvogel-dark"] {
  --bg: #0a1719;
  --surface: #162324;
  --surface-2: #222e30;
  --ink: #dff1f1;
  --muted: #8a9a9b;
  --line: #343e40;
  --accent: #4fd0d9;
  --accent-ink: #0e2527;
  --accent-soft: #183c3f;
  --signal: #ff9d57;
  --signal-ink: #331f11;
  --t-high: #4fd0d9;
  --t-mid: #39959c;
  --t-low: #266166;
  --t-rare: #354344;
  --ok: #7fd6b0;
  --ok-soft: #1f3934;
  --warn: #ff9d57;
  --warn-soft: #312c23;
  --danger: #ff8a80;
  --logo-ticket: var(--bg);
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
  --flag: none;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="eisvogel-auto"] {
    --bg: #0a1719;
    --surface: #162324;
    --surface-2: #222e30;
    --ink: #dff1f1;
    --muted: #8a9a9b;
    --line: #343e40;
    --accent: #4fd0d9;
    --accent-ink: #0e2527;
    --accent-soft: #183c3f;
    --signal: #ff9d57;
    --signal-ink: #331f11;
    --t-high: #4fd0d9;
    --t-mid: #39959c;
    --t-low: #266166;
    --t-rare: #354344;
    --ok: #7fd6b0;
    --ok-soft: #1f3934;
    --warn: #ff9d57;
    --warn-soft: #312c23;
    --danger: #ff8a80;
    --logo-ticket: var(--bg);
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
    --flag: none;
    color-scheme: dark;
  }
}
:root[data-theme="rapsfeld-light"], :root[data-theme="rapsfeld-auto"] {
  --bg: #f8f6e8;
  --surface: #fefdfa;
  --surface-2: #ebe9dc;
  --ink: #22231a;
  --muted: #6b6b60;
  --line: #dad8cb;
  --accent: #2d5c99;
  --accent-ink: #ffffff;
  --accent-soft: #e1e6ec;
  --signal: #e8c21f;
  --signal-ink: #332b07;
  --t-high: #2d5c99;
  --t-mid: #7492b5;
  --t-low: #abbbca;
  --t-rare: #d1d0c3;
  --ok: #1f7a52;
  --ok-soft: #dfebe2;
  --warn: #8a5a00;
  --warn-soft: #fbefd0;
  --danger: #b3261e;
  --logo-ticket: var(--surface);
  --shadow: 0 1px 0 rgba(20,30,40,.04), 0 6px 20px -8px rgba(20,30,40,.18);
  --flag: none;
  color-scheme: light;
}
:root[data-theme="rapsfeld-dark"] {
  --bg: #13140f;
  --surface: #1f201b;
  --surface-2: #2b2c27;
  --ink: #f0eedb;
  --muted: #989789;
  --line: #3b3c38;
  --accent: #8cb8ef;
  --accent-ink: #19212b;
  --accent-soft: #2b353c;
  --signal: #f4d03f;
  --signal-ink: #312a0d;
  --t-high: #8cb8ef;
  --t-mid: #6584a7;
  --t-low: #435669;
  --t-rare: #3f4038;
  --ok: #7fd6b0;
  --ok-soft: #26372c;
  --warn: #f4d03f;
  --warn-soft: #373217;
  --danger: #ff8a80;
  --logo-ticket: var(--bg);
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
  --flag: none;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="rapsfeld-auto"] {
    --bg: #13140f;
    --surface: #1f201b;
    --surface-2: #2b2c27;
    --ink: #f0eedb;
    --muted: #989789;
    --line: #3b3c38;
    --accent: #8cb8ef;
    --accent-ink: #19212b;
    --accent-soft: #2b353c;
    --signal: #f4d03f;
    --signal-ink: #312a0d;
    --t-high: #8cb8ef;
    --t-mid: #6584a7;
    --t-low: #435669;
    --t-rare: #3f4038;
    --ok: #7fd6b0;
    --ok-soft: #26372c;
    --warn: #f4d03f;
    --warn-soft: #373217;
    --danger: #ff8a80;
    --logo-ticket: var(--bg);
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
    --flag: none;
    color-scheme: dark;
  }
}
:root[data-theme="himbeere-light"], :root[data-theme="himbeere-auto"] {
  --bg: #fbf3f5;
  --surface: #fefdfd;
  --surface-2: #efe6e8;
  --ink: #2e1720;
  --muted: #746268;
  --line: #ded4d7;
  --accent: #ad1f4d;
  --accent-ink: #ffffff;
  --accent-soft: #f3dee4;
  --signal: #86b866;
  --signal-ink: #1d2816;
  --t-high: #ad1f4d;
  --t-mid: #c86988;
  --t-low: #dda2b5;
  --t-rare: #d6cbcf;
  --ok: #1f7a52;
  --ok-soft: #dfebe5;
  --warn: #8a5a00;
  --warn-soft: #fbefd0;
  --danger: #b3261e;
  --logo-ticket: var(--surface);
  --shadow: 0 1px 0 rgba(20,30,40,.04), 0 6px 20px -8px rgba(20,30,40,.18);
  --flag: none;
  color-scheme: light;
}
:root[data-theme="himbeere-dark"] {
  --bg: #1a0f13;
  --surface: #251b1f;
  --surface-2: #31272b;
  --ink: #f6e6ec;
  --muted: #9e9095;
  --line: #41383b;
  --accent: #ff7fa3;
  --accent-ink: #2e171d;
  --accent-soft: #482530;
  --signal: #b5dc8f;
  --signal-ink: #242c1d;
  --t-high: #ff7fa3;
  --t-mid: #b65b75;
  --t-low: #763c4d;
  --t-rare: #463a3e;
  --ok: #7fd6b0;
  --ok-soft: #2c332f;
  --warn: #b5dc8f;
  --warn-soft: #333027;
  --danger: #ff8a80;
  --logo-ticket: var(--bg);
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
  --flag: none;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="himbeere-auto"] {
    --bg: #1a0f13;
    --surface: #251b1f;
    --surface-2: #31272b;
    --ink: #f6e6ec;
    --muted: #9e9095;
    --line: #41383b;
    --accent: #ff7fa3;
    --accent-ink: #2e171d;
    --accent-soft: #482530;
    --signal: #b5dc8f;
    --signal-ink: #242c1d;
    --t-high: #ff7fa3;
    --t-mid: #b65b75;
    --t-low: #763c4d;
    --t-rare: #463a3e;
    --ok: #7fd6b0;
    --ok-soft: #2c332f;
    --warn: #b5dc8f;
    --warn-soft: #333027;
    --danger: #ff8a80;
    --logo-ticket: var(--bg);
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
    --flag: none;
    color-scheme: dark;
  }
}
:root[data-theme="schiefer-light"], :root[data-theme="schiefer-auto"] {
  --bg: #ecefef;
  --surface: #fbfcfc;
  --surface-2: #dfe3e3;
  --ink: #1b1f22;
  --muted: #626668;
  --line: #cfd2d2;
  --accent: #33474f;
  --accent-ink: #ffffff;
  --accent-soft: #dfe3e4;
  --signal: #2fb88a;
  --signal-ink: #0a281e;
  --t-high: #33474f;
  --t-mid: #748287;
  --t-low: #a6afb2;
  --t-rare: #c6caca;
  --ok: #1f7a52;
  --ok-soft: #dceae4;
  --warn: #8a5a00;
  --warn-soft: #fbefd0;
  --danger: #b3261e;
  --logo-ticket: var(--surface);
  --shadow: 0 1px 0 rgba(20,30,40,.04), 0 6px 20px -8px rgba(20,30,40,.18);
  --flag: none;
  color-scheme: light;
}
:root[data-theme="schiefer-dark"] {
  --bg: #101315;
  --surface: #1c1f21;
  --surface-2: #282b2c;
  --ink: #e4e8ea;
  --muted: #8f9395;
  --line: #393b3d;
  --accent: #8fd8c3;
  --accent-ink: #1a2723;
  --accent-soft: #293a38;
  --signal: #f2d16b;
  --signal-ink: #302a15;
  --t-high: #8fd8c3;
  --t-mid: #66998b;
  --t-low: #43625b;
  --t-rare: #3a3e40;
  --ok: #7fd6b0;
  --ok-soft: #243631;
  --warn: #f2d16b;
  --warn-soft: #343123;
  --danger: #ff8a80;
  --logo-ticket: var(--bg);
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
  --flag: none;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="schiefer-auto"] {
    --bg: #101315;
    --surface: #1c1f21;
    --surface-2: #282b2c;
    --ink: #e4e8ea;
    --muted: #8f9395;
    --line: #393b3d;
    --accent: #8fd8c3;
    --accent-ink: #1a2723;
    --accent-soft: #293a38;
    --signal: #f2d16b;
    --signal-ink: #302a15;
    --t-high: #8fd8c3;
    --t-mid: #66998b;
    --t-low: #43625b;
    --t-rare: #3a3e40;
    --ok: #7fd6b0;
    --ok-soft: #243631;
    --warn: #f2d16b;
    --warn-soft: #343123;
    --danger: #ff8a80;
    --logo-ticket: var(--bg);
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
    --flag: none;
    color-scheme: dark;
  }
}
:root[data-theme="abendglut-light"], :root[data-theme="abendglut-auto"] {
  --bg: #fff4ef;
  --surface: #fffdfc;
  --surface-2: #f3e6e3;
  --ink: #34121f;
  --muted: #795f66;
  --line: #e3d4d2;
  --accent: #a30262;
  --accent-ink: #ffffff;
  --accent-soft: #f2dae6;
  --signal: #e8641c;
  --signal-ink: #331606;
  --t-high: #a30262;
  --t-mid: #c35793;
  --t-low: #dc98b9;
  --t-rare: #dacbca;
  --ok: #1f7a52;
  --ok-soft: #e0ebe4;
  --warn: #8a5a00;
  --warn-soft: #fbefd0;
  --danger: #b3261e;
  --logo-ticket: var(--surface);
  --shadow: 0 1px 0 rgba(20,30,40,.04), 0 6px 20px -8px rgba(20,30,40,.18);
  --flag: none;
  color-scheme: light;
}
:root[data-theme="abendglut-dark"] {
  --bg: #1c0e14;
  --surface: #271a20;
  --surface-2: #33262c;
  --ink: #fbe9ef;
  --muted: #a29197;
  --line: #43373c;
  --accent: #ee8fc8;
  --accent-ink: #2b1a24;
  --accent-soft: #462838;
  --signal: #ff9a56;
  --signal-ink: #331f11;
  --t-high: #ee8fc8;
  --t-mid: #ab668e;
  --t-low: #70425c;
  --t-rare: #493a40;
  --ok: #7fd6b0;
  --ok-soft: #2e3230;
  --warn: #ff9a56;
  --warn-soft: #40241f;
  --danger: #ff8a80;
  --logo-ticket: var(--bg);
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
  --flag: none;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="abendglut-auto"] {
    --bg: #1c0e14;
    --surface: #271a20;
    --surface-2: #33262c;
    --ink: #fbe9ef;
    --muted: #a29197;
    --line: #43373c;
    --accent: #ee8fc8;
    --accent-ink: #2b1a24;
    --accent-soft: #462838;
    --signal: #ff9a56;
    --signal-ink: #331f11;
    --t-high: #ee8fc8;
    --t-mid: #ab668e;
    --t-low: #70425c;
    --t-rare: #493a40;
    --ok: #7fd6b0;
    --ok-soft: #2e3230;
    --warn: #ff9a56;
    --warn-soft: #40241f;
    --danger: #ff8a80;
    --logo-ticket: var(--bg);
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
    --flag: none;
    color-scheme: dark;
  }
}
:root[data-theme="zuckerwatte-light"], :root[data-theme="zuckerwatte-auto"] {
  --bg: #f2f9ff;
  --surface: #fcfeff;
  --surface-2: #e5ecf3;
  --ink: #13283a;
  --muted: #5f6f7d;
  --line: #d3dce3;
  --accent: #1d77a6;
  --accent-ink: #ffffff;
  --accent-soft: #ddebf3;
  --signal: #ef8fa4;
  --signal-ink: #351f24;
  --t-high: #1d77a6;
  --t-mid: #68a4c5;
  --t-low: #a1c8dd;
  --t-rare: #cad3dc;
  --ok: #1f7a52;
  --ok-soft: #ddece7;
  --warn: #8a5a00;
  --warn-soft: #fbefd0;
  --danger: #b3261e;
  --logo-ticket: var(--surface);
  --shadow: 0 1px 0 rgba(20,30,40,.04), 0 6px 20px -8px rgba(20,30,40,.18);
  --flag: none;
  color-scheme: light;
}
:root[data-theme="zuckerwatte-dark"] {
  --bg: #0e1722;
  --surface: #1a232d;
  --surface-2: #262e38;
  --ink: #e9f5ff;
  --muted: #919ca7;
  --line: #373e48;
  --accent: #5bcefa;
  --accent-ink: #10252d;
  --accent-soft: #1d3c4d;
  --signal: #f5a9b8;
  --signal-ink: #312225;
  --t-high: #5bcefa;
  --t-mid: #4293b5;
  --t-low: #2d6078;
  --t-rare: #3a434e;
  --ok: #7fd6b0;
  --ok-soft: #22393c;
  --warn: #f5a9b8;
  --warn-soft: #332e3a;
  --danger: #ff8a80;
  --logo-ticket: var(--bg);
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
  --flag: none;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="zuckerwatte-auto"] {
    --bg: #0e1722;
    --surface: #1a232d;
    --surface-2: #262e38;
    --ink: #e9f5ff;
    --muted: #919ca7;
    --line: #373e48;
    --accent: #5bcefa;
    --accent-ink: #10252d;
    --accent-soft: #1d3c4d;
    --signal: #f5a9b8;
    --signal-ink: #312225;
    --t-high: #5bcefa;
    --t-mid: #4293b5;
    --t-low: #2d6078;
    --t-rare: #3a434e;
    --ok: #7fd6b0;
    --ok-soft: #22393c;
    --warn: #f5a9b8;
    --warn-soft: #332e3a;
    --danger: #ff8a80;
    --logo-ticket: var(--bg);
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6);
    --flag: none;
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 16px/1.5 "Atkinson", system-ui, sans-serif;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, .price, .brand span { font-family: "Bricolage", system-ui, sans-serif; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; line-height: 1.15; margin: 0 0 16px; font-weight: 800; }
h2 { font-size: 1.15rem; margin: 0 0 10px; font-weight: 600; }
a { color: var(--accent); }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- header & tabs ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.1rem; margin-right: auto; }
.tabs { display: flex; gap: 4px; }
.tabs a { position: relative; color: var(--muted); text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 999px; }
.tabs a.on { color: var(--accent-ink); background: var(--accent); }
.tabs .badge { position: static; margin-left: 6px; }
@media (max-width: 720px) {
  /* backdrop-filter would make the header the containing block of the fixed tab bar */
  .topbar { backdrop-filter: none; background: var(--bg); }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; justify-content: space-around;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }
  .tabs a { flex: 1; text-align: center; padding: 10px 8px; }
}
@media (min-width: 721px) { body { padding-bottom: 32px; } }
.icon-btn { position: relative; display: inline-grid; place-items: center; background: none; border: 0; color: var(--ink); cursor: pointer; width: 44px; height: 44px; border-radius: 12px; }
.icon-btn:hover { background: var(--surface-2); }
.badge { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--signal); color: var(--signal-ink); font-size: .72rem; font-weight: 700; display: inline-grid; place-items: center; }

main { max-width: 1040px; margin: 0 auto; padding: 20px 16px; }
.page-title { margin-bottom: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }

/* ---------- forms ---------- */
label, .field { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 700; color: var(--ink); margin-bottom: 12px; min-width: 0; position: relative; }
.label { font-size: .9rem; font-weight: 700; }
input, select, textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--surface-2); border: 1.5px solid transparent;
  border-radius: 12px; padding: 10px 12px; width: 100%; min-height: 48px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); }
input::placeholder { color: var(--muted); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 160px; }
.row.three > * { flex: 1 1 180px; }
.grow { flex: 2 1 220px; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline input { flex: 1 1 180px; width: auto; }
.hint { color: var(--muted); font-size: .88rem; margin: -4px 0 12px; text-wrap: pretty; }
.error { color: var(--danger); min-height: 1.2em; margin: 8px 0 0; }
.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; }
.check input { width: 22px; min-height: 22px; accent-color: var(--accent); }
details.more > summary { cursor: pointer; font-weight: 700; color: var(--accent); margin: 4px 0 14px; width: fit-content; }

.btn {
  font: inherit; font-weight: 700; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 10px 16px; border-radius: 12px; cursor: pointer; min-height: 44px; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.wide { width: 100%; }
.btn.big { min-height: 54px; font-size: 1.05rem; margin-top: 4px; }
.btn.small { min-height: 38px; padding: 6px 12px; font-size: .9rem; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .55; cursor: progress; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: -2px 0 12px; }
.chips button { font: inherit; font-size: .9rem; font-weight: 700; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 14px; cursor: pointer; min-height: 38px; }
.chips button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 4px; min-height: 48px; gap: 4px; }
.seg button { flex: 1; border: 0; background: none; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; border-radius: 9px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* stations with chips */
.route { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0 8px; align-items: start; }
.swap { margin-top: 30px; width: 44px; height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.swap svg { transform: rotate(90deg); }
@media (max-width: 600px) {
  .route { grid-template-columns: 1fr; }
  .swap { margin: -6px 0 6px auto; height: 40px; }
  .swap svg { transform: none; }
}
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--surface-2); border-radius: 12px; padding: 6px; min-height: 48px; border: 1.5px solid transparent; }
.chips-input:focus-within { border-color: var(--accent); background: var(--surface); }
.chips-input input { flex: 1 1 120px; border: 0; background: none; min-height: 34px; padding: 4px 6px; }
.chips-input input:focus { border: 0; }
.st-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--accent); font-weight: 700; border-radius: 8px; padding: 4px 4px 4px 10px; font-size: .92rem; }
.st-chip button { border: 0; background: none; color: inherit; cursor: pointer; width: 26px; height: 26px; border-radius: 6px; font-size: 1rem; line-height: 1; }
.st-chip button:hover { background: color-mix(in srgb, var(--accent) 15%, transparent); }
.ac-list { position: absolute; z-index: 30; top: 100%; left: 0; right: 0; margin: 4px 0 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); display: none; font-weight: 400; }
.ac-list.open { display: block; }
.ac-list li { padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.ac-list li:hover, .ac-list li.active { background: var(--surface-2); }

.date-field { position: relative; display: flex; }
.date-field input[name] { padding-right: 52px; font-variant-numeric: tabular-nums; }
.date-field .cal { position: absolute; right: 2px; top: 2px; }
.native-date { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; padding: 0; min-height: 0; border: 0; }

/* ---------- status ---------- */
.status { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; }
.status.err { border-color: var(--danger); color: var(--danger); }
.progress { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--surface-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- results ---------- */
.res-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 14px; }
.res-head h2 { margin: 0; font-size: 1.3rem; }
.res-head .chips { margin: 0; }
.tier { margin-bottom: 26px; }
.tier-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; flex-wrap: wrap; }
.tier-head h3 { margin: 0; font-size: 1.05rem; }
.tier-head .hint { margin: 0; }
.tier-head .swatch { width: 12px; height: 12px; border-radius: 4px; background: var(--tc); align-self: center; }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
@media (max-width: 420px) { .cards { grid-template-columns: 1fr; } }

/* the ticket stub: main part + perforated price stub */
.stub {
  --notch: 10px;
  display: grid; grid-template-columns: 1fr 104px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow);
  border: 1px solid var(--line);
  -webkit-mask: radial-gradient(circle var(--notch) at calc(100% - 104px) 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at calc(100% - 104px) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle var(--notch) at calc(100% - 104px) 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at calc(100% - 104px) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
}
.stub-main { padding: 14px 14px 12px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stub-side { border-left: 2px dashed var(--line); padding: 14px 12px; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; text-align: right; background: color-mix(in srgb, var(--tc) 10%, var(--surface)); border-radius: 0 16px 16px 0; }
.stub-date { font-weight: 700; }
.stub-date small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.stub-trains { font-family: "Bricolage", system-ui, sans-serif; font-weight: 600; font-size: 1.05rem; }
.stub-meta { color: var(--muted); font-size: .88rem; }
.price { font-weight: 800; font-size: 1.45rem; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price.cheap { background: var(--signal); color: var(--signal-ink); padding: 5px 7px; border-radius: 8px; font-size: 1.3rem; }
.pct { font-family: "Bricolage", system-ui, sans-serif; font-weight: 800; font-size: 1.3rem; color: var(--ink); line-height: 1; }
.pct-label { font-size: .75rem; color: var(--muted); }
.bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 2px; }
.bar i { display: block; height: 100%; background: var(--tc); border-radius: 999px; }
.facts { font-size: .82rem; color: var(--muted); }
.cpf { font-size: .9rem; }
.cpf b { font-variant-numeric: tabular-nums; }
.stub-actions { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.stub-actions .btn { flex: 1 1 auto; }

/* ---------- tickets ---------- */
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.head-row .page-title { margin: 0; }
.ticket { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.ticket.lifted { border: 2px solid var(--ok); }
.ticket-head { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; background: none; border: 0; padding: 0; width: 100%; text-align: left; color: inherit; font: inherit; }
.ticket-route { font-family: "Bricolage", system-ui, sans-serif; font-weight: 600; font-size: 1.08rem; }
.ticket-sub { color: var(--muted); font-size: .9rem; }
.st { font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 4px 10px; white-space: nowrap; align-self: flex-start; background: var(--surface-2); color: var(--muted); }
.st-aufgehoben { background: var(--ok); color: var(--surface); }
.st-gekauft { background: var(--accent-soft); color: var(--accent); }
.note { border-radius: 12px; padding: 12px 14px; margin: 12px 0 0; font-size: .95rem; }
.note.ok { background: var(--ok-soft); }
.note.warn { background: var(--warn-soft); }
.note b { font-weight: 700; }
.ticket-body { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 14px; }
.legs { list-style: none; padding: 0; margin: 0 0 12px; }
.legs li { padding: 4px 0; }
.late { color: var(--danger); font-weight: 700; }
.ontime { color: var(--ok); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 10px 0; }
.shot { position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.shot .del { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 999px; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.shot .pdf { display: grid; place-items: center; height: 100%; font-weight: 700; color: var(--muted); text-decoration: none; }
.upload { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px; border: 2px dashed var(--line); border-radius: 14px; padding: 16px; cursor: pointer; color: var(--accent); font-weight: 700; margin: 10px 0; }
.upload:hover { border-color: var(--accent); }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.log { font-size: .85rem; color: var(--muted); max-height: 200px; overflow: auto; padding-left: 18px; margin: 6px 0 0; }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }

/* ---------- auth ---------- */
.auth { max-width: 420px; margin: 4vh auto 0; text-align: center; }
.auth h1 { font-size: 2.2rem; margin: 12px 0 6px; }
.lede { color: var(--muted); margin: 0 0 20px; }
.auth-seg { margin-bottom: 12px; }
.auth .panel { text-align: left; }

/* ---------- settings ---------- */
.families { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, calc(50% - 5px)), 1fr)); gap: 10px; }
.family { border: 2px solid var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; align-items: stretch; gap: 6px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.family:hover { border-color: var(--accent); }
.family.on { border-color: var(--accent); }
.family-name { font-weight: 700; line-height: 1.2; }
.family-desc { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.sw { width: 100%; height: 34px; border-radius: 9px; display: block; }
.sw-bahnsteig { background: linear-gradient(90deg, #eef1f3 0 25%, #1e5b4f 25% 50%, #0f1619 50% 75%, #6fd3b5 75%); }
.sw-rose { background: linear-gradient(90deg, #fbf4f5 0 25%, #b05a77 25% 50%, #181116 50% 75%, #f2a7c3 75%); }
.sw-ostsee { background: linear-gradient(90deg, #edf2f6 0 25%, #1d5c8a 25% 50%, #0c1620 50% 75%, #7db7e8 75%); }
.sw-lavendel { background: linear-gradient(90deg, #f4f2f9 0 25%, #5b4fa0 25% 50%, #13111c 50% 75%, #b3a6f2 75%); }
.sw-nebelwald { background: linear-gradient(90deg, #f0f3ee 0 25%, #46684c 25% 50%, #111712 50% 75%, #9cc79f 75%); }
.sw-mitternacht { background: linear-gradient(90deg, #eef0f7 0 25%, #363c86 25% 50%, #0d0f22 50% 75%, #a3abff 75%); }
.sw-polarlicht { background: linear-gradient(90deg, #edf4f4 0 25%, #0e6c71 25% 50%, #09161a 50% 75%, #5fd6cf 75%); }
.sw-eisvogel { background: linear-gradient(90deg, #eef6f6 0 25%, #00727e 25% 50%, #0a1719 50% 75%, #4fd0d9 75%); }
.sw-rapsfeld { background: linear-gradient(90deg, #f8f6e8 0 25%, #2d5c99 25% 50%, #13140f 50% 75%, #8cb8ef 75%); }
.sw-himbeere { background: linear-gradient(90deg, #fbf3f5 0 25%, #ad1f4d 25% 50%, #1a0f13 50% 75%, #ff7fa3 75%); }
.sw-schiefer { background: linear-gradient(90deg, #ecefef 0 25%, #33474f 25% 50%, #101315 50% 75%, #8fd8c3 75%); }
.sw-abendglut { background: linear-gradient(90deg, #fff4ef 0 25%, #e8641c 25% 50%, #a30262 50% 75%, #ee8fc8 75%); }
.sw-zuckerwatte { background: linear-gradient(90deg, #f2f9ff 0 25%, #5bcefa 25% 50%, #f5a9b8 50% 75%, #1d77a6 75%); }
.theme-mode { min-height: 38px; margin-left: auto; }
.theme-mode button { padding: 0 12px; font-size: .88rem; }
.invites { list-style: none; padding: 0; margin: 12px 0 0; }
.invites li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.code-box { margin: 12px 0; padding: 14px; border-radius: 14px; background: var(--accent-soft); }
.code { font-family: "Bricolage", system-ui, sans-serif; font-weight: 800; font-size: 1.5rem; letter-spacing: .06em; color: var(--accent); user-select: all; }
.howto { padding-left: 20px; margin: 0 0 12px; max-width: 70ch; }
.howto li { margin-bottom: 8px; }
.sub { font-size: 1rem; margin: 20px 0 10px; }
.align-end { justify-content: flex-end; }
.align-end .btn { min-height: 48px; }
.chips.tight { margin: 0; gap: 6px; }
.chips.tight button { padding: 4px 10px; min-height: 34px; font-size: .85rem; }

/* switches */
.toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 16px; margin-bottom: 8px; }
.switch { flex-direction: row; align-items: center; gap: 12px; font-weight: 400; cursor: pointer; margin-bottom: 8px; min-height: 36px; }
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; min-height: 24px; padding: 0; border-radius: 999px; background: var(--line); position: relative; flex: none; cursor: pointer; border: 0; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- dialog & toast ---------- */
.sheet { border: 0; padding: 0; border-radius: 20px; width: min(560px, calc(100vw - 24px)); max-height: 88vh; background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.sheet::backdrop { background: rgba(10,20,25,.5); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.sheet-head h2 { margin: 0; }
#dlg-body { padding: 16px 20px 20px; }
@media (max-width: 600px) { .sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 20px 20px 0 0; max-height: 92vh; } }
.notif { padding: 12px 0; border-bottom: 1px solid var(--line); }
.notif.unread .notif-title::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: middle; }
.notif-title { font-weight: 700; }
.notif small { color: var(--muted); }
.pick { width: 100%; justify-content: space-between; text-align: left; margin-bottom: 8px; white-space: normal; }
.pick .price { font-size: 1.1rem; }
.manual-results { margin-top: 14px; }
.zoom img { width: 100%; border-radius: 12px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(90px + env(safe-area-inset-bottom)); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; z-index: 50; max-width: calc(100vw - 32px); box-shadow: var(--shadow); font-weight: 700; }

/* ---------- price alerts & decisions ---------- */
.watches { list-style: none; margin: 8px 0 0; padding: 0; }
.watches li { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.watches li:first-child { border-top: 0; }
.watch-main { display: flex; flex-direction: column; gap: 2px; }
.watch-main .hint { margin: 0; }
#watch-btn { margin-top: 8px; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.choice > div { background: var(--surface); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.big-num { font-family: "Bricolage", system-ui, sans-serif; font-weight: 800; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.choice small { color: var(--muted); }
.note:not(.ok):not(.warn) { background: var(--surface-2); }

/* ---------- info button + floating tooltip (no layout shift) ---------- */
.label-row { display: flex; align-items: center; gap: 8px; }
.label-row .label { margin: 0; }
.info {
  width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--accent); background: none; color: var(--accent);
  font: 700 .8rem/1 "Bricolage", system-ui, sans-serif; cursor: help; display: inline-grid; place-items: center; padding: 0; flex: none;
}
.info:hover, .info[aria-expanded="true"] { background: var(--accent); color: var(--accent-ink); }
.head-row .info { margin-left: auto; }
.head-row h2 { margin: 0; }
.tooltip {
  position: fixed; z-index: 100; max-width: min(320px, calc(100vw - 24px)); padding: 10px 12px; border-radius: 12px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 12px 32px -8px rgba(0,0,0,.35);
  font-size: .88rem; line-height: 1.45; pointer-events: none; text-wrap: pretty;
}
.tooltip.wide { max-width: min(340px, calc(100vw - 24px)); }

/* password row: button sits on the input baseline */
.pw-row > .btn, #profile-form .btn { flex: 0 0 auto; margin-bottom: 12px; min-height: 48px; }
.stock-add > .btn { flex: 0 0 auto; margin-bottom: 12px; min-height: 48px; }

/* ---------- stock ---------- */
.stock { list-style: none; margin: 12px 0 8px; padding: 0; }
.stock li { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.stock li:first-child { border-top: 0; }
.stock-route { font-family: "Bricolage", system-ui, sans-serif; font-weight: 600; font-size: 1.05rem; flex: 1 1 180px; }
.stock-count { font-size: .9rem; color: var(--muted); }
.stock-count b { color: var(--ink); font-variant-numeric: tabular-nums; }
.stock-count.low b { color: var(--danger); }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.stepper button { width: 38px; height: 38px; border: 0; background: var(--surface); color: var(--ink); font: 700 1.1rem/1 system-ui; cursor: pointer; }
.stepper button:hover { background: var(--surface-2); }
.stepper span { min-width: 34px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.dots { display: inline-flex; gap: 4px; vertical-align: middle; margin-right: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); border: 1.5px solid var(--line); }
.dots i.on { background: var(--accent); border-color: var(--accent); }
.dots i.half { background: var(--accent-soft); border-color: var(--accent); }
.group-head { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 10px; flex-wrap: wrap; }
.group-head h2 { margin: 0; }
.group-head .hint { margin: 0; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; margin: 6px 0 14px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* ---------- themed logo ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.logo-bg { fill: var(--accent); }
.logo-ticket { fill: var(--logo-ticket); }
.logo-perf { stroke: var(--accent); fill: none; }
.logo-bolt { fill: var(--signal); stroke: var(--accent); }

/* ---------- running search, visible on other tabs ---------- */
.job-pill {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(78px + env(safe-area-inset-bottom)); width: min(420px, calc(100vw - 24px));
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 6px 10px; align-items: center;
  padding: 10px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  box-shadow: 0 12px 32px -10px rgba(0,0,0,.35); font: inherit; font-weight: 700; text-align: left; cursor: pointer;
}
.job-pill .progress { grid-column: 1 / -1; }
.job-pill .spinner { width: 16px; height: 16px; }
@media (min-width: 721px) { .job-pill { bottom: 24px; left: auto; right: 24px; transform: none; width: 340px; } }
.badge.dot { min-width: 8px; width: 8px; height: 8px; padding: 0; margin-left: 6px; background: var(--signal); vertical-align: middle; }

/* ---------- history chart (inside the tooltip) ---------- */
.hist-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--accent); font: inherit; font-size: .82rem; font-weight: 700; cursor: help; padding: 2px 0; }
.hist-btn svg { flex: none; }
.chart-title { font-weight: 700; margin-bottom: 6px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: .78rem; color: var(--muted); }
.chart .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* ---------- results toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 18px; }
.toolbar .group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar .group > span { font-size: .85rem; font-weight: 700; color: var(--muted); }
.toolbar .chips { margin: 0; }
.toolbar input[type="range"] { width: 140px; min-height: 0; padding: 0; accent-color: var(--accent); background: none; }
.toolbar .price-val { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 5ch; }
.toolbar .switch { margin: 0; }
@media (max-width: 600px) {
  .toolbar { gap: 10px; }
  .toolbar .group { flex-wrap: nowrap; width: 100%; }
  .toolbar .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .toolbar .chips button { flex: none; }
  .toolbar input[type="range"] { flex: 1; width: auto; }
}

/* ---------- grouped results: a small stack of tickets ---------- */
.stack { position: relative; }
.stack.open::before, .stack.open::after { display: none; }
.stack.closed::before, .stack.closed::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: 100%; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); z-index: -1;
}
.stack.closed::before { bottom: -6px; left: 6px; right: 6px; opacity: .9; }
.stack.closed::after { bottom: -11px; left: 14px; right: 14px; opacity: .6; }
.stack { isolation: isolate; margin-bottom: 10px; }
.stack > .stub { position: relative; z-index: 1; }
.stack-foot { position: relative; margin: -10px 10px 0; padding: 18px 12px 8px; background: var(--surface-2); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; }
.stack-toggle { width: 100%; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; padding: 4px 0; text-align: left; }
.stack-toggle .count { margin-left: auto; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 10px; font-size: .82rem; font-variant-numeric: tabular-nums; }
.stack-toggle .chev { transition: transform .15s; }
.stack.open .stack-toggle .chev { transform: rotate(180deg); }
.dates { list-style: none; margin: 8px 0 0; padding: 0; border-top: 2px dashed var(--line); }
.dates li { display: grid; grid-template-columns: 1fr auto auto; gap: 6px 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.dates li:last-child { border-bottom: 0; }
.dates .d-date { font-weight: 700; }
.dates .d-date small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.dates .d-price { font-family: "Bricolage", system-ui, sans-serif; font-weight: 800; font-variant-numeric: tabular-nums; }
.dates .d-pct { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; text-align: right; min-width: 4ch; }
.dates .d-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.dates .d-actions .btn { flex: 1; }
.dates .best .d-date::after { content: "beste Wahl"; margin-left: 8px; font-size: .72rem; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 1px 8px; vertical-align: 1px; }
.notes { margin: -6px 0 16px; padding: 0; list-style: none; }
.notes li { background: var(--warn-soft); border-radius: 12px; padding: 10px 12px; font-size: .9rem; margin-bottom: 6px; }
.assumed { background: var(--surface-2); border-radius: 12px; padding: 12px; margin: 0 0 14px; }
.assumed p { margin: 0 0 6px; }
.assumed form { margin-top: 10px; }
.assumed input, .assumed select, .assumed .seg { background: var(--surface); }
.assumed .seg button.on { background: var(--surface-2); }

/* ---------- round 6 ---------- */

/* Blåhaj, peeking from the corner in two themes */
.blahaj { display: none; position: fixed; z-index: 15; right: 16px; bottom: 0; width: 104px; transform: translateY(32%); transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
:root[data-theme^="abendglut-"] .blahaj, :root[data-theme^="zuckerwatte-"] .blahaj { display: block; }
.blahaj img { display: block; width: 100%; height: auto; filter: drop-shadow(0 4px 6px rgba(0,0,0,.22)); }
.blahaj:hover, .blahaj.up { transform: translateY(6%); }
.blahaj-says { position: absolute; right: 72%; top: -6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px 12px 2px 12px;
  padding: 3px 9px; font-size: .8rem; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow); opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; pointer-events: none; }
.blahaj:hover .blahaj-says, .blahaj.up .blahaj-says { opacity: 1; transform: none; }
@media (max-width: 720px) {
  /* sits on the tab bar's edge, half hidden behind it */
  .blahaj { width: 70px; right: 6px; bottom: calc(52px + env(safe-area-inset-bottom)); z-index: 19; transform: translateY(34%); }
  .blahaj.up { transform: translateY(4%); }
}
@media (prefers-reduced-motion: reduce) { .blahaj { transition: none; } }

/* equal card heights in a row; actions sit at the bottom */
.cards { align-items: stretch; }
.cards > .stub, .cards > .stack { height: 100%; }
.stack { display: flex; flex-direction: column; }
.stack > .stub { flex: 1; }
.stub-main { min-height: 0; }
.stub-actions { margin-top: auto; padding-top: 6px; }
.stub-side { justify-content: flex-start; gap: 12px; }
.stub-side .pct-wrap { margin-top: auto; }

/* stack foot: one button that opens the list of days */
.stack-foot { position: relative; z-index: 0; margin: -10px 10px 0; padding: 18px 12px 10px; display: flex; align-items: center; gap: 10px; width: auto;
  background: var(--surface-2); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; color: var(--ink); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; text-align: left; }
.stack-foot:hover { border-color: var(--accent); }
.stack-foot .count { margin-left: auto; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 10px; font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stack::before, .stack::after { display: none !important; }

/* list of days in the sheet */
.dates { border-top: 0; margin: 0; }
.dates li { grid-template-columns: 1fr auto 3.5ch; }
.dates .d-date { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.dates .d-date small { margin: 0; flex-basis: 100%; }
.dates .tag { font-size: .72rem; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.dates .best .d-date::after { content: none; }

/* toolbar: sliders */
.toolbar .group.slide { flex: 1 1 220px; }
.toolbar .group.slide input[type="range"] { flex: 1; width: auto; min-width: 100px; }
.toolbar .val { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 7ch; text-align: right; }
@media (max-width: 600px) { .toolbar .group.slide { flex-basis: 100%; } .toolbar .group > span:first-child { min-width: 6.5ch; } }

/* missing proof */
.ticket-flags { display: flex; align-items: flex-start; gap: 6px; flex: none; }
.miss { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--warn); color: var(--surface); font-weight: 800; }
.proof { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin: 10px 0; }
.proof .upload { flex: 1 1 220px; margin: 0; }
.proof > .btn { align-self: center; }
.proof.missing .upload { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }

/* status line with cancel */
.status { flex-wrap: wrap; }
.status .st-text { flex: 1 1 200px; }
.status .progress { flex: 1 1 100%; order: 3; }
.job-pill { grid-template-columns: auto 1fr auto; }
.job-pill .job-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-x { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); font-size: 1.1rem; }
.job-x:hover { background: var(--surface-2); color: var(--ink); }

/* smooth spinner (GPU transform, no restarts) */
.spinner { will-change: transform; animation: spin .9s linear infinite; }

/* misc layout fixes */
.sr-label { font-size: 0; gap: 0; }
.sr-label textarea { font-size: 1rem; }
#profile-form > .btn, #notify-form > .btn { margin-top: 4px; }
.head-row { flex-wrap: wrap; }

/* ticket head: long routes wrap instead of pushing the badge off screen */
.ticket-head > span:first-child { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .ticket-head { flex-wrap: wrap; }
  .ticket-flags { order: -1; width: 100%; justify-content: flex-start; }
}
/* stock list on phones: route, count, then stepper + button in one row */
@media (max-width: 600px) {
  .stock li { display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; align-items: center; }
  .stock-route, .stock-count { grid-column: 1 / -1; }
  .stock li > .btn { justify-self: start; }
}

/* big screens: more room for the results, and on 2.5K/4K at 100 % scaling everything a bit larger */
@media (min-width: 1500px) { main { max-width: 1360px; } }
@media (min-width: 2400px) { body { zoom: 1.25; } main { max-width: 1560px; } }
@media (min-width: 3400px) { body { zoom: 1.6; } }

/* days sheet tools */
.sheet-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 2px dashed var(--line); }
.sheet-tools .chips { margin: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.sheet-tools .chips button { flex: none; }
.slide-row { display: flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 700; color: var(--muted); }
.slide-row > span:first-child { min-width: 6.5ch; }
.slide-row input[type="range"] { flex: 1; min-height: 0; padding: 0; accent-color: var(--accent); background: none; }
.slide-row .val { color: var(--ink); font-variant-numeric: tabular-nums; min-width: 7ch; text-align: right; }
.dates .empty-row { display: block; color: var(--muted); text-align: center; padding: 18px 0; }

/* in-app confirm */
.confirm { border: 0; padding: 20px; border-radius: 18px; width: min(380px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.confirm::backdrop { background: rgba(10,20,25,.45); }
.confirm p { margin: 0 0 16px; font-weight: 700; }
.confirm .inline { justify-content: flex-end; }
.btn.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }

/* ---------- offline + "Vorzeigen" ---------- */
.offline-banner { position: sticky; top: 61px; z-index: 18; margin: 0; padding: 8px 16px; text-align: center; font-weight: 700; font-size: .9rem; background: var(--warn-soft); color: var(--ink); border-bottom: 1px solid var(--line); }
.show-btn { margin-left: 6px; vertical-align: middle; }
.show { display: flex; flex-direction: column; gap: 14px; }
.show-route { font-family: "Bricolage", system-ui, sans-serif; font-weight: 800; font-size: 1.6rem; line-height: 1.15; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.show-route span { color: var(--accent); }
.show-status { align-self: flex-start; font-weight: 800; font-size: 1.05rem; border-radius: 999px; padding: 6px 14px; background: var(--surface-2); }
.show-status.flex { background: var(--ok); color: var(--surface); }
.show-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px 16px; margin: 0; }
.show-facts dt { font-size: .8rem; color: var(--muted); font-weight: 700; }
.show-facts dd { margin: 2px 0 0; font-weight: 700; font-size: 1.05rem; }
.show-facts .mono { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.show-shots { display: flex; flex-direction: column; gap: 10px; }
.show-shots img { width: 100%; border-radius: 12px; border: 1px solid var(--line); }
