/* ════════════════════════════════════════════════════════════
   NOVA Public – Design 2026
   Tiefes Sternenblau · warmes Gold · Glasflächen · sanfte Bewegung
   ════════════════════════════════════════════════════════════ */
:root {
  --bg:        #070a14;
  --bg-2:      #0d1124;
  --surface:   rgba(148, 163, 216, 0.055);
  --surface-2: rgba(148, 163, 216, 0.10);
  --line:      rgba(170, 185, 235, 0.13);
  --line-soft: rgba(170, 185, 235, 0.08);
  --text:      #eceef7;
  --muted:     #9aa2c0;
  --ice:       #9fd4ee;
  --lavender:  #c3b2f0;
  --gold:      #e3c98f;
  --gold-2:    #f0dfb2;
  --gold-soft: rgba(227, 201, 143, 0.13);
  --danger:    #eba8a8;
  --ok:        #9fd8b0;

  --grad-gold: linear-gradient(135deg, #f0dfb2, #e3c98f 55%, #cfa964);
  --grad-hero: linear-gradient(92deg, var(--ice), var(--lavender) 45%, var(--gold));

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --radius:    16px;
  --radius-lg: 20px;
  --max: 760px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* ── Sternenhimmel mit Leuchten, Twinklen & Komet ────────── */
.sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 78% 12%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 64% 34%, rgba(159,212,238,.7), transparent 60%),
    radial-gradient(1px 1px at 30% 62%, rgba(255,255,255,.45), transparent 60%),
    radial-gradient(1px 1px at 88% 70%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 8% 84%, rgba(227,201,143,.65), transparent 60%),
    radial-gradient(1px 1px at 46% 8%,  rgba(255,255,255,.4),  transparent 60%),
    radial-gradient(1px 1px at 54% 88%, rgba(195,178,240,.55), transparent 60%),
    radial-gradient(1px 1px at 22% 40%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1px 1px at 92% 44%, rgba(255,255,255,.4),  transparent 60%),
    radial-gradient(1px 1px at 38% 26%, rgba(255,255,255,.3),  transparent 60%),
    radial-gradient(1px 1px at 70% 52%, rgba(255,255,255,.3),  transparent 60%),
    radial-gradient(70% 50% at 85% -10%, rgba(195,178,240,.14), transparent 70%),
    radial-gradient(60% 45% at -10% 108%, rgba(159,212,238,.10), transparent 70%),
    radial-gradient(45% 35% at 50% 115%, rgba(227,201,143,.07), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.sky::before, .sky::after {
  content: ""; position: absolute; border-radius: 50%;
  animation: twinkle 5s ease-in-out infinite;
}
.sky::before { width: 2px; height: 2px; left: 24%; top: 12%; background: #fff; box-shadow: 0 0 12px 2px rgba(255,255,255,.5); animation-delay: 1.2s; }
.sky::after  { width: 2px; height: 2px; left: 82%; top: 38%; background: var(--gold-2); box-shadow: 0 0 12px 2px rgba(227,201,143,.5); animation-delay: 2.8s; }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* ── Grundlayout Chat ─────────────────────────────────────── */
.app {
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
  max-width: var(--max); margin: 0 auto;
  padding: 0 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) 0 10px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.mark { width: 32px; height: 32px; flex: none; fill: var(--gold); filter: drop-shadow(0 0 12px rgba(227,201,143,.45)); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.brand:hover .mark { transform: rotate(90deg); }
.brand h1 {
  margin: 0; font: 600 1.45rem/1.1 var(--serif); letter-spacing: .01em;
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tagline { margin: 2px 0 0; font-size: .78rem; color: var(--muted); letter-spacing: .07em; text-transform: uppercase; }

button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: .9rem; color: var(--text);
  transition: border-color .2s, background .2s, transform .15s;
}
.ghost:hover { border-color: rgba(227,201,143,.5); background: var(--gold-soft); transform: translateY(-1px); }
.ghost svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.disclaimer {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 4px 0 8px; padding: 10px 14px;
  border: 1px solid rgba(159,212,238,.22); border-radius: 12px;
  background: rgba(159,212,238,.05);
  font-size: .88rem; line-height: 1.45; color: #d6e8f2;
}
.disclaimer svg { width: 18px; height: 18px; flex: none; margin-top: 1px; fill: none; stroke: var(--ice); stroke-width: 2; stroke-linecap: round; }

/* ── Chatverlauf ──────────────────────────────────────────── */
.log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 12px 2px 20px; scroll-behavior: smooth; }
.log::-webkit-scrollbar { width: 8px; }
.log::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 99px; }

.welcome { text-align: center; padding: 8vh 8px 0; }
.welcome h2 { font: 500 clamp(1.6rem, 5vw, 2.1rem)/1.2 var(--serif); margin: 0 0 8px; color: var(--text); }
.welcome p { margin: 0 0 24px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip {
  padding: 10px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: .9rem; color: var(--text); text-align: left;
  transition: border-color .2s, background .2s, transform .15s;
}
.chip:hover { border-color: rgba(195,178,240,.55); background: rgba(195,178,240,.09); transform: translateY(-1px); }

.msg { display: flex; gap: 12px; margin: 18px 0; animation: rise .3s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.msg.user { justify-content: flex-end; }
.msg.user .bubble {
  max-width: 85%;
  padding: 11px 16px; border-radius: 18px 18px 5px 18px;
  background: linear-gradient(135deg, rgba(195,178,240,.20), rgba(159,212,238,.11));
  border: 1px solid rgba(195,178,240,.25);
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
  white-space: pre-wrap; overflow-wrap: anywhere;
}

.msg.bot .avatar {
  width: 30px; height: 30px; flex: none; margin-top: 2px;
  display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(227,201,143,.4); background: var(--gold-soft);
  box-shadow: 0 0 14px rgba(227,201,143,.2);
}
.msg.bot .avatar svg { width: 15px; height: 15px; fill: var(--gold); }
.msg.bot .body { flex: 1; min-width: 0; }
.msg.bot .content { overflow-wrap: anywhere; }
.msg.bot .content > :first-child { margin-top: 0; }
.msg.bot .content > :last-child { margin-bottom: 0; }

.content p { margin: 0 0 .75em; }
.content h3, .content h4 { font-family: var(--serif); font-weight: 600; margin: 1em 0 .4em; color: var(--text); }
.content h3 { font-size: 1.15rem; } .content h4 { font-size: 1.02rem; }
.content ul, .content ol { margin: 0 0 .75em; padding-left: 1.4em; }
.content li { margin: .2em 0; }
.content li::marker { color: var(--lavender); }
.content strong { color: #fff; font-weight: 600; }
.content a { color: var(--ice); text-underline-offset: 3px; }
.content code {
  font: .88em var(--mono); padding: .12em .4em; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.content pre {
  margin: 0 0 .75em; padding: 12px 14px; border-radius: 12px; overflow-x: auto;
  background: rgba(0,0,0,.35); border: 1px solid var(--line);
}
.content pre code { padding: 0; border: 0; background: none; font-size: .86rem; line-height: 1.5; }
.content blockquote { margin: 0 0 .75em; padding-left: 12px; border-left: 2px solid var(--gold); color: var(--muted); }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 1em 0; }

.tools { display: flex; gap: 6px; margin-top: 8px; min-height: 28px; flex-wrap: wrap; align-items: center; }
.tools[hidden] { display: none; }
.copy {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--muted); font-size: .8rem;
  transition: color .2s, border-color .2s, background .2s;
}
.copy:hover { color: var(--text); border-color: var(--line); background: var(--surface); }
.copy svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.copy.done { color: var(--gold); border-color: rgba(227,201,143,.4); }
.copy.vote { padding: 4px 7px; }
.copy.vote svg { width: 15px; height: 15px; }
.copy.vote.chosen { color: var(--gold); border-color: rgba(227,201,143,.4); }
.copy.vote:disabled:not(.chosen) { opacity: .35; cursor: default; }
.copy[hidden] { display: none; }
.tools .spacer { flex: 1; }
.copy.speak.on { color: var(--gold); border-color: rgba(227,201,143,.4); }

.note { margin-top: 8px; font-size: .84rem; color: var(--muted); font-style: italic; }
.note.error { color: var(--danger); font-style: normal; }

.typing { display: inline-flex; gap: 5px; padding: 8px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--lavender); opacity: .35; animation: blink 1.3s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: .9; } }

/* ── Eingabebereich ───────────────────────────────────────── */
.composer-wrap { padding: 8px 0 max(10px, env(safe-area-inset-bottom)); }

.banner {
  margin-bottom: 10px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid rgba(227,201,143,.4); background: var(--gold-soft);
  font-size: .9rem; color: #f4e8cc;
}
.banner[hidden] { display: none; }
.banner.error { border-color: rgba(235,168,168,.45); background: rgba(235,168,168,.08); color: #f5d6d6; }
.banner-action {
  display: table; margin: 8px 0 0; padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(227,201,143,.55); background: transparent; color: var(--gold); font-size: .85rem;
  transition: background .2s;
}
.banner-action:hover { background: var(--gold-soft); }

.turnstile:not(:empty) { display: flex; justify-content: center; margin-bottom: 10px; }

.composer {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 8px 8px 8px 16px; border-radius: 24px;
  background: rgba(13,17,36,.85); border: 1px solid var(--line);
  box-shadow: 0 12px 44px rgba(0,0,0,.4);
  transition: border-color .2s, box-shadow .2s;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.composer:focus-within { border-color: rgba(227,201,143,.55); box-shadow: 0 12px 44px rgba(0,0,0,.4), 0 0 0 3px rgba(227,201,143,.08); }
.composer textarea {
  flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: transparent;
  color: var(--text); font: 16px/1.5 var(--sans);
  padding: 7px 0; max-height: 40vh;
}
.composer textarea::placeholder { color: #69708e; }
.send {
  width: 42px; height: 42px; flex: none; border-radius: 50%; border: 0;
  display: grid; place-items: center;
  background: var(--grad-gold); color: #221b0e;
  box-shadow: 0 4px 16px rgba(227,201,143,.3);
  transition: opacity .2s, transform .12s, box-shadow .2s;
}
.send:hover:not(:disabled) { box-shadow: 0 6px 22px rgba(227,201,143,.45); }
.send:active:not(:disabled) { transform: scale(.93); }
.send:disabled { opacity: .3; box-shadow: none; }
.send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.send.stop { background: var(--surface-2); color: var(--text); border: 1px solid rgba(227,201,143,.45); box-shadow: none; }
.send.stop svg { fill: currentColor; stroke: none; width: 16px; height: 16px; }

.meta { display: flex; justify-content: space-between; gap: 12px; margin: 6px 6px 0; font-size: .8rem; color: var(--muted); }
#count.over { color: var(--danger); }

.legal { display: flex; justify-content: center; gap: 8px; margin-top: 6px; font-size: .78rem; color: #69708e; }
.legal a { color: var(--muted); text-decoration: none; }
.legal a:hover { color: var(--text); text-decoration: underline; }

.actions { display: flex; gap: 8px; flex: none; }
.ghost.icon-only { padding: 9px; }
#accountBtn.signed { border-color: rgba(227,201,143,.4); color: var(--gold); }

/* ── Dialoge (Anmeldung, Slot) ────────────────────────────── */
.auth {
  width: min(400px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: 28px 24px 24px; border-radius: 22px;
  background: linear-gradient(170deg, #151a3a, #0e1229);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: 0 28px 90px rgba(0,0,0,.6);
}
.auth::backdrop { background: rgba(4,6,13,.75); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.auth h2 { margin: 0 0 14px; font: 600 1.45rem/1.2 var(--serif); }
.auth .close {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px;
  display: grid; place-items: center; border-radius: 50%;
  background: transparent; border: 0; color: var(--muted);
  transition: color .2s, background .2s;
}
.auth .close:hover { color: var(--text); background: var(--surface-2); }
.auth .close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.tabs button { flex: 1; padding: 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: .92rem; transition: color .2s, background .2s; }
.tabs button[aria-selected="true"] { background: var(--gold-soft); color: var(--gold); }

.perk { margin: 0 0 16px; font-size: .9rem; color: #d6e8f2; }
.auth label { display: block; margin-bottom: 12px; font-size: .85rem; color: var(--muted); }
.auth input {
  display: block; width: 100%; margin-top: 5px; padding: 11px 13px;
  border-radius: 11px; border: 1px solid var(--line); background: rgba(0,0,0,.28);
  color: var(--text); font: 16px/1.3 var(--sans);
  transition: border-color .2s;
}
.auth input:focus { outline: none; border-color: rgba(227,201,143,.6); }
.auth .small { font-size: .8rem; line-height: 1.5; color: var(--muted); margin: 0 0 12px; }
.auth .small a { color: var(--ice); }
.form-error { margin: 0 0 12px; padding: 9px 12px; border-radius: 10px; font-size: .86rem; color: #f5d6d6; background: rgba(235,168,168,.08); border: 1px solid rgba(235,168,168,.4); }
.form-ok { margin: 0 0 12px; padding: 9px 12px; border-radius: 10px; font-size: .86rem; color: #f4e8cc; background: var(--gold-soft); border: 1px solid rgba(227,201,143,.4); }
.form-ok[hidden], .form-error[hidden] { display: none; }

.primary, .danger {
  width: 100%; padding: 12px; border: 0; border-radius: 12px;
  font-weight: 600; font-size: .95rem;
  transition: filter .2s, transform .12s;
}
.primary { background: var(--grad-gold); color: #221b0e; box-shadow: 0 6px 20px rgba(227,201,143,.25); }
.primary:hover:not(:disabled) { filter: brightness(1.06); }
.primary:active:not(:disabled) { transform: scale(.98); }
.primary:disabled, .danger:disabled { opacity: .5; }
.danger { background: rgba(235,168,168,.14); color: #f5d6d6; border: 1px solid rgba(235,168,168,.45); }
.primary.small, .primary-link.small { width: auto; padding: 9px 18px; font-size: .92rem; }

.danger-zone { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.danger-zone summary { cursor: pointer; font-size: .88rem; color: var(--muted); }
.danger-zone summary:hover { color: var(--danger); }
.pw-zone summary:hover { color: var(--text); }
.danger-zone form { margin-top: 12px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Ankündigung ──────────────────────────────────────────── */
.announce {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 4px 0 6px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid rgba(227,201,143,.45); background: var(--gold-soft);
  font-size: .9rem; color: #f4e8cc;
}
.announce[hidden] { display: none; }
.announce > svg { width: 18px; height: 18px; flex: none; margin-top: 1px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.announce span { flex: 1; overflow-wrap: anywhere; }
.announce button { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.announce button:hover { color: var(--text); background: rgba(255,255,255,.07); }
.announce button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ── Modusleiste: Modus, Websuche, Werkzeuge ──────────────── */
.modebar { display: flex; align-items: center; gap: 6px; margin: 0 4px 8px; font-size: .82rem; color: var(--muted); min-width: 0; flex-wrap: wrap; }
.modebar[hidden] { display: none; }
.modebar select {
  appearance: none; -webkit-appearance: none;
  padding: 5px 28px 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text); font: inherit; font-size: .85rem;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%239aa2c0' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 9px center / 12px;
  transition: border-color .2s;
}
.modebar select:hover { border-color: rgba(227,201,143,.4); }
.modebar select:focus { outline: none; border-color: rgba(227,201,143,.6); }
.modebar select option { background: #12172e; color: var(--text); }
.mode-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mode-wrap[hidden], .tool-wrap[hidden], .pill[hidden] { display: none; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font-size: .85rem; line-height: 1.3; white-space: nowrap;
  transition: border-color .2s, background .2s, color .2s;
}
.pill:hover { border-color: rgba(227,201,143,.5); }
.pill.on { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); }
.pill .short { display: none; }

.tool-wrap { position: relative; }
.tool-menu {
  position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 20;
  display: flex; flex-direction: column; min-width: 240px; padding: 6px;
  border-radius: 14px; background: #161b3c; border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(0,0,0,.55);
}
.tool-menu[hidden] { display: none; }
.tool-menu button {
  text-align: left; padding: 9px 12px; border: 0; border-radius: 9px;
  background: transparent; color: var(--text); font-size: .9rem;
}
.tool-menu button:hover, .tool-menu button:focus-visible { background: var(--gold-soft); color: var(--gold); outline: none; }

/* ── Foto- & PDF-Anhang ───────────────────────────────────── */
.composer { padding-left: 8px; }
.photo-btn {
  width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0;
  display: grid; place-items: center; background: transparent; color: var(--muted);
  transition: color .2s, background .2s;
}
.photo-btn:hover { color: var(--gold); background: var(--gold-soft); }
.photo-btn[hidden] { display: none; }
.photo-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.composer textarea { padding-left: 6px; }

.photo-preview {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px; padding: 8px 10px 8px 8px; border-radius: 14px;
  background: var(--surface); border: 1px solid rgba(227,201,143,.4);
}
.photo-preview[hidden] { display: none; }
.photo-preview img { width: 56px; height: 56px; flex: none; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.photo-preview img[hidden] { display: none; }
.photo-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: .8rem; color: var(--muted); line-height: 1.35; }
.photo-info strong { color: var(--text); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-preview button { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.photo-preview button:hover { color: var(--text); background: var(--surface-2); }
.photo-preview button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.bubble .photo { display: block; max-width: min(260px, 100%); max-height: 260px; border-radius: 12px; margin: 2px 0 6px; object-fit: cover; }
.bubble .photo:only-child { margin-bottom: 2px; }
.bubble .photo-tag { display: inline-block; font-size: .82rem; color: var(--muted); margin-bottom: 4px; }
.composer.drag { border-color: var(--gold); background: rgba(227,201,143,.08); }

.pdf-icon {
  width: 56px; height: 56px; flex: none; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid rgba(235,168,168,.5);
  background: rgba(235,168,168,.1); color: #f5d6d6; font-weight: 700; font-size: .8rem; letter-spacing: .05em;
}
.pdf-icon[hidden] { display: none; }

/* ── Websuche: Status & Quellen ───────────────────────────── */
.bot-status { margin: 4px 0 0; font-size: .85rem; color: var(--ice); }
.bot-status[hidden] { display: none; }
.bot-status::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--ice); animation: blink 1.2s infinite; vertical-align: 1px; }
.sources {
  display: flex; flex-direction: column; gap: 3px; margin-top: 10px; padding: 10px 12px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: .84rem;
}
.sources[hidden] { display: none; }
.src-title { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.sources a { color: var(--ice); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sources a:hover { text-decoration: underline; }
.sources small { color: var(--muted); }

/* ── Admin-Seite ──────────────────────────────────────────── */
.page { max-width: 720px; margin: 0 auto; padding: 32px 16px 64px; }
.page a.back { color: var(--muted); text-decoration: none; font-size: .9rem; }
.page a.back:hover { color: var(--text); }
.page h1 { font: 600 2rem/1.2 var(--serif); margin: 20px 0 24px; }
.page h2 { font: 600 1.2rem/1.3 var(--serif); margin: 32px 0 8px; color: var(--gold); }
.page h3 { font-size: 1rem; margin: 20px 0 6px; }
.page p, .page li { color: #d6d9e8; }
.page a { color: var(--ice); }
.page .ph { background: var(--gold-soft); color: var(--gold); padding: 0 4px; border-radius: 4px; }
.page .hint { font-size: .88rem; color: var(--muted); border-left: 2px solid var(--gold); padding-left: 12px; }

.page.admin { max-width: 880px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin h2 { color: var(--text); }
.muted { color: var(--muted); font-weight: 400; font-family: var(--sans); font-size: .9rem; }
.admin-notice { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.admin-notice.error { color: #f5d6d6; border-color: rgba(235,168,168,.45); background: rgba(235,168,168,.08); }

.meter { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.meter > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--ice), var(--lavender)); transition: width .4s; }
.meter > div.high { background: linear-gradient(90deg, var(--gold), var(--danger)); }
.meter-label { margin: 8px 0 18px; font-size: .88rem; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.stat { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s; }
.stat:hover { border-color: rgba(227,201,143,.3); }
.stat-value { font: 600 1.6rem/1.1 var(--serif); color: var(--gold); }
.stat-label { margin-top: 4px; font-size: .85rem; color: #d6d9e8; }
.stat-sub { margin-top: 2px; font-size: .75rem; color: var(--muted); }

.search {
  width: 100%; margin: 4px 0 8px; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text); font: 16px/1.3 var(--sans);
}
.search:focus { outline: none; border-color: rgba(227,201,143,.6); }
.users { display: grid; gap: 8px; margin-top: 12px; }
.user { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.user-name { font-weight: 600; overflow-wrap: anywhere; }
.user-meta { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.user-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge { margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600; color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(227,201,143,.4); vertical-align: 2px; }
.mini { padding: 6px 12px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--text); font-size: .82rem; transition: border-color .2s, background .2s; }
.mini:hover { border-color: rgba(227,201,143,.5); background: var(--gold-soft); }
.mini:disabled { opacity: .5; }
.danger-mini { color: #f5d6d6; border-color: rgba(235,168,168,.4); }
.danger-mini:hover { border-color: rgba(235,168,168,.75); background: rgba(235,168,168,.08); }
.pw-form { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pw-form[hidden] { display: none; }
.pw-form input { flex: 1 1 200px; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text); font: 16px/1.3 var(--sans); }
.pw-msg { flex-basis: 100%; margin: 0; font-size: .82rem; color: var(--gold); }
.pw-msg:empty { display: none; }
.pw-msg.error { color: var(--danger); }
.admin-link { display: block; text-align: center; margin: 0 0 12px; padding: 10px; border-radius: 12px; border: 1px solid rgba(227,201,143,.4); color: var(--gold); text-decoration: none; font-size: .92rem; transition: background .2s; }
.admin-link:hover { background: var(--gold-soft); }

.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 120px; margin: 14px 0 6px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.bar-fill { width: 100%; max-width: 22px; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--gold-2), rgba(227,201,143,.3)); }
.bar-label { font-size: .65rem; color: var(--muted); }
.badge-blocked { color: #f5d6d6; background: rgba(235,168,168,.1); border-color: rgba(235,168,168,.45); }
.user.is-blocked .user-name { opacity: .7; }
.announce-form textarea { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text); font: 16px/1.4 var(--sans); resize: vertical; }
.announce-form textarea:focus { outline: none; border-color: rgba(227,201,143,.6); }
.announce-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }

/* ── Sternen-Slot ─────────────────────────────────────────── */
.slot { width: min(420px, calc(100vw - 32px)); }
.reels {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 14px; border-radius: 18px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(195,178,240,.18), rgba(0,0,0,.4));
  border: 1px solid rgba(227,201,143,.4);
  box-shadow: inset 0 0 30px rgba(0,0,0,.45), 0 8px 30px rgba(0,0,0,.3);
}
.reel {
  aspect-ratio: 1 / 1.15; display: grid; place-items: center; overflow: hidden;
  border-radius: 12px; background: rgba(7,10,20,.8); border: 1px solid var(--line);
  font-size: clamp(2.2rem, 11vw, 3rem); line-height: 1;
  transition: box-shadow .3s, border-color .3s;
}
.reel span { display: block; }
.reel.spinning span { filter: blur(1.5px); opacity: .85; animation: tumble .09s linear infinite; }
@keyframes tumble { from { transform: translateY(-14%); } to { transform: translateY(14%); } }
.reel.hit { border-color: var(--gold); box-shadow: 0 0 20px rgba(227,201,143,.5), inset 0 0 14px rgba(227,201,143,.22); }
.slot-result { min-height: 1.5em; margin: 12px 0; text-align: center; font: 600 1.05rem/1.4 var(--serif); color: var(--text); }
.slot-result.win { color: var(--gold); }
.slot-result.lose { color: var(--muted); font-weight: 400; }
.slot-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: .9rem; color: var(--muted); }
.slot-row strong { font: 600 1.25rem var(--serif); color: var(--ice); }
.bets { display: flex; gap: 6px; margin-bottom: 14px; }
.bets button {
  flex: 1; padding: 9px 0; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-size: .9rem;
  transition: border-color .2s, background .2s;
}
.bets button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.bets button:disabled { opacity: .35; }
.paytable { margin-top: 14px; font-size: .88rem; }
.paytable summary { cursor: pointer; color: var(--muted); }
.paytable summary:hover { color: var(--text); }
.paytable table { width: 100%; margin: 10px 0 6px; border-collapse: collapse; }
.paytable td { padding: 5px 4px; border-bottom: 1px solid var(--line); }
.paytable td:last-child { text-align: right; color: var(--gold); }

/* ════════════════════════════════════════════════════════════
   Website-Bereiche (Start, Werkzeuge, Spiele, News, Mitmachen)
   ════════════════════════════════════════════════════════════ */
body.site { min-height: 100vh; display: flex; flex-direction: column; }
.ph { background: var(--gold-soft); color: var(--gold); padding: 0 4px; border-radius: 4px; }
a.brand { color: inherit; text-decoration: none; }

/* Navigation */
.site-nav { position: sticky; top: 0; z-index: 30; background: rgba(7,10,20,.8); border-bottom: 1px solid var(--line-soft); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.page .site-nav { margin: -32px -16px 24px; }
.site-nav-inner { position: relative; max-width: 1040px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.site-brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 1.2rem/1 var(--serif); white-space: nowrap; }
.site-brand .mark { width: 24px; height: 24px; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.site-brand:hover .mark { transform: rotate(90deg); }
.nav-links { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav-links a { position: relative; padding: 7px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: .92rem; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(227,201,143,.3); padding: 6px 12px; }
.nav-toggle { display: none; margin-left: auto; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); place-items: center; }
.nav-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 760px) {
  .nav-toggle { display: grid; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; padding: 8px 12px 14px; background: rgba(7,10,20,.97); border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 14px; border-radius: 10px; font-size: 1rem; }
}

.site-footer { margin-top: auto; padding: 28px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 8px; font-size: .85rem; color: #69708e; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

/* Grundgerüst */
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 24px 16px 0; }
.wrap.narrow { max-width: 760px; }
.page-head { margin: 8px 0 20px; }
.page-head h1 { font: 600 clamp(1.8rem, 5vw, 2.4rem)/1.15 var(--serif); margin: 0 0 6px; }
.page-head p { margin: 0; }
.page-head a, .card a { color: var(--ice); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; }
.card h2 { font: 600 1.3rem/1.25 var(--serif); margin: 0 0 12px; }
.card h3 { font-size: 1rem; margin: 0 0 8px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.more { color: var(--ice); text-decoration: none; font-size: .9rem; }
.more:hover { text-decoration: underline; }
.hint { font-size: .84rem; color: var(--muted); }
.center { text-align: center; justify-content: center; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.wrapit { flex-wrap: wrap; }

/* Formularelemente */
.site label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.site label.inline, .site .check-inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.site input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .site select, .site textarea {
  width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text); font: 16px/1.4 var(--sans);
  transition: border-color .2s;
}
.site label.inline input, .site .calc-row input, .site .calc-row select, .site label.inline select { width: auto; margin-top: 0; }
.site input[type="number"] { max-width: 110px; }
.site input:focus, .site select:focus, .site textarea:focus { outline: none; border-color: rgba(227,201,143,.6); }
.site input[type="range"] { width: 100%; accent-color: var(--gold); margin-top: 8px; }
.site input[type="checkbox"] { accent-color: var(--gold); width: 18px; height: 18px; }
.site select option { background: #12172e; }
.primary-link, .ghost-link { display: inline-block; padding: 12px 22px; border-radius: 12px; font-weight: 600; text-decoration: none; transition: transform .15s, filter .2s, border-color .2s; }
.card a.primary-link, .primary-link { background: var(--grad-gold); color: #221b0e; box-shadow: 0 8px 24px rgba(227,201,143,.25); }
.primary-link:hover { filter: brightness(1.07); transform: translateY(-1px); }
.ghost-link { border: 1px solid var(--line); color: var(--text); background: var(--surface); }
.ghost-link:hover { border-color: rgba(227,201,143,.5); }

/* Reiter & Segment-Schalter */
.tabs-bar { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 8px; scrollbar-width: none; }
.tabs-bar::-webkit-scrollbar { display: none; }
.tabs-bar button { flex: none; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .92rem; white-space: nowrap; transition: color .2s, border-color .2s, background .2s; }
.tabs-bar button:hover { color: var(--text); border-color: rgba(227,201,143,.4); }
.tabs-bar button[aria-selected="true"] { color: var(--gold); border-color: rgba(227,201,143,.55); background: var(--gold-soft); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 12px; background: rgba(0,0,0,.22); border: 1px solid var(--line); }
.seg button { padding: 7px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: .88rem; transition: color .2s, background .2s; }
.seg button[aria-pressed="true"] { background: var(--gold-soft); color: var(--gold); }
.seg.small { margin: 0; }

/* Startseite */
.hero { text-align: center; padding: 7vh 0 32px; }
.hero h1 { font: 600 clamp(2rem, 7vw, 3.4rem)/1.1 var(--serif); margin: 0 0 14px; }
.hero h1 span { background: var(--grad-hero); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: shimmer 9s ease-in-out infinite; }
@keyframes shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.hero p { color: var(--muted); max-width: 560px; margin: 0 auto 24px; font-size: 1.05rem; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 10px 0 20px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 18px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), border-color .2s, background .2s, box-shadow .25s; }
.tile:hover { transform: translateY(-3px); border-color: rgba(227,201,143,.5); box-shadow: 0 14px 40px rgba(0,0,0,.35), 0 0 24px rgba(227,201,143,.08); }
.tile-icon { font-size: 1.8rem; line-height: 1; }
.tile strong { font: 600 1.15rem var(--serif); }
.tile span:last-child { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.tile-big { grid-column: span 2; background: linear-gradient(135deg, rgba(195,178,240,.15), rgba(159,212,238,.08)); border-color: rgba(195,178,240,.32); }
@media (max-width: 520px) { .tile-big { grid-column: auto; } }
.home-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.news-list { display: grid; gap: 14px; }
.news-item h3, .news-item h2 { margin: 0 0 2px; }
.news-item time { display: block; font-size: .82rem; margin-bottom: 6px; }
.news-teaser p, .news-body p { margin: 0 0 .7em; color: #d6d9e8; }

/* Umfragen */
.poll-q { font-weight: 600; margin: 0 0 10px; }
.poll-options { display: grid; gap: 8px; }
.poll-option { text-align: left; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.2); color: var(--text); font-size: .95rem; transition: border-color .2s, background .2s; }
.poll-option:hover:not(:disabled) { border-color: rgba(227,201,143,.55); background: var(--gold-soft); }
.poll-result { position: relative; display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; font-size: .93rem; }
.poll-result > span:not(.poll-bar) { position: relative; z-index: 1; }
.poll-result.mine { border-color: rgba(227,201,143,.55); }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(195,178,240,.28), rgba(159,212,238,.16)); }
.poll-pct { color: var(--gold); font-weight: 600; }
.poll-note { font-size: .82rem; color: var(--muted); margin: 8px 0 0; }
.poll-box + .poll-box { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }

/* Werkzeuge */
.qr-out { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 6px; }
.qr-out canvas { width: 240px; height: 240px; border-radius: 12px; background: #fff; image-rendering: pixelated; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.qr-side { flex: 1; min-width: 180px; }
.pw-out { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 14px; border-radius: 12px; background: rgba(0,0,0,.3); border: 1px solid var(--line); margin-bottom: 12px; }
.mono { font-family: var(--mono); }
.big-out { font-size: 1.15rem; word-break: break-all; color: var(--gold); }
.pw-out .row { margin: 0; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; }
.checks label { display: flex; align-items: center; gap: 8px; color: var(--text); margin: 0; }
.calc { margin-top: 4px; }
.calc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.calc-row output { font-weight: 600; color: var(--gold); min-width: 60px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 12px; }
.grid2 input[type="number"] { max-width: none; }
.results { display: grid; gap: 6px; margin: 10px 0 14px; }
.res-row { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: 10px; background: rgba(0,0,0,.2); }
.res-row.strong { color: var(--gold); font-weight: 600; }
.big-time { text-align: center; font: 600 clamp(3rem, 14vw, 5rem)/1.1 var(--mono); letter-spacing: .02em; margin: 10px 0; color: var(--text); text-shadow: 0 0 30px rgba(159,212,238,.25); }
.presets .mini { font-size: .85rem; }
.laps { font-family: var(--mono); color: var(--muted); max-height: 220px; overflow: auto; }
.countdowns { display: grid; gap: 8px; margin: 14px 0; }
.cd-item { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.2); border: 1px solid var(--line); }
.cd-days { font: 600 1.6rem/1 var(--serif); color: var(--gold); min-width: 64px; text-align: center; }
.cd-info { flex: 1; display: flex; flex-direction: column; }
.random-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.mini-card { padding: 14px; border-radius: 14px; background: rgba(0,0,0,.18); border: 1px solid var(--line); }
.mini-card.wide { grid-column: 1 / -1; }
.dice { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; min-height: 52px; }
.die { min-width: 48px; height: 48px; display: grid; place-items: center; border-radius: 10px; background: #f4efe2; color: #1a1625; font-weight: 700; font-size: 1.2rem; padding: 0 6px; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.die.d6 { font-size: 2.6rem; line-height: 1; background: transparent; color: #f4efe2; box-shadow: none; }
.die-sum { color: var(--gold); font-weight: 600; margin-left: 6px; }
.coin-out { margin-top: 12px; font: 600 1.6rem var(--serif); color: var(--gold); min-height: 2rem; }
.lot-out { margin-top: 10px; }
.lot-winner { font: 600 1.5rem var(--serif); color: var(--gold); }
.team { padding: 8px 12px; border-radius: 10px; background: rgba(0,0,0,.2); margin-bottom: 6px; }
.text-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 12px 0; }
.stat-mini { padding: 10px; border-radius: 12px; background: rgba(0,0,0,.2); border: 1px solid var(--line); text-align: center; }
.stat-mini strong { display: block; font: 600 1.3rem var(--serif); color: var(--gold); }
.stat-mini span { font-size: .78rem; color: var(--muted); }

/* Spiele */
.quiz-progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-bottom: 10px; }
.quiz-progress div { height: 100%; width: 0; background: linear-gradient(90deg, var(--ice), var(--gold)); transition: width .3s; }
.quiz-q { font: 600 1.25rem/1.35 var(--serif); margin: 6px 0 14px; }
.quiz-options { display: grid; gap: 8px; }
.quiz-option { text-align: left; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.2); color: var(--text); font-size: 1rem; transition: border-color .2s, background .2s, transform .12s; }
.quiz-option:hover { border-color: rgba(227,201,143,.55); background: var(--gold-soft); transform: translateX(2px); }
.quiz-score { font: 600 1.3rem var(--serif); color: var(--gold); }
.quiz-review { padding-left: 1.2em; display: grid; gap: 10px; }
.quiz-review li { display: flex; flex-direction: column; gap: 2px; }
.quiz-review li.ok span { color: var(--ok); }
.quiz-review li.wrong span { color: var(--danger); }
.leaderboard { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.leaderboard ol { margin: 0; padding-left: 1.4em; display: grid; gap: 4px; }
.leaderboard li { padding: 4px 0; }
.leaderboard li.me { color: var(--gold); }
.lb-name { font-weight: 600; margin-right: 10px; }
.lb-score { color: var(--muted); font-size: .9rem; }
.game-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 12px; color: var(--muted); font-size: .9rem; }
.game-stats strong { color: var(--text); }
.game-msg { min-height: 1.5em; color: var(--gold); font-weight: 600; }
.memory { --cols: 4; display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 8px; max-width: calc(var(--cols) * 90px); margin: 0 auto 10px; }
.mem-card { position: relative; aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(135deg, #1c2148, #12172e); color: var(--text); font-size: clamp(1.4rem, 6vw, 2rem); overflow: hidden; padding: 0; transition: border-color .2s, transform .12s; }
.mem-card:hover { border-color: rgba(227,201,143,.4); }
.mem-card:active { transform: scale(.96); }
.mem-card span { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .2s; }
.mem-back { color: var(--gold); opacity: .55; font-size: 1.1rem; }
.mem-front { opacity: 0; background: rgba(227,201,143,.12); }
.mem-card.open .mem-front, .mem-card.done .mem-front { opacity: 1; }
.mem-card.open .mem-back, .mem-card.done .mem-back { opacity: 0; }
.mem-card.done { border-color: rgba(227,201,143,.6); box-shadow: 0 0 14px rgba(227,201,143,.2); }
.reaction-pad { width: 100%; height: 220px; border-radius: 18px; border: 1px solid var(--line); background: #1c2148; color: var(--text); font: 600 1.3rem var(--serif); touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: background .15s, transform .1s; }
.reaction-pad:active { transform: scale(.99); }
.reaction-pad[data-state="wait"] { background: #5c2130; }
.reaction-pad[data-state="go"] { background: #1f7048; box-shadow: 0 0 30px rgba(159,216,176,.3); }
.reaction-pad[data-state="early"] { background: #6e4c1f; }
.rx-list { color: var(--muted); font-family: var(--mono); }
.type-text { padding: 14px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--line); font: 1.1rem/1.7 var(--mono); margin-bottom: 10px; }
.type-text .ok { color: var(--ok); }
.type-text .bad { color: #1a1625; background: var(--danger); border-radius: 3px; }
.type-text .cur { border-bottom: 2px solid var(--gold); }

/* Über mich */
.about-hero { display: flex; align-items: center; gap: 18px; }
.about-hero h1 { font: 600 1.8rem/1.2 var(--serif); margin: 0 0 4px; }
.avatar-big { width: 72px; height: 72px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(227,201,143,.45); box-shadow: 0 0 24px rgba(227,201,143,.18); }
.pill-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list li { padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.2); border: 1px solid var(--line); }
.project + .project { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.project p { margin: 4px 0 0; }

/* Gästebuch */
.gb-form { margin-bottom: 20px; }
.gb-form .row { justify-content: space-between; }
.gb-list { display: grid; gap: 10px; }
.gb-entry { padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,.2); border: 1px solid var(--line); transition: border-color .2s; }
.gb-entry:hover { border-color: rgba(227,201,143,.25); }
.gb-entry p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.gb-head { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.gb-reply { color: var(--gold); font-size: .9rem; }

/* Admin-Ergänzungen */
.user.is-pending { border-color: rgba(227,201,143,.55); }
.gb-admin-text { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem; }
.quiz-admin { display: grid; gap: 10px; padding-left: 1.2em; }

/* ── Handy & Sonderfälle ──────────────────────────────────── */
@media (max-width: 520px) {
  .brand h1 { font-size: 1.25rem; }
  .tagline { display: none; }
  .ghost span { display: none; }
  .ghost { padding: 9px; }
  .disclaimer { font-size: .82rem; padding: 8px 12px; }
  .welcome { padding-top: 4vh; }
  .chip { font-size: .86rem; }
  .msg.user .bubble { max-width: 92%; }
  .msg.bot .avatar { display: none; }
  .copy span { display: none; }
  .copy.done span, .copy.speak.on span { display: inline; }
  .tool-menu { min-width: 220px; }
  #toolLabel { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
  .modebar { gap: 5px; margin-left: 2px; margin-right: 2px; }
  .pill { padding: 5px 9px; font-size: .8rem; gap: 4px; }
  .pill .long { display: none; }
  .pill .short { display: inline; }
  .modebar select { padding: 5px 24px 5px 10px; font-size: .8rem; background-position: right 7px center; }
  #toolLabel { max-width: 110px; }
  .mode-hint { display: none; }
  .actions { gap: 6px; }
  .user { grid-template-columns: 1fr; }
  .user-actions { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.hero-badge { display: inline-block; margin: 0 0 14px; padding: 5px 14px; border-radius: 999px; font-size: .8rem; letter-spacing: .08em; color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(227,201,143,.35); }

/* Pro-Rolle */
.badge-pro { color: #1a1625; background: linear-gradient(90deg, var(--gold), #f0dcae); border-color: transparent; }
.pro-mini { color: var(--gold); border-color: rgba(217,192,143,.45); }
.pro-mini:hover { background: var(--gold-soft); }

/* ── Willkommens-Fenster ──────────────────────────────────── */
.hello-dlg { width: min(420px, calc(100vw - 32px)); text-align: center; padding: 26px 22px 18px;
  background: radial-gradient(120% 70% at 50% 0%, rgba(184,169,230,.18), transparent 60%), #121531; }
.hello-dlg::backdrop { background: rgba(5,6,14,.75); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.hello-star { font-size: 2.2rem; color: var(--gold); line-height: 1; margin-bottom: 8px; text-shadow: 0 0 18px rgba(217,192,143,.6); }
.hello-dlg h2 { margin: 0 0 8px; font: 600 1.5rem/1.2 var(--serif); }
.hello-lead { margin: 0 0 14px; color: #d3d6e4; }
.hello-list { list-style: none; padding: 0; margin: 0 0 14px; text-align: left; display: grid; gap: 8px; }
.hello-list li { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; background: rgba(0,0,0,.22); border: 1px solid var(--line); font-size: .92rem; }
.hello-list li span { font-size: 1.15rem; }
.hello-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 12px; }
.hello-pills span { padding: 4px 10px; border-radius: 999px; font-size: .8rem; color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(217,192,143,.35); }
.hello-note { font-size: .84rem; color: var(--muted); margin: 0 0 14px; }
.hello-secondary { display: block; margin: 10px 0 2px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: .92rem; }
.hello-secondary:hover { border-color: rgba(217,192,143,.5); background: var(--gold-soft); }
.hello-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; font-size: .8rem; color: var(--muted); }
.hello-foot label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: .8rem; color: var(--muted); cursor: pointer; }
.hello-foot input { accent-color: var(--gold); width: 16px; height: 16px; margin: 0; }
.hello-foot a { color: var(--ice); text-decoration: none; }
.hello-foot a:hover { text-decoration: underline; }

/* ── Schach (Reiter in „Spiele“) ──────────────────────────── */
.chess-wrap { max-width: 560px; margin: 0 auto; }
.chess-board { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); aspect-ratio: 1/1; border: 2px solid var(--gold); border-radius: 8px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.5); user-select: none; }
.chess-sq { display: flex; align-items: center; justify-content: center; aspect-ratio: 1/1; min-width: 0; min-height: 0; overflow: hidden; line-height: 1; font-size: clamp(1.6rem, 6vw, 2.6rem); cursor: pointer; position: relative; transition: background .15s; }
.chess-sq.check { background: radial-gradient(circle, #e86a6a 0%, #c94545 55%, transparent 80%) !important; }
.chess-sq.light { background: #e8dcc0; }
.chess-sq.dark { background: #a67c52; }
.chess-sq.sel { background: #f0dfb2 !important; box-shadow: inset 0 0 0 3px var(--gold); }
.chess-sq.move { box-shadow: inset 0 0 0 3px var(--ice); }
.chess-sq.last { background: #c3b2f0 !important; }
.chess-sq .dot { width: 24%; height: 24%; border-radius: 50%; background: rgba(0,0,0,.3); position: absolute; }
.chess-sq .cap { position: absolute; inset: 0; border: 4px solid rgba(220,80,80,.7); border-radius: 50%; }
.chess-info { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; margin: 12px 0; }
.chess-status { font: 600 1.05rem var(--serif); color: var(--gold); min-height: 1.4em; }
.chess-turn { color: var(--muted); font-size: .9rem; }
.promo { position: fixed; inset: 0; background: rgba(4,6,13,.8); display: grid; place-items: center; z-index: 50; }
.promo[hidden] { display: none; }
.promo-box { background: #161b3c; border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; gap: 10px; flex-direction: column; align-items: center; }
.promo-box p { margin: 0; }
.promo-row { display: flex; gap: 8px; }
.promo-box button { font-size: 2rem; width: 64px; height: 64px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.promo-box button:hover { border-color: var(--gold); background: var(--gold-soft); }
@media (max-width: 520px) { .chess-sq { font-size: 1.8rem; } }
.ai-bubble { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 4px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(184,169,230,.16), rgba(169,214,236,.08)); border: 1px solid rgba(184,169,230,.3); }
.ai-bubble[hidden] { display: none; }
.ai-bubble p { margin: 0; font-size: .95rem; line-height: 1.45; }
.ai-bubble.thinking p { color: var(--muted); font-style: italic; }
.ai-avatar { font-size: 1.4rem; line-height: 1.2; }
.chess-about p { margin: 6px 0; font-size: .92rem; color: #d3d6e4; }

/* ── KI-Helfer ────────────────────────────────────────────── */
.helper-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 20px; }
.helper-grid[hidden] { display: none; }
button.helper-tile { text-align: left; font: inherit; cursor: pointer; }
.helper-form label { max-width: 560px; }
.helper-result .content { font-size: 1rem; line-height: 1.6; }
.helper-result .content h3, .helper-result .content h4 { margin-top: .8em; }
.helper-actions { margin-top: 14px; }
.helper-actions[hidden], .helper-result .typing[hidden] { display: none; }

/* ── Smoothe Bewegung ─────────────────────────────────────── */
:root { --ease-out: cubic-bezier(.22,1,.36,1); --ease-spring: cubic-bezier(.34,1.56,.64,1); }
html { scroll-behavior: smooth; }

/* Weiche Seitenwechsel (moderne Browser) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .22s ease both; }
::view-transition-new(root) { animation: vt-in .38s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; translate: 0 10px; } }
.site-nav { view-transition-name: site-nav; }
::view-transition-group(site-nav) { animation: none; }

/* Elemente gleiten beim Laden/Scrollen herein (Klasse setzt common.js) */
@keyframes fade-up { from { opacity: 0; translate: 0 18px; scale: .985; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.rv:not(.in) { opacity: 0; }
.rv.in { animation: fade-up .7s var(--ease-out) backwards; animation-delay: var(--d, 0ms); }

/* Sternenhimmel driftet ganz langsam */
.sky { transform: translateZ(0); contain: strict; }   /* eigene Ebene, wird beim Scrollen nicht neu gemalt */

/* Kacheln: federnd anheben, Icon hüpft, Lichtschimmer */
.tile { transition: transform .45s var(--ease-spring), border-color .3s, background .3s, box-shadow .4s var(--ease-out); }
.tile:hover { transform: translateY(-5px) scale(1.012); }
.tile:active { transform: translateY(-1px) scale(.99); transition-duration: .12s; }
.tile::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.07) 48%, transparent 66%);
  translate: -120% 0; transition: translate .9s var(--ease-out); }
.tile:hover::after { translate: 120% 0; }

/* Buttons & Links: weiches Drücken */
button, .primary-link, .ghost-link, .hello-secondary { transition: transform .25s var(--ease-spring), filter .2s, background .25s, border-color .25s, color .2s, box-shadow .3s, opacity .2s; }
button:not(:disabled):active, .primary-link:active, .ghost-link:active { transform: scale(.96); transition-duration: .08s; }
.primary-link:hover, button.primary:not(:disabled):hover { box-shadow: 0 8px 26px rgba(227,201,143,.22); }

/* Karten: sanfter Rahmen beim Überfahren */
.card { transition: border-color .35s, box-shadow .4s var(--ease-out); }

/* Navigation */
.nav-links a { transition: color .25s, background .3s var(--ease-out), transform .25s var(--ease-spring); }
.nav-links a:hover { transform: translateY(-1px); }
@media (max-width: 760px) {
  .nav-links.open { animation: nav-drop .32s var(--ease-out); }
  .nav-links.open a { animation: fade-up .4s var(--ease-out) backwards; }
  .nav-links.open a:nth-child(2) { animation-delay: 30ms; }
  .nav-links.open a:nth-child(3) { animation-delay: 60ms; }
  .nav-links.open a:nth-child(4) { animation-delay: 90ms; }
  .nav-links.open a:nth-child(5) { animation-delay: 120ms; }
  .nav-links.open a:nth-child(6) { animation-delay: 150ms; }
  .nav-links.open a:nth-child(7) { animation-delay: 180ms; }
  .nav-links.open a:nth-child(8) { animation-delay: 210ms; }
}
@keyframes nav-drop { from { opacity: 0; translate: 0 -8px; } }

/* Popups/Dialoge öffnen weich */
dialog[open] { animation: pop-in .38s var(--ease-spring); }
dialog[open]::backdrop { animation: fade-in .3s ease; }
@keyframes pop-in { from { opacity: 0; scale: .92; translate: 0 12px; } }
.hello-dlg[open] .hello-list li { animation: fade-up .5s var(--ease-out) backwards; }
.hello-dlg[open] .hello-list li:nth-child(1) { animation-delay: .12s; }
.hello-dlg[open] .hello-list li:nth-child(2) { animation-delay: .2s; }
.hello-dlg[open] .hello-list li:nth-child(3) { animation-delay: .28s; }

/* Reiter, Formulare & Ergebnisse blenden weich ein */
.game:not([hidden]), .helper-form:not([hidden]), .helper-result:not([hidden]), .helper-actions:not([hidden]),
#quizPlay:not([hidden]), #quizResult:not([hidden]), .form-error:not([hidden]) { animation: fade-up .45s var(--ease-out); }
.helper-grid:not([hidden]) .helper-tile { animation: fade-up .5s var(--ease-out) backwards; }
.helper-grid .helper-tile:nth-child(2) { animation-delay: 40ms; }
.helper-grid .helper-tile:nth-child(3) { animation-delay: 80ms; }
.helper-grid .helper-tile:nth-child(4) { animation-delay: 120ms; }
.helper-grid .helper-tile:nth-child(5) { animation-delay: 160ms; }
.helper-grid .helper-tile:nth-child(6) { animation-delay: 200ms; }
.tabs button { transition: background .3s var(--ease-out), color .25s, box-shadow .3s; }

/* Chat-Nachrichten etwas weicher */
.msg { animation: fade-up .45s var(--ease-out); }

/* Schach: Figuren gleiten (Geist-Element setzt schach.js) */
.chess-ghost { position: fixed; z-index: 50; display: flex; align-items: center; justify-content: center; pointer-events: none; line-height: 1; will-change: transform; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
.chess-sq.land .pc { animation: land .3s var(--ease-spring); }
@keyframes land { from { scale: 1.15; } }
.chess-sq .dot, .chess-sq .cap { animation: fade-in .2s ease; }
.chess-sq.sel .pc { display: inline-block; scale: 1.1; transition: scale .2s var(--ease-spring); }

/* ── Account: Menü-Knopf, Werbung, Mein Bereich ───────────── */
.nav-links a.nav-cta { margin-left: 6px; color: #241c0c; background: var(--grad-gold); font-weight: 600; box-shadow: 0 4px 16px rgba(227,201,143,.25); }
.nav-links a.nav-cta:hover { color: #241c0c; background: var(--grad-gold); filter: brightness(1.06); box-shadow: 0 6px 22px rgba(227,201,143,.38); }
.nav-links a.nav-cta.member { color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(227,201,143,.35); box-shadow: none; }
.nav-links a.nav-cta[aria-current="page"] { padding: 7px 12px; }
.nav-links a.nav-cta:not(.member)::after { content: ""; position: absolute; inset: -3px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 22px 2px rgba(227,201,143,.45); opacity: 0; animation: cta-glow 3.2s ease-in-out infinite; }
@keyframes cta-glow { 50% { opacity: 1; } }
@media (max-width: 760px) { .nav-links a.nav-cta { margin: 6px 0 0; text-align: center; } }

.join-band { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 6px 0 20px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(227,201,143,.14), transparent 55%), radial-gradient(120% 140% at 100% 100%, rgba(195,178,240,.14), transparent 55%), var(--surface);
  border-color: rgba(227,201,143,.35); }
.join-band h2 { margin-bottom: 4px; }
.join-band .muted { margin: 0 0 10px; }
.join-perks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, auto)); gap: 6px 18px; font-size: .92rem; }
.join-actions { display: flex; flex-direction: column; gap: 8px; min-width: 210px; }
.join-actions a { text-align: center; }
@media (max-width: 520px) { .join-perks { grid-template-columns: 1fr; } .join-actions { width: 100%; } }
.member-band { display: flex; align-items: center; gap: 14px; margin: 6px 0 20px; text-decoration: none; color: var(--text); border-color: rgba(227,201,143,.3); }
.member-band:hover { border-color: rgba(227,201,143,.55); }
.member-band .more { margin-left: auto; color: var(--gold); }
.join-band[hidden], .member-band[hidden], .promo-line[hidden], .perk-grid[hidden], .stat-grid[hidden], .note-form[hidden] { display: none; }

.promo-line { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; font-size: .88rem; background: var(--gold-soft); border: 1px solid rgba(227,201,143,.3); }
.promo-line a { color: var(--gold); }
.keep-btn.done, .copy.keep.done { color: var(--gold); border-color: rgba(227,201,143,.5); }

.hero-small { padding-top: 4vh; }
.perk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 8px 0 18px; }
.perk-card { padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: transform .45s var(--ease-spring), border-color .3s; }
.perk-card:hover { transform: translateY(-4px); border-color: rgba(227,201,143,.45); }
.perk-card > span { font-size: 1.7rem; display: block; margin-bottom: 6px; }
.perk-card strong { font: 600 1.1rem var(--serif); }
.perk-card p { margin: 6px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.compare table { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: .93rem; }
.compare th, .compare td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare .gold { color: var(--gold); font-weight: 600; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.stat-card strong { font: 600 1.9rem/1.1 var(--serif); }
.stat-card small { color: var(--muted); font-size: .8rem; }
.stat-ico { font-size: 1.4rem; }
.stat-card.streak { border-color: rgba(240,150,90,.45); background: radial-gradient(100% 100% at 50% 0%, rgba(240,150,90,.16), transparent 70%), var(--surface); }
.streak-bar { height: 10px; border-radius: 99px; background: rgba(0,0,0,.3); border: 1px solid var(--line); overflow: hidden; margin: 10px 0; }
.streak-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #f0965a, var(--gold)); transition: width 1.2s var(--ease-out); }

.note-form { margin-bottom: 12px; }
.note-form label { display: block; margin-bottom: 8px; }
.saved-list { display: grid; gap: 8px; }
.saved-item { border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.18); transition: opacity .25s, translate .25s, border-color .3s; }
.saved-item[open] { border-color: rgba(227,201,143,.35); }
.saved-item.leaving { opacity: 0; translate: 16px 0; }
.saved-item summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
.saved-item summary::-webkit-details-marker { display: none; }
.saved-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.saved-item summary small { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.saved-item .content { padding: 0 14px; font-size: .95rem; line-height: 1.55; overflow-wrap: anywhere; animation: fade-up .35s var(--ease-out); }
.saved-actions { padding: 8px 12px 12px; flex-wrap: wrap; gap: 6px; }
.mini.danger { width: auto; padding: 6px 12px; border-radius: 9px; font-size: .82rem; font-weight: 400; color: #f5d6d6; border-color: rgba(235,168,168,.45); background: transparent; }
@media (max-width: 520px) { .saved-item summary small { display: none; } }

.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ach { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 14px 8px; border-radius: 14px; border: 1px dashed var(--line); opacity: .5; }
.ach.on { opacity: 1; border-style: solid; border-color: rgba(227,201,143,.4); background: var(--gold-soft); }
.ach-ico { font-size: 1.7rem; }
.ach strong { font-size: .86rem; }
.ach small { color: var(--muted); font-size: .74rem; }

.need-dlg .primary-link { display: block; text-align: center; margin-top: 4px; }
button.linkish { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; }
button.linkish:hover { color: var(--text); }
.perk a { color: var(--gold); }

/* Wer Bewegung reduziert haben möchte, bekommt fast keine */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after, ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .rv:not(.in) { opacity: 1; }
}

/* ── Flüssig auf Handys ───────────────────────────────────── */
/* Touch-Geräte: kein „hängenbleibendes“ Hover, keine Dauer-Effekte, kein Blur */
@media (hover: none), (max-width: 760px) {
  .site-nav { background: rgba(7,10,20,.96); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .composer { background: rgba(13,17,36,.97); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .auth::backdrop, .hello-dlg::backdrop { background: rgba(4,6,13,.86); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .hero h1 span { animation: none; background-position: 30% 50%; }
  .nav-links a.nav-cta:not(.member)::after { animation: none; }
  .mark { filter: none; }
  .chess-ghost { filter: none; }
  /* Hereingleiten: kürzer, ohne Skalierung */
  .rv.in { animation: fade-up-lite .45s var(--ease-out) backwards; animation-delay: var(--d, 0ms); }
  .msg, .game:not([hidden]), .helper-form:not([hidden]), .helper-result:not([hidden]) { animation-name: fade-up-lite; }
}
@keyframes fade-up-lite { from { opacity: 0; translate: 0 10px; } }
@media (hover: none) {
  .tile:hover, .perk-card:hover, .nav-links a:hover { transform: none; }
  .tile:hover::after { translate: -120% 0; }
  .tile:active { transform: scale(.98); }
}

/* ── Admin-Bereich im Seitenlayout ────────────────────────── */
.admin .admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 14px; }
.admin .admin-head h1 { font: 600 clamp(1.6rem, 5vw, 2.1rem)/1.2 var(--serif); margin: 0 0 4px; }
.admin .admin-head .muted { margin: 0; }
.admin-sec h2 { margin-top: 0; }
.admin-sec .hint { font-size: .86rem; color: var(--muted); border-left: 2px solid var(--gold); padding-left: 12px; }
.admin-tabs { position: sticky; top: 58px; z-index: 20; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 16px; padding: 6px; border-radius: 14px; background: rgba(10,13,28,.96); border: 1px solid var(--line); }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs[hidden] { display: none; }
.admin-tabs button { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: 500 .92rem var(--sans); cursor: pointer; white-space: nowrap; }
.admin-tabs button:hover { color: var(--text); background: var(--surface-2); }
.admin-tabs button[aria-selected="true"] { color: #241c0c; background: var(--grad-gold); font-weight: 600; }
.tab-count { min-width: 20px; padding: 1px 6px; border-radius: 99px; font-size: .74rem; font-weight: 700; color: #fff; background: #d0605a; }
.tab-count.soft { color: inherit; background: rgba(255,255,255,.12); }
.tab-count[hidden] { display: none; }
.admin-tab[hidden] { display: none; }
.admin-tab:not([hidden]) { animation: fade-up-lite .35s var(--ease-out); }
.admin-todo { display: grid; gap: 8px; margin-bottom: 14px; }
.admin-todo[hidden] { display: none; }
.todo-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border-radius: 12px; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  background: rgba(208,96,90,.1); border: 1px solid rgba(235,168,168,.35); }
.todo-item:hover { border-color: rgba(235,168,168,.65); }
.todo-item .more { margin-left: auto; color: var(--gold); font-size: .85rem; white-space: nowrap; }
.acc-stats { margin: 6px 0 12px; }
.nav-links a.nav-admin { color: var(--ice); }
.admin-band { border-color: rgba(159,212,238,.35); }
@media (max-width: 760px) { .admin-tabs { top: 56px; } .user { grid-template-columns: 1fr; } .user-actions { justify-content: flex-start; } }

/* ── Verifiziert-Häkchen (Admin) ──────────────────────────── */
.verified { display: inline-flex; align-items: center; gap: 4px; margin-left: 5px; vertical-align: -3px; white-space: nowrap; }
.verified svg { width: 17px; height: 17px; flex: none; }
.verified .v-bg { fill: #3b9df5; }
.verified .v-check { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.verified .v-label { font: 600 .72rem var(--sans); color: #8cc8ff; letter-spacing: .02em; }
.gb-entry.gb-admin { border-color: rgba(59,157,245,.45); background: linear-gradient(135deg, rgba(59,157,245,.09), transparent 60%), var(--surface); }
.gb-reply { margin-top: 8px; padding: 8px 12px; border-left: 2px solid #3b9df5; border-radius: 0 10px 10px 0; background: rgba(59,157,245,.07); color: var(--text); }
.gb-reply p { margin: 2px 0 0; }
.gb-reply-head { display: flex; align-items: center; font-size: .8rem; color: #8cc8ff; font-weight: 600; }
.news-by { display: flex; align-items: center; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.news-by > span:first-child { font-weight: 600; color: var(--text); }
.news-by time { display: inline; margin: 0; font-size: inherit; }
label .verified { margin: 6px 0 0; display: flex; }

/* ── Kontaktformular ──────────────────────────────────────── */
.contact-form label { display: block; margin-bottom: 12px; }
.contact-form input, .contact-form textarea, .contact-form select { display: block; width: 100%; margin-top: 6px; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text); font: 16px/1.4 var(--sans); }
.contact-form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.contact-form select option { background: #121531; color: var(--text); }
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { outline: none; border-color: rgba(227,201,143,.6); }
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form[hidden], .contact-done[hidden] { display: none; }
.contact-done { text-align: center; padding: 18px 6px; animation: fade-up .45s var(--ease-out); }
.contact-done-ico { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; color: #241c0c; background: var(--grad-gold); }
.contact-done h2 { margin-bottom: 4px; }

/* ── Admin: Nachrichten ───────────────────────────────────── */
.msg-filter { display: flex; gap: 6px; }
.msg-filter [aria-pressed="true"] { border-color: rgba(227,201,143,.6); background: var(--gold-soft); color: var(--gold); }
.msg-row { grid-template-columns: 1fr; }
.msg-row.is-unread { border-color: rgba(59,157,245,.5); box-shadow: inset 3px 0 0 #3b9df5; }
.msg-row .user-actions { justify-content: flex-start; }
.msg-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #d6d9e8; }
.user-meta a { color: var(--ice); }
a.mini { display: inline-block; text-decoration: none; }
.badge-acc { color: var(--ice); background: rgba(159,212,238,.1); border-color: rgba(159,212,238,.35); }

/* ── NOVA City 3D (Reiter in „Spiele“) ────────────────────── */
.nc-intro { margin-top: 0; }
.nc-frame { position: relative; width: 100%; height: min(72vh, 640px); min-height: 340px; border: 2px solid var(--gold); border-radius: 14px; overflow: hidden; background: #05070f; }
.nc-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
@media (max-height: 560px) { .nc-frame { height: calc(100vh - 40px); height: calc(100svh - 40px); min-height: 0; } }

/* ── Einmaliges Ankündigungs-Banner ───────────────────────── */
.promo-banner { position: relative; z-index: 25; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  max-width: 1040px; margin: 12px auto 0; padding: 12px 48px 12px 16px; border-radius: 16px;
  background: linear-gradient(110deg, rgba(59,157,245,.22), rgba(195,178,240,.18) 55%, rgba(227,201,143,.2)), rgba(10,14,30,.92);
  border: 1px solid rgba(127,240,255,.45); box-shadow: 0 10px 30px rgba(0,0,0,.35);
  animation: banner-in .6s var(--ease-out) both; width: calc(100% - 32px); }
.promo-banner.closing { animation: banner-out .3s ease forwards; }
@keyframes banner-in { from { opacity: 0; translate: 0 -12px; } }
@keyframes banner-out { to { opacity: 0; translate: 0 -10px; } }
.promo-banner-ico { font-size: 1.8rem; line-height: 1; }
.promo-banner-text { flex: 1 1 260px; min-width: 0; line-height: 1.4; }
.promo-banner-text strong { display: block; font: 600 1.15rem var(--serif); color: #7ff0ff; }
.promo-banner-text span { color: var(--muted); font-size: .92rem; }
.promo-banner-go { flex: none; padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: .92rem; text-decoration: none; color: #241c0c; background: var(--grad-gold); box-shadow: 0 4px 16px rgba(227,201,143,.3); }
.promo-banner-go:hover { filter: brightness(1.06); }
.promo-banner-x { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.promo-banner-x:hover { color: var(--text); background: rgba(255,255,255,.08); }
@media (max-width: 520px) { .promo-banner-go { width: 100%; text-align: center; } }
