:root {
  --bg: #f7f3ee;
  --card: #fffdfa;
  --ink: #3b3027;
  --muted: #8a7b6c;
  --line: #e6ddd2;
  --accent: #6f7f6a;      /* Salbei */
  --accent-ink: #fff;
  --gold: #b89b6a;
  --danger: #a64b3c;
  --radius: 16px;
  --shadow: 0 10px 30px -12px rgba(59, 48, 39, .25);
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.serif { font-family: var(--serif); font-weight: 500; letter-spacing: .01em; }
.muted { color: var(--muted); }

.screen { min-height: 100dvh; }
.center { display: grid; place-items: center; padding: 24px; }
.card {
  width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line);
  border-radius: 24px; padding: 40px 28px 28px; text-align: center; box-shadow: var(--shadow);
}
.card h1 { font-size: 2.6rem; line-height: 1.1; margin: 4px 0 6px; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; color: var(--muted); margin: 0; }
.subtitle { color: var(--gold); font-family: var(--serif); font-style: italic; font-size: 1.2rem; margin: 0; }
.subtitle:empty { display: none; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--gold); margin: 20px auto; max-width: 200px; }
.divider span { flex: 1; height: 1px; background: var(--line); }
.rings { font-size: 2.4rem; }
.hint { font-size: .82rem; color: var(--muted); margin: 14px 0 0; }

