/* Optional: schöne Schreibschrift (Google Font) */
@import url("https://fonts.googleapis.com/css2?family=Literata:wght@400;600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Cormorant:wght@400;600&display=swap");

:root{
  --bg: #0b0f14;
  --panel: #101826;
  --panel2:#0e1622;
  --text: #e8eef7;
  --muted:#a9b4c4;
  --line: rgba(232,238,247,.14);
  --accent:#78b7ff;
  --accent2:#9ff0c6;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 16px;
  --border: #444;
  --card-bg: rgba(255,255,255,0.94);
  --field-bg: rgba(255,255,255,0.12);
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background:
    radial-gradient(circle at 20% 20%, rgba(120,183,255,.14), transparent 28%),
    radial-gradient(circle at 80% 30%, rgba(159,240,198,.10), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(30,60,120,0.12), transparent 35%),
    linear-gradient(180deg, #08111d 0%, #050b14 55%, #03070d 100%);
  background-attachment: fixed;
  color:var(--text);
  line-height:1.5;
}
    


a{ color:inherit; text-decoration:none; }

h1, h2, h3{
  font-family: "Cormorant", Georgia, serif;
  margin: 0 0 10px 0;
}
h1{ font-size: 42px; }
h2{ font-size: 36px; }
h3{
  font-size: 24px;
  color: var(--muted);
  margin-top: 14px;
}

.wrap{
  max-width: 1100px;
  padding: 18px 18px 70px;
  margin: 0 auto;
}

.meta{
  opacity: .75;
  font-size: 13px;
  font-family: "Cormorant", Georgia, serif;
}

/* Top navigation */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11,15,20,.72);
  border-bottom: 1px solid rgba(232,238,247,.10);
}

.topbar-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.brand{
  display:flex;
  align-items:baseline;
  gap:1px;
  font-weight: 800;
  letter-spacing:.08em;
  text-transform: uppercase;
  font-size: 14px;
}

.brand small{
  font-weight:600;
  letter-spacing:0;
  text-transform:none;
  color: var(--muted);
  font-size: 12px;
}

.nav{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}

.nav a{
  font-size: 13px;
  color: var(--muted);
  border: 1px solid rgba(232,238,247,.12);
  background: rgba(0,0,0,.14);
  padding: 7px 10px;
  border-radius: 999px;
  transition: transform .12s ease, border-color .12s ease, background .12s ease, color .12s ease;
}

.nav a:hover{
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(120,183,255,.35);
  background: rgba(120,183,255,.10);
}

.nav a.primary{
  color: rgba(232,238,247,.95);
  border-color: rgba(120,183,255,.35);
  background: rgba(120,183,255,.12);
}

/* Hero */
.hero{
  margin-top: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16,24,38,.95), rgba(14,22,34,.92));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 18px;
  position: relative;
  overflow:hidden;
}

.hero:before{
  content:"";
  position:absolute;
  inset:-120px -140px auto auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at 30% 30%, rgba(120,183,255,.25), transparent 60%);
  transform: rotate(12deg);
  pointer-events:none;
}

.kicker{
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin:0 0 8px;
}

h1{
  font-size: clamp(26px, 3.2vw, 42px);
  margin: 0 0 10px;
}

.lead{
  margin:0;
  color: var(--muted);
  max-width: 80ch;
}

/* Allgemeine Chips */
.chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}

.chip{
  border: 1px solid var(--line);
  background: rgba(0,0,0,.18);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
}

/* Grid tiles */
.tiles{
  margin-top: 18px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 820px){
  .tiles{ grid-template-columns: 1.2fr 1fr; gap: 16px; }
}

.tile{
  border: 1px solid rgba(232,238,247,.12);
  background: linear-gradient(180deg, rgba(14,22,34,.92), rgba(12,18,28,.92));
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  padding: 16px;
  overflow:hidden;
  position:relative;
  animation: fadeUp .45s ease both;
}

