/* ==========================================================================
   Partypost – App-Stile auf Basis der KK-Designsprache (Stand 1.6.4).
   Farben, Maße und Schatten kommen aus tokens.css, Rahmen, Schaltflächen, Formulare,
   Tabellen und Listen aus kk/*.css (unverändert). Hier stehen nur App-Bausteine;
   Farbwerte nur als var(--…).
   - Verwaltung (/v/…): KK-Rahmen (Seitenleiste, Topbar, Arbeitskarte)
   - Gastseite und öffentliche Seiten: eigener schlichter Rahmen, gleiche Tokens
   ========================================================================== */

/* --------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 var(--fs-base) / 1.5 var(--font-ui);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  accent-color: var(--accent);
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar) transparent;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0 0 1em; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.i { flex: none; vertical-align: -0.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px;
  font: 500 var(--fs-2xs) / 1 var(--font-mono); border-radius: var(--r-xs);
  background: var(--sunken); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line);
}
/* Hell/Dunkel-Schalter: Mond im hellen, Sonne im dunklen Design (Verwaltung: kk/shell-php.css) */
[data-theme-toggle] .i-sun { display: none; }
:root[data-theme='dark'] [data-theme-toggle] .i-moon { display: none; }
:root[data-theme='dark'] [data-theme-toggle] .i-sun { display: block; }

/* --------------------------------------------------------------- shared bits */

.notice {
  display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 14px;
  border-radius: var(--r); font-size: var(--fs-md); font-weight: 560;
}
.notice .i { margin-top: 2px; }
.notice--ok { background: var(--ok-bg); color: var(--ok); }
.notice--bad { background: var(--danger-soft); color: var(--danger); }
.notice--warn { background: var(--warn-bg); color: var(--warn); }
.ui-card__body > .notice { margin-bottom: 14px; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--hover); color: var(--muted); font-size: var(--fs-xs); font-weight: 560; white-space: nowrap;
}
.status {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
}
.status .i { width: 14px; height: 14px; }
.status--ok { background: var(--ok-bg); color: var(--ok); }
.status--muted { background: var(--hover); color: var(--muted); }
.status--free { background: var(--accent-soft); color: var(--accent-text); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot--ok { background: var(--ok); }
.dot--muted { background: var(--faint); }

.copy-field { display: flex; gap: 8px; align-items: center; }
.copy-field .ui-input { flex: 1; min-width: 0; background: var(--surface-2); font-family: var(--font-mono); font-size: 12.5px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: var(--z-toast); transform: translate(-50%, 12px); opacity: 0;
  transition: opacity var(--dur-slow), transform var(--dur-slow) var(--ease-out);
  padding: 10px 16px; border-radius: var(--r-l); background: var(--tip-bg); color: var(--tip-ink);
  font-size: var(--fs-md); font-weight: 560; box-shadow: var(--shadow-toast);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Formular-Ergänzungen zu kk/forms.css */
.pp-row { display: flex; gap: 12px; flex-wrap: wrap; }
.pp-row > .ui-field { flex: 1 1 150px; }
.pp-row > .pp-grow { flex: 3 1 220px; }
.pp-row > .pp-age { flex: 0 1 120px; }
.pp-row > .pp-price { flex: 0 1 160px; }
.pp-narrow { max-width: 280px; }
.pp-optional { font-weight: 400; color: var(--muted); }
.pp-form-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Auswahlkacheln (Radio): Auswahl = Akzent, wie ausgewählte Vorlage/Farbe */
.pp-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.pp-options--stack { grid-template-columns: minmax(0, 1fr); }
.pp-option { position: relative; display: block; cursor: pointer; }
.pp-option input { position: absolute; opacity: 0; pointer-events: none; }
.pp-option__face {
  display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 10px 13px; border-radius: var(--r-l);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: var(--fs-md); font-weight: 600; transition: background var(--dur), box-shadow var(--dur);
}
.pp-option__face small { font-size: var(--fs-sm); font-weight: 400; color: var(--muted); line-height: 1.35; }
.pp-option:hover .pp-option__face { box-shadow: inset 0 0 0 1px var(--line-strong); }
.pp-option input:checked + .pp-option__face { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.pp-option input:focus-visible + .pp-option__face { box-shadow: inset 0 0 0 1.5px var(--accent), var(--focus); }

/* --------------------------------------------------------------- public frame (start, create, privacy, error) */

.site-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: var(--topbar-h); max-width: 1160px; margin: 0 auto; padding: 0 20px;
}
.site-brand {
  display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none;
  font-size: 16px; font-weight: 650; letter-spacing: -0.015em;
}
.site-logo {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent-fill); color: var(--on-accent);
}
.site-main { width: 100%; max-width: 1160px; margin: 0 auto; padding: 16px 20px 56px; }
.guest-main { width: 100%; padding: 20px 16px 48px; }
.site-main :is(h1, h2), .guest-main :is(h1, h2) { margin: 0 0 0.5em; font-weight: var(--fw-display); letter-spacing: -0.015em; }
.site-main h1 { font-size: clamp(26px, 4vw, var(--fs-3xl)); letter-spacing: -0.022em; }
.site-main h2, .guest-main h2 { font-size: 19px; }
.narrow { max-width: 720px; margin: 0 auto; }
.lead { font-size: var(--fs-xl); color: var(--muted); max-width: 60ch; }
.back-link {
  display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px;
  color: var(--muted); text-decoration: none; font-size: var(--fs-sm); font-weight: 560;
}
.back-link:hover { color: var(--accent-text); }
.panel {
  margin-bottom: 18px; padding: 22px 24px; border-radius: var(--radius);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-paper);
}
.panel > :last-child { margin-bottom: 0; }
.panel .ui-form-section:last-of-type { padding-bottom: 0; }
.panel .notice, .rsvp-form > .notice { margin-bottom: 16px; }
.site-footer {
  display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
  padding: 18px 20px 26px; color: var(--muted); font-size: var(--fs-sm);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent-text); }
