/* Pizza-Abend – Gastseite (Holzofen). Farben & Schriften kommen aus /static/shared/tokens.css. */

:root {
  /* Farben & Schriften: ../shared/tokens.css */
  --hand-style: normal;
  --display-weight: 400;

  --r: 14px;
  --r-lg: 22px;
  --r-pill: 999px;
  --border-w: 2px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .35);
  --shadow-pz: drop-shadow(0 6px 8px rgba(0, 0, 0, .5));
  --focus: 0 0 0 3px var(--bg), 0 0 0 6px var(--accent-2);
  --grain: .09;
  --bg-image: radial-gradient(120% 60% at 50% -10%, #2a1a13 0%, var(--bg) 60%);
  --bar-h: 84px;            /* Höhe der mobilen Baukasten-Leiste (der Toast weicht aus) */
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

/* ---------- Grundlage ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--bg-image);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: clip; /* clip statt hidden: kann nicht per scrollIntoView/Fokus seitlich verschoben werden */
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--on-accent); }
input, textarea, button { font: inherit; color: inherit; caret-color: var(--accent-2); }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
h1:focus, h1:focus-visible { outline: none; box-shadow: none; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
em { font-style: italic; color: var(--text-2); }
strong { font-weight: 700; }
kbd { font-family: var(--font-body); }
@media (pointer: coarse) { kbd { display: none; } }
details summary { cursor: pointer; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 8px; font-weight: 700; z-index: 50; }
.skip:focus { top: 12px; }
.muted { color: var(--text-3); }
.small { font-size: .9rem; }
.center { text-align: center; }
.warn { color: var(--love-text); text-align: center; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.grain { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: var(--grain); mix-blend-mode: screen; z-index: 0; }
.ic { width: 1.25em; height: 1.25em; flex: 0 0 auto; vertical-align: -.25em; }

/* Typo-Stimmen */
.display { font-family: var(--font-display); font-weight: var(--display-weight); line-height: .98; letter-spacing: -.005em; text-wrap: balance; }
.hand { font-family: var(--font-hand); font-weight: 400; font-style: var(--hand-style); }
.h-hand {
  font-family: var(--font-hand); font-style: var(--hand-style); font-size: 1.6rem; line-height: 1.1; color: var(--hand);
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.h-hint { font-family: var(--font-body); font-style: normal; font-size: .9rem; color: var(--text-3); }

/* ---------- Layout ---------- */
.app { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; padding: 0 16px 140px; }
.topbar { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 14px; padding: 14px 0 6px; }
.brand { display: flex; flex-direction: column; justify-content: center; min-height: 44px; text-decoration: none; color: var(--text); line-height: 1; }
.brand-main { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.1rem; letter-spacing: .01em; }
.brand-sub { font-family: var(--font-hand); font-style: var(--hand-style); color: var(--accent-2); font-size: 1.15rem; margin-top: 1px; }
.who { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text-2); }
.avatar-i, .ov-i {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--av-a); color: var(--av-a-on); font-family: var(--font-display); font-weight: var(--display-weight); font-size: .85rem; letter-spacing: -.02em;
}
.av-b { background: var(--av-b); color: var(--av-b-on); }
.av-c { background: var(--av-c); color: var(--av-c-on); }
/* Drei Stationen, alle immer sichtbar – nichts scrollt aus dem Bild */
.stepper { grid-column: 1 / -1; padding: 4px 0 6px; }
.steps { display: flex; gap: 0; position: relative; max-width: 420px; margin: 0 auto; }
.steps::before { content: ''; position: absolute; left: 16%; right: 16%; top: 15px; height: 2px; background: var(--line); }
.step { flex: 1 1 0; display: flex; }
.step button {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; min-height: 44px;
  color: var(--text-3); font-size: .8rem; font-weight: 700; letter-spacing: .02em; padding: 0 2px 2px;
}
.step.is-must button { color: var(--text); }
.step.is-must .step-dot { border-color: var(--text-3); }
.steps-note { text-align: center; font-size: .85rem; color: var(--text-3); margin-top: 4px; text-wrap: balance; }
.step-dot {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-2); border: 2px solid var(--line); color: var(--text-3); font-size: .8rem;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.step-dot .ic { width: 16px; height: 16px; }
.step.is-done .step-dot { background: var(--love); border-color: var(--love); color: var(--on-love); }
.step.is-done button { color: var(--text-2); }
.step.is-current .step-dot { background: var(--accent); border-color: var(--accent-2); color: var(--on-accent); transform: scale(1.12); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 20%, transparent); }
.step.is-current button { color: var(--text); }
.step button:hover .step-dot { border-color: var(--text-2); }

.main { position: relative; }
.screen { animation: screen-in .42s var(--ease-out) both; }
.screen.leave { animation: screen-out .2s ease-in both; pointer-events: none; }
@keyframes screen-in { from { opacity: 0; transform: translateX(28px) rotate(.4deg); } to { opacity: 1; transform: none; } }
@keyframes screen-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-20px); } }