@keyframes fadeUp{
  from{ opacity:0; transform: translateY(8px); }
  to{ opacity:1; transform: translateY(0); }
}

.tile-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tile h2{
  margin:0;
  font-size: 30px;
  line-height: 1.25;
}

.tile p{
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  max-width: 85ch;
}

/* Preview */
.preview{
  width:100%;
  height:170px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-top: 10px;
  border: 1px solid rgba(232,238,247,.14);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(120,183,255,.16), rgba(159,240,198,.10)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.05), rgba(255,255,255,.05) 2px, transparent 2px, transparent 7px);
  color: rgba(232,238,247,.75);
  font-weight:700;
  letter-spacing:.06em;
  text-transform: uppercase;
  font-size: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.preview-webcam{ aspect-ratio: 2 / 1; }
.preview-air{ aspect-ratio: 3 / 1; }

.preview img{
  width:100%;
  height:100%;
  object-fit:cover;
  filter:brightness(0.82);
}

.tile:hover .preview{
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,.35);
}

.actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-top: 10px;
}

.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(232,238,247,.14);
  background: rgba(0,0,0,.18);
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(120,183,255,.35);
  background: rgba(120,183,255,.10);
}

.btn.secondary:hover{
  border-color: rgba(159,240,198,.30);
  background: rgba(159,240,198,.10);
}

button.btn{
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(232,238,247,.14);
  background: rgba(0,0,0,.18);
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.tagline{
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}

/* Coverstrip */
.coverstrip{
  display:flex;
  justify-content:center;
  align-items:flex-end;
  gap:18px;
  padding:20px 10px;
  position:relative;
}

.coverstrip img{
  height:160px;
  border-radius:8px;
  box-shadow:0 14px 30px rgba(0,0,0,.45);
  transition:transform .25s ease, box-shadow .25s ease;
}

.coverstrip img:nth-child(odd){ transform:rotate(-1.2deg); }
.coverstrip img:nth-child(even){ transform:rotate(1.2deg); }

.coverstrip img:hover{
  transform:translateY(-8px) scale(1.03) rotate(0deg);
  box-shadow:0 24px 40px rgba(0,0,0,.6);
  z-index:5;
}

.coverstrip::before{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(circle at center, rgba(120,183,255,.08), transparent 70%);
  pointer-events:none;
}

.tile-image{
  width:100%;
  aspect-ratio: 2 / 1;
  overflow:hidden;
  border-radius:12px;
}

.tile-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Wide tile row */
.row{
  margin-top: 14px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 820px){
  .row{ grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
}

/* Footer note */
footer{
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  padding: 0 2px;
}

code{ color: rgba(232,238,247,.85); }

/* Forms */
input, select, textarea{
  width: 100%;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--field-bg);
  font-family: "Literata", Georgia, serif;
  font-size: 14px;
  line-height: 1.5;
  outline: none;
  color: white;
}

input:focus, select:focus, textarea:focus{
  border-color: #b8b8b8;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

textarea{
  min-height: 180px;
  resize: vertical;
}

/* Checkboxen / Radios */
input[type="checkbox"],
input[type="radio"]{
  width: auto;
  padding: 0;
}

fieldset > div{
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

fieldset label{
  display: block;
}

/* Utility */
.hidden{ display:none; }

.link-default{
  font-family: "Cormorant", Georgia, serif;
  color: white;
  text-decoration: none;
  cursor: pointer;
}

.link-default:hover{
  text-decoration: underline;
  color: white;
}

.chapter-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.chapter-item{
  margin:0;
  padding:0;
}

.chapter-card{
  display:grid;
  align-items:center;
  gap:12px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.10);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02)),
    linear-gradient(135deg, rgba(40,60,100,0.18), rgba(10,15,30,0.18));
  text-decoration:none;
  color:inherit;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
    margin:0;
    grid-template-columns:42px 1fr 20px;
  padding:8px 14px;
  min-height:64px;
}

