/* ============================================================
   Audio-Gästebuch — Editorial / Champagne
   Palette:
     paper   #F6F1E7   ivory background
     ink     #2A2622   near-black warm text
     muted   #8A8175   warm grey
     line    #E3DACB   hairline
     accent  var(--accent)  champagne gold (settings)
   Type: Fraunces (display serif) + Inter (body/utility)
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --paper: #F6F1E7;
  --paper-2: #FBF8F1;
  --ink: #2A2622;
  --muted: #8A8175;
  --line: #E3DACB;
  --accent: #C9A227;
  --shadow: 0 18px 50px -20px rgba(42,38,34,.35);
}

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(201,162,39,.10), transparent 60%),
    radial-gradient(80% 60% at 50% 120%, rgba(201,162,39,.06), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hidden { display: none !important; }

/* ---------- Stage ---------- */
.stage {
  position: relative;
  z-index: 1;
  max-width: 460px;
  margin: 0 auto;
  padding: 44px 24px calc(40px + env(safe-area-inset-bottom));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ---------- Masthead ---------- */
.masthead { margin-bottom: 26px; }

.portrait {
  width: 96px; height: 96px;
  margin: 0 auto 18px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), 0 0 0 7px var(--paper-2), 0 0 0 8px var(--line);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }

.eyebrow {
  font-size: .72rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.names {
  font-family: "Fraunces", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(2.4rem, 9vw, 3.1rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.date {
  margin-top: 12px;
  font-size: .82rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.date::before, .date::after {
  content: "";
  display: inline-block;
  width: 22px; height: 1px;
  background: var(--line);
  vertical-align: middle;
  margin: 0 12px;
}

/* ---------- Invite ---------- */
.invite { margin-bottom: 40px; max-width: 340px; }
.invite-title {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.35rem;
  margin-bottom: 10px;
}
.invite-text { color: var(--muted); font-size: .96rem; line-height: 1.6; }

/* ---------- Recorder / Signature dial ---------- */
.recorder {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.dial {
  position: relative;
  width: 220px; height: 220px;
  display: grid; place-items: center;
}

.ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--line); stroke-width: 2; }
.ring-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 628;   /* 2*pi*100 */
  stroke-dashoffset: 628;
  transition: stroke-dashoffset .2s linear;
}

/* breathing waveform behind mic */
.wave {
  position: absolute;
  display: flex; align-items: center; gap: 5px;
  height: 60px; opacity: 0;
  transition: opacity .3s ease;
}
.wave span {
  width: 4px; height: 12px;
  background: var(--accent);
  border-radius: 4px;
  animation: bar 1s ease-in-out infinite;
}
.wave span:nth-child(2){ animation-delay:.15s }
.wave span:nth-child(3){ animation-delay:.30s }
.wave span:nth-child(4){ animation-delay:.45s }
.wave span:nth-child(5){ animation-delay:.60s }
@keyframes bar {
  0%,100% { height: 12px; opacity:.5 }
  50%     { height: 48px; opacity:1 }
}
.recording .wave { opacity: 1; }

.mic {
  position: relative;
  width: 132px; height: 132px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--paper-2);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  color: var(--ink);
  display: grid; place-items: center;
  transition: transform .18s ease, background .3s ease, color .3s ease;
}
.mic:active { transform: scale(.96); }
.mic-icon { width: 42px; height: 42px; transition: opacity .2s; }

.recording .mic {
  background: var(--accent);
  color: var(--paper-2);
}
.recording .mic-icon { opacity: 0; }

.stop-square {
  position: absolute;
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--paper-2);
  opacity: 0; transform: scale(.4);
  transition: opacity .2s, transform .2s;
}
.recording .stop-square { opacity: 1; transform: scale(1); }

.timer {
  font-family: "Fraunces", serif;
  font-variant-numeric: tabular-nums;
  font-size: 1.7rem;
  margin-top: 26px;
  letter-spacing: .02em;
}
.hint {
  color: var(--muted);
  font-size: .9rem;
  margin-top: 6px;
  min-height: 1.2em;
}

