/* Auftritts-App – Kauz-Look: Weiß, Himbeer, Schwarz, American Typewriter */
:root {
  --himbeer: #B3204D;
  --himbeer-dunkel: #8A1838;
  --rosa: #F7F0F3;
  --linie: #F0E2E8;
  --schwarz: #111111;
  --grau: #6B6B6B;
  --weiss: #FFFFFF;
  --schrift: 'American Typewriter', 'Courier New', serif;
  --oben: env(safe-area-inset-top, 0px);
  --unten: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--weiss);
  color: var(--schwarz);
  font-family: var(--schrift);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font-family: inherit; color: inherit; }
a { color: var(--himbeer); }

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.screen { flex: 1; display: flex; flex-direction: column; min-height: 100dvh; }
.kopf { flex: none; padding: calc(var(--oben) + 12px) 20px 10px; display: flex; flex-direction: column; gap: 10px; background: var(--weiss); }
.inhalt { flex: 1; padding: 6px 20px 24px; display: flex; flex-direction: column; gap: 18px; }
.fuss { flex: none; padding: 12px 20px calc(var(--unten) + 20px); background: var(--weiss); border-top: 1px solid var(--linie); position: sticky; bottom: 0; }
.fuss.zwei { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fuss.ohne-linie { border-top: 0; }

.zurueck { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 16px; text-decoration: none; align-self: flex-start; }

/* Phasen-Leiste */
.phasen { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 6px; }
.phasen a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px; border-radius: 10px; background: var(--rosa); color: var(--schwarz); font-size: 13px; text-decoration: none; }
.phasen a[aria-current] { background: var(--himbeer); color: var(--weiss); font-weight: 700; }
.phasen img { width: 24px; height: 24px; }

/* Typo */
.ueber { margin: 0; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grau); }
h1 { margin: 0; font-size: 28px; line-height: 1.1; font-weight: 700; }
.titelzeile { display: flex; align-items: center; gap: 12px; }
.titelzeile img { width: 64px; height: 64px; flex: none; }
.titelzeile div { display: flex; flex-direction: column; gap: 2px; }
.feldtitel { margin: 0; font-size: 17px; font-weight: 700; }
.hinweis { margin: 0; font-size: 15px; color: var(--grau); line-height: 1.35; }
.zeile { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.gruppe { display: flex; flex-direction: column; gap: 8px; }

/* Knöpfe */
.knopf { display: flex; align-items: center; justify-content: center; width: 100%; height: 56px; border: 2px solid var(--himbeer); border-radius: 16px; background: var(--himbeer); color: var(--weiss); font-size: 19px; font-weight: 700; text-decoration: none; cursor: pointer; }
.knopf:active { background: var(--himbeer-dunkel); border-color: var(--himbeer-dunkel); }
.knopf.hell { background: var(--weiss); color: var(--himbeer); font-weight: 400; }
.knopf[disabled] { opacity: 0.45; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 44px; padding: 0 12px; border: 2px solid var(--linie); border-radius: 22px; background: var(--weiss); font-size: 16px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--himbeer); border-color: var(--himbeer); color: var(--weiss); }

.karte-wahl { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 60px; padding: 10px 16px; border: 2px solid var(--linie); border-radius: 14px; background: var(--weiss); text-align: left; cursor: pointer; }
.karte-wahl[aria-pressed="true"] { border-color: var(--himbeer); background: var(--rosa); }
.karte-wahl b { font-size: 19px; }
.karte-wahl span { font-size: 15px; color: var(--grau); }

.zeiten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.zeit { min-height: 52px; padding: 0 6px; border: 2px solid var(--linie); border-radius: 14px; background: var(--weiss); font-size: 17px; cursor: pointer; }
.zeit[aria-pressed="true"] { background: var(--himbeer); border-color: var(--himbeer); color: var(--weiss); }

.segmente { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: var(--rosa); }
.segmente button { min-height: 42px; border: 0; border-radius: 9px; background: transparent; font-size: 15px; cursor: pointer; }
.segmente button[aria-pressed="true"] { background: var(--weiss); font-weight: 700; }

fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grau); display: flex; align-items: center; gap: 8px; }
legend img { width: 30px; height: 30px; }

/* Eingaben – 16px+ damit iOS nicht zoomt */
.eingabe { width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--linie); border-radius: 12px; background: var(--weiss); font-size: 17px; line-height: 1.35; }
.eingabe:focus { outline: none; border-color: var(--himbeer); }
textarea.eingabe { resize: none; }
.punkt { display: flex; align-items: center; gap: 10px; }
.punkt span { flex: none; width: 22px; font-size: 22px; font-weight: 700; color: var(--himbeer); }
.punkt input { flex: 1; min-width: 0; }

.eigene { display: flex; gap: 8px; align-items: center; }
.eigene input { flex: 1; min-width: 0; }
.eigene .chip { flex: none; min-height: 48px; }

.kasten {display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--rosa); }
.kasten .ueber { color: var(--himbeer); }
.kasten p { margin: 0; font-size: 17px; line-height: 1.35; }

