/* FIRN. Mobile-first, Vollbild-Buehne, kein Scroll. */
:root {
  --nacht: #0F1A33; --nacht-tief: #070D1F; --firn: #EEF2F7; --rot: #E0442E; --lampe: #F2C98A; --granit: #8A93A3;
  --text: var(--firn); --text-2: var(--granit); --accent: var(--rot); --panel: rgba(15, 26, 51, 0.92); --line: rgba(238, 242, 247, 0.16);
  --display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --pad: clamp(16px, 4vw, 32px);
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.22,.8,.2,1);
}
html.rotlicht {
  --text: #FF4A38; --text-2: #A8291F; --accent: #FF6A5A; --panel: rgba(10, 2, 2, 0.94); --line: rgba(255, 74, 56, 0.25); --lampe: #FF6A5A;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; background: var(--nacht-tief); color: var(--text); font-family: var(--serif); -webkit-text-size-adjust: 100%; }
body { position: fixed; inset: 0; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

/* Buehne */
.stage { position: fixed; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
.stage__gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transform-origin: 50% 50%; }
.stage__dom { position: absolute; inset: 0; }
.stage__dom > .dom-level { position: absolute; inset: 0; }
.portal { position: absolute; inset: 0; background: radial-gradient(circle at var(--px, 50%) var(--py, 50%), #1a2a52 0%, var(--nacht-tief) 60%); clip-path: circle(0px at var(--px, 50%) var(--py, 50%)); opacity: 0; pointer-events: none; }
.portal.is-on { opacity: 1; }
.rotlicht-overlay { position: fixed; inset: 0; background: #ff2a12; mix-blend-mode: multiply; opacity: 0; pointer-events: none; transition: opacity .6s var(--ease); z-index: 5; }
html.rotlicht .rotlicht-overlay { opacity: 1; }
/* Stirnlampe im Rotlicht: ein Lichtkegel folgt dem Zeiger, der Rest liegt im Dunkeln */
.headlamp { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .8s var(--ease); background: radial-gradient(circle at var(--lx, 50%) var(--ly, 50%), rgba(0,0,0,0) 0, rgba(0,0,0,0) 16vmax, rgba(0,0,0,.5) 38vmax, rgba(0,0,0,.8) 68vmax); }
html.rotlicht .headlamp { opacity: 1; }
.stage.is-flash::after { content: ''; position: absolute; inset: 0; background: #fff; opacity: .7; animation: flash .4s var(--ease) forwards; pointer-events: none; }
@keyframes flash { to { opacity: 0; } }

/* Hotspots */
.hotspots { position: absolute; inset: 0; pointer-events: none; }
.hot { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; min-width: 44px; min-height: 44px; opacity: 0; transition: opacity .5s var(--ease); will-change: transform; }
.hot.is-visible { opacity: 1; }
.hot__ring { position: relative; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--firn); background: rgba(15,26,51,.35); box-shadow: 0 0 0 4px rgba(238,242,247,.12); }
.hot__ring::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 1px solid rgba(238,242,247,.35); animation: ring 2.6s var(--ease) infinite; }
.hot--up { flex-direction: column-reverse; }
.hot--dive .hot__ring { border-color: var(--rot); background: var(--rot); box-shadow: 0 0 0 4px rgba(224,68,46,.18), 0 0 18px rgba(224,68,46,.55); }
.hot--dive .hot__ring::after { border-color: rgba(224,68,46,.55); }
.hot__label { font-family: var(--display); font-variation-settings: 'wdth' 90, 'opsz' 14; font-weight: 500; font-size: 13px; letter-spacing: .01em; color: var(--firn); text-shadow: 0 1px 8px rgba(0,0,0,.8); white-space: nowrap; }
.hot--dive .hot__label { font-weight: 600; }
.hot--dive .hot__label::after { content: ' hinein'; font-weight: 300; color: var(--lampe); }
.hot__chev { display: none; }
/* Randmarker: das Ziel liegt ausserhalb des Blicks, der Pfeil zeigt hin, Tippen dreht den Blick */
.hot.is-edge { gap: 2px; opacity: .8; }
.hot.is-edge .hot__ring { width: 10px; height: 10px; box-shadow: none; }
.hot.is-edge .hot__ring::after { animation: none; inset: -5px; opacity: .4; }
.hot.is-edge .hot__label { font-size: 11px; font-weight: 400; color: var(--text-2); }
.hot.is-edge.hot--dive .hot__label { color: var(--firn); }
.hot.is-edge .hot--dive .hot__label::after, .hot.is-edge.hot--dive .hot__label::after { content: ''; }
.hot.is-edge .hot__chev { display: block; position: absolute; left: 50%; top: 50%; width: 0; height: 0; border: 5px solid transparent; border-left: 9px solid var(--lampe); transform-origin: 0 50%; transform: translate(-50%, -50%) rotate(var(--ang, 0rad)) translateX(30px); opacity: .9; }
.hot.is-edge.is-behind .hot__label::after { content: ', hinter Ihnen'; font-weight: 300; color: var(--text-2); }
.hot.is-edge.is-left { align-items: flex-start; }
.hot.is-edge.is-right { align-items: flex-end; }
.hot.is-edge.is-left .hot__chev { left: 14px; }
.hot.is-edge.is-right .hot__chev { left: auto; right: 14px; transform-origin: 100% 50%; transform: translate(50%, -50%) rotate(var(--ang, 0rad)) translateX(30px); }
html.rotlicht .hot__ring, html.rotlicht .hot__label { color: var(--text); border-color: var(--text); }
@keyframes ring { 0% { transform: scale(.6); opacity: .9; } 70% { transform: scale(1.35); opacity: 0; } 100% { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hot__ring::after { animation: none; } }

/* HUD */
.hud { position: fixed; left: 0; right: 0; z-index: 6; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: var(--pad); pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud--top { top: 0; padding-top: calc(var(--pad) + var(--safe-t)); }
.hud--bottom { bottom: 0; align-items: flex-end; padding-bottom: calc(var(--pad) + var(--safe-b) + 28px); transition: opacity .4s var(--ease); }
body.nacht-open .hud--bottom, body.nacht-open .hint { opacity: 0; pointer-events: none; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--text); line-height: 1; }
.brand__mark { font-family: var(--display); font-variation-settings: 'wdth' 100, 'opsz' 40; font-weight: 700; font-size: 22px; letter-spacing: .06em; }
.brand__sub { font-family: var(--display); font-variation-settings: 'wdth' 85; font-weight: 400; font-size: 11px; color: var(--text-2); margin-top: 5px; }
.hud__right { display: flex; gap: 8px; align-items: center; }
.btn { white-space: nowrap; font-family: var(--display); font-variation-settings: 'wdth' 90; font-weight: 500; font-size: 14px; line-height: 1; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(15,26,51,.55); color: var(--text); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); min-height: 44px; transition: background .25s, border-color .25s; }
.btn--cta { background: var(--firn); color: var(--nacht); border-color: transparent; font-weight: 600; }
html.rotlicht .btn--cta { background: var(--text); color: #000; }
.btn--icon { width: 44px; padding: 0; display: grid; place-items: center; }
.btn--icon[aria-pressed="true"] { background: var(--rot); border-color: var(--rot); color: #fff; }
.btn--ghost { background: transparent; }
.btn--back { background: rgba(15,26,51,.7); white-space: nowrap; }
.btn--small { min-height: 36px; padding: 8px 12px; font-size: 13px; }
.tgl[aria-pressed="true"] { background: var(--lampe); color: var(--nacht); border-color: transparent; }
html.rotlicht .tgl[aria-pressed="true"] { background: var(--text); color: #000; }
.controls { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.tools { display: flex; gap: 6px; }

/* Pfad (Wo Sie sind) */
.path { display: flex; align-items: center; gap: 0; position: absolute; left: var(--pad); top: calc(var(--pad) + var(--safe-t) + 54px); font-family: var(--display); font-variation-settings: 'wdth' 78; font-weight: 500; font-size: 12px; letter-spacing: .02em; white-space: nowrap; }
.path__step { color: var(--text-2); padding: 8px 0; position: relative; }
.path__step.is-done { color: var(--text); }
.path__step.is-current { color: var(--text); font-weight: 700; }
.path__step[disabled] { cursor: default; }
.path__step + .path__step::before { content: ''; display: inline-block; width: 14px; height: 1px; background: var(--text-2); margin: 0 6px; vertical-align: middle; }
.path__more { color: var(--text-2); font-weight: 300; margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--line); }
@media (min-width: 640px) { .path { left: 50%; transform: translateX(-50%); top: calc(var(--pad) + var(--safe-t) + 6px); } }
@media (max-width: 420px) { .path { font-size: 11px; } .path__step + .path__step::before { width: 8px; margin: 0 4px; } .path__more { display: none; } }

/* Ort unten links */
.place { max-width: min(62ch, 66vw); }
.place__title { font-family: var(--display); font-variation-settings: 'wdth' 100, 'opsz' 96; font-weight: 700; font-size: clamp(32px, 8.6vw, 72px); line-height: .95; letter-spacing: -.01em; margin: 0 0 8px; text-shadow: 0 2px 24px rgba(0,0,0,.6); }
.place__caption { font-family: var(--serif); font-variation-settings: 'opsz' 18; font-size: clamp(15px, 2.4vw, 19px); line-height: 1.35; margin: 0; color: var(--text); opacity: .92; text-shadow: 0 1px 12px rgba(0,0,0,.7); }
.place__live { font-family: var(--display); font-variation-settings: 'wdth' 88; font-weight: 400; font-size: 13px; line-height: 1.4; margin: 10px 0 0; color: var(--lampe); text-shadow: 0 1px 8px rgba(0,0,0,.8); }
.place__live b { font-weight: 600; }
.place__fwd { font-style: normal; font-weight: 600; color: var(--firn); background: rgba(242,201,138,.18); border: 1px solid rgba(242,201,138,.4); border-radius: 999px; padding: 1px 8px; margin-right: 4px; }
/* Blicke: Kamerafahrten zu benannten Ansichten des Raums */
.views { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.views:empty { display: none; }
.view { font-family: var(--display); font-variation-settings: 'wdth' 88; font-size: 12px; font-weight: 500; color: var(--lampe); border: 1px solid rgba(242,201,138,.45); border-radius: 999px; padding: 6px 11px; background: rgba(15,26,51,.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); min-height: 30px; transition: background .25s, color .25s; }
.view.is-on { background: var(--lampe); color: var(--nacht); }
.view::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: currentColor; margin-right: 6px; transform: rotate(45deg); vertical-align: 1px; opacity: .85; }
html.rotlicht .view { color: var(--text); border-color: var(--line); }
html.rotlicht .view.is-on { background: var(--text); color: #000; }

/* Erzaehlung (Fuehrung, Blicke) */
.narration { position: fixed; left: var(--pad); right: var(--pad); top: calc(var(--safe-t) + 118px); transform: none; z-index: 6; font-family: var(--serif); font-variation-settings: 'opsz' 24; font-size: clamp(18px, 3.2vw, 26px); line-height: 1.4; max-width: 34ch; margin: 0 auto; text-align: center; opacity: 0; pointer-events: none; transition: opacity .6s var(--ease); text-shadow: 0 2px 18px rgba(0,0,0,.85); }
.narration.is-on { opacity: 1; }

/* Legende */
.hint { transition: opacity .8s var(--ease); position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 34px); z-index: 6; font-family: var(--display); font-variation-settings: 'wdth' 85; font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 4px; white-space: nowrap; pointer-events: none; }
.hint__dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--firn); vertical-align: middle; }
.hint__dot--dive { background: var(--rot); border-color: var(--rot); }
.hint__chip { display: inline-block; width: 7px; height: 7px; background: var(--lampe); transform: rotate(45deg); border-radius: 1px; vertical-align: middle; }
.hint.is-off { opacity: 0; }

/* Fuss */
.foot { position: fixed; left: var(--pad); right: var(--pad); bottom: calc(var(--safe-b) + 8px); z-index: 6; display: flex; justify-content: space-between; gap: 12px; font-family: var(--display); font-variation-settings: 'wdth' 85; font-size: 11px; color: var(--text-2); }
.foot__links { display: flex; gap: 12px; }
.foot__link { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.foot__note { text-align: right; }
@media (max-width: 520px) { .foot__note { display: none; } }

/* Nachtsteuerung: Zeit vorspulen, Sternbilder, Laser, Rotlicht, Foto */
.nacht { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; background: var(--panel); border-top: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding: 14px var(--pad) calc(var(--pad) + var(--safe-b)); border-radius: 22px 22px 0 0; animation: rise .45s var(--ease); }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.nacht__head { display: flex; align-items: center; justify-content: space-between; }
.nacht__title { font-family: var(--display); font-variation-settings: 'wdth' 90; font-weight: 600; font-size: 14px; margin: 0; color: var(--text-2); }
.nacht__close { width: 40px; height: 40px; border-radius: 50%; font-size: 24px; line-height: 1; color: var(--text); background: rgba(15,26,51,.5); }
.nacht__time { font-family: var(--display); font-variation-settings: 'wdth' 100, 'opsz' 96; font-weight: 700; font-size: clamp(38px, 9vw, 56px); line-height: 1; letter-spacing: -.02em; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.nacht__sub { font-family: var(--display); font-variation-settings: 'wdth' 88; font-size: 13px; line-height: 1.4; color: var(--text-2); margin: 0 0 8px; max-width: 60ch; }
.nacht__sub b { color: var(--text); font-weight: 600; }
.nacht__sub em { font-style: normal; color: var(--lampe); }
.nacht__slider { position: relative; padding: 4px 0 34px; }
.nacht__slider input { width: 100%; margin: 0; accent-color: var(--lampe); height: 28px; }
.nacht__ticks { position: absolute; left: 0; right: 0; top: 30px; height: 30px; font-family: var(--display); font-variation-settings: 'wdth' 80; font-size: 10px; line-height: 1.2; color: var(--text-2); }
.nacht__tick { position: absolute; transform: translateX(-50%); text-align: center; white-space: nowrap; }
.nacht__tick i { display: block; width: 1px; height: 6px; background: var(--text-2); margin: 0 auto 2px; }
.nacht__tick:first-child { transform: translateX(-10%); text-align: left; }
.nacht__tick:first-child i { margin-left: 0; }
.nacht__tick:last-child { transform: translateX(-90%); text-align: right; }
.nacht__tick:last-child i { margin-right: 0; }
.nacht__row { display: flex; flex-wrap: wrap; gap: 8px; }
.nacht__row .btn { flex: 0 0 auto; }
html.rotlicht .nacht__slider input { accent-color: var(--text); }

/* Karte (Bottom-Sheet, Desktop rechte Spalte) */
.sheet { position: fixed; inset: 0; z-index: 20; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(7,13,31,.45); opacity: 0; transition: opacity .35s; }
.sheet.is-open .sheet__scrim { opacity: 1; }
.sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: min(88dvh, 100%); background: var(--panel); color: var(--text); border-radius: 22px 22px 0 0; overflow: auto; overscroll-behavior: contain; transform: translateY(102%); transition: transform .5s var(--ease); -webkit-overflow-scrolling: touch; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.sheet.is-open .sheet__panel { transform: translateY(0); }
.sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 10px auto 0; }
.sheet__close { position: absolute; right: 10px; top: 8px; width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1; color: var(--text); z-index: 2; background: rgba(15,26,51,.5); }
.sheet__media { position: relative; margin: 12px 16px 0; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 16 / 10; }
.sheet__media:empty { display: none; }
.sheet__media img, .sheet__media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet__media.is-portrait { aspect-ratio: 4 / 5; }
.sheet__media.is-square { aspect-ratio: 1; }
html.rotlicht .sheet__media { filter: grayscale(1) sepia(1) saturate(6) hue-rotate(-30deg) brightness(.7); }
.sheet__body { padding: 18px 20px 22px; }
.sheet__title { font-family: var(--display); font-variation-settings: 'wdth' 100, 'opsz' 40; font-weight: 700; font-size: 28px; line-height: 1.05; margin: 0 0 12px; letter-spacing: -.01em; }
.sheet__text p { font-family: var(--serif); font-variation-settings: 'opsz' 16; font-size: 17px; line-height: 1.5; margin: 0 0 12px; max-width: 58ch; }
.sheet__extra { margin: 14px 0 0; }
.sheet__facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); font-family: var(--display); font-variation-settings: 'wdth' 90; font-size: 14px; }
.sheet__facts:empty { display: none; }
.sheet__facts dt { color: var(--text-2); font-weight: 400; }
.sheet__facts dd { margin: 0; font-weight: 600; }
.sheet__facts dd.is-live { color: var(--lampe); }
.sheet__facts dd.is-long { font-family: var(--serif); font-variation-settings: 'opsz' 14; font-weight: 400; font-size: 15px; line-height: 1.45; }
.sheet__facts:has(dd.is-long) { grid-template-columns: minmax(64px, max-content) 1fr; }
.sheet__actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.sheet__actions:empty { display: none; }
.sheet__done { font-family: var(--display); font-variation-settings: 'wdth' 90; font-size: 14px; color: var(--lampe); align-self: center; }
.sheet__credit { font-family: var(--display); font-variation-settings: 'wdth' 85; font-size: 11px; color: var(--text-2); margin: 16px 0 0; line-height: 1.4; }
.sheet__credit a { color: inherit; }
.credits { font-family: var(--display); font-variation-settings: 'wdth' 88; font-size: 13px; line-height: 1.5; }
.credits p { margin: 0 0 8px; }
.credits a { color: var(--text); }

/* Lageplan */
.plan { width: 100%; height: auto; display: block; font-family: var(--display); font-variation-settings: 'wdth' 88; }
.plan__contour { fill: none; stroke: var(--text-2); stroke-width: .8; opacity: .45; }
.plan__contour--far { opacity: .25; }
.plan__contour--north { opacity: .3; }
.plan__plateau { fill: rgba(238,242,247,.06); stroke: var(--line); stroke-width: .8; }
.plan__rail { fill: none; stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; opacity: .7; }
.plan__path { fill: none; stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 1.5 3; stroke-linecap: round; opacity: .8; }
.plan__mast line { stroke: var(--text-2); stroke-width: 1.2; } .plan__mast circle { fill: var(--rot); }
.plan__sight { fill: none; stroke: var(--lampe); stroke-width: .8; stroke-dasharray: 2 4; opacity: .7; }
.plan__north path { fill: var(--text-2); } .plan__north text, .plan__scale text { fill: var(--text-2); font-size: 9px; }
.plan__scale line { stroke: var(--text-2); stroke-width: 1; }
.plan__room { cursor: pointer; }
.plan__room:focus-visible { outline: none; }
.plan__room:focus-visible .plan__shape { stroke: var(--accent); stroke-width: 2; }
.plan__hit { fill: transparent; }
.plan__shape { fill: var(--nacht); stroke: var(--firn); stroke-width: 1.2; transition: fill .25s; }
.plan__room--inner .plan__shape { fill: rgba(238,242,247,.12); stroke-width: 1; }
.plan__shape--sky { fill: rgba(238,242,247,.08); stroke-width: 1; }
.plan__halo { fill: none; stroke: var(--firn); stroke-width: .6; opacity: .35; }
.plan__deckline { stroke: var(--line); stroke-width: .7; }
.plan__slit { fill: var(--lampe); opacity: .8; }
.plan__room.is-seen .plan__shape { stroke: var(--lampe); }
.plan__room.is-current .plan__shape { fill: var(--rot); stroke: var(--rot); }
.plan__room:hover .plan__shape { fill: rgba(238,242,247,.16); }
.plan__room.is-current:hover .plan__shape { fill: var(--rot); }
.plan__pulse { fill: none; stroke: var(--rot); stroke-width: 1; animation: planpulse 2.4s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }
@keyframes planpulse { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
.plan__label { fill: var(--text); font-size: 10.5px; font-weight: 500; pointer-events: none; paint-order: stroke; stroke: var(--nacht); stroke-width: 3px; stroke-linejoin: round; }
.plan__room--ridge .plan__label { font-size: 12px; font-weight: 700; letter-spacing: .04em; fill: var(--text-2); }
.plan__room--inner .plan__label { font-size: 8.5px; }
.plan__room.is-current .plan__label { fill: var(--firn); }
.plan__legend { font-family: var(--display); font-variation-settings: 'wdth' 88; font-size: 12px; color: var(--text-2); margin: 8px 0 0; }
.plan__legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 1.2px solid var(--firn); vertical-align: middle; }
.plan__legend-dot--here { background: var(--rot); border-color: var(--rot); }
.plan__legend-dot--seen { border-color: var(--lampe); }
html.rotlicht .plan__shape { fill: #0a0202; stroke: var(--text); } html.rotlicht .plan__room.is-current .plan__shape { fill: var(--text); }

/* Mondkalender */
.cal__month { margin: 0 0 18px; }
.cal__title { font-family: var(--display); font-variation-settings: 'wdth' 95; font-weight: 600; font-size: 16px; margin: 0 0 8px; }
.cal__dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; font-family: var(--display); font-variation-settings: 'wdth' 85; font-size: 10px; color: var(--text-2); text-align: center; margin-bottom: 4px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line); font-family: var(--display); font-variation-settings: 'wdth' 90; font-size: 13px; transition: background .2s, border-color .2s; }
.cal__day:hover { background: rgba(238,242,247,.08); }
.cal__day.is-dark { border-color: rgba(242,201,138,.55); }
.cal__day.is-dark .cal__num { color: var(--lampe); font-weight: 600; }
.cal__day.is-full { opacity: .45; }
.cal__day.is-full .cal__num { text-decoration: line-through; }
.cal__day.is-past { opacity: .25; cursor: default; }
.cal__day.is-picked { background: var(--firn); color: var(--nacht); border-color: transparent; }
.cal__day.is-picked .cal__num { color: var(--nacht); }
.cal__moon { display: block; height: 14px; }
.cal__moon:empty { visibility: hidden; }
.moon__dark { fill: #2a3450; } .moon__lit { fill: var(--firn); }
.cal__day.is-picked .moon__dark { fill: rgba(15,26,51,.35); } .cal__day.is-picked .moon__lit { fill: var(--nacht); }
.cal__detail { margin-top: 6px; }
.cal__pick { font-family: var(--display); font-variation-settings: 'wdth' 95; font-weight: 600; font-size: 17px; margin: 0 0 4px; }
.cal__facts { margin-top: 6px; }
.cal__facts .moon { vertical-align: -3px; margin-right: 4px; }
.cal__facts dd { font-weight: 500; }
html.rotlicht .moon__dark { fill: #1a0404; } html.rotlicht .moon__lit { fill: var(--text); }

@media (min-width: 900px) {
  .narration { top: calc(var(--safe-t) + 92px); max-width: 40ch; }
  .sheet__panel { left: auto; right: 0; top: 0; bottom: 0; width: 460px; max-height: none; border-radius: 0; border-top: 0; border-left: 1px solid var(--line); transform: translateX(104%); }
  .sheet__grip { display: none; }
  .sheet__media { margin: 64px 20px 0; }
  .hud--bottom { padding-bottom: calc(var(--pad) + var(--safe-b) + 32px); }
  .nacht { left: auto; right: var(--pad); bottom: calc(var(--pad) + var(--safe-b) + 28px); width: 440px; border-radius: 18px; border: 1px solid var(--line); padding: 14px 20px 18px; }
  body.nacht-open .hud--bottom { opacity: 1; pointer-events: auto; }
  body.nacht-open .controls { opacity: 0; pointer-events: none; }
}

/* DOM-Ebenen: Himmel (alt), Nebel */
.sky { position: absolute; inset: 0; overflow: hidden; background: #05091a; }
.sky__stars { position: absolute; inset: -8%; width: 116%; height: 116%; }
.sky__objects { position: absolute; inset: 0; }
.sky__obj { position: absolute; width: 0; height: 0; }
.sky__disc { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; overflow: hidden; box-shadow: 0 0 40px rgba(120,150,255,.12), inset 0 0 40px rgba(0,0,0,.6); background: #000; }
.sky__disc img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sky__iris { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, transparent 0, transparent 34%, rgba(5,9,26,.55) 60%, rgba(5,9,26,.92) 78%); transition: opacity 1.6s var(--ease); }
.sky.is-open .sky__iris { opacity: 0; }
.nebel { position: absolute; inset: 0; background: #000; }
.nebel__osd { position: absolute; inset: 0; }
.nebel__marks { position: absolute; inset: 0; pointer-events: none; }
.nebel__hint { position: absolute; left: 50%; top: calc(var(--safe-t) + 92px); transform: translateX(-50%); font-family: var(--display); font-variation-settings: 'wdth' 88; font-size: 12px; color: var(--text-2); pointer-events: none; }

/* Loader */
.loader { position: fixed; inset: 0; z-index: 50; background: var(--nacht-tief); display: grid; place-content: center; text-align: center; gap: 18px; transition: opacity .9s var(--ease); }
.loader.is-done { opacity: 0; pointer-events: none; }
.loader__mark { font-family: var(--display); font-variation-settings: 'wdth' 100, 'opsz' 96; font-weight: 700; font-size: clamp(44px, 12vw, 96px); letter-spacing: .08em; color: var(--firn); }
.loader__line { width: min(60vw, 320px); height: 1px; background: rgba(238,242,247,.15); margin: 0 auto; overflow: hidden; }
.loader__line i { display: block; height: 100%; width: 0; background: var(--firn); transition: width .3s; }
.loader__text { font-family: var(--serif); font-size: 15px; color: var(--granit); margin: 0; min-height: 1.4em; }

/* Preloader-Zaehler ist absichtlich nicht drin: das Laden zeigt sich als wachsende Linie. */
@media (prefers-reduced-motion: reduce) { .sheet__panel, .portal, .narration, .nacht { transition-duration: .01s; animation: none; } .plan__pulse { animation: none; } }