/* ---------- Review ---------- */
.review {
  width: 100%;
  margin-top: 28px;
  padding: 22px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 18px;
  animation: rise .4s ease;
}
@keyframes rise { from { opacity:0; transform: translateY(12px) } to { opacity:1; transform:none } }

#player { width: 100%; height: 40px; }

.name-field { text-align: left; display: block; }
.name-field span { font-size: .82rem; color: var(--muted); display: block; margin-bottom: 8px; }
.name-field em { font-style: normal; opacity: .7; }
.name-field input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font: inherit; color: var(--ink);
}
.name-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,162,39,.18);
}

.actions { display: flex; gap: 12px; }

.btn {
  flex: 1;
  padding: 14px 16px;
  border-radius: 12px;
  font: inherit; font-weight: 600; font-size: .95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, filter .2s ease, background .2s;
}
.btn:active { transform: scale(.97); }
.btn.solid { background: var(--accent); color: #fff; }
.btn.solid:hover { filter: brightness(1.06); }
.btn.solid:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--paper); }

/* ---------- Done ---------- */
.done {
  width: 100%;
  margin-top: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  animation: rise .4s ease;
}
.check {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  box-shadow: var(--shadow);
}
.check svg { width: 38px; height: 38px; }
.done h2 { font-family: "Fraunces", serif; font-weight: 400; font-size: 1.9rem; }
.done p { color: var(--muted); max-width: 300px; }
.done .btn { flex: none; padding: 14px 30px; margin-top: 8px; }

/* ---------- Footer ---------- */
.legal {
  margin-top: auto;
  padding-top: 40px;
}
.legal p {
  font-size: .74rem;
  letter-spacing: .06em;
  color: var(--muted);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============================================================
   Admin & Login
   ============================================================ */
.admin-body, .login-body {
  background: var(--paper);
  min-height: 100vh;
}

.login-wrap {
  max-width: 380px; margin: 14vh auto; padding: 0 24px;
  text-align: center;
}
.login-wrap .eyebrow { color: var(--accent); }
.login-wrap h1 { font-family: "Fraunces", serif; font-weight: 400; font-size: 2rem; margin: 10px 0 28px; }
.login-card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 18px; padding: 26px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px;
}
.login-card input {
  padding: 14px 15px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--paper); font: inherit;
}
.login-card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,162,39,.18); }
.login-error { color: #B04437; font-size: .85rem; }

.admin-shell { max-width: 940px; margin: 0 auto; padding: 40px 24px 80px; }

.admin-top {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 34px;
  flex-wrap: wrap; gap: 12px;
}
.admin-top h1 { font-family: "Fraunces", serif; font-weight: 400; font-size: 1.9rem; }
.admin-top a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.admin-top a:hover { color: var(--ink); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 18px; padding: 24px;
}
.panel h2 {
  font-family: "Fraunces", serif; font-weight: 500; font-size: 1.15rem;
  margin-bottom: 18px; display: flex; align-items: center; gap: 10px;
}
.panel h2 .num {
  font-family: "Inter"; font-size: .7rem; font-weight: 600;
  color: var(--accent); border: 1px solid var(--accent);
  border-radius: 50%; width: 22px; height: 22px;
  display: grid; place-items: center;
}

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--paper); font: inherit;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,162,39,.18); }
.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }
input[type=color] { padding: 4px; height: 44px; cursor: pointer; }