.empty-state { text-align: center; padding: 36px 24px; }
.empty-emoji { font-size: 40px; line-height: 1; margin-bottom: 12px; }
/* Öffentliche Seiten und Gastseite: große Hauptaktion für Handy-Daumen (nicht im KK-Rahmen) */
.ui-btn--lg { height: 46px; padding: 0 20px; font-size: var(--fs-lg); border-radius: var(--r-l); }
.guest-main .ui-input, .guest-main .ui-select select, .create-form .ui-input { min-height: 44px; font-size: 16px; }
.guest-main .ui-textarea, .create-form .ui-textarea { padding-top: 10px; }

/* --------------------------------------------------------------- card preview (shared) */

.card-svg { display: block; width: 100%; height: auto; }
.card-stage { position: relative; aspect-ratio: 148 / 105; perspective: 1400px; }
.card-flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.3, 0.7, 0.2, 1); }
.card-stage.is-flipped .card-flip { transform: rotateY(180deg); }
.card-face {
  position: absolute; inset: 0; overflow: hidden; border-radius: 6px; background: var(--sheet);
  box-shadow: var(--shadow-card); backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.card-face--back { transform: rotateY(180deg); }
.card-stage [data-face] { opacity: 0; transition: opacity 0.35s; }
.card-stage.is-ready [data-face] { opacity: 1; }

/* --------------------------------------------------------------- start page */

.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 24px 0 44px; }
.site-main .hero h1 { font-size: clamp(30px, 5vw, 46px); letter-spacing: -0.025em; line-height: 1.08; margin-bottom: 18px; }
.hero .notice { margin-bottom: 18px; }
.hero-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.hint { color: var(--muted); font-size: var(--fs-md); }
.hero-cards { position: relative; aspect-ratio: 1.15; }
.demo-card {
  position: absolute; width: 74%; aspect-ratio: 148 / 105; overflow: hidden; border-radius: 6px;
  background: var(--sheet); box-shadow: var(--shadow-card); opacity: 0; transition: opacity 0.4s;
}
.demo-card.is-ready { opacity: 1; }
.demo-card--1 { left: 0; top: 4%; transform: rotate(-6deg); z-index: 2; }
.demo-card--2 { right: 0; top: 30%; transform: rotate(5deg); z-index: 3; }
.demo-card--3 { left: 12%; bottom: 0; transform: rotate(-1.5deg); z-index: 1; }
.my-events { margin-bottom: 36px; }
.my-events .ui-list { background: var(--surface); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-paper); overflow: hidden; }
.occasions, .steps { margin-bottom: 40px; }
.occasion-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.occasion {
  display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--radius);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-paper);
  color: var(--ink); text-decoration: none; transition: box-shadow var(--dur);
}
.occasion:hover { box-shadow: inset 0 0 0 1.5px var(--accent), var(--shadow-paper); }
.occasion-icon { font-size: 28px; line-height: 1; margin-bottom: 8px; }
.occasion strong { font-size: var(--fs-lg); }
.occasion span:last-child { color: var(--muted); font-size: var(--fs-md); }
.step-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.step-list li {
  display: flex; gap: 14px; padding: 18px; border-radius: var(--radius);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-paper);
}
.step-list p { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-md); }
.step-no {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-text); font-weight: 700;
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 8px; }
  .hero-cards { max-width: 460px; width: 100%; margin: 0 auto; }
}

