/* ============================================================
   Wichtelei – Design-System
   ============================================================ */
:root {
  --bg: #f6f3ee;
  --bg-2: #efe9e0;
  --surface: #fffdf9;
  --surface-2: #faf6ef;
  --ink: #1c1a17;
  --ink-2: #3b3732;
  --muted: #736d64;
  --line: #e6dfd3;
  --line-2: #d9d0c2;
  --shadow: 0 1px 2px rgba(40, 30, 15, .05), 0 8px 28px -12px rgba(40, 30, 15, .18);
  --shadow-lg: 0 2px 6px rgba(40, 30, 15, .06), 0 24px 60px -24px rgba(40, 30, 15, .32);
  --ok: #1f7a55;
  --danger: #b4233c;
  --gold: #b88a2e;

  --c-wichteln: #b4233c;
  --c-wichteln-2: #1f5c4a;
  --c-schrott: #d4740a;
  --c-schrott-2: #6b3fa0;
  --c-wunsch: #5b45e0;
  --c-wunsch-2: #d6457a;
  --c-gemein: #0f766e;
  --c-gemein-2: #2563eb;

  --accent: var(--c-wichteln);
  --accent-2: var(--c-wichteln-2);
  --accent-soft: color-mix(in srgb, var(--accent) 10%, var(--surface));
  --accent-ink: #fff;

  --r: 18px;
  --r-sm: 12px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121110; --bg-2: #181715; --surface: #1c1b19; --surface-2: #22201d;
    --ink: #f3efe8; --ink-2: #d9d3c9; --muted: #a39d93; --line: #2e2b27; --line-2: #3a3631;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.4), 0 30px 70px -24px rgba(0,0,0,.8);
    --c-wichteln: #e0566d; --c-wichteln-2: #4fb08e;
    --c-schrott: #f29a3a; --c-schrott-2: #a37ad8;
    --c-wunsch: #8f7dff; --c-wunsch-2: #ef7ba3;
    --c-gemein: #2dd4bf; --c-gemein-2: #60a5fa;
    --ok: #4cc28c; --danger: #ef6b80; --gold: #dcb35a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121110; --bg-2: #181715; --surface: #1c1b19; --surface-2: #22201d;
  --ink: #f3efe8; --ink-2: #d9d3c9; --muted: #a39d93; --line: #2e2b27; --line-2: #3a3631;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.4), 0 30px 70px -24px rgba(0,0,0,.8);
  --c-wichteln: #e0566d; --c-wichteln-2: #4fb08e;
  --c-schrott: #f29a3a; --c-schrott-2: #a37ad8;
  --c-wunsch: #8f7dff; --c-wunsch-2: #ef7ba3;
  --c-gemein: #2dd4bf; --c-gemein-2: #60a5fa;
  --ok: #4cc28c; --danger: #ef6b80; --gold: #dcb35a;
  color-scheme: dark;
}

.t-wichteln { --accent: var(--c-wichteln); --accent-2: var(--c-wichteln-2); }
.t-schrott  { --accent: var(--c-schrott);  --accent-2: var(--c-schrott-2); }
.t-wunschliste { --accent: var(--c-wunsch); --accent-2: var(--c-wunsch-2); }
.t-gemeinsam { --accent: var(--c-gemein); --accent-2: var(--c-gemein-2); }
/* Zarte Akzentfläche je Kategorie neu berechnen (sonst erbt sie die Farbe von :root) */
.t-wichteln, .t-schrott, .t-wunschliste, .t-gemeinsam { --accent-soft: color-mix(in srgb, var(--accent) 11%, var(--surface)); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased;
  min-height: 100vh; overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(900px 500px at 110% -10%, color-mix(in srgb, var(--c-wichteln) 9%, transparent), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, color-mix(in srgb, var(--c-wunsch) 8%, transparent), transparent 60%);
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(28px, 5vw, 44px); }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--c-wichteln), var(--c-wunsch)); color: #fff; font-size: 15px; }
.brand-mark.big { width: 56px; height: 56px; border-radius: 16px; font-size: 26px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.92); opacity: .7; } }