.qr-box { text-align: center; }
.qr-box img { width: 210px; height: 210px; border-radius: 14px; border: 1px solid var(--line); background:#fff; padding:10px; }
.qr-box .btn { display:inline-block; text-decoration:none; margin-top:16px; flex:none; padding:12px 22px; }

.stat-row { display: flex; gap: 14px; margin-bottom: 22px; }
.stat {
  flex: 1; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px 20px;
}
.stat .n { font-family: "Fraunces", serif; font-size: 2rem; }
.stat .l { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.msg-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.msg {
  display: flex; align-items: center; gap: 14px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 16px;
}
.msg .meta { flex: 1; text-align: left; min-width: 0; }
.msg .meta .who { font-weight: 600; font-size: .95rem; }
.msg .meta .when { font-size: .78rem; color: var(--muted); }
.msg audio { height: 34px; max-width: 220px; }
.msg .del {
  border: none; background: none; cursor: pointer; color: var(--muted);
  font-size: 1.1rem; padding: 6px; border-radius: 8px; line-height: 1;
}
.msg .del:hover { color: #B04437; background: rgba(176,68,55,.08); }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

.full-btn {
  display: inline-block; text-decoration: none; text-align: center;
  width: 100%; margin-top: 4px; flex: none;
}

/* ============================================================
   Erweiterungen: Begrüßung, Foto-Upload, Admin-Assets, Reset
   ============================================================ */

/* ---- Begrüßungs-Button (Aufnahmeseite) ---- */
.greeting-btn {
  margin-top: 22px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 20px 11px 14px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: 999px;
  font: inherit; font-size: .9rem; font-weight: 500;
  color: var(--ink); cursor: pointer;
  box-shadow: 0 6px 20px -12px rgba(42,38,34,.4);
  transition: transform .15s ease, border-color .2s;
}
.greeting-btn:hover { border-color: var(--accent); }
.greeting-btn:active { transform: scale(.97); }
.g-icon {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; flex: none;
}
.g-icon svg { width: 15px; height: 15px; }
.g-icon .pause { display: none; }
.g-icon.playing .play { display: none; }
.g-icon.playing .pause { display: block; }

/* ---- Foto-Upload (Gast) ---- */
.photo-field { text-align: left; }
.photo-field > span { font-size: .82rem; color: var(--muted); display: block; margin-bottom: 8px; }
.photo-field em { font-style: normal; opacity: .7; }

.photo-drop {
  display: block;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.photo-drop:hover { border-color: var(--accent); background: var(--paper); }
.photo-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 26px 0; color: var(--muted);
}
.photo-empty svg { width: 30px; height: 30px; }
.photo-empty span { font-size: .85rem; }
.photo-preview { width: 100%; max-height: 220px; object-fit: cover; display: block; }
.photo-remove {
  margin-top: 8px; background: none; border: none; cursor: pointer;
  color: var(--muted); font: inherit; font-size: .82rem; text-decoration: underline;
}
.photo-remove:hover { color: #B04437; }

/* ---- Admin: Datei-Inputs & Assets ---- */
.file-input {
  width: 100%; font: inherit; font-size: .85rem; color: var(--muted);
  padding: 8px 0;
}
.file-input::file-selector-button {
  font: inherit; font-size: .82rem; font-weight: 600;
  margin-right: 12px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); color: var(--ink); cursor: pointer;
}
.file-input::file-selector-button:hover { border-color: var(--accent); }

.asset-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.asset-thumb {
  width: 48px; height: 48px; border-radius: 10px; object-fit: cover;
  border: 1px solid var(--line);
}
.asset-ok { font-size: .78rem; color: var(--accent); font-weight: 600; }

.switch-row {
  display: flex; align-items: center; gap: 10px;
  margin: 6px 0 18px; cursor: pointer;
  font-size: .88rem; color: var(--ink);
}
.switch-row input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

.asset-actions { display: flex; gap: 18px; margin-top: 14px; }
.mini-link {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font: inherit; font-size: .8rem; text-decoration: underline;
  padding: 0;
}
.mini-link:hover { color: #B04437; }

/* ---- QR URL ---- */
.qr-url {
  font-size: .78rem; color: var(--muted); margin-top: 12px;
  word-break: break-all;
}

/* ---- Nachrichten: Gäste-Foto ---- */
.msg-photo {
  width: 46px; height: 46px; border-radius: 10px; flex: none;
  overflow: hidden; border: 1px solid var(--line);
  display: grid; place-items: center;
}
.msg-photo img { width: 100%; height: 100%; object-fit: cover; }
.msg-photo.placeholder { color: var(--line); background: var(--paper); }
.msg-photo.placeholder svg { width: 24px; height: 24px; }

/* ---- Gefahrenzone ---- */
.panel.danger { border-color: #E7C9C4; background: #FBF4F2; }
.panel.danger h2 .num { color: #B04437; border-color: #B04437; }
.danger-text { font-size: .88rem; color: #7A5652; line-height: 1.55; margin-bottom: 16px; }
.danger-row { display: flex; gap: 12px; }
.danger-row input {
  flex: 1; padding: 11px 13px; border: 1px solid #E7C9C4;
  border-radius: 10px; background: #fff; font: inherit;
}
.danger-row input:focus { outline: none; border-color: #B04437; box-shadow: 0 0 0 3px rgba(176,68,55,.14); }
.danger-btn { flex: none; background: #B04437; color: #fff; padding: 11px 22px; }
.danger-btn:hover { filter: brightness(1.05); }
@media (max-width: 520px) { .danger-row { flex-direction: column; } .danger-btn { width: 100%; } }

/* ============================================================
   Multi-Event: Übersicht, Event-Karten, Links, Galerie
   ============================================================ */

.back-link { color: var(--muted); text-decoration: none; font-size: .85rem; display: inline-block; margin-bottom: 6px; }
.back-link:hover { color: var(--ink); }

.field-hint { font-size: .76rem; color: var(--muted); margin-top: 6px; }

/* ---- Neues Paar ---- */
.new-event {
  display: flex; gap: 12px; margin-bottom: 34px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px;
}
.new-event input {
  flex: 1; padding: 13px 15px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--paper); font: inherit;
}
.new-event input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,162,39,.18); }
.new-event .btn { flex: none; padding: 13px 22px; }
@media (max-width: 560px) { .new-event { flex-direction: column; } .new-event .btn { width: 100%; } }

/* ---- Event-Karten ---- */
.event-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px;
}
.event-card {
  display: flex; gap: 16px; align-items: center;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 18px; padding: 18px; text-decoration: none; color: var(--ink);
  transition: transform .16s ease, box-shadow .2s ease, border-color .2s;
  position: relative;
}
.event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); }
.event-thumb {
  width: 62px; height: 62px; border-radius: 14px; flex: none;
  overflow: hidden; background: var(--accent); color: #fff;
  display: grid; place-items: center;
}
.event-thumb img { width: 100%; height: 100%; object-fit: cover; }
.event-initial { font-family: "Fraunces", serif; font-size: 1.8rem; }
.event-info { min-width: 0; flex: 1; }
.event-names { font-family: "Fraunces", serif; font-size: 1.2rem; line-height: 1.1; }
.event-meta { font-size: .8rem; color: var(--muted); margin-top: 3px; }
.event-count { font-size: .78rem; color: var(--accent); font-weight: 600; margin-top: 6px; }
.event-badges { position: absolute; top: 14px; right: 14px; }
.badge {
  font-size: .66rem; font-weight: 600; letter-spacing: .04em;
  color: var(--accent); border: 1px solid var(--accent);
  border-radius: 999px; padding: 3px 8px;
}

/* ---- Link-Blöcke ---- */
.link-block {
  margin-top: 16px; padding: 14px 16px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
}
.link-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 5px; }
.link-url { font-size: .84rem; word-break: break-all; font-weight: 500; }

/* ============================================================
   Galerie (Ansicht für das Paar)
   ============================================================ */
.gallery-body { background: var(--paper); min-height: 100vh; }
.gallery-body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(201,162,39,.12), transparent 60%);
}