/* Start */
.packpapier { width: 100%; height: 70px; object-fit: cover; object-position: top; display: block; }
.start-kopf { display: flex; align-items: center; gap: 14px; padding: 4px 24px 0; }
.start-kopf img { width: 108px; height: 100px; object-fit: contain; }
.start-kopf h1 { font-size: 30px; }
.start-inhalt { display: flex; flex-direction: column; gap: 22px; padding: 18px 24px 0; }
.start-fuss { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 22px; padding: 24px 24px calc(var(--unten) + 20px); font-size: 16px; }
.start-fuss a, .start-fuss button { min-height: 44px; display: inline-flex; align-items: center; }
.textknopf { border: 0; background: none; padding: 0; font-size: 16px; color: var(--grau); text-decoration: underline; cursor: pointer; }
.klein { font-size: 14px; color: var(--grau); }

/* Spickzettel */
.spick { display: flex; flex-direction: column; gap: 16px; }
.spick .leit { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 700; color: var(--himbeer); }
.spick .rollen { margin: -10px 0 0; font-size: 18px; color: var(--grau); }
.spick .block { display: flex; flex-direction: column; gap: 4px; }
.spick .block span:first-child { font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grau); }
.spick .wort { font-size: 28px; line-height: 1.2; }
.spick ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.spick li { display: flex; align-items: baseline; gap: 14px; }
.spick li b { font-size: 34px; color: var(--himbeer); }
.leer { padding: 18px; border: 2px dashed var(--linie); border-radius: 14px; font-size: 17px; line-height: 1.4; color: var(--grau); }
.warnung { padding: 12px 14px; border-radius: 12px; background: #FDF3E6; font-size: 15px; line-height: 1.4; }

/* Vollbild-Spickzettel */
.vollbild { position: fixed; inset: 0; z-index: 50; background: var(--weiss); overflow-y: auto; padding: calc(var(--oben) + 20px) 24px calc(var(--unten) + 24px); display: flex; flex-direction: column; gap: 3vh; }
.vollbild[hidden] { display: none; }
.vollbild .schliessen { position: fixed; top: calc(var(--oben) + 10px); right: 12px; width: 48px; height: 48px; border: 2px solid var(--linie); border-radius: 24px; background: var(--weiss); font-size: 26px; line-height: 1; cursor: pointer; }
.vollbild .gross { margin: 0; font-size: clamp(26px, 7.5vw, 60px); line-height: 1.15; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.vollbild .gross.himbeer { color: var(--himbeer); }
.vollbild .mittel { margin: 0; font-size: clamp(22px, 6vw, 40px); color: var(--grau); text-transform: uppercase; }
.vollbild .gross b { color: var(--himbeer); margin-right: 0.4em; }

/* Setup */
.fortschritt-zeile { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 4px; }
.fortschritt-zeile h1 { display: flex; align-items: center; gap: 10px; font-size: 30px; }
.fortschritt-zeile h1 img { width: 44px; height: 44px; }
.fortschritt-zeile p { margin: 0; font-size: 16px; color: var(--grau); }
.fortschritt-zeile p b { font-size: 26px; color: var(--himbeer); }
.balken { height: 8px; border-radius: 4px; background: var(--linie); overflow: hidden; }
.balken div { height: 8px; border-radius: 4px; background: var(--himbeer); transition: width 0.25s; }
.check-gruppe { display: flex; flex-direction: column; gap: 8px; }
.check-gruppe h2 { margin: 0; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grau); font-weight: 400; }
.check { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 10px 14px; border: 0; border-radius: 14px; background: var(--rosa); font-size: 17px; line-height: 1.3; text-align: left; cursor: pointer; }
.check i { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--himbeer); background: var(--weiss); color: var(--weiss); display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 17px; font-weight: 700; }
.check[aria-pressed="true"] { background: var(--weiss); color: var(--grau); }
.check[aria-pressed="true"] i { background: var(--himbeer); }

/* Ritual */
.ritual { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 10px 24px 0; text-align: center; }
.uhrwerk { display: flex; align-items: center; justify-content: center; gap: 18px; }
.uhrwerk div { display: flex; flex-direction: column; align-items: flex-start; }
.sek { font-size: 72px; line-height: 1; font-weight: 700; color: var(--himbeer); font-variant-numeric: tabular-nums; }
.ritual h1 { font-size: 30px; line-height: 1.15; }
.ritual .text { margin: 0; font-size: 19px; line-height: 1.35; max-width: 320px; }
.ritual .extra { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--rosa); font-size: 16px; line-height: 1.4; font-style: italic; white-space: pre-line; }
/* Akku lädt sich auf: graue Batterie, darüber die farbige, von unten freigelegt */
.akku { position: relative; width: 96px; height: 96px; flex: none; }
.akku img { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: multiply; }
.akku .leer { filter: grayscale(1); opacity: 0.3; }
.akku .geladen { transition: clip-path 1s linear; }
.akku.a-voll { width: 150px; height: 150px; animation: hupf 0.9s ease-out 2; }
@keyframes hupf { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.12) rotate(-4deg); } 70% { transform: scale(0.97) rotate(2deg); } }

