/* Unser kleines Weihnachtsdorf – Oberfläche */
@font-face { font-family: 'Lora'; src: url('/fonts/lora.woff') format('woff'); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Lora'; src: url('/fonts/lora-italic.woff') format('woff'); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/dmsans.woff') format('woff'); font-weight: 300 800; font-style: normal; font-display: swap; }

:root {
  --night: #0b1230; --night-2: #141b48; --ink: #33263a; --ink-2: #5a4656;
  --cream: #faf3e4; --cream-2: #f1e5cc; --gold: #eebd55; --gold-2: #c58c36; --red: #c4464b; --green: #2f7466;
  --text-light: #f6efe0;
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--night); color: var(--text-light); font-family: var(--sans); overflow: hidden; overscroll-behavior: none; }
body { position: fixed; inset: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

#world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 55%, rgba(0,0,0,0) 55%, rgba(4,6,24,.45) 100%); }

/* ---------- HUD ---------- */
.hud-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5; pointer-events: none; text-align: center;
  padding: calc(var(--safe-t) + 12px) 16px 18px;
  background: linear-gradient(to bottom, rgba(6,10,32,.7), rgba(6,10,32,.35) 65%, rgba(6,10,32,0));
}
.hud-top h1 {
  margin: 0; font-family: var(--serif); font-style: italic; font-weight: 600; letter-spacing: .01em;
  font-size: clamp(21px, 5.8vw, 32px); line-height: 1.15; color: #fff3d6;
  text-shadow: 0 2px 10px rgba(0,0,0,.45), 0 0 22px rgba(255,196,110,.28);
}
.date-row { margin-top: 4px; font-size: 12.5px; letter-spacing: .05em; color: rgba(232,230,255,.86); display: flex; justify-content: center; gap: 2px 8px; flex-wrap: wrap; }
#dayinfo::before { content: '✦'; margin-right: 8px; color: var(--gold); opacity: .85; font-size: 10px; vertical-align: 1px; }

