/* ══════════════════════════════════════════════════════════════
   Lore Builder CMS — Canvas & Block Styles
   Wird nur in lore-builder.html geladen.
   Basis-UI-Klassen (pbx-topbar, pbx-side, pbx-dialog usw.)
   kommen aus project-builder-cms.css
   ══════════════════════════════════════════════════════════════ */

.lore-builder-body {
  --lbx-accent: #c08040;
}

.lbx-topbar {
  border-bottom-color: rgba(192, 128, 64, .2);
}

.lbx-canvas {
  font-family: Geomanist, Georgia, serif;
}

.lbx-sep {
  border: none;
  border-top: 1px solid rgba(255,255,255,.08);
  margin: 6px 0;
}

/* ── Block-Wrapper im Canvas ─────────────────────────────────── */
.lbx-block {
  position: relative;
  width: 100%;
  cursor: pointer;
}

.lbx-block .pbx-tools {
  opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
}
.lbx-block:hover .pbx-tools,
.lbx-block.selected .pbx-tools {
  opacity: 1;
  pointer-events: auto;
}

/* WYSIWYG: block content must not capture clicks so [data-select] works */
.lbx-block > .lbx-hero,
.lbx-block > .lbx-einleitung,
.lbx-block > .lbx-kapitel,
.lbx-block > .lbx-kapitel-end,
.lbx-block > .lbx-fliesstext,
.lbx-block > .lbx-heading,
.lbx-block > .lbx-quote,
.lbx-block > .lbx-effect,
.lbx-block > .lbx-gespraech,
.lbx-block > .lbx-bild,
.lbx-block > .lbx-audio,
.lbx-block > .lbx-schlusswort,
.lbx-block > .pb-module,
.lbx-block > .pb-project-nav {
  pointer-events: none;
  user-select: none;
}

/* ── Hero ────────────────────────────────────────────────────── */
.lbx-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: #111;
}

.lbx-hero-bg,
.lbx-hero-bg-picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .55;
}

.lbx-hero-bg-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lbx-hero-bg {
  object-fit: cover;
}

.lbx-hero-inner {
  position: relative;
  z-index: 2;
  padding: clamp(32px, 6vw, 80px);
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 100%);
}

.lbx-hero-kicker {
  font-size: .7rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--lbx-accent, #c08040);
  margin: 0 0 12px;
}

/* Artwork-Name: weight 900, fett — z.B. "NIER 2B" */
.lbx-hero-title {
  font-size: clamp(2.4rem, 5vw, 5.5rem);
  font-weight: 900;
  font-style: normal;
  text-transform: uppercase;
  margin: 0 0 6px;
  line-height: .92;
  letter-spacing: -.02em;
  word-break: break-word;
  hyphens: auto;
}

/* Lore-Untertitel: weight 200 italic — z.B. "ZWISCHEN PFLICHT & SEELE." */
.lbx-hero-subtitle {
  font-size: clamp(1.4rem, 2.8vw, 3rem) !important;
  font-weight: 200 !important;
  font-style: italic !important;
  text-transform: uppercase;
  opacity: 1 !important;
  line-height: 1.05;
  letter-spacing: .01em;
  color: inherit;
  margin: 0 0 20px !important;
}


.lbx-hero-meta {
  display: flex;
  gap: 20px;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .55;
}

/* ── Einleitung ──────────────────────────────────────────────── */
.lbx-einleitung {
  padding: clamp(48px, 8vw, 100px) clamp(24px, 6vw, 80px);
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.lbx-einleitung-ornament {
  font-size: 2rem;
  opacity: .35;
  margin-bottom: 24px;
  display: block;
  letter-spacing: .4em;
}

.lbx-einleitung-text {
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  line-height: 1.75;
  max-width: 660px;
  margin: 0 auto;
  opacity: .88;
  font-style: italic;
}

/* ── Kapitel ─────────────────────────────────────────────────── */
.lbx-kapitel {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 60px clamp(24px, 6vw, 60px) 40px;
}

.lbx-kapitel::before {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,.2));
}

.lbx-kapitel::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to left, transparent, rgba(255,255,255,.2));
}

.lbx-kapitel-inner {
  text-align: center;
  flex-shrink: 0;
}

.lbx-kapitel-num {
  display: block;
  font-size: .65rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--lbx-accent, #c08040);
  margin-bottom: 6px;
}

