/* Inhalts-Styling fuer den linken Bereich (ueber dem laufenden Hintergrund).
   Die Szene/Landing bringt ihr eigenes CSS mit; hier nur der Content. */

/* Link-Reset: keine blauen Unterstriche im Inhaltsbereich */
.land-content a { color: inherit; text-decoration: none; }

/* ===== Ganzseiten-Scroll: Hintergrund bleibt fix, Inhalt scrollt als ganze Seite ===== */
html, body { height: auto !important; min-height: 100% !important; overflow-x: hidden !important; overflow-y: auto !important; }
#viewport { position: fixed !important; inset: 0 !important; }
body.content-page #landing { position: relative !important; height: auto !important; pointer-events: none; }
/* Lese-Schleier links zieht sich ueber die ganze scrollbare Hoehe mit */
body.content-page #landing::before { position: absolute !important; top: 0 !important; bottom: 0 !important; left: 0 !important; right: 0 !important; height: auto !important; }
body.content-page #landing::after { display: none !important; }
body.content-page #landing .land-inner { position: relative !important; inset: auto !important; display: block !important; min-height: 100vh; max-width: min(64vw, 980px); }
.land-content { overflow: visible !important; min-height: 0 !important; padding-right: 0 !important; pointer-events: auto; }
.land-head { pointer-events: auto; }

/* Linker Inhaltsbereich: scrollbar, klickbar (Landing-Overlay ist pointer-events:none) */
body.content-page #landing .land-inner { grid-template-rows: auto 1fr; }
.land-content {
  min-height: 0; overflow-y: auto; pointer-events: auto;
  padding: 4px 12px 40px 0; color: #f4ede2;
}
.land-content::-webkit-scrollbar { width: 7px; }
.land-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 4px; }

.land-content .wrap { max-width: none; margin: 0; padding: 0; }