.screen-head { padding: 18px 0 22px; }
.screen-head h1 { font-size: clamp(2.25rem, 9vw, 3rem); margin-bottom: 12px; }
.lede { font-size: 1.05rem; color: var(--text-2); max-width: 36em; text-wrap: pretty; }
.screen-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 26px 0 8px; }
.screen-foot > p { flex: 1 1 100%; }
/* Zwei gleichwertige Wege (Termin: fertig oder weiter) */
.foot-pair { flex: 1 1 100%; display: grid; gap: 10px; }
.foot-pair .btn { width: 100%; }
.foot-hint { flex: 1 1 100%; display: flex; gap: 8px; align-items: flex-start; color: var(--text-2); font-size: .95rem; }
.foot-hint .ic { color: var(--accent-2); margin-top: 3px; }
.date-open { margin-top: 12px; display: flex; gap: 8px; align-items: flex-start; font-size: .95rem; color: var(--text-2); }
.date-open .ic { color: var(--accent-2); margin-top: 3px; }
@media (min-width: 560px) { .foot-pair { grid-template-columns: 1fr 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 1rem; letter-spacing: .01em; text-decoration: none;
  transition: transform .15s var(--ease), background .2s, color .2s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .6); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { color: var(--text); border: var(--border-w) solid var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--text-3); }
.btn-picked { background: var(--love); color: var(--on-love); }
.btn-wide { flex: 1 1 auto; }
.btn-sm { min-height: 44px; padding: 8px 14px; font-size: .95rem; }
.btn-big { min-height: 58px; font-size: 1.15rem; }
.btn:disabled { opacity: .4; box-shadow: none; }
.btn .count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 12px; background: var(--bg); color: var(--text); font-size: .85rem; padding: 0 6px; }
.link { color: var(--accent-text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent-text) 50%, transparent); display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.link:hover { text-decoration-color: currentColor; }
.link-inline { display: inline; min-height: 0; padding: 11px 0; } /* im Satz; Padding hält die Tippfläche bei 44px */
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--text-2); background: var(--surface-2); }
.icon-btn:hover { background: var(--line); color: var(--text); }

/* Felder */
.field-label { display: block; font-weight: 700; margin-bottom: 8px; }
input[type="text"], textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: var(--r);
  background: var(--surface); border: var(--border-w) solid var(--line); color: var(--text);
  transition: border-color .2s;
}
input[type="text"]::placeholder, textarea::placeholder { color: var(--text-3); }
input[type="text"]:focus-visible, textarea:focus-visible { border-color: var(--accent); box-shadow: none; }
input[readonly] { opacity: .7; }
textarea { resize: vertical; line-height: 1.45; }

