/* Runde 3: Film, Scroll-Szene, Merksätze, Suche. Gleiche Tokens wie styles.css */

/* ---------- Suche-Knopf in der Topbar ---------- */
.such-knopf { display: inline-flex; align-items: center; gap: 8px; background: #EDEDEA; border: 0; border-radius: 999px; padding: 9px 12px 9px 14px; font: inherit; font-size: 14px; font-weight: 650; color: var(--grau); cursor: pointer; transition: background .2s, color .2s; }
.such-knopf:hover { background: #E4E4E0; color: var(--tusche); }
.such-knopf svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.such-knopf kbd, .such-dialog kbd { font-family: var(--mono); font-size: 11px; background: var(--weiss); border: 1px solid var(--linie); border-radius: 5px; padding: 1px 6px; color: var(--grau); }

/* ---------- FILM ---------- */
.film-sek { padding-top: 110px; }
.film-kopf { display: grid; grid-template-columns: 1fr .8fr; gap: 40px; align-items: end; margin-bottom: 40px; }
.film { border-radius: 22px; overflow: hidden; background: #0B0C0E; border: 1px solid var(--tusche-linie); box-shadow: 0 40px 90px -40px rgba(0,0,0,.8); }
.film:fullscreen { border-radius: 0; display: flex; flex-direction: column; justify-content: center; }
.film-bild { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background-color: #0E0F12; background-image: var(--raster-dunkel); container-type: inline-size; }
.film:fullscreen .film-bild { flex: 1; aspect-ratio: auto; }
.szene { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s .6s; padding: 6cqw; }
.szene.an { opacity: 1; visibility: visible; transition: opacity .6s ease; }
.s-titel { font-size: 4.6cqw; font-weight: 850; color: var(--weiss); letter-spacing: -0.03em; line-height: 1.08; position: relative; z-index: 2; }
.s-titel.klein { font-size: 3.6cqw; }
.s-titel .rot { color: #E8325A; }
.s-unter { font-family: var(--mono); font-size: 1.35cqw; letter-spacing: .14em; text-transform: uppercase; color: #8D8F96; margin-top: 2cqw; position: relative; z-index: 2; }
.szene .s-titel, .szene .s-unter { opacity: 0; transform: translateY(2cqw); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.szene.an .s-titel { opacity: 1; transform: none; transition-delay: .5s; }
.szene.an .s-unter { opacity: 1; transform: none; transition-delay: 1.1s; }

/* Szene 1 */
.s1-jahr { font-size: 22cqw; font-weight: 850; letter-spacing: -0.06em; line-height: .8; color: transparent; -webkit-text-stroke: 2px #3A3C43; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.9); opacity: 0; transition: transform 6s linear, opacity 1s; }
.szene.an .s1-jahr { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
.s1-zeile { font-size: 4.4cqw; font-weight: 800; color: var(--weiss); letter-spacing: -0.02em; position: relative; z-index: 2; min-height: 1.2em; }
.cursor { display: inline-block; width: .08em; height: .95em; background: var(--rot); vertical-align: -0.1em; margin-left: .08em; animation: blinken 1s steps(1) infinite; }
@keyframes blinken { 50% { opacity: 0; } }

/* Szene 2: Chaos */
.s2-chaos { position: absolute; inset: 0; }
.s2-chaos span { position: absolute; font-family: var(--mono); font-size: 1.25cqw; color: #C9CACE; border: 1px solid #3A3C43; background: #16171B; border-radius: 999px; padding: .5cqw 1.1cqw; white-space: nowrap; opacity: 0; transition: opacity .5s; }
.szene.an .s2-chaos span { opacity: .85; animation: zittern 2.4s ease-in-out infinite alternate; }
.s2-chaos span.warn { border-color: var(--rot); color: #FF8FA6; }
@keyframes zittern { 0% { translate: 0 0; rotate: -3deg; } 50% { translate: 1.4cqw -1cqw; rotate: 2deg; } 100% { translate: -1cqw 1.2cqw; rotate: -1deg; } }

/* Szene 3: Inventar */
.s3-tabelle { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8cqw; width: 64cqw; margin-bottom: 3.5cqw; }
.s3-tabelle div { display: flex; justify-content: space-between; align-items: center; gap: 1cqw; font-family: var(--mono); font-size: 1.15cqw; color: #D5D6DA; background: #16171B; border: 1px solid #2E3036; border-radius: .8cqw; padding: 1cqw 1.2cqw; opacity: 0; transform: translateY(2cqw) scale(.96); transition: opacity .5s, transform .6s cubic-bezier(.2,.7,.2,1); text-align: left; }
.s3-tabelle div b { font-weight: 700; color: var(--weiss); }
.s3-tabelle div i { font-style: normal; font-size: .95cqw; padding: .2cqw .7cqw; border-radius: 999px; background: #2A2C32; color: #A9ABB1; }
.s3-tabelle div i.hoch { background: rgba(192,20,60,.25); color: #FF8FA6; }
.s3-tabelle div i.ok { background: rgba(0,103,127,.35); color: #8FD3E3; }
.szene.an .s3-tabelle div { opacity: 1; transform: none; }

/* Szene 4: Spur */
.s4-spur { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); width: 70cqw; margin-bottom: 5cqw; }
.s4-spur i { position: absolute; left: 4cqw; right: 4cqw; top: 50%; height: .35cqw; background: var(--rot); transform: scaleX(0); transform-origin: left; transition: transform 3s cubic-bezier(.4,0,.2,1) .3s; }
.szene.an .s4-spur i { transform: scaleX(1); }
.s4-spur span { position: relative; z-index: 1; width: 7cqw; height: 7cqw; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; font-family: var(--mono); font-size: 2cqw; font-weight: 700; color: #6B6D74; background: #0E0F12; border: .3cqw solid #3A3C43; transition: all .4s; }
.szene.an .s4-spur span { color: var(--weiss); background: var(--rot); border-color: var(--rot); }
.szene.an .s4-spur span:nth-of-type(1) { transition-delay: .3s; } .szene.an .s4-spur span:nth-of-type(2) { transition-delay: .9s; }
.szene.an .s4-spur span:nth-of-type(3) { transition-delay: 1.5s; } .szene.an .s4-spur span:nth-of-type(4) { transition-delay: 2.1s; }
.szene.an .s4-spur span:nth-of-type(5) { transition-delay: 2.7s; } .szene.an .s4-spur span:nth-of-type(6) { transition-delay: 3.3s; background: var(--petrol); border-color: var(--petrol); }

/* Szene 5: drei Kreise */
.s5-kreise { position: relative; width: 46cqw; height: 26cqw; margin-bottom: 3cqw; }
.s5-kreise .k { position: absolute; width: 21cqw; height: 21cqw; border-radius: 50%; border: .3cqw solid; display: grid; place-content: center; text-align: center; font-weight: 850; font-size: 2.1cqw; color: var(--weiss); transition: transform 1.4s cubic-bezier(.2,.7,.2,1), opacity .8s; opacity: 0; }
.s5-kreise .k small { display: block; font-family: var(--mono); font-weight: 400; font-size: 1cqw; color: #A9ABB1; letter-spacing: .08em; margin-top: .4cqw; }
.s5-kreise .k1 { border-color: var(--rot); left: 12.5cqw; top: 0; transform: translate(0, -8cqw); }
.s5-kreise .k2 { border-color: var(--petrol-hell); left: 2cqw; top: 6cqw; transform: translate(-10cqw, 4cqw); }
.s5-kreise .k3 { border-color: var(--orange); left: 23cqw; top: 6cqw; transform: translate(10cqw, 4cqw); }
.szene.an .s5-kreise .k { opacity: 1; transform: none; }
.s5-kreise .k1 { background: rgba(192,20,60,.12); } .s5-kreise .k2 { background: rgba(95,179,199,.1); } .s5-kreise .k3 { background: rgba(239,130,0,.1); }

/* Szene 6: Siegel */
.s6-siegel { width: 16cqw; margin-bottom: 2.5cqw; }
.s6-siegel svg { width: 100%; overflow: visible; }
.s6-siegel circle, .s6-siegel path { fill: none; stroke: var(--petrol-hell); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 600; stroke-dashoffset: 600; transition: stroke-dashoffset 1.6s ease; }
.s6-siegel circle:nth-child(2) { stroke-width: 2; stroke-dasharray: 4 6; stroke-dashoffset: 0; opacity: 0; transition: opacity 1s 1s; }
.s6-siegel path { stroke: var(--weiss); stroke-width: 8; transition-delay: 1s; }
.szene.an .s6-siegel circle, .szene.an .s6-siegel path { stroke-dashoffset: 0; }
.szene.an .s6-siegel circle:nth-child(2) { opacity: 1; }
.s6-siegel { transform: scale(1.4); opacity: 0; transition: transform .7s cubic-bezier(.3,1.6,.5,1), opacity .4s; }
.szene.an .s6-siegel { transform: none; opacity: 1; }
.szene.an .s6-nach { transition-delay: 2.6s !important; color: var(--weiss); }

/* Szene 7: Buch */
.szene[data-szene="6"] { grid-template-columns: auto auto; gap: 6cqw; text-align: left; justify-content: center; }
.s7-buch { width: 22cqw; aspect-ratio: 2 / 3; background: var(--weiss); border-radius: .4cqw 1.2cqw 1.2cqw .4cqw; padding: 2.4cqw 2cqw 2cqw 3.2cqw; position: relative; display: flex; flex-direction: column; box-shadow: 2cqw 2cqw 0 #000; transform: perspective(1200px) rotateY(-25deg) translateX(-10cqw); opacity: 0; transition: transform 1.4s cubic-bezier(.2,.7,.2,1), opacity .8s; }
.s7-buch::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1.2cqw; background: var(--rot); border-radius: .4cqw 0 0 .4cqw; }
.s7-buch b { font-family: var(--mono); font-size: 1cqw; letter-spacing: .3em; color: var(--grau); }
.s7-buch strong { font-size: 6.4cqw; font-weight: 850; color: var(--rot); letter-spacing: -0.05em; line-height: 1; margin-top: 1cqw; }
.s7-buch em { font-style: normal; font-weight: 850; font-size: 2cqw; color: var(--tusche); }
.s7-buch span { margin-top: auto; font-weight: 800; font-size: 1.3cqw; color: var(--tusche); }
.szene.an .s7-buch { opacity: 1; transform: perspective(1200px) rotateY(-12deg); }
.s7-text .s-titel { font-size: 4.4cqw; }

/* Startknopf */
.film-start { position: absolute; inset: 0; z-index: 5; border: 0; background: rgba(11,12,14,.55); display: grid; place-content: center; justify-items: center; gap: 18px; cursor: pointer; color: var(--weiss); font: inherit; transition: opacity .4s, visibility 0s .4s; }
.film-start .kreis { width: 96px; height: 96px; border-radius: 50%; background: var(--rot); display: grid; place-items: center; box-shadow: 0 0 0 0 rgba(192,20,60,.6); animation: pulsieren 2.2s infinite; transition: transform .25s; }
.film-start:hover .kreis { transform: scale(1.08); }
.film-start svg { width: 36px; height: 36px; fill: var(--weiss); margin-left: 5px; }
.film-start-text { font-family: var(--mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
@keyframes pulsieren { 70% { box-shadow: 0 0 0 26px rgba(192,20,60,0); } 100% { box-shadow: 0 0 0 0 rgba(192,20,60,0); } }
.film.laeuft .film-start, .film.gestartet .film-start { opacity: 0; visibility: hidden; }

/* Leiste */
.film-leiste { display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: #0B0C0E; border-top: 1px solid var(--tusche-linie); }
.film-knopf { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #3A3C43; background: transparent; display: grid; place-items: center; cursor: pointer; flex: none; transition: background .2s; }
.film-knopf:hover { background: #1E2024; }
.film-knopf svg { width: 16px; height: 16px; fill: var(--weiss); stroke: none; }
#filmVoll svg { fill: none; stroke: var(--weiss); stroke-width: 2; }
.film-knopf .i-pause { display: none; }
.film.laeuft .film-knopf .i-pause { display: block; }
.film.laeuft .film-knopf .i-play { display: none; }
.film-zeit { font-family: var(--mono); font-size: 12px; color: #A9ABB1; width: 40px; flex: none; font-variant-numeric: tabular-nums; }
.film-spur { flex: 1; height: 22px; position: relative; cursor: pointer; display: flex; align-items: center; }
.film-spur::before { content: ""; position: absolute; left: 0; right: 0; height: 4px; background: #2A2C32; border-radius: 4px; }
.film-fortschritt { position: absolute; left: 0; height: 4px; width: 0; background: var(--rot); border-radius: 4px; }
.film-fortschritt::after { content: ""; position: absolute; right: -6px; top: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--weiss); }
.film-marke { position: absolute; top: 50%; width: 2px; height: 10px; margin-top: -5px; background: #55575E; }
.film-szenenname { font-family: var(--mono); font-size: 12px; color: #D5D6DA; letter-spacing: .06em; min-width: 210px; text-align: right; }

/* ---------- Scroll-Szene „Vom Chaos zur Struktur“ ---------- */
.ordnung { height: 260vh; position: relative; background: var(--papier); }
.ordnung-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; background-image: var(--raster); }
.ordnung canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ordnung-text { position: absolute; left: 0; right: 0; bottom: 9vh; text-align: center; pointer-events: none; }
.ordnung-wort { font-size: clamp(36px, 6vw, 80px); font-weight: 850; letter-spacing: -0.045em; line-height: 1; position: absolute; left: 0; right: 0; bottom: 30px; transition: opacity .4s, transform .4s; }
.chaos-wort { color: var(--grau); }
.struktur-wort { color: var(--rot); opacity: 0; transform: translateY(20px); }
.ordnung.fertig .chaos-wort { opacity: 0; transform: translateY(-20px); }
.ordnung.fertig .struktur-wort { opacity: 1; transform: none; }
.ordnung-hinweis { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--grau); transition: opacity .3s; }
.ordnung-mass { position: absolute; top: 96px; right: 28px; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--grau); background: var(--weiss); border: 1px solid var(--linie); border-radius: 999px; padding: 6px 12px; }
.ordnung-mass span { color: var(--rot); font-weight: 700; }

/* ---------- Merksätze ---------- */
.merk-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.merk-steuerung { display: flex; align-items: center; gap: 18px; margin-top: 30px; }
.runde { width: 54px; height: 54px; border-radius: 50%; border: 1.5px solid var(--tusche); background: transparent; font-size: 20px; cursor: pointer; color: var(--tusche); transition: background .2s, color .2s; }
.runde:hover { background: var(--tusche); color: var(--weiss); }
.merk-zaehler { font-family: var(--mono); font-size: 14px; color: var(--grau); letter-spacing: .1em; min-width: 70px; text-align: center; }
.merk-stapel { position: relative; height: 400px; outline: none; touch-action: pan-y; }
.merk-stapel:focus-visible { outline: 3px solid var(--petrol); outline-offset: 8px; border-radius: 24px; }
.merk-karte { position: absolute; inset: 0; border-radius: 24px; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; background: var(--weiss); border: 1px solid var(--linie); box-shadow: 0 30px 60px -36px rgba(20,21,24,.45); transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .4s; user-select: none; cursor: grab; will-change: transform; }
.merk-karte:active { cursor: grabbing; }
.merk-karte.oben { background: var(--tusche); border-color: var(--tusche); background-image: var(--raster-dunkel); }
.merk-karte .m-nr { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--rot); font-weight: 700; }
.merk-karte.oben .m-nr { color: #FF8FA6; }
.merk-karte .m-satz { font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.2; color: var(--tusche); }
.merk-karte.oben .m-satz { color: var(--weiss); }
.merk-karte .m-quelle { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--grau); letter-spacing: .06em; }
.merk-karte.oben .m-quelle { color: #A9ABB1; }
.merk-karte .m-quelle button { background: none; border: 1px solid currentColor; color: inherit; font: inherit; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.merk-karte .m-quelle button:hover { color: var(--weiss); border-color: var(--rot); background: var(--rot); }

/* ---------- Suche ---------- */
.such-ebene { position: fixed; inset: 0; z-index: 200; background: rgba(20,21,24,.5); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 20px 20px; animation: einblenden .2s ease; }
.such-ebene[hidden] { display: none; }
@keyframes einblenden { from { opacity: 0; } }
.such-dialog { width: 100%; max-width: 640px; background: var(--weiss); border-radius: 18px; box-shadow: 0 40px 100px -30px rgba(0,0,0,.5); overflow: hidden; animation: hochkommen .25s cubic-bezier(.2,.7,.2,1); }
@keyframes hochkommen { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.such-feld { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--linie); }
.such-feld svg { width: 20px; height: 20px; fill: none; stroke: var(--grau); stroke-width: 2.2; stroke-linecap: round; flex: none; }
.such-feld input { flex: 1; border: 0; outline: none; font: inherit; font-size: 18px; color: var(--tusche); background: transparent; }
.such-liste { max-height: 52vh; overflow-y: auto; padding: 8px; }
.such-gruppe { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--grau); padding: 12px 12px 6px; }
.such-treffer { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.such-treffer[aria-selected="true"] { background: var(--rot-hell); }
.such-treffer .t-marke { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--rot); background: #F6F6F4; border-radius: 8px; height: 36px; display: grid; place-items: center; }
.such-treffer[aria-selected="true"] .t-marke { background: var(--weiss); }
.such-treffer .t-titel { font-weight: 700; color: var(--tusche); font-size: 15px; line-height: 1.3; }
.such-treffer .t-text { font-size: 13px; color: var(--grau); line-height: 1.35; }
.such-treffer .t-pfeil { color: var(--grau); font-size: 14px; }
.such-treffer mark { background: transparent; color: var(--rot); }
.such-leer { padding: 28px 16px; text-align: center; color: var(--grau); }
.such-fuss { display: flex; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--linie); font-size: 12px; color: var(--grau); background: #FAFAF8; flex-wrap: wrap; }
.such-fuss span:last-child { margin-left: auto; }

/* ---------- Responsiv ---------- */
@media (max-width: 1080px) {
  .such-knopf span, .such-knopf kbd { display: none; }
  .such-knopf { padding: 10px; }
}
@media (max-width: 900px) {
  .film-kopf, .merk-grid { grid-template-columns: 1fr; gap: 20px; }
  .film-szenenname { display: none; }
  .such-knopf { display: inline-flex; margin-left: auto; }
  .topbar .wrap { gap: 12px; }
  .menu-knopf { margin-left: 0; }
  .ordnung { height: 220vh; }
  .merk-stapel { height: 360px; }
  .s-unter { font-size: 2cqw; }
  .s2-chaos span { font-size: 1.8cqw; }
  .s3-tabelle { width: 84cqw; } .s3-tabelle div { font-size: 1.7cqw; } .s3-tabelle div i { display: none; }
}
@media (max-width: 600px) {
  .film-start .kreis { width: 68px; height: 68px; }
  .film-start svg { width: 26px; height: 26px; }
  .film-leiste { gap: 10px; padding: 10px 12px; }
  .merk-karte { padding: 28px; }
  .such-fuss span:not(:last-child) { display: none; }
  .ordnung-mass { top: 84px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ordnung { height: auto; }
  .ordnung-sticky { position: relative; height: 70vh; }
}
.topbar nav a, .marke, .topbar .btn, .such-knopf { white-space: nowrap; }
.topbar .wrap { gap: 18px; }
