/* Eiszeit – Design-Tokens und Bausteine (siehe Claude Design: „Grundlagen“)
   Raster: 4/8 px · Schrift: Inter, 5 Stufen · eine Akzentfarbe · flache Flächen · Linien-Icons 24 px / 1,75 */

@font-face {
  font-family: "Inter";
  src: url("/vendor/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Immer dunkel, Farben wie iOS (siehe DESIGN-NOTIZEN.md und Board „Guidelines“) */
  --bg: #000000;
  --surface: #1C1C1E;
  --surface-2: #2C2C2E;
  --line: #38383A;
  --line-soft: #38383A;
  --control-line: #48484A;
  --fill: #2C2C2E;
  --text: #FFFFFF;
  --text-2: #98989F;
  --text-3: #636366;
  --accent: #0A84FF;
  --accent-hover: #409CFF;
  --accent-soft: rgba(10, 132, 255, 0.18);
  --accent-soft-strong: rgba(10, 132, 255, 0.32);
  --on-accent: #FFFFFF;
  --success: #30D158;
  --success-soft: rgba(48, 209, 88, 0.16);
  --success-text: #30D158;
  --danger: #FF453A;
  --danger-soft: rgba(255, 69, 58, 0.16);
  --danger-text: #FF6961;
  --climb: #FF9F0A;
  --favorite: #FFD60A;
  --scrim: rgba(0, 0, 0, 0.6);
  --camera: #000000;
  --glass: rgba(48, 48, 52, 0.55);
  --glass-line: rgba(255, 255, 255, 0.18);
  --tabbar: 62px;
  --tabbar-bottom: max(14px, calc(env(safe-area-inset-bottom) - 6px));
  color-scheme: dark;
}

/* ---------- Basis ---------- */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/22px -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11" 1;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  /* Wie eine native App: kein Doppeltipp-Zoom, keine Textmarkierung und kein Menü bei
     langem Drücken. Der Gummiband-Effekt beim Scrollen bleibt bewusst an (iOS-typisch). */
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
/* In Eingabefeldern und beim Einladungslink bleibt Markieren möglich. */
/* iOS zoomt in jedes Feld mit weniger als 16 px Schrift – deshalb für alle Felder fest 16 px. */
input, select, textarea { font-size: 16px !important; }
input, select, textarea, .mono { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img, svg { -webkit-user-drag: none; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.icon { display: block; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Schriftstufen */
.t-display { font-size: 34px; line-height: 40px; font-weight: 700; letter-spacing: -0.02em; }
.t-title { font-size: 22px; line-height: 28px; font-weight: 600; }
.t-headline { font-size: 17px; line-height: 22px; font-weight: 600; }
.t-body { font-size: 15px; line-height: 20px; }
.t-caption { font-size: 13px; line-height: 16px; font-weight: 500; }
.muted { color: var(--text-2); }
/* Gleich breite Ziffern nur dort, wo Zahlen untereinander stehen oder sich ändern
   (bei Inter würde tnum sonst auch Bindestriche verbreitern). */
.summary-num, .amount, .table td, .card-count b, .t-title { font-variant-numeric: tabular-nums; }
.center { text-align: center; }

/* ---------- Seitenaufbau ---------- */

#view { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 24px); }
.page {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 24px) 16px 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head > div { display: flex; flex-direction: column; gap: 4px; }
.section { display: flex; flex-direction: column; gap: 8px; }
.section-title { margin: 0 4px; font-size: 13px; line-height: 16px; font-weight: 600; color: var(--text-2); }

/* Navigationsleiste mit Zurück */
.navbar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  margin: -8px -8px -8px;
}
.navbar h1 { font-size: 17px; line-height: 22px; font-weight: 600; text-align: center; }
.nav-btn {
  display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 8px;
  border: 0; background: none; color: var(--accent); font-size: 17px; line-height: 22px; font-weight: 500;
}
.navbar > :first-child { justify-self: start; }
.navbar > :last-child { justify-self: end; }

/* ---------- Flächen ---------- */

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; }
.summary-num { font-size: 40px; line-height: 44px; font-weight: 700; letter-spacing: -0.02em; }
.summary > div { display: flex; flex-direction: column; gap: 4px; }
.summary > div:last-child { align-items: flex-end; text-align: right; }

.list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.list > li + li { border-top: 1px solid var(--line-soft); }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px;
  padding: 10px 16px; background: none; border: 0; text-align: left; color: inherit;
}
.panel.row { background: var(--surface); } /* .row setzt sonst den Hintergrund zurück */
button.row:active, a.row:active { background: var(--fill); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-size: 15px; line-height: 20px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.row-sub { font-size: 13px; line-height: 16px; color: var(--text-2); }
.row .chev { color: var(--text-3); }
.row-link { min-height: 52px; color: var(--text); }
.row-link .row-title { gap: 12px; }
.row-link .icon { color: var(--text-2); }
.avatar {
  width: 32px; height: 32px; border-radius: 16px; flex-shrink: 0;
  background: var(--fill); color: var(--text-2);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
}
.avatar-dashed { background: none; border: 1.5px dashed var(--control-line); color: var(--text-3); }
.amount { font-size: 17px; line-height: 22px; font-weight: 600; white-space: nowrap; }

.facts { display: grid; grid-template-columns: auto 1fr; margin: 0; overflow: hidden; }
.facts dt, .facts dd { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.facts dt { color: var(--text-2); }
.facts dd { text-align: right; font-weight: 500; }
.facts dt:first-of-type, .facts dd:first-of-type { border-top: 0; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { font-size: 13px; line-height: 16px; font-weight: 500; color: var(--text-2); text-align: right; padding: 12px 8px; }
.table td { padding: 12px 8px; text-align: right; white-space: nowrap; }
.table th:first-child, .table td:first-child { text-align: left; padding-left: 16px; font-weight: 500; }
.table th:last-child, .table td:last-child { padding-right: 16px; }
.table tbody tr { border-top: 1px solid var(--line-soft); }

/* ---------- Karten ---------- */

.card {
  --card: #2E6DB4;
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  aspect-ratio: 1.586; max-height: 240px; width: 100%;
  padding: 16px 20px 20px; border-radius: 20px;
  background: var(--card); color: #FFFFFF;
}
.c-eis { --card: #2E6DB4; }
.c-tanne { --card: #2F6B4F; }
.c-nacht { --card: #1E2A44; }
.c-beere { --card: #9C2F55; }
.c-gold { --card: #94600F; }
.c-schiefer { --card: #4E5866; }
@media (prefers-color-scheme: dark) { .c-nacht { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); } }
.card.used-up { --card: #6B7380; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card-name strong { font-size: 17px; line-height: 22px; font-weight: 600; }
.card-name span { font-size: 13px; line-height: 16px; opacity: 0.8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-tags { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pill { font-size: 12px; line-height: 16px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.45); }
.card-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.card-count { display: flex; flex-direction: column; gap: 4px; }
.card-count > div { display: flex; align-items: baseline; gap: 6px; }
.card-count b { font-size: 44px; line-height: 44px; font-weight: 700; letter-spacing: -0.03em; }
.card-count small { font-size: 15px; line-height: 20px; opacity: 0.85; }
.card-count > span { font-size: 13px; line-height: 16px; opacity: 0.8; }

.dots { display: flex; gap: 6px; }
.dots span { width: 10px; height: 10px; border-radius: 5px; background: currentColor; }
.dots span.used { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; opacity: 0.6; }
.card .dots { padding-bottom: 4px; }

/* Stapel wie in einer Wallet: von jeder Karte ist der Kopf sichtbar, die letzte ganz */
.stack { display: flex; flex-direction: column; }
.stack > .card + .card { margin-top: -156px; box-shadow: 0 -1px 0 rgba(16, 24, 40, 0.06), 0 -8px 16px -12px rgba(16, 24, 40, 0.35); }
.stack > .card { transition: transform 0.15s ease; }
.stack > .card:active { transform: scale(0.99); }

/* ---------- Kartenansicht ---------- */

.qr-panel {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 20px 20px 16px; border-radius: 20px; border: 1px solid var(--line);
  background: #FFFFFF; color: #5B6676; width: 100%;
}
.qr-panel .t-caption { display: flex; align-items: center; gap: 6px; }
.qr { width: 200px; aspect-ratio: 1; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-full {
  position: fixed; inset: 0; z-index: 100; background: #FFFFFF; color: #101828;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}
.qr-full .qr { width: min(88vw, 64vh, 480px); }
.qr-full p { color: #5B6676; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 4px; }
.status-row > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.status-row .dots { color: var(--card); }
.season-meter { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.season-meter span { display: block; height: 100%; background: var(--accent); }
.season-meter.good span { background: var(--success); }

/* ---------- Kletterkarten ---------- */

/* Farben wie die echten Karten: Urban Apes weiß, Südbloc hellgrün – deshalb dunkle Schrift */
.card.climb { color: #101828; max-height: 200px; }
.card.climb .pill { border-color: rgba(16, 24, 40, 0.3); }
.g-urban_apes { --card: #FFFFFF; box-shadow: inset 0 0 0 1px var(--line); }
.g-suedbloc { --card: #C3DC4A; }
.g-andere { --card: #4E5866; color: #FFFFFF !important; }
.g-andere .pill { border-color: rgba(255, 255, 255, 0.45) !important; }
@media (prefers-color-scheme: dark) { .g-urban_apes { --card: #E9EDF2; box-shadow: none; } }
.climb-code { font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 22px !important; line-height: 28px !important; font-weight: 600; opacity: 1 !important; letter-spacing: 0.02em; }
.climb-list { display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }

.barcode { width: 100%; max-width: 360px; background: #FFFFFF; }
.barcode svg { display: block; width: 100%; height: auto; }
.barcode-large { max-width: 640px; }
.barcode-error { color: #A11F31; text-align: center; padding: 24px 8px; }
.barcode-preview { display: flex; justify-content: center; min-height: 72px; align-items: center; padding: 8px; border-radius: 12px; background: #FFFFFF; border: 1px solid var(--line); }
.barcode-full .barcode { width: 100%; }
.bright-hint { color: #8A94A3 !important; font-weight: 400; text-align: center; }
.photo-full { width: 100%; border-radius: 12px; display: block; }
.grid-code { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }

/* Hallen-Logos (weiß geliefert; auf der weißen Urban-Apes-Karte schwarz eingefärbt) */
.gym-logo { height: 40px; width: auto; max-width: 96px; object-fit: contain; display: block; }
.logo-urban_apes { filter: brightness(0); height: 44px; }
.logo-suedbloc { height: 52px; margin-bottom: -4px; }

/* Nächster Termin oben im Wallet */
.next-event { gap: 12px; min-height: 60px; }
.next-event .cal-bar { margin: 2px 0; }
.next-action { display: flex; align-items: center; gap: 2px; color: var(--accent); font-size: 15px; font-weight: 500; }

/* Einheitlicher leerer Zustand */
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 16px; text-align: center; }
.add-icon .icon, .row-link .add-icon .icon { color: var(--accent); }
.add-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.empty-icon { width: 44px; height: 44px; border-radius: 22px; background: var(--fill); color: var(--text-2); display: flex; align-items: center; justify-content: center; }

/* Schalter wie in iOS */
.switch {
  position: relative; width: 51px; height: 31px; flex-shrink: 0; padding: 0; border: 0; border-radius: 16px;
  background: var(--control-line); transition: background-color 0.2s ease;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px;
  background: #FFFFFF; box-shadow: 0 2px 4px rgba(16, 24, 40, 0.25); transition: transform 0.2s ease;
}
.switch[aria-checked="true"] { background: var(--success); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.switch:disabled { opacity: 0.5; cursor: default; }

/* Handy gekippt: Code so groß wie möglich */
@media (orientation: landscape) and (max-height: 520px) {
  .qr-full { gap: 8px; padding: 8px env(safe-area-inset-right) 8px env(safe-area-inset-left); }
  .qr-full h2, .qr-full .bright-hint { display: none; }
  .qr-full .qr { width: min(78vh, 60vw); }
  .barcode-full .barcode, .barcode-large { max-width: none; width: 94vw; }
  .barcode-full .barcode svg { max-height: 78vh; }
}

/* ---------- Kalender ---------- */

.cal { padding: 8px 8px 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 0 0 4px; }
.cal-head h2 { text-transform: capitalize; }
.cal-nav { width: 44px; height: 44px; border: 0; background: none; color: var(--accent); display: flex; align-items: center; justify-content: center; border-radius: 12px; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-week span { text-align: center; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text-3); padding: 4px 0 6px; }
.cal-day {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px;
  height: 48px; padding: 4px 0 0; border: 0; background: none; color: var(--text);
}
.cal-num {
  width: 32px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 20px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.cal-day.outside { color: var(--text-3); }
.cal-day.today .cal-num { color: var(--accent); font-weight: 700; }
.cal-day.selected .cal-num { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.cal-dots { display: flex; gap: 3px; height: 5px; }
.cal-dots i { width: 5px; height: 5px; border-radius: 3px; }
.k-klettern { background: #4E8A1E; }
.k-eis { background: #2E6DB4; }
@media (prefers-color-scheme: dark) { .k-klettern { background: #8CC35A; } .k-eis { background: #6EA4FF; } }
.cal-row { gap: 12px; }
.cal-time { display: flex; flex-direction: column; width: 48px; flex-shrink: 0; }
.cal-time b { font-size: 15px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-time small { font-size: 12px; line-height: 16px; color: var(--text-2); }
.cal-bar { width: 4px; align-self: stretch; border-radius: 2px; margin: 4px 0; flex-shrink: 0; }
.cal-row.cancelled .row-title, .cal-row.cancelled .cal-time b { text-decoration: line-through; color: var(--text-3); }
.cal-row .row-title .muted { color: var(--text-3); }
.select-wrap.compact .select { width: auto; min-width: 150px; height: 40px; }
.select-wrap.compact .icon { top: 11px; }

/* ---------- Gesten (GESTEN.md) ---------- */

/* Drück-Gefühl: alles Antippbare gibt kurz nach und federt zurück – überall dieselben Werte */
.card, .btn, .chip, .circle-btn, .qr-panel, .swatch, .add-btn, .cal-nav, .cal-day .cal-num, .switch {
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}
.card:active, .qr-panel:active { transform: scale(0.98); filter: brightness(0.96); }
.btn:active:not(:disabled), .chip:active, .circle-btn:active, .swatch:active, .add-btn:active, .cal-nav:active, .switch:active:not(:disabled) { transform: scale(0.96); }
.btn-primary:active:not(:disabled) { filter: brightness(0.92); }
.cal-day:active .cal-num { transform: scale(0.88); }
.stack > .card:active { transform: scale(0.98); }

/* Wischen zum Löschen: Aktion liegt unter der Zeile */
.swipe-row { position: relative; overflow: hidden; }
.swipe-row > .row { position: relative; z-index: 1; background: var(--surface); touch-action: pan-y; }
.swipe-under { position: absolute; inset: 0; display: flex; justify-content: flex-end; background: var(--danger); }
.swipe-action {
  height: 100%; width: 96px; border: 0; padding: 0 20px; color: #FFFFFF; background: var(--danger);
  font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: flex-end;
}
.swipe-action span { min-width: 56px; text-align: center; transition: transform 0.2s ease; }
.swipe-row.full .swipe-action span { transform: scale(1.08); }

/* Ziehen zum Aktualisieren */
#ptr {
  position: fixed; top: calc(env(safe-area-inset-top) + 8px); left: 50%; z-index: 45;
  width: 40px; height: 40px; border-radius: 20px; display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--text-3); border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.12); opacity: 0; pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
}
#ptr.ready { color: var(--accent); }
#ptr.spin { color: var(--accent); opacity: 1; }
#ptr.spin .icon { animation: ptr-spin 0.9s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* Monat wischen */
.cal { touch-action: pan-y; }
.cal-grid.slide-next { animation: cal-next 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cal-grid.slide-prev { animation: cal-prev 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes cal-next { from { transform: translateX(24%); opacity: 0; } }
@keyframes cal-prev { from { transform: translateX(-24%); opacity: 0; } }
.cal { overflow: hidden; }

/* Fenster: Griff deutlich anfassbar */
.sheet-grab { margin-bottom: -4px; }
.sheet-head { touch-action: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border-radius: 14px; border: 0;
  font-size: 17px; line-height: 22px; font-weight: 600; text-align: center;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
@media (hover: hover) { .btn-primary:hover:not(:disabled) { background: var(--accent-hover); } } /* nur mit Maus, sonst braucht iOS zwei Tipps */
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line); font-size: 15px; font-weight: 500; padding: 0 12px; white-space: nowrap; }
.btn-secondary .icon { color: var(--text-2); }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-danger { background: var(--danger); color: #FFFFFF; }
.btn-plain-danger { background: none; color: var(--danger); font-size: 15px; font-weight: 500; }
.btn-small { min-height: 36px; padding: 0 12px; border-radius: 10px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.text-btn { border: 0; background: none; padding: 0; min-height: 44px; color: var(--accent); font-size: 15px; font-weight: 500; }

.circle-btn {
  width: 44px; height: 44px; border-radius: 22px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--accent);
}
.close-btn {
  width: 44px; height: 44px; margin: -6px -8px 0 0; border: 0; background: none; color: var(--text-2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.close-btn span { width: 32px; height: 32px; border-radius: 16px; background: var(--fill); display: flex; align-items: center; justify-content: center; }

/* ---------- Formulare ---------- */

.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label { font-size: 13px; line-height: 16px; font-weight: 600; color: var(--text-2); }
.field-label em { font-style: normal; font-weight: 400; }
.field-hint { font-size: 13px; line-height: 16px; color: var(--text-2); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.input, .select {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--control-line); background: var(--surface); color: var(--text);
  font-size: 16px; /* unter 16 px zoomt iOS beim Antippen ins Feld */ appearance: none; -webkit-appearance: none;
}
.input::placeholder { color: var(--text-3); }
.input:focus, .select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.select-wrap { position: relative; }
.select-wrap .select { padding-right: 36px; }
.select-wrap .icon { position: absolute; right: 12px; top: 13px; pointer-events: none; color: var(--text-2); }
.inline-add { display: flex; gap: 8px; }
.inline-add .input { flex: 1; min-width: 0; background: var(--bg); }
.add-btn {
  width: 44px; height: 44px; border-radius: 12px; border: 0; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center;
}

.segmented { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; padding: 3px; gap: 3px; border-radius: 12px; background: var(--fill); }
.segmented button {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; border: 0; border-radius: 9px; background: none;
  font-size: 14px; font-weight: 500; color: var(--text-2);
}
.segmented button[aria-checked="true"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12); }
.segmented button:disabled { opacity: 0.4; cursor: default; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border-radius: 22px; border: 1px solid var(--control-line); background: var(--surface);
  font-size: 15px; font-weight: 500; color: var(--text);
}
.chip[aria-pressed="true"] { padding-left: 12px; background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.swatches { display: flex; gap: 12px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 20px; border: 0; background: var(--card); }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }

.code-box { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.code-box .icon { color: var(--text-2); }
.code-box div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mono { font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 14px; line-height: 18px; word-break: break-all; }

.time-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; border-radius: 12px; background: var(--bg); }
.time-row .icon { color: var(--text-2); }
.time-row input {
  flex: 1; min-width: 0; height: 44px; border: 0; background: none; color: var(--text); font-size: 16px;
}

/* ---------- Hinweise ---------- */

.notice { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; }
.notice-icon { width: 32px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #FFFFFF; }
.notice > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notice strong { font-size: 15px; line-height: 20px; font-weight: 600; }
.notice span { font-size: 13px; line-height: 16px; }
.notice a, .notice button { font-weight: 600; min-height: 44px; display: flex; align-items: center; border: 0; background: none; padding: 0; }
.notice-success { background: var(--success-soft); color: var(--success-text); }
.notice-success .notice-icon { background: var(--success); }
.notice-success a, .notice-success button { color: var(--success-text); }
.notice-danger { background: var(--danger-soft); color: var(--danger-text); }
.notice-danger .notice-icon { background: var(--danger); }
.notice-danger a, .notice-danger button { color: var(--danger-text); }
.notice-info { background: var(--accent-soft); color: var(--accent); }
.notice-info .notice-icon { background: var(--accent); color: var(--on-accent); }
.done-icon { width: 28px; height: 28px; border-radius: 14px; background: var(--success-soft); color: var(--success); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ---------- Scanner ---------- */

.scan-box { position: relative; width: 100%; aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: var(--camera); }
.scan-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 18%; color: #FFFFFF; }
.scan-frame svg { width: 100%; height: 100%; display: block; }
.scan-off .scan-frame { opacity: 0.35; }
.scan-status {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  background: rgba(0, 0, 0, 0.55); color: #FFFFFF; font-size: 13px; line-height: 16px; font-weight: 500;
}
.scan-status i { width: 8px; height: 8px; border-radius: 4px; background: #4ADE80; }
.scan-off .scan-status { white-space: normal; text-align: center; width: calc(100% - 32px); justify-content: center; border-radius: 12px; }
.scan-off .scan-status i { display: none; }

/* ---------- Sheet ---------- */

#sheet-root .backdrop { position: fixed; inset: 0; z-index: 50; background: var(--scrim); opacity: 0; transition: opacity 0.2s ease; }
#sheet-root .sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
  max-width: 480px; margin: 0 auto;
  /* nie unter die Statusleiste; dvh passt sich an Safari-Leiste und Tastatur an */
  max-height: 90vh;
  max-height: calc(100dvh - env(safe-area-inset-top) - 16px);
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y;
  background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 8px 16px calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 16px;
  transform: translateY(100%); transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* Inhalte nie zusammenquetschen – lieber scrollen */
#sheet-root .sheet > *, .sheet-body > * { flex-shrink: 0; }
#sheet-root .backdrop { touch-action: none; }
body.sheet-open { position: fixed; left: 0; right: 0; overflow: hidden; }
#sheet-root.open .backdrop { opacity: 1; }
#sheet-root.open .sheet { transform: none; }
.sheet-grab { width: 36px; height: 5px; border-radius: 3px; background: var(--control-line); align-self: center; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.sheet-head > div { display: flex; flex-direction: column; gap: 4px; }
.sheet-body { display: flex; flex-direction: column; gap: 16px; }
.sheet-body .card { max-height: 200px; }

/* ---------- Toast ---------- */

#toast-root {
  position: fixed; left: 0; right: 0; z-index: 90; pointer-events: none;
  bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 12px);
  display: flex; justify-content: center; padding: 0 16px;
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 16px; max-width: 448px;
  min-height: 48px; padding: 0 8px 0 16px; border-radius: 14px;
  background: #101828; color: #FFFFFF; font-size: 15px; line-height: 20px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.25); animation: toast-in 0.2s ease;
}
.toast > span { padding: 12px 0; }
.toast-error { background: var(--danger); }
.toast button { border: 0; background: none; min-height: 44px; padding: 0 8px; color: #8DB7FF; font-weight: 600; white-space: nowrap; }
.toast-error button { color: #FFFFFF; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Tab-Leiste ---------- */

#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding: 6px 8px env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
#tabs[hidden] { display: none; }
#tabs a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0;
  color: var(--text-2); font-size: 11px; line-height: 13px; font-weight: 500;
}
#tabs a.on { color: var(--accent); font-weight: 600; }
#tabs a { position: relative; }
#tabs a.has-dot::after {
  content: ""; position: absolute; top: 0; left: calc(50% + 8px);
  width: 9px; height: 9px; border-radius: 5px; background: var(--danger); box-shadow: 0 0 0 2px var(--surface);
}

/* ---------- Anmeldung ---------- */

.auth { min-height: 100dvh; max-width: 400px; padding: 0 24px calc(24px + env(safe-area-inset-bottom)); justify-content: space-between; }
.auth-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; text-align: center; }
.auth-hero > div { display: flex; flex-direction: column; gap: 8px; }
.auth-hero h1 { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.02em; }
.auth-hero p { font-size: 17px; line-height: 24px; color: var(--text-2); }
.auth-actions { display: flex; flex-direction: column; gap: 16px; }

@media (min-width: 600px) { .page { padding-top: 48px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Apple Wallet ---------- */
.wallet-btn {
  align-self: center; display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 6px 18px 6px 12px; border-radius: 12px;
  background: #000; color: #fff; text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  transition: transform 0.12s ease;
}
.wallet-btn:active { transform: scale(0.96); }
.wallet-btn > span:last-child { display: flex; flex-direction: column; line-height: 1.1; }
.wallet-btn small { font-size: 11px; font-weight: 500; opacity: 0.9; }
.wallet-btn strong { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.wallet-glyph { position: relative; width: 30px; height: 24px; border-radius: 5px; background: #D8D8D8; overflow: hidden; }
.wallet-glyph i { position: absolute; left: 2px; right: 2px; height: 9px; border-radius: 3px; }
.wallet-glyph i:nth-child(1) { top: 2px; background: #2F9CF4; }
.wallet-glyph i:nth-child(2) { top: 7px; background: #FDB12A; }
.wallet-glyph i:nth-child(3) { top: 12px; background: #F04F4E; height: 10px; }

/* ---------- Kurzbefehl ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; display: grid; place-items: center; }
.step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.step-body p { margin: 0; line-height: 1.45; }
.copy-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.copy-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.copy-value { font-size: 13px; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }

/* Nur Klettern: drei Tabs (keine Abrechnung) */
#tabs.tabs-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#tabs a[hidden] { display: none; }

/* =====================================================================
   Design 2.0 (iOS, dunkel) – Vorlage: Claude-Design-Canvas „Eiszeit“
   Radien: Karten 20 · Listen/Felder/große Buttons 12 · kleine Knöpfe rund
   ===================================================================== */

/* Seite: Platz für die schwebende Tab-Leiste */
#view { padding-bottom: calc(var(--tabbar) + var(--tabbar-bottom) + 34px); }
.page { padding-top: calc(env(safe-area-inset-top) + 12px); gap: 20px; }
.page-head { align-items: center; }
.t-display { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: 0.01em; }
.t-title { font-size: 22px; line-height: 28px; font-weight: 700; }
.t-body { font-size: 17px; line-height: 22px; }
.head-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.head-actions, .page-head > .head-actions { display: flex; flex-direction: row; gap: 10px; align-items: center; }

/* Symbol-Knopf (36, rund) */
.circle-btn { width: 36px; height: 36px; border-radius: 18px; border: 0; background: var(--surface); color: var(--text); }

/* Listen und Flächen */
.panel { border: 0; border-radius: 12px; }
.list > li + li { border-top: 0.5px solid var(--line); }
.section { gap: 8px; }
.section-title { margin: 0 16px; font-size: 13px; line-height: 18px; font-weight: 400; text-transform: uppercase; color: var(--text-2); }
.row { min-height: 44px; padding: 10px 16px; }
.row-title { font-size: 17px; line-height: 22px; font-weight: 400; }
.row-sub { font-size: 13px; line-height: 18px; }
.row-link { min-height: 44px; }
.facts dt, .facts dd { border-top: 0.5px solid var(--line); padding: 11px 16px; }
.facts dd { font-weight: 400; color: var(--text-2); }
.avatar { width: 30px; height: 30px; border-radius: 15px; background: var(--surface-2); color: var(--text); }
.section-head { padding: 0; }

/* Buttons: groß 50/r12 · klein 36/rund */
.btn { min-height: 50px; border-radius: 12px; font-size: 17px; font-weight: 600; }
.btn-secondary { background: var(--surface); color: var(--accent); border: 0; font-size: 17px; font-weight: 600; padding: 0 16px; }
.btn-secondary .icon { color: var(--accent); }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-small { min-height: 36px; padding: 0 16px; border-radius: 18px; font-size: 15px; }
.btn-plain-danger { background: var(--surface); color: var(--danger); font-size: 17px; font-weight: 400; min-height: 44px; }
.text-btn { font-size: 17px; font-weight: 400; }

/* Felder */
.input, .select { border: 0; background: var(--surface); border-radius: 12px; }
.input:focus, .select:focus { outline: 2px solid var(--accent); }
.field-label { margin: 0 16px; font-size: 13px; font-weight: 400; text-transform: uppercase; }
.segmented { background: var(--surface); border-radius: 12px; }
.segmented button { border-radius: 9px; font-size: 15px; }
.segmented button[aria-checked="true"] { background: #636366; color: #FFFFFF; box-shadow: none; }
.chip { min-height: 36px; border-radius: 18px; border: 0; background: var(--surface-2); padding: 0 14px; }
.chip[aria-pressed="true"] { padding-left: 10px; background: var(--accent); color: #FFFFFF; font-weight: 600; }
.inline-add .input { background: var(--surface-2); }
.add-btn { width: 44px; height: 44px; border-radius: 12px; }
.code-box, .time-row { background: var(--surface-2); }
.copy-row { border: 0; background: var(--surface-2); border-radius: 12px; }
.switch { background: #39393D; }
.switch::after { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); }

/* Sheet: dunkle Fläche, Felder eine Stufe heller */
#sheet-root .sheet { background: var(--surface); border-radius: 12px 12px 0 0; }
.sheet .panel, .sheet .input, .sheet .select, .sheet .segmented, .sheet .btn-secondary, .sheet .btn-plain-danger { background: var(--surface-2); }
.sheet .chip { background: #3A3A3C; }
.sheet .chip[aria-pressed="true"] { background: var(--accent); }
.sheet-grab { background: #48484A; }

/* Hinweise und leere Zustände */
.notice { border-radius: 12px; }
.empty-icon { background: var(--surface); }

/* ---------- Karten 2.0: Logo links, Name rechts, Titel groß ---------- */
.card {
  aspect-ratio: auto; max-height: none; height: 210px;
  padding: 16px 20px 18px; justify-content: flex-start; overflow: hidden;
  background: var(--pattern, none), var(--card);
}
.card.compact { height: 150px; }
.c-eis { --card: #2E6DB4; --pattern: repeating-linear-gradient(60deg, rgba(255,255,255,0.08) 0 1.5px, transparent 1.5px 20px), repeating-linear-gradient(-60deg, rgba(255,255,255,0.08) 0 1.5px, transparent 1.5px 20px); }
.c-tanne { --card: #2F6B4F; --pattern: linear-gradient(135deg, rgba(255,255,255,0.09) 25%, transparent 25%) -14px 0 / 28px 28px, linear-gradient(225deg, rgba(255,255,255,0.09) 25%, transparent 25%) -14px 0 / 28px 28px; }
.c-nacht { --card: #1E2A44; --pattern: radial-gradient(circle, rgba(255,255,255,0.45) 1px, transparent 1.6px) 0 0 / 30px 30px, radial-gradient(circle, rgba(255,255,255,0.25) 1px, transparent 1.6px) 15px 11px / 23px 23px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); }
.c-beere { --card: #9C2F55; --pattern: repeating-radial-gradient(circle at 100% 0%, rgba(255,255,255,0.09) 0 2px, transparent 2px 16px); }
.c-gold { --card: #94600F; --pattern: linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px) 0 0 / 20px 20px, linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px) 0 0 / 20px 20px; }
.c-schiefer { --card: #4E5866; --pattern: repeating-linear-gradient(45deg, rgba(255,255,255,0.06) 0 10px, transparent 10px 20px); }
.card.used-up { filter: grayscale(1) brightness(0.75); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-brand { display: flex; align-items: center; gap: 7px; font-size: 15px; line-height: 24px; font-weight: 700; letter-spacing: -0.01em; }
.card-brand svg { width: 30px; height: 24px; display: block; }
.owner-bubble { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; line-height: 16px; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.25); white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.owner-bubble svg { flex: none; }
.card-title { margin-top: 6px; font-size: 30px; line-height: 34px; font-weight: 800; letter-spacing: -0.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.card-count { flex-direction: row; align-items: baseline; gap: 6px; }
.card .dots { padding-bottom: 6px; color: #FFFFFF; }
.dots span { width: 9px; height: 9px; border-radius: 5px; }
.dots span.used { opacity: 1; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); }
.dots span.pending { background: transparent; box-shadow: none; border: 1.5px dashed rgba(255, 255, 255, 0.9); }
/* Fahrt eingetragen: der Punkt leert sich, ein Ring blendet aus */
.dots span.just-used { position: relative; animation: dot-empty 0.25s ease forwards; animation-delay: var(--delay, 0s); background: #FFFFFF; }
.dots span.just-used::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6); opacity: 0; animation: dot-ring 0.6s ease-out; animation-delay: var(--delay, 0s); }
@keyframes dot-empty { to { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); } }
@keyframes dot-ring { 0% { opacity: 0.9; transform: scale(0.4); } 100% { opacity: 0; transform: scale(1.2); } }
.card-count b.rolled { display: inline-block; animation: num-roll 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes num-roll { from { transform: translateY(-60%); opacity: 0; } }

/* Kletterkarten: Hallenlogo links, Nummer unten */
.card.climb { color: #1C1C1E; height: 210px; max-height: none; }
.card.climb.compact { height: 150px; }
.card.climb .owner-bubble { background: rgba(28, 28, 30, 0.08); }
.g-urban_apes { --card: #E9EDF2; --pattern: repeating-radial-gradient(circle at 92% 118%, rgba(28,28,30,0.07) 0 1.5px, transparent 1.5px 9px); box-shadow: none; }
.g-suedbloc { --card: #C3DC4A; --pattern: radial-gradient(circle, rgba(28,28,30,0.1) 3px, transparent 3.5px) 0 0 / 30px 30px; color: #16200A !important; }
.g-suedbloc .owner-bubble { background: rgba(22, 32, 8, 0.12) !important; }
.g-andere .owner-bubble { background: rgba(0, 0, 0, 0.25) !important; }
.card.climb .gym-logo { height: 44px; max-width: 120px; margin: -4px 0 0 -2px; }
.card.climb .logo-suedbloc { height: 48px; margin-bottom: 0; }
.card.climb .climb-code { font-size: 22px !important; line-height: 26px !important; }

/* Mehrere Eiskarten: waagrecht wischen, Punkte darunter */
.carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; scroll-padding: 0 16px; }
.carousel::-webkit-scrollbar { display: none; }
.carousel > .card { flex: 0 0 100%; scroll-snap-align: center; }
.page-dots { display: flex; justify-content: center; gap: 7px; margin-top: -8px; }
.page-dots span { width: 7px; height: 7px; border-radius: 4px; background: #48484A; transition: background-color 0.2s ease; }
.page-dots span.on { background: #FFFFFF; }
.wallet-group { display: flex; flex-direction: column; gap: 12px; }
.wallet-group > h2 { font-size: 22px; line-height: 28px; font-weight: 700; margin-top: 8px; }

/* Offline */
.offline-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 14px; background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 600; white-space: nowrap; }

/* Code-Fläche in der Kartenansicht und im Vollbild */
.qr-panel { border: 0; border-radius: 20px; }
.qr-full { background: var(--card-bg, #000000); }
.qr-full.has-card { background: var(--pattern, none), var(--card); }
.qr-sheet { width: min(100%, 420px); background: #FFFFFF; color: #1C1C1E; border-radius: 20px; padding: 18px 20px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }
.qr-sheet .card-head { width: 100%; align-items: center; }
.qr-sheet .owner-bubble { background: rgba(28, 28, 30, 0.08); }
.qr-sheet .card-brand { color: #1C1C1E; }
.qr-full .qr-sheet .qr { width: min(78vw, 56vh, 380px); }
.qr-full .bright-hint { color: rgba(255, 255, 255, 0.6) !important; }
.qr-full.barcode-full .qr-sheet { width: min(100%, 640px); }

/* Favorit-Zeile */
.icon-tile { width: 29px; height: 29px; border-radius: 7px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #FFFFFF; }

/* ---------- Tab-Leiste: schwebend, Glas ---------- */
#tabs {
  left: 22px; right: 22px; bottom: var(--tabbar-bottom);
  height: var(--tabbar); padding: 4px; border-radius: 31px;
  background: rgba(48, 48, 52, 0.48);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  border: 0.5px solid var(--glass-line); border-top: 0.5px solid var(--glass-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -1px 0 rgba(0, 0, 0, 0.2), 0 14px 34px rgba(0, 0, 0, 0.55);
  max-width: 480px; margin: 0 auto;
}
#tabs.tabs-3 { left: 52px; right: 52px; max-width: 420px; }
#tabs a { justify-content: center; border-radius: 27px; color: rgba(235, 235, 245, 0.78); font-size: 10px; line-height: 12px; font-weight: 600; }
#tabs a.on { color: var(--accent); background: rgba(255, 255, 255, 0.11); }
#tabs a .icon { width: 26px; height: 26px; }
#tabs a .icon-on { display: none; }
#tabs a.on .icon-on { display: block; }
#tabs a.on .icon-off { display: none; }
#tabs a.has-dot::after { top: 6px; box-shadow: 0 0 0 2px #2C2C30; }

/* ---------- Toast: Glas-Pille über der Tab-Leiste ---------- */
#toast-root { bottom: calc(var(--tabbar) + var(--tabbar-bottom) + 14px); padding: 0 22px; }
.toast {
  width: 100%; min-height: 56px; border-radius: 28px; padding: 0 10px 0 18px; gap: 12px;
  background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  border: 0.5px solid var(--glass-line); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55); font-weight: 600;
}
.toast > span { flex: 1; padding: 10px 0; }
.toast button { min-height: 36px; padding: 0 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.12); color: #FFFFFF; font-size: 15px; }
.toast-error { background: rgba(255, 69, 58, 0.85); }

/* ---------- Kalender ---------- */
.k-klettern { background: var(--climb) !important; }
.k-eis { background: var(--accent) !important; }
.cal { padding: 0; background: none; }
.cal-month-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; min-height: 36px; color: var(--accent); font-size: 17px; font-weight: 600; text-transform: capitalize; }
.cal-month-btn .icon { transition: transform 0.25s ease; }
.cal-month-btn[aria-expanded="true"] .icon { transform: rotate(180deg); }
.cal-day.today .cal-num { color: var(--accent); }
.cal-day.selected .cal-num { background: var(--accent); color: #FFFFFF; }
.cal-day.today.selected .cal-num { color: #FFFFFF; }
.cal-grid.week { animation: none; }
.cal-week span { font-size: 11px; color: var(--text-2); }

/* ---------- Anmeldung, Einrichtung ---------- */
.auth-hero p { font-size: 17px; }
.app-icon { width: 80px; height: 80px; border-radius: 18px; background: #1D5FD1; padding: 10px; box-shadow: 0 16px 36px rgba(10, 132, 255, 0.3); }
.app-icon img, .app-icon svg { width: 100%; height: 100%; display: block; }
.setup-steps .row { min-height: 56px; }
.step-num { width: 28px; height: 28px; border-radius: 14px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; flex-shrink: 0; }
.install-arrow { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 8px); color: var(--accent); animation: arrow-bob 1.2s ease-in-out infinite; }
.install-arrow.top { bottom: auto; top: calc(env(safe-area-inset-top) + 4px); right: 14px; left: auto; transform: none; }
@keyframes arrow-bob { 50% { translate: 0 6px; } }

/* Nächster Termin oben im Wallet */
.next-event { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 20px; color: var(--text); min-height: 0; }
.next-when { min-width: 62px; display: flex; flex-direction: column; align-items: center; }
.next-when small { font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: 0.03em; color: var(--success); white-space: nowrap; }
.next-when small.k-text-klettern { color: var(--climb); }
.next-when b { font-size: 22px; line-height: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.next-sep { width: 0.5px; align-self: stretch; background: var(--line); }
.avatar-stack { display: flex; flex-shrink: 0; }
.avatar-stack .avatar { width: 30px; height: 30px; border: 2px solid var(--surface); font-size: 12px; }
.avatar-stack .avatar + .avatar { margin-left: -10px; }
.cal-head { padding: 0 0 8px; }
.cal-head .head-actions { gap: 0; }

/* Öffnungszeiten im Kalender */
.hours-dot { width: 8px; height: 8px; border-radius: 4px; flex-shrink: 0; background: var(--text-3); }
.hours-dot.open { background: var(--success); }
.hours-dot.none { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-3); }
.hours-state { font-size: 15px; color: var(--text-2); white-space: nowrap; }
.hours-state.open { color: var(--success); }