/* Segmentierte Wahl */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--surface); border-radius: var(--r-pill); }
.seg [role="radio"] {
  flex: 1 1 0; min-height: 44px; border-radius: var(--r-pill); font-weight: 700; color: var(--text-2); padding: 6px 8px;
  background: var(--surface-2); border: var(--border-w) solid var(--line);
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.seg [role="radio"]:hover { color: var(--text); border-color: var(--text-3); }
.seg [role="radio"][aria-checked="true"] { background: var(--text); color: var(--on-text); border-color: transparent; }
.seg-vote .seg-ja[aria-checked="true"] { background: var(--basil); color: var(--on-basil); }
.seg-vote .seg-vielleicht[aria-checked="true"] { background: var(--love); color: var(--on-love); }
.seg-vote .seg-nein[aria-checked="true"] { background: var(--text-3); color: var(--on-text); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 8px 14px 8px 12px; border-radius: var(--r-pill);
  background: var(--surface); border: var(--border-w) solid var(--line); color: var(--text-2); font-weight: 700; font-size: .95rem; text-align: left;
  transition: border-color .2s, background .2s, color .2s, transform .15s var(--ease);
}
.chip-text { min-width: 0; }
.chip:hover { border-color: var(--text-3); color: var(--text); }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"], .chip.is-on { background: var(--text); border-color: var(--text); color: var(--on-text); }
.chip:disabled { opacity: .45; }

/* Tags */
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 700; letter-spacing: .03em; padding: 3px 9px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); vertical-align: middle; }
.tag-lead { background: var(--love); color: var(--on-love); }
.tag-watery { background: color-mix(in srgb, #6fa6d6 20%, transparent); color: color-mix(in srgb, #6fa6d6 70%, var(--text)); }
.tag-light { background: color-mix(in srgb, var(--basil) 20%, transparent); color: var(--basil-text); }

/* ---------- Einladung ---------- */
.invite-wrap { position: relative; padding-top: 70px; }
.invite-pizza { position: absolute; top: -40px; right: -120px; width: 320px; height: 320px; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .45)); animation: pizza-in 1s var(--ease-out) both; z-index: 0; }
.invite-pizza .pizza { width: 100%; height: 100%; }
@keyframes pizza-in { from { transform: translate(60px, -40px) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
.invite {
  position: relative; z-index: 1; background: var(--poster-bg); color: var(--poster-text); padding: 28px 24px 24px;
  border-radius: var(--r-lg); transform: rotate(-1.2deg); box-shadow: var(--shadow);
  background-image: radial-gradient(circle at 15% 10%, rgba(255, 255, 255, .22), transparent 40%), radial-gradient(circle at 90% 95%, rgba(0, 0, 0, .15), transparent 40%);
}
.invite::after { content: ''; position: absolute; inset: 10px; border: 2px dashed var(--poster-frame); border-radius: calc(var(--r-lg) - 8px); pointer-events: none; }
.invite-kicker { font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; }
.invite-title { font-size: clamp(3rem, 15vw, 5.2rem); margin: 6px 0 14px; color: var(--poster-text); }
.invite-host { display: block; font-family: var(--font-hand); font-style: var(--hand-style); font-weight: 400; font-size: .45em; letter-spacing: 0; margin-top: 8px; color: var(--poster-sub); line-height: 1.1; }
/* Die persönliche Notiz läuft in der Leseschrift; nur die Unterschrift bleibt handgeschrieben */
.invite-note { font-size: 1.1rem; line-height: 1.45; max-width: 36ch; text-wrap: pretty; }
.invite-sig { font-size: 1.6rem; margin-top: 10px; text-align: right; }

.hello { margin-top: 32px; display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: start; }
.hello-av { width: 52px; height: 52px; font-size: 1.2rem; }
.hello-h { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.6rem; line-height: 1.1; margin-bottom: 4px; }
.hello .btn, .hello .linkbox, .hello .link { grid-column: 1 / -1; }
.hint { margin-top: 10px; display: flex; gap: 8px; align-items: flex-start; font-size: .95rem; color: var(--text-2); }
.hint .ic { color: var(--accent-2); margin-top: 3px; }
.linkbox { background: var(--surface); border-radius: var(--r-lg); padding: 14px 16px; border: var(--border-w) dashed var(--line); }
.linkbox-intro { font-size: .95rem; color: var(--text-2); margin-bottom: 6px; }
.linkbox-url { font-weight: 700; word-break: break-all; color: var(--accent-2); margin-bottom: 10px; }
.linkbox-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.linkbox-actions .ic { color: var(--basil-text); }
.linkbox-ok { color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }

.name-form { margin-top: 36px; }
.name-row { display: flex; gap: 10px; }
.name-row input { flex: 1 1 auto; min-width: 0; font-size: 1.15rem; }
.tag-ask { margin-top: 14px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); animation: pop .4s var(--ease-out) both; }
.tag-ask > p { margin-bottom: 10px; }
.tag-ask > p:first-child { display: flex; gap: 8px; align-items: flex-start; } /* Icon + ein Satz-Span, kein Spaltensatz */
.tag-ask > .ic, .tag-ask > p:first-child .ic { color: var(--love-text); margin-top: 3px; }
.tag-ask .field-label { margin-top: 14px; }
.form-msg { margin-top: 12px; min-height: 24px; line-height: 1.4; }
.form-msg.is-error { color: var(--no-text); font-weight: 700; }
.notice { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: color-mix(in srgb, var(--no) 14%, transparent); color: var(--text); margin-bottom: 16px; }
.notice .ic { color: var(--no-text); margin-top: 3px; }
.washere { margin-top: 18px; }
.washere summary { font-weight: 700; color: var(--text-2); min-height: 44px; display: flex; align-items: center; list-style: none; }
.washere summary::before { content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); margin-right: 10px; transition: transform .2s; }
.washere[open] summary::before { transform: rotate(45deg); }
.washere p { color: var(--text-2); padding: 4px 0 0 18px; }
@keyframes pop { 0% { transform: scale(.94); opacity: 0; } 60% { transform: scale(1.02); opacity: 1; } 100% { transform: none; } }

.coming { margin-top: 44px; }
.avatars { display: flex; flex-wrap: wrap; gap: 14px 18px; margin: 14px 0 10px; }
.avatar { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .85rem; font-weight: 700; color: var(--text-2); }
.avatar .avatar-i { width: 46px; height: 46px; font-size: 1rem; }
.avatar.is-you .avatar-i:not(.av-a):not(.av-b):not(.av-c) { background: transparent; border: 2px dashed var(--text-3); color: var(--text-3); }

