/* ═════════════════════════════════════════════════════════════════════════════
   shadcn/ui-Look mit Bootstrap + eigenem CSS
   Tokens wie bei shadcn (zinc). Klassen haben das Präfix "ui-", damit sie nicht
   mit Bootstraps .card / .btn / .badge kollidieren.
   ═════════════════════════════════════════════════════════════════════════════ */

/* ── Tokens: Light ─────────────────────────────────────────────────────────── */
:root {
  --radius: 0.5rem;

  /* Gräulich mit pastell-violetten Akzenten */
  --background: #ececef;
  --foreground: #18181b;
  --card: #f6f6f8;
  --card-foreground: #18181b;
  --popover: #fbfbfc;
  --muted: #e4e4e8;
  --muted-foreground: #5f5f68;   /* ≥ 5:1 auf Hintergrund & Karte → AA */
  --border: #d9d9de;
  --input: #d2d2d8;
  --primary: #ab9ff2;            /* Pastell-Lavendel (Phantom) */
  --primary-foreground: #1e1638; /* 7:1 auf Lavendel */
  --secondary: #e4e4e8;
  --secondary-foreground: #18181b;
  --accent: #e7e3fb;
  --accent-foreground: #3b2f80;
  --destructive: #c42b2b;
  --ring: #8f80ea;
  --brand: #7c6fd6;
  --chart-1: #8b7fe0;            /* Chart-Farben, violett-pastell */
  --chart-2: #d4a5e8;
  --font-sans: "Ubuntu", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Himmel im Hero (lila Dämmerung) */
  --sky-top: #8a7fd8;
  --sky-bottom: #d6cff5;
  --cloud-color: #fbf9ff;
  --cloud-shadow: #c4bce8;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light;
}

/* ── Tokens: Dark ──────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #1a1a1d; --foreground: #f4f4f5; --card: #222226; --card-foreground: #f4f4f5;
    --popover: #2a2a2f; --muted: #2e2e33; --muted-foreground: #a8a8b0; --border: #34343a; --input: #3c3c43;
    --primary: #ab9ff2; --primary-foreground: #1e1638; --secondary: #2e2e33; --secondary-foreground: #f4f4f5;
    --accent: #332f4a; --accent-foreground: #e4defd; --destructive: #f87171; --ring: #ab9ff2; --brand: #b8adf5;
    --chart-1: #ab9ff2; --chart-2: #e0b3f0;
    --sky-top: #1d1838; --sky-bottom: #4a3f86; --cloud-color: #d9d3f5; --cloud-shadow: #6d61a8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --background: #1a1a1d; --foreground: #f4f4f5; --card: #222226; --card-foreground: #f4f4f5;
  --popover: #2a2a2f; --muted: #2e2e33; --muted-foreground: #a8a8b0; --border: #34343a; --input: #3c3c43;
  --primary: #ab9ff2; --primary-foreground: #1e1638; --secondary: #2e2e33; --secondary-foreground: #f4f4f5;
  --accent: #332f4a; --accent-foreground: #e4defd; --destructive: #f87171; --ring: #ab9ff2; --brand: #b8adf5;
  --chart-1: #ab9ff2; --chart-2: #e0b3f0;
  --sky-top: #1d1838; --sky-bottom: #4a3f86; --cloud-color: #d9d3f5; --cloud-shadow: #6d61a8;
  color-scheme: dark;
}

/* Bootstrap-Variablen an die Tokens hängen */
:root, :root[data-theme] {
  --bs-body-bg: var(--background);
  --bs-body-color: var(--foreground);
  --bs-body-font-family: var(--font-sans);
  --bs-border-color: var(--border);
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── Header / Navigation Menu ──────────────────────────────────────────────── */
.ui-header {
  position: sticky; top: 0; z-index: 1000;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 85%, transparent);
  backdrop-filter: saturate(1.8) blur(8px);
}
.ui-header-inner { display: flex; align-items: center; gap: 24px; height: 56px; }
.ui-logo {
  display: flex; align-items: center; gap: 8px;
  color: var(--foreground); text-decoration: none; font-weight: 500; font-size: 14px;
}
.ui-logo:hover { color: var(--foreground); }
.ui-logo-mark {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px;
  background: var(--primary); color: var(--primary-foreground); font-size: 13px;
}
.ui-nav { display: flex; gap: 4px; }
.ui-nav a {
  color: var(--muted-foreground); text-decoration: none;
  font-size: 14px; font-weight: 500;
  padding: 6px 10px; border-radius: calc(var(--radius) - 2px);
  transition: color 150ms, background-color 150ms;
}
.ui-nav a:hover { color: var(--foreground); background: var(--accent); }
.ui-header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.ui-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 16px;
  font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid transparent;
  cursor: pointer; user-select: none;
  transition: background-color 150ms, color 150ms, border-color 150ms, box-shadow 150ms, transform 160ms var(--ease-out);
}
.ui-btn:active:not(:disabled) { transform: scale(0.97); }
.ui-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring); }
.ui-btn:disabled { opacity: 0.5; pointer-events: none; }
.ui-btn .ic { width: 15px; height: 15px; }
.ui-btn.is-loading .ic { animation: spin 700ms linear infinite; }
.ui-btn-block { width: 100%; }

.ui-btn-default     { background: var(--primary); color: var(--primary-foreground); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.ui-btn-default:hover { background: color-mix(in srgb, var(--primary) 88%, #000); }
.ui-btn-secondary   { background: var(--secondary); color: var(--secondary-foreground); }
.ui-btn-secondary:hover { background: color-mix(in srgb, var(--secondary) 80%, var(--foreground) 5%); }
.ui-btn-outline     { background: var(--background); color: var(--foreground); border-color: var(--input); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.ui-btn-outline:hover { background: var(--accent); color: var(--accent-foreground); }
.ui-btn-ghost       { background: transparent; color: var(--foreground); }
.ui-btn-ghost:hover { background: var(--accent); color: var(--accent-foreground); }
.ui-btn-icon        { width: 36px; padding: 0; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Theme-Toggle: Sonne/Mond tauschen */
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-light { display: none; }
  :root:not([data-theme="light"]) .theme-icon-dark { display: inline; }
}

/* ── Badge ─────────────────────────────────────────────────────────────────── */
.ui-badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid transparent;
  padding: 2px 8px;
  font-size: 12px; font-weight: 500; line-height: 1.4; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ui-badge-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.ui-badge-outline   { border-color: var(--border); color: var(--foreground); }
.ui-badge-glass     { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.25); color: #fff; backdrop-filter: blur(8px); }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.25); }

/* ── Card ──────────────────────────────────────────────────────────────────── */
.ui-card {
  height: 100%;
  display: flex; flex-direction: column;
  background: var(--card); color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  scroll-margin-top: 72px;
}
.ui-card-header { display: flex; align-items: flex-start; gap: 12px; padding: 24px 24px 0; }
.ui-card-header > div { min-width: 0; flex: 1; }
.ui-card-title { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; margin: 0; }
.ui-card-description { font-size: 14px; color: var(--muted-foreground); margin: 4px 0 0; }
.ui-card-content { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.ui-card-footer { display: flex; align-items: center; gap: 8px; padding: 0 24px 24px; }
.ui-card-icon {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  background: var(--accent); color: var(--accent-foreground); font-size: 16px;
}

/* ── Separator ─────────────────────────────────────────────────────────────── */
.ui-separator { height: 1px; background: var(--border); border: 0; margin: 0; opacity: 1; }

/* ── Label / Input ─────────────────────────────────────────────────────────── */
.ui-field { display: flex; flex-direction: column; gap: 8px; }
.ui-label { font-size: 14px; font-weight: 500; line-height: 1; }
.ui-input-row { display: flex; gap: 8px; }
.ui-input {
  flex: 1; min-width: 0; height: 36px;
  padding: 4px 12px;
  font-size: 14px; color: var(--foreground);
  background: transparent;
  border: 1px solid var(--input);
  border-radius: calc(var(--radius) - 2px);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  transition: border-color 150ms, box-shadow 150ms;
}
.ui-input::placeholder { color: var(--muted-foreground); }
.ui-input:focus-visible { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 35%, transparent); }
.ui-input[aria-invalid="true"] { border-color: var(--destructive); box-shadow: 0 0 0 3px color-mix(in srgb, var(--destructive) 20%, transparent); }
.ui-input:disabled { opacity: .5; cursor: not-allowed; }

/* ── Empty State ───────────────────────────────────────────────────────────── */
.ui-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 4px; min-height: 200px; padding: 24px;
  border: 1px dashed var(--border); border-radius: var(--radius);
}
.ui-empty.grow { flex: 1; }
.ui-empty-icon {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 8px;
  border-radius: var(--radius); background: var(--muted); color: var(--muted-foreground); font-size: 18px;
}
.ui-empty-title { font-size: 14px; font-weight: 500; margin: 0; }
.ui-empty-description { font-size: 13px; color: var(--muted-foreground); margin: 0; }

/* ── Skeleton ──────────────────────────────────────────────────────────────── */
.ui-skeleton { background: var(--muted); border-radius: calc(var(--radius) - 2px); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }

/* ── Katzenbild ────────────────────────────────────────────────────────────── */
.cat-frame { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--muted); }
.cat-frame img {
  position: relative; z-index: 1;   /* über dem Skeleton */
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: opacity 300ms var(--ease-out), filter 300ms var(--ease-out);
}
.cat-frame img.is-loading { opacity: 0; filter: blur(6px); }
.cat-frame .ui-skeleton { position: absolute; inset: 0; border-radius: 0; }

/* ── Table ─────────────────────────────────────────────────────────────────── */
.ui-table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ui-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; }
.ui-table th {
  height: 40px; padding: 0 12px; text-align: left;
  font-weight: 500; color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
}
.ui-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ui-table tbody tr:last-child td { border-bottom: 0; }
.ui-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ui-table tbody tr { transition: background-color 150ms; }
.ui-table tbody tr.is-clickable { cursor: pointer; }
.ui-table tbody tr.is-clickable:hover { background: color-mix(in srgb, var(--muted) 60%, transparent); }
.ui-table tbody tr.is-clickable:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.ui-table tbody tr[aria-selected="true"] { background: var(--muted); }
.ui-table .cell-sub { display: block; font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }
.ui-table .cell-rank { width: 40px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }

.value {
  font-variant-numeric: tabular-nums;
  transition: opacity 200ms var(--ease-out), filter 200ms var(--ease-out);
}
.value.is-updating { opacity: 0; filter: blur(4px); }
.price { font-size: 16px; font-weight: 500; }
.ui-muted { color: var(--muted-foreground); font-size: 13px; margin: 0; }

/* ── Bitcoin im Phantom-Wallet-Stil (immer dunkel) ─────────────────────────── */
.wallet {
  --w-bg: #1c1c1f;
  --w-surface: #2a2a2f;
  --w-text: #ffffff;
  --w-muted: #a2a2ab;
  --w-lavender: #ab9ff2;
  position: relative;
  padding: 20px;
  gap: 20px;
  color: var(--w-text);
  border-color: #2f2f35;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(171,159,242,.28), transparent 60%),
    linear-gradient(180deg, #26243a 0%, var(--w-bg) 55%);
  overflow: hidden;
}
.wallet-top { display: flex; align-items: center; justify-content: space-between; }
.wallet-account { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 500; }
.wallet-coin {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: #f7931a; color: #fff; font-size: 18px;
}
.wallet-pair {
  font-size: 12px; font-weight: 500; letter-spacing: .04em;
  color: var(--w-muted); background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08); border-radius: 999px; padding: 4px 10px;
}
.wallet-balance { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0 4px; text-align: center; }
.wallet-amount {
  font-size: clamp(34px, 9vw, 46px); font-weight: 700; line-height: 1; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.wallet-sub { display: inline-flex; gap: 8px; align-items: center; }
.wallet-pill {
  font-size: 15px; font-weight: 500; color: #d4ccff;
  background: rgba(171,159,242,.16); border-radius: 8px; padding: 3px 10px;
}
.wallet-actions { display: flex; justify-content: center; }
.wallet-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 46px; padding: 0 24px;
  border: 0; border-radius: 999px;
  background: var(--w-lavender); color: #1e1638;
  font-size: 15px; font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms, transform 160ms var(--ease-out), opacity 150ms;
}
.wallet-btn:hover { background: #bcb2f6; }
.wallet-btn:active:not(:disabled) { transform: scale(0.97); }
.wallet-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--w-bg), 0 0 0 4px var(--w-lavender); }
.wallet-btn:disabled { opacity: .6; cursor: progress; }
.wallet-btn.is-loading .ic { animation: spin 700ms linear infinite; }