.lbx-kapitel-title {
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  font-weight: 900;
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
}

.lbx-kapitel-subtitle {
  font-size: .82rem;
  opacity: .55;
  margin: 6px 0 0;
  letter-spacing: .08em;
}

/* Kapitel-Ende */
.lbx-kapitel-end {
  padding: 32px clamp(24px, 6vw, 60px) 64px;
  text-align: center;
  opacity: .35;
  font-size: .65rem;
  letter-spacing: .32em;
  text-transform: uppercase;
}

.lbx-kapitel-end::before {
  content: '— ✦ ✦ ✦ —';
  display: block;
  font-size: 1rem;
  letter-spacing: .5em;
  margin-bottom: 10px;
}

/* ── Fließtext ───────────────────────────────────────────────── */
.lbx-fliesstext {
  padding: 28px clamp(24px, 8vw, 100px);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.85;
  max-width: 72ch;
  margin: 0 auto;
  opacity: .9;
}

.lbx-fliesstext p {
  margin: 0 0 1.4em;
}
.lbx-fliesstext p:last-child {
  margin-bottom: 0;
}

/* ── Heading H3 / H4 ─────────────────────────────────────────── */
.lbx-heading {
  padding: 32px clamp(24px, 6vw, 80px) 12px;
}

.lbx-heading h3 {
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 900;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.05;
}

.lbx-heading h4 {
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0;
  opacity: .75;
}

/* ── Quote ───────────────────────────────────────────────────── */
.lbx-quote {
  padding: 48px clamp(24px, 8vw, 120px);
  text-align: center;
}

.lbx-quote blockquote {
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  font-style: italic;
  line-height: 1.6;
  margin: 0;
  position: relative;
  padding: 0 0 0 0;
  opacity: .9;
}

