/* Bildungsfilme – Kinosaal bei Nacht (dunkel) und Matinee (hell).
   Matches sind Eintrittskarten, Termine sind Abrisse vom Programmheft. */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --night: #17131f;
  --seat: #221c2d;
  --seat-2: #2d2540;
  --line: #40365a;
  --text: #f1eaf6;
  --muted: #a99dba;
  --ticket: #f3c969;
  --ticket-deep: #e3b44a;
  --accent-text: #f3c969;
  --ink: #2a1e05;
  --curtain: #e0566e;
  --ok: #7fd1a8;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --stub: 96px;
  --radius: 14px;
  --font: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
:root[data-theme='light'] {
  --night: #f6f1e9;
  --seat: #fffdf9;
  --seat-2: #efe7da;
  --line: #ddd2c1;
  --text: #241b30;
  --muted: #6c5f7a;
  --ticket: #f3c969;
  --ticket-deep: #e8b94f;
  --accent-text: #8a6210;
  --ink: #2a1e05;
  --curtain: #c23a52;
  --ok: #2f8a5f;
  --shadow: 0 10px 30px rgba(60, 40, 10, 0.12);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--night); color: var(--text); font: 400 1rem/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- Gerüst ---------- */
.shell { max-width: 780px; margin: 0 auto; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(16px + env(safe-area-inset-top)) 0 12px; }
.wordmark { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1; overflow-wrap: anywhere; }
.wordmark i { font-style: normal; color: var(--accent-text); }
.top small, .top .pill { color: var(--muted); font-size: 0.875rem; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; background: var(--seat); white-space: nowrap; }
.pill b { color: var(--text); font-weight: 700; }