/* ---------- Termin ---------- */
.dates { display: flex; flex-direction: column; gap: 14px; }
.date {
  display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 14px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow); position: relative; transition: background .3s;
}
.date.is-leading { background: linear-gradient(135deg, color-mix(in srgb, var(--love) 12%, var(--surface)), var(--surface) 60%); }
.date-cal {
  display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--r);
  background: var(--paper); color: var(--on-paper); padding: 12px 4px 14px; line-height: 1; text-align: center; align-self: start;
  transition: background .3s, transform .3s var(--ease);
}
.date-cal .dow { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.date-cal .dom { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2rem; margin: 3px 0; }
.date-cal .mon { font-size: .8rem; font-weight: 700; }
.date.vote-ja .date-cal { background: var(--basil); color: var(--on-basil); transform: rotate(-3deg); }
.date.vote-vielleicht .date-cal { background: var(--love); color: var(--on-love); }
.date.vote-nein .date-cal { background: var(--surface-2); color: var(--text-2); border: 2px dashed var(--line); }
.date-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.date-time { font-weight: 700; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.others { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 28px; }
.ov .ov-i { width: 30px; height: 30px; font-size: .75rem; border: 2px solid var(--surface); }
.ov-ja .ov-i { background: var(--basil); color: var(--on-basil); }
.ov-vielleicht .ov-i { background: var(--love); color: var(--on-love); }
.ov-nein .ov-i { background: var(--surface-2); color: var(--text-2); border-color: var(--line); text-decoration: line-through; }

/* ---------- Vorlieben ---------- */
.diet { margin: 4px 0 24px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: var(--border-w) solid var(--no-deep); box-shadow: var(--shadow); }
.diet-head h2 { font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--text); }
.diet-head h2 .ic { color: var(--no); }
.diet-head p { margin: 4px 0 12px; }
.diet .chip[aria-pressed="true"] { background: var(--no-fill); border-color: var(--no-fill); color: var(--on-no); }
.diet-hint { margin-top: 12px; color: var(--love-text); display: flex; gap: 8px; align-items: flex-start; font-size: .95rem; }

/* Zusammenfassung oben: was markiert ist, in zwei Zeilen */
.prefs-sum { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; margin-bottom: 22px; border-radius: var(--r-lg); background: var(--surface); border: var(--border-w) solid var(--line); }
.prefs-row { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; font-size: .95rem; color: var(--text-2); }
.prefs-k { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; flex: 0 0 auto; min-width: 9.5em; }
.prefs-love .prefs-k { color: var(--love-text); }
.prefs-never .prefs-k { color: var(--no-text); }
.prefs-v { flex: 1 1 12em; min-width: 0; }

/* Eine Liste: Zutat + Daumen hoch/runter, nach Gruppen, immer offen – nichts ist zugeklappt */
.prefs { margin-bottom: 28px; }
.plegend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: .9rem; color: var(--text-2); margin: 0 0 8px; }
.plegend-k { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.plegend-k .ic { width: 16px; height: 16px; }
.plegend .is-love { color: var(--love-text); }
.plegend .is-never { color: var(--no-text); }
.pgroup { border-top: 1px solid var(--line); padding: 6px 0 8px; }
.prefs-cols > .pgroup:last-child { border-bottom: 1px solid var(--line); }
.pgroup-h { font-family: var(--font-hand); font-style: var(--hand-style); font-weight: 400; font-size: 1.2rem; margin: 6px 0 0; color: var(--text-2); }
.plist { display: flex; flex-direction: column; }
.prow { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 3px 0; }
.prow + .prow { border-top: 1px dashed var(--line); }
.prow-name { flex: 1 1 auto; min-width: 0; font-weight: 600; line-height: 1.25; }
.prow-state { display: block; font-size: .82rem; font-weight: 600; color: var(--text-3); }
.prow.r-love .prow-state { color: var(--love-text); }
.prow.r-never .prow-state { color: var(--no-text); }
.prow.is-locked .prow-name { color: var(--text-3); }
.prow.is-locked .prow-state { color: var(--text-3); font-weight: 500; }
.prow-btns { display: inline-flex; gap: 6px; flex: 0 0 auto; }
.pbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-pill); border: var(--border-w) solid var(--line); background: var(--surface); color: var(--text-3); cursor: pointer; }
.pbtn .ic { width: 20px; height: 20px; }
.pbtn:hover { color: var(--text); border-color: var(--text-3); }
.pbtn-love[aria-pressed="true"] { --thumb-fill: currentColor; background: var(--love); border-color: var(--love); color: var(--on-love); }
.pbtn-never[aria-pressed="true"] { --thumb-fill: currentColor; background: var(--no-fill); border-color: var(--no-fill); color: var(--on-no); }
.pbtn:disabled { cursor: default; color: var(--text-3); background: var(--surface-2); border-color: var(--line); --thumb-fill: none; }
@media (min-width: 720px) {
  .prefs-cols { columns: 2; column-gap: 36px; }
  .pgroup { break-inside: avoid; }
  .prefs-cols > .pgroup:last-child { border-bottom: 0; }
}