.lbx-quote blockquote::before {
  content: '\201C';
  font-size: 5rem;
  line-height: 0;
  vertical-align: -.65em;
  color: var(--lbx-accent, #c08040);
  opacity: .5;
  margin-right: 6px;
}

.lbx-quote cite {
  display: block;
  margin-top: 18px;
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .5;
  font-style: normal;
}

/* ── Effect ──────────────────────────────────────────────────── */
.lbx-effect {
  padding: clamp(32px, 5vw, 64px) clamp(16px, 4vw, 48px);
  text-align: center;
  overflow: hidden;
}

/* BOOM — Impact / Haettenschweiler style */
.lbx-effect-boom .lbx-effect-text {
  font-family: Impact, 'Arial Narrow Bold', 'Haettenschweiler', 'Arial Black', sans-serif;
  font-size: clamp(4rem, 18vw, 14rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: .85;
  letter-spacing: -.02em;
  text-shadow: 6px 6px 0 rgba(0,0,0,.45);
  display: block;
}

/* FLASH — Monospace electric */
.lbx-effect-flash .lbx-effect-text {
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: clamp(2rem, 8vw, 6rem);
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  border-bottom: 3px solid currentColor;
  padding-bottom: 8px;
  display: inline-block;
  text-shadow: 0 0 18px currentColor, 0 0 40px currentColor;
}

/* WOW — Gradient glam */
.lbx-effect-wow .lbx-effect-text {
  font-size: clamp(3rem, 12vw, 10rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: .9;
  background: linear-gradient(135deg, var(--lbx-effect-color, #ff6b00) 0%, #ffd700 50%, #ff6b00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  letter-spacing: -.03em;
}

/* ATTACK — Aggressive italic */
.lbx-effect-attack .lbx-effect-text {
  font-family: 'Arial Black', Impact, sans-serif;
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: .9;
  display: block;
  text-shadow: 3px 0 0 rgba(0,0,0,.5);
  transform: skewX(-6deg);
  display: inline-block;
}

.lbx-effect-subtext {
  display: block;
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  opacity: .5;
  margin-top: 14px;
}

/* ── Gespräch ────────────────────────────────────────────────── */
.lbx-gespraech {
  padding: 18px clamp(24px, 8vw, 100px);
  display: grid;
  gap: 6px;
  max-width: 72ch;
  margin: 0 auto;
}

.lbx-gespraech-name {
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--lbx-accent, #c08040);
  font-weight: 700;
}

.lbx-gespraech-bubble {
  background: rgba(255,255,255,.06);
  border-left: 2px solid var(--lbx-accent, #c08040);
  padding: 14px 20px;
  font-size: clamp(.95rem, 1.5vw, 1.1rem);
  line-height: 1.7;
  border-radius: 0 10px 10px 0;
  font-style: italic;
}

.lbx-gespraech-right .lbx-gespraech-name {
  text-align: right;
}

.lbx-gespraech-right .lbx-gespraech-bubble {
  border-left: none;
  border-right: 2px solid var(--lbx-accent, #c08040);
  border-radius: 10px 0 0 10px;
  text-align: right;
}

/* ── Bild ────────────────────────────────────────────────────── */
.lbx-bild {
  padding: 24px clamp(16px, 4vw, 48px);
}

.lbx-bild img {
  width: 100%;
  display: block;
}

.lbx-bild.fullbleed {
  padding: 0;
}

.lbx-bild-caption {
  font-size: .75rem;
  opacity: .45;
  letter-spacing: .06em;
  text-align: center;
  margin-top: 10px;
}

/* ── Audio ───────────────────────────────────────────────────── */
.lbx-audio {
  padding: 24px clamp(24px, 6vw, 80px);
}

.lbx-audio-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  padding: 20px 24px;
  border-radius: 12px;
}

/* ── Schlusswort ─────────────────────────────────────────────── */
.lbx-schlusswort {
  padding: clamp(48px, 8vw, 100px) clamp(24px, 6vw, 80px);
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.08);
}

.lbx-schlusswort-ornament {
  font-size: 2rem;
  opacity: .3;
  margin-bottom: 24px;
  display: block;
  letter-spacing: .5em;
}

.lbx-schlusswort-text {
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.75;
  max-width: 580px;
  margin: 0 auto;
  opacity: .78;
}

.lbx-schlusswort-sig {
  margin-top: 28px;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  opacity: .4;
}

/* ── Builder Canvas Leer-Zustand ─────────────────────────────── */
.lbx-canvas .pbx-empty {
  background: rgba(192,128,64,.04);
  border: 1px dashed rgba(192,128,64,.25);
  color: rgba(192,128,64,.6);
}

/* ── Toast notification ──────────────────────────────────────── */
.lbx-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.14);
  color: #f2f2f2;
  font-size: .78rem;
  letter-spacing: .06em;
  padding: 10px 22px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  z-index: 9999;
  white-space: nowrap;
}

.lbx-toast.lbx-toast-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.lbx-toast.lbx-toast-ok {
  border-color: rgba(192,128,64,.5);
  color: #e6b87a;
}

.lbx-toast.lbx-toast-err {
  border-color: rgba(220,60,60,.45);
  color: #f08080;
}

/* ══════════════════════════════════════════════════════════════════
   LORE BLOCK TEMPLATES
══════════════════════════════════════════════════════════════════ */

/* ── Kapitel Templates ───────────────────────────────────────── */

/* tpl-02 · Zentriert — centered, decorative line below */
.lbx-kapitel-tpl-02 {
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 72px clamp(24px, 6vw, 60px) 48px;
}
.lbx-kapitel-tpl-02::before,
.lbx-kapitel-tpl-02::after { display: none; }
.lbx-kapitel-tpl-02 .lbx-kapitel-inner { text-align: center; }
.lbx-kapitel-tpl-02 .lbx-kapitel-inner::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: var(--lbx-accent, #c08040);
  margin: 14px auto 0;
}

/* tpl-03 · Sidebar — big number left, title right */
.lbx-kapitel-tpl-03 {
  align-items: center;
  gap: 0;
  padding: 48px clamp(24px, 6vw, 60px);
}
.lbx-kapitel-tpl-03::before,
.lbx-kapitel-tpl-03::after { display: none; }
.lbx-kapitel-tpl-03 .lbx-kapitel-inner {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
  width: 100%;
  text-align: left;
}
.lbx-kapitel-tpl-03 .lbx-kapitel-num {
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: 1;
  opacity: .12;
  margin: 0;
  flex-shrink: 0;
}
.lbx-kapitel-tpl-03 .lbx-kapitel-title {
  font-size: clamp(1.6rem, 4vw, 3.5rem);
  text-transform: uppercase;
}

/* tpl-04 · Minimal — no number, just title with thin border-top */
.lbx-kapitel-tpl-04 {
  padding: 48px clamp(24px, 6vw, 60px) 24px;
  gap: 0;
}
.lbx-kapitel-tpl-04::before,
.lbx-kapitel-tpl-04::after { display: none; }
.lbx-kapitel-tpl-04 .lbx-kapitel-inner {
  text-align: left;
  width: 100%;
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 20px;
}
.lbx-kapitel-tpl-04 .lbx-kapitel-title {
  font-size: clamp(1.8rem, 5vw, 4rem);
  letter-spacing: -.02em;
}

/* ── Quote Templates ─────────────────────────────────────────── */

/* tpl-01 Standard: left border bar (override centered default) */
.lbx-quote-tpl-01 {
  text-align: left;
  padding: 40px clamp(24px, 8vw, 100px);
}
.lbx-quote-tpl-01 blockquote {
  border-left: 3px solid var(--lbx-accent, #c08040);
  padding-left: clamp(16px, 3vw, 32px);
}
.lbx-quote-tpl-01 blockquote::before { display: none; }

/* tpl-02 Groß: huge background quotes, text centered */
.lbx-quote-tpl-02 {
  position: relative;
  padding: 64px clamp(24px, 8vw, 100px);
  text-align: center;
}
.lbx-quote-tpl-02::before {
  content: '\201C';
  position: absolute;
  top: -0.2em;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(8rem, 22vw, 18rem);
  font-weight: 900;
  line-height: 1;
  color: var(--lbx-accent, #c08040);
  opacity: .07;
  pointer-events: none;
}
.lbx-quote-tpl-02 blockquote {
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  position: relative;
  z-index: 1;
}
.lbx-quote-tpl-02 blockquote::before { display: none; }

/* tpl-03 Zentriert: centered italic, no border, no quotes */
.lbx-quote-tpl-03 {
  text-align: center;
  padding: 56px clamp(32px, 10vw, 140px);
}
.lbx-quote-tpl-03 blockquote {
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  opacity: .75;
}
.lbx-quote-tpl-03 blockquote::before { display: none; }
.lbx-quote-tpl-03 cite { opacity: .35; }

/* tpl-04 Block: full-width accent background */
.lbx-quote-tpl-04 {
  background: var(--lbx-accent, #c08040);
  color: #fff;
  padding: 48px clamp(24px, 8vw, 100px);
  text-align: center;
}
.lbx-quote-tpl-04 blockquote {
  font-size: clamp(1.2rem, 2.5vw, 1.9rem);
  color: #fff;
  opacity: 1;
}
.lbx-quote-tpl-04 blockquote::before { color: rgba(255,255,255,.3); opacity: 1; }
.lbx-quote-tpl-04 cite { color: rgba(255,255,255,.6); opacity: 1; }

/* ── Gespräch Templates ──────────────────────────────────────── */

/* tpl-02 Chat: speech bubble style, rounded corners */
.lbx-gespraech-tpl-02 .lbx-gespraech-name {
  font-size: .62rem;
  margin-bottom: 4px;
}
.lbx-gespraech-tpl-02 .lbx-gespraech-bubble {
  border-left: none;
  border-radius: 4px 18px 18px 18px;
  background: rgba(255,255,255,.09);
  padding: 14px 20px;
  font-style: normal;
  display: inline-block;
  max-width: 80%;
}
.lbx-gespraech-tpl-02.lbx-gespraech-right .lbx-gespraech-bubble {
  border-right: none;
  border-radius: 18px 4px 18px 18px;
  background: rgba(var(--lbx-accent-rgb, 192,128,64), .18);
}

/* tpl-03 Drehbuch: screenplay style */
.lbx-gespraech-tpl-03 {
  padding: 8px clamp(48px, 12vw, 160px);
}
.lbx-gespraech-tpl-03 .lbx-gespraech-name {
  font-family: 'Courier New', monospace;
  font-size: .8rem;
  letter-spacing: .1em;
  text-align: center;
  color: inherit;
  opacity: .7;
  margin-bottom: 2px;
}
.lbx-gespraech-tpl-03 .lbx-gespraech-bubble {
  font-family: 'Courier New', monospace;
  font-size: clamp(.9rem, 1.4vw, 1rem);
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  font-style: normal;
  text-align: center;
  line-height: 1.8;
}

/* tpl-04 Minimal: name + colon, no visual bubble */
.lbx-gespraech-tpl-04 .lbx-gespraech-bubble {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  font-style: normal;
}
.lbx-gespraech-tpl-04 .lbx-gespraech-name::after { content: ':'; }

/* ── Bild Templates ──────────────────────────────────────────── */

/* tpl-02 Cinematic: wide 21:9 ratio */
.lbx-bild-tpl-02 img {
  aspect-ratio: 21/9;
  object-fit: cover;
  width: 100%;
}

/* tpl-03 Rahmen: border frame */
.lbx-bild-tpl-03 img {
  outline: 1px solid rgba(255,255,255,.2);
  outline-offset: -8px;
}

/* tpl-04 S/W: black & white */
.lbx-bild-tpl-04 img {
  filter: grayscale(100%) contrast(1.05);
}

/* ── Audio Templates ─────────────────────────────────────────── */

/* tpl-02 Card */
.lbx-audio-tpl-02 { padding: 32px clamp(24px, 6vw, 80px); }
.lbx-audio-card {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  align-items: center;
  background: rgba(255,255,255,.05);
  border-radius: 12px;
  padding: clamp(16px, 3vw, 28px);
  max-width: 680px;
  margin: 0 auto;
}
.lbx-audio-cover {
  flex: 0 0 clamp(64px, 12vw, 120px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
}
.lbx-audio-cover img { width: 100%; height: 100%; object-fit: cover; }
.lbx-audio-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lbx-audio-card-body audio { width: 100%; }
.lbx-audio-title  { font-size: clamp(.9rem, 1.5vw, 1.1rem); font-weight: 700; opacity: .9; }
.lbx-audio-artist { font-size: .72rem; letter-spacing: .12em; opacity: .45; text-transform: uppercase; }

/* tpl-03 Ambient */
.lbx-audio-tpl-03 {
  position: relative;
  min-height: 40vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 0;
}
.lbx-audio-ambient-bg {
  position: absolute;
  inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: .35;
  filter: blur(4px) saturate(.5);
}
.lbx-audio-ambient-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(28px, 5vw, 56px);
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,.75), transparent);
}
.lbx-audio-ambient-body audio { width: 100%; max-width: 480px; }
.lbx-audio-ambient-body .lbx-audio-title {
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 700;
}

/* ── Einleitung Templates ────────────────────────────────────── */

.lbx-einleitung { padding: clamp(32px, 5vw, 64px) clamp(24px, 8vw, 120px); }

/* tpl-02 Ornament: ornament above text */
.lbx-einleitung-tpl-02 {
  text-align: center;
}
.lbx-einleitung-tpl-02::before {
  content: '✦ ✦ ✦';
  display: block;
  font-size: .75rem;
  letter-spacing: .3em;
  opacity: .25;
  margin-bottom: 1.5em;
}

/* tpl-03 Groß: larger lead text */
.lbx-einleitung-tpl-03 p,
.lbx-einleitung-tpl-03 .lbx-einleitung-body {
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  line-height: 1.65;
  opacity: .85;
}

/* tpl-04 Rahmen: subtle border frame */
.lbx-einleitung-tpl-04 {
  border: 1px solid rgba(255,255,255,.1);
  margin: 0 clamp(16px, 4vw, 64px);
  padding: clamp(24px, 4vw, 56px) clamp(24px, 5vw, 72px);
}

/* ── Fließtext Templates ─────────────────────────────────────── */

.lbx-fliesstext { padding: clamp(16px, 3vw, 32px) clamp(24px, 8vw, 120px); }

/* tpl-02 Breit: wider column, slightly larger font */
.lbx-fliesstext-tpl-02 {
  padding-left: clamp(16px, 4vw, 48px);
  padding-right: clamp(16px, 4vw, 48px);
  max-width: 100%;
}
.lbx-fliesstext-tpl-02 p,
.lbx-fliesstext-tpl-02 .lbx-fliesstext-body {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* tpl-03 Zwei-Spalten: two-column layout */
.lbx-fliesstext-tpl-03 .lbx-fliesstext-body {
  column-count: 2;
  column-gap: clamp(24px, 4vw, 56px);
}
@media (max-width: 600px) {
  .lbx-fliesstext-tpl-03 .lbx-fliesstext-body { column-count: 1; }
}

/* tpl-04 Eingerückt: book-style indented paragraphs */
.lbx-fliesstext-tpl-04 {
  padding-left: clamp(32px, 8vw, 120px);
  padding-right: clamp(32px, 8vw, 120px);
  border-left: 2px solid rgba(255,255,255,.07);
  margin-left: clamp(16px, 4vw, 64px);
}
.lbx-fliesstext-tpl-04 p + p { text-indent: 1.8em; }

/* ── Heading Templates ───────────────────────────────────────── */

.lbx-heading { padding: clamp(8px, 2vw, 20px) clamp(24px, 8vw, 120px); }

/* tpl-02 Unterlinie: decorative rule below */
.lbx-heading-tpl-02 h3,
.lbx-heading-tpl-02 h4 {
  padding-bottom: .5em;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

/* tpl-03 Gesperrt: uppercase spaced */
.lbx-heading-tpl-03 h3,
.lbx-heading-tpl-03 h4 {
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: clamp(.8rem, 1.4vw, 1rem);
  opacity: .55;
  font-weight: 600;
}

/* tpl-04 Akzent: colored left accent bar */
.lbx-heading-tpl-04 {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lbx-heading-tpl-04::before {
  content: '';
  display: block;
  width: 3px;
  height: 1.4em;
  background: var(--nx-accent, #c08040);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── Schlusswort Templates ───────────────────────────────────── */

.lbx-schlusswort { padding: clamp(40px, 6vw, 80px) clamp(24px, 8vw, 120px); }

/* tpl-02 Zentriert: centered text + ornament divider */
.lbx-schlusswort-tpl-02 {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
}
.lbx-schlusswort-tpl-02 .lbx-schlusswort-sig::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: rgba(192,128,64,.5);
  margin: .6em auto;
}

/* tpl-03 Signatur: right-aligned signature block */
.lbx-schlusswort-tpl-03 {
  text-align: right;
}
.lbx-schlusswort-tpl-03 .lbx-schlusswort-body {
  opacity: .65;
  font-size: .92em;
}
.lbx-schlusswort-tpl-03 .lbx-schlusswort-sig {
  font-style: italic;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  margin-top: .6em;
  opacity: .8;
}

/* ── Lore Footer Templates ───────────────────────────────────── */

/* tpl-02 Pfeile: minimal arrow navigation */
.lbx-footer-tpl-02 { padding: clamp(16px, 3vw, 32px) clamp(24px, 6vw, 80px); }
.lbx-foot-min {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 20px);
  text-decoration: none;
  color: inherit;
  opacity: .55;
  transition: opacity .2s;
}
.lbx-foot-min:hover { opacity: 1; }
.lbx-foot-arrow {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1;
}
.lbx-foot-min-label {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.lbx-footer-tpl-02 {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,.1);
}
.lbx-foot-min--right {
  flex-direction: row-reverse;
}

/* ═══════════════════════════════════════════════════════════════════
   SZENE — Scroll-Pin Dialog/Effekt Block
   90% dark overlay, großer linksbündiger Text, scroll-gesteuert
   Übergangstypen: weich | blitz | explosion
═══════════════════════════════════════════════════════════════════ */

/* ── Szene-Gruppe: sticky wrapper ──────────────────────────────── */
.lbx-szene-group {
  position: relative;
}

/* Sticky pin container — wird per JS aktiviert */
.lbx-szene-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* Jede Szene belegt 100vh Scroll-Raum */
.lbx-szene-spacer {
  height: 100vh;
  pointer-events: none;
}

/* Szene selbst: absolut über dem Pin */
.lbx-szene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: none; /* Übergang per JS/Klasse */
  z-index: 1;
}

.lbx-szene.lbx-szene--active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Hintergrund ─────────────────────────────────────────────── */
.lbx-szene-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

/* 90% dark overlay */
.lbx-szene-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .90);
  z-index: 1;
}

/* ── Text ────────────────────────────────────────────────────── */
.lbx-szene-content {
  position: relative;
  z-index: 2;
  padding: 0 8vw;
  max-width: 72%;
}

.lbx-szene-speaker {
  font-size: clamp(.45rem, .75vw, .65rem);
  font-weight: 700;
  letter-spacing: .5em;
  text-transform: uppercase;
  color: var(--o, #ff6b00);
  margin-bottom: clamp(14px, 2.5vh, 28px);
  display: block;
}

.lbx-szene-text {
  font-size: clamp(1.8rem, 4vw, 4.2rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.15;
  color: #fff;
  letter-spacing: .01em;
  hyphens: auto;
}

.lbx-szene-text em {
  font-weight: 700;
  font-style: normal;
  color: var(--o, #ff6b00);
}

/* ── ÜBERGANG: weich ─────────────────────────────────────────── */
.lbx-szene--trans-weich.lbx-szene--entering {
  animation: szene-fade-in .7s ease forwards;
}
.lbx-szene--trans-weich.lbx-szene--leaving {
  animation: szene-fade-out .5s ease forwards;
}

@keyframes szene-fade-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes szene-fade-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-12px); }
}

/* ── ÜBERGANG: blitz (Kampf / Streit) ───────────────────────── */
.lbx-szene--trans-blitz.lbx-szene--entering {
  animation: szene-blitz-in .35s steps(3) forwards;
}
.lbx-szene--trans-blitz.lbx-szene--leaving {
  animation: szene-blitz-out .25s steps(2) forwards;
}

@keyframes szene-blitz-in {
  0%   { opacity: 0; filter: brightness(4) saturate(0); }
  33%  { opacity: 1; filter: brightness(2.5) saturate(.3); }
  66%  { opacity: 1; filter: brightness(1.5) saturate(.7); }
  100% { opacity: 1; filter: brightness(1) saturate(1); }
}
@keyframes szene-blitz-out {
  0%   { opacity: 1; filter: brightness(1); }
  50%  { opacity: 1; filter: brightness(5) saturate(0); }
  100% { opacity: 0; filter: brightness(3) saturate(0); }
}

/* Flash-Overlay für blitz */
.lbx-szene-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
}
.lbx-szene--trans-blitz.lbx-szene--entering .lbx-szene-flash {
  animation: flash-burst .35s ease-out forwards;
}
@keyframes flash-burst {
  0%   { opacity: 1; }
  30%  { opacity: .6; }
  100% { opacity: 0; }
}

/* ── ÜBERGANG: explosion (Comic-Stil) ───────────────────────── */
.lbx-szene--trans-explosion.lbx-szene--entering {
  animation: szene-boom-in .5s cubic-bezier(.17,.67,.35,1.4) forwards;
}
.lbx-szene--trans-explosion.lbx-szene--leaving {
  animation: szene-boom-out .3s ease-in forwards;
}

@keyframes szene-boom-in {
  0%   { opacity: 0; transform: scale(.6) rotate(-3deg); filter: saturate(3) brightness(1.8); }
  60%  { opacity: 1; transform: scale(1.05) rotate(.5deg); filter: saturate(1.5) brightness(1.2); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); filter: saturate(1) brightness(1); }
}
@keyframes szene-boom-out {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.3); filter: brightness(2); }
}