/* ---------------- Layout ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px max(16px, env(safe-area-inset-left)); max-width: 1120px; margin: 0 auto;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px);
}
.topbar-wrap { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); }
.topbar-wrap .topbar { position: static; background: none; backdrop-filter: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.top-right { display: flex; align-items: center; gap: 8px; }
.container { max-width: 1120px; margin: 0 auto; padding: 28px 16px 80px; }
.narrow { max-width: 640px; margin: 0 auto; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 40px 0 14px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid transparent;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14.5px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, opacity .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--surface); }
.btn.soft { background: var(--accent-soft); color: var(--accent); }
.btn.danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn.lg { padding: 15px 24px; font-size: 16px; }
.btn.block { width: 100%; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-size: 16px; color: var(--ink); }
.icon-btn:hover { background: var(--surface-2); }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-weight: 700; font-size: 13.5px; color: #fff; background: var(--av, var(--accent)); }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }

/* ---------------- Cards ---------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card h2 + p, .card h3 + p { margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.chip.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chip.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); border-color: transparent; }
.chip.gold { background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold); border-color: transparent; }

/* ---------------- Forms ---------------- */
.field { display: block; }
.field + .field { margin-top: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field > small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.input, .textarea, .select {
  width: 100%; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s;
}
.textarea { min-height: 90px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-2 .field + .field { margin-top: 0; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin-top: 2px; }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.form-error { color: var(--danger); font-size: 13.5px; min-height: 0; }
.form-error:not(:empty) { margin-top: 12px; }

.emoji-row { display: flex; flex-wrap: wrap; gap: 8px; }
.emoji-row button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2);
  font-size: 22px; cursor: pointer; transition: transform .12s; }
.emoji-row button:hover { transform: scale(1.06); }
.emoji-row button.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

/* ---------------- Auth ---------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(150deg, #2a0f16 0%, #4a1322 40%, #1b2a4d 100%); color: #fbf6ee; }
.auth-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 400px at 80% 20%, rgba(255,210,140,.18), transparent 60%),
              radial-gradient(500px 400px at 10% 90%, rgba(140,120,255,.22), transparent 60%); }
.auth-hero h1 { font-size: clamp(36px, 5.2vw, 64px); font-weight: 600; max-width: 12ch; position: relative; z-index: 1; }
.auth-hero h1 em { font-style: italic; color: #ffcf8a; }
.auth-hero p { max-width: 42ch; opacity: .82; font-size: 16px; margin-top: 18px; position: relative; z-index: 1; }
.auth-hero .brand { color: #fff; position: relative; z-index: 1; }
.hero-tiles { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-tile { padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(8px); min-width: 150px; animation: floaty 6s ease-in-out infinite; }
.hero-tile:nth-child(2) { animation-delay: -2s; } .hero-tile:nth-child(3) { animation-delay: -4s; }
.hero-tile b { display: block; font-size: 14px; } .hero-tile span { font-size: 12.5px; opacity: .75; }
.hero-tile i { font-style: normal; font-size: 22px; display: block; margin-bottom: 6px; }
@keyframes floaty { 50% { transform: translateY(-6px); } }
.auth-side { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 410px; }
.auth-card h2 { font-size: 30px; }
.invite-banner { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r); margin-bottom: 22px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.invite-banner .big-emoji { font-size: 30px; }
@media (max-width: 880px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 28px 22px 30px; min-height: 0; gap: 26px; }
  .auth-hero .hero-tiles { display: none; }
}

/* ---------------- Home ---------------- */
.hello h1 { margin-top: 6px; max-width: 18ch; }
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
@media (max-width: 860px) { .type-grid { grid-template-columns: 1fr; } }
.type-tile {
  position: relative; overflow: hidden; text-align: left; cursor: pointer; text-decoration: none; color: var(--ink);
  padding: 22px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s; display: flex; flex-direction: column; gap: 10px; min-height: 196px;
}
.type-tile::before { content: ''; position: absolute; inset: auto -40px -60px auto; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%); transition: transform .4s ease; }
.type-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.type-tile:hover::before { transform: scale(1.25); }
.type-tile .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 10px 24px -10px var(--accent); }
.type-tile h3 { font-size: 21px; }
.type-tile p { color: var(--muted); font-size: 14px; position: relative; }
.type-tile .go { margin-top: auto; font-weight: 600; color: var(--accent); font-size: 14px; position: relative; }