.chapter-card:hover{
  border-color:rgba(255,255,255,0.18);
  box-shadow:0 8px 18px rgba(0,0,0,0.18);
  transform:translateX(2px);
  color:rgba(255,255,255,0.45);
}

.chapter-number{
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.08);
  color:#f3f4f6;
  font-weight:700;
  flex-shrink:0;
  width:42px;
  height:42px;
  font-size:15px;
}

.chapter-content{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;
}

.chapter-title{
font-size:14px;
  font-weight:650;
  line-height:1.2;
  color:#f8fafc;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  min-width:0;
}

.chapter-meta{
  display:flex;
  flex-wrap:nowrap;
  gap:4px;
  overflow:hidden;
}

.status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.07);
  background:rgba(255,255,255,0.025);
  color:rgba(255,255,255,0.34);
  white-space:nowrap;
  font-size:9px;
  padding:2px 6px;
}

.status.done{
  color:#9ee6b0;
  border-color:rgba(34,197,94,0.24);
  background:rgba(34,197,94,0.09);
}

.chapter-arrow{
  font-size:16px;
  color:rgba(255,255,255,0.26);
  transition:transform 0.18s ease, color 0.18s ease;
}
/* AI Overlay */
#aiOverlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.aiBox{
  background: #1c1c1c;
  color: #fff;
  padding: 25px 30px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
  font-family: system-ui, Arial;
}

.aiLogo{
  width: 80px;
  margin-bottom: 12px;
}

.aiText{
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
}

.aiSpinner{
  width: 36px;
  height: 36px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top: 4px solid #fff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto;
}

@keyframes spin{
  to { transform: rotate(360deg); }
}

.link-style{
  background: none;
  border: none;
  padding: 0;
  color: gray;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  font-size: 14px;
  font-family: "Cormorant", Georgia, serif;
}

.link-style:hover{
  text-decoration: underline;
}

.err{
  background: rgba(255, 0, 0, 0.06);
  border: 1px solid rgba(255, 0, 0, 0.18);
  padding: 10px;
  border-radius: 10px;
}

.ok{
  background: rgba(0, 160, 60, 0.08);
  border: 1px solid rgba(0, 160, 60, 0.20);
  padding: 10px;
  border-radius: 10px;
}

/* AGB Card */
.card.agb{
  line-height: 1.6;
  font-size: 15px;
  max-width: 850px;
}

.card.agb h3{ margin-bottom: 20px; }

.card.agb h4{
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 16px;
}

.card.agb p{ margin: 6px 0; }

.card.agb ul{ margin: 8px 0 12px 20px; }

/* ============================================================
   Globale Werkstatt-Komponenten
   ============================================================ */

.panel{
  border: 1px solid rgba(232,238,247,.12);
  background: linear-gradient(180deg, rgba(14,22,34,.92), rgba(12,18,28,.92));
  border-radius: 18px;
  padding: 14px;
}

.sidebar .title{
  font-family: "Cormorant", Georgia, serif;
  font-weight: 900;
  font-size: 22px;
  margin: 2px 0 2px;
  color: rgba(232,238,247,.92);
}

.sidebar .sub{
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 10px;
}

