/* Familienkalender – Poster-Look: Carbon, Chrom-Titel, Blau-Akzent.
   Mobile first; ab 1024 px drei Spalten (Seite · Monat · Chat). */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/Barlow-Regular.woff") format("woff"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("../fonts/Barlow-Medium.woff") format("woff"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../fonts/Barlow-SemiBold.woff") format("woff"); }
@font-face { font-family: "Saira Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/SairaCondensed-SemiBold.woff") format("woff"); }
@font-face { font-family: "Saira Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/SairaCondensed-Bold.woff") format("woff"); }
@font-face { font-family: "Saira Condensed"; font-weight: 800; font-display: swap; src: url("../fonts/SairaCondensed-ExtraBold.woff") format("woff"); }

:root {
  color-scheme: dark;
  --ground: #0b0e11;
  --surface: #141a20;
  --surface-2: #1c242c;
  --input: var(--nav);
  --line: #2a333d;
  --text: #eef2f6;
  --muted: #93a0ad;
  --dim: #6f7c89;
  --accent: #4aa3ff;
  --accent-fill: #1b66b8;
  --view: var(--accent);          /* Akzent der aktuellen Ansicht */
  --view-fill: var(--accent-fill);
  --view-ink: #ffffff;
  --shared: #d5dde5;
  --holiday: #ff7a6e;
  --trip: #7fd1b9;
  --danger: #ff7a6e;
  --ground-2: #18212b;
  --text-2: #c9d3dc;
  --soft: #a9b4bf;
  --line-strong: #3a4652;
  --out: #46505a;
  --bday-ink: #f2d28a;
  --warn: #f0b54a;
  --cell: #161c22;
  --cell-sel: #1f2831;
  --nav: #0f1418;
  --toast: #222b34;
  --shadow: rgba(0,0,0,.5);
  --veil: 11 14 17;      /* dunkler Schleier über Fotos */
  --glass: 20 26 32;     /* halbtransparente Flächen */
  --fg-rgb: 255 255 255; /* feine Linien und Hover */
  --chrome: linear-gradient(180deg, #fff 0%, #d3dae1 42%, #7c8792 56%, #eef2f6 100%);
  --bg-url: none;
  --display: "Saira Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --tabbar-h: 64px;
  --radius: 12px;
}

/* Heller Modus: data-theme="light" setzt theme.js (Automatisch / Hell / Dunkel unter Konto). */
:root[data-theme="light"] {
  color-scheme: light;
  --ground: #eef1f5;
  --ground-2: #dde4ec;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --input: #ffffff;
  --line: #d3dae2;
  --line-strong: #b4bfca;
  --text: #121a22;
  --text-2: #2f3b47;
  --muted: #5a6875;
  --dim: #7b8794;
  --soft: #4f5d6a;
  --out: #b3bcc6;
  --shared: #6b7885;
  --holiday: #d4483b;
  --trip: #1f8f72;
  --danger: #c9372b;
  --bday-ink: #9a6206;
  --warn: #a86400;
  --cell: #ffffff;
  --cell-sel: #e3eaf3;
  --nav: #ffffff;
  --toast: #ffffff;
  --shadow: rgba(20,30,40,.18);
  --veil: 238 241 245;
  --glass: 255 255 255;
  --fg-rgb: 18 26 34;
  --chrome: linear-gradient(180deg, #3b4652 0%, #1a222b 42%, #5b6773 56%, #121a22 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    repeating-linear-gradient(45deg, rgb(var(--fg-rgb) / .018) 0 2px, transparent 2px 6px),
    var(--ground);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
img { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Typo-Bausteine ---------- */
.chrome {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  line-height: .95;
  text-transform: uppercase;
  letter-spacing: .01em;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kicker {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--text-2);
}
.kicker::before { content: ""; width: 20px; height: 2px; background: var(--view); }
.label { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.h-section {
  margin: 0; font-family: var(--display); font-weight: 700; font-size: 18px;
  letter-spacing: .1em; text-transform: uppercase;
}
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }

/* ---------- Buttons & Felder ---------- */
.btn {
  min-height: 40px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 14px; text-decoration: none;
}
.btn:hover { border-color: var(--line-strong); }
.btn.primary { background: var(--view-fill); border-color: transparent; color: var(--view-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); padding: 0 4px; }
.btn.danger { background: transparent; border-color: transparent; color: var(--danger); padding: 0 4px; }
.btn.icon { width: 44px; padding: 0; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.input {
  min-height: 44px; padding: 0 12px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--input); color: var(--text); width: 100%;
}
textarea.input { padding: 10px 12px; resize: vertical; min-height: 70px; }
.input:focus { border-color: var(--accent); outline: none; }
.check { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--view-fill); }

.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
}
.seg button, .seg label {
  min-height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--soft);
  font-weight: 500; font-size: 14px; letter-spacing: .03em;
  display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
}
.seg button[aria-pressed="true"], .seg input:checked + span {
  color: var(--view-ink); font-weight: 600;
}
.seg button[aria-pressed="true"] { background: var(--view-fill); }
.seg label { position: relative; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg label span { position: absolute; inset: 0; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.seg input:checked + span { background: var(--view-fill); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.seg input:disabled + span { opacity: .5; cursor: not-allowed; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 18px;
  border: 1px solid var(--line); color: var(--soft); font-size: 14px; cursor: pointer;
}
.chip input:checked + span { border-color: var(--accent); background: rgba(27,102,184,.25); color: var(--text); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); }

.card { border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.badge {
  position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: #f2a65a; color: #0b0e11;
  font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}

/* ---------- Seitengerüst (Handy) ---------- */
.page-bg { display: none; }
.app { min-height: 100dvh; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }

.hero {
  position: relative; overflow: hidden; min-height: 196px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 16px 34px;
  background:
    linear-gradient(180deg, rgb(var(--veil) / .82) 0%, rgb(var(--veil) / .15) 45%, rgb(var(--veil) / .55) 75%, var(--ground) 100%),
    var(--day-bg-url, var(--bg-url)) center 60% / cover no-repeat,
    linear-gradient(135deg, var(--ground-2), var(--ground));
}
.bars { position: absolute; top: -20px; right: 24px; height: 120px; width: 90px; pointer-events: none; }
.bars::before, .bars::after { content: ""; position: absolute; top: 0; height: 100%; transform: skewX(-32deg); }
.bars::before { right: 30px; width: 30px; background: var(--view-fill); }
.bars::after { right: 0; width: 10px; background: var(--view); }
.brand { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.brand .titles { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.brand .chrome { font-size: clamp(24px, 9vw, 34px); }
.chat-btn {
  position: relative; width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: rgb(var(--veil) / .6); border: 1px solid rgb(var(--fg-rgb) / .14); color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.chat-btn svg { width: 22px; height: 22px; }

.controls { padding: 0 16px; margin-top: -16px; position: relative; display: flex; flex-direction: column; gap: 10px; }
.countdown {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px;
  background: linear-gradient(120deg, rgba(127,209,185,.16), rgba(27,102,184,.16));
  border: 1px solid rgba(127,209,185,.4);
}
.countdown { cursor: pointer; transition: border-color .15s; }
.countdown:hover { border-color: rgba(127,209,185,.75); }
.countdown .big { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: .9; color: var(--trip); font-variant-numeric: tabular-nums; }
.countdown .what { min-width: 0; }
.countdown .what strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.countdown .what span { font-size: 12px; color: var(--muted); }
.countdown .unit { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--trip); }

.desk-only { display: none !important; }
main.main { padding: 14px 16px 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* Monatskopf */
.month-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.month-head .name { min-width: 0; }
.month-head .name { display: flex; align-items: baseline; gap: 10px; }
.month-head h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.month-head .yr { font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--view); font-variant-numeric: tabular-nums; }
.month-head .nav { display: flex; gap: 6px; flex-shrink: 0; }
.month-head .nav .btn { padding: 0 12px; }
.month-head .nav .btn.icon { width: 40px; padding: 0; }

/* Kalender */
.cal { padding: 8px 6px 6px; }
.wd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-bottom: 4px; }
.wd span:nth-child(n+6) { color: var(--dim); }
.grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.day {
  position: relative; min-height: 46px; border: 0; border-radius: 10px; background: transparent; padding: 4px 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0;
}
.day:hover { background: rgb(var(--fg-rgb) / .04); }
.day .n { font-family: var(--display); font-size: 18px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.day.we .n { color: var(--soft); }
.day.hol .n { color: var(--holiday); }
.day.out .n { color: var(--out); }
.day.today { background: rgba(27,102,184,.22); box-shadow: inset 0 0 0 1.5px var(--view); }
.day.today .n { font-weight: 700; }
.day.sel:not(.today) { background: var(--surface-2); }
.dots { display: flex; gap: 3px; height: 6px; justify-content: center; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--shared); }
.chips-day { display: none; }

/* Monat / Jahr */
.mode-seg { max-width: 420px; }
.stack-14 { display: flex; flex-direction: column; gap: 14px; }
.cd-add { min-height: 32px; margin-top: 4px; align-self: flex-start; }
.countdown .what { display: flex; flex-direction: column; align-items: flex-start; }
.countdown.empty .big { color: var(--muted); }

.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.mini { padding: 10px 8px 8px; }
.mini h3 {
  margin: 0 2px 6px; display: flex; justify-content: space-between; align-items: baseline; gap: 6px;
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .1em; text-transform: uppercase;
}
.mini h3 small { font-family: var(--body); font-weight: 500; font-size: 11px; letter-spacing: 0; text-transform: none; color: var(--muted); }
.mini.current h3 { color: var(--view); }
.mini .wd7, .mini .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; text-align: center; }
.mini .wd7 span { font-size: 9px; letter-spacing: .06em; color: var(--dim); padding-bottom: 2px; }
.mini .d {
  position: relative; height: 24px; padding: 0; border: 0; border-radius: 6px; background: transparent;
  font-family: var(--display); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.mini .d:hover { background: rgb(var(--fg-rgb) / .06); }
.mini .d.blank { visibility: hidden; }
.mini .d.we { color: var(--soft); }
.mini .d.hol { color: var(--holiday); }
.mini .d.trip { background: rgba(127,209,185,.2); }
.mini .d.today { box-shadow: inset 0 0 0 1.5px var(--view); font-weight: 700; }
.mini .d i { position: absolute; bottom: 2px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 4px; }
.legend .lg-shared { background: var(--shared); }
.legend .lg-private { background: var(--view); }
.legend .lg-trip { background: var(--trip); }
.legend .lg-hol { background: var(--holiday); }

/* Deko, Geburtstage, Effekte */
.day .deco { position: absolute; top: 2px; right: 3px; font-size: 12px; line-height: 1; pointer-events: none; }
.day .deco img { width: 14px; height: 14px; object-fit: contain; display: block; }
.day.bday { background: rgba(242,198,90,.09); box-shadow: inset 0 0 0 1px rgba(242,198,90,.55); }
.day.bday.today { box-shadow: inset 0 0 0 1.5px var(--view), 0 0 0 1px rgba(242,198,90,.55); }
.day.bday .n { color: var(--bday-ink); }
.day:hover .deco, .day.sel .deco { animation: gift-wiggle .8s ease-in-out 2; filter: drop-shadow(0 0 6px rgba(255,214,102,.95)); }
@keyframes gift-wiggle {
  0%, 100% { transform: rotate(0) scale(1); }
  25% { transform: rotate(-14deg) scale(1.35); }
  75% { transform: rotate(14deg) scale(1.35); }
}
.mini .d.bday { color: var(--bday-ink); box-shadow: inset 0 0 0 1px rgba(242,198,90,.6); }
.ev .deco-big { width: 30px; flex-shrink: 0; font-size: 24px; line-height: 1; text-align: center; }
.ev .deco-big img { width: 30px; height: 30px; object-fit: contain; display: block; }
.ev.bday { background: linear-gradient(90deg, rgba(242,198,90,.16), var(--surface-2) 70%); }
.ev.bday:hover .deco-big { animation: gift-wiggle .8s ease-in-out 1; filter: drop-shadow(0 0 6px rgba(255,214,102,.95)); }
.deco-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.deco-pick button {
  width: 44px; height: 44px; padding: 4px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--input); font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.deco-pick button.none { width: auto; padding: 0 12px; font-size: 13px; color: var(--muted); }
.deco-pick button[aria-pressed="true"] { border-color: var(--accent); background: rgba(27,102,184,.28); color: var(--text); }
.deco-pick img { width: 100%; height: 100%; object-fit: contain; }
.fx-layer { position: fixed; width: 0; height: 0; pointer-events: none; z-index: 60; }
.fx-p { position: absolute; left: 0; top: 0; line-height: 1; opacity: 0; will-change: transform, opacity; }
.fx-p.glyph { font-size: var(--s, 20px); filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.fx-p.conf { background: var(--c); }
.fx-p.conf.rect { width: 8px; height: 12px; border-radius: 2px; }
.fx-p.conf.strip { width: 4px; height: 16px; border-radius: 2px; }
.fx-p.conf.dot { width: 8px; height: 8px; border-radius: 50%; }
.fx-p.spark { width: 6px; height: 6px; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 6px 2px var(--c), 0 0 14px 4px color-mix(in srgb, var(--c) 45%, transparent); }
.fx-p.flash { width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 70%, #fff) 0%, transparent 65%); }
.fx-p.balloon { width: var(--s, 36px); height: calc(var(--s, 36px) * 1.22); border-radius: 50% 50% 48% 48% / 55% 55% 45% 45%;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.85) 0 7%, transparent 22%),
    radial-gradient(circle at 50% 45%, var(--c) 0 55%, color-mix(in srgb, var(--c) 60%, #000) 100%);
  box-shadow: inset -4px -6px 10px rgba(0,0,0,.18); }
.fx-p.balloon::before { content: ""; position: absolute; left: 50%; bottom: -5px; width: 8px; height: 6px; transform: translateX(-50%);
  background: color-mix(in srgb, var(--c) 70%, #000); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.fx-p.balloon::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 46px; margin-top: 4px;
  background: linear-gradient(rgba(255,255,255,.7), rgba(255,255,255,0)); }
.fx-p.streak { width: 110px; height: 3px; border-radius: 3px; transform-origin: 100% 50%;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(190,225,255,.7) 60%, #fff); }
.fx-p.streak::after { content: ""; position: absolute; right: -4px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 10px 4px rgba(170,215,255,.9); }
.fx-p.bubble { width: var(--s, 24px); height: var(--s, 24px); border-radius: 50%; border: 1px solid rgba(255,255,255,.55);
  background: radial-gradient(circle at 30% 28%, rgba(255,255,255,.9) 0 8%, transparent 18%),
    radial-gradient(circle at 50% 50%, rgba(160,220,255,.05) 55%, rgba(200,160,255,.35) 80%, rgba(120,230,255,.45) 100%); }
.fx-p.rainbow { width: 240px; height: 130px; overflow: visible; }
.fx-p.rainbow path { fill: none; stroke-width: 10; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.fx-p.tor { font-family: var(--display); font-weight: 800; font-size: 46px; letter-spacing: .04em; white-space: nowrap;
  color: #fff; -webkit-text-stroke: 2px #7b1e2b; paint-order: stroke fill;
  text-shadow: 0 3px 0 #7b1e2b, 0 6px 14px rgba(0,0,0,.55); }

/* Effekt-Auswahl im Termin-Dialog */
.fx-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.fx-pick button {
  min-height: 64px; padding: 6px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--input);
  color: var(--muted); font: inherit; font-size: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.fx-pick button .ico { font-size: 24px; line-height: 1; }
.fx-pick button.none .ico { font-size: 18px; }
.fx-pick button[aria-pressed="true"] { border-color: var(--accent); background: rgba(27,102,184,.28); color: var(--text); }
.fx-hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }

/* Woche / Tag (Zeitraster) */
.tg { padding: 0; overflow: hidden; }
.tg-head, .tg-allday, .tg-body { display: grid; grid-template-columns: 44px repeat(var(--cols, 7), minmax(0, 1fr)); }
.tg-head { border-bottom: 1px solid var(--line); }
.tg-day { position: relative; padding: 8px 2px 6px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tg-day .wd { font-size: 10px; letter-spacing: .14em; color: var(--muted); }
.tg-day .dn { font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums;
  width: 32px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.tg-day.today .dn { background: var(--view-fill); color: var(--view-ink); }
.tg-day.hol .dn { color: var(--holiday); }
.tg-day.today.hol .dn { color: var(--view-ink); }
.tg-day.bday { background: rgba(242,198,90,.09); }
.tg-day .deco { position: absolute; top: 4px; right: 4px; font-size: 13px; line-height: 1; }
.tg-day .deco img { width: 16px; height: 16px; object-fit: contain; display: block; }
.tg-day.bday:hover .deco { animation: gift-wiggle .8s ease-in-out 2; filter: drop-shadow(0 0 6px rgba(255,214,102,.95)); }
.tg-corner { display: flex; align-items: center; justify-content: center; text-align: center; }
.tg-corner.label { font-size: 9px; letter-spacing: .04em; color: var(--dim); text-transform: uppercase; hyphens: manual; padding: 2px; }
.tg-allday { border-bottom: 1px solid var(--line); background: rgb(var(--fg-rgb) / .02); }
.tg-allcell { padding: 4px 2px; display: flex; flex-direction: column; gap: 3px; min-width: 0; border-left: 1px solid rgb(var(--fg-rgb) / .05); }
.tg-chip {
  display: block; width: 100%; padding: 3px 5px; border: 0; border-radius: 6px; text-align: left;
  font-size: 11px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text); background: color-mix(in srgb, var(--c, var(--shared)) 26%, transparent);
}
.tg-chip.hol { background: transparent; color: var(--holiday); padding-left: 2px; }
.tg-scroll { max-height: 62dvh; overflow-y: auto; overscroll-behavior: contain; }
.tg-body { --hour-h: 44px; position: relative; }
.tg-hours { display: flex; flex-direction: column; }
.tg-hour { height: var(--hour-h); font-size: 11px; color: var(--muted); text-align: right; padding-right: 6px; transform: translateY(-6px); font-variant-numeric: tabular-nums; }
.tg-hour:first-child { transform: none; }
.tg-col {
  position: relative; height: calc(var(--hour-h) * 18); cursor: copy; border-left: 1px solid rgb(var(--fg-rgb) / .05);
  background-image:
    linear-gradient(to bottom, rgb(var(--fg-rgb) / .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(var(--fg-rgb) / .025) 1px, transparent 1px);
  background-size: 100% var(--hour-h), 100% calc(var(--hour-h) / 2);
}
.tg-col.today { background-color: color-mix(in srgb, var(--view) 6%, transparent); }
.tg-ev {
  position: absolute; z-index: 1; padding: 3px 6px 3px 7px; border-radius: 7px; text-align: left; overflow: hidden; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--c, var(--shared)) 75%, transparent);
  border-left: 4px solid var(--c, var(--shared));
  background: color-mix(in srgb, var(--c, var(--shared)) 34%, var(--surface));
  color: var(--text); display: flex; flex-direction: column; gap: 1px; font-size: 12px; line-height: 1.25;
  box-shadow: 0 1px 3px rgb(0 0 0 / .25);
}
.tg-ev:hover { filter: brightness(1.12); }
.tg-ev .tt { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; opacity: .9; white-space: nowrap; }
.tg-ev .ti { font-weight: 700; overflow-wrap: break-word; hyphens: auto; }
/* short events: time and title side by side on one line */
.tg-ev.short { flex-direction: row; align-items: center; gap: 8px; padding-top: 1px; padding-bottom: 1px; }
.tg-ev.short .ti { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* narrow columns (week view): the title matters more than the time, which the grid already shows */
.tg-col { container-type: inline-size; }
@container (max-width: 220px) {
  .tg-ev.short .tt { display: none; }
  .tg-ev.short { padding-left: 5px; padding-right: 3px; }
}
.tg-ev.bday { box-shadow: 0 0 0 1px rgba(242,198,90,.7), 0 0 12px rgba(242,198,90,.25); }
.tg-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--holiday); z-index: 2; pointer-events: none; }
.tg-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 4px; background: var(--holiday); }

/* Tagesliste */
.daylist { display: flex; flex-direction: column; gap: 8px; }
.daylist header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.daylist ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ev {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid transparent; text-align: left;
}
button.ev:hover { border-color: var(--line); }
.ev .t { width: 52px; flex-shrink: 0; font-family: var(--display); font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums; }
.ev .t small { display: block; font-family: var(--body); font-size: 11px; font-weight: 500; color: var(--muted); }
.ev .dot { width: 8px; height: 8px; border-radius: 4px; flex-shrink: 0; background: var(--shared); }
.ev .body { flex: 1; min-width: 0; }
.ev .title { display: block; font-weight: 600; overflow-wrap: anywhere; }
.ev .meta { display: block; font-size: 12px; color: var(--muted); }
.ev.holiday { background: rgba(255,122,110,.08); }
.ev.holiday .dot { background: var(--holiday); }
.empty { color: var(--muted); font-size: 14px; padding: 6px 2px; }

/* Unterseiten (Sync, Konto) */
.screen { display: flex; flex-direction: column; gap: 18px; }
.screen-head { display: flex; align-items: center; gap: 6px; padding-top: env(safe-area-inset-top, 0px); }
.screen-head .chrome { font-size: 30px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px; }
.row + .row { border-top: 1px solid var(--line); }
.row .grow { flex: 1; min-width: 0; }
.row .sub { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.row .sub.mono { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; user-select: all; }
.feed-dot { width: 10px; height: 10px; border-radius: 5px; flex-shrink: 0; }
.sub.block { display: block; }
.card.pad { padding: 14px; }
.sub-row .err { color: var(--danger); }
.sub-row .acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ev.ext { cursor: pointer; }
button.ev.ext:hover { border-color: var(--line); }
.ev.ext .lock { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; }
.chips-day span.ext, .tg-chip.ext { background: color-mix(in srgb, var(--c, var(--trip)) 22%, transparent); }
.tg-ev.ext { border-style: dashed; cursor: pointer; }
fieldset.plain { border: 0; padding: 0; margin: 0; }
fieldset.plain legend { margin-bottom: 6px; padding: 0; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 12px; }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.info { padding: 12px 14px; border-radius: 14px; background: rgba(27,102,184,.14); border: 1px solid rgba(74,163,255,.35); font-size: 13px; color: var(--text-2); }
.info strong { color: var(--text); }
details.how { border-top: 1px solid var(--line); }
details.how summary { cursor: pointer; padding: 12px; font-weight: 600; min-height: 44px; }
details.how ol { margin: 0; padding: 0 16px 14px 34px; color: var(--text-2); font-size: 14px; }
.thumb { width: 64px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-2); flex-shrink: 0; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Floating-Button & Tab-Leiste */
.fab {
  position: fixed; right: 16px; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px));
  width: 56px; height: 56px; border-radius: 16px; border: 0; z-index: 20;
  background: var(--view-fill); color: var(--view-ink); box-shadow: 0 10px 24px var(--shadow);
  display: flex; align-items: center; justify-content: center;
}
.fab svg { width: 26px; height: 26px; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--nav); border-top: 1px solid var(--line);
}
.tabbar button {
  position: relative; border: 0; background: transparent; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px;
}
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button[aria-current="page"] { color: var(--view); font-weight: 600; }
.tabbar .badge { top: 6px; right: calc(50% - 22px); }

/* ---------- Chat ---------- */
.chatcol { display: none; }
body[data-screen="chat"] .chatcol {
  display: flex; position: fixed; inset: 0; z-index: 30;
}
body[data-screen="chat"] .tabbar, body[data-screen="chat"] .fab,
body[data-screen="sync"] .fab, body[data-screen="account"] .fab, body[data-screen="events"] .fab { display: none; }
.chat {
  position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  background:
    linear-gradient(180deg, rgb(var(--veil) / .92) 0%, rgb(var(--veil) / .8) 30%, rgb(var(--veil) / .88) 100%),
    var(--bg-url) center 30% / cover no-repeat,
    var(--ground);
}
.chat-head {
  display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  border-bottom: 1px solid rgb(var(--fg-rgb) / .08); background: rgb(var(--veil) / .6);
}
.avatars { display: flex; }
.avatar {
  width: 36px; height: 36px; border-radius: 18px; border: 2px solid var(--ground);
  display: flex; align-items: center; justify-content: center; font-weight: 600; color: #0b0e11;
}
.avatar + .avatar { margin-left: -10px; }
.chat-head .h { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.1; }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.msgs .daysep {
  align-self: center; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
  padding: 4px 10px; border-radius: 10px; background: rgb(var(--glass) / .85);
}
.msg { max-width: 80%; display: flex; flex-direction: column; gap: 4px; align-self: flex-start; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.bubble { padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me .bubble { border-radius: 16px 16px 4px 16px; background: var(--me-fill, var(--accent-fill)); color: #fff; }
.bubble.has-img { padding: 4px; display: flex; flex-direction: column; gap: 6px; }
.bubble.has-img img { display: block; border-radius: 12px; max-height: 320px; width: auto; max-width: min(260px, 100%); object-fit: cover; }
.bubble.has-img .cap { padding: 2px 10px 6px; }
.bubble.only-emoji { background: transparent !important; font-size: 40px; line-height: 1.1; padding: 0; }
.sticker img { width: 170px; height: 170px; object-fit: contain; display: block; }
.msg .when { font-size: 11px; color: var(--muted); padding: 0 4px; }
.composer { position: relative; border-top: 1px solid rgb(var(--fg-rgb) / .08); background: rgb(var(--veil) / .92); padding-bottom: env(safe-area-inset-bottom, 0px); }
.composer form { display: flex; align-items: flex-end; gap: 6px; padding: 10px 10px 12px; }
.composer .input { flex: 1; min-width: 0; }
.composer .btn.icon { flex-shrink: 0; }
.composer .btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.tray { max-height: 300px; overflow-y: auto; padding: 10px; border-bottom: 1px solid var(--line); }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 2px; }
.emoji-grid button { height: 44px; border: 0; border-radius: 10px; background: transparent; font-size: 26px; line-height: 1; }
.emoji-grid button:hover { background: var(--surface-2); }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.sticker-tile { position: relative; }
.sticker-tile > button:first-child { width: 100%; aspect-ratio: 1; border: 0; border-radius: 12px; background: var(--surface-2); padding: 6px; }
.sticker-tile img { width: 100%; height: 100%; object-fit: contain; }
.sticker-tile .del { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); color: var(--danger); font-size: 14px; line-height: 1; padding: 0; }
.sticker-add { aspect-ratio: 1; border-radius: 12px; border: 1px dashed var(--line-strong); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: var(--muted); text-align: center; padding: 6px; }
.preview-strip { display: flex; align-items: center; gap: 10px; padding: 8px 12px 0; font-size: 13px; color: var(--muted); }
.preview-strip img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.bubble.locked { color: var(--muted); font-style: italic; }
.msg.me .bubble.locked { background: var(--surface-2); color: var(--muted); }
.bubble.has-img img.loading { width: 200px; height: 150px; background: rgb(var(--fg-rgb) / .06); }
.e2e-box {
  display: flex; flex-direction: column; gap: 10px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgb(var(--fg-rgb) / .08); background: rgb(var(--veil) / .94); max-height: 70dvh; overflow-y: auto;
}
.e2e-box .stack { gap: 10px; }
.hint.warn { color: var(--warn); }
.e2e-status { margin: 0; }
.safety { font-size: 18px; letter-spacing: .08em; word-spacing: .35em; user-select: all; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
#e2e-account .btn.danger { padding: 0 4px; text-align: left; }

/* ---------- Termin-Dialog ---------- */
dialog.sheet {
  width: 100%; max-width: 560px; max-height: 92dvh; margin: auto auto 0; padding: 0; border: 0;
  border-radius: 22px 22px 0 0; background: var(--surface); color: var(--text);
  border-top: 1px solid var(--line);
}
dialog.sheet::backdrop { background: rgba(5,7,9,.65); }
.sheet form, .sheet .sheet-inner { display: flex; flex-direction: column; max-height: 92dvh; }
.day-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.day-sheet-titles { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#day-sheet .sheet-head { align-items: flex-start; padding-top: 12px; }
#day-sheet .sheet-body { padding-top: 4px; }
.sheet .grab { align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin-top: 10px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; gap: 8px; }
.sheet-head h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .1em; text-transform: uppercase; }
.sheet-body { overflow-y: auto; padding: 8px 16px calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.form-error { color: var(--danger); font-size: 14px; margin: 0; }
.sheet .owner-note { font-size: 13px; color: var(--muted); margin: 0; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 88px); transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px; z-index: 50;
  background: var(--toast); border: 1px solid var(--line); box-shadow: 0 10px 30px var(--shadow);
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.toast.show { opacity: 1; }
.toast.err { border-color: rgba(255,122,110,.6); }

/* ---------- Login ---------- */
.login {
  min-height: 100dvh; display: flex; flex-direction: column; position: relative; overflow: hidden;
  background:
    linear-gradient(180deg, rgb(var(--veil) / .75) 0%, rgb(var(--veil) / .2) 35%, rgb(var(--veil) / .75) 62%, var(--ground) 80%),
    linear-gradient(135deg, var(--ground-2), var(--ground));
}
.login .bars { height: 170px; top: -30px; }
.login .top { position: relative; padding: calc(48px + env(safe-area-inset-top, 0px)) 24px 0; display: flex; flex-direction: column; gap: 10px; }
.login .chrome { font-size: clamp(44px, 12vw, 72px); }
.login form { position: relative; margin-top: auto; padding: 24px 24px calc(40px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 440px; align-self: center; }
.login .btn.primary { min-height: 52px; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- PC ab 1024 px ---------- */
@media (min-width: 1024px) {
  .page-bg {
    display: block; position: fixed; inset: 0; z-index: -1;
    background:
      linear-gradient(90deg, rgb(var(--veil) / .55) 0%, rgb(var(--veil) / .82) 26%, rgb(var(--veil) / .9) 70%, rgb(var(--veil) / .95) 100%),
      var(--day-bg-url, var(--bg-url)) center 35% / cover no-repeat,
      var(--ground);
  }
  body { background: var(--ground); }
  .app {
    display: grid; grid-template-columns: 300px minmax(0, 1fr) 340px; height: 100dvh; padding: 0;
  }
  .desk-only { display: revert !important; }
  .mobile-only, .tabbar, .fab { display: none !important; }
  .side { display: flex; flex-direction: column; gap: 18px; padding: 24px; overflow-y: auto; }
  .hero { background: none; padding: 4px 0 0; min-height: 0; overflow: visible; }
  .hero .bars { right: auto; left: 130px; top: -40px; }
  .brand .chrome { font-size: 32px; }
  .controls { padding: 0; margin: 0; }
  .controls .seg { grid-auto-flow: row; grid-auto-columns: auto; }
  .controls .seg button { justify-content: flex-start; padding: 0 14px; min-height: 40px; }
  .upcoming ol { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
  .upcoming li { display: flex; gap: 12px; align-items: center; }
  .upcoming .body { min-width: 0; }
  .upcoming .body strong { display: block; overflow-wrap: anywhere; }
  .upcoming .meta { font-size: 12px; color: var(--muted); }
  .upcoming .dot { width: 8px; height: 8px; border-radius: 4px; flex-shrink: 0; }
  .upcoming .d { width: 42px; text-align: center; font-family: var(--display); line-height: 1; }
  .upcoming .d b { display: block; font-size: 22px; }
  .upcoming .d small { font-size: 11px; letter-spacing: .12em; color: var(--muted); }
  /* .desk-only would set display: revert, so the flex column needs the stronger selector */
  .side-links.desk-only { margin-top: auto; display: flex !important; flex-direction: column; gap: 10px; }
  .side-links .btn { justify-content: flex-start; background: rgb(var(--glass) / .85); }
  .side-sep { height: 1px; margin: 8px 4px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }

  main.main { padding: 24px; overflow-y: auto; }
  .month-head h2 { font-size: 40px; }
  .month-head .yr { font-size: 26px; }
  .year-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
  .tg-body { --hour-h: 48px; }
  .tg-scroll { max-height: calc(100dvh - 300px); }
  .tg-head, .tg-allday, .tg-body { grid-template-columns: 56px repeat(var(--cols, 7), minmax(0, 1fr)); }
  .tg-ev { font-size: 13.5px; }
  .tg-chip { font-size: 12px; }
  .mini .d { height: 26px; font-size: 14px; }
  .cal { background: rgb(var(--glass) / .92); }
  .grid { gap: 4px; }
  .day {
    min-height: 104px; align-items: stretch; justify-content: flex-start; padding: 6px; gap: 4px;
    background: var(--cell); text-align: left; overflow: hidden;
  }
  .day.out { background: transparent; }
  .day.sel:not(.today) { background: var(--cell-sel); }
  .dots { display: none; }
  .day .deco { top: 5px; right: 6px; font-size: 16px; }
  .day .deco img { width: 20px; height: 20px; }
  .chips-day { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .chips-day span {
    display: block; font-size: 12px; line-height: 1.2; padding: 3px 6px; border-radius: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background: color-mix(in srgb, var(--shared) 14%, transparent);
  }
  .chips-day span.priv { background: color-mix(in srgb, var(--view) 22%, transparent); }
  .chips-day span.hol { background: transparent; color: var(--holiday); padding-left: 0; }
  .chips-day span.trip { background: rgba(127,209,185,.18); }
  .chips-day span.more { background: transparent; color: var(--muted); }
  .day.today { background: color-mix(in srgb, var(--view) 14%, var(--cell)); }

  .chatcol { display: flex; padding: 24px 20px 20px 0; min-height: 0; }
  body[data-screen="chat"] .chatcol { position: static; }
  .chat { border-radius: 16px; border: 1px solid var(--line); background: rgb(var(--glass) / .94); }
  .chat-head { padding-top: 12px; }
  .chat-head .back { display: none; }

  dialog.sheet { margin: auto; border-radius: 20px; border: 1px solid var(--line); }
  .sheet .grab { display: none; }
  .toast { bottom: 32px; }
}

/* iPhone-App im hellen Modus: die Statusleiste (Uhr, Akku) ist dort immer weiß,
   also bekommt sie oben einen dunklen Streifen, damit man sie lesen kann. */
:root[data-theme="light"] body::before {
  content: ""; position: fixed; left: 0; right: 0; top: 0; z-index: 100; pointer-events: none;
  height: env(safe-area-inset-top, 0px); background: #1a222b;
}
@media (min-width: 1024px) {
  :root[data-theme="light"] .page-bg {
    background:
      linear-gradient(90deg, rgb(var(--veil) / .88) 0%, rgb(var(--veil) / .9) 26%, rgb(var(--veil) / .9) 70%, rgb(var(--veil) / .95) 100%),
      var(--day-bg-url, var(--bg-url)) center 35% / cover no-repeat,
      var(--ground);
  }
}

/* Urlaubsliste */
.trip-sep { padding: 6px 2px 0; }
.trip-ev { align-items: center; }
.trip-ev.running { background: linear-gradient(90deg, rgba(127,209,185,.2), var(--surface-2) 75%); border-color: rgba(127,209,185,.45); }
.trip-count { width: 64px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.trip-count b { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; color: var(--trip); }
.trip-count small { font-size: 11px; color: var(--muted); }

/* Eigenes Chat-Hintergrundbild (Konto › Hintergrundbilder › Chat): Foto bleibt gut sichtbar,
   oben und unten etwas dunkler, damit Kopf und Eingabe lesbar bleiben. */
.chat.has-photo,
:root .chat.has-photo {
  background:
    linear-gradient(180deg, rgb(var(--veil) / .55) 0%, rgb(var(--veil) / .12) 30%, rgb(var(--veil) / .18) 70%, rgb(var(--veil) / .6) 100%),
    var(--chat-bg-url) center / cover no-repeat,
    var(--ground);
}
.chat.has-photo .daysep { background: rgb(var(--veil) / .8); }
.chat.has-photo .msg .when { color: var(--text); text-shadow: 0 1px 3px rgb(var(--veil) / .9); }
.chat.has-photo .bubble.only-emoji { text-shadow: 0 2px 6px rgb(0 0 0 / .35); }

/* Ort / Adresse */
.loc-row { display: flex; gap: 8px; align-items: stretch; }
.loc-row .input { flex: 1; min-width: 0; }
.loc-row .btn { flex-shrink: 0; min-height: 44px; }
.place {
  display: flex; align-items: center; gap: 8px; margin: 4px 0 0 64px; padding: 6px 10px; border-radius: 10px;
  font-size: 13px; color: var(--text); text-decoration: none; background: rgb(var(--fg-rgb) / .05); border: 1px solid var(--line);
}
.place:hover { border-color: var(--accent); }
.place .addr { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place .go { color: var(--accent); font-weight: 600; flex-shrink: 0; }

/* ---------- Chat: Menü, Antworten, Reaktionen, Haken ---------- */
.msg { position: relative; touch-action: pan-y; transition: transform .15s ease; -webkit-touch-callout: none; }
.msg .bubble { -webkit-user-select: none; user-select: none; }
@media (hover: hover) { .msg .bubble { -webkit-user-select: text; user-select: text; } }
.msg.flash .bubble { box-shadow: 0 0 0 3px var(--accent); transition: box-shadow .3s; }
.msg .more {
  position: absolute; top: 2px; right: -30px; width: 26px; height: 26px; border-radius: 13px; border: 0;
  background: rgb(var(--glass) / .9); color: var(--muted); font-size: 16px; line-height: 1; opacity: 0; transition: opacity .15s;
}
.msg.me .more { right: auto; left: -30px; }
.msg:hover .more, .msg .more:focus-visible { opacity: 1; }
.with-quote { display: flex; flex-direction: column; gap: 4px; }
.msg.me .with-quote { align-items: flex-end; }
.quote {
  display: flex; flex-direction: column; gap: 1px; max-width: 100%; text-align: left; cursor: pointer;
  padding: 6px 10px; border: 0; border-left: 3px solid var(--accent); border-radius: 10px;
  background: rgb(var(--glass) / .85); color: var(--text); font-size: 12.5px;
}
.quote strong { font-size: 12px; color: var(--accent); }
.quote span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.reacts {
  align-self: flex-start; margin-top: -10px; margin-left: 10px; display: inline-flex; gap: 2px; padding: 2px 6px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; line-height: 1.3; cursor: pointer; z-index: 1;
}
.msg.me .reacts { align-self: flex-end; margin-left: 0; margin-right: 10px; }
.reacts .mine { filter: drop-shadow(0 0 2px var(--accent)); }
.ticks { letter-spacing: -2px; margin-left: 2px; }
.ticks.read { color: #4fc3ff; font-weight: 700; }
#chat-sub.typing { color: var(--trip); font-style: italic; }
.reply-bar {
  display: flex; align-items: center; gap: 8px; margin: 8px 10px 0; padding: 6px 6px 6px 12px;
  border-left: 3px solid var(--accent); border-radius: 10px; background: rgb(var(--fg-rgb) / .06); font-size: 13px;
}
.reply-bar > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.reply-bar strong { color: var(--accent); font-size: 12.5px; }
.reply-bar .rb-text { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dialog.msg-menu .sheet-inner { padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px)); gap: 12px; }
.menu-preview { margin: 4px 0 0; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.react-pick { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; padding: 4px; border-radius: 16px; background: var(--surface-2); }
.react-pick button { height: 44px; padding: 0; border: 0; border-radius: 12px; background: transparent; font-size: clamp(18px, 5.6vw, 26px); line-height: 1; }
.react-pick button[aria-pressed="true"] { background: rgb(var(--fg-rgb) / .12); box-shadow: inset 0 0 0 2px var(--accent); }
.menu-list { display: flex; flex-direction: column; gap: 4px; }
.menu-item {
  min-height: 48px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--text);
  text-align: left; font-size: 15px; font-weight: 500;
}
.menu-item.danger { color: var(--danger); }
.menu-item.ghost { background: transparent; text-align: center; color: var(--muted); }

/* ---------- Chat: Sprachnachrichten ---------- */
.bubble.voice { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; min-width: 220px; white-space: normal; }
.vplay {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 19px; border: 0; padding: 0;
  background: var(--accent); color: #fff; font-size: 15px; line-height: 1; cursor: pointer;
}
.msg.me .vplay { background: rgb(255 255 255 / .92); color: var(--accent-fill, var(--accent)); }
.vplay:disabled { opacity: .45; cursor: default; }
.vwave { flex: 1; display: flex; align-items: center; gap: 2px; height: 30px; min-width: 120px; cursor: pointer; }
.vwave span { flex: 1; min-height: 3px; border-radius: 2px; background: rgb(var(--fg-rgb) / .28); transition: background .1s; }
.vwave span.on { background: var(--accent); }
.msg.me .vwave span { background: rgb(255 255 255 / .42); }
.msg.me .vwave span.on { background: #fff; }
.vdur { flex-shrink: 0; min-width: 34px; font-size: 12.5px; font-variant-numeric: tabular-nums; opacity: .85; }
.bubble.voice.vfail .vdur { font-size: 11.5px; min-width: 0; }
.bubble.voice.vfail .vwave { opacity: .4; }
.rec-bar { display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px; }
.rec-bar .rec-dot { width: 12px; height: 12px; border-radius: 6px; background: var(--danger); animation: rec-pulse 1s ease-in-out infinite; flex-shrink: 0; }
.rec-bar .rec-time { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 40px; }
.rec-bar .rec-level { flex: 1; height: 6px; border-radius: 3px; background: rgb(var(--fg-rgb) / .1); overflow: hidden; }
.rec-bar .rec-level i { display: block; height: 100%; width: 100%; background: var(--danger); transform-origin: left; transform: scaleX(0); transition: transform .1s; }
.rec-bar .rec-hint { color: var(--muted); font-size: 12.5px; }
.composer.recording #chat-form { display: none; }
@keyframes rec-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .rec-bar .rec-dot { animation: none; } }

/* ---------- Chat: Standort, Foto groß, Ton ---------- */
.bubble.loc {
  display: flex; align-items: center; gap: 10px; min-width: 210px; text-decoration: none; color: inherit; white-space: normal;
}
.bubble.loc .loc-pin { font-size: 26px; line-height: 1; }
.bubble.loc .loc-txt { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bubble.loc .loc-txt span { font-size: 12px; opacity: .8; }
.bubble.loc .go { font-weight: 600; font-size: 13px; }
.msg:not(.me) .bubble.loc .go { color: var(--accent); }
img.zoomable { cursor: zoom-in; }
dialog.lightbox {
  position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; border-radius: 0; background: rgb(0 0 0 / .94); color: #fff; overflow: hidden;
}
dialog.lightbox::backdrop { background: #000; }
.lb-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
.lb-stage img {
  max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center; will-change: transform;
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none; pointer-events: none;
}
.lb-stage img.anim { transition: transform .2s ease; }
.lightbox.zoomed .lb-stage { cursor: grab; }
.lb-bar {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 10px; left: 10px;
  display: flex; justify-content: flex-end; gap: 8px; pointer-events: none;
}
.lb-btn {
  pointer-events: auto; min-width: 44px; height: 44px; padding: 0 12px; border: 0; border-radius: 22px;
  background: rgb(255 255 255 / .16); color: #fff; font-size: 17px; font-weight: 600; backdrop-filter: blur(8px);
}
.lb-btn.wide { font-size: 14.5px; padding: 0 16px; }
.lb-btn:focus-visible { outline: 2px solid #fff; }
.lb-hint {
  position: absolute; bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); left: 0; right: 0; text-align: center;
  font-size: 12.5px; color: rgb(255 255 255 / .6); pointer-events: none; transition: opacity .3s;
}
.lightbox.zoomed .lb-hint { opacity: 0; }
.sound-row select { flex: 1; min-width: 160px; }

/* ---------- Anlass (z. B. Geburtstag): Countdown, roter Übergang, Festtag ---------- */
body { --anlass-ink: #ff6b86; --anlass-glow: rgba(255,77,109,.45); }
:root[data-theme="light"] body { --anlass-ink: #b0102c; --anlass-glow: rgba(200,16,46,.25); }
body.anlass-rot { transition: background-color 1s; }

.anlass-cd {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; cursor: pointer;
  background: linear-gradient(120deg, rgba(255,77,109,.22), rgba(200,16,46,.12));
  border: 1px solid rgba(255,77,109,.55);
}
.anlass-cd .big {
  font-family: var(--display); font-weight: 800; font-size: 44px; line-height: .9; color: var(--anlass-ink);
  font-variant-numeric: tabular-nums;
}
.anlass-cd .big.word { font-size: 30px; letter-spacing: .04em; text-transform: uppercase; }
.anlass-cd .what { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.anlass-cd .what strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.anlass-cd .what span { font-size: 12px; color: var(--muted); }
.anlass-cd .unit {
  font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--anlass-ink);
}

.anlass-banner {
  position: relative; overflow: hidden; padding: 18px 16px 16px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(135deg, rgba(200,16,46,.6), rgba(255,77,109,.22) 60%, rgba(200,16,46,.35)), var(--surface);
  border: 1px solid var(--accent);
  box-shadow: 0 10px 34px var(--anlass-glow);
}
:root[data-theme="light"] .anlass-banner {
  background: linear-gradient(135deg, rgba(200,16,46,.16), rgba(255,77,109,.06) 60%, rgba(200,16,46,.12)), var(--surface);
}
.anlass-title {
  position: relative; margin: 0; font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1;
  letter-spacing: .04em; text-transform: uppercase; overflow-wrap: anywhere;
  background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.anlass-text { position: relative; margin: 10px 0 0; font-size: 15px; line-height: 1.45; white-space: pre-line; }
.anlass-banner-hearts { position: absolute; inset: 0; pointer-events: none; }

.anlass-hearts { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.anlass-heart {
  position: absolute; display: block; line-height: 0;
  animation: anlass-float linear infinite;
  filter: drop-shadow(0 2px 6px rgba(200,16,46,.35));
}
.anlass-heart svg { display: block; }
@keyframes anlass-float {
  0% { transform: translate(0, var(--from)); }
  50% { transform: translate(var(--sway), calc((var(--from) + var(--to)) / 2)); }
  100% { transform: translate(0, var(--to)); }
}

.anlass-preview {
  position: fixed; left: 50%; top: calc(8px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 90;
  padding: 4px 12px; border-radius: 999px; background: #c8102e; color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: .06em; pointer-events: none;
}

/* Auf dem Handy sitzt das Banner direkt unter dem Titelbild. */
.controls .anlass-banner { margin-bottom: 2px; }
.anlass-title .emo { color: initial; -webkit-text-fill-color: initial; background: none; }

/* ---------- Event-Manager ---------- */
.lev-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
.lev-chips::-webkit-scrollbar { display: none; }
.lev-chip {
  flex-shrink: 0; min-height: 36px; padding: 0 14px; border-radius: 18px; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface); color: var(--soft); font-size: 14px;
}
.lev-chip[aria-pressed="true"] { border-color: transparent; background: var(--view-fill); color: var(--view-ink); font-weight: 600; }
.lev-chip.arena[aria-pressed="true"] { background: #16775f; }
.lev-ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lev-month { padding: 8px 2px 0; }
.lev { display: flex; gap: 12px; padding: 12px; align-items: flex-start; }
.lev.arena { border-color: rgba(127,209,185,.5); }
.lev-date { width: 44px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; padding-top: 2px; }
.lev-date b { font-size: 26px; font-weight: 800; line-height: 1; }
.lev-date small { font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.lev-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.lev-name { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; color: var(--text); text-decoration: none; }
a.lev-name:hover { text-decoration: underline; }
.lev-go { color: var(--accent); }
.lev.linked { cursor: pointer; transition: border-color .15s; }
.lev.linked:hover { border-color: var(--line-strong); }
.lev-meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.lev-tag {
  align-self: flex-start; margin-top: 2px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--trip); border: 1px solid rgba(127,209,185,.5);
}
.lev-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lev-acts .btn { min-height: 36px; padding: 0 12px; font-size: 13px; }
.lev-acts .btn.wa { background: #17784b; border-color: transparent; color: #fff; }

/* Events-Knopf am PC: Neon-Look in der Akzentfarbe (folgt Ansicht und Thema, am Geburtstag rot) */
.btn.neon {
  --neon: var(--accent);
  position: relative; min-height: 60px; padding: 10px 16px; gap: 12px; border-radius: 14px;
  border: 1px solid var(--neon); color: var(--text);
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--neon) 28%, transparent), transparent 60%),
    rgb(var(--glass) / .9);
  box-shadow:
    0 0 6px color-mix(in srgb, var(--neon) 70%, transparent),
    0 0 18px color-mix(in srgb, var(--neon) 35%, transparent),
    inset 0 0 12px color-mix(in srgb, var(--neon) 18%, transparent);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  animation: neon-breathe 3.2s ease-in-out infinite;
}
.side-links .btn.neon { background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--neon) 28%, transparent), transparent 60%),
    rgb(var(--glass) / .9); }
.neon-icon { font-size: 22px; line-height: 1; filter: drop-shadow(0 0 6px var(--neon)); }
.neon-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.neon-text strong {
  font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: .08em; text-transform: uppercase;
  text-shadow: 0 0 6px color-mix(in srgb, var(--neon) 80%, transparent), 0 0 16px color-mix(in srgb, var(--neon) 45%, transparent);
}
.neon-text small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .04em; }
.btn.neon:hover, .btn.neon:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--neon) 70%, white);
  box-shadow:
    0 0 8px var(--neon),
    0 0 26px color-mix(in srgb, var(--neon) 60%, transparent),
    0 0 52px color-mix(in srgb, var(--neon) 30%, transparent),
    inset 0 0 18px color-mix(in srgb, var(--neon) 28%, transparent);
  animation-play-state: paused;
}
.btn.neon:hover .neon-icon { animation: neon-wiggle .6s ease-in-out; }
.btn.neon:active { transform: translateY(0) scale(.98); }
body[data-screen="events"] .btn.neon { background: color-mix(in srgb, var(--neon) 22%, rgb(var(--glass) / .9)); }
@keyframes neon-breathe {
  0%, 100% { box-shadow: 0 0 6px color-mix(in srgb, var(--neon) 70%, transparent), 0 0 18px color-mix(in srgb, var(--neon) 35%, transparent), inset 0 0 12px color-mix(in srgb, var(--neon) 18%, transparent); }
  50% { box-shadow: 0 0 9px color-mix(in srgb, var(--neon) 85%, transparent), 0 0 28px color-mix(in srgb, var(--neon) 50%, transparent), inset 0 0 16px color-mix(in srgb, var(--neon) 24%, transparent); }
}
@keyframes neon-wiggle {
  0%, 100% { transform: rotate(0) scale(1); }
  30% { transform: rotate(-12deg) scale(1.2); }
  70% { transform: rotate(10deg) scale(1.2); }
}
:root[data-theme="light"] .neon-text strong { text-shadow: 0 0 8px color-mix(in srgb, var(--neon) 45%, transparent); }

/* Events: Jahr, Liste / Kalender */
.lev-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.lev-bar .seg { flex: 1 1 auto; }
.lev-years button { font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.lev-modes { flex: 0 1 auto; }
.lev-modes button { padding: 0 12px; white-space: nowrap; }
.lev-grid .day.past .n { opacity: .45; }
.lev-grid .day.arena-day:not(.today) { box-shadow: inset 0 0 0 1px rgba(127,209,185,.45); }
.lev-count {
  position: absolute; top: 2px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--surface-2); color: var(--soft); font-size: 10px; font-weight: 600; line-height: 16px; text-align: center;
}
.chips-day span.lev-cal-chip { background: color-mix(in srgb, var(--c, var(--shared)) 24%, transparent); }
@media (min-width: 1024px) {
  .lev-count { top: 5px; right: 6px; }
  .lev-grid .day { min-height: 96px; }
}
.lev-acts .btn.share { border-color: #17784b; color: var(--text); }
.lev-acts .btn.share:hover { background: color-mix(in srgb, #17784b 22%, var(--surface)); }

/* Kinder-Wochenenden: rosa-milchig */
body { --kids: #f28cb1; --kids-bg: rgba(242,140,177,.16); --kids-line: rgba(242,140,177,.5); }
:root[data-theme="light"] body { --kids: #c2457a; --kids-bg: rgba(226,92,146,.12); --kids-line: rgba(194,69,122,.45); }
.day.kids { background: var(--kids-bg); box-shadow: inset 0 0 0 1px var(--kids-line); }
.day.kids .n { color: var(--kids); }
.day.kids.today { box-shadow: inset 0 0 0 1.5px var(--view), 0 0 0 1px var(--kids-line); }
.day.kids.sel:not(.today) { background: color-mix(in srgb, var(--kids) 26%, transparent); }
.mini .d.kids { background: var(--kids-bg); color: var(--kids); }
.tg-day.kids { background: var(--kids-bg); }
.tg-day.kids .dn { color: var(--kids); }
.tg-chip.kids { background: var(--kids-bg); color: var(--kids); border: 1px solid var(--kids-line); }
.ev.kids { background: linear-gradient(90deg, var(--kids-bg), var(--surface-2) 75%); border-color: var(--kids-line); align-items: flex-start; }
.ev.kids-off { background: transparent; border-style: dashed; }
.ev.kids .body, .ev.kids-off .body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.kids-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.kids-acts .btn { min-height: 34px; padding: 0 10px; font-size: 13px; }
.kids-acts .btn.ghost { color: var(--kids); padding: 0 6px; }
@media (min-width: 1024px) { .day.kids { background: color-mix(in srgb, var(--kids) 13%, var(--cell)); } }
/* Eventim */
.lev-eventim {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; color: var(--text);
  border-color: rgba(0,82,155,.6); background: linear-gradient(120deg, rgba(0,82,155,.22), rgba(0,82,155,.06)), var(--surface);
}
.lev-eventim:hover { border-color: #3d8bd6; }
.lev-eventim .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lev-eventim .sub { font-size: 12px; color: var(--muted); }
.lev-eventim-icon { font-size: 26px; line-height: 1; }
.lev-eventim-go { font-size: 24px; color: var(--muted); }
.lev-acts .btn.eventim { border-color: rgba(61,139,214,.6); }
.lev-quick { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -6px -16px 0; padding: 0 16px 2px; }
.lev-quick::-webkit-scrollbar { display: none; }
.lev-quick .lev-chip { display: inline-flex; align-items: center; text-decoration: none; border-color: rgba(61,139,214,.55); color: var(--text); }
.lev-quick .lev-chip:hover { background: rgba(0,82,155,.25); }
@media (min-width: 1024px) { .lev-quick { flex-wrap: wrap; margin: -6px 0 0; padding: 0; } }
.lev-acts .btn.primary-eventim { background: #00529b; border-color: transparent; color: #fff; }
.lev-acts .btn.primary-eventim:hover { background: #0062b8; }
.lev-source { align-self: flex-start; margin-top: 4px; font-size: 12px; color: var(--muted); text-decoration: none; }
.lev-source:hover { color: var(--text); text-decoration: underline; }

/* Brückentage: gelb */
body { --bridge: #f2d28a; --bridge-bg: rgba(242,210,138,.14); --bridge-line: rgba(242,210,138,.55); }
:root[data-theme="light"] body { --bridge: #9a6206; --bridge-bg: rgba(240,181,74,.18); --bridge-line: rgba(168,100,0,.45); }
.day.bridge { background: var(--bridge-bg); box-shadow: inset 0 0 0 1px var(--bridge-line); }
.day.bridge .n { color: var(--bridge); }
.day.bridge.today { box-shadow: inset 0 0 0 1.5px var(--view), 0 0 0 1px var(--bridge-line); }
.mini .d.bridge { background: var(--bridge-bg); color: var(--bridge); }
.tg-day.bridge { background: var(--bridge-bg); }
.tg-day.bridge .dn { color: var(--bridge); }
.tg-chip.bridge { background: var(--bridge-bg); color: var(--bridge); border: 1px solid var(--bridge-line); }
.ev.bridge { background: linear-gradient(90deg, var(--bridge-bg), var(--surface-2) 75%); border-color: var(--bridge-line); }
.ev.bridge .dot { background: var(--bridge); }
@media (min-width: 1024px) {
  .day.bridge { background: color-mix(in srgb, var(--bridge) 12%, var(--cell)); }
  .chips-day span.bridge { background: transparent; color: var(--bridge); padding-left: 0; }
}

/* Neu seit dem letzten Besuch */
.news { padding: 12px 14px; border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%), var(--surface); }
.news-head { display: flex; align-items: center; gap: 10px; }
.news-head strong { flex: 1; font-family: var(--display); font-size: 17px; letter-spacing: .06em; text-transform: uppercase; }
.news-icon { font-size: 20px; line-height: 1; }
.news-seen { min-height: 34px; padding: 0 12px; font-size: 13px; }
.news-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.news-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 4px; border: 0; border-radius: 8px; background: transparent; color: var(--text); text-align: left; }
.news-item:hover { background: rgb(var(--fg-rgb) / .05); }
.news-kind { flex-shrink: 0; font-size: 10px; font-weight: 700; letter-spacing: .1em; padding: 2px 6px; border-radius: 6px; background: var(--accent-fill); color: #fff; }
.news-text { min-width: 0; display: flex; flex-direction: column; }
.news-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-text small { font-size: 12px; color: var(--muted); }
.new-badge { display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 700; letter-spacing: .08em; vertical-align: 2px; background: var(--accent-fill); color: #fff; }
.day.has-new::after {
  content: ""; position: absolute; top: 4px; left: 4px; width: 8px; height: 8px; border-radius: 4px;
  background: var(--accent); box-shadow: 0 0 6px var(--accent), 0 0 12px color-mix(in srgb, var(--accent) 60%, transparent);
  animation: new-pulse 1.8s ease-in-out infinite;
}
@keyframes new-pulse { 50% { opacity: .45; transform: scale(.8); } }

/* ---------- BFC Dynamo home matches (category "fussball", club logo as decoration) ---------- */
body { --bfc: #e0526f; --bfc-bg: rgba(160,29,60,.22); --bfc-line: rgba(224,82,111,.6); }
:root[data-theme="light"] body { --bfc: #8c1631; --bfc-bg: rgba(140,22,49,.1); --bfc-line: rgba(140,22,49,.45); }
.day.bfc { background: var(--bfc-bg); box-shadow: inset 0 0 0 1px var(--bfc-line); }
.day.bfc .n { color: var(--bfc); font-weight: 700; }
.day.bfc.today { box-shadow: inset 0 0 0 1.5px var(--view), 0 0 0 1px var(--bfc-line); }
.day.bfc .deco img { filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.mini .d.bfc { background: var(--bfc-bg); color: var(--bfc); font-weight: 700; }
.chips-day span.bfc { background: var(--bfc-bg); color: var(--bfc); border: 1px solid var(--bfc-line); }
.ev.bfc { background: linear-gradient(90deg, var(--bfc-bg), var(--surface-2) 75%); border-color: var(--bfc-line); }
.ev.bfc .deco-big img { filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); }
.ev.bfc:hover .deco-big { animation: bfc-bounce .6s ease-in-out 1; }
@keyframes bfc-bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-4px) rotate(-6deg); } 70% { transform: translateY(0) rotate(4deg); } }
@media (min-width: 1024px) { .day.bfc { background: color-mix(in srgb, var(--bfc) 16%, var(--cell)); } }
@media (prefers-reduced-motion: reduce) { .ev.bfc:hover .deco-big { animation: none; } }
.day.bfc .deco img { width: 18px; height: 18px; }
@media (min-width: 1024px) { .day.bfc .deco img { width: 24px; height: 24px; } }

/* Kalender-Sync (grün) und Konto (orange): leichter Neon-Rand, dezenter als der Events-Knopf */
.btn.neon-soft {
  position: relative; gap: 10px; border: 1px solid var(--neon); color: var(--text);
  background: linear-gradient(90deg, color-mix(in srgb, var(--neon) 12%, transparent), transparent 70%), rgb(var(--glass) / .85);
  box-shadow: 0 0 4px color-mix(in srgb, var(--neon) 55%, transparent), inset 0 0 6px color-mix(in srgb, var(--neon) 12%, transparent);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  animation: soft-breathe 4.5s ease-in-out infinite;
}
.neon-green { --neon: #22d97a; }
.neon-pink { --neon: #ff4fa3; }
.neon-blue { --neon: #3d8bff; }
:root[data-theme="light"] .neon-pink { --neon: #d6267a; }
:root[data-theme="light"] .neon-blue { --neon: #1f63d6; }
/* Instagram + Facebook nebeneinander über dem Events-Knopf */
.social-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#screen-events .social-links { margin: 4px 0 12px; }
.social-links .btn { justify-content: center; text-decoration: none; padding-inline: 8px; }
.neon-orange { --neon: #ff9a2e; }
:root[data-theme="light"] .neon-green { --neon: #11a85b; }
:root[data-theme="light"] .neon-orange { --neon: #e07a10; }
.side-links .btn.neon-soft {
  background: linear-gradient(90deg, color-mix(in srgb, var(--neon) 12%, transparent), transparent 70%), rgb(var(--glass) / .85);
}
.soft-icon { font-size: 17px; line-height: 1; filter: drop-shadow(0 0 4px var(--neon)); }
.btn.neon-soft:hover, .btn.neon-soft:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--neon) 75%, white);
  box-shadow: 0 0 6px var(--neon), 0 0 16px color-mix(in srgb, var(--neon) 45%, transparent),
    inset 0 0 10px color-mix(in srgb, var(--neon) 20%, transparent);
  animation-play-state: paused;
}
.btn.neon-green:hover .soft-icon { animation: soft-spin .7s ease-in-out; }
.btn.neon-orange:hover .soft-icon { animation: neon-wiggle .6s ease-in-out; }
.btn.neon-soft:active { transform: translateY(0) scale(.98); }
body[data-screen="sync"] .btn.neon-green, body[data-screen="account"] .btn.neon-orange {
  background: color-mix(in srgb, var(--neon) 18%, rgb(var(--glass) / .9));
}
@keyframes soft-breathe {
  0%, 100% { box-shadow: 0 0 4px color-mix(in srgb, var(--neon) 55%, transparent), inset 0 0 6px color-mix(in srgb, var(--neon) 12%, transparent); }
  50% { box-shadow: 0 0 7px color-mix(in srgb, var(--neon) 70%, transparent), inset 0 0 9px color-mix(in srgb, var(--neon) 18%, transparent); }
}
@keyframes soft-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn.neon-soft { animation: none; }
  .btn.neon-soft:hover .soft-icon { animation: none; }
}

/* Wetter im Monat (nächste 7 Tage): Symbol + Höchsttemperatur unten rechts im Tag */
.day .wx { position: absolute; right: 4px; bottom: 3px; display: flex; align-items: center; gap: 2px;
  font-size: 11px; line-height: 1; color: var(--muted); pointer-events: none; }
.day .wx .wx-i { font-size: 12px; }
.day .wx b { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .day .wx b { display: none; } .day .wx { right: 2px; bottom: 2px; } }
@media (min-width: 1024px) { .day .wx { right: 7px; bottom: 6px; font-size: 13px; } .day .wx .wx-i { font-size: 16px; } }

/* Countdown zu Events mit Tickets (unter dem Urlaubs-Countdown) */
.tk-cd {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; cursor: pointer;
  --tk: #c77dff;
  background: linear-gradient(120deg, color-mix(in srgb, var(--tk) 18%, transparent), rgba(255,122,162,.12));
  border: 1px solid color-mix(in srgb, var(--tk) 50%, transparent);
  transition: border-color .15s, transform .15s;
}
:root[data-theme="light"] .tk-cd { --tk: #8a3fd1; }
.tk-cd[hidden] { display: none; }
.tk-cd:hover { border-color: var(--tk); transform: translateY(-1px); }
.tk-cd .big { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: .9; color: var(--tk); font-variant-numeric: tabular-nums; }
.tk-cd .what { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.tk-cd .unit { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--tk); }
.tk-cd .what strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.tk-cd .what span { font-size: 12px; color: var(--muted); }
.tk-cd .tk-more:empty { display: none; }
.tk-cd.today .big { animation: tk-pop 1.6s ease-in-out infinite; }
@keyframes tk-pop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .tk-cd.today .big { animation: none; } }
.check small.muted { color: var(--muted); font-size: 12px; font-weight: 400; }

/* Jahresrückblick: Karte im Dezember/Januar + Sheet mit Kacheln */
.rb-card {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; cursor: pointer;
  text-align: left; color: var(--text); font: inherit;
  background: linear-gradient(120deg, rgba(255,214,102,.2), rgba(232,93,117,.16));
  border: 1px solid rgba(255,214,102,.55);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.rb-card[hidden] { display: none; }
.rb-card:hover { transform: translateY(-1px); border-color: #ffd666; box-shadow: 0 0 14px rgba(255,214,102,.35); }
.rb-card-icon { font-size: 30px; line-height: 1; }
.rb-card-text { display: flex; flex-direction: column; }
.rb-card-text strong { font-family: var(--display); font-size: 18px; letter-spacing: .06em; text-transform: uppercase; }
.rb-card-text small { font-size: 12px; color: var(--muted); }
.rb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .rb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rb-tile {
  display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; min-width: 0;
  background: var(--surface-2); border: 1px solid var(--line);
  animation: rb-in .5s cubic-bezier(.2,.8,.2,1) both;
}
.rb-tile.wide { grid-column: 1 / -1; background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 22%, var(--surface-2)), var(--surface-2)); }
.rb-tile.bfc { background: linear-gradient(120deg, var(--bfc-bg, rgba(160,29,60,.2)), var(--surface-2)); }
.rb-icon { font-size: 22px; line-height: 1; }
.rb-num { font-family: var(--display); font-size: 38px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.rb-tile.wide .rb-num { font-size: 52px; }
.rb-label { font-weight: 600; }
.rb-tile small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.rb-sec { margin-top: 18px; }
.rb-sec h3 { font-family: var(--display); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.rb-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 110px; }
.rb-bar { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.rb-bar i { display: block; width: 100%; height: var(--h); min-height: 3px; border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 45%, transparent));
  animation: rb-grow .8s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; }
.rb-bar small { font-size: 10px; color: var(--muted); }
.rb-people { margin: 0; font-weight: 600; }
.rb-hl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rb-hl li { display: flex; align-items: baseline; gap: 8px; }
.rb-hl b { font-weight: 600; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rb-hl small { color: var(--muted); font-size: 12px; }
@keyframes rb-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes rb-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
/* Wetter in Woche und Tag: unter dem Datum im Kopf */
.tg-wx { font-size: 12px; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tg-wx small { color: var(--muted); font-size: 11px; }
@media (max-width: 640px) { .tg-wx small { display: none; } .tg-wx { font-size: 11px; } }

/* Wetter am Handy: Leiste mit 7 Tagen über dem Monat statt Symbole in den kleinen Tagen */
.wx-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wx-strip[hidden] { display: none; }
.wx-day {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; min-width: 0;
  border-radius: 12px; border: 1px solid var(--line); background: rgb(var(--glass) / .85); color: var(--text);
  font: inherit; cursor: pointer; transition: transform .15s, border-color .15s;
}
.wx-day:active { transform: scale(.96); }
.wx-day.sel { border-color: var(--view); box-shadow: inset 0 0 0 1px var(--view); }
.wx-wd { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.wx-ic { font-size: 22px; line-height: 1.1; }
.wx-day b { font-size: 15px; font-variant-numeric: tabular-nums; line-height: 1; }
.wx-day small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wx-day small.wx-rain { color: #4aa3ff; font-size: 10px; }
@media (max-width: 640px) { .day .wx { display: none; } }
/* PC: die Leiste gibt es auch, etwas größer; das Wetter in den Tagen deutlicher */
@media (min-width: 641px) {
  .wx-strip { gap: 10px; }
  .wx-day { flex-direction: row; justify-content: center; gap: 8px; padding: 10px 8px; flex-wrap: wrap; }
  .wx-day .wx-wd { width: 100%; text-align: center; font-size: 11px; }
  .wx-day .wx-ic { font-size: 28px; }
  .wx-day b { font-size: 18px; }
  .wx-day small { font-size: 12px; }
  .day .wx { color: var(--text); font-weight: 600; text-shadow: 0 1px 2px rgb(var(--veil) / .6); }
}

/* Wetter des gewählten Tages: eigene Zeile unter der Überschrift */
.day-wx { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 6px 0 2px; font-size: 13px; color: var(--muted); }
.day-wx[hidden] { display: none; }
.day-wx b { color: var(--text); font-weight: 600; }
.day-wx .wx-big { font-size: 20px; line-height: 1; }
.day-wx .wx-rain { color: #4aa3ff; }

/* Event-Details (Antippen einer Event-Karte) */
button.lev-name { background: none; border: 0; padding: 0; font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; }
button.lev-name:hover { text-decoration: underline; }
.lev-detail { display: flex; gap: 14px; align-items: flex-start; }
.lev-detail .lev-date.big b { font-size: 34px; }
.lev-detail .lev-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lev-detail-acts { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 10px; }
.lev-detail-acts .btn { width: 100%; justify-content: center; min-height: 46px; }
.lev-detail-acts .btn.tickets { border-color: #c77dff; color: var(--text); background: color-mix(in srgb, #c77dff 16%, transparent); }
.lev-detail-acts .btn.wa { background: #17784b; border-color: transparent; color: #fff; }
.lev-detail .lev-date.big { width: 64px; } .lev-detail .lev-date.big small { white-space: nowrap; }

/* Bild zum Termin */
.ev-image .ev-image-prev { width: 100%; max-height: 240px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.ev-image-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-image-row .btn { cursor: pointer; }
.ev .deco-big img[src^="/media/"] { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.ev:has(.deco-big img[src^="/media/"]) .deco-big { width: 40px; }

/* Wetter-Seite für einen Tag */
.wx-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.wx-hero-ic { font-size: 64px; line-height: 1; }
.wx-hero-t { font-family: var(--display); font-size: 54px; font-weight: 800; line-height: 1; }
.wx-hero-min { font-size: 22px; color: var(--muted); }
.wx-hero-text { font-size: 16px; font-weight: 600; }
.wx-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.wx-fact { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center;
  padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.wx-fact span { grid-row: 1 / 3; font-size: 22px; }
.wx-fact small { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.wx-fact b { font-size: 15px; }
.wx-sec { margin-top: 16px; }
.wx-sec h3 { font-family: var(--display); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.wx-hours { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.wx-h { flex: 0 0 52px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px;
  border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); scroll-snap-align: start; }
.wx-h small { font-size: 11px; color: var(--muted); }
.wx-h-ic { font-size: 20px; line-height: 1.1; }
.wx-h b { font-size: 14px; font-variant-numeric: tabular-nums; }
.wx-h-barbox { height: 46px; width: 8px; display: flex; align-items: flex-end; border-radius: 4px; background: color-mix(in srgb, var(--line) 60%, transparent); }
.wx-h-bar { display: block; width: 100%; height: var(--h, 30%); border-radius: 4px;
  background: linear-gradient(0deg, #4aa3ff, #f2a65a); }
.wx-h-rain { min-height: 13px; }
.wx-h-rain.wet { color: #4aa3ff; font-weight: 600; }
.wx-acts { display: flex; gap: 8px; margin-top: 16px; }
.wx-acts .btn { flex: 1; justify-content: center; min-height: 44px; }
.day-wx { cursor: pointer; }
.day-wx .wx-more { color: var(--accent); font-weight: 600; }
.day-wx:hover .wx-more { text-decoration: underline; }