.land-content .eyebrow { letter-spacing: .26em; text-transform: uppercase; color: #f0d9b8; font-size: 11px; margin: 0 0 8px; display: block; }
.page-title { font-family: "Shippori Mincho", serif; font-size: clamp(28px, 3.6vw, 48px); line-height: 1.05; margin: 0 0 12px; color: #fff7ec; }
.sec { font-family: "Shippori Mincho", serif; margin: 60px 0 24px; font-size: 21px; color: #fdf3e6; border-bottom: 1px solid rgba(220,180,130,.22); padding-bottom: 11px; }
.subsec { margin: 42px 0 20px; font-size: 13px; letter-spacing: .08em; color: #f2ad5c; font-weight: 700; text-transform: uppercase; }
.lead { font-size: 17px; color: #f5ead9; max-width: 680px; margin: 0 0 18px; }
.prose { line-height: 1.9; color: #f4ede2; max-width: 680px; margin: 0 0 14px; }
.prose p { margin: 0 0 22px; }
.prose h3 { margin: 36px 0 12px; }
.prose.mehr { margin-top: 8px; border-top: 1px solid rgba(220,180,130,.2); padding-top: 10px; }
.back { display: inline-block; color: #f2ad5c; margin-bottom: 12px; font-size: 14px; }
.backbar { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.backbar .back { margin-bottom: 0; }
.meta { display: flex; gap: 18px; flex-wrap: wrap; color: #e7dccb; margin: 8px 0 24px; }
.meta a { color: #f2ad5c; }
.meta a:hover { text-decoration: underline; }
.empty { padding: 20px; border: 1px dashed rgba(220,180,130,.24); border-radius: 12px; color: #ece2d4; background: rgba(18,12,7,.72); }

/* Karten-Raster */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 3px; padding: 14px; border: 1px solid rgba(220,180,130,.2); border-radius: 12px; background: rgba(18,12,7,.82); transition: transform .14s, border-color .2s; height: 124px; overflow: hidden; }
.card:hover { transform: translateY(-2px); }
.card small { color: #f2ad5c; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card b { font-size: 15px; color: #fff7ec; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card span { color: #e3d5c2; font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; margin-bottom: 5px; }
.team-divider { grid-column: 1 / -1; height: 1px; margin: 6px 0; background: linear-gradient(90deg, transparent, rgba(220,180,130,.3), transparent); }

/* Steckbrief (Databook-Daten) */
.steckbrief { width: 100%; border-collapse: collapse; margin: 6px 0 22px; max-width: 580px; }
.steckbrief th { text-align: left; color: #f2ad5c; font-weight: 600; padding: 7px 14px 7px 0; vertical-align: top; width: 180px; font-size: 13.5px; border-bottom: 1px solid rgba(220,180,130,.14); }
.steckbrief td { padding: 7px 0; color: #f0e7d9; font-size: 13.5px; border-bottom: 1px solid rgba(220,180,130,.14); }

/* Archiv-Tabelle */
.archiv { width: 100%; border-collapse: collapse; margin: 12px 0 30px; }
.archiv th, .archiv td { text-align: left; padding: 11px 12px; border-bottom: 1px solid rgba(220,180,130,.2); font-size: 13.5px; color: #f0e7d9; line-height: 1.5; }
.archiv th { color: #f2ad5c; font-weight: 600; }
.techniken td a { color: #f2ad5c; font-weight: 600; }
.techniken td a:hover { text-decoration: underline; }
.prose a.namelink, a.namelink { color: #f2ad5c; font-weight: 600; }
a.namelink:hover { text-decoration: underline; }

/* Geschichte (Arcs) */
.arc { background: rgba(18,12,7,.82); border: 1px solid rgba(220,180,130,.2); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; }
.arc summary { cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: center; list-style: none; }
.arc summary::-webkit-details-marker { display: none; }
.arc summary b { font-size: 16px; color: #fff7ec; }
.arc summary span { color: #e3d5c2; font-size: 12.5px; }
.arc .kurz { color: #f4ede2; line-height: 1.6; margin: 10px 0 0; }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; border-radius: 10px; display: block; }
.gallery figcaption { color: #e3d5c2; font-size: 12px; margin-top: 5px; }

/* Einklappbare Drittcharaktere */
details.dritt-collapse { margin: 18px 0 10px; }
details.dritt-collapse > summary { cursor: pointer; list-style: none; font-size: 14px; letter-spacing: .08em; color: #f2ad5c; font-weight: 700; text-transform: uppercase; display: flex; align-items: center; gap: 9px; padding: 4px 0; }
details.dritt-collapse > summary::-webkit-details-marker { display: none; }
details.dritt-collapse > summary::before { content: '\25B6'; font-size: 10px; transition: transform .15s; }
details.dritt-collapse[open] > summary { margin-bottom: 12px; }
details.dritt-collapse[open] > summary::before { transform: rotate(90deg); }

/* ===== Boxen-Rand-Glow (wie Steins;Gate), folgt der Maus ===== */
[data-border-glow] {
  position: relative; isolation: isolate;
  --sg-card-glow-x: -9999px; --sg-card-glow-y: -9999px; --sg-card-glow-opacity: 0; --sg-card-glow-size: 130px;
}
[data-border-glow]::before, [data-border-glow]::after {
  content: ""; pointer-events: none; position: absolute; inset: 0; z-index: 2; padding: 2px; border: 0;
  border-radius: inherit; background-repeat: no-repeat; background-position: 50% 50%; background-size: 100% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  mix-blend-mode: screen; opacity: var(--sg-card-glow-opacity); transition: opacity .16s ease;
}
[data-border-glow]::before {
  background-image: radial-gradient(var(--sg-card-glow-size) var(--sg-card-glow-size) at var(--sg-card-glow-x) var(--sg-card-glow-y), rgba(255,205,110,0.98), rgba(255,196,96,0.88) 42%, rgba(214,52,46,0.6) 66%, rgba(140,58,196,0.34) 86%, transparent 96%);
  filter: brightness(1.6);
}
[data-border-glow]::after {
  background-image: radial-gradient(calc(var(--sg-card-glow-size) * 0.7) calc(var(--sg-card-glow-size) * 0.7) at var(--sg-card-glow-x) var(--sg-card-glow-y), rgba(255,240,210,0.62), rgba(255,212,120,0.42) 52%, rgba(196,64,168,0.22) 78%, transparent 90%);
}

/* ===== Spoiler-System (Masterplan Kap. 6, arc-basiert) ===== */
/* Ebene 2: Spoiler-Block (gesperrte Box, blur + Lock-Overlay, Klick deckt auf) */
.spoiler-block { position: relative; }
.spoiler-block .sb-lock { display: none; }
.spoiler-block.is-hidden .sb-inner { filter: blur(11px); opacity: .16; pointer-events: none; user-select: none; }
.spoiler-block.is-hidden .sb-lock {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 14px; cursor: pointer; border-radius: 12px;
  color: #f2ad5c; background: rgba(0,0,0,0.34); font-size: 13px; font-weight: 600; letter-spacing: .02em;
}
.spoiler-block.is-hidden .sb-lock:hover { color: #fff; background: rgba(0,0,0,0.5); }

/* Ebene 3: Inline-Spoiler im Fliesstext (blur bis Klick) */
.sp-in.is-hidden {
  filter: blur(5px); background: rgba(242,173,92,0.14); border-radius: 4px; padding: 0 .3em;
  cursor: pointer; user-select: none;
}
.sp-in.is-hidden:hover { background: rgba(242,173,92,0.26); }
.sp-in.sp-revealed { background: rgba(242,173,92,0.10); border-radius: 4px; }

/* Sammel-Hinweis fuer aufeinanderfolgende geblockte Bloecke */
.sp-hidden-note { color: #c9b69f; font-size: 12.5px; font-style: italic; margin: 8px 0; }
.sp-hidden-note em { color: #f2ad5c; font-style: normal; }

/* ===== Spoiler-Leiste (fest, unten rechts) ===== */
#spoilerBar {
  position: fixed; bottom: 22px; right: 24px;
  max-width: calc(100vw - 48px); z-index: 60;
  display: none; flex-wrap: nowrap; align-items: center; gap: 4px;
  overflow-x: auto; scrollbar-width: none;
  padding: 6px 12px;
  background: rgba(0,0,0,0.85);
  border: 1px solid rgba(242,173,92,0.22); border-radius: 999px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: opacity .55s ease;
}
#spoilerBar.show { display: flex; }
#spoilerBar.dimmed { opacity: 0.28; }
#spoilerBar.ghost { opacity: 0; }
#spoilerBar:hover { opacity: 1; transition: opacity .12s ease; }
#spoilerBar::-webkit-scrollbar { display: none; }
#spoilerBar .slbl { color: #e9dac6; font-size: 12px; font-weight: 600; letter-spacing: .03em; white-space: nowrap; padding: 0 6px 0 2px; flex: none; }
#spoilerBar button {
  flex: none; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600;
  color: #e9dac6; background: rgba(255,255,255,0.05); border: 1px solid rgba(242,173,92,0.18);
  border-radius: 999px; padding: 5px 11px; white-space: nowrap; transition: background .15s, color .15s;
}
#spoilerBar button:hover { background: rgba(255,255,255,0.12); color: #fff; }
#spoilerBar button.active {
  background: linear-gradient(180deg, oklch(0.84 0.15 72), oklch(0.66 0.17 52)); color: #1c0f05; border-color: transparent;
}
#spoilerBar button.sp-close {
  width: 24px; height: 24px; padding: 0; display: grid; place-items: center;
  font-size: 16px; line-height: 1; color: #c9b69f; border-color: transparent; background: transparent; margin-left: 2px;
}
#spoilerBar button.sp-close:hover { color: #fff; background: rgba(255,255,255,0.1); }
@media (max-width: 720px) { #spoilerBar { right: 8px; left: 8px; max-width: none; } }