/* Kursverlauf (Phantom-Stil): nur wenn genug Platz da ist */
.wallet-chart { display: none; flex-direction: column; gap: 10px; flex: 1; min-height: 230px; }
@media (min-width: 768px) { .wallet-chart { display: flex; } }
.wallet-change {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; min-height: 24px;
}
.wallet-delta { color: var(--w-muted); }
.wallet-delta.up { color: #2ec08b; }
.wallet-delta.down { color: #eb5757; }
.wallet-delta-pill { padding: 2px 8px; border-radius: 6px; font-size: 13px; }
.wallet-delta-pill.up   { color: #2ec08b; background: rgba(46,192,139,.14); }
.wallet-delta-pill.down { color: #eb5757; background: rgba(235,87,87,.14); }
.wallet-delta-label { font-size: 13px; font-weight: 400; color: var(--w-muted); }
.wallet-chart-box { position: relative; flex: 1; min-height: 150px; margin: 0 -20px; }
.wallet-chart-box.is-loading { opacity: .45; transition: opacity 200ms; }
.wallet-chart-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 44px; color: rgba(255,255,255,.08);
  background: linear-gradient(transparent calc(50% - 1px), rgba(255,255,255,.08) calc(50% - 1px), rgba(255,255,255,.08) 50%, transparent 50%);
  background-size: 100% 100%;
}
.wallet-ranges { display: flex; gap: 4px; }
.wallet-range {
  flex: 1; height: 32px; border: 0; border-radius: 999px;
  background: transparent; color: var(--w-muted);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background-color 150ms, color 150ms, transform 160ms var(--ease-out);
}
.wallet-range:hover { background: rgba(255,255,255,.06); color: var(--w-text); }
.wallet-range:active { transform: scale(0.95); }
.wallet-range:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--w-lavender); }
.wallet-range.is-active { background: rgba(171,159,242,.18); color: #d4ccff; }

.wallet-list { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.wallet-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--w-surface); border-radius: 14px; padding: 12px 14px;
}
.wallet-row-icon {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%; font-size: 22px; color: #fff;
}
.wallet-row-icon.btc { background: #f7931a; }
.wallet-row-main, .wallet-row-end { display: flex; flex-direction: column; min-width: 0; }
.wallet-row-end { margin-left: auto; text-align: right; }
.wallet-row-title { font-size: 15px; font-weight: 500; }
.wallet-row-sub { font-size: 13px; color: var(--w-muted); font-variant-numeric: tabular-nums; }
.wallet-row-end .wallet-row-sub { color: #c9c0ff; }

/* ── Wetter im Stil der MeteoSwiss-App ─────────────────────────────────────── */
.mw {
  --mw-top: #55677d;
  --mw-bottom: #a7b6c6;
  --mw-red: #e0353b;
  --mw-blue: #1f3bff;
  position: relative; overflow: hidden; isolation: isolate;
  padding: 24px 20px 20px; gap: 16px;
  color: #fff;
  border-color: color-mix(in srgb, var(--mw-top) 60%, var(--border));
  background: linear-gradient(180deg, var(--mw-top) 0%, #7d8ea2 45%, var(--mw-bottom) 100%);
}
:root[data-theme="dark"] .mw { --mw-top: #2c3644; --mw-bottom: #5d6b7b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mw { --mw-top: #2c3644; --mw-bottom: #5d6b7b; } }

.mw-mountains {
  position: absolute; left: 0; right: 0; top: 120px; width: 100%; height: 110px; z-index: -1;
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 35%, transparent 100%);
}
.mw-mountains path { fill: rgba(255,255,255,.10); }
.mw-cloud {
  position: absolute; top: 34px; right: 14px; width: 150px; z-index: -1;
  animation: mw-float 8s ease-in-out infinite alternate;
}
.mw-cloud .cloud { position: relative; right: auto; --w: 150px; --cloud-color: #ffffff; --cloud-shadow: #c9d2dd; }
@keyframes mw-float { to { transform: translateX(-10px); } }

.mw-head { position: relative; min-height: 132px; }
.mw-place { font-size: 28px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.mw-desc { font-size: 16px; margin: 4px 0 0; max-width: 60%; opacity: .95; }
.mw-temp { font-size: 26px; margin: 14px 0 0; font-weight: 400; font-variant-numeric: tabular-nums; }
.mw-today {
  display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0;
  font-size: 13px; color: rgba(255,255,255,.85);
}
.mw-today strong { font-weight: 500; color: #fff; }

/* Stundenstreifen: minimal – nur Kurve, Werte und feine Regenbalken */
.mw-hourly {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(30,38,50,.32);
  padding: 10px 4px 2px;
}
.mw-hourly-chart { height: 118px; }

/* Kleine Überschrift-Zeile über beiden Ansichten */
.mw-caption {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  margin: 0; padding: 0 10px; font-size: 12px; color: rgba(255,255,255,.72);
}
.mw-caption span:first-child { font-weight: 500; color: #fff; }
.mw-caption-dark { color: inherit; opacity: 1; padding: 0 14px; }
.mw-caption-dark span:last-child { opacity: .55; }
.mw-caption-dark span:first-child { color: inherit; }

/* 5-Tage-Prognose: kompakt, ein Tag klappt auf */
.mw-days {
  position: relative;
  background: #fff; color: #1d1d1f;
  border-radius: 14px; overflow: hidden;
  padding-top: 12px;
  box-shadow: 0 6px 18px rgba(30,40,55,.16);
}
:root[data-theme="dark"] .mw-days { background: #2a2f37; color: #f1f3f5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mw-days { background: #2a2f37; color: #f1f3f5; } }
.mw-days-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 8px 6px 8px; }
.mw-day {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 2px; text-align: center;
  border: 0; border-radius: 10px; background: transparent; color: inherit; cursor: pointer;
  transition: background-color 150ms, transform 160ms var(--ease-out);
}
.mw-day:hover { background: rgba(128,128,140,.12); }
.mw-day:active { transform: scale(0.96); }
.mw-day:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.mw-day[aria-expanded="true"] { background: rgba(171,159,242,.22); }
.mw-day-name { font-size: 14px; font-weight: 500; }
.mw-day-date { font-size: 11px; opacity: .6; margin-top: -3px; font-variant-numeric: tabular-nums; }
.mw-day-icon { font-size: 26px; line-height: 1; height: 30px; display: grid; place-items: center; }
.mw-day-temp { font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mw-day-temp .sep { opacity: .45; margin: 0 2px; }

/* Aufklapp-Bereich: weich über grid-template-rows */
.mw-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 360ms var(--ease-out); }
.mw-detail.is-open { grid-template-rows: 1fr; }
.mw-detail-inner { overflow: hidden; min-height: 0; }
.mw-detail-title {
  margin: 0; padding: 10px 14px 0; font-size: 13px; font-weight: 500;
  border-top: 1px solid rgba(128,128,140,.2);
  opacity: 0; transition: opacity 240ms 120ms;
}
.mw-detail-title small { font-weight: 400; opacity: .6; margin-left: 6px; }
.mw-detail.is-open .mw-detail-title { opacity: 1; }
.mw-days-chart { height: 150px; }

/* Sanftes Einblenden nach dem Laden */
.mw-reveal { animation: mw-in 460ms var(--ease-out) both; }
.mw-days.mw-reveal { animation-delay: 90ms; }
@keyframes mw-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Skeleton während des Ladens */
.mw-skeleton { display: flex; flex-direction: column; gap: 12px; }
.mw-skeleton.d-none { display: none; }
.mw-sk { background: rgba(255,255,255,.2); border-radius: 14px; animation: pulse 1.6s ease-in-out infinite; }
.mw-sk-strip { height: 140px; }
.mw-sk-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mw-sk-days .mw-sk { height: 104px; border-radius: 10px; }
.mw-sk-days .mw-sk:nth-child(2) { animation-delay: .1s; }
.mw-sk-days .mw-sk:nth-child(3) { animation-delay: .2s; }
.mw-sk-days .mw-sk:nth-child(4) { animation-delay: .3s; }
.mw-sk-days .mw-sk:nth-child(5) { animation-delay: .4s; }

/* Wetter-Icons in den Originalfarben */
.ic-sun   { color: #f7b500; }
.ic-cloud { color: #8a8f98; }
.ic-mix   { background: linear-gradient(135deg, #f7b500 40%, #9aa0a8 60%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ic-rain  { color: #5c8fd6; }
.ic-snow  { color: #8fb7e8; }

.mw-empty {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 120px; border: 1.5px dashed rgba(255,255,255,.6); border-radius: 14px;
  color: rgba(255,255,255,.9); font-size: 14px;
}
.mw-empty .ic { width: 22px; height: 22px; }

.mw-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: auto; }
.mw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 42px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.18); color: #fff;
  font-size: 15px; font-weight: 500; cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background-color 150ms, transform 160ms var(--ease-out), opacity 150ms;
}
.mw-btn:hover { background: rgba(255,255,255,.28); }
.mw-btn:active:not(:disabled) { transform: scale(0.97); }
.mw-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,.7); }
.mw-btn:disabled { opacity: .6; cursor: progress; }
.mw-btn.is-loading .ic { animation: spin 700ms linear infinite; }
.mw-meta { font-size: 12px; color: rgba(29,29,31,.7); }
:root[data-theme="dark"] .mw-meta { color: rgba(255,255,255,.7); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mw-meta { color: rgba(255,255,255,.7); } }

/* ── Stat-Kacheln (Wetter) ─────────────────────────────────────────────────── */
.ui-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ui-stat { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.ui-stat-label { display: block; font-size: 12px; color: var(--muted-foreground); font-weight: 500; }
.ui-stat-value { display: block; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; margin-top: 4px; }

/* ── Chart (shadcn/ui-Stil) ────────────────────────────────────────────────── */
.ui-chart {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 16px 12px;
  display: flex; flex-direction: column; gap: 12px;
}
.ui-chart-title { font-size: 14px; font-weight: 500; margin: 0; letter-spacing: -0.01em; }
.ui-chart-description { font-size: 12px; color: var(--muted-foreground); margin: 2px 0 0; }
.chart-box { height: 200px; margin: 0 -4px; }
.ui-chart-legend {
  display: flex; justify-content: center; gap: 16px;
  font-size: 12px; color: var(--muted-foreground);
}
.ui-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ui-chart-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.ui-chart-footer {
  display: flex; flex-direction: column; gap: 2px;
  border-top: 1px solid var(--border); padding-top: 12px;
  font-size: 13px;
}
.ui-chart-trend { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }

/* Tooltip wie shadcn ChartTooltipContent */
.ui-chart-tooltip {
  min-width: 140px;
  background: var(--background); color: var(--foreground);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 6px 10px;
  font-family: var(--font-sans); font-size: 12px;
}
.ui-chart-tooltip-label { font-weight: 500; margin-bottom: 4px; }
.ui-chart-tooltip-row { display: flex; align-items: center; gap: 8px; line-height: 1.6; }
.ui-chart-tooltip-row .ui-chart-dot { width: 10px; height: 10px; }
.ui-chart-tooltip-row .name { color: var(--muted-foreground); }
.ui-chart-tooltip-row .val  { margin-left: auto; font-weight: 500; font-variant-numeric: tabular-nums; }

/* ── Karte ─────────────────────────────────────────────────────────────────── */
.map-box {
  flex: 1; min-height: 340px;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--muted);
  isolation: isolate;
}
.leaflet-container { font-family: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--popover); color: var(--foreground);
  box-shadow: 0 4px 12px rgba(0,0,0,.12); border: 1px solid var(--border);
}
.leaflet-popup-content-wrapper { border-radius: var(--radius); }
.leaflet-bar a { background: var(--background); color: var(--foreground); border-color: var(--border); }
.leaflet-bar a:hover { background: var(--accent); }
.leaflet-bar { border: 1px solid var(--border) !important; border-radius: var(--radius) !important; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.05) !important; }

/* ── Alert (Fehler in Karten) ──────────────────────────────────────────────── */
.ui-alert {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid color-mix(in srgb, var(--destructive) 40%, var(--border));
  border-radius: var(--radius); padding: 12px 14px;
  color: var(--destructive); font-size: 14px;
}

/* ── Toast (Sonner-Stil) ───────────────────────────────────────────────────── */
.ui-toast {
  position: fixed; right: 16px; bottom: 16px; z-index: 2000;
  width: min(356px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 10px;
  background: var(--popover); color: var(--foreground);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  padding: 14px 16px; font-size: 14px; font-weight: 500;
  transform: translateY(12px); opacity: 0; pointer-events: none;
  transition: transform 250ms var(--ease-out), opacity 250ms var(--ease-out);
}
.ui-toast .ic { color: var(--destructive); }
.ui-toast.is-visible { transform: none; opacity: 1; pointer-events: auto; }

/* ── Hero mit Wolken (nur HTML + CSS) ──────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  min-height: 300px; padding: 32px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(to bottom, var(--sky-top), var(--sky-bottom));
  color: #fff;
}
.hero-content { position: relative; z-index: 2; }
.hero h1 {
  font-size: clamp(28px, 4.5vw, 44px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.1;
  margin: 0 0 8px; text-wrap: balance; text-shadow: 0 2px 24px rgba(20,50,90,.35);
}
.hero p { color: rgba(255,255,255,.88); margin: 0; font-size: 16px; text-shadow: 0 1px 12px rgba(20,50,90,.35); }
.hero .ui-badge { position: relative; z-index: 2; align-self: flex-start; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(20deg, rgba(15,40,75,.45), transparent 55%);
}
.sky-sun {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(circle at 85% -10%, rgba(255,248,230,.5), transparent 55%);
}
.sky-clouds { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cloud-track {
  --w: calc(var(--s, 1) * clamp(160px, 26vw, 360px));
  position: absolute; top: var(--y, 20%); left: 0; width: 100%;
  animation: cloud-drift var(--dur, 100s) linear infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform;
}
@keyframes cloud-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(100% + var(--w))); }
}
.cloud {
  position: absolute; right: 100%;
  width: var(--w); aspect-ratio: 2.6 / 1;
  filter: url(#cloud-fluff);
  isolation: isolate;
  background:
    radial-gradient(ellipse 20% 34% at 28% 56%, var(--cloud-color) 55%, transparent 100%),
    radial-gradient(ellipse 22% 44% at 48% 42%, var(--cloud-color) 55%, transparent 100%),
    radial-gradient(ellipse 18% 32% at 68% 54%, var(--cloud-color) 55%, transparent 100%),
    radial-gradient(ellipse 14% 24% at 84% 66%, var(--cloud-color) 50%, transparent 100%),
    radial-gradient(ellipse 14% 22% at 14% 68%, var(--cloud-color) 50%, transparent 100%),
    radial-gradient(ellipse 44% 22% at 50% 70%, var(--cloud-color) 60%, transparent 100%);
  opacity: 0.96;
}
.cloud::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  transform: translateY(8%);
  background: radial-gradient(ellipse 40% 20% at 50% 74%, var(--cloud-shadow) 50%, transparent 100%);
}
.cloud-track:nth-child(3) .cloud,
.cloud-track:nth-child(6) .cloud { opacity: 0.75; }

@media (max-width: 575px) {
  .hero { flex-direction: column-reverse; justify-content: space-between; align-items: flex-start; padding: 24px; }
  .ui-card-header { padding: 20px 20px 0; }
  .ui-card-content { padding: 20px; }
  .ui-card-footer { padding: 0 20px 20px; }
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.ui-footer { border-top: 1px solid var(--border); color: var(--muted-foreground); font-size: 14px; }

/* ── Reduced Motion ────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0ms !important; }
  .hero .cloud-track { animation: cloud-drift var(--dur, 100s) linear infinite var(--delay, 0s) paused !important; }
}

/* ═════════════════════════════════════════════════════════════════════════════
   Icons: Streamline Core Solid (SVG-Sprite in index.html)
   ═════════════════════════════════════════════════════════════════════════════ */
.ic {
  display: inline-block; flex: none;
  width: 1em; height: 1em;            /* übernimmt die Schriftgrösse des Kontexts */
  vertical-align: -0.125em;
  fill: currentColor;
}
.ic.ic-mix   { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: #e2a200; }
.ic.ic-heavy { color: #3f6fc0; }
.ui-header .ui-btn-icon .ic { width: 16px; height: 16px; }

/* ═════════════════════════════════════════════════════════════════════════════
   Karte als Content Card (inspiriert von Aceternity "Content Card")
   ═════════════════════════════════════════════════════════════════════════════ */
.content-card {
  position: relative; isolation: isolate; overflow: hidden;
  height: 100%; min-height: 560px;
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(20, 20, 30, .18);
  background: #2a2a2f; color: #fff;
  scroll-margin-top: 72px;
}
.content-card-map { position: absolute; inset: 0; z-index: 0; }
.content-card-shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 48%, rgba(0,0,0,.8) 100%);
}
/* Overlay wird beim Hover dunkler – wie im Original, aber die Kartenmitte bleibt sichtbar */
.content-card-shade::after {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,.05) 40%, rgba(0,0,0,.35));
  transition: opacity 300ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .content-card:hover .content-card-shade::after { opacity: 1; } }

.content-card-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  padding: 20px; pointer-events: none;
}
.content-card-avatar {
  display: grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.85);
  background: var(--primary); color: var(--primary-foreground); font-size: 18px;
}
.content-card-name { margin: 0; font-size: 16px; font-weight: 500; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.content-card-meta { margin: 0; font-size: 13px; color: rgba(255,255,255,.78); text-shadow: 0 1px 8px rgba(0,0,0,.4); }

.content-card-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 20px; pointer-events: none;
}
.content-card-title { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
.content-card-desc  { margin: 6px 0 14px; font-size: 14px; color: rgba(255,255,255,.82); font-variant-numeric: tabular-nums; }
.content-card-search { display: flex; flex-wrap: wrap; gap: 8px; pointer-events: auto; }
.content-input {
  flex: 1 1 180px; min-width: 0; height: 40px; padding: 0 14px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.14); color: #fff; font-size: 14px;
  backdrop-filter: blur(8px);
  transition: border-color 150ms, box-shadow 150ms;
}
.content-input::placeholder { color: rgba(255,255,255,.72); }
.content-input:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 45%, transparent); }
.content-input[aria-invalid="true"] { border-color: #f87171; box-shadow: 0 0 0 3px rgba(248,113,113,.35); }
.content-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 14px; white-space: nowrap;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.14); color: #fff;
  font-size: 14px; font-weight: 500; cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background-color 150ms, transform 160ms var(--ease-out), opacity 150ms;
}
.content-btn:hover { background: rgba(255,255,255,.24); }
.content-btn:active:not(:disabled) { transform: scale(0.97); }
.content-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,.7); }
.content-btn:disabled { opacity: .6; cursor: progress; }
.content-btn.is-loading .ic { animation: spin 700ms linear infinite; }
.content-btn-primary { background: var(--primary); color: var(--primary-foreground); border-color: transparent; }
.content-btn-primary:hover { background: color-mix(in srgb, var(--primary) 88%, #fff); }
.content-card .leaflet-top { top: 8px; }
.content-card .leaflet-control-attribution { font-size: 10px; }

/* ═════════════════════════════════════════════════════════════════════════════
   Ladestationen als Expandable Cards (inspiriert von Aceternity)
   ═════════════════════════════════════════════════════════════════════════════ */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.ev-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 8px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--border);
  cursor: pointer; text-align: left;
  transition: background-color 150ms, box-shadow 200ms, transform 160ms var(--ease-out), opacity 150ms;
  animation: ev-in 360ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes ev-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (hover: hover) and (pointer: fine) {
  .ev-card:not(.is-skeleton):hover { background: var(--muted); box-shadow: 0 6px 18px rgba(20,20,30,.08); }
}
.ev-card:active:not(.is-skeleton) { transform: scale(0.98); }
.ev-card:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.ev-card[aria-expanded="true"] { opacity: 0; }   /* "wandert" in den Dialog */
.ev-card.is-skeleton { cursor: default; }
.ev-card-media {
  position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--muted);
}
.ev-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-rank-pill {
  position: absolute; top: 8px; left: 8px;
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.92); color: #18181b; font-size: 12px; font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.ev-dist-pill {
  position: absolute; right: 8px; bottom: 8px;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(20,20,28,.66); color: #fff; font-size: 12px; font-weight: 500;
  backdrop-filter: blur(6px); font-variant-numeric: tabular-nums;
}
.ev-card-body { padding: 2px 4px 4px; min-width: 0; }
.ev-card-title {
  margin: 0; font-size: 14px; font-weight: 500; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ev-card-sub { margin: 2px 0 0; font-size: 12px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Overlay + Dialog */
body.modal-open { overflow: hidden; }
.ev-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(12, 12, 18, .55); backdrop-filter: blur(2px);
}
.ev-modal {
  position: fixed; z-index: 3001; left: 50%; top: 50%;
  translate: -50% -50%;
  transform-origin: top left;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--popover); color: var(--foreground);
  border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.ev-modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); color: #18181b; font-size: 14px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  transition: transform 160ms var(--ease-out);
}
.ev-modal-close:active { transform: scale(0.92); }
.ev-modal-close:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.ev-modal-media { position: relative; aspect-ratio: 16 / 10; background: var(--muted); }
.ev-modal-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-modal-body { padding: 18px 20px 20px; }
.ev-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ev-modal-title { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.3; }
.ev-modal-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted-foreground); }
.ev-facts { list-style: none; margin: 16px 0 0; padding: 0; }
.ev-facts li {
  display: grid; grid-template-columns: 18px auto 1fr; align-items: center; gap: 10px;
  padding: 9px 0; border-top: 1px solid var(--border); font-size: 13px;
  animation: ev-in 300ms var(--ease-out) both;
  animation-delay: calc(180ms + var(--i, 0) * 30ms);   /* Inhalt erscheint nach der Karte */
}
.ev-facts li .ic { color: var(--brand); font-size: 15px; }
.ev-facts .label { color: var(--muted-foreground); }
.ev-facts .val { text-align: right; font-weight: 500; overflow-wrap: anywhere; }