/* Strichzeichnungen je Ritual-Schritt */
.bild { width: 200px; height: 160px; flex: none; fill: none; stroke: var(--schwarz); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.bild * { transform-box: fill-box; transform-origin: center; }
.bild .hb { fill: var(--himbeer); fill-opacity: 0.25; }
.bild .hb-linie { stroke: var(--himbeer); }
.bild .hb-flaeche { fill: var(--himbeer); fill-opacity: 0.15; stroke-width: 0; }
.bild .atem { fill: var(--himbeer); fill-opacity: 0.15; stroke: var(--himbeer); }
.bild .voll-schwarz { fill: var(--schwarz); stroke: none; }
.bild text { fill: var(--himbeer); stroke: none; font-family: var(--schrift); font-size: 18px; text-anchor: middle; }
.a-neigen { transform-origin: 50% 100%; animation: neigen 3s ease-in-out infinite; }
.a-schultern { animation: heben 1.5s ease-in-out infinite; }
.a-kreisen { animation: kreisen 2s linear infinite; }
.a-gross { transform-origin: 50% 100%; animation: gross 2.4s ease-in-out infinite; }
.a-wachsen { animation: wachsen 2.4s ease-in-out infinite; }
.a-welle { opacity: 0; animation: welle 1.2s ease-out infinite; }
.a-note { opacity: 0; animation: note 3s ease-out infinite; }
.a-atmen { animation: atmen 8s ease-in-out infinite; }
.a-ein { animation: ein 8s infinite; }
.a-aus { opacity: 0; animation: aus 8s infinite; }
.a-sprech { animation: sprech 2.4s ease-in-out infinite; }
.a-herz { animation: herz 1.2s ease-in-out infinite; }
.a-schreiben { stroke-dasharray: 100; stroke-dashoffset: 100; animation: schreiben 3s ease-out infinite; }
.pep-p { fill: var(--himbeer); fill-opacity: 0.2; stroke: none; transition: fill-opacity 0.3s; }
.pep-p.aktiv { fill-opacity: 1; animation: klopf 0.45s ease-in-out infinite; }
.pep-name { margin: -6px 0 0; font-size: 22px; font-weight: 700; color: var(--himbeer); }
@keyframes neigen { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
@keyframes heben { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes kreisen { to { transform: rotate(360deg); } }
@keyframes gross { 0%, 100% { transform: scale(0.92); } 50% { transform: scale(1.05); } }
@keyframes wachsen { 0%, 100% { transform: scale(0.8); opacity: 0.5; } 50% { transform: scale(1.05); opacity: 1; } }
@keyframes welle { 0% { opacity: 0; transform: translateX(-6px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateX(6px); } }
@keyframes note { 0% { opacity: 0; transform: translateY(10px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-50px) rotate(10deg); } }
@keyframes atmen { 0%, 100% { transform: scale(0.7); } 50% { transform: scale(1.5); } }
@keyframes ein { 0%, 45% { opacity: 1; } 50%, 95% { opacity: 0; } 100% { opacity: 1; } }
@keyframes aus { 0%, 45% { opacity: 0; } 50%, 95% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sprech { 0%, 100% { transform: scale(0.9); opacity: 0.6; } 50% { transform: scale(1); opacity: 1; } }
@keyframes herz { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.3); } }
@keyframes schreiben { 0% { stroke-dashoffset: 100; } 50%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes klopf { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.6); } }

.punkte { display: flex; gap: 8px; margin-top: auto; margin-bottom: 4px; }
.punkte span { width: 10px; height: 10px; border-radius: 5px; background: var(--linie); }
.punkte span.an { background: var(--himbeer); }

/* Live */
.live-satz { margin: 0; font-size: 32px; line-height: 1.2; font-weight: 700; color: var(--himbeer); }
.live-label { display: flex; align-items: center; gap: 10px; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grau); }
.live-label img { width: 40px; height: 40px; }
.tipps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tipps li { display: flex; gap: 12px; font-size: 21px; line-height: 1.3; }
.tipps li::before { content: '→'; color: var(--himbeer); font-weight: 700; }
.zitat { margin: auto 0 0; padding: 16px; border-radius: 14px; background: var(--rosa); display: flex; align-items: center; gap: 12px; }
.zitat img { width: 64px; height: 64px; flex: none; }
.zitat span { display: flex; flex-direction: column; gap: 4px; font-size: 19px; line-height: 1.3; }
.zitat small { font-size: 14px; color: var(--grau); }

/* Spickkarten */
.karte { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--rosa); }
.karte b { font-size: 19px; }
.karte span { font-size: 16px; line-height: 1.35; color: #444444; }

@media (prefers-reduced-motion: reduce) {
  .balken div, .akku .geladen { transition: none; }
  .bild *, .akku.a-voll { animation: none !important; opacity: 1; }
  .bild .a-aus { opacity: 0; }
}