/* ---------- Vorschläge ---------- */
.menu { display: flex; flex-direction: column; gap: 14px; }
.dish {
  position: relative; display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 16px 16px 16px 14px;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); transition: opacity .3s, transform .3s var(--ease);
}
.dish.fit-passt-gut { background: linear-gradient(135deg, color-mix(in srgb, var(--love) 14%, var(--surface)), var(--surface) 55%); }
.dish.is-picked { outline: 2px solid var(--love); outline-offset: -2px; }
/* Konflikt: Bild wird grau, Text bleibt voll lesbar (kein Deckkraft-Stapel) */
.dish.is-conflict { background: var(--bg); box-shadow: none; border: var(--border-w) solid var(--line); }
.dish-rank { position: absolute; top: -8px; left: 8px; font-size: 1.9rem; color: var(--accent-2); text-shadow: 0 2px 0 var(--bg); line-height: 1; }
.dish-thumb { align-self: start; width: 84px; height: 84px; filter: var(--shadow-pz); margin-top: 6px; }
.dish-thumb .pizza { width: 100%; height: 100%; }
.dish.is-conflict .dish-thumb { filter: grayscale(.6) var(--shadow-pz); }
.dish-thumb-q { display: grid; place-items: center; border-radius: 50%; border: 2px dashed var(--text-3); color: var(--accent-2); }
.dish-thumb-q .ic { width: 34px; height: 34px; }
.dish-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dish-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.dish-name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.15rem; line-height: 1.15; text-wrap: balance; }
.fit { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.fit.fit-passt-gut { background: var(--love); color: var(--on-love); border-color: var(--love); }
.fit.fit-eher-nicht { background: var(--no-deep); color: var(--on-no); border-color: var(--no-deep); }
.dish-ings { font-size: .9rem; color: var(--text-3); }
.dish-desc { font-size: 1rem; line-height: 1.45; color: var(--text-2); text-wrap: pretty; }
.why { display: flex; flex-direction: column; gap: 3px; margin: 4px 0 6px; font-size: .92rem; }
.why li { display: flex; gap: 6px; align-items: flex-start; }
.why .ic { margin-top: 2px; width: 18px; height: 18px; }
.why-plus { color: var(--basil-text); }
.why-bad { color: var(--no-text); }
.social { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .92rem; color: var(--text-2); margin: 2px 0 6px; }
.social > .ic { color: var(--accent-2); }
.dish .btn { align-self: flex-start; }
.dish-surprise { background: transparent; box-shadow: none; outline: 2px dashed var(--line); outline-offset: -2px; }
.dish-surprise.is-picked { outline-color: var(--love); }

/* ---------- Baukasten ---------- */
.builder-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 26px; }
.builder-pizza { width: min(78vw, 300px); height: min(78vw, 300px); filter: drop-shadow(0 20px 26px rgba(0, 0, 0, .45)); }
.builder-pizza .pizza { width: 100%; height: 100%; }
.pz-ing { transform-box: fill-box; transform-origin: center; animation: drop .45s var(--ease-out) both; }
@keyframes drop { from { transform: scale(1.25) translateY(-8px); opacity: 0; } }
.gauge { width: 100%; max-width: 420px; text-align: center; }
.gauge-track { position: relative; display: flex; height: 14px; border-radius: 7px; overflow: visible; margin: 10px 0 4px; }
.gauge-seg { flex: 1 1 0; height: 100%; }
.gauge-seg.s1 { flex-basis: 13%; background: var(--line); border-radius: 7px 0 0 7px; }
.gauge-seg.s2 { flex-basis: 54%; background: var(--basil-deep); }
.gauge-seg.s3 { flex-basis: 16%; background: color-mix(in srgb, var(--love) 60%, var(--line)); }
.gauge-seg.s4 { flex-basis: 17%; background: var(--no-deep); border-radius: 0 7px 7px 0; }
.gauge-marker {
  position: absolute; top: 50%; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%; transform: translateY(-50%);
  display: grid; place-items: center; background: var(--paper); color: var(--on-paper); box-shadow: 0 4px 10px rgba(0, 0, 0, .35);
  transition: left .5s var(--ease-out), background .3s, color .3s;
}
.gauge-marker .ic { width: 20px; height: 20px; }
.gauge.zone-2 .gauge-marker { background: var(--basil); color: var(--on-basil); }
.gauge.zone-3 .gauge-marker { background: var(--love); color: var(--on-love); }
.gauge.zone-4 .gauge-marker { background: var(--no); color: var(--on-no); animation: shake .5s ease; }
@keyframes shake { 0%, 100% { transform: translateY(-50%); } 25% { transform: translateY(-50%) translateX(-4px); } 75% { transform: translateY(-50%) translateX(4px); } }
.gauge-labels { display: flex; justify-content: space-between; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding: 0 2px; }
.gauge-verdict { font-size: 2rem; line-height: 1; margin-top: 12px; color: var(--text); transition: color .3s; }
.gauge.zone-2 .gauge-verdict { color: var(--basil-text); }
.gauge.zone-3 .gauge-verdict { color: var(--love-text); }
.gauge.zone-4 .gauge-verdict { color: var(--no-text); }
.gauge-text { color: var(--text-2); font-size: .95rem; margin-top: 4px; text-wrap: pretty; }