/* Theme-Toggle: SVG-Icons sicher ein-/ausblenden */
.ic.theme-icon-dark { display: none; }
:root[data-theme="dark"] .ic.theme-icon-light { display: none; }
:root[data-theme="dark"] .ic.theme-icon-dark { display: inline-block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ic.theme-icon-light { display: none; }
  :root:not([data-theme="light"]) .ic.theme-icon-dark { display: inline-block; }
}

/* ═════════════════════════════════════════════════════════════════════════════
   Hero: Split-Flap-Board (inspiriert von Aceternity "Text Flipping Board")
   ═════════════════════════════════════════════════════════════════════════════ */
.flip-hero {
  position: relative; overflow: hidden;
  padding: clamp(12px, 2.4vw, 28px);
  border-radius: 24px;
  border: 1px solid #2b2b31;
  background: radial-gradient(120% 90% at 50% -10%, #2a2638 0%, #161618 60%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 18px 40px rgba(0,0,0,.18);
  color: #fff;
}
.flipboard {
  --cols: 20;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: clamp(2px, .45vw, 6px);
  container-type: inline-size;
}
.flap {
  position: relative; aspect-ratio: 4 / 5;
  perspective: 400px;
  font-family: "Ubuntu", system-ui, sans-serif; font-weight: 700;
  font-size: calc((100cqw / var(--cols)) * .72);
  color: #f4f4f5;
}
.flap > div { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; }
.flap .t, .flap .f { top: 0; border-radius: 4px 4px 0 0; background: linear-gradient(#28282d, #222226); }
.flap .b, .flap .k { bottom: 0; border-radius: 0 0 4px 4px; background: linear-gradient(#1e1e22, #19191c); }
.flap span {
  position: absolute; left: 0; right: 0; height: 200%;
  display: grid; place-items: center; line-height: 1;
}
.flap .t span, .flap .f span { top: 0; }
.flap .b span, .flap .k span { top: -100%; }
/* Die zwei beweglichen Klappen (oben fällt nach unten, unten klappt auf) */
.flap .f, .flap .k { z-index: 3; visibility: hidden; backface-visibility: hidden; }
.flap .f { transform-origin: 50% 100%; }
.flap .k { transform-origin: 50% 0; transform: rotateX(90deg); }
.flap.is-flipping .f, .flap.is-flipping .k { visibility: visible; }
/* Spalt in der Mitte jeder Kachel */
.flap::after {
  content: ""; position: absolute; left: 0; right: 0; top: calc(50% - .5px); height: 1px;
  background: rgba(0,0,0,.6); z-index: 4;
}
.flip-hero-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px;
  margin-top: clamp(10px, 1.6vw, 18px);
  font-size: 13px; color: rgba(255,255,255,.6);
}
.flip-hero-brand { display: inline-flex; align-items: center; gap: 8px; color: rgba(255,255,255,.88); font-weight: 500; }

/* ═════════════════════════════════════════════════════════════════════════════
   Liquid Glass (inspiriert von Aceternity "Liquid Glass")
   Chromium: echte Lichtbrechung über SVG-Filter als backdrop-filter (per JS).
   Andere Browser: mattes Glas (blur) als Fallback.
   ═════════════════════════════════════════════════════════════════════════════ */
.liquid-glass {
  --lg-tint: .16;
  position: relative; isolation: isolate;
  background: rgba(255,255,255,var(--lg-tint));
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
          backdrop-filter: blur(14px) saturate(1.6);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.6),        /* Lichtkante oben */
    inset 0 -1px 0 rgba(255,255,255,.14),
    inset 0 0 0 1px rgba(255,255,255,.22),     /* Rand */
    0 10px 30px rgba(0,0,0,.16);
}
/* Glanzlicht über der Fläche */
.liquid-glass::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.32) 0%, rgba(255,255,255,0) 32%, rgba(255,255,255,0) 68%, rgba(255,255,255,.12) 100%);
}
:root[data-theme="dark"] .liquid-glass { --lg-tint: .07; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .liquid-glass { --lg-tint: .07; } }
@media (prefers-reduced-transparency: reduce) {
  .liquid-glass { background: var(--popover) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}

/* Header als schwebende Glas-Leiste */
.ui-header {
  top: 10px; margin-top: 10px;
  border-bottom: 0; background: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.ui-header-inner.liquid-glass { border-radius: 18px; padding-left: 16px; padding-right: 10px; }

/* Glas-Chip und Glas-Suchleiste über der Karte */
.content-card-chip.liquid-glass {
  --lg-tint: .1;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 6px 18px 6px 6px; border-radius: 999px;
}
.content-card-search.liquid-glass { --lg-tint: .1; padding: 6px; border-radius: 16px; }
.content-card-search.liquid-glass .content-input {
  background: rgba(0,0,0,.2); border-color: rgba(255,255,255,.22);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.content-card-search.liquid-glass .content-btn { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255,255,255,.12); }
.content-card-search.liquid-glass .content-btn-primary { background: var(--primary); }

/* Lesbarkeit: etwas mehr Tönung auf unruhigem Hintergrund */
.ui-header-inner.liquid-glass { --lg-tint: .42; }
:root[data-theme="dark"] .ui-header-inner.liquid-glass { background: rgba(26,26,30,.5); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ui-header-inner.liquid-glass { background: rgba(26,26,30,.5); } }
.content-card-chip.liquid-glass, .content-card-search.liquid-glass { background: rgba(18,18,26,.32); }

/* Bitcoin-Chart: Beschriftung aktueller Preis + Hoch/Tief */
.btc-now-label { font-size: 11px; font-weight: 500; color: rgba(255,255,255,.85); background: rgba(28,28,31,.85); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.btc-extreme { font-size: 11px; font-weight: 500; white-space: nowrap; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.btc-extreme.up { color: #2ec08b; }
.btc-extreme.down { color: #eb5757; }

/* Interaktiver Punkte-Hintergrund */
.dot-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* Bitcoin: Hoch/Tief-Zeile unter dem Chart, Chart mit genug Höhe */
.wallet-chart-box { min-height: 190px; }
.wallet-extremes { display: flex; justify-content: space-between; gap: 8px; margin: 0; font-size: 12px; color: var(--w-muted); font-variant-numeric: tabular-nums; }
.wallet-extremes b { font-weight: 500; color: var(--w-text); }
.wallet-extremes em { font-style: normal; font-weight: 500; margin-left: 4px; }
.wallet-extremes em.up { color: #2ec08b; }
.wallet-extremes em.down { color: #eb5757; }

/* ═════════════════════════════════════════════════════════════════════════════
   Buttons als Liquid Glass – die violetten bleiben pastell-lavendel
   ═════════════════════════════════════════════════════════════════════════════ */
.liquid-glass.lg-primary {
  background: linear-gradient(180deg, rgba(198,188,255,.78) 0%, rgba(160,146,240,.68) 100%) !important;
  color: #1e1638 !important;
  border: 0 !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),          /* helle Lichtkante oben */
    inset 0 -1px 0 rgba(255,255,255,.3),
    inset 0 0 0 1px rgba(255,255,255,.38),         /* Glasrand */
    inset 0 -10px 18px rgba(124,111,214,.28),      /* Tiefe unten */
    0 6px 18px rgba(124,111,214,.28);
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.liquid-glass.lg-primary::before {
  /* Glanzlicht oben wie bei echtem Glas */
  background: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.08) 48%, rgba(255,255,255,0) 52%, rgba(255,255,255,.12) 100%);
}
.liquid-glass.lg-primary:hover {
  background: linear-gradient(180deg, rgba(210,202,255,.86) 0%, rgba(172,158,246,.76) 100%) !important;
}

.liquid-glass.lg-btn {
  --lg-tint: .22;
  color: inherit;
  border: 0 !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.7),
    inset 0 -1px 0 rgba(255,255,255,.18),
    inset 0 0 0 1px rgba(255,255,255,.3),
    0 4px 14px rgba(0,0,0,.1);
}
.liquid-glass.lg-btn:hover { --lg-tint: .32; }
/* Auf hellen Flächen braucht klares Glas einen sichtbaren Rand */
.ui-card .liquid-glass.lg-btn { box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 0 0 1px rgba(120,120,135,.28), 0 2px 8px rgba(0,0,0,.06); }
:root[data-theme="dark"] .ui-card .liquid-glass.lg-btn { box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 0 0 1px rgba(255,255,255,.14), 0 2px 8px rgba(0,0,0,.25); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ui-card .liquid-glass.lg-btn { box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 0 0 1px rgba(255,255,255,.14), 0 2px 8px rgba(0,0,0,.25); }
}
/* Pillenform für die Glas-Buttons */
.ui-btn.liquid-glass, .content-btn.liquid-glass { border-radius: 999px; }
.ui-btn-icon.liquid-glass, .ev-modal-close.liquid-glass { border-radius: 50%; }
.liquid-glass:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* ── Wetter: beide Bereiche als gleiches Liquid Glass ─────────────────────── */
.mw-glass.liquid-glass {
  background: rgba(30,38,50,.3) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 0 0 1px rgba(255,255,255,.26), inset 0 -1px 0 rgba(255,255,255,.1), 0 8px 24px rgba(20,28,40,.18) !important;
}
.mw-days.mw-glass { padding-top: 12px; }
.mw-glass .mw-caption span:last-child { color: rgba(255,255,255,.72); opacity: 1; }
.mw-glass .mw-day { color: #fff; }
.mw-glass .mw-day:hover { background: rgba(255,255,255,.1); }
.mw-glass .mw-day[aria-pressed="true"] { background: rgba(171,159,242,.32); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 0 0 1px rgba(255,255,255,.22); }
.mw-glass .mw-day:focus-visible { outline: 2px solid rgba(255,255,255,.8); }
.mw-glass .mw-day-date { opacity: .7; }
/* Weicher Wechsel des oberen Streifens */
.mw-hourly-chart { transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out); }
.mw-hourly-chart.is-switching { opacity: 0; transform: translateY(4px); }

/* ── Alle Buttons: reines, farbloses Liquid Glass ─────────────────────────── */
.liquid-glass.lg-btn,
.liquid-glass.lg-btn:hover {
  background: rgba(255,255,255,var(--lg-tint)) !important;
  color: var(--foreground) !important;
  text-shadow: none;
}
.liquid-glass.lg-btn { --lg-tint: .18; }
.liquid-glass.lg-btn:hover { --lg-tint: .28; }
.liquid-glass.lg-btn::before { background: linear-gradient(135deg, rgba(255,255,255,.3) 0%, rgba(255,255,255,0) 35%, rgba(255,255,255,0) 70%, rgba(255,255,255,.1) 100%); }
/* Auf dunklen oder bunten Flächen (Wallet, Wetter, Karte, Dialog-Bild) weisse Schrift */
.wallet .liquid-glass.lg-btn, .mw .liquid-glass.lg-btn, .content-card .liquid-glass.lg-btn, .ev-modal-close.liquid-glass.lg-btn { color: #fff !important; }
.ev-modal-close.liquid-glass.lg-btn { background: rgba(20,20,28,.35) !important; }
.ev-modal-head .liquid-glass.lg-btn { color: var(--foreground) !important; }

/* Wochenverlauf im unteren Glas-Panel (immer gleich) */
.mw-week-chart { height: 96px; margin: 0 6px 8px; border-top: 1px solid rgba(255,255,255,.14); }
.mw-caption-meta { color: rgba(255,255,255,.72); white-space: nowrap; }
.mw-hourly-chart { height: 128px; }

/* ── Katzenbild: füllt die Karte, mit Verlauf ─────────────────────────────── */
.cat-frame { flex: 1; aspect-ratio: auto; min-height: 240px; }
.cat-frame img { position: absolute; inset: 0; }
.cat-meta {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; color: #fff;
  background: rgba(20,20,28,.35); backdrop-filter: blur(10px) saturate(1.6); -webkit-backdrop-filter: blur(10px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(255,255,255,.18);
  font-variant-numeric: tabular-nums;
}
.cat-history-label { margin: 0 0 8px; font-size: 12px; color: var(--muted-foreground); font-weight: 500; }
.cat-history { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cat-thumb {
  position: relative; aspect-ratio: 1; padding: 0; border: 0; overflow: hidden; cursor: pointer;
  border-radius: calc(var(--radius) + 2px); background: var(--muted);
  opacity: .65; transition: opacity 150ms, transform 160ms var(--ease-out), box-shadow 150ms;
}
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-thumb:hover { opacity: 1; }
.cat-thumb:active { transform: scale(0.95); }
.cat-thumb:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.cat-thumb[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px rgba(171,159,242,.8); }
.cat-thumb.is-empty { cursor: default; opacity: 1; background: transparent; border: 1px dashed var(--border); }

/* ── Stundenstreifen: seitlich wischbar ───────────────────────────────────── */
.mw-scroll {
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  overscroll-behavior-x: contain;
  cursor: grab;
  /* Ränder weich ausblenden: zeigt, dass es links/rechts weitergeht */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}
.mw-scroll::-webkit-scrollbar { display: none; }
.mw-scroll.is-dragging { cursor: grabbing; user-select: none; }
.mw-scroll:focus-visible { outline: 2px solid rgba(255,255,255,.7); outline-offset: 2px; border-radius: 10px; }
.mw-scroll .mw-hourly-chart { max-width: none; }
.mw-tick-day { color: #fff; font-weight: 500; }
/* Klarere Trennung der Tage auch in der Tages-Leiste */
.mw-glass .mw-days-grid { gap: 0; }
.mw-glass .mw-day { position: relative; margin: 0 2px; }
.mw-glass .mw-day:not(:last-child)::after {
  content: ""; position: absolute; right: -3px; top: 14%; bottom: 14%; width: 1px;
  background: rgba(255,255,255,.22); pointer-events: none;
}

/* ── Gewählter Tag: dezente Markierung statt grosser Box ──────────────────── */
.mw-glass .mw-day,
.mw-glass .mw-day:hover,
.mw-glass .mw-day[aria-pressed="true"] { background: transparent; box-shadow: none; }
.mw-glass .mw-day { opacity: .62; transition: opacity 150ms var(--ease-out); }
.mw-glass .mw-day:hover { opacity: .9; }
.mw-glass .mw-day:active { transform: none; }
.mw-glass .mw-day[aria-pressed="true"] { opacity: 1; }
/* kurze Linie unter dem gewählten Tag */
.mw-glass .mw-day::before {
  content: ""; position: absolute; left: 50%; bottom: 2px;
  width: 22px; height: 2px; border-radius: 2px; background: #fff;
  transform: translateX(-50%) scaleX(0); transition: transform 180ms var(--ease-out);
}
.mw-glass .mw-day[aria-pressed="true"]::before { transform: translateX(-50%) scaleX(1); }

/* Stundenstreifen etwas höher → Kurve wirkt so lebendig wie der Wochenverlauf */
.mw-scroll .mw-hourly-chart { height: 150px; }

/* ═════════════════════════════════════════════════════════════════════════════
   Live-Abfahrten
   ═════════════════════════════════════════════════════════════════════════════ */
.sbb-board { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sbb-row {
  display: grid;
  grid-template-columns: 64px 74px minmax(0, 1fr) 64px 78px;
  align-items: center; gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  transition: opacity 300ms, background-color 150ms;
}
.sbb-row:last-child { border-bottom: 0; }
.sbb-row:hover { background: color-mix(in srgb, var(--muted) 60%, transparent); }
.sbb-row.is-gone { opacity: .35; }
.sbb-time { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.sbb-hm { font-weight: 500; }
.sbb-delay { font-size: 12px; font-weight: 500; color: #eb5757; }
.sbb-line {
  justify-self: start;
  padding: 2px 8px; border-radius: 6px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--muted); color: var(--foreground);
}
.sbb-long  { background: rgba(235,87,87,.16);  color: #e5484d; }
.sbb-sbahn { background: rgba(59,130,246,.16); color: #4f8ff7; }
.sbb-tram  { background: rgba(46,192,139,.16); color: #23a678; }
.sbb-bus   { background: rgba(245,158,11,.18); color: #d48806; }
.sbb-boat  { background: rgba(20,184,166,.16); color: #14b8a6; }
.sbb-to { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbb-platform { color: var(--muted-foreground); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sbb-platform.is-changed { color: #eb5757; font-weight: 500; }
.sbb-count { justify-self: end; font-size: 13px; font-weight: 500; color: var(--muted-foreground); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 575px) {
  .sbb-row { grid-template-columns: 52px 64px minmax(0, 1fr) 62px; gap: 8px; padding: 10px; }
  .sbb-platform { display: none; }
}

/* ═════════════════════════════════════════════════════════════════════════════
   Befehlspalette (Ctrl+K)
   ═════════════════════════════════════════════════════════════════════════════ */
.cmdk-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 8px 0 12px; border-radius: 999px;
  font-size: 13px; cursor: pointer; white-space: nowrap;
}
.cmdk-trigger .ic { width: 14px; height: 14px; opacity: .8; }
.cmdk-trigger-label { color: var(--muted-foreground); min-width: 72px; text-align: left; }
.cmdk-kbd {
  display: inline-flex; align-items: center; gap: 2px;
  font-family: inherit; font-size: 11px; font-weight: 500; line-height: 1;
  padding: 3px 6px; border-radius: 6px;
  color: var(--muted-foreground);
  background: color-mix(in srgb, var(--muted) 70%, transparent);
  border: 1px solid var(--border);
}
@media (max-width: 575px) { .cmdk-trigger-label, .cmdk-trigger .cmdk-kbd { display: none; } .cmdk-trigger { padding: 0 11px; } }

.cmdk-overlay { position: fixed; inset: 0; z-index: 3000; background: rgba(12,12,18,.45); backdrop-filter: blur(2px); }
.cmdk {
  position: fixed; z-index: 3001; left: 50%; top: 14vh;
  translate: -50% 0;
  width: min(560px, calc(100vw - 24px));
  border-radius: 18px; overflow: hidden;
  color: var(--foreground);
}
/* Glas, aber gut lesbar */
.cmdk.liquid-glass { background: color-mix(in srgb, var(--popover) 78%, transparent) !important; }
.cmdk-input-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.cmdk-input-row .ic { width: 16px; height: 16px; color: var(--muted-foreground); }
.cmdk-input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font-size: 16px; color: var(--foreground);
}
.cmdk-input::placeholder { color: var(--muted-foreground); }
.cmdk-list { list-style: none; margin: 0; padding: 6px; max-height: min(52vh, 380px); overflow-y: auto; }
.cmdk-group { padding: 10px 10px 4px; font-size: 11px; font-weight: 500; letter-spacing: .03em; color: var(--muted-foreground); }
.cmdk-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
  font-size: 14px; cursor: pointer;
}
.cmdk-item .ic { width: 16px; height: 16px; color: var(--muted-foreground); }
.cmdk-item[aria-selected="true"] { background: color-mix(in srgb, var(--foreground) 9%, transparent); }
.cmdk-item[aria-selected="true"] .ic { color: var(--foreground); }
.cmdk-empty { padding: 18px 12px; font-size: 13px; color: var(--muted-foreground); text-align: center; }
.cmdk-foot {
  display: flex; gap: 16px; justify-content: flex-end;
  padding: 8px 14px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted-foreground);
}
.cmdk-foot span { display: inline-flex; align-items: center; gap: 4px; }

/* Ziel-Karte kurz aufleuchten lassen */
@keyframes card-ping { 0% { box-shadow: 0 0 0 0 rgba(171,159,242,.0); } 30% { box-shadow: 0 0 0 3px rgba(171,159,242,.6); } 100% { box-shadow: 0 0 0 0 rgba(171,159,242,0); } }
.is-pinged { animation: card-ping 1.2s ease-out; }

/* ═════════════════════════════════════════════════════════════════════════════
   Live-Abfahrten im Terminal-Look (immer dunkel)
   ═════════════════════════════════════════════════════════════════════════════ */
.term {
  --t-bg: #0d0f12;
  --t-bar: #15181d;
  --t-line: #262b33;
  --t-text: #d6dde6;
  --t-dim: #7d8590;
  --t-blue: #6cb6ff;
  --t-green: #3ddc84;
  --t-red: #ff7b72;
  --t-yellow: #e3b341;
  height: 100%;
  display: flex; flex-direction: column;
  background: var(--t-bg);
  color: var(--t-text);
  border: 1px solid var(--t-line);
  border-radius: 14px; overflow: hidden;
  font-family: "Ubuntu Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
  scroll-margin-top: 72px;
}

/* Fensterleiste */
.term-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--t-bar);
  border-bottom: 1px solid var(--t-line);
}
.term-dots { display: inline-flex; gap: 7px; }
.term-dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-dots i:nth-child(2) { background: #febc2e; }
.term-dots i:nth-child(3) { background: #28c840; }
.term-title { flex: 1; margin: 0; text-align: center; font: inherit; font-size: 13px; color: var(--t-dim); }
.term-title span { color: var(--t-text); }
.term-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: .12em; color: var(--t-green);
}
.term-live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--t-green);
  animation: term-blink 1.6s steps(1) infinite;
}

/* Inhalt mit ganz feinen Scanlines */
.term-body {
  position: relative; flex: 1;
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px 12px;
  font-size: 15px; line-height: 1.55;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px);
}
.term-line { margin: 0; white-space: pre-wrap; }
.term-dim { color: var(--t-dim); }
.term-ps1 { color: var(--t-blue); }
.term-dollar { color: var(--t-dim); }
.term-cmd { color: var(--t-text); }
.term-key { font: inherit; font-size: 12px; padding: 0 5px; border: 1px solid var(--t-line); border-radius: 4px; color: var(--t-text); }
.term-empty { margin: 6px 0; }

/* Tabelle: feste Spalten wie in einer Konsole */
.term-table { margin-top: 8px; }
.term-row {
  display: grid;
  grid-template-columns: 76px 96px minmax(0, 1fr) 72px 64px;
  gap: 14px; align-items: baseline;
  padding: 3px 6px; margin: 0 -6px; border-radius: 4px;
}
.term-head {
  color: var(--t-dim); font-size: 12.5px; letter-spacing: .08em;
  border-bottom: 1px dashed var(--t-line);
  padding-bottom: 6px; margin-bottom: 4px; border-radius: 0;
}
.term .sbb-board { list-style: none; margin: 0; padding: 0; border: 0; border-radius: 0; overflow: visible; }
.term .sbb-row { transition: opacity 300ms, background-color 120ms; }
.term .sbb-row:hover { background: rgba(255,255,255,.04); }
.term .sbb-row.is-gone { opacity: .35; }
.term .sbb-row.is-gone .sbb-to { text-decoration: line-through; }
.term .sbb-hm { color: var(--t-text); }
.term .sbb-delay { color: var(--t-red); margin-left: 4px; }
.term .sbb-line { padding: 0; background: none; border-radius: 0; font-size: inherit; font-weight: 700; }
.term .sbb-long  { color: var(--t-red); background: none; }
.term .sbb-sbahn { color: var(--t-blue); background: none; }
.term .sbb-tram  { color: #7ee787; background: none; }
.term .sbb-bus   { color: var(--t-yellow); background: none; }
.term .sbb-boat  { color: #56d4dd; background: none; }
.term .sbb-other { color: #d2a8ff; background: none; }
.term .sbb-to { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--t-text); }
.term .sbb-platform { color: var(--t-dim); font-size: inherit; }
.term .sbb-platform.is-changed { color: var(--t-red); }
.term .sbb-count { justify-self: end; color: var(--t-text); font-size: inherit; font-weight: 400; }
.term .sbb-count.is-soon { color: var(--t-green); }
.term .sbb-count.is-now { color: var(--t-green); animation: term-blink 1s steps(1) infinite; }
.term-col-in { justify-self: end; }

/* Prompt = Suchfeld, mit blinkendem Block-Cursor */
.term-prompt {
  display: flex; align-items: center; gap: 8px;
  margin: auto 0 0; padding-top: 12px;
  border-top: 1px dashed var(--t-line);
  cursor: text;
}
.term-prefix { color: var(--t-yellow); }
.term-input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font: inherit; color: var(--t-text);
  caret-color: var(--t-green);
}
.term-input::placeholder { color: #4b535d; }
.term-input[aria-invalid="true"] { color: var(--t-red); }
.term-caret { display: none; width: 9px; height: 18px; background: var(--t-green); animation: term-blink 1.1s steps(1) infinite; }
/* Block-Cursor nur, solange das Feld leer und nicht fokussiert ist */
.term-prompt:has(.term-input:placeholder-shown:not(:focus)) .term-caret { display: inline-block; }
.term-prompt:focus-within { border-top-color: #3a414b; }

/* Aktionen unten wie kleine Konsolen-Buttons */
.term-actions {
  display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;
  padding: 10px 18px 14px;
}
.term-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font: inherit; font-size: 13.5px;
  color: var(--t-text); background: transparent;
  border: 1px solid #30363d; border-radius: 8px;
  padding: 6px 12px; cursor: pointer;
  transition: border-color 150ms, color 150ms, background-color 150ms, transform 160ms var(--ease-out);
}
.term-btn .ic { width: 13px; height: 13px; }
.term-btn:hover { border-color: var(--t-blue); color: #fff; }
.term-btn:active:not(:disabled) { transform: scale(0.97); }
.term-btn:focus-visible { outline: 2px solid var(--t-blue); outline-offset: 2px; }
.term-btn:disabled { opacity: .6; cursor: progress; }
.term-btn.is-loading .ic { animation: spin 700ms linear infinite; }
.term-btn-primary { border-color: #2ea043; color: var(--t-green); }
.term-btn-primary:hover { border-color: var(--t-green); background: rgba(46,160,67,.12); color: var(--t-green); }

@keyframes term-blink { 50% { opacity: 0; } }

@media (max-width: 575px) {
  .term-body { font-size: 13.5px; padding: 14px 12px 10px; }
  .term-row { grid-template-columns: 50px 62px minmax(0, 1fr) 46px; gap: 8px; }
  .term-col-gl, .term .sbb-platform { display: none; }
  .term-title { text-align: left; }
}

/* Terminal: Zeilen erscheinen nacheinander wie Konsolenausgabe */
.term .sbb-row.is-typed { animation: term-type 1ms steps(1) both; animation-delay: calc(var(--row, 0) * 55ms); }
@keyframes term-type { from { visibility: hidden; } to { visibility: visible; } }
@media (prefers-reduced-motion: reduce) { .term .sbb-row.is-typed { animation: none; } }

/* ── Terminal: ruhiger, mit SBB-Rot als einzigem Akzent ──────────────────── */
.term {
  --t-red: #eb0000;          /* SBB-Rot */
  --t-red-soft: #ff4d4d;     /* gut lesbar auf Schwarz */
  --t-bg: #0e0e10;
  --t-bar: #141416;
  --t-line: #26262b;
  --t-text: #e6e6e8;
  --t-dim: #8a8a93;
}
.term-body { background-image: none; }

/* Fensterleiste: kleine rote Marke, Titel links, Status rechts – nichts blinkt */
.term-bar { gap: 10px; padding: 11px 16px; }
.term-mark { width: 10px; height: 10px; border-radius: 2px; background: var(--t-red); flex: none; }
.term-title { text-align: left; color: var(--t-dim); }
.term-title span { color: var(--t-text); }
.term-title .term-sep { color: #4a4a52; }
.term-status { font-size: 12px; color: var(--t-dim); letter-spacing: .02em; white-space: nowrap; }

/* Prompt & Befehlszeile */
.term-ps1 { color: var(--t-red-soft); }
.term-prefix { color: var(--t-dim); }
.term-input { caret-color: var(--t-red-soft); }
.term-caret { background: var(--t-red-soft); width: 8px; }

/* Linien: Fernverkehr rot, sonst neutral – kein Farbenmix */
.term .sbb-line,
.term .sbb-sbahn, .term .sbb-tram, .term .sbb-bus, .term .sbb-boat, .term .sbb-other { color: var(--t-text); }
.term .sbb-long { color: var(--t-red-soft); }

/* Countdown: rot kurz vor Abfahrt, "jetzt" fett – ohne Blinken */
.term .sbb-count.is-soon { color: var(--t-red-soft); }
.term .sbb-count.is-now { color: var(--t-red-soft); font-weight: 700; animation: none; }
.term .sbb-delay { color: var(--t-red-soft); }
.term .sbb-platform.is-changed { color: var(--t-red-soft); }
.term .sbb-row:hover { background: rgba(235,0,0,.06); }

/* Buttons */
.term-btn { border-color: #34343b; }
.term-btn:hover { border-color: #5a5a63; color: #fff; }
.term-btn:focus-visible { outline-color: var(--t-red-soft); }
.term-btn-primary { border-color: var(--t-red); color: #fff; background: var(--t-red); }
.term-btn-primary:hover { border-color: #ff1f1f; background: #ff1f1f; color: #fff; }

/* Bitcoin-Karte: Chart beeinflusst die Kartengrösse nicht mehr (kein Springen beim Zeitraum-Wechsel) */
.wallet-chart-box { flex: 1 1 0; min-height: 220px; overflow: hidden; }
.wallet-chart-box > .highcharts-container,
.wallet-chart-box > .wallet-chart-empty { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; }
.wallet-extremes { min-height: 18px; }

/* Bitcoin: Änderungszeile hat immer dieselbe Höhe (kein Springen beim Hovern) */
.wallet-change { flex-wrap: wrap; align-content: center; height: 48px; min-height: 48px; row-gap: 2px; overflow: hidden; }
.wallet-delta-label { flex-basis: 100%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 20px; }
.wallet-delta, .wallet-delta-pill { line-height: 22px; white-space: nowrap; }
.wallet-amount { white-space: nowrap; }

/* ═════════════════════════════════════════════════════════════════════════════
   Liquid Glass v2: klares Glas mit knackigen Kanten statt Weichzeichner
   ═════════════════════════════════════════════════════════════════════════════ */
/* Fallback (Safari/Firefox): nur leichtes Mattieren, damit nichts "verschmiert" */
.liquid-glass {
  -webkit-backdrop-filter: blur(6px) saturate(1.6) brightness(1.04);
          backdrop-filter: blur(6px) saturate(1.6) brightness(1.04);
}

/* Glanz: schmaler, klar begrenzter Lichtstreifen oben links statt weicher Schleier */
.liquid-glass::before {
  background:
    linear-gradient(158deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,.06) 22%, rgba(255,255,255,0) 40%),
    linear-gradient(338deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 22%) !important;
}

/* Kantenlicht: 1px-Ring – oben hell (Lichtkante), seitlich schwach, unten Reflex.
   So wirkt die Fläche wie ein festes Stück Glas mit harter Kante. */
.liquid-glass::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  border-radius: inherit; padding: 1px;
  background: linear-gradient(180deg,
    rgba(255,255,255,.85) 0%,
    rgba(255,255,255,.22) 18%,
    rgba(255,255,255,.06) 50%,
    rgba(255,255,255,.18) 82%,
    rgba(255,255,255,.45) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* Auf hellen Karten: dezentere, dunklere Kante, damit das Glas sichtbar bleibt */
.ui-card .liquid-glass::after,
.ui-header .liquid-glass:not(.ui-header-inner)::after {
  background: linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(140,140,155,.35) 40%, rgba(120,120,135,.3) 100%);
}
:root[data-theme="dark"] .ui-card .liquid-glass::after {
  background: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.1) 40%, rgba(255,255,255,.18) 100%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ui-card .liquid-glass::after {
    background: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.1) 40%, rgba(255,255,255,.18) 100%);
  }
}
@media (prefers-reduced-transparency: reduce) { .liquid-glass::after, .liquid-glass::before { display: none; } }

/* ── Bitcoin: Pills und Zeitraum-Umschalter als Glas ─────────────────────── */
.wallet-pair.liquid-glass { background: rgba(255,255,255,.06) !important; border-color: transparent; }
.wallet-pill.liquid-glass { position: relative; background: rgba(171,159,242,.16) !important; border-radius: 9px; }
.wallet-ranges.liquid-glass {
  padding: 4px; gap: 2px; border-radius: 999px;
  background: rgba(255,255,255,.04) !important;
}
.wallet-ranges.liquid-glass .wallet-range { position: relative; z-index: 2; height: 30px; }
.wallet-ranges.liquid-glass .wallet-range.is-active {
  background: rgba(255,255,255,.12);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 0 rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.25);
}

/* Header: ohne Weichzeichner etwas mehr Tönung, damit die Navigation lesbar bleibt */
.ui-header-inner.liquid-glass { --lg-tint: .62; }
:root[data-theme="dark"] .ui-header-inner.liquid-glass { background: rgba(22,22,26,.72) !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ui-header-inner.liquid-glass { background: rgba(22,22,26,.72) !important; } }

/* ═════════════════════════════════════════════════════════════════════════════
   Liquid Glass v3 – Stil des Hire-Digital-Generators
   (Frost 10, Blur 1, Refraction/Bezel je nach Grösse – siehe setupGlass)
   ═════════════════════════════════════════════════════════════════════════════ */
.liquid-glass {
  /* Fallback Safari/Firefox: lebendiges Mattglas wie im Generator */
  -webkit-backdrop-filter: blur(8px) saturate(1.8) brightness(1.15) contrast(1.05);
          backdrop-filter: blur(8px) saturate(1.8) brightness(1.15) contrast(1.05);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.15),
    inset 1.5px 1.5px 0 rgba(255,255,255,.5),
    inset 0 0 12px rgba(255,255,255,.2),
    0 8px 32px rgba(0,0,0,.2) !important;
}
/* Eigene Zusatz-Effekte aus v2 weg – der Generator-Look kommt ohne aus */
.liquid-glass::before, .liquid-glass::after { display: none !important; }
/* Frost 10 als Grund-Tönung (Elemente mit eigener Tönung behalten diese) */
.liquid-glass.lg-btn { --lg-tint: .10; }
.liquid-glass.lg-btn:hover { --lg-tint: .18; }
/* Auf hellen Karten: feiner dunkler Rand, sonst wäre der weisse Glasrand unsichtbar */
:root:not([data-theme="dark"]) .ui-card .liquid-glass.lg-btn {
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.10), inset 1.5px 1.5px 0 rgba(255,255,255,.8), inset 0 0 12px rgba(255,255,255,.35), 0 6px 20px rgba(0,0,0,.10) !important;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ui-card .liquid-glass.lg-btn {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.15), inset 1.5px 1.5px 0 rgba(255,255,255,.5), inset 0 0 12px rgba(255,255,255,.2), 0 8px 32px rgba(0,0,0,.2) !important;
  }
}
.wallet-ranges.liquid-glass .wallet-range.is-active { box-shadow: inset 0 0 0 1px rgba(255,255,255,.15), inset 1.5px 1.5px 0 rgba(255,255,255,.45), inset 0 0 10px rgba(255,255,255,.15); }
@media (prefers-reduced-transparency: reduce) { .liquid-glass { box-shadow: none !important; } }

/* ═════════════════════════════════════════════════════════════════════════════
   Glasmorphism: farbige Aurora + durchscheinende Karten + Farbe unter Buttons
   ═════════════════════════════════════════════════════════════════════════════ */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora i {
  position: absolute; width: 52vmax; height: 52vmax; border-radius: 50%;
  filter: blur(70px); opacity: .55;
  animation: aurora-drift 26s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { background: #ab9ff2; left: -12vmax; top: -10vmax; }
.aurora i:nth-child(2) { background: #f5a3c7; right: -14vmax; top: 18vh; animation-duration: 32s; animation-delay: -8s; }
.aurora i:nth-child(3) { background: #7cc4ff; left: 18vw; bottom: -18vmax; animation-duration: 29s; animation-delay: -14s; }
.aurora i:nth-child(4) { background: #8ee6c9; right: 10vw; bottom: -10vmax; width: 34vmax; height: 34vmax; opacity: .4; animation-duration: 35s; animation-delay: -20s; }
@keyframes aurora-drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(6vmax, 4vmax) scale(1.08); }
  100% { transform: translate(-4vmax, 7vmax) scale(.95); }
}
:root[data-theme="dark"] .aurora i { opacity: .32; }
:root[data-theme="dark"] .aurora i:nth-child(4) { opacity: .22; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .aurora i { opacity: .32; }
  :root:not([data-theme="light"]) .aurora i:nth-child(4) { opacity: .22; }
}
@media (prefers-reduced-motion: reduce) { .aurora i { animation: none; } }

/* Karten leicht durchscheinend → die Aurora schimmert durch (Glasmorphism) */
.ui-card:not(.wallet):not(.mw) {
  background: color-mix(in srgb, var(--card) 70%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
          backdrop-filter: blur(24px) saturate(1.4);
  border-color: color-mix(in srgb, var(--border) 70%, rgba(255,255,255,.25));
}
.flip-hero { background: radial-gradient(120% 90% at 50% -10%, rgba(42,38,56,.88) 0%, rgba(22,22,24,.86) 60%); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }

/* Farbiger Schimmer unter den Glas-Buttons in den Karten-Fusszeilen,
   damit die Lichtbrechung am Rand sichtbar wird */
.ui-card-footer { position: relative; }
.ui-card-footer::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: -6px; bottom: 18px;
  border-radius: 999px; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 120% at 15% 50%, rgba(171,159,242,.55), transparent 70%),
    radial-gradient(50% 120% at 55% 50%, rgba(245,163,199,.45), transparent 70%),
    radial-gradient(55% 120% at 90% 50%, rgba(124,196,255,.5), transparent 70%);
  filter: blur(10px);
}
.ui-card-footer > * { position: relative; z-index: 1; }

/* Glas noch klarer: dünnere Tönung, kräftigere Lichtkante */
.liquid-glass.lg-btn { --lg-tint: .06; }
.liquid-glass.lg-btn:hover { --lg-tint: .14; }
.liquid-glass {
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.22),
    inset 1.5px 1.5px 0 rgba(255,255,255,.65),
    inset -1px -1px 0 rgba(255,255,255,.12),
    inset 0 0 16px rgba(255,255,255,.22),
    0 10px 34px rgba(0,0,0,.22) !important;
}
:root:not([data-theme="dark"]) .ui-card .liquid-glass.lg-btn {
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), inset 1.5px 1.5px 0 rgba(255,255,255,.9), inset 0 0 16px rgba(255,255,255,.4), 0 8px 24px rgba(80,60,160,.16) !important;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ui-card .liquid-glass.lg-btn {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), inset 1.5px 1.5px 0 rgba(255,255,255,.65), inset 0 0 16px rgba(255,255,255,.22), 0 10px 34px rgba(0,0,0,.22) !important;
  }
}
/* Header: etwas weniger Tönung, damit die Aurora durchkommt */
.ui-header-inner.liquid-glass { --lg-tint: .4; }
:root[data-theme="dark"] .ui-header-inner.liquid-glass { background: rgba(22,22,26,.5) !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ui-header-inner.liquid-glass { background: rgba(22,22,26,.5) !important; } }
@media (prefers-reduced-transparency: reduce) {
  .aurora { display: none; }
  .ui-card:not(.wallet):not(.mw) { background: var(--card); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .ui-card-footer::before { display: none; }
}

/* ═════════════════════════════════════════════════════════════════════════════
   Alle Buttons wirklich als Glas: Farbe darunter + kein Glas-im-Glas mehr
   ═════════════════════════════════════════════════════════════════════════════ */
/* Gemeinsamer Farbschimmer unter Glas-Buttons auf ruhigen Flächen */
.wallet-actions, .mw-foot, .term-actions { position: relative; }
.wallet-actions::before, .mw-foot::before {
  content: ""; position: absolute; left: 6%; right: 6%; top: -4px; height: 54px;
  border-radius: 999px; pointer-events: none; z-index: 0; filter: blur(12px);
  background:
    radial-gradient(55% 120% at 15% 50%, rgba(171,159,242,.6), transparent 70%),
    radial-gradient(45% 120% at 55% 50%, rgba(245,163,199,.5), transparent 70%),
    radial-gradient(50% 120% at 90% 50%, rgba(124,196,255,.55), transparent 70%);
}
.wallet-actions > *, .mw-foot > * { position: relative; z-index: 1; }

/* Karte: Suchleiste ist kein Glas mehr → Eingabe und Buttons brechen direkt die Karte */
.content-card-search { background: none !important; box-shadow: none !important; padding: 0; }
.content-card .content-input.liquid-glass {
  border: 0 !important; color: #fff !important;
  background: rgba(20,20,28,.18) !important;
}
.content-card .content-input.liquid-glass::placeholder { color: rgba(255,255,255,.8); }
.content-card .content-input.liquid-glass:focus-visible { outline: 2px solid rgba(255,255,255,.7); outline-offset: 2px; }
.content-card .content-btn.liquid-glass { background: rgba(20,20,28,.14) !important; }

/* Terminal: klares Glas + SBB-rotes Glas, mit rotem Schimmer darunter */
.term-actions::before {
  content: ""; position: absolute; right: 18px; top: 4px; width: min(420px, 70%); height: 40px;
  border-radius: 999px; pointer-events: none; z-index: 0; filter: blur(14px);
  background:
    radial-gradient(60% 120% at 80% 50%, rgba(235,0,0,.55), transparent 70%),
    radial-gradient(40% 120% at 20% 50%, rgba(255,255,255,.18), transparent 70%);
}
.term-actions > * { position: relative; z-index: 1; }
.term .term-btn.liquid-glass { border: 0 !important; border-radius: 999px; padding: 7px 14px; color: var(--t-text) !important; }
.term .term-btn.lg-btn { background: rgba(255,255,255,.06) !important; }
.liquid-glass.lg-red {
  background: rgba(235,0,0,.55) !important; color: #fff !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.22),
    inset 1.5px 1.5px 0 rgba(255,255,255,.6),
    inset 0 0 14px rgba(255,255,255,.18),
    0 8px 24px rgba(235,0,0,.25) !important;
}
.liquid-glass.lg-red:hover { background: rgba(255,31,31,.65) !important; }

@media (prefers-reduced-transparency: reduce) {
  .wallet-actions::before, .mw-foot::before, .term-actions::before { display: none; }
}

/* ═════════════════════════════════════════════════════════════════════════════
   ÖV Schritt 1: Einstieg mit Terminal-Karte (nach uiverse.io / ilkhoeri, MIT)
   ═════════════════════════════════════════════════════════════════════════════ */
.sbb-entry {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 560px);
  align-items: center; gap: 24px 40px;
  padding: 28px;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid color-mix(in srgb, var(--border) 70%, rgba(255,255,255,.25));
  background: color-mix(in srgb, var(--card) 70%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
  scroll-margin-top: 72px;
}
.sbb-entry-title { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 20px; font-weight: 500; }
.sbb-entry-mark { width: 12px; height: 12px; border-radius: 3px; background: #eb0000; flex: none; }
.sbb-entry-desc { margin: 0; color: var(--muted-foreground); font-size: 14px; max-width: 46ch; }
.sbb-entry .term-key { font-family: "Ubuntu Mono", ui-monospace, monospace; border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; font-size: 12px; }
@media (max-width: 767px) { .sbb-entry { grid-template-columns: 1fr; padding: 20px; } }

/* Original-Komponente, nur ans Projekt angepasst */
.uv-card {
  padding: 1rem; overflow: hidden;
  border: 1px solid #c5c5c5; border-radius: 12px;
  background-color: #d9d9d92f;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  min-width: 0;
}
:root[data-theme="dark"] .uv-card { border-color: rgba(197,197,197,.35); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .uv-card { border-color: rgba(197,197,197,.35); } }
.uv-wrap { display: flex; flex-direction: column; gap: 1rem; position: relative; z-index: 10; border: .5px solid #525252; border-radius: 8px; overflow: hidden; }
.uv-terminal { display: flex; flex-direction: column; font-family: "Ubuntu Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.uv-head {
  display: flex; align-items: center; justify-content: space-between; overflow: hidden;
  min-height: 40px; padding-inline: 12px; background-color: #202425;
}
.uv-title {
  display: flex; align-items: center; gap: 8px; height: 2.5rem; margin: 0;
  user-select: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #8e8e8e;
}
.uv-title > svg { height: 18px; width: 18px; margin-top: 2px; color: #eb0000; }
.uv-copy {
  display: flex; align-items: center; justify-content: center; padding: .25rem;
  border: .65px solid #c1c2c5; margin-left: auto; border-radius: 6px;
  background-color: #202425; color: #8e8e8e; cursor: pointer;
}
.uv-copy > svg { width: 20px; height: 20px; }
.uv-copy:hover { color: #fff; }
.uv-copy:focus-visible { outline: 2px solid #eb0000; outline-offset: 2px; }
.uv-copy.is-copied > svg > path { animation: uv-clipboard-check 500ms linear forwards; }
.uv-body {
  display: flex; flex-direction: column; gap: 6px; position: relative;
  overflow-x: auto; padding: 1rem; line-height: 19px;
  color: white; background-color: black; white-space: nowrap;
}
.uv-pre { display: flex; flex-direction: row; align-items: center; margin: 0; font-size: 16px; cursor: text; }
.uv-pre code { font-family: inherit; }
.uv-dash { color: #575757; }
.uv-bin { color: #ff4d4d; }
.uv-cmd-wrap { position: relative; flex: 1; min-width: 0; height: 19px; display: flex; align-items: center; }
.uv-input {
  width: 100%; border: 0; outline: 0; padding: 0; background: transparent;
  font: inherit; font-size: 16px; color: #fff; caret-color: #ff4d4d;
}
/* Getippte Animation wie im Original – nur solange das Feld leer & nicht fokussiert ist */
.uv-cmd { position: absolute; left: 0; top: 0; height: 19px; display: none; align-items: center; pointer-events: none; color: #fff; }
.uv-cmd-wrap:has(.uv-input:placeholder-shown:not(:focus)) .uv-cmd { display: flex; }
.uv-cmd::before {
  content: attr(data-cmd); position: relative; display: block; white-space: nowrap; overflow: hidden;
  animation: uv-inputs 8s steps(9) infinite;
}
.uv-cmd::after {
  content: ""; position: relative; display: block; height: 100%;
  border-right: .15em solid #ff4d4d;
  animation: uv-cursor .5s step-end infinite alternate, uv-blinking .5s infinite;
}
.uv-hint { margin: 0; font-size: 12px; color: #575757; }
@keyframes uv-blinking { 20%, 80% { transform: scaleY(1); } 50% { transform: scaleY(0); } }
@keyframes uv-cursor { 50% { border-right-color: transparent; } }
@keyframes uv-inputs { 0%, 100% { width: 0; } 10%, 90% { width: 0; } 30%, 70% { width: 9ch; max-width: max-content; } }
@keyframes uv-clipboard-check {
  100% { color: #fff; d: path("M 9 5 H 7 a 2 2 0 0 0 -2 2 v 12 a 2 2 0 0 0 2 2 h 10 a 2 2 0 0 0 2 -2 V 7 a 2 2 0 0 0 -2 -2 h -2 M 9 5 a 2 2 0 0 0 2 2 h 2 a 2 2 0 0 0 2 -2 M 9 5 a 2 2 0 0 1 2 -2 h 2 a 2 2 0 0 1 2 2 m -6 9 l 2 2 l 4 -4"); }
}
@media (prefers-reduced-motion: reduce) { .uv-cmd::before { animation: none; width: 9ch; } .uv-cmd::after { animation: none; } }

/* ═════════════════════════════════════════════════════════════════════════════
   ÖV Schritt 2: grosses Terminal im Stil von sbb-tui
   ═════════════════════════════════════════════════════════════════════════════ */
.tui-overlay { position: fixed; inset: 0; z-index: 3200; background: rgba(8,8,10,.6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.tui {
  --tui-red: #e5242b; --tui-red-dim: #7a1418; --tui-line: #2a2a2e; --tui-text: #ececec; --tui-dim: #8a8a8f; --tui-navy: #2d327d;
  position: fixed; z-index: 3201; left: 50%; top: 50%; translate: -50% -50%;
  width: min(1100px, calc(100vw - 24px)); height: min(720px, calc(100dvh - 24px));
  display: flex; flex-direction: column;
  background: #000; color: var(--tui-text);
  border: 1px solid #1d1d20; border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  font-family: "Ubuntu Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14.5px;
}
.tui[hidden], .tui-overlay[hidden], .tui-board[hidden] { display: none !important; }
.tui-titlebar { display: flex; align-items: center; gap: 10px; padding: 10px 16px 6px; color: var(--tui-dim); font-size: 13px; }
.tui-keys { opacity: .7; }
.tui-name { color: var(--tui-text); }
.tui-x { margin-left: auto; font: inherit; font-size: 12px; color: var(--tui-dim); background: none; border: 1px solid var(--tui-line); border-radius: 4px; padding: 2px 8px; cursor: pointer; }
.tui-x:hover { color: #fff; border-color: #555; }

.tui-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 16px 12px; }
.tui-field {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px; border: 1px solid #333; border-radius: 3px; white-space: nowrap;
}
.tui-field-station { flex: 1 1 260px; border-color: var(--tui-red-dim); }
.tui-field-station:focus-within { border-color: var(--tui-red); }
.tui-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--tui-text); caret-color: var(--tui-red); }
.tui-dim { color: #5c5c62; }
.tui-seg { display: inline-flex; border: 1px solid #333; border-radius: 3px; overflow: hidden; }
.tui-btn { font: inherit; color: var(--tui-dim); background: transparent; border: 0; padding: 0 14px; height: 34px; cursor: pointer; }
.tui-btn + .tui-btn { border-left: 1px solid #333; }
.tui-btn.is-on { background: var(--tui-red); color: #fff; }
.tui-btn:focus-visible, .tui-x:focus-visible { outline: 2px solid var(--tui-red); outline-offset: 2px; }
.tui-icon { height: 36px; border: 1px solid #333; border-radius: 3px; display: grid; place-items: center; }
.tui-icon .ic { width: 14px; height: 14px; }

.tui-main {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px;
  margin: 0 16px; padding: 12px; border: 1px solid var(--tui-red-dim); border-radius: 3px;
}
.tui-pane { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.tui-list { display: flex; flex-direction: column; gap: 10px; padding-right: 4px; outline: none; }
.tui-detail { border: 1px solid var(--tui-red-dim); border-radius: 3px; padding: 18px 22px; }

/* Zug-Karte links */
.tui-train {
  display: grid; gap: 8px; text-align: left;
  padding: 12px 16px; border: 1px solid #333; border-radius: 3px;
  background: transparent; color: inherit; font: inherit; cursor: pointer;
}
.tui-train:hover { border-color: #555; }
.tui-train.is-sel { border-color: var(--tui-red); }
.tui-train:focus-visible { outline: 2px solid var(--tui-red); outline-offset: 2px; }
.tui-row1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tui-mode { display: inline-grid; place-items: center; width: 22px; height: 16px; background: var(--tui-navy); color: #fff; font-size: 11px; border-radius: 1px; }
.tui-line { background: var(--tui-red); color: #fff; padding: 0 5px; font-weight: 700; white-space: nowrap; }
.tui-op { background: #fff; color: #000; padding: 0 4px; font-size: 12px; white-space: nowrap; }
.tui-to { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tui-row2 { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; font-weight: 700; }
.tui-track { position: relative; height: 10px; }
.tui-track::before { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 1px; background: #bbb; }
.tui-track i { position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #000; border: 1.5px solid #ddd; }
.tui-track i.is-end { background: #fff; border-color: #fff; }
.tui-row3 { display: flex; justify-content: space-between; color: var(--tui-dim); font-size: 13px; }
.tui-delay { color: var(--tui-red); font-weight: 700; margin-left: 4px; }

/* Verlauf rechts */
.tui-detail-head { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.tui-stops { list-style: none; margin: 0; padding: 0; }
.tui-stop { display: grid; grid-template-columns: 56px 18px minmax(0, 1fr) auto; gap: 12px; align-items: start; min-height: 40px; }
.tui-stop time { font-weight: 700; }
.tui-stop .rail { position: relative; align-self: stretch; }
.tui-stop .rail::before { content: ""; position: absolute; left: 8px; top: 12px; bottom: -4px; width: 1px; background: #bbb; }
.tui-stop:last-child .rail::before { display: none; }
.tui-stop .rail i { position: absolute; left: 4px; top: 4px; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #ddd; background: #000; }
.tui-stop.is-first .rail i, .tui-stop:last-child .rail i { background: #fff; border-color: #fff; }
.tui-stop.is-first span.name { font-weight: 700; }
.tui-stop .pl { color: var(--tui-dim); white-space: nowrap; }
.tui-empty { color: var(--tui-dim); padding: 8px 4px; }
.tui-skel { height: 92px; border: 1px solid #222; border-radius: 3px; background: linear-gradient(90deg, #0a0a0b, #141416, #0a0a0b); background-size: 200% 100%; animation: tui-shimmer 1.2s linear infinite; }
@keyframes tui-shimmer { to { background-position: -200% 0; } }

.tui-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 16px 12px; color: var(--tui-dim); font-size: 13px; }
.tui-foot kbd { font: inherit; background: #222; color: #ccc; padding: 0 5px; border-radius: 2px; margin-right: 4px; }
.tui-status { margin-left: auto; }

@media (max-width: 767px) {
  .tui { font-size: 13.5px; }
  .tui-main { grid-template-columns: 1fr; }
  .tui-detail { display: none; }
  .tui-bar .tui-dim { display: none; }
}

/* ═════════════════════════════════════════════════════════════════════════════
   ÖV Schritt 3: SBB-Perronanzeige
   ═════════════════════════════════════════════════════════════════════════════ */
.tui-board {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 24px;
  background: radial-gradient(120% 90% at 50% 0%, #2b2b30 0%, #111114 70%);
}
.sbb-display {
  --sbbd-blue: #1f3ea8;
  width: min(940px, 100%);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  background: var(--sbbd-blue);
  border: 10px solid #1a339a; border-radius: 4px;
  box-shadow: inset 0 0 0 2px #2c4cc0, 0 30px 60px rgba(0,0,0,.55);
  color: #fff;
  font-family: "Helvetica Neue", Arial, "Ubuntu", sans-serif;
}
.sbbd-left { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px 0; border-right: 6px solid #13277a; min-height: 260px; }
.sbbd-top { display: flex; align-items: center; gap: 12px; }
.sbbd-line { background: #eb0000; color: #fff; font-weight: 700; font-style: italic; padding: 2px 10px; border-radius: 2px; font-size: 20px; letter-spacing: .02em; }
.sbbd-line.is-sbahn { background: #fff; color: var(--sbbd-blue); font-style: normal; }
.sbbd-time { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sbbd-delay { font-size: 18px; font-weight: 700; color: #ffd54a; }
.sbbd-dest { font-size: 40px; font-weight: 700; line-height: 1.1; margin-top: 6px; }
.sbbd-via { font-size: 18px; opacity: .95; line-height: 1.4; }
.sbbd-strip {
  margin: auto -22px 0; padding: 6px 22px;
  background: #fff; color: var(--sbbd-blue); font-size: 13px; font-weight: 700;
  display: flex; flex-wrap: wrap; gap: 6px 14px;
}
.sbbd-strip .cap { display: inline-flex; gap: 2px; }
.sbbd-strip .cap i { width: 6px; height: 12px; background: var(--sbbd-blue); opacity: .25; }
.sbbd-strip .cap i.on { opacity: 1; }
.sbbd-right { position: relative; padding: 20px 22px; }
.sbbd-plat {
  position: absolute; top: 14px; right: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 54px; height: 60px; border: 2px solid #fff; border-radius: 3px; line-height: 1;
}
.sbbd-plat span { font-size: 10px; }
.sbbd-plat b { font-size: 26px; }
.sbbd-stops { list-style: none; margin: 0; padding: 0 70px 0 0; }
.sbbd-stops li { position: relative; padding: 0 0 6px 26px; font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbbd-stops li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: var(--sbbd-blue); }
.sbbd-stops li::after { content: ""; position: absolute; left: 10px; top: 21px; bottom: -6px; border-left: 2px dotted #fff; }
.sbbd-stops li:last-child::after { display: none; }
.sbbd-stops li small { font-weight: 400; opacity: .8; margin-left: 8px; font-size: 14px; }
.tui-board-hint { margin: 0; color: #8a8a8f; font-size: 13px; }
.tui-board-hint kbd { font: inherit; background: #222; color: #ccc; padding: 0 5px; border-radius: 2px; }
@media (max-width: 767px) {
  .sbb-display { grid-template-columns: 1fr; }
  .sbbd-left { border-right: 0; border-bottom: 6px solid #13277a; min-height: 0; }
  .sbbd-dest { font-size: 30px; }
}

/* ═════════════════════════════════════════════════════════════════════════════
   Buttons wieder komplett durchsichtig – dafür ein Farbverlauf im Hintergrund
   ═════════════════════════════════════════════════════════════════════════════ */
.ui-card-footer::before, .wallet-actions::before, .mw-foot::before, .term-actions::before { display: none !important; }
.aurora { display: none; }

/* Seitenhintergrund: von Hellblau zu leicht dunklerem Blau */
html { min-height: 100%; }
body {
  background: linear-gradient(165deg, #e3f0ff 0%, #bcd6f5 45%, #8fb3e3 100%) fixed;
}
:root[data-theme="dark"] body { background: linear-gradient(165deg, #0f1b2d 0%, #16294a 50%, #1f3a66 100%) fixed; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body { background: linear-gradient(165deg, #0f1b2d 0%, #16294a 50%, #1f3a66 100%) fixed; }
}

/* ═════════════════════════════════════════════════════════════════════════════
   ÖV-Fenster im PowerShell-Stil (uiverse.io / mihocsaszilard, MIT)
   schwarz = Abfahrtstafel (serious-hound-10) · blau = Zuganzeige (modern-pig-15)
   ═════════════════════════════════════════════════════════════════════════════ */
.tui {
  border-radius: 4px 4px 0 0;
  border: 1px solid #000;
  background-color: #000;
  transition: background-color 250ms;
}
.tui.is-board { background-color: mediumblue; }
.tui-titlebar {
  display: flex; justify-content: space-between; align-items: stretch;
  padding: 0; background-color: #fff; color: #000;
  font-family: "Gill Sans MT", "Gill Sans", "Segoe UI", "Ubuntu", sans-serif; font-size: 15px;
}
.tui-title { display: flex; gap: 6px; align-items: center; padding: 0 8px; margin-top: 4px; height: 26px; }
.tui-ps-icon {
  display: inline-grid; place-items: center; width: 18px; height: 16px; border-radius: 2px;
  background: #012456; color: #fff; font: 700 10px/1 "Ubuntu Mono", monospace;
}
.tui-name { color: #000; }
.tui-controls { display: flex; align-items: center; gap: 16px; margin: 0 8px; color: #000; user-select: none; }
.tui .tui-x {
  margin: 0; padding: 0 4px; border: 0; border-radius: 2px; background: none; color: #000;
  font: 400 18px/1 "Segoe UI", sans-serif; cursor: pointer;
}
.tui .tui-x:hover { background: #e81123; color: #fff; }
.tui .tui-x:focus-visible { outline: 2px solid #000; outline-offset: 1px; }
.tui-bar { padding-top: 12px; }

/* Ladeanzeige: drehender Schrägstrich wie im Original-Loader */
.tui-loading { padding: 4px 2px; color: #ddd; font-size: 14px; }
.tui-loading .ps { color: #9a9a9a; }
.tui-spin { position: relative; display: inline-block; width: 1ch; }
.tui-spin .slash { position: absolute; left: 0; visibility: hidden; animation: 2s infinite ps-loading; }
.tui-spin .slash:nth-child(1) { animation-delay: .25s; }
.tui-spin .slash:nth-child(2) { animation-delay: .5s; }
.tui-spin .slash:nth-child(3) { animation-delay: .75s; }
.tui-spin .slash:nth-child(4) { animation-delay: 1s; }
.tui-spin .slash:nth-child(5) { animation-delay: 1.25s; }
.tui-spin .slash:nth-child(6) { animation-delay: 1.5s; }
.tui-spin .slash:nth-child(7) { animation-delay: 1.75s; }
.tui-spin .slash:nth-child(8) { animation-delay: 2s; }
@keyframes ps-loading { 0% { visibility: visible; } 12.5%, 100% { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .tui-spin .slash { animation: none; } .tui-spin .slash:first-child { visibility: visible; } }

/* Zuganzeige: Fenster wird PowerShell-blau, Anzeige sitzt darin */
.tui.is-board .tui-board { background: mediumblue; }
.tui.is-board .tui-board-hint { color: rgba(255,255,255,.75); }
.tui.is-board .tui-board-hint kbd { background: rgba(255,255,255,.18); color: #fff; }

/* Zentrierung ohne translate – Animationen (GSAP) können sie so nicht verschieben */
.tui { left: 0; right: 0; top: 0; bottom: 0; margin: auto; translate: none; }
.cmdk { left: 0; right: 0; margin-inline: auto; translate: none; }

/* Zuganzeige unter der weissen Titelleiste, damit das PowerShell-Fenster erkennbar bleibt */
.tui-board { top: 30px; }

/* ═════════════════════════════════════════════════════════════════════════════
   ÖV Schritt 1: ein einziges PowerShell-Fenster (uiverse.io / mihocsaszilard, MIT)
   ═════════════════════════════════════════════════════════════════════════════ */
.ps-window {
  display: flex; flex-direction: column;
  background-color: #000; color: #fff;
  border: 1px solid #000; border-radius: 4px 4px 0 0;
  box-shadow: 0 18px 44px rgba(0,0,0,.28);
  overflow: hidden;
  scroll-margin-top: 72px;
}
.ps-titlebar {
  display: flex; justify-content: space-between; align-items: center;
  background-color: #fff; color: #000;
  font-family: "Gill Sans MT", "Gill Sans", "Segoe UI", "Ubuntu", sans-serif;
}
.ps-title { display: flex; gap: 6px; align-items: center; padding: 0 8px; margin-top: 4px; height: 26px; }
.ps-title h2 { margin: 0; font: inherit; font-size: 15px; font-weight: 400; color: #000; }
.ps-controls { display: flex; gap: 16px; margin: 0 8px; user-select: none; }
.ps-body {
  padding: 10px 12px 16px;
  font-family: "Ubuntu Mono", Consolas, ui-monospace, monospace; font-size: 15px; line-height: 1.5;
}
.ps-body p { margin: 0; white-space: pre-wrap; }
.ps-dim { color: #9a9a9a; }
.ps-out { color: #ddd; }
.ps-prompt { display: flex; align-items: center; gap: 0 .6ch; flex-wrap: wrap; cursor: text; }
.ps-cmd { color: #ff4d4d; }
.ps-input {
  flex: 1; min-width: 12ch; border: 0; outline: 0; padding: 0; background: transparent;
  font: inherit; color: #fff; caret-color: #fff;
}
.ps-input::placeholder { color: #555; }
/* Blinkender Block-Cursor, solange das Feld leer und nicht aktiv ist */
.ps-caret { display: none; width: .6em; height: 1.1em; background: #fff; animation: term-blink 1.1s steps(1) infinite; }
.ps-prompt:has(.ps-input:placeholder-shown:not(:focus)) .ps-caret { display: inline-block; }
.ps-prompt:has(.ps-input:placeholder-shown:not(:focus)) .ps-input::placeholder { color: transparent; }
@media (prefers-reduced-motion: reduce) { .ps-caret { animation: none; } }

/* ── Zuganzeige: stabil, auch wenn keine weiteren Halte bekannt sind ───────── */
.sbbd-right { min-height: 104px; padding-right: 84px; }
.sbbd-stops { padding-right: 0; }
.sbbd-stops li.is-end { padding-left: 0; font-weight: 400; opacity: .85; }
.sbbd-stops li.is-end::before, .sbbd-stops li.is-end::after { display: none; }
@media (max-width: 767px) {
  .sbbd-plat { top: 12px; right: 12px; }
}
.tui-ends { color: var(--tui-dim); font-weight: 400; }

/* Skeleton in Zug-Karten, solange die Route einer Ankunft lädt */
.tui-skel-bar { display: inline-block; height: 10px; border-radius: 2px; background: linear-gradient(90deg, #1a1a1d, #2c2c31, #1a1a1d); background-size: 200% 100%; animation: tui-shimmer 1.2s linear infinite; }
.tui-skel-track { width: 100%; height: 4px; }
@media (prefers-reduced-motion: reduce) { .tui-skel-bar { animation: none; } }

/* Gleisbox: wächst mit langen Gleisangaben (z. B. 41/42) statt überzulaufen */
.sbbd-plat { width: auto; min-width: 54px; padding: 0 6px; white-space: nowrap; }
.sbbd-plat b { max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
.sbbd-plat[data-len="3"] b, .sbbd-plat[data-len="4"] b { font-size: 23px; }
.sbbd-plat[data-len="5"] b, .sbbd-plat[data-len="6"] b { font-size: 20px; }
.sbbd-plat[data-len="long"] b { font-size: 13px; }

/* ── Sektoren & Wagenreihung unter der Zuganzeige (wie am Perron) ─────────── */
.sbbd-sectors {
  grid-column: 1 / -1;
  border-top: 6px solid #13277a;
  padding: 10px 22px 0;
}
.sbbd-sectors[hidden] { display: none; }
.sbbd-sec-letters { position: relative; height: 30px; }
.sbbd-sec-letters span {
  position: absolute; top: 0; bottom: 0;
  display: grid; place-items: center;
  font-size: 22px; font-weight: 700;
  border-left: 2px solid rgba(255,255,255,.9);
}
.sbbd-sec-letters span:last-child { border-right: 2px solid rgba(255,255,255,.9); }
/* weisser Streifen mit dem Zug – gleiche Breite wie die Sektorzeile, Hintergrund per Schatten bis zum Rand */
.sbbd-train {
  position: relative; height: 34px;
  background: #f4f5f7;
  box-shadow: -22px 0 0 #f4f5f7, 22px 0 0 #f4f5f7;
}
.sbbd-car {
  position: absolute; top: 6px; height: 22px;
  display: grid; place-items: center;
  border: 2px solid var(--sbbd-blue); border-right-width: 0;
  background: #fff; color: var(--sbbd-blue);
  font-size: 13px; font-weight: 700; line-height: 1;
}
.sbbd-car.is-head-r { border-right-width: 2px; border-radius: 0 9px 9px 0; }
.sbbd-car.is-head-l { border-radius: 9px 0 0 9px; }
.sbbd-car.is-first { background: #ffd54a; }
.sbbd-car.is-wr svg { width: 14px; height: 14px; }
.sbbd-dir {
  position: absolute; top: 6px; margin-left: 4px;
  color: var(--sbbd-blue); font-size: 20px; font-weight: 700; line-height: 22px;
}
.sbbd-dir.is-left { margin-left: 0; transform: translateX(calc(-100% - 4px)); }
.sbbd-sec-note {
  margin: 0 -22px; padding: 6px 22px 8px;
  background: #f4f5f7; color: var(--sbbd-blue);
  font-size: 12px; font-weight: 700;
  border-top: 1px solid rgba(31,62,168,.15);
}
.sbbd-sec-note em { font-style: normal; font-weight: 400; opacity: .65; margin-left: 4px; }
@media (max-width: 767px) {
  .sbbd-sec-letters span { font-size: 16px; }
  .sbbd-car { font-size: 10px; }
}
/* Handy: Spalte darf schmaler als der längste Haltestellenname werden (sonst läuft die Anzeige rechts raus) */
@media (max-width: 767px) { .sbb-display { grid-template-columns: minmax(0, 1fr); } }

/* ═════════════════════════════════════════════════════════════════════════════
   Kartenebenen wie bei Google Maps: Vorschau-Knopf + Panel mit Kacheln
   ═════════════════════════════════════════════════════════════════════════════ */
.map-layers { position: absolute; top: 20px; right: 56px; z-index: 30; }
.map-layers-btn {
  position: relative; display: block; width: 64px; height: 64px; padding: 0;
  border: 2px solid #fff; border-radius: 12px; overflow: hidden; cursor: pointer;
  background: #e4e4e7; box-shadow: 0 4px 14px rgba(0,0,0,.35);
  transition: transform 160ms var(--ease-out);
}
.map-layers-btn:hover { transform: scale(1.04); }
.map-layers-btn:active { transform: scale(.97); }
.map-layers-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.map-layers-btn > .ml-img { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; }
.map-layers-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 14px 0 4px; font-size: 11px; font-weight: 500; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
}
.map-layers-label .ic { width: 11px; height: 11px; }
.content-card.is-loading-3d .map-layers-btn { cursor: progress; }
.content-card.is-loading-3d .map-layers-label .ic { animation: spin 900ms linear infinite; }

/* Vorschaubild (Kachel + evtl. Beschriftung/Overlay übereinander) */
.ml-img { position: relative; display: block; overflow: hidden; border-radius: 10px; background: #e4e4e7; aspect-ratio: 1; }
.ml-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ml-img.is-tilted { background: linear-gradient(#8fb8ea, #e3f0ff 45%); }
.ml-img.is-tilted img { transform: perspective(110px) rotateX(42deg) scale(1.55); transform-origin: 50% 85%; }
.ml-dot {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: #7c6fd6; border: 2px solid #fff; transform: translate(-50%, -50%);
}

/* Panel */
.map-layers-panel {
  position: absolute; top: calc(100% + 8px); right: -44px;
  width: min(320px, calc(100vw - 48px)); max-height: 440px; overflow: auto; overscroll-behavior: contain;
  padding: 14px; border-radius: 16px; color: #fff;
  background: rgba(24,24,30,.94);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 20px 50px rgba(0,0,0,.45);
  transform-origin: top right;
}
.map-layers-panel[hidden] { display: none; }
.ml-head { display: flex; align-items: center; justify-content: space-between; }
.ml-title { margin: 0; font-size: 15px; font-weight: 700; }
.ml-close {
  display: grid; place-items: center; width: 28px; height: 28px;
  border: 0; border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
}
.ml-close:hover { background: rgba(255,255,255,.16); }
.ml-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ml-close .ic { width: 11px; height: 11px; }
.ml-h { margin: 14px 0 8px; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.ml-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; }
.ml-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ml-grid-2 .ml-img { aspect-ratio: 2 / 1; }
.ml-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0;
  padding: 0; border: 0; background: none; cursor: pointer;
  color: rgba(255,255,255,.8); font: inherit; font-size: 11px; line-height: 1.2; text-align: center;
}
.ml-item .ml-img { width: 100%; box-shadow: 0 0 0 1px rgba(255,255,255,.12); transition: box-shadow 150ms, transform 160ms var(--ease-out); }
.ml-item:hover .ml-img { transform: scale(1.04); }
.ml-item:active .ml-img { transform: scale(.97); }
.ml-item[aria-pressed="true"] { color: #fff; font-weight: 500; }
.ml-item[aria-pressed="true"] .ml-img { box-shadow: 0 0 0 2px rgba(24,24,30,.9), 0 0 0 4px var(--primary); }
.ml-item:focus-visible { outline: none; }
.ml-item:focus-visible .ml-img { box-shadow: 0 0 0 2px rgba(24,24,30,.9), 0 0 0 4px #fff; }
.ml-name { display: block; width: 100%; hyphens: auto; -webkit-hyphens: auto; }
/* Details: Häkchen wie bei Google */
#map-details .ml-item[aria-pressed="true"] .ml-img::after {
  content: "✓"; position: absolute; top: 4px; right: 4px;
  display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  background: var(--primary); color: var(--primary-foreground); font-size: 10px; font-weight: 700;
}
@media (prefers-reduced-motion: reduce) {
  .map-layers-btn, .ml-item .ml-img { transition: none; }
  .map-layers-btn:hover, .ml-item:hover .ml-img { transform: none; }
}

/* 3D-Karte liegt über Leaflet und wird nur im 3D-Modus sichtbar */
.map-3d { visibility: hidden; }
#map-3d { position: absolute; inset: 0; } /* maplibre-gl.css setzt sonst position: relative → Höhe 0 */
.content-card.is-3d .map-3d { visibility: visible; }
.content-card.is-3d #map-container { visibility: hidden; }
.content-card .maplibregl-ctrl-top-right { top: 8px; }
.content-card .maplibregl-ctrl-attrib { font-size: 10px; }
.gl-dot {
  display: block; width: 14px; height: 14px; border-radius: 50%;
  background: #7c6fd6; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