.tabs {
  position: fixed; inset: auto 0 0 0; z-index: 20; display: flex; justify-content: center;
  background: color-mix(in srgb, var(--night) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabs button span { display: contents; }
.tabs button { flex: 1; max-width: 170px; background: none; border: 0; padding: 10px 4px 9px; display: grid; justify-items: center; gap: 3px; color: var(--muted); font-size: 0.75rem; font-weight: 600; position: relative; }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs button[aria-current='page'] { color: var(--accent-text); }
.tabs .badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--curtain); color: #fff; font-size: 0.6875rem; line-height: 17px; padding: 0 5px; font-weight: 700; }

.subnav { position: sticky; top: 0; z-index: 10; padding: 8px 0 10px; margin: 0 -16px 4px; padding-inline: 16px; background: color-mix(in srgb, var(--night) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.view > h2, .section-head h2, .view-head h2 { font-size: 1.3125rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.section-head .count { color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.hint { color: var(--muted); font-size: 0.9375rem; max-width: 62ch; }
.stack { display: grid; gap: 12px; }
@media (min-width: 720px) { .stack.two { grid-template-columns: 1fr 1fr; align-items: start; } }

/* ---------- Bedienelemente ---------- */
.btn { border: 1px solid transparent; border-radius: 999px; padding: 9px 16px; min-height: 40px; font-weight: 650; font-size: 0.9375rem; line-height: 1.2; background: var(--ticket); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.quiet { background: transparent; color: var(--muted); padding-inline: 8px; }
.btn.danger { background: transparent; color: var(--curtain); border-color: color-mix(in srgb, var(--curtain) 45%, transparent); }
.btn.ok { background: var(--ok); color: #08251a; }
.btn.big { width: 100%; padding: 16px; font-size: 1.125rem; border-radius: var(--radius); }
.btn.small { min-height: 32px; padding: 5px 11px; font-size: 0.8125rem; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--seat); display: inline-grid; place-items: center; color: var(--text); font-size: 1.1rem; flex: none; }

.field { display: grid; gap: 6px; font-size: 0.875rem; color: var(--muted); font-weight: 600; min-width: 0; }
.field input, .field select, .field textarea, .input {
  background: var(--seat); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; min-height: 44px; width: 100%; color: var(--text); font-weight: 400; font-size: 1rem; min-width: 0;
}
.field textarea { min-height: 84px; resize: vertical; }
.panel .field input, .panel .field select, .panel .field textarea, .panel .input { background: var(--night); }
.field input::placeholder, .input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
input[type='date'], input[type='time'] { -webkit-appearance: none; appearance: none; }

.seg { display: inline-flex; background: var(--seat); border: 1px solid var(--line); border-radius: 999px; padding: 3px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: none; border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 0.875rem; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed='true'] { background: var(--seat-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 0.875rem; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.chip img { width: 20px; height: 20px; border-radius: 5px; }
.chip[aria-pressed='true'] { background: var(--ticket); border-color: var(--ticket); color: var(--ink); font-weight: 650; }
.chip .dot { width: 10px; height: 10px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--ticket)); display: inline-block; flex: none; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch input { width: 22px; height: 22px; accent-color: var(--ticket); flex: none; }
.switch-text { display: grid; gap: 1px; }
.switch-text b { font-weight: 600; }
.switch-text small { color: var(--muted); font-size: 0.8125rem; line-height: 1.35; }

/* ---------- Filter ---------- */
.filters { background: var(--seat); border: 1px solid var(--line); border-radius: var(--radius); margin: 10px 0 4px; }
.filters > summary { list-style: none; cursor: pointer; padding: 12px 14px; font-weight: 650; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.filters > summary::-webkit-details-marker { display: none; }
.filters > summary::after { content: ''; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); }
.filters[open] > summary::after { transform: rotate(-135deg) translateY(-3px); }
.filters .active { color: var(--accent-text); font-weight: 600; font-size: 0.875rem; margin-left: auto; }
.filters .body { padding: 14px 14px 16px; display: grid; gap: 16px; border-top: 1px solid var(--line); }
.filters .group > span { display: block; font-size: 0.875rem; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.filters .input, .filters select { background: var(--night); }

/* ---------- Filmkarten ---------- */
.card { display: grid; grid-template-columns: var(--stub) 1fr; background: var(--seat); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.card.compact { --stub: 64px; }
.poster { background: var(--seat-2); aspect-ratio: 2 / 3; align-self: start; width: 100%; position: relative; }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.poster .blank { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center; font-size: 0.75rem; font-weight: 700; line-height: 1.15; color: var(--muted); overflow-wrap: anywhere; hyphens: auto; }
.card .body { padding: 12px 14px 14px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.card h3 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.meta .kind { color: var(--text); font-weight: 600; }
.where { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.where img { width: 28px; height: 28px; border-radius: 7px; }
.where .name { font-size: 0.8125rem; border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; }
.where .none { font-size: 0.8125rem; color: var(--muted); }
.people { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.875rem; color: var(--muted); }
.people b { color: var(--text); font-weight: 600; }
.note { font-size: 0.875rem; color: var(--muted); }
.plot { font-size: 0.875rem; color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; cursor: pointer; }
.plot.open { -webkit-line-clamp: unset; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.actions .btn { min-height: 36px; padding: 7px 13px; font-size: 0.875rem; }
.stars { display: inline-flex; }
.stars button { background: none; border: 0; padding: 2px 3px; font-size: 1.5rem; line-height: 1; color: var(--line); }
.stars button.on { color: var(--ticket); }
.stars.big button { font-size: 2.2rem; padding: 2px 5px; }
.stars-static { color: var(--ticket-deep); letter-spacing: 1px; }

/* Match: die Eintrittskarte */
.card.ticket {
  background: var(--ticket); color: var(--ink); border: 0;
  -webkit-mask: radial-gradient(circle 9px at var(--stub) 0, #0000 97%, #000), radial-gradient(circle 9px at var(--stub) 100%, #0000 97%, #000);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(circle 9px at var(--stub) 0, #0000 97%, #000) intersect, radial-gradient(circle 9px at var(--stub) 100%, #0000 97%, #000);
}
.ticket .poster { height: 100%; aspect-ratio: auto; min-height: 144px; background: var(--ticket-deep); }
.card.compact.ticket .poster { min-height: 96px; }
.ticket .poster .blank { color: var(--ink); }
.ticket .body { border-left: 2px dashed color-mix(in srgb, var(--ink) 35%, transparent); }
.ticket .admit { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.01em; }
.ticket .meta, .ticket .people, .ticket .plot, .ticket .note, .ticket .where .none { color: color-mix(in srgb, var(--ink) 78%, transparent); }
.ticket .meta .kind, .ticket .people b { color: var(--ink); }
.ticket .where .name { border-color: color-mix(in srgb, var(--ink) 40%, transparent); }
.ticket .btn { background: var(--ink); color: var(--ticket); }
.ticket .btn.ghost { background: transparent; color: var(--ink); border-color: color-mix(in srgb, var(--ink) 45%, transparent); }
.ticket .btn.quiet, .ticket .btn.danger { background: transparent; color: color-mix(in srgb, var(--ink) 75%, transparent); border-color: transparent; }
.ticket .stars button { color: color-mix(in srgb, var(--ink) 30%, transparent); }
.ticket .stars button.on { color: var(--ink); }
.ticket :focus-visible { outline-color: var(--ink); }

.empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 22px 18px; color: var(--muted); display: grid; gap: 12px; justify-items: start; }
.empty strong { color: var(--text); font-size: 1.0625rem; }
.reel { min-height: 4.5rem; display: grid; place-items: center; text-align: center; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--accent-text); padding: 18px 8px; }
.reel:empty { display: none; }

/* ---------- Start ---------- */
.hello { display: grid; gap: 2px; margin: 4px 0 14px; }
.hello h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
.hello span { color: var(--muted); }
.hero {
  position: relative; border-radius: 18px; padding: 18px 18px 16px; background: var(--ticket); color: var(--ink); display: grid; gap: 10px; cursor: pointer;
  -webkit-mask: radial-gradient(circle 11px at 0 62%, #0000 97%, #000), radial-gradient(circle 11px at 100% 62%, #0000 97%, #000);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(circle 11px at 0 62%, #0000 97%, #000) intersect, radial-gradient(circle 11px at 100% 62%, #0000 97%, #000);
}
.hero .label { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.75; }
.hero .count { font-size: clamp(2.1rem, 10vw, 3rem); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.hero .what { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; }
.hero .meta { color: color-mix(in srgb, var(--ink) 78%, transparent); }
.hero .perf { border-top: 2px dashed color-mix(in srgb, var(--ink) 35%, transparent); margin: 2px -18px 0; padding: 10px 18px 0; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 0.875rem; }
.hero.empty-hero { background: var(--seat); color: var(--text); border: 1px dashed var(--line); -webkit-mask: none; mask: none; cursor: default; }
.spontan-btn { width: 100%; border: 0; border-radius: var(--radius); padding: 16px 18px; background: var(--seat-2); color: var(--text); display: flex; align-items: center; gap: 14px; text-align: left; }
.spontan-btn .bolt { width: 44px; height: 44px; border-radius: 50%; background: var(--ticket); color: var(--ink); display: grid; place-items: center; font-size: 1.35rem; flex: none; }
.spontan-btn b { display: block; font-size: 1.0625rem; }
.spontan-btn small { color: var(--muted); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--seat); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 4px; text-align: left; color: var(--text); }
.tile b { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 0.875rem; }
.progress { height: 6px; border-radius: 3px; background: var(--seat-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--ok); border-radius: 3px; }

/* ---------- Kalender ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 10px; }
.cal-head h2 { font-size: 1.25rem; font-weight: 750; letter-spacing: -0.02em; text-transform: capitalize; }
.cal-head .row { flex-wrap: nowrap; }
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.month .wd { text-align: center; font-size: 0.75rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.day {
  min-height: 58px; border-radius: 10px; background: var(--seat); border: 1px solid transparent; padding: 5px 4px 6px; display: grid; grid-template-rows: auto 1fr; justify-items: center; gap: 3px; text-align: center; color: var(--text); font-variant-numeric: tabular-nums;
}
.day .n { font-size: 0.875rem; font-weight: 650; width: 26px; height: 26px; line-height: 26px; border-radius: 50%; }
.day.out { opacity: 0.38; }
.day.weekend { background: color-mix(in srgb, var(--seat) 70%, var(--seat-2)); }
.day.today .n { background: var(--ticket); color: var(--ink); }
.day[aria-pressed='true'] { border-color: var(--accent-text); }
.day .marks { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; align-content: start; max-width: 100%; }
.day .marks .dot { width: 7px; height: 7px; }
.day .marks .dot.open { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.day .marks .dot.block { border-radius: 2px; background: var(--muted); }
.day .more { font-size: 0.625rem; color: var(--muted); line-height: 1; }

.agenda { display: grid; gap: 8px; }
.agenda-day { display: grid; gap: 8px; }
.agenda-day > h3 { font-size: 0.875rem; font-weight: 700; color: var(--muted); letter-spacing: 0.02em; margin-top: 12px; display: flex; gap: 8px; align-items: baseline; }
.agenda-day > h3 .today-tag { color: var(--accent-text); }
.stub {
  --c: var(--ticket);
  display: grid; grid-template-columns: 64px 1fr auto; align-items: stretch; background: var(--seat); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: var(--text); text-align: left; width: 100%; padding: 0; position: relative;
}
.stub .time { display: grid; align-content: center; justify-items: center; padding: 10px 4px; border-right: 2px dashed var(--line); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.9375rem; line-height: 1.15; background: color-mix(in srgb, var(--c) 16%, transparent); }
.stub .time small { font-weight: 500; color: var(--muted); font-size: 0.75rem; }
.stub .main { padding: 10px 12px; display: grid; gap: 3px; min-width: 0; }
.stub .main b { font-weight: 700; overflow-wrap: anywhere; line-height: 1.25; }
.stub .main .meta { font-size: 0.8125rem; }
.stub .side { display: flex; align-items: center; padding-right: 10px; gap: 4px; }
.stub.pending { border-style: dashed; }
.stub.pending .time { background: transparent; }
.stub.cancelled, .stub.declined, .stub.expired, .stub.past { opacity: 0.55; }
.stub.cancelled .main b { text-decoration: line-through; }
.stub.blocker .time { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--muted) 18%, transparent) 0 6px, transparent 6px 12px); }
.faces { display: inline-flex; }
.face { width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: #1b1424; font-size: 0.6875rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--seat); margin-left: -6px; }
.face:first-child { margin-left: 0; }
.face.no { opacity: 0.35; }
.face.wait { background: var(--seat-2); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--c); }

.tag { font-size: 0.75rem; font-weight: 700; border-radius: 6px; padding: 2px 7px; background: var(--seat-2); color: var(--text); white-space: nowrap; }
.tag.gold { background: var(--ticket); color: var(--ink); }
.tag.red { background: color-mix(in srgb, var(--curtain) 20%, transparent); color: var(--curtain); }
.tag.green { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.tag.open { background: transparent; box-shadow: inset 0 0 0 1px var(--accent-text); color: var(--accent-text); }

.fab { position: fixed; right: max(16px, calc(50vw - 374px)); bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 19; width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--ticket); color: var(--ink); font-size: 2rem; line-height: 1; box-shadow: var(--shadow); display: grid; place-items: center; }

.week { display: grid; gap: 6px; }
.week-day { display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: start; border-top: 1px solid var(--line); padding-top: 8px; }
.week-day .d { font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.week-day .d small { display: block; color: var(--muted); font-weight: 500; font-size: 0.75rem; }
.week-day.today .d { color: var(--accent-text); }
.week-day .items { display: grid; gap: 6px; min-height: 26px; }
.add-here { border: 1px dashed var(--line); background: none; color: var(--muted); border-radius: 10px; padding: 4px 10px; font-size: 0.8125rem; justify-self: start; }

.busybar { position: relative; height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--ok) 22%, transparent); overflow: hidden; }
.busybar i { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--curtain) 55%, transparent); }
.free-day { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.free-day:first-child { border-top: 0; }
.free-day h4 { margin: 0; font-size: 0.9375rem; display: flex; justify-content: space-between; gap: 8px; }
.free-day h4 small { color: var(--muted); font-weight: 500; }
.scale { display: flex; justify-content: space-between; font-size: 0.6875rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Termin-Ansicht */
.back { background: none; border: 0; color: var(--muted); padding: 6px 0; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.ev-head { display: grid; gap: 8px; margin: 6px 0 14px; }
.ev-head h2 { font-size: 1.625rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; overflow-wrap: anywhere; }
.facts { display: grid; gap: 10px; }
.fact { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.fact > span:first-child { font-size: 1.1rem; line-height: 1.4; text-align: center; }
.fact b { font-weight: 650; }
.fact small { display: block; color: var(--muted); }
.who-list { display: grid; gap: 8px; }
.who { display: flex; align-items: center; gap: 10px; }
.who .face { margin: 0; width: 30px; height: 30px; font-size: 0.8125rem; }
.who b { font-weight: 650; }
.who .tag { margin-left: auto; }
.option { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--night); }
.option.on { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.option .spread b { font-weight: 700; }
.votes { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.8125rem; color: var(--muted); align-items: center; }
.check { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.check:first-of-type { border-top: 0; }
.check input[type='checkbox'] { width: 22px; height: 22px; accent-color: var(--ok); flex: none; }
.check .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.check.done .t { text-decoration: line-through; color: var(--muted); }
.check select { width: auto; min-height: 34px; padding: 4px 8px; font-size: 0.8125rem; border-radius: 8px; background: var(--night); border: 1px solid var(--line); }
.comment { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); }
.comment:first-of-type { border-top: 0; }
.comment .spread small { color: var(--muted); }
.comment p { overflow-wrap: anywhere; white-space: pre-wrap; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; }
.weather { display: flex; align-items: center; gap: 10px; }
.weather .wicon { font-size: 1.8rem; line-height: 1; }
.film-pick { display: grid; gap: 10px; }
.film-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
.film-row:first-child { border-top: 0; padding-top: 0; }
.film-row .p { width: 46px; aspect-ratio: 2/3; border-radius: 6px; overflow: hidden; background: var(--seat-2); }
.film-row .p img { width: 100%; height: 100%; object-fit: cover; }
.film-row b { display: block; line-height: 1.2; }
.film-row small { color: var(--muted); }
.import-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.import-btns .btn { min-height: 46px; }

/* Editor */
.editor { display: grid; gap: 16px; }
.option-edit { display: grid; gap: 8px; background: var(--seat); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.option-edit .spread small { color: var(--muted); font-weight: 650; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; background: var(--c); }
.swatch[aria-pressed='true'] { border-color: var(--text); }
.results { display: grid; gap: 4px; }
.results button { text-align: left; background: var(--night); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; color: var(--text); }
.results small { color: var(--muted); }

/* ---------- Profil, Admin, Anleitungen ---------- */
.panel { background: var(--seat); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; min-width: 0; }
.panel h3 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; }
.panel form { display: grid; gap: 12px; }
.subhead { font-size: 0.9375rem; font-weight: 700; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.stat { background: var(--seat-2); border-radius: 10px; padding: 10px 12px; }
.stat b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.8125rem; color: var(--muted); }
.person { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 8px; }
.person:first-of-type { border-top: 0; padding-top: 0; }
.person .who-line { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.person .who-line b { font-size: 1.0625rem; }
.person .btn, .invite .btn { min-height: 34px; padding: 6px 12px; font-size: 0.8125rem; }
.invite { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
.invite code { font: 700 1.0625rem/1 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: 0.08em; }
.log { font-size: 0.8125rem; color: var(--muted); display: grid; gap: 4px; max-height: 260px; overflow: auto; font-variant-numeric: tabular-nums; }
.log div { display: flex; gap: 10px; flex-wrap: wrap; }
.credits { font-size: 0.8125rem; color: var(--muted); max-width: 62ch; }
.copy { display: flex; gap: 8px; align-items: center; }
.copy code { flex: 1; min-width: 0; font: 500 0.8125rem/1.3 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; background: var(--night); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; overflow-wrap: anywhere; }
.toggles { display: flex; flex-wrap: wrap; gap: 6px; }

.guide { background: var(--seat); border: 1px solid var(--line); border-radius: var(--radius); }
.guide > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; }
.guide > summary::-webkit-details-marker { display: none; }
.guide .num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--seat-2); font-weight: 800; font-size: 0.875rem; }
.guide.done .num { background: var(--ok); color: #08251a; }
.guide > summary b { font-weight: 700; }
.guide > summary small { display: block; color: var(--muted); font-size: 0.8125rem; }
.guide .body { padding: 0 16px 16px; display: grid; gap: 12px; }
.steps { margin: 0; padding-left: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 24px 1fr; gap: 8px; }
.steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 0.75rem; font-weight: 700; color: var(--muted); margin-top: 1px; }
.path { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.path span { background: var(--seat-2); border-radius: 6px; padding: 1px 7px; font-size: 0.875rem; font-weight: 600; }
.path span + span::before { content: '›'; margin-right: 6px; color: var(--muted); }
.callout { border-left: 3px solid var(--ticket); background: color-mix(in srgb, var(--ticket) 10%, transparent); padding: 10px 12px; border-radius: 0 10px 10px 0; font-size: 0.9375rem; }
.callout.warn { border-color: var(--curtain); background: color-mix(in srgb, var(--curtain) 10%, transparent); }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100dvh; display: grid; align-content: center; gap: 22px; max-width: 420px; margin: 0 auto; padding: 32px 20px; }
.auth .wordmark { font-size: clamp(2.25rem, 12vw, 3rem); }
.auth form { display: grid; gap: 14px; }

dialog { background: var(--seat); color: var(--text); border: 1px solid var(--line); border-radius: 18px; padding: 20px; width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); overflow: auto; }
dialog::backdrop { background: rgba(10, 6, 16, 0.65); }
dialog form, dialog .sheet { display: grid; gap: 14px; }
dialog h3 { font-size: 1.1875rem; font-weight: 700; }
dialog .field input, dialog .field select, dialog .field textarea, dialog .input { background: var(--night); }

#toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); background: var(--text); color: var(--night); font-weight: 600; font-size: 0.9375rem; padding: 10px 16px; border-radius: 12px; max-width: min(92vw, 520px); z-index: 60; opacity: 0; pointer-events: none; transition: opacity 0.18s, transform 0.18s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--curtain); color: #fff; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 380px) { .grid-3 { grid-template-columns: 1fr 1fr; } .grid-3 > :first-child { grid-column: 1 / -1; } .day { min-height: 50px; } }

/* ---------- Statistik ---------- */
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; align-items: end; height: 150px; }
.bar { display: grid; grid-template-rows: auto 1fr auto; height: 100%; align-items: end; justify-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.bar i { display: block; width: 70%; max-width: 34px; background: var(--ticket); border-radius: 6px 6px 2px 2px; align-self: end; }
.bar .v { font-size: 0.75rem; font-weight: 700; color: var(--muted); min-height: 1em; }
.bar .l { font-size: 0.6875rem; color: var(--muted); }
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: 0.9375rem; }
.hbar .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 10px; border-radius: 5px; background: var(--seat-2); overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--ok); border-radius: 5px; }
.hbar b { font-variant-numeric: tabular-nums; }
.grid-2.stretch { align-items: stretch; }
@media (max-width: 640px) { .grid-2.stretch { grid-template-columns: 1fr; } }

/* ---------- Monatszellen: Beschriftung nur auf großen Bildschirmen ---------- */
.day .labels { display: none; }
.lbl { display: block; font-size: 0.75rem; line-height: 1.25; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--c); padding-left: 5px; border-radius: 2px; }
.lbl.open { border-left-style: dashed; color: var(--muted); }

/* ---------- Adminbereich ---------- */
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; position: sticky; top: 0; z-index: 9; background: var(--night); padding-top: 6px; margin: 0 -16px; padding-inline: 16px; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs button { flex: none; border: 1px solid var(--line); background: var(--seat); color: var(--muted); border-radius: 999px; padding: 7px 13px; font-weight: 600; font-size: 0.875rem; white-space: nowrap; }
.admin-tabs button[aria-current='page'] { background: var(--ticket); border-color: var(--ticket); color: var(--ink); }
.only-desktop { display: none !important; }
.side-brand { display: none; }
label.chip input { width: 16px; height: 16px; accent-color: var(--ok); margin: 0; }

/* ---------- Desktop: Seitenleiste, breiterer Inhalt, beschriftete Monatsansicht ---------- */
@media (min-width: 960px) {
  .layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100dvh; }
  .tabs { position: sticky; top: 0; inset: auto; height: 100dvh; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 22px 14px; border-top: 0; border-right: 1px solid var(--line); background: var(--seat); backdrop-filter: none; }
  .tabs .side-brand { display: block; padding: 4px 10px 22px; }
  .tabs .side-brand .wordmark { font-size: 1.5rem; }
  .tabs button { flex: none; max-width: none; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-size: 0.9375rem; justify-items: start; }
  .tabs button[aria-current='page'] { background: var(--seat-2); }
  .tabs .badge { position: static; margin-left: auto; }
  .only-desktop { display: flex !important; }
  .shell { max-width: 1040px; width: 100%; padding: 0 36px 48px; margin: 0; }
  .top .wordmark { visibility: hidden; }
  .top { min-height: 64px; }
  .fab { right: 36px; bottom: 32px; }
  #toast { bottom: 32px; }
  .subnav { margin: 0 -36px 4px; padding-inline: 36px; }
  .month-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
  .day { min-height: 104px; justify-items: stretch; text-align: left; padding: 6px 7px; }
  .day .n { justify-self: start; }
  .day .marks { display: none; }
  .day .labels { display: grid; gap: 3px; align-content: start; min-width: 0; }
  .day-panel { position: sticky; top: 70px; }
  .start { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .start > .hello, .start > .callout, .start > .hero, .start > .section-head, .start > .tiles { grid-column: 1 / -1; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .admin { grid-template-columns: 200px minmax(0, 1fr); align-items: start; column-gap: 24px; }
  .admin > .view-head { grid-column: 1 / -1; }
  .admin-tabs { flex-direction: column; position: sticky; top: 16px; margin: 0; padding: 0; background: none; overflow: visible; }
  .admin-tabs button { text-align: left; border-radius: 10px; }
  .admin-body { min-width: 0; }
  dialog { width: min(520px, calc(100vw - 48px)); }
}
@media (min-width: 1280px) {
  .shell { max-width: 1180px; }
}
.panel form.inline-form, dialog form.inline-form { display: flex; }
@media (max-width: 520px) { .grid-3 { grid-template-columns: 1fr 1fr; } .grid-3 > :first-child { grid-column: 1 / -1; } }
@media (min-width: 960px) { .layout { background: linear-gradient(to right, var(--seat) 232px, transparent 232px); } }
.steps li { display: block; position: relative; padding-left: 32px; }
.steps li::before { position: absolute; left: 0; top: 1px; }
@media (min-width: 960px) { main > .view.stack:not(.start):not(.admin), main > .view:has(.editor) { max-width: 820px; } }

.hero .tag.open-hero { background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink); flex-basis: 100%; justify-self: start; width: fit-content; white-space: normal; }

/* ---------- Kosten ---------- */
.plus { color: var(--ok); font-weight: 700; }
.minus { color: var(--curtain); font-weight: 700; }
.note.bad, small.bad { color: var(--curtain); font-weight: 600; }
.cost-card { display: grid; gap: 8px; text-align: left; background: var(--seat); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: var(--text); width: 100%; }
.cost-card b { font-size: 1.0625rem; overflow-wrap: anywhere; }
.cost-card .amount { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.budget { display: grid; gap: 4px; }
.progress.warn i { background: var(--ticket-deep); }
.progress.over i { background: var(--curtain); }
.expense { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; background: var(--seat); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-align: left; color: var(--text); width: 100%; }
.expense .cat { width: 38px; height: 38px; border-radius: 10px; background: var(--seat-2); display: grid; place-items: center; font-size: 1.2rem; }
.expense .main { display: grid; gap: 2px; min-width: 0; }
.expense .main b { overflow-wrap: anywhere; }
.expense .side { display: grid; justify-items: end; gap: 2px; font-variant-numeric: tabular-nums; }
.share-list { display: grid; gap: 6px; }
.share-row { display: grid; grid-template-columns: 30px 1fr auto 92px; gap: 10px; align-items: center; }
.share-row .face { margin: 0; width: 28px; height: 28px; }
.share-row .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-row .share-input { width: 92px; min-height: 38px; padding: 6px 8px; text-align: right; }
.share-row input[type='checkbox'] { width: 22px; height: 22px; accent-color: var(--ok); justify-self: end; }
.share-row .owed { text-align: right; font-variant-numeric: tabular-nums; }
.transfer { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 10px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
.transfer:first-of-type { border-top: 0; padding-top: 0; }
.transfer .face { margin: 0; }
.transfer > .btn { grid-column: 2 / -1; justify-self: start; }
.transfer b { font-variant-numeric: tabular-nums; }
.balance-table { display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.bt-head, .bt-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 8px; align-items: center; }
.bt-head { font-size: 0.8125rem; color: var(--muted); font-weight: 600; }
.bt-row { border-top: 1px solid var(--line); padding-top: 6px; }
.bt-row .face { margin: 0; width: 24px; height: 24px; }
.inline-form .prefix { align-self: center; color: var(--muted); font-weight: 600; }
.btn.active { border-color: var(--accent-text); color: var(--accent-text); }
.grid-3.answers { grid-template-columns: 1fr 1fr 1fr; }
.grid-3.answers .btn.big { padding: 14px 6px; font-size: 1rem; }
@media (max-width: 520px) { .grid-3.answers { grid-template-columns: 1fr 1fr 1fr; } .grid-3.answers > :first-child { grid-column: auto; } }
.face.maybe { box-shadow: inset 0 0 0 2px var(--seat); opacity: 0.75; border-style: dashed; }
.busybar i.unsure { background: color-mix(in srgb, var(--ticket-deep) 55%, transparent); }

/* ---------- Umfragen ---------- */
.poll-options { display: grid; gap: 6px; }
.poll-option { position: relative; display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; text-align: left; background: var(--night); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); overflow: hidden; min-height: 44px; }
.poll-option .fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--ticket) 22%, transparent); z-index: 0; }
.poll-option > span { position: relative; z-index: 1; }
.poll-option.on { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.poll-option.lead .txt { font-weight: 700; }
.poll-option .check-mark { color: var(--ok); font-weight: 800; }
.poll-option .cnt { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; }
.poll-option[disabled] { cursor: default; }

/* ---------- Admin: QR, Fehler ---------- */
.qr { display: grid; place-items: center; background: #fff; border-radius: 14px; padding: 8px; }
.qr svg { width: min(100%, 300px); height: auto; }
.errors { display: grid; gap: 6px; }
.error-row { border-top: 1px solid var(--line); padding-top: 6px; }
.error-row summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.875rem; }
.error-row pre { white-space: pre-wrap; font-size: 0.75rem; color: var(--muted); background: var(--night); padding: 8px; border-radius: 8px; overflow: auto; max-height: 200px; }
.stat b.plus, .stat b.minus { font-weight: 800; }

/* ---------- Version 3.4 ---------- */

/* „Wer hat Zeit?“: Raster aus Tagen (Spalten) und Stunden (Zeilen). Je kräftiger grün, desto mehr Leute frei. */
.heat-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px 4px; }
.heat { display: grid; grid-template-columns: 30px repeat(var(--cols), minmax(36px, 1fr)); gap: 3px; min-width: calc(30px + var(--cols) * 39px); }
.heat-corner { min-height: 1px; }
.heat-day { display: grid; place-items: center; padding: 4px 0 6px; font: inherit; font-size: 0.75rem; line-height: 1.15; color: var(--muted); background: none; border: 0; border-radius: 8px; }
.heat-day b { color: var(--text); font-size: 0.8125rem; }
button.heat-day { cursor: pointer; }
button.heat-day:hover { background: var(--seat-2); }
.heat-day.today b { color: var(--accent-text); }
.heat-hour { font-size: 0.6875rem; color: var(--muted); text-align: right; padding-right: 4px; align-self: center; font-variant-numeric: tabular-nums; }
.heat-cell { display: grid; place-items: center; height: 26px; border-radius: 6px; border: 0; padding: 0; font: inherit; font-size: 0.6875rem; font-weight: 700; color: #08251a; background: color-mix(in srgb, var(--curtain) 14%, var(--seat-2)); cursor: pointer; position: relative; transition: transform 0.08s; }
button.heat-cell:active { transform: scale(0.94); }
.heat-cell.none { background: color-mix(in srgb, var(--curtain) 16%, var(--seat-2)); }
.heat-cell.lvl { background: color-mix(in srgb, var(--ok) calc(var(--lvl) * 75%), var(--seat-2)); }
.heat-cell.all { background: var(--ok); }
.heat-cell.maybe::after { content: ''; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--ticket); }
.heat-cell.past { background: repeating-linear-gradient(135deg, var(--seat-2) 0 4px, transparent 4px 8px); opacity: 0.5; cursor: default; }
.heat-cell.loading { background: var(--seat-2); animation: pulse 1.2s ease-in-out infinite; }
.heat-cell.pick { background: var(--seat-2); box-shadow: inset 0 0 0 1px var(--line); color: #08251a; }
.heat-cell.pick.all { background: var(--ok); box-shadow: none; }
@keyframes pulse { 50% { opacity: 0.5; } }
.heat-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.8125rem; color: var(--muted); }
.heat-legend span { display: inline-flex; align-items: center; gap: 6px; }
.heat-legend .heat-cell { width: 18px; height: 14px; display: inline-block; cursor: default; }
.section-head .btn.small { margin-left: auto; }

/* Fahrgemeinschaft */
.ride { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.ride:first-of-type { border-top: 0; }
.ride.mine b { color: var(--accent-text); }
.seats { display: flex; gap: 6px; flex-wrap: wrap; }
.seats .face { margin-left: 0; width: 28px; height: 28px; }
.seat { width: 28px; height: 28px; border-radius: 50%; border: 2px dashed var(--line); }
select.input.small { padding: 6px 10px; font-size: 0.8125rem; width: auto; }

/* Offline */
.offline-bar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; font-size: 0.875rem; background: color-mix(in srgb, var(--ticket) 22%, var(--seat)); border: 1px solid color-mix(in srgb, var(--ticket) 45%, transparent); }
.offline-bar.syncing { background: color-mix(in srgb, var(--ok) 18%, var(--seat)); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.offline-bar .btn { margin-left: auto; }

/* Gesamtsaldo, Dauerlisten */
.panel.total { border-color: color-mix(in srgb, var(--ticket) 40%, var(--line)); }
.total-head { display: grid; gap: 2px; }
.total-head b { font-size: 1.75rem; letter-spacing: -0.02em; }
.panel.recurring.paused { opacity: 0.65; }

/* Anmelden: „oder“ zwischen Passwort und Passkey */
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.8125rem; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.device { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.device:first-child { border-top: 0; }
/* Grid-Kinder dürfen schmaler werden als ihr Inhalt, sonst schieben lange Reiterleisten die Seite breiter als das Handy. */
.stack > *, .view > *, main > * { min-width: 0; }
.subnav > .seg { min-width: 0; }

/* ---------- Version 3.5: Kacheln und Unterseiten ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
@media (max-width: 380px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { display: grid; align-content: start; gap: 4px; min-height: 96px; padding: 12px 14px; text-align: left; font: inherit; color: var(--text); background: var(--seat); border: 1px solid var(--line); border-radius: 16px; cursor: pointer; transition: transform 0.08s, border-color 0.15s; }
.tile:hover { border-color: color-mix(in srgb, var(--ticket) 50%, var(--line)); }
.tile:active { transform: scale(0.98); }
.tile.wide { grid-column: 1 / -1; min-height: 0; }
.tile.hot { border-color: color-mix(in srgb, var(--ticket) 70%, var(--line)); background: color-mix(in srgb, var(--ticket) 10%, var(--seat)); }
.tile-top { display: flex; justify-content: space-between; align-items: center; }
.tile-icon { font-size: 1.375rem; line-height: 1; }
.tile-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; font-size: 0.75rem; font-weight: 700; background: var(--ticket); color: #1d1726; }
.tile b { font-size: 0.9375rem; }
.tile small { color: var(--muted); font-size: 0.8125rem; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ev-lines { display: grid; gap: 4px; font-size: 0.9375rem; }
.faces-row { display: flex; gap: 0; padding: 4px 0; background: none; border: 0; cursor: pointer; justify-self: start; }
.faces-row .face { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg); }
.faces-row .face:first-child { margin-left: 0; }
.sub-head { display: grid; gap: 2px; }
.sub-head h2 { margin: 0; }
.warn-text { color: var(--curtain); font-weight: 650; }
/* Auf Unterseiten steht die Überschrift schon oben: die des Kastens ausblenden. */
.sub-view > .panel:first-of-type > h3:first-child,
.sub-view > .panel:first-of-type > .spread:first-child > h3 { display: none; }
.sub-view > .panel:first-of-type > .spread:first-child { justify-content: flex-end; }
/* Startseite */
.todos { display: grid; }
.todo, .upcoming { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0; text-align: left; font: inherit; color: var(--text); background: none; border: 0; border-top: 1px solid var(--line); cursor: pointer; }
.todos .todo:first-child, .panel > .upcoming:nth-child(2) { border-top: 0; }
.todo-icon { font-size: 1.25rem; width: 28px; text-align: center; flex: none; }
.todo-text { display: grid; gap: 1px; flex: 1; min-width: 0; }
.todo-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-text small { color: var(--muted); font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-go { color: var(--muted); font-size: 1.25rem; }
.todo.hot b { color: var(--accent-text); }
.date-chip { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--seat-2); line-height: 1; }
.date-chip b { font-size: 1.0625rem; }
.date-chip small { font-size: 0.6875rem; color: var(--muted); text-transform: uppercase; }
.quick-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.quick-row .spontan-btn { text-align: left; justify-content: flex-start; }
.quick-row .spontan-btn { margin: 0; }
.spontan-btn.alt .bolt { background: color-mix(in srgb, var(--ok) 35%, var(--seat-2)); }