.gallery-head { position: relative; z-index: 1; text-align: center; padding: 56px 24px 30px; }
.gallery-head-inner { max-width: 620px; margin: 0 auto; }
.portrait.small { width: 84px; height: 84px; margin: 0 auto 16px; }
.gallery-sub { color: var(--muted); margin-top: 14px; font-size: 1rem; }
.gallery-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.gallery-actions .btn { flex: none; padding: 12px 22px; text-decoration: none; }

.gallery-main { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: 20px 20px 60px; }

.cards { display: flex; flex-direction: column; gap: 18px; }
.card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden; box-shadow: 0 12px 40px -24px rgba(42,38,34,.4);
}
.card-photo { width: 100%; max-height: 340px; overflow: hidden; border-bottom: 1px solid var(--line); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 20px 22px 22px; }
.card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.quote-mark {
  font-family: "Fraunces", serif; font-size: 2.6rem; line-height: .7;
  color: var(--accent); flex: none;
}
.card-who { font-family: "Fraunces", serif; font-size: 1.3rem; }
.card-when { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.card audio { width: 100%; height: 42px; }

.gallery-empty { max-width: 460px; margin: 40px auto; }
.gallery-foot { position: relative; z-index: 1; text-align: center; padding: 30px; color: var(--muted); font-size: .8rem; }
.gallery-foot p::before, .gallery-foot p::after {
  content: ""; display: inline-block; width: 20px; height: 1px;
  background: var(--line); vertical-align: middle; margin: 0 10px;
}

/* ============================================================
   Feature-Erweiterungen: Stats, Playlist, Filter, Favoriten
   ============================================================ */

/* ---- QR-Buttons ---- */
.qr-btns { display: flex; gap: 10px; justify-content: center; margin-top: 6px; }
.qr-btns .btn { flex: 1; text-decoration: none; padding: 11px 14px; }

/* ---- Zähler-Bump im Admin ---- */
.event-count.bumped { animation: bump .7s ease; }
@keyframes bump {
  0% { transform: scale(1); }
  30% { transform: scale(1.18); color: var(--accent); }
  100% { transform: scale(1); }
}

/* ---- Galerie: Stats-Pills ---- */
.stats { display: flex; gap: 12px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.stat-pill {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 20px; text-align: center; min-width: 92px;
}
.stat-pill .sv {
  display: block; font-family: "Fraunces", serif; font-size: 1.5rem; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-pill .sl { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-top: 2px; }

/* ---- Filter-Leiste ---- */
.filter-bar {
  display: flex; gap: 14px; align-items: center; justify-content: space-between;
  margin-bottom: 22px; flex-wrap: wrap;
}
.search-wrap {
  position: relative; flex: 1; min-width: 200px;
}
.search-wrap svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--muted); pointer-events: none;
}
.search-wrap input {
  width: 100%; padding: 12px 14px 12px 42px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper-2); font: inherit; color: var(--ink);
}
.search-wrap input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,162,39,.16); }