.join-box { display: flex; gap: 10px; align-items: center; padding: 10px 10px 10px 18px; border-radius: 999px;
  background: var(--surface); border: 1px dashed var(--line-2); margin-top: 18px; }
.join-box input { flex: 1; border: 0; background: transparent; padding: 6px 0; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; min-width: 0; }
.join-box input:focus { outline: none; }
.join-box input::placeholder { letter-spacing: normal; text-transform: none; font-weight: 400; color: var(--muted); }

.round-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.round-card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--ink); padding: 18px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .2s; position: relative; overflow: hidden; }
.round-card::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--accent), var(--accent-2)); }
.round-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.round-card .top { display: flex; gap: 12px; align-items: center; }
.round-card .emo { font-size: 28px; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); flex: none; }
.round-card h3 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; padding: 42px 20px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--muted); }
.empty .big { font-size: 40px; display: block; margin-bottom: 8px; }

/* ---------------- Round page ---------------- */
.hero-band { position: relative; overflow: hidden; border-radius: 26px; padding: 28px; color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 55%, var(--accent-2)) 55%, var(--accent-2) 100%);
  box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--accent) 70%, transparent); }
.hero-band::before { content: ''; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.35) 1px, transparent 1.2px); background-size: 22px 22px;
  mask-image: linear-gradient(120deg, transparent 30%, #000 100%); -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000 100%); }
.hero-band > * { position: relative; }
.hero-band .emo { font-size: 46px; line-height: 1; }
.hero-band h1 { color: #fff; margin-top: 10px; }
.hero-band .desc { opacity: .9; margin-top: 8px; max-width: 60ch; white-space: pre-line; }
.hero-band .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.hero-band .chip { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.22); color: #fff; backdrop-filter: blur(6px); }
.hero-band .back { color: #fff; opacity: .85; text-decoration: none; font-size: 13.5px; font-weight: 600; }
.countdown { position: absolute; right: 26px; top: 26px; text-align: right; }
.countdown b { font-family: var(--display); font-size: 46px; line-height: 1; display: block; }
.countdown span { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; opacity: .85; }
@media (max-width: 640px) { .countdown { position: static; text-align: left; margin-top: 16px; } .countdown b { font-size: 34px; display: inline; margin-right: 6px; } }

.tabs { display: flex; gap: 4px; margin: 22px 0 22px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 12px 14px; text-decoration: none; font-weight: 600; font-size: 14.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-color: var(--accent); }
.tabs a .badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; margin-left: 6px; }

.layout-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.layout-2 > *, .stack > *, .grid-2 > * { min-width: 0; }
@media (max-width: 900px) { .layout-2 { grid-template-columns: 1fr; } }
.icon-btn svg { width: 18px; height: 18px; }

/* Envelope reveal */
.reveal { perspective: 1400px; }
.envelope { position: relative; height: 260px; cursor: pointer; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2,.8,.2,1); border-radius: 22px; }
.envelope.open { transform: rotateY(180deg); cursor: default; }
.envelope .face { position: absolute; inset: 0; border-radius: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; overflow: hidden; }
.envelope .front { background: linear-gradient(145deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: var(--shadow-lg); }
.envelope .front::before { content: ''; position: absolute; left: -10%; right: -10%; top: -48%; height: 100%;
  background: rgba(255,255,255,.12); transform: rotate(0deg); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.envelope .seal { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; position: relative;
  background: radial-gradient(circle at 35% 30%, #ffe1a6, var(--gold)); box-shadow: 0 8px 22px -6px rgba(0,0,0,.45), inset 0 -3px 6px rgba(0,0,0,.2);
  animation: wobble 2.6s ease-in-out infinite; }
@keyframes wobble { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-9deg); } 90% { transform: rotate(8deg); } 95% { transform: rotate(-4deg); } }
.envelope .front p { margin-top: 18px; font-weight: 600; position: relative; }
.envelope .front small { opacity: .8; margin-top: 4px; position: relative; }
.envelope .back { transform: rotateY(180deg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.envelope .back .who { font-family: var(--display); font-size: clamp(34px, 6vw, 52px); font-weight: 700; margin: 8px 0 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.envelope .back::before { content: ''; position: absolute; inset: 10px; border-radius: 16px; border: 1px dashed var(--line-2); pointer-events: none; }

.progress { height: 10px; border-radius: 999px; background: var(--bg-2); overflow: hidden; border: 1px solid var(--line); }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .6s ease; }

.toggle-ready { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; }
.switch { width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch.on { background: var(--ok); } .switch.on::after { transform: translateX(18px); }

.member-list { display: flex; flex-wrap: wrap; gap: 8px; }
.member { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; }
.member .avatar { width: 26px; height: 26px; font-size: 11.5px; }
.member .x { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 15px; padding: 0 0 0 2px; }
.member .x:hover { color: var(--danger); }

.invite { display: flex; gap: 8px; align-items: center; padding: 8px 8px 8px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.invite code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; color: var(--ink-2); }
.code-big { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 22px; letter-spacing: .2em; font-weight: 700; }

/* Wishes */
.wl { margin-bottom: 26px; }
.wl-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.wl-head h3 { font-size: 19px; }
.wl.highlight > .wl-body { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent), var(--shadow); }
.wl-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.wish { display: flex; gap: 14px; padding: 16px 18px; align-items: flex-start; }
.wish + .wish { border-top: 1px solid var(--line); }
.wish .prio { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 14px; letter-spacing: -2px; }
.wish .t { font-weight: 600; font-size: 15.5px; word-break: break-word; }
.wish .t a { text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent); text-underline-offset: 3px; }
.wish .n { color: var(--muted); font-size: 13.5px; margin-top: 3px; white-space: pre-line; word-break: break-word; }
.wish .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.wish .act { flex: none; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.wish.taken { background: repeating-linear-gradient(-45deg, transparent 0 10px, color-mix(in srgb, var(--line) 45%, transparent) 10px 20px); }
.wish.taken .t { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--muted); }
.wish .gg { margin-top: 10px; max-width: 320px; }
.wish .gg .progress { height: 8px; }
@media (max-width: 560px) { .wish { flex-wrap: wrap; } .wish .act { width: 100%; justify-content: flex-start; padding-left: 52px; } }
.wl-empty { padding: 22px 18px; color: var(--muted); font-size: 14px; }

/* Chat */
.chat { display: flex; flex-direction: column; height: min(62vh, 560px); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 18px; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.bubble.them { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; align-self: flex-start; }
.bubble.me { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--accent-2))); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.bubble time { display: block; font-size: 11px; opacity: .65; margin-top: 3px; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-form .input { border-radius: 999px; }
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.anon-badge { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

/* Dice */
.dice-wrap { display: flex; gap: 20px; align-items: center; }
.die { width: 84px; height: 84px; border-radius: 20px; flex: none; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 12px; gap: 2px;
  background: linear-gradient(145deg, #fff, #ece6dc); box-shadow: 0 10px 24px -10px rgba(0,0,0,.4), inset 0 -4px 0 rgba(0,0,0,.08); cursor: pointer; }
:root[data-theme="dark"] .die { background: linear-gradient(145deg, #3a3631, #26231f); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .die { background: linear-gradient(145deg, #3a3631, #26231f); } }
.die i { width: 13px; height: 13px; border-radius: 50%; background: var(--accent); place-self: center; visibility: hidden; }
.die.rolling { animation: roll .6s ease; }
@keyframes roll { 0% { transform: rotate(0) scale(1); } 40% { transform: rotate(200deg) scale(.85); } 100% { transform: rotate(360deg) scale(1); } }
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-top: 14px; font-size: 13.5px; }
.rules div { display: flex; gap: 8px; padding: 6px 8px; border-radius: 10px; }
.rules div.hit { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.rules b { font-family: var(--display); width: 16px; }
@media (max-width: 520px) { .rules { grid-template-columns: 1fr; } }

.pairs { display: grid; gap: 8px; }
.pair { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 500; }
.pair .arr { color: var(--accent); }

.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-plain li:last-child { border-bottom: 0; }

/* Tips row */
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
@media (max-width: 760px) { .feature-row { grid-template-columns: 1fr; } }
.feature { display: flex; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.feature i { font-style: normal; font-size: 20px; }
.feature b { display: block; font-size: 14px; } .feature span { font-size: 13px; color: var(--muted); }

/* ---------------- Modal & Toast ---------------- */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(20, 15, 10, .45); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 16px; animation: fade .2s ease; }
.modal { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border-radius: 22px; padding: 24px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); animation: pop .25s cubic-bezier(.2,.9,.3,1.2); }
.modal h2 { margin-bottom: 8px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(10px) scale(.97); opacity: 0; } }

#toasts { position: fixed; z-index: 200; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); }
.toast { pointer-events: auto; padding: 11px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 500; font-size: 14px; box-shadow: var(--shadow-lg); animation: pop .25s ease; max-width: 100%; }
.toast.err { background: var(--danger); color: #fff; }

.spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--accent); animation: sp .7s linear infinite; margin: 60px auto; }
@keyframes sp { to { transform: rotate(360deg); } }
.fade-in { animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Teilnehmerplätze */
.stepper { display: flex; align-items: stretch; max-width: 220px; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.stepper .input { border: 0; border-radius: 0; text-align: center; font-weight: 700; font-size: 17px; -moz-appearance: textfield; background: transparent; }
.stepper .input:focus { box-shadow: none; }
.stepper .input::-webkit-outer-spin-button, .stepper .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper button { width: 48px; flex: none; border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--accent); font-weight: 600; }
.stepper button:hover:not([disabled]) { background: var(--accent-soft); }
.stepper button[disabled], .stepper .input[disabled] { opacity: .5; cursor: not-allowed; }
.slots-meter { max-width: 360px; margin: 18px auto 0; text-align: left; }
.seats { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 10px; margin: 20px auto 0; max-width: 520px; }
.seat { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 56px; }
.seat .avatar { width: 40px; height: 40px; font-size: 14px; }
.seat .avatar.seat-free { background: transparent; color: var(--muted); border: 2px dashed var(--line-2); font-weight: 600; }
.seat em { font-style: normal; font-size: 11.5px; color: var(--muted); max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat.filled em { color: var(--ink-2); font-weight: 500; }
.seat.filled .avatar { animation: pop .35s ease both; }

/* ============================================================
   Version 3 – Ankündigung, Badges, Admin-Bereich
   ============================================================ */
.ellipsis { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted-link { color: var(--muted); font-weight: 500; }
.type-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.type-grid.cols-1 { grid-template-columns: 1fr; max-width: 420px; }
@media (max-width: 860px) { .type-grid.cols-2 { grid-template-columns: 1fr; } }

.announce { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; margin-bottom: 26px; border-radius: var(--r);
  background: linear-gradient(120deg, color-mix(in srgb, var(--gold) 16%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); box-shadow: var(--shadow); }
.announce span { font-size: 20px; line-height: 1.3; }
.announce p { white-space: pre-line; font-weight: 500; }

.unread-dot { position: absolute; top: 14px; right: 14px; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--accent);
  box-shadow: 0 0 0 3px var(--surface); animation: pop .3s ease; }
.seg .dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 11px; }
.seg button[disabled] { opacity: .45; cursor: not-allowed; }

.danger-details { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }
.danger-details summary { cursor: pointer; color: var(--danger); font-weight: 600; font-size: 14px; list-style: none; }
.danger-details summary::-webkit-details-marker { display: none; }
.danger-details summary::before { content: '▸ '; }
.danger-details[open] summary::before { content: '▾ '; }

/* Admin */
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-head h1 { margin-top: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
@media (max-width: 1000px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.stat b { display: block; font-family: var(--display); font-size: 30px; line-height: 1.1; }
.stat span { display: block; font-weight: 600; font-size: 13.5px; margin-top: 4px; }
.stat small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.type-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin-top: 14px; background: var(--bg-2); gap: 2px; }
.type-bar > div { background: linear-gradient(90deg, var(--accent), var(--accent-2)); min-width: 0; }
.legend { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); display: inline-block; }
.mini-emo { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--accent-soft); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { flex: 1 1 240px; border-radius: 999px; padding-left: 40px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center / 17px; }
.toolbar .seg { overflow-x: auto; max-width: 100%; }
.admin-row { display: flex; gap: 14px; align-items: center; padding: 14px 18px; }
.admin-row + .admin-row { border-top: 1px solid var(--line); }
.admin-row:hover { background: var(--surface-2); }
.row-actions { display: flex; gap: 6px; flex: none; align-items: center; }
@media (max-width: 640px) {
  .admin-row { flex-wrap: wrap; }
  .admin-row > .grow { flex: 1 1 calc(100% - 60px); }
  .row-actions { width: 100%; padding-left: 54px; flex-wrap: wrap; }
  .row-actions .spacer { display: none; }
}

.switch-row { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row b { display: block; font-size: 14.5px; }
.switch-row .small { display: block; }
.switch-row input:checked + .switch { background: var(--ok); }
.switch-row input:checked + .switch::after { transform: translateX(18px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-row.disabled { opacity: .55; cursor: not-allowed; }
.switch-row code { font-size: 12px; }

.dice-edit { display: grid; gap: 8px; margin-top: 14px; }
.dice-edit label { display: flex; gap: 10px; align-items: center; }
.dice-edit b { font-family: var(--display); width: 22px; text-align: center; color: var(--c-schrott); font-size: 18px; }
.preview { margin-top: 16px; padding: 18px; border-radius: var(--r-sm); color: #fbf6ee; background: linear-gradient(150deg, #2a0f16 0%, #4a1322 40%, #1b2a4d 100%); }
.preview .eyebrow { color: rgba(255,255,255,.6); }
.preview .prev-brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; margin: 8px 0 12px; }
.preview .brand-mark { width: 22px; height: 22px; font-size: 11px; border-radius: 7px; }
.preview h2 { color: #fff; font-size: 26px; }
.preview h2 em { color: #ffcf8a; }
.preview p { opacity: .8; font-size: 13.5px; margin-top: 8px; }
.save-bar { position: sticky; bottom: 16px; box-shadow: var(--shadow-lg); }

.row-actions .spacer { width: 38px; height: 38px; display: inline-block; }

/* ============================================================
   Gemeinsame Liste & öffentliche Seite
   ============================================================ */
.type-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.type-grid.cols-4 .type-tile { min-height: 230px; }
@media (max-width: 1100px) { .type-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .type-grid.cols-4 { grid-template-columns: 1fr; } .type-grid.cols-4 .type-tile { min-height: 0; } }
.type-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .type-grid.cols-3 { grid-template-columns: 1fr; } }

.shared-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.chip.author { padding-left: 3px; }
.chip.author .avatar { width: 20px; height: 20px; font-size: 9.5px; }
.wish.shared.done .t { color: var(--muted); }
.wish.shared.done .prio { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); letter-spacing: 0; font-size: 16px; }
.wish.shared .act .icon-btn { width: 32px; height: 32px; font-size: 14px; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