/* Comic-Burst Strahlen */
.lbx-szene-burst {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: repeating-conic-gradient(
    rgba(255,107,0,.18) 0deg 10deg,
    transparent 10deg 20deg
  );
  transform-origin: center;
}
.lbx-szene--trans-explosion.lbx-szene--entering .lbx-szene-burst {
  animation: burst-rays .5s ease-out forwards;
}
@keyframes burst-rays {
  0%   { opacity: .9; transform: scale(.5) rotate(0deg); }
  50%  { opacity: .5; transform: scale(1.2) rotate(18deg); }
  100% { opacity: 0; transform: scale(1.8) rotate(36deg); }
}

/* ── Builder-Canvas Preview ──────────────────────────────────── */
.lbx-szene-preview {
  background: #0a0a0a;
  border: 2px dashed rgba(255,107,0,.4);
  padding: 28px 32px;
  min-height: 120px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lbx-szene-preview-speaker {
  font-size: .55rem;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--o, #ff6b00);
}
.lbx-szene-preview-text {
  font-size: clamp(.9rem, 1.5vw, 1.4rem);
  font-weight: 300;
  font-style: italic;
  color: #fff;
  line-height: 1.3;
}
.lbx-szene-preview-badge {
  position: absolute;
  top: 8px; right: 8px;
  font-size: .48rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  font-weight: 700;
}
.lbx-szene-preview-badge--weich     { background: rgba(255,255,255,.12); color: rgba(255,255,255,.6); }
.lbx-szene-preview-badge--blitz     { background: rgba(255,255,255,.9);  color: #000; }
.lbx-szene-preview-badge--explosion { background: var(--o, #ff6b00);     color: #fff; }

.lbx-szene-preview-bg-hint {
  font-size: .55rem;
  color: rgba(255,255,255,.25);
  letter-spacing: .1em;
}