.hud-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; gap: 10px;
  padding: 14px 14px calc(var(--safe-b) + 12px);
  background: linear-gradient(to top, rgba(6,10,32,.62), rgba(6,10,32,.3) 60%, rgba(6,10,32,0));
  pointer-events: none;
}
.hud-bottom > * { pointer-events: auto; }
.icon-btn {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; padding: 0;
  background: rgba(18,24,66,.62); border: 1px solid rgba(255,225,170,.38);
  box-shadow: 0 4px 14px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: transform .15s ease;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 22px; height: 22px; fill: #fbeccb; }
#btn-music .ic-off { display: none; }
#btn-music[aria-pressed="false"] .ic-on { display: none; }
#btn-music[aria-pressed="false"] .ic-off { display: block; }
#btn-music[hidden] { display: block !important; visibility: hidden; }

.progress { text-align: center; min-width: 0; pointer-events: none; }
.garland { position: relative; height: 26px; margin: 0 auto; max-width: 340px; }
.garland svg.wire { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.garland svg.wire path { fill: none; stroke: #2c3a2e; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.garland .bulb {
  position: absolute; width: 7px; height: 10px; margin: -2px 0 0 -3.5px; border-radius: 50% 50% 45% 45%;
  background: rgba(220,225,255,.16); box-shadow: inset 0 -2px 2px rgba(0,0,0,.25);
}
.garland .bulb::before { content: ''; position: absolute; left: 1.5px; top: -3px; width: 4px; height: 3px; background: #3d4a3d; border-radius: 1px; }
.garland .bulb.on { background: var(--c); box-shadow: 0 0 7px 2px var(--c); }
@supports (color: color-mix(in srgb, red 50%, blue)) { .garland .bulb.on { box-shadow: 0 0 7px 2px var(--c), 0 0 16px 3px color-mix(in srgb, var(--c) 45%, transparent); } }
.garland .bulb.today { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { filter: brightness(1.5); transform: scale(1.25); } }
.progress-text { margin-top: 3px; font-size: 11.5px; letter-spacing: .04em; color: rgba(232,230,255,.82); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Laden ---------- */
.loader { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: rgba(240,236,255,.8); font-family: var(--serif); font-style: italic; background: var(--night); transition: opacity .6s ease; }
.loader-star { font-size: 30px; color: var(--gold); animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
body:not(.loading) .loader { opacity: 0; pointer-events: none; }

/* ---------- Intro ---------- */
.intro { position: fixed; inset: 0; z-index: 15; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 50% 45%, rgba(10,14,44,.45), rgba(5,8,28,.85)); transition: opacity .7s ease; }
.intro.hide { opacity: 0; pointer-events: none; }
.intro-card { max-width: 420px; text-align: center; animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
.intro-orn { color: var(--gold); letter-spacing: .5em; font-size: 14px; opacity: .9; }
.intro h2 { margin: 12px 0 10px; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(28px, 8vw, 40px); line-height: 1.12; color: #fff3d6; text-shadow: 0 0 26px rgba(255,196,110,.35); }
.intro p { margin: 0 auto 22px; max-width: 340px; font-family: var(--serif); font-size: 17px; line-height: 1.55; color: rgba(240,236,255,.9); }
.intro .intro-hint { margin-top: 16px; font-family: var(--sans); font-size: 12px; color: rgba(220,220,250,.6); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.btn-gold {
  border: 0; border-radius: 999px; padding: 13px 30px; font-weight: 700; letter-spacing: .03em; font-size: 16px; color: #3a2414;
  background: linear-gradient(180deg, #ffe39a, #eebd55 55%, #d79a3a);
  box-shadow: 0 6px 20px rgba(238,189,85,.35), inset 0 1px 0 rgba(255,255,255,.6), inset 0 -2px 0 rgba(150,90,30,.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-gold:active { transform: translateY(1px) scale(.98); }
.btn-gold.wide { width: 100%; }
#intro-go { padding: 15px 44px; font-size: 18px; animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 6px 34px rgba(255,205,110,.65), inset 0 1px 0 rgba(255,255,255,.6), inset 0 -2px 0 rgba(150,90,30,.35); } }
.btn-ghost { border: 1px solid rgba(255,225,170,.5); background: transparent; border-radius: 999px; padding: 9px 18px; color: #fbeccb; }

/* ---------- Türchen-Fenster ---------- */
.modal { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: calc(var(--safe-t) + 14px) 12px calc(var(--safe-b) + 14px); }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,8,26,.55); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; } }
.card {
  position: relative; width: min(560px, 100%); max-height: 100%; display: flex; flex-direction: column; color: var(--ink);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.75), rgba(255,255,255,0) 55%),
    radial-gradient(ellipse at 100% 100%, rgba(214,184,130,.35), rgba(214,184,130,0) 60%),
    var(--cream);
  border-radius: 20px;
  box-shadow: 0 0 0 2px #e7cf9b, 0 0 0 6px rgba(250,243,228,.92), 0 0 0 7.5px #c99a4a, 0 24px 60px rgba(0,0,0,.55);
  animation: pop .5s cubic-bezier(.2,.9,.25,1.15) both;
  overflow: hidden;
}
.modal.closing .card { animation: popout .25s ease both; }
.modal.closing .modal-backdrop { animation: fade .25s ease reverse both; }
@keyframes pop { from { opacity: 0; transform: translateY(26px) scale(.9); } }
@keyframes popout { to { opacity: 0; transform: translateY(14px) scale(.94); } }
.card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .35; mix-blend-mode: multiply;
  background-image: repeating-radial-gradient(circle at 30% 20%, rgba(150,110,60,.05) 0 2px, transparent 2px 5px);
}
.card-x { position: absolute; top: 8px; right: 10px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(90,60,40,.08); font-size: 26px; line-height: 1; color: var(--ink-2); }
.card-head { position: relative; padding: 24px 54px 6px 24px; }
.card-kicker { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--red); }
.card-head h2 { margin: 6px 0 0; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(23px, 6vw, 29px); line-height: 1.18; color: #2e2238; }
.card-orn { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--gold-2); font-size: 12px; }
.card-orn i { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(197,140,54,0), rgba(197,140,54,.7), rgba(197,140,54,0)); }
.card-body { position: relative; padding: 14px 24px 12px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; flex: 1;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); }
.card-body > * + * { margin-top: 18px; }
.card-foot { padding: 12px 24px 20px; }
.card-body.loading-door { min-height: 160px; display: grid; place-items: center; color: var(--ink-2); font-family: var(--serif); font-style: italic; }

.blk-text { font-family: var(--serif); font-size: 17.5px; line-height: 1.62; color: #3a2b3d; }
.blk-text p { margin: 0 0 .8em; }
.blk-text p:last-child { margin-bottom: 0; }
.blk-h { margin: 0 0 10px; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 19px; color: #3a2b3d; }
.blk-photo { margin: 18px 4px 0; padding: 9px 9px 0; background: #fff; border-radius: 3px; box-shadow: 0 6px 18px rgba(60,40,30,.22); transform: rotate(-1.1deg); }
.blk-photo img { display: block; width: 100%; max-height: 62vh; object-fit: cover; border-radius: 1px; cursor: zoom-in; background: #eee; }
.blk-photo figcaption, .gal-item figcaption, .blk-video figcaption { padding: 9px 4px 11px; font-family: var(--serif); font-style: italic; font-size: 15px; color: #5a4656; text-align: center; }
.blk-photo:not(:has(figcaption)) { padding-bottom: 9px; }
.gal-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 12px; scrollbar-width: none; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-item { flex: 0 0 82%; margin: 0; scroll-snap-align: center; background: #fff; padding: 8px 8px 0; border-radius: 3px; box-shadow: 0 5px 14px rgba(60,40,30,.2); }
.gal-item:nth-child(even) { transform: rotate(.8deg); }
.gal-item:nth-child(odd) { transform: rotate(-.7deg); }
.gal-item img { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; cursor: zoom-in; background: #eee; }
.gal-item:not(:has(figcaption)) { padding-bottom: 8px; }
.gal-dots { display: flex; justify-content: center; gap: 6px; }
.gal-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(90,70,86,.25); transition: background .2s; }
.gal-dots i.on { background: var(--red); }
.blk-video { margin: 0; }
.blk-video video { display: block; width: 100%; max-height: 62vh; border-radius: 12px; background: #000; box-shadow: 0 6px 18px rgba(30,20,30,.3); }

.player { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; color: #f4ecff; background: linear-gradient(135deg, #1f2a5e, #2c2350); box-shadow: 0 8px 20px rgba(20,16,50,.3), inset 0 1px 0 rgba(255,255,255,.08); position: relative; overflow: hidden; }
.pl-btn { flex: 0 0 52px; height: 52px; border-radius: 50%; border: 0; display: grid; place-items: center; background: linear-gradient(180deg, #ffe39a, #eebd55 55%, #d79a3a); box-shadow: 0 4px 14px rgba(238,189,85,.4); }
.pl-btn .ic { width: 24px; height: 24px; fill: #3a2414; }
.pl-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
.pl-label { display: flex; align-items: center; gap: 5px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.pl-label .ic { width: 13px; height: 13px; fill: var(--gold); }
.pl-title { margin: 3px 0 8px; font-family: var(--serif); font-style: italic; font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.15); cursor: pointer; }
.pl-fill { height: 100%; width: 0; border-radius: 3px; background: var(--gold); }
.pl-time { margin-top: 5px; font-size: 11.5px; color: rgba(240,236,255,.7); font-variant-numeric: tabular-nums; }
.pl-waves { position: absolute; right: 14px; top: 14px; display: flex; gap: 2px; align-items: flex-end; height: 18px; opacity: .45; }
.player:not(.voice) .pl-waves { display: none; }
.pl-waves i { width: 2px; height: 30%; background: var(--gold); border-radius: 1px; }
.player.playing .pl-waves i { animation: wave .9s ease-in-out infinite; }
.pl-waves i:nth-child(3n) { animation-delay: -.3s !important; } .pl-waves i:nth-child(3n+1) { animation-delay: -.6s !important; } .pl-waves i:nth-child(4n) { animation-duration: 1.2s !important; }
@keyframes wave { 50% { height: 100%; } }

.blk-voucher {
  position: relative; padding: 20px 26px 22px; text-align: center; color: #3b2516;
  background: linear-gradient(135deg, #fff4d6, #f6dc9f 60%, #eec777);
  border-radius: 14px; box-shadow: 0 8px 20px rgba(120,80,20,.22);
  -webkit-mask: radial-gradient(circle at 0 50%, transparent 13px, #000 13.5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 13px, #000 13.5px) right / 51% 100% no-repeat;
  mask: radial-gradient(circle at 0 50%, transparent 13px, #000 13.5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 13px, #000 13.5px) right / 51% 100% no-repeat;
}
.blk-voucher::after { content: ''; position: absolute; inset: 8px; border: 1.5px dashed rgba(160,100,30,.55); border-radius: 9px; pointer-events: none; }
.v-head { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; color: var(--red); }
.v-head .ic { width: 16px; height: 16px; fill: var(--red); }
.v-title { margin: 8px 0 4px; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 24px; line-height: 1.2; }
.v-text { font-family: var(--serif); font-size: 16px; line-height: 1.5; }
.v-text p { margin: 0 0 .5em; }
.v-code { display: inline-block; margin-top: 10px; padding: 6px 14px; border-radius: 8px; background: rgba(255,255,255,.65); font-family: ui-monospace, Menlo, monospace; font-size: 16px; letter-spacing: .12em; user-select: all; -webkit-user-select: all; }
.v-valid { margin-top: 10px; font-size: 12.5px; color: rgba(59,37,22,.75); }

.blk-memory { position: relative; padding: 26px 18px 18px; background: #fffdf6; border-radius: 4px; box-shadow: 0 6px 16px rgba(60,40,30,.18); transform: rotate(.6deg); }
.m-label { position: absolute; top: -10px; left: 50%; transform: translateX(-50%) rotate(-2deg); padding: 4px 18px; font-size: 11px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: #5a3a3a; background: rgba(214,120,120,.55); }
.m-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; font-size: 13.5px; color: var(--ink-2); margin-bottom: 10px; }
.m-meta span { display: inline-flex; align-items: center; gap: 5px; }
.m-meta .ic { width: 15px; height: 15px; fill: var(--red); }
.m-photo { display: block; width: 100%; max-height: 50vh; object-fit: cover; border-radius: 2px; margin-bottom: 12px; cursor: zoom-in; }
.m-text { font-family: var(--serif); font-size: 16.5px; line-height: 1.6; color: #3a2b3d; }
.m-text p { margin: 0 0 .7em; }
.m-text p:last-child { margin: 0; }
.blk-empty { text-align: center; font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink-2); padding: 10px 0; }
.blk-empty .small { font-size: 14px; opacity: .8; }

.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(4,6,20,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(var(--safe-t) + 20px) 10px calc(var(--safe-b) + 20px); opacity: 0; transition: opacity .25s ease; touch-action: pan-y; }
.lightbox.show { opacity: 1; }
.lightbox img { max-width: 100%; max-height: calc(100% - 50px); object-fit: contain; border-radius: 4px; }
.lb-cap { margin-top: 12px; font-family: var(--serif); font-style: italic; color: #f1e8ff; text-align: center; }
.lb-close { position: absolute; top: calc(var(--safe-t) + 10px); right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); font-size: 28px; color: #fff; }

/* ---------- Einstellungen ---------- */
.sheet { position: fixed; inset: 0; z-index: 35; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(4,6,22,.5); animation: fade .3s ease both; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 520px; max-height: 88%; overflow-y: auto;
  padding: 10px 22px calc(var(--safe-b) + 18px); border-radius: 22px 22px 0 0; color: var(--text-light);
  background: linear-gradient(180deg, #1c2458, #121842); border-top: 1px solid rgba(255,225,170,.3);
  box-shadow: 0 -12px 40px rgba(0,0,0,.45); animation: slideup .4s cubic-bezier(.2,.9,.25,1) both;
}
@keyframes slideup { from { transform: translateY(100%); } }
.sheet-grip { width: 42px; height: 5px; margin: 0 auto 10px; border-radius: 3px; background: rgba(255,255,255,.25); }
.sheet-panel h2 { margin: 4px 0 12px; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 24px; color: #fff3d6; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 15.5px; }
.row.col { flex-direction: column; align-items: stretch; gap: 8px; }
.row.install p { margin: 0; font-size: 13.5px; line-height: 1.5; color: rgba(230,228,255,.75); }
.row.install button { align-self: flex-start; }
.switch { appearance: none; -webkit-appearance: none; flex: 0 0 48px; width: 48px; height: 28px; border-radius: 14px; background: rgba(255,255,255,.18); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: transform .2s; }
.switch:checked { background: var(--gold); }
.switch:checked::after { transform: translateX(20px); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); outline: none; margin: 8px 0; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--gold); }
.sheet-foot { margin: 16px 0 14px; text-align: center; font-family: var(--serif); font-style: italic; font-size: 14px; color: rgba(230,228,255,.6); }

/* ---------- Sonstiges ---------- */
.finale { position: fixed; left: 0; right: 0; top: 22%; z-index: 12; text-align: center; pointer-events: none; padding: 0 20px; }
.finale span { display: inline-block; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(30px, 9vw, 56px); color: #ffe6a6; text-shadow: 0 0 18px rgba(255,190,90,.8), 0 0 50px rgba(255,170,80,.5), 0 3px 8px rgba(0,0,0,.5); animation: finale 7s ease both; }
@keyframes finale { 0% { opacity: 0; transform: scale(.85); } 12% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
.toast { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 96px); z-index: 40; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; font-size: 14px; background: rgba(16,22,60,.88); border: 1px solid rgba(255,225,170,.35); color: #fbeccb; box-shadow: 0 6px 20px rgba(0,0,0,.4); animation: toast 2.8s ease both; white-space: normal; width: max-content; max-width: calc(100vw - 32px); text-align: center; line-height: 1.4; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 10px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.preview-banner { position: fixed; top: calc(var(--safe-t) + 76px); left: 50%; transform: translateX(-50%); z-index: 6; padding: 5px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .05em; color: #3a2414; background: var(--gold); white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.private, .msg-page { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 50% 30%, #1d2660, #0b1230 70%); }
.msg-card { max-width: 420px; text-align: center; color: var(--text-light); }
.msg-card h1 { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 30px; color: #fff3d6; margin: 0 0 12px; }
.msg-card p { font-family: var(--serif); font-size: 17px; line-height: 1.6; color: rgba(236,233,255,.85); }

@media (min-width: 900px) {
  .hud-top { padding-top: 18px; }
  .hud-bottom { padding-left: 24px; padding-right: 24px; grid-template-columns: 50px 1fr 50px; }
  .garland { max-width: 440px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Erzählzeile ---------- */
.door-story { margin: 0 0 4px; font-family: var(--serif); font-style: italic; font-size: 15.5px; line-height: 1.5; color: #7a5a5e; }
.story { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 92px); z-index: 11; width: min(420px, calc(100% - 32px)); transform: translate(-50%, 12px); opacity: 0; transition: opacity .45s ease, transform .45s ease; pointer-events: none;
  padding: 11px 16px 12px; border-radius: 16px; text-align: center; background: rgba(250,243,228,.95); color: var(--ink); box-shadow: 0 0 0 1.5px #e0c48a, 0 10px 30px rgba(0,0,0,.4); }
.story.show { opacity: 1; transform: translate(-50%, 0); }
.story-kicker { font-size: 10.5px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--red); }
#story-text { margin-top: 3px; font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.4; }

/* ---------- Kommentare ---------- */
.comments { margin-top: 26px !important; }
.cm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cm-head h3 { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 18px; color: #3a2b3d; white-space: nowrap; }
.cm-line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(197,140,54,0), rgba(197,140,54,.6), rgba(197,140,54,0)); }
.cm-list { display: flex; flex-direction: column; gap: 10px; }
.cm-empty { margin: 0; text-align: center; font-family: var(--serif); font-style: italic; font-size: 15px; color: #8a7480; }
.cm-msg { display: flex; flex-direction: column; max-width: 84%; }
.cm-msg.me { align-self: flex-end; align-items: flex-end; }
.cm-msg.you { align-self: flex-start; align-items: flex-start; }
.cm-bubble { padding: 9px 13px; border-radius: 16px; font-family: var(--serif); font-size: 16px; line-height: 1.45; word-break: break-word; }
.cm-bubble p { margin: 0 0 .4em; } .cm-bubble p:last-child { margin: 0; }
.cm-msg.me .cm-bubble { background: linear-gradient(180deg, #d9575d, #c4464b); color: #fff8f0; border-bottom-right-radius: 5px; box-shadow: 0 3px 10px rgba(196,70,75,.25); }
.cm-msg.you .cm-bubble { background: linear-gradient(180deg, #24306a, #1d2656); color: #f6efe0; border-bottom-left-radius: 5px; box-shadow: 0 3px 10px rgba(29,38,86,.25); }
.cm-msg.big .cm-bubble { background: none; box-shadow: none; font-size: 38px; line-height: 1.1; padding: 0 4px; }
.cm-msg.fresh { animation: pop .45s cubic-bezier(.2,.9,.25,1.3) both; }
.cm-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 11.5px; color: #8a7480; }
.cm-del { border: 0; background: none; padding: 0 2px; font-size: 13px; color: #a08890; }
.cm-del.ask { color: var(--red); font-weight: 700; font-size: 12px; }
.cm-react { display: flex; justify-content: center; gap: 6px; margin: 16px 0 10px; flex-wrap: wrap; }
.cm-react button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(197,140,54,.35); background: rgba(255,255,255,.6); font-size: 20px; line-height: 1; transition: transform .15s ease; }
.cm-react button:active, .cm-react button.pop { transform: scale(1.25); }
.cm-form { display: flex; gap: 8px; align-items: flex-end; }
.cm-form textarea { flex: 1; resize: none; min-height: 44px; max-height: 140px; padding: 11px 14px; border-radius: 22px; border: 1px solid rgba(160,120,80,.35); background: #fffdf8; color: var(--ink); font-family: var(--serif); font-size: 16px; line-height: 1.35; outline: none; }
.cm-form textarea:focus { border-color: var(--gold-2); box-shadow: 0 0 0 3px rgba(238,189,85,.25); }
.cm-send { flex: 0 0 auto; height: 44px; padding: 0 18px; border: 0; border-radius: 22px; font-weight: 700; color: #3a2414; background: linear-gradient(180deg, #ffe39a, #eebd55 55%, #d79a3a); }
.cm-send:disabled { opacity: .6; }
.cm-status { min-height: 16px; margin-top: 4px; font-size: 12.5px; color: var(--red); text-align: center; }

/* ---------- Zugpost ---------- */
.letter-paper { position: relative; margin: 6px 2px 4px; padding: 22px 20px 20px 26px; border-radius: 4px; transform: rotate(-0.6deg);
  font-family: var(--serif); font-style: italic; font-size: 17.5px; line-height: 1.75; color: #3b2b3a;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 29px, rgba(120,140,190,.28) 29px 30px), linear-gradient(180deg, #fffdf6, #f6efdc);
  box-shadow: 0 8px 22px rgba(60,40,30,.22), inset 3px 0 0 rgba(214,90,100,.35); }
.letter-paper p { margin: 0 0 .9em; } .letter-paper p:last-child { margin: 0; }
.letter-paper::after { content: ''; position: absolute; top: -9px; right: 18px; width: 30px; height: 34px; border-radius: 3px;
  background: radial-gradient(circle at 50% 45%, #f3d48a 0 6px, transparent 7px), linear-gradient(135deg, #c4464b, #8e2532); box-shadow: 0 2px 6px rgba(0,0,0,.25); transform: rotate(6deg); }

/* ---------- App-Hinweis (Startbildschirm & Benachrichtigungen) ---------- */
.appcard { width: min(420px, 100%); }
.appcard .card-body { padding-top: 6px; }
.appcard-icon { display: flex; justify-content: center; margin: 4px 0 14px; }
.appcard-icon img { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 6px 18px rgba(60,40,20,.28), 0 0 0 3px rgba(255,255,255,.8); }
.appcard-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.appcard-list li { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: start; font-family: var(--serif); font-size: 16.5px; line-height: 1.45; color: #3a2d40; }
.appcard-list li b { font-family: var(--sans); font-size: 20px; line-height: 1.2; text-align: center; }
.appcard-hint { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(197,140,54,.12); font-size: 14px; line-height: 1.5; color: #5a4433; }
.appcard-hint .share { display: inline-block; padding: 0 5px; border-radius: 6px; background: rgba(90,60,40,.1); font-weight: 700; }
.appcard-foot { display: grid; gap: 6px; }
.btn-plain { border: 0; background: transparent; padding: 10px; font-size: 15px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.btn-gold:disabled { opacity: .7; }
.row.push .row-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.row.push p { margin: 0; font-size: 13.5px; line-height: 1.5; color: rgba(230,228,255,.75); }

/* ---------- Adventskalender-Animation beim Öffnen ---------- */
.intro.advent-host { display: block; padding: 0; background: none; }
.adv { position: fixed; inset: 0; z-index: 15; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; overflow: hidden; color: #fbeccb;
  padding: calc(var(--safe-t) + 22px) 18px calc(var(--safe-b) + 26px); -webkit-tap-highlight-color: transparent; cursor: pointer; }
.adv-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 46%, rgba(40,34,90,.78), rgba(8,10,34,.95) 62%, #050720); transition: opacity .9s ease; }
@supports (backdrop-filter: blur(4px)) { .adv-bg { backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); } }
.adv-snow, .adv-sparks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.adv-sparks { z-index: 4; }
.adv-top { position: relative; z-index: 2; text-align: center; opacity: 0; transform: translateY(-10px); transition: opacity .8s ease .15s, transform .8s ease .15s; }
.adv-title { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(24px, 7vw, 34px); color: #fff3d6; text-shadow: 0 0 22px rgba(255,196,110,.35); }
.adv-date { margin-top: 4px; font-size: 13.5px; letter-spacing: .06em; color: rgba(236,230,255,.78); }
.adv-stage { position: relative; z-index: 3; align-self: center; display: grid; place-items: center; perspective: 1200px; transition: transform .95s cubic-bezier(.55,0,.8,.2), opacity .9s ease; }
.adv-frame {
  --door-a: #b8323c; --door-b: #7c1d2a; --num-a: #fff4c9; --num-b: #f1c35b; --num-c: #b8792a; --line: #e9c46a;
  position: relative; width: min(62vw, 270px, 34vh); aspect-ratio: 3 / 4; border-radius: 16px; padding: 13px;
  background: repeating-linear-gradient(94deg, rgba(255,255,255,.035) 0 3px, rgba(0,0,0,.05) 3px 7px), linear-gradient(160deg, #8d5634, #5d3520 55%, #4a2a19);
  box-shadow: 0 30px 70px rgba(0,0,0,.6), 0 0 0 2px #3b2113, inset 0 2px 0 rgba(255,220,170,.25), inset 0 -3px 0 rgba(0,0,0,.35);
  transform: translateY(26px) scale(.86); opacity: 0; transition: transform .85s cubic-bezier(.2,.9,.25,1.12), opacity .6s ease; transform-style: preserve-3d;
}
.adv-snowcap { position: absolute; left: -6px; right: -6px; top: -11px; height: 26px; z-index: 3; pointer-events: none; border-radius: 14px 14px 10px 10px;
  background: radial-gradient(circle at 10% 100%, #fff 0 9px, transparent 10px), radial-gradient(circle at 30% 105%, #fff 0 8px, transparent 9px), radial-gradient(circle at 58% 102%, #fff 0 10px, transparent 11px), radial-gradient(circle at 84% 104%, #fff 0 8px, transparent 9px), linear-gradient(180deg, #ffffff, #e6ecff);
  box-shadow: 0 4px 8px rgba(30,40,90,.35); }
.adv-recess { position: absolute; inset: 13px; border-radius: 9px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 55%, #ffe4a0 0%, #f2b453 26%, #8a4a1c 62%, #2c160c 100%); box-shadow: inset 0 0 0 2px rgba(0,0,0,.45), inset 0 8px 18px rgba(0,0,0,.55); }
.adv-rays { position: absolute; left: 50%; top: 52%; width: 260%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(0deg); opacity: 0; transition: opacity .8s ease .2s;
  background: repeating-conic-gradient(from 0deg, rgba(255,247,214,0) 0deg 9deg, rgba(255,247,214,.55) 9deg 13deg);
  -webkit-mask-image: radial-gradient(circle, #000 0 18%, transparent 52%); mask-image: radial-gradient(circle, #000 0 18%, transparent 52%); animation: adv-spin 14s linear infinite; }
@keyframes adv-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.adv-glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 54%, rgba(255,250,225,.95), rgba(255,220,140,.4) 34%, rgba(255,200,110,0) 64%); opacity: .35; transform: scale(.7); transition: opacity .9s ease, transform 1.2s ease; }
.adv-prize { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: translateY(14px) scale(.6); transition: opacity .7s ease .35s, transform 1s cubic-bezier(.2,.9,.25,1.25) .35s; }
.adv-thumb { position: absolute; filter: drop-shadow(0 6px 10px rgba(80,40,10,.45)) drop-shadow(0 0 16px rgba(255,240,190,.6)); }
.adv-thumb.t0 { left: 50%; top: 52%; width: 92% !important; height: auto !important; transform: translate(-50%, -50%); }
.adv-thumb.t1 { left: 4%; bottom: 6%; width: 40% !important; height: auto !important; }
.adv-thumb.t2 { right: 4%; bottom: 6%; width: 40% !important; height: auto !important; }
.adv-prize-orn { width: 54%; color: #fff6dc; filter: drop-shadow(0 0 14px rgba(255,240,190,.9)); }
.adv-door { position: absolute; inset: 13px; padding: 0; border: 0; background: none; border-radius: 9px; cursor: pointer; transform-origin: left center; transform-style: preserve-3d;
  transition: transform 1.15s cubic-bezier(.45,.05,.2,1); box-shadow: 0 0 0 1px rgba(0,0,0,.35), 4px 0 14px rgba(0,0,0,.25); }
.adv-door:focus-visible { outline: 3px solid #ffe39a; outline-offset: 4px; }
.adv-face { position: absolute; inset: 0; border-radius: 9px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.adv-front { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: radial-gradient(ellipse at 30% 18%, rgba(255,255,255,.22), rgba(255,255,255,0) 55%), repeating-radial-gradient(circle at 70% 30%, rgba(255,255,255,.035) 0 2px, transparent 2px 6px), linear-gradient(165deg, var(--door-a), var(--door-b)); }
.adv-border { position: absolute; inset: 9px; border: 2px solid var(--line); border-radius: 6px; box-shadow: inset 0 0 0 3px rgba(0,0,0,.12), inset 0 0 0 5px rgba(233,196,106,.45); opacity: .9; }
.adv-border::before, .adv-border::after { content: '✦'; position: absolute; font-size: 11px; color: var(--line); }
.adv-border::before { left: 4px; top: 1px; }
.adv-border::after { right: 4px; bottom: 1px; }
.adv-deco { position: relative; z-index: 1; height: 19%; display: grid; place-items: center; margin-bottom: 2px; }
.adv-orn { height: 100%; color: var(--line); filter: drop-shadow(0 1px 0 rgba(0,0,0,.35)); }
.adv-orn.big { height: 120%; color: #ffe08a; filter: drop-shadow(0 0 10px rgba(255,220,120,.8)); }
.adv-wreath { height: 100%; }
.adv-flame { transform-origin: center bottom; animation: adv-flicker 1.2s ease-in-out infinite alternate; }
@keyframes adv-flicker { 50% { transform: scaleY(1.18) skewX(4deg); opacity: .85; } }
.adv-num { position: relative; z-index: 1; font-family: var(--serif); font-style: italic; font-weight: 600; line-height: .95; font-size: min(28vw, 122px, 15vh);
  background: linear-gradient(180deg, var(--num-a) 0%, var(--num-b) 45%, var(--num-c) 70%, var(--num-a) 100%); background-size: 100% 260%; background-position: 0 0;
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(0,0,0,.4)) drop-shadow(0 0 12px rgba(255,210,120,.25)); animation: adv-shine 3.6s ease-in-out infinite; }
@keyframes adv-shine { 50% { background-position: 0 100%; } }
.adv-sub { position: relative; z-index: 1; font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--line); opacity: .9; }
.adv-knob { position: absolute; right: 9%; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6cf, #e6b54e 55%, #8a5a1c); box-shadow: 0 2px 3px rgba(0,0,0,.45); }
.adv-back { transform: rotateY(180deg); display: grid; place-items: center; background: repeating-linear-gradient(45deg, rgba(150,110,60,.08) 0 6px, transparent 6px 12px), linear-gradient(160deg, #f5ebd5, #dcc79d); }
.adv-back span { font-size: 30px; color: rgba(160,110,50,.5); }
.adv-lock { position: absolute; left: 50%; bottom: 13%; transform: translateX(-50%); display: flex; align-items: center; gap: 5px; padding: 4px 10px 4px 7px; border-radius: 999px; background: rgba(10,14,40,.55); border: 1px solid rgba(233,196,106,.5); font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #fbe7b7; white-space: nowrap; }
.adv-lock-ic { width: 13px; height: 13px; color: #f1c35b; }
.adv-ribbon-v, .adv-ribbon-h { position: absolute; background: linear-gradient(90deg, #a51f2b, #e24b55 50%, #a51f2b); box-shadow: 0 0 0 1px rgba(80,0,10,.25); }
.adv-ribbon-v { top: 0; bottom: 0; left: 50%; width: 16%; transform: translateX(-50%); }
.adv-ribbon-h { left: 0; right: 0; top: 40%; height: 12%; transform: translateY(-50%); background: linear-gradient(180deg, #a51f2b, #e24b55 50%, #a51f2b); }
.adv-orn.bow { height: 100%; color: #e24b55; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.mode-gift .adv-num { position: absolute; top: 62%; left: 50%; transform: translateX(-50%); font-style: normal; font-size: min(12vw, 46px, 7vh); }
.mode-gift .adv-sub { position: absolute; bottom: 9%; background: rgba(120,20,30,.75); padding: 3px 8px; border-radius: 6px; color: #fff1cf; letter-spacing: .12em; font-size: 10.5px; }
.mode-gift .adv-deco { position: absolute; top: 40%; left: 50%; width: 46%; height: 30%; transform: translate(-50%, -58%); }
.adv-bottom { position: relative; z-index: 5; width: min(380px, 100%); text-align: center; opacity: 0; transform: translateY(12px); transition: opacity .8s ease .35s, transform .8s ease .35s; }
.adv-text { margin: 0 auto 16px; max-width: 330px; font-family: var(--serif); font-size: 16.5px; line-height: 1.5; color: rgba(244,238,255,.92); transition: opacity .22s ease; min-height: 1.5em; }
.adv-text.swap { opacity: 0; }
.adv-go { padding: 14px 40px; font-size: 17px; transition: opacity .4s ease, transform .4s ease; }
.adv-go.gone { opacity: 0; transform: scale(.9); pointer-events: none; }
.adv-hint { margin: 12px 0 0; font-size: 12px; color: rgba(220,220,250,.6); }

/* Themen der Türchen (wechseln von Tag zu Tag) */
.theme-green { --door-a: #2f7752; --door-b: #17442f; }
.theme-blue { --door-a: #34589e; --door-b: #1a2d5c; }
.theme-plum { --door-a: #7d3366; --door-b: #451b3b; }
.theme-cream { --door-a: #f6ecd6; --door-b: #dcc59a; --num-a: #e3505a; --num-b: #b8263a; --num-c: #7a1424; --line: #b8873a; }
.theme-night { --door-a: #2a3270; --door-b: #11163d; --line: #cfd6ff; --num-a: #ffffff; --num-b: #cfd8ff; --num-c: #8b97d8; }
.theme-holy { --door-a: #c22f3c; --door-b: #6e1222; --line: #ffd76a; }
.theme-holy .adv-num { font-size: min(30vw, 130px, 16vh); }
.theme-gift { --door-a: #f7efdd; --door-b: #e2d0a8; --line: #c8323c; --num-a: #ff8a8f; --num-b: #e0313f; --num-c: #9a1424; }

/* Ablauf */
.adv.in .adv-top, .adv.in .adv-bottom { opacity: 1; transform: none; }
.adv.in .adv-frame { opacity: 1; transform: none; }
.adv.invite:not(.open) .adv-door { animation: adv-invite 3.2s ease-in-out infinite; }
@keyframes adv-invite { 0%, 70%, 100% { transform: rotateY(0); } 78% { transform: rotateY(-9deg); } 86% { transform: rotateY(-3deg); } 92% { transform: rotateY(-7deg); } }
.adv.open .adv-door { transform: rotateY(-114deg); animation: none; }
.adv.open .adv-rays { opacity: 1; }
.adv.open .adv-glow { opacity: 1; transform: scale(1.15); }
.adv.open .adv-prize { opacity: 1; transform: none; }
.adv.locked-shake .adv-door { animation: adv-locked .5s ease; }
@keyframes adv-locked { 20% { transform: rotateY(-5deg); } 40% { transform: rotateY(0); } 60% { transform: rotateY(-4deg); } 80% { transform: rotateY(0); } }
.adv.zoom { pointer-events: none; }
.adv.zoom .adv-stage { transform: scale(2.7); opacity: 0; }
.adv.zoom .adv-bg { opacity: 0; }
.adv.zoom .adv-top, .adv.zoom .adv-bottom { opacity: 0; transition-delay: 0s; transition-duration: .4s; }
.adv.zoom .adv-snow { opacity: 0; transition: opacity .8s ease; }
.adv.auto .adv-text { font-size: 15px; }
@media (prefers-reduced-motion: reduce) {
  .adv-door, .adv-frame, .adv-stage, .adv-prize { transition-duration: .01s !important; transition-delay: 0s !important; }
  .adv.open .adv-door { transform: none; opacity: 0; }
  .adv-rays, .adv-num, .adv-flame, .adv.invite .adv-door { animation: none !important; }
}
@media (max-height: 560px) { .adv-text { margin-bottom: 10px; font-size: 15px; } .adv-frame { width: min(52vw, 220px, 40vh); } }

/* ---------- Seitenknöpfe: Briefe & Album ---------- */
.hud-side { position: fixed; right: 14px; bottom: calc(var(--safe-b) + 80px); z-index: 5; display: flex; flex-direction: column; gap: 10px; }
.hud-side .icon-btn { position: relative; }
.hud-side .badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #e24b55; color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.icon-btn.pulse { animation: pulse-gold 1.6s ease-in-out infinite; }
@keyframes pulse-gold { 50% { box-shadow: 0 0 0 6px rgba(255,214,120,.25), 0 0 24px rgba(255,214,120,.55); } }
@media (min-width: 760px) { .hud-side { right: 24px; bottom: calc(var(--safe-b) + 88px); } }
.letters-list { display: grid; gap: 16px; }
.letters-item h3 { margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }

/* ---------- Erinnerungsalbum ---------- */
.album { position: fixed; inset: 0; z-index: 45; display: grid; grid-template-rows: auto 1fr auto; opacity: 0; transition: opacity .35s ease; }
.album.in { opacity: 1; }
.album.closing { opacity: 0; }
.album-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, #2a2560, #0b0f30 70%); }
.album-bar { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-t) + 10px) 12px 8px; }
.album-pos { flex: 1; text-align: center; font-size: 13.5px; font-weight: 700; letter-spacing: .03em; color: #fbeccb; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-btn { min-width: 42px; height: 42px; border: 1px solid rgba(255,225,170,.35); border-radius: 21px; background: rgba(255,255,255,.08); color: #fbeccb; font-size: 18px; font-weight: 700; padding: 0 12px; }
.album-btn:disabled { opacity: .3; }
.album-x { font-size: 26px; line-height: 1; padding: 0; width: 42px; }
.album-pdf { font-size: 13px; letter-spacing: .06em; }
.album-book { position: relative; z-index: 1; overflow: hidden; touch-action: pan-y; }
.album-track { display: flex; height: 100%; transition: transform .45s cubic-bezier(.25,.8,.25,1); will-change: transform; }
.album-page { flex: 0 0 100%; height: 100%; display: flex; justify-content: center; padding: 6px 14px 4px; box-sizing: border-box; }
.album-paper { position: relative; width: min(600px, 100%); height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; box-sizing: border-box; padding: 22px 22px 28px; color: var(--ink);
  border-radius: 18px; background: radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.75), rgba(255,255,255,0) 55%), var(--cream);
  box-shadow: 0 0 0 2px #e7cf9b, 0 0 0 6px rgba(250,243,228,.92), 0 0 0 7.5px #c99a4a, 0 20px 50px rgba(0,0,0,.5); }
.album-kicker { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--red); }
.album-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.album-head-txt { flex: 1; min-width: 0; }
.album-title { margin: 5px 0 0; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(22px, 6vw, 28px); line-height: 1.18; color: #2e2238; }
.album-story { margin: 6px 0 0; font-family: var(--serif); font-style: italic; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.album-thumb { flex: 0 0 auto; width: 64px !important; height: 64px !important; filter: drop-shadow(0 3px 5px rgba(60,40,20,.3)); }
.album-sec { margin: 22px 0 10px; display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--gold-2); }
.album-sec::before, .album-sec::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(197,140,54,0), rgba(197,140,54,.7), rgba(197,140,54,0)); }
.album-msg { max-width: 86%; margin: 8px 0; padding: 9px 12px; border-radius: 14px; font-size: 15px; line-height: 1.45; }
.album-msg.from-guest { margin-right: auto; background: rgba(197,140,54,.14); border-bottom-left-radius: 4px; }
.album-msg.from-admin { margin-left: auto; background: rgba(196,63,71,.12); border-bottom-right-radius: 4px; }
.album-msg-who { font-size: 11.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 2px; }
.album-msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.album-paper.cover, .album-paper.end { display: flex; flex-direction: column; align-items: center; text-align: center; justify-content: center; }
.album-cover-title { margin: 8px 0 4px; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(32px, 9vw, 44px); line-height: 1.1; color: #2e2238; }
.album-cover-sub { font-family: var(--serif); font-size: 17px; color: var(--ink-2); }
.album-cover-img { width: 100%; max-height: 42vh; object-fit: cover; object-position: 50% 62%; margin: 18px 0 14px; border-radius: 12px; box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px #c99a4a, 0 10px 24px rgba(0,0,0,.25); }
.album-cover-names { font-family: var(--serif); font-style: italic; font-size: 20px; color: #2e2238; }
.album-cover-stats { margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.album-cover-hint { margin: 18px 0 0; font-size: 12.5px; color: rgba(90,70,86,.7); }
.album-end-orn { color: var(--gold-2); letter-spacing: .5em; }
.album-end-title { margin: 14px 0 10px; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(28px, 8vw, 40px); line-height: 1.15; color: #b8263a; }
.album-end-text { margin: 0; font-family: var(--serif); font-size: 16.5px; color: var(--ink-2); }
.album-end-heart { margin-top: 20px; font-size: 54px; color: #e24b55; animation: heartbeat 1.6s ease-in-out infinite; }
@keyframes heartbeat { 15%, 45% { transform: scale(1.12); } 30% { transform: scale(.98); } }
.album-paper.secret { background: radial-gradient(ellipse at 70% 0%, rgba(210,220,255,.6), rgba(255,255,255,0) 60%), #f2efff; }
.album-nav { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 8px 14px calc(var(--safe-b) + 12px); }
.album-dots { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.15); position: relative; overflow: hidden; }
.album-dots::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, #ffe39a, #d79a3a); border-radius: 2px; transition: width .4s ease; }
.album-index { position: absolute; inset: 0; z-index: 5; padding: calc(var(--safe-t) + 64px) 18px 24px; background: rgba(8,10,34,.94); overflow-y: auto; }
.album-index-title { text-align: center; font-family: var(--serif); font-style: italic; font-size: 22px; color: #fff3d6; margin-bottom: 16px; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 10px; max-width: 520px; margin: 0 auto; }
.album-cell { aspect-ratio: 1; border-radius: 12px; border: 1px solid rgba(255,225,170,.35); background: linear-gradient(160deg, #b8323c, #7c1d2a); color: #ffe39a; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 22px; }
.album-cell.special { background: linear-gradient(160deg, #34589e, #1a2d5c); font-style: normal; }
@media print {
  html:has(body.album-printing) { height: auto !important; overflow: visible !important; background: #fff !important; }
  body.album-printing > *:not(.album) { display: none !important; }
  body.album-printing { position: static !important; height: auto !important; background: #fff !important; overflow: visible !important; }
  body.album-printing .album { position: static; display: block; opacity: 1; height: auto; }
  @page { margin: 12mm; }
  body.album-printing .album-bg, body.album-printing .album-bar, body.album-printing .album-nav, body.album-printing .album-index { display: none !important; }
  body.album-printing .album-book { overflow: visible; }
  body.album-printing .album-track { display: block; transform: none !important; }
  body.album-printing .album-page { display: block; height: auto; padding: 0; break-after: page; page-break-after: always; }
  body.album-printing .album-paper { height: auto; overflow: visible; box-shadow: none; border: 1px solid #d9c49a; border-radius: 10px; width: 100%; }
  body.album-printing .album-cover-img { max-height: 9cm; }
  body.album-printing video, body.album-printing audio, body.album-printing .blk-audio, body.album-printing .blk-video { display: none !important; }
}
.row-sub { display: block; font-size: 12px; color: rgba(230,228,255,.6); }

.mode-gift .adv-num { display: none; }
.mode-pre .adv-sub { display: none; }
/* Handy quer: Türchen links, Text rechts */
@media (orientation: landscape) and (max-height: 540px) {
  .adv { grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; column-gap: 28px; align-items: center; padding: calc(var(--safe-t) + 10px) 24px calc(var(--safe-b) + 12px); }
  .adv-top { grid-column: 1 / -1; }
  .adv-title { font-size: 22px; }
  .adv-stage { grid-column: 1; grid-row: 2; justify-self: end; }
  .adv-bottom { grid-column: 2; grid-row: 2; justify-self: start; text-align: left; }
  .adv-text { margin-left: 0; }
  .adv-frame { width: min(28vw, 210px, 50vh); }
}
@media print { body.album-printing .album-cover-hint { display: none !important; } }

/* ---------- Vor dem ersten Türchen: das Geheimnis ---------- */
body.locked { background: #04050f; }
body.locked .hud-top, body.locked .hud-bottom, body.locked .hud-side, body.locked .vignette, body.locked #world { display: none; }
.adv.mode-locked { cursor: default; }
.mode-locked .adv-bg { background: radial-gradient(ellipse at 50% 42%, #1d1e50 0%, #0b0d2b 52%, #04050f 100%); backdrop-filter: none; -webkit-backdrop-filter: none; }
.mode-locked .adv-title { font-size: clamp(26px, 7.5vw, 36px); }
.theme-mystery { --door-a: #252a66; --door-b: #0c0f30; --line: rgba(233,196,106,.55); }
.mode-locked .adv-frame { background: repeating-linear-gradient(94deg, rgba(255,255,255,.03) 0 3px, rgba(0,0,0,.06) 3px 7px), linear-gradient(160deg, #4d3322, #2f1d12 55%, #24160d);
  box-shadow: 0 30px 70px rgba(0,0,0,.7), 0 0 0 2px #1c110a, inset 0 2px 0 rgba(255,220,170,.15), inset 0 -3px 0 rgba(0,0,0,.4); }
.mode-locked .adv-recess { background: radial-gradient(ellipse at 50% 55%, #ffe7a8 0%, #f2b453 30%, #8a4a1c 70%, #2c160c 100%); }
.mode-locked .adv-door { cursor: pointer; box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 0 16px 1px rgba(255,196,110,.28); animation: tz-leak 4.2s ease-in-out infinite; }
@keyframes tz-leak { 50% { box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 0 28px 4px rgba(255,196,110,.46); } }
.mode-locked .adv-front { justify-content: center; }
.tz-keyhole { position: relative; z-index: 1; width: 36%; filter: drop-shadow(0 3px 2px rgba(0,0,0,.5)) drop-shadow(0 0 16px rgba(255,205,120,.32)); }
.tz-hole { animation: tz-flicker 3.8s ease-in-out infinite; }
@keyframes tz-flicker { 0%, 100% { opacity: 1; } 40% { opacity: .78; } 52% { opacity: .96; } 70% { opacity: .86; } }
.tz-beam { position: absolute; left: 50%; top: 50%; width: 175%; height: 150%; transform: translate(-50%, -46%); pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse at 50% 48%, rgba(255,198,120,.26), rgba(255,198,120,.08) 38%, rgba(255,198,120,0) 64%); animation: tz-breathe 5s ease-in-out infinite; transition: opacity 1.2s ease; }
@keyframes tz-breathe { 50% { opacity: .65; } }
.mode-locked .adv-text { white-space: pre-line; }
.tz-count { display: flex; justify-content: center; gap: 8px; margin: 0 auto 16px; transition: opacity .6s ease; }
.tz-count[hidden] { display: none; }
.tz-cell { min-width: 60px; padding: 9px 6px 7px; border-radius: 13px; background: rgba(255,255,255,.055); border: 1px solid rgba(233,196,106,.28); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 6px 18px rgba(0,0,0,.25); }
.tz-cell[hidden] { display: none; }
.tz-cell b { display: block; font-family: var(--serif); font-weight: 600; font-size: 27px; line-height: 1.05; color: #fff1cf; font-variant-numeric: tabular-nums; }
.tz-cell span { display: block; margin-top: 3px; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(233,210,160,.7); }
.tz-cell.tick b { animation: tz-tick .45s ease; }
@keyframes tz-tick { from { transform: translateY(-5px); opacity: .35; } to { transform: none; opacity: 1; } }
.tz-remind { min-height: 44px; display: grid; place-items: center; }
.tz-bell { padding: 11px 22px; font-size: 15px; font-weight: 600; background: rgba(255,225,170,.06); }
.tz-done { margin: 0; font-size: 13.5px; color: rgba(233,220,190,.78); }
.tz-msg { min-height: 1.5em; margin-top: 10px; font-family: var(--serif); font-style: italic; font-size: 15px; color: rgba(255,232,180,.9); transition: opacity .2s ease; }
.tz-msg.swap { opacity: 0; }
.mode-locked.unlocking .adv-door { animation: tz-unlock 1.1s ease-in-out infinite; box-shadow: 0 0 46px 12px rgba(255,214,140,.8); }
@keyframes tz-unlock { 20% { transform: translateX(-2px) rotate(-.6deg); } 40% { transform: translateX(2px) rotate(.5deg); } 60% { transform: translateX(-1px) rotate(-.3deg); } 80% { transform: none; } }
/* die verschlossene Tür braucht kein 3D (vermeidet Darstellungsfehler beim Leuchten) */
.mode-locked .adv-stage { perspective: none; }
.mode-locked .adv-frame { transform-style: flat; }
.adv.mode-locked.locked-shake .adv-door { animation: tz-knock .5s ease; }
@keyframes tz-knock { 15% { transform: translateX(-5px) rotate(-1deg); } 35% { transform: translateX(4px) rotate(.8deg); } 55% { transform: translateX(-3px) rotate(-.5deg); } 75% { transform: translateX(2px); } 100% { transform: none; } }
.tz-beam::after { content: ''; position: absolute; inset: -10%; background: radial-gradient(ellipse at 50% 48%, rgba(255,214,150,.55), rgba(255,200,120,.18) 40%, rgba(255,198,120,0) 68%); opacity: 0; transition: opacity 1.2s ease; }
.mode-locked.unlocking .tz-beam { opacity: 1; animation: none; }
.mode-locked.unlocking .tz-beam::after { opacity: 1; }
.mode-locked.unlocking .tz-count, .mode-locked.unlocking .tz-remind, .mode-locked.unlocking .tz-msg { opacity: 0; transition: opacity .6s ease; }
@media (max-height: 640px) { .tz-cell { min-width: 52px; padding: 7px 5px 5px; } .tz-cell b { font-size: 23px; } .tz-count { margin-bottom: 10px; } .mode-locked .adv-frame { width: min(48vw, 200px, 30vh); } }
@media (orientation: landscape) and (max-height: 540px) { .mode-locked .adv-frame { width: min(26vw, 190px, 46vh); } .tz-count { justify-content: flex-start; } .tz-remind { place-items: start; } }
@media (prefers-reduced-motion: reduce) { .mode-locked .adv-door, .tz-hole, .tz-beam, .tz-cell.tick b { animation: none !important; } }

/* ---------- Angeheftete Bilder (Briefe & Antworten) ---------- */
.letter-pics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; margin-top: 16px; padding: 4px 4px 2px; }
.letter-pics.one { grid-template-columns: minmax(0, 82%); justify-content: center; }
.letter-paper > .letter-pics:first-child { margin-top: 4px; }
.pinned { position: relative; margin: 0; padding: 6px 6px 18px; background: #fff; border-radius: 2px; box-shadow: 0 6px 14px rgba(60,40,20,.25); transform: rotate(-2.2deg); }
.pinned:nth-child(2n) { transform: rotate(1.8deg); }
.pinned:nth-child(3n) { transform: rotate(-0.8deg); }
.pinned::before { content: ''; position: absolute; top: -9px; left: 50%; width: 46px; height: 18px; transform: translateX(-50%) rotate(-3deg); background: rgba(246,226,170,.82); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.pinned img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #eee; cursor: zoom-in; }
.letter-pics.one .pinned img { aspect-ratio: auto; max-height: 52vh; }
.cm-bubble.has-pic { padding: 5px 5px 7px; }
.cm-bubble.has-pic p { padding: 4px 8px 0; }
.cm-pic { display: block; width: min(240px, 62vw); max-height: 320px; object-fit: cover; border-radius: 12px; cursor: zoom-in; background: rgba(255,255,255,.2); }
.album-msg-pic { display: block; width: min(220px, 100%); max-height: 260px; object-fit: cover; border-radius: 10px; margin: 4px 0 6px; }
.album-end-sign { margin-top: 14px; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 22px; color: #8a2a33; }
.adv.mode-locked.leaving { opacity: 0; transition: opacity .55s ease; }