/* Mobil: kompakte Leiste, klebt unten, solange belegt wird */
.builder-bar {
  position: sticky; bottom: 0; z-index: 20; display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center;
  min-height: var(--bar-h); margin: 18px -16px 0; padding: 10px 16px calc(10px + var(--safe-b));
  background: var(--surface); border-top: var(--border-w) solid var(--line); box-shadow: 0 -10px 30px -16px rgba(0, 0, 0, .6);
}
.bar-pizza { width: 56px; height: 56px; filter: var(--shadow-pz); }
.bar-pizza .pizza { width: 100%; height: 100%; }
.bar-mid { min-width: 0; }
.bar-verdict { font-size: 1.35rem; line-height: 1; color: var(--text); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.builder-bar.zone-2 .bar-verdict { color: var(--basil-text); }
.builder-bar.zone-3 .bar-verdict { color: var(--love-text); }
.builder-bar.zone-4 .bar-verdict { color: var(--no-text); }
.builder-bar .gauge-track { height: 10px; border-radius: 5px; margin: 8px 0 2px; }
.builder-bar .gauge-seg.s1 { border-radius: 5px 0 0 5px; }
.builder-bar .gauge-seg.s4 { border-radius: 0 5px 5px 0; }
.builder-bar .gauge-marker { width: 26px; height: 26px; margin-left: -13px; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.builder-bar .gauge-marker .ic { width: 15px; height: 15px; }
.builder-bar.zone-2 .gauge-marker { background: var(--basil); color: var(--on-basil); }
.builder-bar.zone-3 .gauge-marker { background: var(--love); color: var(--on-love); }
.builder-bar.zone-4 .gauge-marker { background: var(--no); color: var(--on-no); }
.builder-bar .btn { white-space: nowrap; }

.bgroup { margin-bottom: 22px; }
.bgroup .h-hand { margin-bottom: 10px; }
.chip-build { padding-left: 8px; gap: 8px; }
.chip-swatch { width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25); flex: 0 0 auto; }
.chip-build.is-on .chip-swatch { box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25), 0 0 0 2px var(--on-text); }
.chip-badge { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; }
.chip-love { background: var(--love); color: var(--on-love); }
.chip-never { background: var(--no-fill); color: var(--on-no); }
.chip-badge .ic { width: 13px; height: 13px; }
.chip-w { color: #6fa6d6; display: inline-grid; place-items: center; }
.chip-w .ic { width: 15px; height: 15px; }
.chip-w-light { color: var(--basil); }
.chip-build.is-on .chip-w { color: var(--on-text); opacity: .7; }
.chip-build.r-never:not(:disabled) { border-style: dashed; }
.builder-name { margin-top: 8px; }

/* ---------- Wünsche & Runde ---------- */
.empty { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 10px 0 20px; }
.empty-pizza { width: 180px; height: 180px; opacity: .8; }
.empty-pizza .pizza { width: 100%; height: 100%; }
.empty-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.order, .board { display: flex; flex-direction: column; gap: 10px; }
.orow { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; padding: 14px 14px 14px 12px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.orow.is-mine { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: -2px; }
.orow-thumb { width: 64px; height: 64px; display: grid; place-items: center; color: var(--accent-2); filter: var(--shadow-pz); margin-top: 4px; }
.orow-thumb .pizza { width: 100%; height: 100%; }
.orow-thumb .ic { width: 30px; height: 30px; }
.orow-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.orow-name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.05rem; line-height: 1.25; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.orow-name .tag { font-family: var(--font-body); font-weight: 700; }
.orow-detail { font-size: .9rem; color: var(--text-3); }
.people { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 2px; }
.person { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 700; color: var(--text-2); }
.person .avatar-i { width: 28px; height: 28px; font-size: .75rem; }
.person.is-me { color: var(--text); }
.orow-flag { display: flex; gap: 6px; align-items: flex-start; font-size: .9rem; color: var(--no-text); font-weight: 700; }
.orow-flag .ic { margin-top: 2px; }
.orow.has-conflict .orow-thumb { filter: grayscale(.6) var(--shadow-pz); }
.orow-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin-top: 4px; }
.order-add { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 8px 0 4px; }
.note { margin-top: 30px; }
.note .h-hand { margin-bottom: 10px; display: flex; }
.board-wrap .h-hand { margin-bottom: 12px; }
.undecided { margin-top: 18px; }
.table-teaser { margin-top: 8px; }
.table-teaser .avatars { margin-bottom: 16px; }

/* Bestätigung */
.confirmed-head { position: relative; padding-top: 26px; }
.stamp {
  display: inline-block; font-family: var(--font-hand); font-style: var(--hand-style); font-size: 2.2rem; line-height: 1; text-transform: uppercase; letter-spacing: .04em;
  color: var(--no); border: 4px double var(--no); border-radius: 10px; padding: 6px 14px 4px; transform: rotate(-7deg);
  margin-bottom: 14px; margin-left: 4px; animation: stamp .5s var(--ease-out) both; opacity: .92;
}
@keyframes stamp { from { transform: rotate(-7deg) scale(2.2); opacity: 0; } 70% { transform: rotate(-7deg) scale(.96); opacity: 1; } }
.receipt { background: var(--paper); color: var(--on-paper); padding: 20px 20px 18px; border-radius: 6px; box-shadow: var(--shadow); position: relative; margin-bottom: 30px;
  background-image: repeating-linear-gradient(0deg, transparent 0 27px, color-mix(in srgb, var(--on-paper) 7%, transparent) 27px 28px); }
.receipt::before, .receipt::after { content: ''; position: absolute; left: 0; right: 0; height: 8px; background: radial-gradient(circle at 6px -2px, transparent 6px, var(--paper) 7px) 0 0 / 14px 8px repeat-x; }
.receipt::before { top: -7px; }
.receipt::after { bottom: -7px; transform: scaleY(-1); }
.receipt .h-hand { color: var(--accent-deep); margin-bottom: 10px; }
.receipt-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.receipt-list li { display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }
.receipt-list li span { color: var(--on-paper-2); font-size: .92rem; }
.receipt .btn-ghost { color: var(--on-paper); border-color: var(--on-paper); }
.receipt .muted { color: var(--on-paper-2); margin-top: 10px; }
.receipt + .linkbox { margin-bottom: 30px; }
.table-sum { font-size: 1.6rem; color: var(--accent-text); margin-top: 6px; }

/* ---------- Toast ---------- */
/* Unten, über der Sicherheitszone und etwaigen Leisten; oben, wenn gerade getippt wird (Tastatur offen) */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + var(--safe-b)); transform: translate(-50%, 20px); z-index: 40; max-width: min(92vw, 460px);
  background: var(--paper); color: var(--on-paper); font-weight: 700; font-size: .95rem; line-height: 1.3; padding: 11px 16px; border-radius: var(--r-pill); box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-top { bottom: auto; top: 12px; transform: translate(-50%, -20px); }