.chips { display: flex; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--paper-2);
  border-radius: 999px; padding: 9px 16px; font: inherit; font-size: .85rem;
  color: var(--muted); cursor: pointer; transition: all .15s ease;
}
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.no-results { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---- Karten: Favoriten-Herz ---- */
.card-head { position: relative; }
.card-head-text { flex: 1; min-width: 0; }
.fav-btn {
  flex: none; background: none; border: none; cursor: pointer;
  padding: 4px; border-radius: 50%; line-height: 0;
  color: var(--line); transition: transform .15s ease, color .2s ease;
}
.fav-btn svg { width: 26px; height: 26px; fill: currentColor;
  stroke: var(--muted); stroke-width: 1.4px; }
.fav-btn:hover { transform: scale(1.12); }
.fav-btn.on { color: #D9534F; }
.fav-btn.on svg { stroke: #D9534F; }
.fav-btn.on { animation: pop .3s ease; }
@keyframes pop { 0%{transform:scale(1)} 50%{transform:scale(1.3)} 100%{transform:scale(1)} }

/* hervorgehobene Karte während Playlist */
.card.playing-hl { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 16px 40px -20px rgba(42,38,34,.5); }

/* ---- Now-Playing-Leiste ---- */
.nowplaying {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: rgba(251,248,241,.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 30px -18px rgba(42,38,34,.5);
}
.np-inner {
  max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
}
.np-btn {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  display: grid; place-items: center;
}
.np-btn svg { width: 20px; height: 20px; }
.np-btn .np-pause { display: none; }
.np-btn.is-playing .np-play { display: none; }
.np-btn.is-playing .np-pause { display: block; }
.np-info { flex: 1; min-width: 0; }
.np-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.np-who { font-family: "Fraunces", serif; font-size: 1.15rem; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-count { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .85rem; flex: none; }
.np-close {
  flex: none; background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 1.1rem; padding: 8px; border-radius: 8px;
}
.np-close:hover { color: var(--ink); background: var(--line); }

@media (prefers-reduced-motion: reduce) {
  .event-count.bumped, .fav-btn.on { animation: none; }
}

/* ============================================================
   Sprachumschaltung + Konfetti (Aufnahmeseite)
   ============================================================ */
.confetti-canvas {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  opacity: 0; transition: opacity .4s ease;
}

.lang-switch {
  position: fixed; top: 14px; right: 14px; z-index: 20;
  display: flex; gap: 2px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px;
  box-shadow: 0 6px 20px -14px rgba(42,38,34,.4);
}
.lang-opt {
  border: none; background: none; cursor: pointer;
  font: inherit; font-size: .76rem; font-weight: 600; letter-spacing: .04em;
  color: var(--muted); padding: 5px 11px; border-radius: 999px;
  transition: background .2s, color .2s;
}
.lang-opt.active { background: var(--accent); color: #fff; }

/* ---- Galerie: Live-Banner für neue Nachrichten ---- */
.new-banner {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 45; display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  font: inherit; font-size: .88rem; font-weight: 600;
  padding: 11px 20px; border-radius: 999px;
  box-shadow: 0 12px 32px -12px rgba(42,38,34,.5);
  animation: banner-in .4s ease;
}
@keyframes banner-in { from { opacity:0; transform: translate(-50%, -12px); } to { opacity:1; transform: translate(-50%, 0); } }
.nb-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: nb-pulse 1.4s ease-in-out infinite; }
@keyframes nb-pulse { 0%,100% { opacity:1; } 50% { opacity:.35; } }
@media (prefers-reduced-motion: reduce) { .new-banner, .nb-dot { animation: none; } }

/* ============================================================
   Text-Modus, Geschlossen-Seite, Text-Nachrichten
   ============================================================ */

/* „Lieber schreiben?" / „Doch sprechen?" */
.switch-mode {
  margin-top: 18px;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font: inherit; font-size: .9rem;
  text-decoration: underline; text-underline-offset: 3px;
  padding: 6px 10px; border-radius: 8px;
  transition: color .2s, background .2s;
}
.switch-mode:hover { color: var(--accent); }
.switch-mode.pulse {
  color: #fff; background: var(--accent); text-decoration: none;
  font-weight: 600; padding: 11px 20px; border-radius: 999px;
  animation: sm-pulse 1.6s ease-in-out infinite;
}
@keyframes sm-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .switch-mode.pulse { animation: none; } }

/* Text-Eingabe-Panel */
.text-panel {
  width: 100%; margin-top: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  animation: rise .4s ease;
}
.text-panel textarea, #textBody {
  width: 100%; padding: 14px 15px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--paper-2); font: inherit; color: var(--ink);
  resize: vertical; min-height: 120px; line-height: 1.5;
}
.text-panel textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,162,39,.18);
}

/* Text-Nachricht in der Galerie */
.card-text {
  font-family: "Fraunces", serif; font-size: 1.15rem; line-height: 1.55;
  color: var(--ink); white-space: pre-wrap; margin-top: 2px;
}

/* Text in der Admin-Liste */
.msg-text {
  font-size: .86rem; color: var(--ink); margin-top: 4px;
  font-style: italic; opacity: .85;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Geschlossen-Seite ---- */
.closed-page .stage { justify-content: center; }
.closed-card {
  max-width: 400px; margin: 10px auto 0; text-align: center;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 22px; padding: 40px 30px;
  box-shadow: var(--shadow); animation: rise .5s ease;
}
.closed-seal {
  width: 64px; height: 64px; margin: 0 auto 20px;
  border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center;
}
.closed-seal svg { width: 32px; height: 32px; }
.closed-title {
  font-family: "Fraunces", serif; font-weight: 400; font-size: 1.7rem;
  line-height: 1.15; margin-bottom: 16px;
}
.closed-text { color: var(--muted); line-height: 1.65; font-size: 1rem; white-space: pre-line; }