input[type="text"] {
  width: 100%; font: inherit; font-size: 1.1rem; padding: 14px 16px; margin: 6px 0 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-align: center;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input[type="text"]:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(111, 127, 106, .15); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600;
  border: 0; border-radius: 999px; padding: 14px 22px; cursor: pointer; text-decoration: none; transition: transform .1s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: rgba(255,255,255,.14); color: #fff; }
.btn.danger { background: rgba(166, 75, 60, .9); color: #fff; }
.btn.small { padding: 9px 16px; font-size: .9rem; }
.btn.wide { width: 100%; }

/* Kopf */
.top {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  padding: calc(20px + env(safe-area-inset-top)) 18px 10px; max-width: 1200px; margin: 0 auto;
}
.top h1 { font-size: 2.1rem; line-height: 1.05; margin: 0; }
.hello { font: inherit; font-size: .9rem; background: var(--card); border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.hello span { color: var(--muted); margin-left: 2px; }

.tabs { display: flex; gap: 6px; padding: 6px 18px 12px; max-width: 1200px; margin: 0 auto; position: sticky; top: 0; z-index: 5; background: linear-gradient(var(--bg) 75%, transparent); }
.tab { font: inherit; font-size: .92rem; font-weight: 500; border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.count { opacity: .7; font-size: .82em; margin-left: 2px; }

/* Upload-Fortschritt */
.uploads { max-width: 1200px; margin: 0 auto; padding: 0 18px; display: grid; gap: 8px; }
.up { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 8px 8px; font-size: .88rem; }
.up img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; background: var(--line); }
.up .bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.up .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.up.done .bar i { background: var(--gold); }
.up.err { border-color: var(--danger); }
.up .st { color: var(--muted); white-space: nowrap; }
.up.err .st { color: var(--danger); }

/* Galerie – zeilenweise Blocksatz: Reihenfolge links→rechts, gleiche Höhe je Zeile */
.gallery { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 12px 120px; max-width: 1200px; margin: 0 auto; }
.gallery::after { content: ''; flex-grow: 999999; }
@media (min-width: 700px) { .gallery { gap: 10px; padding-inline: 18px; } }
.tile { --r: 1; flex: var(--r) 1 calc(var(--r) * 130px); aspect-ratio: var(--r); max-height: 420px; position: relative; border-radius: 10px; overflow: hidden; background: #ece4da; cursor: zoom-in; display: block; border: 0; padding: 0; margin: 0; }
@media (min-width: 700px) { .tile { flex-basis: calc(var(--r) * 200px); } }
.tile img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.tile img.loaded { opacity: 1; }
.tile .who {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 7px; font-size: .78rem; color: #fff; text-align: left;
  background: linear-gradient(transparent, rgba(30, 22, 15, .6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile.new { animation: pop .5s ease; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

.empty { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 2.6rem; }
.empty .serif { font-size: 1.6rem; margin: 6px 0 0; }

/* Upload-Button */
.fab-wrap { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); pointer-events: none; background: linear-gradient(transparent, rgba(247, 243, 238, .95) 55%); }
.fab { pointer-events: auto; padding: 16px 28px; font-size: 1.05rem; box-shadow: 0 12px 28px -8px rgba(59, 48, 39, .45); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; height: 100%; height: 100dvh; z-index: 50; background: #16110c; display: grid; grid-template-rows: minmax(0,1fr) auto; grid-template-columns: minmax(0,1fr); overflow: hidden; color: #fff; touch-action: pan-y; }
.lb-stage { display: grid; place-items: center; overflow: hidden; min-width: 0; min-height: 0; padding: calc(56px + env(safe-area-inset-top)) 8px 8px; }
.lb-stage img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
.lb-meta { display: flex; flex-direction: column; font-size: .9rem; }
.lb-meta span { color: rgba(255,255,255,.6); font-size: .8rem; }
.lb-actions { display: flex; gap: 8px; }
.lb-btn { position: absolute; z-index: 2; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; display: grid; place-items: center; }
.lb-close { top: calc(12px + env(safe-area-inset-top)); right: 12px; font-size: 1.1rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 2rem; line-height: 1; }
.lb-prev { left: 10px; } .lb-next { right: 10px; }
@media (hover: none) { .lb-prev, .lb-next { display: none; } }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: .9rem; z-index: 60; box-shadow: var(--shadow); max-width: 90vw; text-align: center; }

/* ---------- Editor ---------- */
.lb-actions { flex-wrap: wrap; }
.editor { position: fixed; inset: 0; z-index: 70; background: #16110c; color: #fff; display: grid; grid-template-rows: auto 1fr auto auto auto auto; }
.ed-top { display: flex; justify-content: space-between; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 14px 8px; }
.ed-link { background: none; border: 0; color: rgba(255,255,255,.8); font: inherit; font-size: .95rem; padding: 8px 4px; cursor: pointer; }
.ed-stage { position: relative; display: grid; place-items: center; overflow: hidden; min-height: 0; }
.ed-stage canvas { touch-action: none; border-radius: 4px; box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 10px 40px rgba(0,0,0,.6); cursor: grab; background: #fff; }
.ed-loading { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.7); }
.ed-hint { text-align: center; font-size: .74rem; color: rgba(255,255,255,.5); margin: 6px 0 2px; }
.ed-tabs { display: flex; justify-content: center; gap: 6px; padding: 8px 12px 4px; }
.ed-tab { font: inherit; font-size: .85rem; background: transparent; color: rgba(255,255,255,.65); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.ed-tab.active { background: #fff; color: var(--ink); border-color: #fff; }
.ed-panels { padding: 8px 16px 4px; min-height: 128px; max-width: 560px; width: 100%; margin: 0 auto; }
.ed-panel { display: grid; gap: 10px; }
.ed-row { display: flex; gap: 8px; justify-content: center; }
.ed-slider { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; font-size: .85rem; color: rgba(255,255,255,.8); }
.ed-slider input { width: 100%; accent-color: #b89b6a; }
.ed-filters { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.ed-filter { flex: 0 0 auto; background: none; border: 0; color: rgba(255,255,255,.75); font: inherit; font-size: .74rem; display: grid; gap: 4px; justify-items: center; cursor: pointer; padding: 0; }
.ed-filter canvas { width: 54px; height: 72px; border-radius: 6px; border: 2px solid transparent; }
.ed-filter.active canvas { border-color: #b89b6a; }
.ed-filter.active { color: #fff; }
.ed-bottom { display: flex; gap: 8px; padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); justify-content: center; flex-wrap: wrap; }
.ed-bottom .btn { flex: 1 1 150px; max-width: 280px; padding: 13px 14px; font-size: .95rem; white-space: nowrap; }
.ed-bottom .btn:disabled { opacity: .5; cursor: default; }
#ed-print.armed { background: var(--gold); }
.top-actions { display: flex; gap: 6px; flex-wrap: wrap; }
a.hello { text-decoration: none; display: inline-block; }
.admin-pill { background: var(--ink) !important; color: #fff !important; border-color: var(--ink) !important; }

/* ---------- Avatare, Badges, soziale Funktionen ---------- */
.avatar { display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%; overflow: hidden; background: #b9b0a5; color: #fff; font-weight: 600; letter-spacing: .02em; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xs { width: 20px; height: 20px; font-size: 9px; box-shadow: 0 0 0 1.5px rgba(255,255,255,.85); }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar.md { width: 40px; height: 40px; font-size: 15px; }
.avatar.xl { width: 96px; height: 96px; font-size: 34px; }
.avatar-pick { position: relative; background: none; border: 0; padding: 0; margin: 10px auto 0; display: block; cursor: pointer; border-radius: 50%; }
.avatar-pick .avatar { box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line); }
.avatar-pick-badge { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 3px #fff; }
.hello-avatar { padding: 3px !important; display: inline-grid; place-items: center; }
.tile .who { display: flex; align-items: center; gap: 6px; }
.who-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.who-text b, .who-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-text b { font-weight: 600; font-size: .8rem; }
.who-text b + span { font-size: .7rem; opacity: .85; }
.badges { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.badge { background: rgba(20,15,10,.55); color: #fff; font-size: .7rem; font-weight: 600; padding: 2px 7px; border-radius: 999px; backdrop-filter: blur(4px); }
.badge.on { background: rgba(176, 52, 74, .85); }
.tabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.tab { white-space: nowrap; flex: 0 0 auto; }

.lb-bar { flex-direction: column; align-items: stretch; gap: 8px; }
.lb-head { display: flex; align-items: center; gap: 10px; }
.lb-head .lb-meta { flex: 1; min-width: 0; }
.lb-social { display: flex; gap: 6px; }
.social-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .9rem; font-weight: 600; color: #fff; background: rgba(255,255,255,.12); border: 0; border-radius: 999px; padding: 9px 14px; cursor: pointer; min-height: 40px; }
.social-btn .heart { font-size: 1.1rem; line-height: 1; transition: transform .2s; }
.social-btn.on { background: rgba(176, 52, 74, .9); }
.social-btn.on .heart { transform: scale(1.15); }
.lb-title-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lb-title { margin: 0; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.small-link { color: rgba(255,255,255,.7) !important; font-size: .85rem !important; padding: 2px 0 !important; }
.lb-title-form { display: flex; gap: 6px; }
.lb-title-form input, .comment-form input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; }
.heart-burst { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(0); font-size: 110px; color: #fff; opacity: 0; pointer-events: none; z-index: 3; text-shadow: 0 6px 30px rgba(0,0,0,.4); }
.heart-burst.go { animation: burst .8s ease-out; }
@keyframes burst { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.3); } 25% { opacity: .95; transform: translate(-50%,-50%) scale(1.1); } 60% { opacity: .9; transform: translate(-50%,-50%) scale(1); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.05); } }

.comments { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; max-height: 62vh; display: flex; flex-direction: column; background: #221b15; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.5); padding-bottom: env(safe-area-inset-bottom); }
.comments-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 6px; }
.comments-list { overflow-y: auto; padding: 4px 16px 8px; display: grid; gap: 12px; min-height: 80px; }
.c-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: start; }
.c-head { display: flex; gap: 8px; align-items: baseline; font-size: .85rem; }
.c-head .muted { color: rgba(255,255,255,.45); font-size: .75rem; }
.c-body p { margin: 2px 0 0; font-size: .95rem; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.c-del { background: none; border: 0; color: rgba(255,255,255,.4); cursor: pointer; font-size: .85rem; padding: 4px; }
.c-empty { color: rgba(255,255,255,.55) !important; margin: 8px 0; }
.comment-form { display: flex; gap: 8px; align-items: center; padding: 10px 14px 14px; border-top: 1px solid rgba(255,255,255,.08); }

@media (max-width: 520px) {
  .top-actions { gap: 5px; }
  .top-actions .hello { font-size: .82rem; padding: 6px 10px; }
  .top-actions .hello-avatar { padding: 2px !important; }
  .hello-greet { display: none; }
  .top-actions .hello-avatar .avatar.sm { width: 26px; height: 26px; }
}
.hello .avatar { color: #fff; }

/* dezenter Admin-Zugang unten links */
.admin-login { position: fixed; left: calc(12px + env(safe-area-inset-left)); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 4; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); opacity: .45; text-decoration: none; transition: opacity .2s, background .2s; }
.admin-login:hover, .admin-login:focus-visible { opacity: 1; background: var(--card); }
body:has(#screen-blocked:not([hidden])) .admin-login { display: none; }

/* ---------- Bereiche ---------- */
.views { display: flex; gap: 4px; padding: 4px 18px 10px; max-width: 1200px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.view-btn { flex: 1 0 auto; font: inherit; font-size: .9rem; font-weight: 600; background: transparent; border: 0; border-bottom: 2px solid var(--line); color: var(--muted); padding: 10px 8px; cursor: pointer; white-space: nowrap; }
.view-btn.active { color: var(--ink); border-bottom-color: var(--ink); }
.view { padding-bottom: 120px; }
.view-intro { max-width: 760px; margin: 0 auto; padding: 10px 18px 6px; }
.view-intro h2 { font-size: 1.9rem; margin: 0; }
.view-intro p { margin: 4px 0 0; }
.small { font-size: .82rem; }
.center-text { text-align: center; }
body[data-view="guestbook"] .fab-wrap, body[data-view="info"] .fab-wrap { display: none; }
.btn.ghost-dark { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.dark-link { color: var(--muted) !important; }

/* Banner */
.vote-banner, .ios-hint { display: flex; align-items: center; gap: 10px; width: calc(100% - 36px); max-width: 1164px; margin: 4px auto 10px; font: inherit; text-align: left; border: 0; border-radius: 14px; padding: 12px 16px; cursor: pointer; }
.vote-banner { background: linear-gradient(90deg, #3b3027, #5a4a3a); color: #fff; font-weight: 600; font-size: 1rem; box-shadow: var(--shadow); animation: glow 2.4s ease-in-out infinite; }
.vote-banner.winner { background: linear-gradient(90deg, #b89b6a, #d4bd8e); color: #2b2219; animation: none; }
@keyframes glow { 50% { box-shadow: 0 0 0 4px rgba(184,155,106,.35), var(--shadow); } }
.ios-hint { background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: .88rem; }
.ios-hint .x { margin-left: auto; color: var(--muted); }

/* Upload: erneut versuchen */
.up .retry { font: inherit; font-size: .8rem; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; margin-left: 6px; cursor: pointer; }
.up { grid-template-columns: 44px 1fr auto auto; }

/* Challenges */
.ch-progress { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 12px 0 4px; }
.ch-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .6s; }
.ch-list { max-width: 760px; margin: 0 auto; padding: 6px 18px; display: grid; gap: 10px; }
.ch-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 10px; }
.ch-card.done { border-color: rgba(111,127,106,.5); }
.ch-head { display: flex; gap: 12px; align-items: center; }
.ch-num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: var(--line); color: var(--ink); font-weight: 600; font-size: .9rem; }
.ch-card.done .ch-num { background: var(--accent); color: #fff; }
.ch-text { margin: 0; font-weight: 600; }
.ch-thumbs { display: flex; gap: 6px; align-items: center; }
.ch-thumbs:empty { display: none; }
.ch-thumb { width: 58px; height: 58px; border: 0; padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer; background: #ece4da; }
.ch-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ch-more { font-size: .85rem; color: var(--muted); font-weight: 600; }
.ch-add { justify-self: start; }

/* Gästebuch & Zeitkapsel */
.gb-card { max-width: 724px; margin: 10px auto; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 12px; box-sizing: border-box; width: calc(100% - 36px); }
.gb-card textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; resize: vertical; }
.gb-card h3 { margin: 0; font-size: 1.4rem; }
.capsule-card form { display: grid; gap: 10px; }
.gb-rec { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.gb-rec audio { width: 100%; height: 40px; }
.rec-btn { display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 600; background: #fff; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 10px 16px; cursor: pointer; min-height: 44px; }
.rec-btn .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--danger); }
.rec-btn.recording { background: var(--danger); color: #fff; border-color: var(--danger); }
.rec-btn.recording .dot { background: #fff; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.gb-list { max-width: 760px; margin: 0 auto; padding: 6px 18px; display: grid; gap: 10px; }
.gb-entry { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 8px; }
.gb-entry header { display: flex; align-items: center; gap: 10px; }
.gb-entry header .muted { margin-left: auto; }
.gb-entry p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.gb-entry audio { width: 100%; height: 40px; }
.gb-entry .ed-link { justify-self: start; font-size: .8rem; }

/* Infos */
.info-list { max-width: 760px; margin: 0 auto; padding: 6px 18px; display: grid; gap: 10px; }
.info-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.info-card h3 { margin: 0 0 6px; font-size: 1rem; }
.info-card p { margin: 0; white-space: pre-wrap; line-height: 1.55; }
.info-card a { color: var(--accent); font-weight: 600; }

/* Lightbox: Challenge */
.lb-ch-row { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: rgba(255,255,255,.8); }
.lb-ch-row select { font: inherit; font-size: 15px; flex: 1; min-width: 0; padding: 7px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; }
.lb-ch-row select option { color: #111; }

/* Sheets (Abstimmung, Neuigkeiten) */
.sheet { position: fixed; inset: 0; z-index: 80; background: rgba(20,15,10,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet-card { width: 100%; max-width: 640px; max-height: 82vh; overflow-y: auto; background: var(--bg); border-radius: 22px 22px 0 0; padding: 14px 18px calc(18px + env(safe-area-inset-bottom)); box-sizing: border-box; animation: up .25s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.vote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.vote-item { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 12px; overflow: hidden; cursor: pointer; background: #ece4da; }
.vote-item img { width: 100%; height: 100%; object-fit: cover; }
.vote-item.chosen { box-shadow: 0 0 0 4px var(--gold); }
.vote-check { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; font-weight: 700; }
.bell { position: relative; padding: 7px 10px !important; display: inline-grid; place-items: center; }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.bell-count[hidden] { display: none; }
.bell-list { display: grid; gap: 6px; margin-top: 8px; }
.bell-item { display: grid; grid-template-columns: 30px 1fr 44px; gap: 10px; align-items: center; font: inherit; font-size: .9rem; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; cursor: pointer; color: var(--ink); }
.bell-item.new { border-color: var(--gold); }
.bell-item img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.bell-text { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 520px) {
  .views { padding-inline: 10px; gap: 0; }
  .view-btn { font-size: .8rem; padding: 10px 4px; flex: 1 1 auto; }
}
.ed-check { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: rgba(255,255,255,.85); }
.ed-check input { width: 18px; height: 18px; accent-color: #b89b6a; }

/* ---------- Countdown & Danke ---------- */
.countdown, .thanks { max-width: 724px; width: calc(100% - 36px); margin: 4px auto 14px; box-sizing: border-box; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; text-align: center; box-shadow: var(--shadow); }
.cd-digits { display: flex; justify-content: center; gap: 10px; margin: 8px 0 10px; }
.cd-digits span { display: grid; min-width: 64px; padding: 10px 6px; border-radius: 14px; background: var(--bg); font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.cd-digits b { font-family: var(--serif); font-size: 2.2rem; color: var(--ink); line-height: 1.05; letter-spacing: 0; }
.countdown .muted { margin: 0; font-size: .92rem; }
.thanks h2 { margin: 0 0 6px; font-size: 2rem; }
.thanks p { white-space: pre-wrap; margin: 0 0 12px; }
.thanks-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
body.prestart .fab-wrap { display: none; }
body.prestart .strip-cta { display: none; }

/* ---------- Musik ---------- */
.song-form { grid-template-columns: 1fr auto; align-items: center; }
.song-form input { font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.song-list { max-width: 760px; margin: 0 auto; padding: 6px 18px; display: grid; gap: 8px; }
.song { display: grid; grid-template-columns: 30px 1fr auto auto; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.song-n { font-family: var(--serif); font-size: 1.3rem; color: var(--gold); text-align: center; }
.song-body { display: grid; min-width: 0; }
.song-body strong { overflow-wrap: anywhere; }
.song-like { font: inherit; font-weight: 600; font-size: .9rem; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 12px; cursor: pointer; min-height: 40px; }
.song-like.on { background: #b0344a; color: #fff; border-color: #b0344a; }
.c-del.dark { color: var(--muted); }

/* ---------- Quiz (Handy) ---------- */
.vote-banner.quiz { background: linear-gradient(90deg, #5f7a8a, #6f7f6a); }
.quiz-body { display: grid; gap: 10px; padding-bottom: 6px; }
.quiz-q { font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; margin: 0; }
.quiz-big { font-family: var(--serif); font-size: 1.7rem; margin: 6px 0; text-align: center; }
.quiz-time { margin: 0; font-weight: 600; color: var(--accent); }
.quiz-answers { display: grid; gap: 8px; }
.quiz-a { display: flex; gap: 12px; align-items: center; font: inherit; font-size: 1.05rem; font-weight: 600; color: #fff; border: 0; border-radius: 14px; padding: 16px; text-align: left; cursor: pointer; min-height: 56px; }
.quiz-a .l { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,.25); display: grid; place-items: center; flex: 0 0 auto; }
.quiz-a.c0 { background: #a64b3c; } .quiz-a.c1 { background: #5f7a8a; } .quiz-a.c2 { background: #b89b6a; } .quiz-a.c3 { background: #6f7f6a; }
.quiz-a:disabled { cursor: default; }
.quiz-a.mine { box-shadow: 0 0 0 4px var(--ink); }
.quiz-a.dim { opacity: .35; }
.quiz-a.right { box-shadow: 0 0 0 4px var(--gold); }
.quiz-board { margin: 0; padding-left: 26px; display: grid; gap: 6px; }
.quiz-board li { padding: 6px 4px; }
.quiz-board li span { display: inline-block; min-width: 60%; }
.quiz-board li.me { font-weight: 700; }

/* ---------- Fotostreifen ---------- */
.strip-cta { text-align: center; margin: -100px 0 120px; }
.strip-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; max-height: 52vh; overflow-y: auto; }
.strip-item { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 10px; overflow: hidden; background: #ece4da; cursor: pointer; }
.strip-item img { width: 100%; height: 100%; object-fit: cover; }
.strip-item.sel { box-shadow: inset 0 0 0 4px var(--gold); }
.strip-n { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: #fff; font-weight: 700; font-size: .8rem; display: none; place-items: center; }
.strip-item.sel .strip-n { display: grid; }
.strip-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; position: sticky; bottom: 0; background: var(--bg); padding-top: 8px; }
@media (max-width: 520px) { .view-btn { font-size: .74rem; padding: 10px 3px; } }
body.prestart #empty { display: none !important; }

/* Lightbox: robust auf schmalen Handys */
.lb-bar { min-width: 0; flex-wrap: nowrap; box-sizing: border-box; width: 100%; max-width: 100vw; }
.lb-bar > * { min-width: 0; max-width: 100%; }
.lb-head { min-width: 0; }
.lb-head .avatar { flex: 0 0 auto; }
.lb-meta strong, .lb-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-social { flex: 0 0 auto; margin-left: auto; }
@media (max-width: 380px) { .lb-social .social-btn { padding: 8px 10px; gap: 4px; } }

/* Gästeliste */
.guest-list { max-width: 724px; margin: 6px auto 30px; padding: 0 18px 90px; display: grid; gap: 10px; box-sizing: border-box; }
.guest-row { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.guest-row.banned { opacity: .7; border-style: dashed; }
.guest-main { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.guest-main:disabled { cursor: default; }
.guest-main .avatar { flex: 0 0 auto; }
.guest-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.guest-txt strong, .guest-txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guest-go { font-size: 1.6rem; color: var(--muted); line-height: 1; }
.guest-acts { display: flex; gap: 8px; padding: 0 14px 12px 66px; flex-wrap: wrap; }
.tab.person { display: inline-flex; align-items: center; gap: 4px; }
.tab-x { margin-left: 2px; opacity: .6; font-size: .8em; padding: 0 2px; }

/* Sprachkommentare */
.c-mic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; cursor: pointer; }
.comment-form.recording .c-mic { background: #c0392b; animation: micpulse 1.2s ease-in-out infinite; }
@keyframes micpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(192,57,43,.6); } 50% { box-shadow: 0 0 0 8px rgba(192,57,43,0); } }
.c-rec-state { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: .85rem; color: rgba(255,255,255,.85); white-space: nowrap; overflow: hidden; }
.c-rec-state[hidden] { display: none; }
.c-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #e74c3c; flex: 0 0 auto; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: .2; } }
#c-rec-time { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.c-rec-cancel { background: none; border: 0; color: rgba(255,255,255,.6); font: inherit; font-size: .8rem; cursor: pointer; padding: 4px; }
.comment-form #comment-input[hidden], .comment-form button[hidden] { display: none; }
.voice { display: flex; align-items: center; gap: 10px; margin-top: 4px; background: rgba(255,255,255,.07); border-radius: 999px; padding: 4px 12px 4px 4px; max-width: 260px; }
.voice-play { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-size: .8rem; cursor: pointer; flex: 0 0 auto; }
.voice-bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.18); overflow: hidden; }
.voice-bar i { display: block; height: 100%; width: 0; background: #fff; transition: width .2s linear; }
.voice-time { font-size: .75rem; color: rgba(255,255,255,.7); font-variant-numeric: tabular-nums; min-width: 30px; text-align: right; }

/* Videos */
.lb-stage img[hidden], .lb-stage video[hidden] { display: none; }
.lb-stage video { display: block; max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; border-radius: 6px; background: #000; }
.vid-badge { position: absolute; top: 8px; left: 8px; background: rgba(20,15,10,.65); color: #fff; font-size: .72rem; font-weight: 600; border-radius: 999px; padding: 3px 8px; pointer-events: none; font-variant-numeric: tabular-nums; }

/* Zeitleiste */
.timeline { max-width: 1200px; margin: 0 auto; padding: 4px 0 120px; }
.timeline[hidden] { display: none; }
.tl-sec { position: relative; margin: 0 0 18px; }
.tl-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px 6px; position: sticky; top: 0; z-index: 2; background: linear-gradient(var(--bg, #f6f2ec) 75%, transparent); }
.tl-emoji { width: 42px; height: 42px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; font-size: 1.3rem; flex: 0 0 auto; }
.tl-head h3 { margin: 0; font-size: 1.45rem; line-height: 1.15; }
.tl-grid { padding-bottom: 6px; }
.tl-grid.gallery { padding-top: 4px; padding-bottom: 6px; }

/* ---------- Wer von beiden? (Handy) ---------- */
.vote-banner.wvb { background: linear-gradient(90deg, #a64b3c, #5f7a8a); }
.wvb-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wvb-btn { display: grid; justify-items: center; gap: 6px; font: inherit; font-size: 1.15rem; font-weight: 600; color: #fff; border: 0; border-radius: 18px; padding: 18px 10px; cursor: pointer; min-height: 130px; transition: transform .15s, opacity .3s; }
.wvb-btn.a { background: #a64b3c; } .wvb-btn.b { background: #5f7a8a; }
.wvb-btn .ini { width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; font-family: var(--serif); font-size: 2rem; }
.wvb-btn small { font-weight: 500; opacity: .9; }
.wvb-btn:active { transform: scale(.97); }
.wvb-btn.mine { box-shadow: 0 0 0 4px var(--ink); }
.wvb-btn.right { box-shadow: 0 0 0 4px var(--gold); }
.wvb-btn.dim { opacity: .35; }
.wvb-btn:disabled { cursor: default; }