.toast.is-top.is-on { transform: translate(-50%, 0); }
html[data-screen="baukasten"] .toast:not(.is-top) { bottom: calc(var(--bar-h) + 16px + var(--safe-b)); }

.receipt-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Runde / Mitgäste ---------- */
.who-name small { font-weight: 700; font-size: .8rem; color: var(--text-3); margin-left: 2px; }
.tag-kid { background: color-mix(in srgb, var(--love) 22%, transparent); color: color-mix(in srgb, var(--love) 60%, var(--text)); font-size: .75rem; padding: 2px 7px; }
.via { display: inline-block; font-weight: 500; font-size: .78rem; color: var(--text-3); margin-left: 2px; }
.avatar .avatar-n { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; max-width: 92px; }
.avatar .avatar-n .via { margin: 0; }
.avatar-i { position: relative; }
.av-kid { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--love); color: var(--on-love); border: 2px solid var(--bg); }
.av-kid .ic { width: 11px; height: 11px; }
.person .tag-kid { margin-left: 2px; }

/* Umschalter: für wen wird ausgewählt */
.persons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 6px 0 2px; padding: 10px 12px; border-radius: var(--r-lg); background: var(--surface); border: var(--border-w) solid var(--line); }
.persons-l { font-size: 1.25rem; color: var(--hand); line-height: 1; }
.persons-list { display: flex; flex-wrap: wrap; gap: 6px; }
.person-tab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 12px 4px 5px; border-radius: var(--r-pill);
  border: var(--border-w) solid transparent; color: var(--text-2); font-weight: 700; transition: background .2s var(--ease), border-color .2s var(--ease);
}
.person-tab .avatar-i { width: 30px; height: 30px; font-size: .75rem; }
.person-tab .tag-kid { margin-left: -2px; }
.person-tab:hover { border-color: var(--line); color: var(--text); }
.person-tab.is-on { background: var(--text); color: var(--on-text); border-color: var(--text); }
.person-tab.is-on .tag-kid { background: color-mix(in srgb, var(--love) 85%, transparent); color: var(--on-love); }
.person-add { width: 44px; justify-content: center; padding: 0; border-style: dashed; border-color: var(--line); color: var(--text-3); }
.person-add:hover { color: var(--text); }
.persons-hint { flex: 1 0 100%; margin: 2px 0 0; }