/* --------------------------------------------------------------- guest page */

.invite { max-width: 640px; margin: 0 auto; }
.invite-hero { margin: 4px 0 22px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.invite-hero .card-stage { width: 100%; cursor: pointer; }
.guest-main .invite-title { font-size: clamp(24px, 5vw, 30px); letter-spacing: -0.022em; }
.facts { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.facts li { display: flex; gap: 12px; align-items: flex-start; }
.facts .i { margin-top: 2px; color: var(--accent); }
.invite-message { padding: 14px 16px; border-radius: var(--r-l); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 15.5px; }
.invite-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.count-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--ok-bg); color: var(--ok); font-weight: 600; font-size: var(--fs-md);
}
.rsvp-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 18px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-face {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 104px;
  padding: 18px 12px; border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2);
  text-align: center; transition: background var(--dur), box-shadow var(--dur);
}
.choice-emoji { font-size: 30px; line-height: 1; filter: grayscale(0.6); opacity: 0.8; transition: filter var(--dur), opacity var(--dur); }
.choice:hover .choice-face { box-shadow: inset 0 0 0 1px var(--line-strong); }
.choice input:focus-visible + .choice-face { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice--yes input:checked + .choice-face { background: var(--ok-bg); box-shadow: inset 0 0 0 1.5px var(--ok); }
.choice--no input:checked + .choice-face { background: var(--hover); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.choice input:checked + .choice-face .choice-emoji { filter: none; opacity: 1; }
.rsvp-form .ui-form-section { padding-top: 14px; }
.people { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.person-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.person-row .ui-field { margin-bottom: 8px; flex: 1 1 200px; }
.person-remove { margin-bottom: 12px; }
.rsvp-form .pp-form-actions { margin-top: 6px; }
.privacy-note { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.privacy-note .i { margin-top: 3px; }
.answered-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.answered-head h2 { margin: 0 0 2px; }
.answered-head p { margin: 0; color: var(--muted); }
.answered-emoji { font-size: 36px; line-height: 1; }
.thanks-burst { font-size: 48px; line-height: 1; margin-bottom: 10px; animation: pop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes pop { from { transform: scale(0.3) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
.thanks .notice { margin-bottom: 14px; }
.answer-line { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 16px; }
.answer-details { margin: 0 0 16px; padding-left: 20px; color: var(--muted); }
.save-link { padding: 14px 16px; border-radius: var(--r-l); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.save-link p { display: flex; gap: 8px; color: var(--muted); font-size: var(--fs-md); margin-bottom: 10px; }
.save-link p .i { margin-top: 2px; }
.edit-answer summary { display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; font-weight: 650; font-size: 16px; }
.edit-answer summary::-webkit-details-marker { display: none; }
.edit-answer[open] summary { margin-bottom: 12px; }
.delete-answer { margin-top: 18px; padding-top: 16px; box-shadow: inset 0 1px 0 var(--line); }
.guest-main h2 .i { vertical-align: -0.12em; color: var(--muted); }

.gift-list { list-style: none; margin: 0; padding: 0; }
.gift { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 14px 0; box-shadow: inset 0 1px 0 var(--line); }
.gift-main { min-width: 0; }
.gift-title { font-size: 15.5px; }
.gift-note { margin: 2px 0 6px; color: var(--muted); font-size: var(--fs-md); }
.gift-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: var(--fs-sm); }
.gift-meta a { display: inline-flex; align-items: center; gap: 4px; }
.gift-side { flex: none; }
.gift-side form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.gift.is-taken .gift-title { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
@media (max-width: 520px) {
  .gift { flex-direction: column; align-items: stretch; }
  .gift-side form { justify-content: flex-start; }
  .panel { padding: 18px; }
}

/* --------------------------------------------------------------- host area (KK-Rahmen) */

.ui-page__subtitle .i { color: var(--faint); margin-right: 2px; }
.ui-page__subtitle > span:has(> .i) { display: inline-flex; align-items: center; gap: 4px; }
.ui-card__body > :last-child { margin-bottom: 0; }
.ui-card__body > p { color: var(--muted); font-size: var(--fs-md); }
.ui-card__head .count { color: var(--muted); font-weight: 500; }
.pp-empty { padding: 36px 24px; text-align: center; }
.pp-empty .empty-emoji { margin-bottom: 10px; }
.pp-empty h2 { font-size: var(--fs-xl); font-weight: 600; margin-bottom: 6px; }
.pp-empty p { max-width: 46ch; margin: 0 auto 16px; color: var(--muted); }
.pp-empty--inline { padding: 26px 20px; }
.pp-empty--inline p { margin-bottom: 0; }

/* Übersicht: Kennzahlen */
.pp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.pp-kpi { display: grid; gap: 6px; padding: 16px 18px; color: var(--ink); text-decoration: none; transition: background var(--dur); }
a.pp-kpi:hover { background: var(--surface-2); }
.pp-kpi__label { font: 600 var(--fs-2xs) / 1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pp-kpi__value { font-size: var(--fs-3xl); font-weight: var(--fw-display); line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pp-kpi__value small { font-size: var(--fs-xl); font-weight: 560; color: var(--muted); letter-spacing: 0; }
.pp-kpi__sub { color: var(--muted); font-size: var(--fs-sm); }
.pp-kpi--ok .pp-kpi__value { color: var(--ok); }

.pp-welcome { box-shadow: inset 0 0 0 1.5px var(--accent-line), var(--shadow-paper); }
.pp-welcome .ui-card__body { display: grid; gap: 12px; }
.pp-welcome p { margin: 0; }
.pp-welcome .ui-card__title { font-size: var(--fs-xl); }

.pp-share { display: grid; gap: 14px; }
.pp-share .card-stage { width: 100%; max-width: 420px; margin: 4px auto 6px; cursor: default; }
.pp-share .ui-field { margin-bottom: 0; }

/* Listen-Ergänzungen (Übersicht, Absagen, Wunschliste) */
.ui-list__lead .i { color: var(--faint); }
.ui-list__row.is-done .ui-list__lead .i { color: var(--ok); }
.ui-list__row.is-done .ui-list__title { color: var(--muted); }
.ui-list__title--wrap, .ui-list__sub--wrap { white-space: normal; }
.ui-list__actions form { margin: 0; display: flex; }
.ui-card > .ui-list { border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }

/* Tabellen-Ergänzungen (Gäste) */
.ui-table td { vertical-align: top; }
.ui-table td .cell-title + .cell-title { margin-top: 2px; }
.ui-table .pp-flag { color: var(--warn); font-weight: 560; }
.ui-table .pp-quiet { color: var(--ink); text-decoration: none; }
.ui-table .pp-quiet:hover { color: var(--accent-text); text-decoration: underline; }
.ui-table .pp-note { max-width: 280px; color: var(--muted); }
.ui-table td.ui-table__actions { padding-top: 6px; }
.ui-table tbody tr:target td, .ui-list__row:target { background: var(--accent-soft); }

/* Wunschliste */
.pp-gift { align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
.pp-gift .ui-list__body { gap: 4px; }
.pp-gift__meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.pp-gift__meta a { font-size: var(--fs-sm); }
.pp-gift-edit { flex: 1 1 auto; min-width: 0; padding: 4px 0; }

/* Karte gestalten */
.designer { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr); gap: 18px; align-items: start; }
.designer-preview { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.preview-card { width: 100%; aspect-ratio: 148 / 105; overflow: hidden; border-radius: 6px; background: var(--sheet); box-shadow: var(--shadow-card); cursor: pointer; }
.preview-hint { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.save-state { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.save-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.save-state.is-pending::before { background: var(--warn); }
.save-state.is-error { color: var(--danger); }
.save-state.is-error::before { background: var(--danger); }
.d-section { padding: 16px 20px 18px; box-shadow: inset 0 1px 0 var(--line); }
.d-section:first-child { box-shadow: none; }
.d-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.d-section h2 { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -0.005em; }
.d-section > h2 { margin-bottom: 12px; }
.d-section > p { margin: -4px 0 12px; color: var(--muted); font-size: var(--fs-sm); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.tpl { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink); text-align: left; }
.tpl-thumb { display: block; aspect-ratio: 148 / 105; overflow: hidden; border-radius: 6px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-2); transition: box-shadow var(--dur); }
.tpl:hover .tpl-thumb { box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-lift); }
.tpl.is-active .tpl-thumb { box-shadow: 0 0 0 2px var(--accent), var(--shadow-lift); }
.tpl-name { font-size: var(--fs-sm); font-weight: 560; }
.tpl.is-active .tpl-name { color: var(--accent-text); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.swatch-colors { display: flex; align-items: center; justify-content: center; gap: 3px; width: 72px; height: 40px; border-radius: var(--r-l); box-shadow: 0 0 0 1px var(--line-2); transition: box-shadow var(--dur); }
.swatch-colors i { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.swatch-name { font-size: var(--fs-sm); font-weight: 560; }
.swatch:hover .swatch-colors { box-shadow: 0 0 0 1px var(--line-strong); }
.swatch.is-active .swatch-colors { box-shadow: 0 0 0 2px var(--accent); }
.swatch.is-active .swatch-name { color: var(--accent-text); }
.font-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.font-opt {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 8px; border: 0; border-radius: var(--r-l);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); cursor: pointer; transition: box-shadow var(--dur), background var(--dur);
}
.font-opt:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.font-opt.is-active { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.font-sample { font-size: 22px; line-height: 1.3; white-space: nowrap; }
.font-name { font-size: var(--fs-xs); color: var(--muted); font-weight: 560; }
.text-field .ui-field__label { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.text-field-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 28px; }
@media (max-width: 1100px) {
  .designer { grid-template-columns: 1fr; }
  .designer-preview { top: 0; z-index: 2; margin: 0 -12px; padding: 8px 12px 10px; background: var(--work); box-shadow: inset 0 -1px 0 var(--line); }
  .designer-preview .preview-hint { display: none; }
  .designer-preview .preview-card { width: min(100%, 320px); margin: 0 auto; }
}

/* Einstellungen */
.pp-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 12px; }
.pp-switches { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 24px; padding-top: 6px; }
.pp-danger { box-shadow: inset 0 0 0 1px var(--danger-line), var(--shadow-paper); }
.pp-danger .ui-card__title { color: var(--danger); }
.pp-inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.pp-inline-form .ui-field { margin: 0; }

@media (max-width: 640px) {
  .ui-page { padding: 20px 16px 48px; }
  .ui-page__title { font-size: var(--fs-2xl); }
  .pp-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .pp-kpi { padding: 12px; }
  .pp-kpi__value { font-size: var(--fs-2xl); }
  .pp-kpi__label { letter-spacing: 0.06em; }
}
p.ui-card__desc { margin-bottom: 0; }
.ui-form-section > .pp-options { margin-bottom: 14px; }

/* Externe Wunschliste (Amazon & Co.) und Werbe-Kennzeichnung */
.wish-external {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 14px; padding: 14px 16px; border-radius: var(--r-l); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
}
.wish-external__text { display: grid; gap: 2px; min-width: 0; }
.wish-external__text span { color: var(--muted); font-size: var(--fs-md); }
.affiliate-note, .pp-fineprint { margin: 12px 0 0; color: var(--muted); font-size: var(--fs-xs); }