.navlist{
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.navitem{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(232,238,247,.10);
  background: rgba(0,0,0,.10);
  color: rgba(232,238,247,.88);
  cursor: pointer;
}

.navitem:hover{
  border-color: rgba(120,183,255,.35);
}

.navitem.active{
  border-color: rgba(159,240,198,.35);
  background: rgba(159,240,198,.08);
}

.pill{
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(232,238,247,.12);
  color: var(--muted);
  white-space: nowrap;
}

.toprow{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.workspace-title{
  font-family: "Cormorant", Georgia, serif;
  font-weight: 900;
  font-size: 26px;
  margin: 0;
  color: rgba(232,238,247,.92);
}

.banner{
  border: 1px solid rgba(232,238,247,.12);
  background:
    radial-gradient(900px 300px at 20% 20%, rgba(120,183,255,.18), transparent 60%),
    radial-gradient(900px 300px at 80% 20%, rgba(159,240,198,.14), transparent 60%),
    rgba(0,0,0,.12);
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 12px;
  display:flex;
  flex-wrap: wrap;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}

.banner strong{ color: rgba(232,238,247,.92); }

.banner .meta{
  color: var(--muted);
  font-size: 13px;
}

.grid2{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 980px){
  .grid2{ grid-template-columns: 1fr 360px; }
}

.list{
  display:grid;
  gap: 8px;
}

.list button{
  width: 100%;
  text-align: left;
  border-radius: 14px;
  padding: 10px 10px;
  border: 1px solid rgba(232,238,247,.10);
  background: rgba(0,0,0,.10);
  color: rgba(232,238,247,.88);
  cursor: pointer;
}

.list button:hover{
  border-color: rgba(120,183,255,.35);
}

.list button.active{
  border-color: rgba(159,240,198,.35);
  background: rgba(159,240,198,.08);
}

.small{
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.editor{
  min-height: 260px;
  border-radius: 16px;
  border: 1px solid rgba(232,238,247,.12);
  background: rgba(0,0,0,.10);
  padding: 12px;
}

.editor h3{
  margin: 0 0 8px;
  color: rgba(232,238,247,.92);
  font-family: "Cormorant", Georgia, serif;
  font-size: 20px;
}

.editor p,
.editor li{
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.editor ul{
  margin: 10px 0 0;
  padding-left: 18px;
}

.kibox{
  border-radius: 16px;
  border: 1px solid rgba(232,238,247,.12);
  background: rgba(0,0,0,.10);
  padding: 12px;
}

.kibox h3{
  margin: 0 0 8px;
  color: rgba(232,238,247,.92);
  font-family: "Cormorant", Georgia, serif;
  font-size: 20px;
}

.kibox .row{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.kibox .btn{
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 14px;
}

.kiout{
  border-radius: 14px;
  border: 1px solid rgba(232,238,247,.10);
  background: rgba(0,0,0,.12);
  padding: 10px;
  min-height: 140px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.kiout .typing{ opacity: .9; }

.lock{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(232,238,247,.12);
  background: rgba(0,0,0,.08);
  color: var(--muted);
}

.credits{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.credit-chip{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(159,240,198,.30);
  background: rgba(159,240,198,.10);
  color: rgba(232,238,247,.92);
  font-weight: 800;
  font-size: 13px;
}

.credit-chip small{
  color: var(--muted);
  font-weight: 700;
}

.hint{
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.table{
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(232,238,247,.12);
  background: rgba(0,0,0,.08);
}

.table th,
.table td{
  padding: 10px;
  border-bottom: 1px solid rgba(232,238,247,.08);
  color: var(--muted);
  font-size: 14px;
  text-align: left;
  vertical-align: top;
}

.table th{
  color: rgba(232,238,247,.92);
  font-weight: 900;
  font-family: "Cormorant", Georgia, serif;
}

.table tr:last-child td{
  border-bottom: none;
}

.navitem1{
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
}

.pill1{
  font-size: 11px;
}

/* ============================================================
   Gemeinsames Werkstatt-Layout
   ============================================================ */

.p-chapter .app,
.p-chapters .app,
.p-characters .app,
.p-dashboard .app,
.p-start .app,
.p-storybible .app,
.p-style .app,
.p-workshop .app{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding-top: 24px;
}

@media (min-width: 980px){
  .p-chapter .app,
  .p-chapters .app,
  .p-characters .app,
  .p-dashboard .app,
  .p-start .app,
  .p-storybible .app,
  .p-style .app,
  .p-workshop .app{
    grid-template-columns: 240px 1fr;
    align-items: start;
  }
}

/* ===========================
   Page: chapter
   =========================== */

@media (min-width:980px){
  .p-chapter .sidebar{
    grid-column:1;
    grid-row:1;
  }

  .p-chapter section[aria-label="Weitere Bereiche"]{
    grid-column:1;
    grid-row:2;
  }

  .p-chapter section[aria-label="Arbeitsbereich"]{
    grid-column:2;
    grid-row:1 / span 2;
  }
}

/* ===========================
   Page: export-manuskript
   =========================== */

.p-export-manuskript .manu-wrap{
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px;
}

.p-export-manuskript .manu-top{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:18px;
}

.p-export-manuskript .manu-title{
  font-family:"Cormorant", Georgia, serif;
  font-weight:900;
  font-size:34px;
  margin:0;
  color: rgba(232,238,247,.92);
}

.p-export-manuskript .manu-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.p-export-manuskript .manu-actions a,
.p-export-manuskript .manu-actions button{
  text-decoration:none;
}

.p-export-manuskript .manu-paper{
  border: 1px solid rgba(232,238,247,.12);
  background: rgba(0,0,0,.10);
  border-radius: 18px;
  padding: 18px 18px;
}

.p-export-manuskript .chapter{
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(232,238,247,.10);
  break-inside: avoid;
}

.p-export-manuskript .chapter:first-child{
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.p-export-manuskript .chapter h2{
  margin: 0 0 10px;
  font-family:"Cormorant", Georgia, serif;
  font-weight: 900;
  font-size: 24px;
  color: rgba(232,238,247,.92);
}

.p-export-manuskript .chapter p{
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

@media print{
  body.p-export-manuskript{
    background:#fff !important;
  }

  body.p-export-manuskript .topbar,
  body.p-export-manuskript .manu-actions{
    display:none !important;
  }

  body.p-export-manuskript .manu-paper{
    border:none;
    background:transparent;
    padding:0;
  }

  body.p-export-manuskript .chapter{
    page-break-before: always;
    border:none;
    padding-top:0;
    margin-top:0;
  }

  body.p-export-manuskript .chapter:first-child{
    page-break-before:auto;
  }

  body.p-export-manuskript .chapter h2{ color:#000; }
  body.p-export-manuskript .chapter p{ color:#000; }
}

/* ===========================
   Page: index
   =========================== */

.p-index .hero-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
}

@media (min-width: 920px){
  .p-index .hero-grid{ grid-template-columns: 1.15fr .85fr; }
}

.p-index .hero-card{
  border: 1px solid rgba(232,238,247,.12);
  background: linear-gradient(180deg, rgba(0,0,0,.16), rgba(0,0,0,.08));
  border-radius: 18px;
  padding: 16px;
}

.p-index .hero-card h3{ margin: 0 0 10px; }

.p-index .hero-card ul{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
}

.p-index .hero-card li{ margin: 8px 0; }

.p-index .section-title{
  margin: 18px 2px 10px;
  color: rgba(232,238,247,.92);
}

.p-index .steps{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 12px;
}

@media (min-width: 920px){
  .p-index .steps{ grid-template-columns: 1fr 1fr 1fr; }
}

.p-index .step{
  border: 1px solid rgba(232,238,247,.12);
  background: rgba(0,0,0,.14);
  border-radius: 16px;
  padding: 14px;
}

.p-index .step .num{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 800;
  letter-spacing: .02em;
  border: 1px solid rgba(120,183,255,.35);
  background: rgba(120,183,255,.10);
  margin-bottom: 10px;
}

.p-index .step h3{
  margin: 0 0 6px;
  color: rgba(232,238,247,.92);
}

.p-index .step p{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.p-index .pricing{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 12px;
}

@media (min-width: 920px){
  .p-index .pricing{ grid-template-columns: 1fr 1fr 1fr; }
}

.p-index .price{
  border: 1px solid rgba(232,238,247,.12);
  background: linear-gradient(180deg, rgba(14,22,34,.92), rgba(12,18,28,.92));
  border-radius: 18px;
  padding: 16px;
  position: relative;
  overflow:hidden;
}

.p-index .price.featured{
  border-color: rgba(159,240,198,.30);
  box-shadow: 0 14px 36px rgba(0,0,0,.35);
  transform: translateY(-2px);
}

.p-index .price .badge-top{
  position:absolute;
  top: 12px;
  right: 12px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(159,240,198,.30);
  background: rgba(159,240,198,.10);
  color: rgba(232,238,247,.92);
}

.p-index .price h3{ margin: 0 0 6px; }

.p-index .price .p{
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.p-index .price .amount{
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -.02em;
  margin: 6px 0 10px;
}

.p-index .price .amount small{
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
}

.p-index .price ul{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
}

.p-index .price li{ margin: 8px 0; }

.p-index .price .actions{ margin-top: 12px; }

.p-index .faq{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 10px;
}

@media (min-width: 920px){
  .p-index .faq{ grid-template-columns: 1fr 1fr; }
}

.p-index details{
  border: 1px solid rgba(232,238,247,.12);
  background: rgba(0,0,0,.14);
  border-radius: 16px;
  padding: 12px 14px;
}

.p-index details summary{
  cursor: pointer;
  font-weight: 800;
  font-family: "Cormorant", Georgia, serif;
  font-size: 18px;
  color: rgba(232,238,247,.92);
  list-style: none;
}

.p-index details summary::-webkit-details-marker{ display:none; }

.p-index details p{
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.p-index .cta{
  margin-top: 16px;
  border: 1px solid rgba(232,238,247,.12);
  background:
    radial-gradient(900px 300px at 20% 20%, rgba(120,183,255,.18), transparent 60%),
    radial-gradient(900px 300px at 80% 20%, rgba(159,240,198,.14), transparent 60%),
    rgba(0,0,0,.12);
  border-radius: 18px;
  padding: 16px;
  display:flex;
  flex-direction: column;
  gap: 10px;
  align-items:flex-start;
  justify-content: space-between;
}

@media (min-width: 920px){
  .p-index .cta{ flex-direction: row; align-items:center; }
}

.p-index .cta p{
  margin: 0;
  color: var(--muted);
  max-width: 80ch;
}

.p-index .muted-note{
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

.p-index .mark{
  width: 54px;
  height: 54px;
  border-radius: 18px;
  border: 1px solid rgba(232,238,247,.12);
  background: linear-gradient(135deg, rgba(120,183,255,.18), rgba(159,240,198,.12));
  display:flex;
  align-items:center;
  justify-content:center;
  font-family: "Cormorant", Georgia, serif;
  font-weight: 900;
  letter-spacing: .04em;
}

.p-index section{ scroll-margin-top: 90px; }

.p-index .hover-container{
  position: relative;
  display: inline-block;
}

.p-index .hover-box{
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 200px;
  background-color: rgba(14, 22, 34, 0.95);
  border: 1px solid rgba(232, 238, 247, 0.2);
  color: white;
  padding: 10px;
  border-radius: 8px;
  z-index: 9999;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.p-index .hover-container:hover .hover-box{
  display: block;
  z-index: 10000;
}

.p-index .tile{
  overflow: visible !important;
}

/* Literary Hero */
.p-index .hero.hero-literary{
  min-height: 86vh;
  display: flex;
  align-items: center;
  padding: 64px 0 40px;
  border: 1px solid rgba(232,238,247,.10);
  border-radius: 22px;
  background:
    radial-gradient(900px 420px at 18% 22%, rgba(120,183,255,.14), transparent 62%),
    radial-gradient(900px 420px at 82% 28%, rgba(159,240,198,.10), transparent 62%),
    linear-gradient(180deg, rgba(0,0,0,.22), rgba(0,0,0,.10));
}

.p-index .hero.hero-literary .hero-inner{
  width: 100%;
  padding: 0 18px;
}

.p-index .hero.hero-literary .hero-copy{
  max-width: 78ch;
  margin: 0 auto;
  text-align: center;
}

.p-index .hero-title{
  margin: 0 0 22px;
  font-family: "Cormorant", Georgia, serif;
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1.0;
  font-size: clamp(40px, 6vw, 74px);
}

.p-index .hero-quote{
  margin: 0 auto 16px;
  font-family: "Cormorant", Georgia, serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.35;
  color: rgba(232,238,247,.92);
}

.p-index .hero-break{
  margin: 10px 0 14px;
  font-family: "Cormorant", Georgia, serif;
  letter-spacing: .28em;
  color: rgba(232,238,247,.60);
}

.p-index .hero-line{
  margin: 0 auto 26px;
  color: rgba(232,238,247,.72);
  font-size: 15px;
}

.p-index .hero-actions{
  margin-top: 8px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.p-index .hero-cta{
  border-color: rgba(159,240,198,.30) !important;
  background: rgba(159,240,198,.10) !important;
}

@media (max-width: 520px){
  .p-index .hero.hero-literary{
    min-height: 78vh;
    padding: 46px 0 30px;
  }
}

/* ===========================
   Page: workshop
   =========================== */

.p-workshop .forge{ position:relative; }
.p-workshop .forge-bg{ width:100%; display:block; border-radius:18px; }

.p-workshop .forge::after{
  content:"";
  position:absolute;
  top:20px;
  right:20px;
  width:40px;
  height:40px;
  background-image:url("ki-gehirn.png");
  background-size:contain;
  background-repeat:no-repeat;
  opacity:0.4;
  pointer-events:none;
}

.p-workshop .forge:hover::after{ opacity:0.3; }

.p-workshop .toolring{
  position:absolute;
  inset:0;
  pointer-events:none;
}

.p-workshop .orbit{
  pointer-events:none;
  width: min(86%, 760px);
  aspect-ratio: 1 / 1;
  position: relative;
  transform: translate(7%, -10%);
}

.p-workshop .tool{
  pointer-events:auto;
  position:absolute;
  top:50%;
  left:50%;
  --count: 8;
  --radius: 200px;
  --angle: calc((360deg / var(--count)) * var(--i) - 90deg);
  transform:
    translate(-50%, -50%)
    rotate(var(--angle))
    translateX(var(--radius))
    rotate(calc(-1 * var(--angle)));
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:#e6e1d3;
  font-family:"Cormorant Upright", serif;
  font-size:20px;
  padding:6px 10px;
  border-radius:999px;
  border: none;
  background: none;
  outline: none;
}

.p-workshop .tool:hover{
  border: 1px solid rgba(255,120,40,0.35);
  border-radius: 20px;
  background: rgba(0,0,0,0.25);
}

.p-workshop .dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:#ff6a00;
  box-shadow: 0 0 6px #ff6a00, 0 0 12px #ff4500, 0 0 20px #ff0000;
  position:relative;
  --spark: 0;
}

.p-workshop .dot::before,
.p-workshop .dot::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:4px;
  height:4px;
  border-radius:50%;
  transform: translate(-50%, -50%);
  opacity:0;
  filter: blur(.2px);
}

.p-workshop .tool:hover .dot{
  box-shadow: 0 0 10px #ff9a00, 0 0 20px #ff6a00, 0 0 30px #ff0000;
  transform: scale(1.25);
}

@keyframes spark1{
  0%{ opacity:0; transform:translate(-50%,-50%) scale(.8); }
  10%{ opacity:1; }
  100%{ opacity:0; transform:translate(calc(-50% + 24px), calc(-50% - 18px)) scale(.2); }
}

@keyframes spark2{
  0%{ opacity:0; transform:translate(-50%,-50%) scale(.8); }
  10%{ opacity:1; }
  100%{ opacity:0; transform:translate(calc(-50% - 18px), calc(-50% + 22px)) scale(.2); }
}

@keyframes spark3{
  0%{ transform: scale(1); }
  50%{ transform: scale(1.4); }
  100%{ transform: scale(1); }
}

.p-workshop .tool:hover .dot::before{
  background:#ffd08a;
  animation: spark1 .45s ease-out 1;
}

.p-workshop .tool:hover .dot::after{
  background:#ff9a00;
  animation: spark2 .5s ease-out 1;
}

.p-workshop .tool:hover .dot{
  animation: spark3 .35s ease-out 1;
}

/* Hintbox */
.p-workshop .hintbox{
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,120,40,.18);
  border-radius:16px;
  padding:12px 14px;
  color:#e6e1d3;
}

.p-workshop .hintbox > summary{
  cursor:pointer;
  list-style:none;
  display:flex;
  align-items:baseline;
  gap:12px;
  font-family:"Cormorant Upright", serif;
  font-size:22px;
}

.p-workshop .hintbox > summary::-webkit-details-marker{ display:none; }

.p-workshop .hintbox .sub{
  opacity:.75;
  font-size:16px;
  font-family: inherit;
}

.p-workshop .hintinner{
  margin-top:12px;
  display:grid;
  gap:10px;
}

.p-workshop textarea#hint{
  width:100%;
  border-radius:14px;
  border:1px solid rgba(255,120,40,.18);
  background: rgba(10,10,12,.55);
  color:#e6e1d3;
  padding:12px;
  font-size:16px;
  outline:none;
}

.p-workshop textarea#hint:focus{
  border-color: rgba(255,120,40,.45);
  box-shadow: 0 0 0 3px rgba(255,120,40,.12);
}

/* Workshop-Chips überschreiben bewusst die globalen Chips */
.p-workshop .chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.p-workshop .chip{
  border-radius:999px;
  border:1px solid rgba(255,120,40,.18);
  background: rgba(0,0,0,.25);
  color:#e6e1d3;
  padding:6px 10px;
  cursor:pointer;
  font-family:"Cormorant Upright", serif;
}

.p-workshop .chip:hover{
  border-color: rgba(255,120,40,.45);
}

/* Knob */
.p-workshop .knobwrap{
  display:flex;
  align-items:center;
  gap:14px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(255,120,40,.18);
  background: rgba(0,0,0,.22);
  color:#e6e1d3;
}

.p-workshop .knob{
  width:54px;
  height:54px;
  border-radius:50%;
  background:
    conic-gradient(from 220deg,
      rgba(255,120,40,.9) calc(var(--p)*1%),
      rgba(255,120,40,.12) 0);
  position:relative;
  box-shadow: 0 0 18px rgba(255,120,40,.12);
}

.p-workshop .knobcap{
  position:absolute;
  inset:8px;
  border-radius:50%;
  background: rgba(10,10,12,.75);
  border:1px solid rgba(255,120,40,.16);
}

.p-workshop .knob::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:2px;
  height:18px;
  background: rgba(255,210,150,.9);
  transform-origin: bottom center;
  transform: translate(-50%,-100%) rotate(calc(-130deg + (260deg * (var(--p)/100))));
  border-radius:2px;
  box-shadow: 0 0 10px rgba(255,120,40,.35);
}

.p-workshop .range{ width:160px; }

.p-workshop .knoblabel .title{
  font-family:"Cormorant Upright", serif;
  font-size:20px;
}

.p-workshop .knoblabel .value{
  opacity:.85;
  font-size:15px;
}

/* Amboss */
.p-workshop .amboss{
  font-family: 'Cormorant Upright', Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #f0f0f0;
  padding: 20px;
  width: 100%;
}