/* Termin: wer aus der Runde kommt mit */
.withme { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 10px 0 2px; }
.chip-sm { min-height: 44px; padding: 6px 12px 6px 10px; font-size: .9rem; }
.chip-sm .ic { width: 16px; height: 16px; }
.ov .ov-i { position: relative; overflow: visible; }
.ov-n { position: absolute; right: -9px; top: -8px; font-family: var(--font-body); font-size: .75rem; font-weight: 800; line-height: 1; padding: 2px 4px; border-radius: 8px; background: var(--text); color: var(--on-text); border: 1.5px solid var(--surface); }

/* Einladung: Runde verwalten */
.crew { margin-top: 26px; }
.crew-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 18px; }
.crew-row { display: grid; grid-template-columns: 40px 1fr; gap: 6px 12px; align-items: start; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface); border: var(--border-w) solid var(--line); }
.crew-row .avatar-i { width: 40px; height: 40px; }
.crew-row.is-linked { border-style: dashed; }
.crew-name { font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.crew-body p + p { margin-top: 2px; }
.crew-body .linkbox { margin-top: 10px; }
.crew-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.crew-actions .icon-btn { margin-left: auto; }
.crew-add .name-row { flex-wrap: wrap; align-items: center; }
.crew-add .name-row input[type="text"] { flex: 1 1 160px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; color: var(--text-2); cursor: pointer; padding: 0 4px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; }

/* Wünsche mit mehreren Personen */
.ogroup { margin-bottom: 18px; }
.ogroup + .ogroup { padding-top: 14px; border-top: var(--border-w) dashed var(--line); }
.ogroup-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ogroup-h .avatar-i { width: 30px; height: 30px; font-size: .75rem; }
.ogroup-h .tag-kid { font-family: var(--font-body); }
.empty-sm { align-items: flex-start; gap: 8px; padding: 0 0 8px; }
.empty-sm .empty-actions { justify-content: flex-start; }
.orow.is-household { background: color-mix(in srgb, var(--love) 9%, var(--surface)); }
.receipt-person > ul { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; padding-left: 12px; border-left: 2px solid color-mix(in srgb, var(--on-paper) 15%, transparent); }
.receipt-person > strong .tag-kid { font-family: var(--font-body); }
.center { text-align: center; }

/* ---------- Desktop ---------- */
@media (min-width: 720px) {
  .app { max-width: 680px; }
  .screen-head h1 { font-size: 3.2rem; }
  .invite { padding: 36px 36px 30px; }
  .invite-pizza { right: -80px; width: 380px; height: 380px; top: -60px; }
  .invite-wrap { padding-top: 90px; }
}
@media (min-width: 1040px) {
  .app { max-width: 1080px; display: grid; grid-template-columns: 260px minmax(0, 680px); gap: 0 72px; align-items: start; padding-top: 24px; justify-content: center; }
  .topbar { position: sticky; top: 24px; grid-template-columns: 1fr; gap: 24px; padding: 0; }
  .brand-main { font-size: 1.5rem; }
  .brand-sub { font-size: 1.5rem; }
  .who { order: 3; }
  .stepper { margin: 0; padding: 0; overflow: visible; }
  .steps { flex-direction: column; gap: 8px; max-width: none; margin: 0; }
  .steps::before { left: 15px; right: auto; top: 20px; bottom: 20px; width: 2px; height: auto; }
  .step button { flex-direction: row; justify-content: flex-start; gap: 14px; font-size: .95rem; min-height: 44px; padding: 0; }
  .steps-note { text-align: left; margin-top: 10px; padding-left: 46px; }
  .main { padding-top: 10px; }
  .builder { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
  .builder-stage { position: sticky; top: 24px; }
  .builder-pizza { width: 280px; height: 280px; }
  .builder-name { grid-column: 1 / -1; }
  .builder-bar { display: none; }
}
@media (max-width: 1039.98px) {
  .builder-foot .btn-primary { display: none; } /* die Leiste unten übernimmt */
}

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Ergänzungen der echten App ---------- */
.toast.is-error { background: var(--no-deep); color: var(--on-no); }
.status-page { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 32px 0 48px; max-width: 34rem; margin: 0 auto; }
.status-page .lede { margin: 0; }
.status-pizza { width: min(180px, 50vw); opacity: .85; }
.status-hello { font-size: 1.4rem; color: var(--accent-2); margin: 0; }
.final-banner { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 12px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--basil) 18%, var(--surface)); border: 1px solid color-mix(in srgb, var(--basil) 45%, transparent); }
.final-banner .ic { color: var(--basil-text); margin-top: 3px; flex: none; }
.ev-switch { display: grid; gap: 8px; margin: 0 0 18px; }
.ev-switch .chips { flex-wrap: wrap; }
.ev-switch .chip.is-on { background: var(--accent); color: var(--on-accent); border-color: var(--accent-2); }
