/* Kuscheltier-Praxis – Look: warm, rund, freundlich. Für Tablet-Finger gebaut. */
:root {
  --papier: #FFF8EC;
  --papier-2: #FDEFD8;
  --karte: #FFFFFF;
  --tinte: #2B2D42;
  --leise: #6B7080;
  --minze: #1F9E89;
  --minze-hell: #D6F2EC;
  --koralle: #FF7A59;
  --koralle-dunkel: #E85E3D;
  --sonne: #FFC93C;
  --lila: #8E7CC3;
  --rot: #FF4D3D;
  --rand: #EADFCB;
  --schatten: 0 4px 0 rgba(43, 45, 66, .08), 0 10px 24px rgba(43, 45, 66, .08);
  --rund: 22px;
  --schrift: 'Fredoka', 'Nunito', 'Segoe UI Rounded', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font-family: var(--schrift); color: var(--tinte); font-size: 19px; line-height: 1.4;
  background: var(--papier);
  background-image: radial-gradient(circle at 12% 18%, #FFE9C7 0 70px, transparent 71px), radial-gradient(circle at 92% 70%, #E2F5EF 0 120px, transparent 121px);
  background-attachment: fixed;
  user-select: none; -webkit-user-select: none;
}
input { user-select: text; -webkit-user-select: text; }
button { font-family: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.15; font-weight: 700; }
p { margin: 0 0 .6em; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

/* ---------- Kopfleiste ---------- */
.kopf {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: rgba(255, 248, 236, .92);
  backdrop-filter: blur(8px); border-bottom: 2px solid var(--rand);
}
.heim-knopf { width: 52px; height: 52px; border-radius: 16px; border: 0; background: var(--karte); box-shadow: var(--schatten); font-size: 26px; flex: none; }
.kopf-titel { font-weight: 700; font-size: 22px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dran { display: flex; align-items: center; gap: 8px; background: var(--karte); padding: 5px 14px 5px 6px; border-radius: 999px; box-shadow: var(--schatten); animation: rein .4s ease; }
.dran b { display: block; font-size: 17px; line-height: 1.1; }
.dran small { display: block; color: var(--leise); font-size: 14px; }

/* ---------- Grundbausteine ---------- */
.bildschirm { max-width: 1100px; margin: 0 auto; padding: 20px 16px calc(40px + env(safe-area-inset-bottom)); animation: rein .35s ease; }
@keyframes rein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.karte { background: var(--karte); border-radius: var(--rund); box-shadow: var(--schatten); border: 2px solid transparent; }
.leise { color: var(--leise); }
.einleitung { text-align: center; font-size: 20px; margin: 4px 0 18px; }
.abschnitt { margin: 28px 0 12px; font-size: 24px; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 16px; }
.knopfreihe.unten { margin-top: 28px; }

.btn {
  border: 0; border-radius: 18px; padding: 14px 22px; font-size: 19px; font-weight: 600; background: var(--karte);
  box-shadow: 0 5px 0 rgba(43, 45, 66, .18); transition: transform .08s, box-shadow .08s; min-height: 56px;
}
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 rgba(43, 45, 66, .18); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-gross { font-size: 22px; padding: 16px 28px; min-height: 66px; }
.btn-riesig { font-size: 30px; padding: 20px 44px; border-radius: 26px; min-height: 84px; }
.btn-primaer { background: var(--minze); color: #fff; box-shadow: 0 5px 0 #157A69; }
.btn-akzent { background: var(--koralle); color: #fff; box-shadow: 0 5px 0 var(--koralle-dunkel); }
.btn-gelb { background: var(--sonne); box-shadow: 0 5px 0 #D9A41F; }
.btn-leise { background: var(--karte); border: 2px solid var(--rand); }
.btn.gefahr { color: #C0392B; }

.pille { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 8px; border-radius: 999px; font-size: 15px; font-weight: 600; background: color-mix(in srgb, var(--farbe, var(--minze)) 16%, white); border: 2px solid var(--farbe, var(--minze)); white-space: nowrap; }
.pille small { font-weight: 500; color: var(--leise); }
.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: color-mix(in srgb, var(--farbe) 25%, white); border: 3px solid var(--farbe); font-size: 22px; flex: none; }
.avatar.gross { width: 64px; height: 64px; font-size: 36px; }
button.avatar { padding: 0; }

/* Sprechblasen-Szene */
.szene { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px; }
.szene-figur { width: 130px; flex: none; }
.szene.klein .szene-figur { width: 92px; }
.blase { position: relative; flex: 1; background: var(--karte); border-radius: 24px; padding: 16px 56px 16px 20px; box-shadow: var(--schatten); font-size: 21px; font-weight: 500; }
.blase::before { content: ''; position: absolute; left: -14px; top: 50%; margin-top: -12px; border: 12px solid transparent; border-right: 16px solid var(--karte); border-left: 0; }
.blase p { margin: 0; }
.vorlesen { border: 0; background: var(--minze-hell); border-radius: 50%; width: 42px; height: 42px; font-size: 20px; flex: none; }
.blase .vorlesen { position: absolute; right: 10px; top: 50%; margin-top: -21px; }

/* Figuren */
.figur { width: 100%; height: auto; display: block; overflow: visible; }
.figur g { transform-box: view-box; }
.figur.idle .p-root { animation: wippen 3.2s ease-in-out infinite; }
.figur.idle .p-augen { animation: blinzeln 4.5s infinite; }
.figur.jubel .p-root { animation: huepfen .7s ease-in-out infinite; }
.figur.jubel .p-armL { animation: jubelL .7s ease-in-out infinite; }
.figur.jubel .p-armR { animation: jubelR .7s ease-in-out infinite; }
@keyframes wippen { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes blinzeln { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes huepfen { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes jubelL { 0%, 100% { transform: rotate(140deg); } 50% { transform: rotate(165deg); } }
@keyframes jubelR { 0%, 100% { transform: rotate(-140deg); } 50% { transform: rotate(-165deg); } }

/* ---------- Startseite ---------- */
.start-held { text-align: center; padding: 6px 0 10px; }
.start-figuren { display: flex; justify-content: center; align-items: flex-end; gap: 0; max-width: 560px; margin: 0 auto; }
.sf { width: 30%; }
.sf-otter { width: 38%; z-index: 1; }
.sf-grizzly { transform: translateX(14px); }
.sf-elefant { transform: translateX(-14px); }
.start-held h1 { font-size: clamp(40px, 7vw, 64px); color: var(--minze); letter-spacing: -.5px; margin-top: 4px; }
.start-held h1 span { display: block; font-size: .45em; color: var(--koralle); letter-spacing: 3px; text-transform: uppercase; }
.unterzeile { font-size: 22px; color: var(--leise); margin-bottom: 20px; }
.kachel-raster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.kachel {
  position: relative; border: 0; background: var(--karte); border-radius: var(--rund); padding: 20px 10px; font-size: 20px; font-weight: 600;
  box-shadow: 0 6px 0 color-mix(in srgb, var(--k) 45%, white), var(--schatten); border-top: 8px solid var(--k);
}
.kachel span { display: block; font-size: 44px; margin-bottom: 6px; }
.kachel:active { transform: translateY(4px); }
.zahl { position: absolute; top: 10px; right: 14px; background: var(--koralle); color: #fff; font-style: normal; border-radius: 999px; min-width: 32px; padding: 2px 8px; }

/* ---------- Mitspieler ---------- */
.anzahl-wahl { display: flex; justify-content: center; gap: 14px; margin-bottom: 20px; }
.anzahl { width: 96px; height: 96px; border-radius: 24px; border: 3px solid var(--rand); background: var(--karte); font-size: 40px; font-weight: 700; box-shadow: var(--schatten); line-height: 1; }
.anzahl small { display: block; font-size: 14px; font-weight: 500; color: var(--leise); margin-top: 4px; }
.anzahl.an { border-color: var(--koralle); background: #FFEDE7; transform: scale(1.06); }
.spieler-liste { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.spieler-karte { padding: 16px; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; border-color: var(--farbe); }
.name-feld { width: 100%; font: inherit; font-size: 22px; padding: 12px 14px; border: 2px solid var(--rand); border-radius: 14px; background: var(--papier); min-width: 0; }
.name-feld:focus { outline: none; border-color: var(--minze); background: #fff; }
.farben { grid-column: 1 / -1; display: flex; gap: 10px; justify-content: center; }
.farbpunkt { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--rand); }
.farbpunkt.an { box-shadow: 0 0 0 3px var(--tinte); }
.bekannte { margin-top: 22px; }
.bekannte h3 { font-size: 18px; color: var(--leise); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { border: 2px solid var(--farbe); background: var(--karte); border-radius: 999px; padding: 8px 16px; font-size: 18px; font-weight: 600; }

/* ---------- Rollen ---------- */
.rollen-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.rollen-karte { padding: 16px; text-align: center; border-color: var(--farbe); animation: rein .4s ease both; }
.rollen-karte:nth-child(2) { animation-delay: .1s; } .rollen-karte:nth-child(3) { animation-delay: .2s; } .rollen-karte:nth-child(4) { animation-delay: .3s; }
.rk-figur { width: 150px; margin: 0 auto; }
.rk-bild { display: grid; place-items: center; height: 190px; font-size: 90px; }
.rk-text { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: -26px; position: relative; }
.rk-text b { font-size: 24px; }
.rk-rolle { font-size: 20px; font-weight: 700; color: var(--koralle); }
.rk-text small { color: var(--leise); font-size: 16px; }

/* ---------- Patienten ---------- */
.patient-karte { display: flex; align-items: center; gap: 14px; background: var(--karte); border-radius: var(--rund); padding: 10px 16px 10px 10px; box-shadow: var(--schatten); margin-bottom: 14px; }
.patient-karte img, .patient-karte .ohne-foto { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 4px solid var(--sonne); flex: none; }
.ohne-foto { display: grid; place-items: center; font-size: 40px; background: var(--papier-2); border-radius: 50%; }
.patient-karte b { display: block; font-size: 22px; }
.patient-karte small { color: var(--leise); display: block; }
.notfall-schild, .fall-schild { display: inline-block; font-style: normal; font-weight: 600; font-size: 15px; padding: 2px 10px; border-radius: 999px; margin-top: 4px; }
.notfall-schild { background: #FFE3E0; color: #C0392B; }
.fall-schild { background: var(--minze-hell); color: #157A69; }

.warte-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.warte-platz .patient-karte { margin: 0; }
.warte-platz.notfall .patient-karte { border: 3px solid var(--rot); animation: blink-rand 1s infinite; }
@keyframes blink-rand { 50% { border-color: #FFC2BB; } }
.stuhl-leer { font-size: 64px; text-align: center; opacity: .35; padding: 10px; }

/* Aufnahme */
.aufnahme-raster { display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
.foto-feld { display: grid; place-items: center; min-height: 300px; cursor: pointer; border: 4px dashed var(--rand); overflow: hidden; }
.foto-vorschau { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding: 14px; }
.foto-vorschau img { width: 230px; height: 230px; border-radius: 50%; object-fit: cover; border: 6px solid var(--sonne); }
.foto-symbol { font-size: 90px; }
.aufnahme-daten { padding: 18px; }
.feld-titel { display: block; font-weight: 600; margin: 4px 0 8px; }
.name-zeile { display: flex; gap: 10px; margin-bottom: 14px; }
.wuerfel { min-height: 0; font-size: 26px; padding: 6px 14px; }
.tier-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.tier { border: 2px solid var(--rand); background: var(--papier); border-radius: 16px; padding: 8px 4px; font-size: 15px; font-weight: 600; }
.tier span { display: block; font-size: 32px; }
.tier.an { border-color: var(--minze); background: var(--minze-hell); }
.schon-da { margin-top: 16px; padding: 14px 18px; }
.schon-da summary { font-weight: 600; cursor: pointer; }
.akten-mini { display: flex; gap: 10px; overflow-x: auto; padding: 12px 0 4px; }
.akten-mini button { border: 0; background: none; flex: none; width: 84px; text-align: center; font-size: 30px; }
.akten-mini img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; margin: 0 auto; border: 3px solid var(--sonne); }
.akten-mini small { display: block; font-size: 14px; }

/* Akten & Album */
.akten-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.akte-kachel { padding: 14px; text-align: center; border: 0; font: inherit; }
.akte-kachel img, .akte-kachel .ohne-foto { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto 8px; border: 5px solid var(--sonne); font-size: 60px; }
.akte-kachel b { display: block; font-size: 20px; }
.akte-kachel small { color: var(--leise); }
.akte-kopf { display: flex; gap: 20px; align-items: center; padding: 18px; }
.akte-kopf img, .akte-kopf .ohne-foto { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 6px solid var(--sonne); font-size: 80px; flex: none; }
.verlauf { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.verlauf li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.verlauf .vb { font-size: 36px; }
.verlauf small { display: block; color: var(--leise); }
.verlauf li > div { flex: 1; }
.fortschritt { position: relative; height: 34px; background: var(--papier-2); border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.fortschritt i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--sonne), var(--koralle)); border-radius: 999px; }
.fortschritt span { position: relative; display: block; text-align: center; line-height: 34px; font-weight: 700; }
.sticker-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; }
.sticker { aspect-ratio: 1; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #EFE6D6; border: 4px dashed #D9CBB3; color: var(--leise); text-align: center; padding: 8px; }
.sticker span { font-size: 44px; filter: grayscale(1); opacity: .5; }
.sticker small { font-size: 13px; line-height: 1.1; }
.sticker.an { background: #fff; border: 5px solid var(--sonne); color: var(--tinte); box-shadow: var(--schatten); }
.sticker.an span { filter: none; opacity: 1; }
.abzeichen-liste { display: grid; gap: 10px; }
.abz-zeile { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.abz-zeile > div:nth-child(2) { flex: 1; }
.abz-zeile small { display: block; color: var(--leise); }
.abz span { font-size: 30px; filter: grayscale(1); opacity: .25; }
.abz span.an { filter: none; opacity: 1; }

/* ---------- Diagnose ---------- */
.reiter { display: flex; gap: 10px; justify-content: center; margin-bottom: 18px; }
.reiter-knopf { border: 3px solid var(--rand); background: var(--karte); border-radius: 18px; padding: 12px 22px; font-size: 20px; font-weight: 600; }
.reiter-knopf.an { border-color: var(--koralle); background: #FFEDE7; }
.rad-huelle { position: relative; width: min(420px, 90vw); margin: 0 auto; }
.rad { width: 100%; transition: transform 4.2s cubic-bezier(.12, .7, .1, 1); filter: drop-shadow(0 8px 14px rgba(43, 45, 66, .2)); }
.rad-zeiger { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 46px; color: var(--tinte); z-index: 2; text-shadow: 0 3px 0 #fff; }
.koerper-huelle { display: flex; gap: 16px; justify-content: center; align-items: center; }
.koerper-bild { width: min(330px, 70vw); }
.koerper-extra { display: flex; flex-direction: column; gap: 12px; }
.koerper-extra .btn.an { border-color: var(--koralle); background: #FFEDE7; }
.koerperkarte .zone { fill: #E8B98A; stroke: #B07A4A; stroke-width: 3; cursor: pointer; transition: fill .15s; }
.koerperkarte .zone[data-zone="auge"], .koerperkarte .zone[data-zone="nase"] { fill: #4E2C1A; }
.koerperkarte .zone[data-zone="mund"] { fill: #C98A5A; }
.koerperkarte .zone[data-zone="ohr"] { fill: #D9A574; }
.koerperkarte .zone[data-zone="bauch"] { fill: #F3D3AE; }
.koerperkarte .zone.an { fill: var(--koralle); stroke: var(--koralle-dunkel); }
.zonen-liste { margin-top: 16px; text-align: center; }
.fall-wahl { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; text-align: left; }
.fall-knopf { display: flex; align-items: center; gap: 12px; padding: 14px; border: 0; font: inherit; font-size: 19px; font-weight: 600; }
.fall-knopf span { font-size: 36px; }

.krankheitskarte-huelle { perspective: 1200px; max-width: 520px; margin: 10px auto; }
.krankheitskarte { position: relative; transition: transform .8s cubic-bezier(.3, 1.4, .5, 1); transform-style: preserve-3d; min-height: 360px; }
.krankheitskarte.auf { transform: rotateY(180deg); }
.kk-rueck, .kk-vorn { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 28px; }
.kk-rueck { display: grid; place-items: center; font-size: 140px; font-weight: 700; color: #fff; background: repeating-linear-gradient(45deg, var(--minze), var(--minze) 18px, #2BB3A3 18px, #2BB3A3 36px); box-shadow: var(--schatten); }
.kk-vorn { transform: rotateY(180deg); padding: 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; border: 5px solid var(--sonne); }
.kk-bild { font-size: 84px; line-height: 1; }
.kk-vorn h2 { font-size: 34px; margin: 0; }
.schwere { font-weight: 600; padding: 4px 14px; border-radius: 999px; background: var(--papier); }
.patient-blase { margin-top: 8px; background: var(--papier); box-shadow: none; text-align: left; font-style: italic; }
.patient-blase::before { display: none; }

/* ---------- Untersuchung ---------- */
.werkzeug-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.werkzeug { border: 3px solid transparent; padding: 16px 8px; font-size: 18px; font-weight: 600; }
.werkzeug span { display: block; font-size: 52px; }
.werkzeug.benutzt { border-color: var(--minze); background: var(--minze-hell); }
.befund { margin-top: 16px; padding: 20px; text-align: center; font-size: 21px; }
.befund.neu { animation: rein .4s ease; }
.herz { font-size: 90px; animation: herzschlag .85s infinite; }
.herz.schnell { animation-duration: .5s; }
@keyframes herzschlag { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.15); } }
.thermo { display: flex; align-items: center; justify-content: center; gap: 22px; margin-bottom: 10px; }
.thermo-roehre { position: relative; width: 34px; height: 170px; border-radius: 20px; background: #EEF2F5; border: 4px solid #C9D3DB; overflow: hidden; }
.thermo-roehre i { position: absolute; left: 0; right: 0; bottom: 0; height: 10%; background: var(--minze); }
.thermo-zahl { font-size: 52px; font-variant-numeric: tabular-nums; }
.lampe-licht { font-size: 80px; animation: leuchten 1.2s ease-in-out infinite; }
@keyframes leuchten { 50% { filter: drop-shadow(0 0 22px #FFE66D); transform: rotate(-10deg); } }
.roentgen { width: min(360px, 100%); margin: 0 auto 12px; }
.reflex { font-size: 90px; animation: kick .5s ease 2; transform-origin: 50% 0; }
@keyframes kick { 50% { transform: rotate(-35deg); } }

/* ---------- Behandlung ---------- */
.echter-arzt { background: #FFE3E0; border: 3px solid var(--rot); border-radius: var(--rund); padding: 14px 18px; margin-bottom: 16px; }
.echter-arzt b { color: #B3261E; font-size: 20px; }
.echter-arzt p { margin: 6px 0 0; }
.abschnitt-karte { margin-bottom: 16px; }
section.karte.abschnitt-karte { padding: 16px 18px; }
.abschnitt-karte h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 22px; }
.material-liste { display: flex; flex-wrap: wrap; gap: 10px; }
.material { border: 3px solid var(--rand); background: var(--papier); border-radius: 16px; padding: 10px 14px; font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.material span { font-size: 28px; }
.material.an { border-color: var(--minze); background: var(--minze-hell); }
.material.an::after { content: '✓'; color: var(--minze); font-weight: 700; }
.schritte { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: s; }
.schritt { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-align: left; font: inherit; font-size: 20px; border: 3px solid transparent; }
.haken { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--rand); display: grid; place-items: center; color: transparent; font-weight: 700; font-size: 24px; flex: none; transition: all .2s; }
.s-bild { font-size: 38px; flex: none; }
.s-text { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.schritt.fertig { border-color: var(--minze); background: #F2FBF8; }
.schritt.fertig .haken { background: var(--minze); border-color: var(--minze); color: #fff; transform: scale(1.1); }
.schritt.fertig .s-text { text-decoration: line-through; text-decoration-color: rgba(31, 158, 137, .5); }
.wichtig { padding: 16px 20px; border-left: 10px solid var(--sonne); }
.wichtig h3, .gelernt h3, .quiz-frage h2 { display: flex; align-items: center; gap: 10px; }
.wichtig ul { margin: 0; padding-left: 22px; }
.wichtig li { margin-bottom: 4px; }
.wissen { margin-top: 14px; padding: 14px 20px; background: #F3EEFB; }
.wissen summary { font-weight: 600; font-size: 20px; cursor: pointer; }
.wissen p { margin: 10px 0; }

/* ---------- Übungen & Player ---------- */
.uebung-kopf { text-align: center; }
.punkte { display: flex; justify-content: center; gap: 12px; margin-bottom: 8px; }
.punkte span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--papier-2); }
.punkte .jetzt { background: var(--koralle); color: #fff; transform: scale(1.15); }
.punkte .fertig { background: var(--minze); color: #fff; }
.hinweis-band { background: #EAF2FF; border-radius: 14px; padding: 10px 16px; text-align: center; }
.player { padding: 16px; max-width: 640px; margin: 0 auto; }
.player-kopf { display: flex; justify-content: space-between; align-items: center; }
.player-kopf h3 { margin: 0; font-size: 26px; }
.player-zeit { font-size: 22px; font-weight: 700; background: var(--papier); border-radius: 999px; padding: 4px 14px; font-variant-numeric: tabular-nums; }
.player-buehne { position: relative; margin: 12px 0; border-radius: 20px; background: linear-gradient(#DDF3FB, #F4FBF2 70%, #CDEBC0 70.5%); aspect-ratio: 4 / 3; overflow: hidden; }
.player-figur { position: absolute; left: 50%; bottom: 4%; width: 52%; transform: translateX(-50%); }
.player-takt { position: absolute; top: 12px; right: 16px; font-size: 34px; font-weight: 700; color: var(--koralle); text-shadow: 0 3px 0 #fff; }
.player-takt.puls { animation: puls .45s ease; }
@keyframes puls { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
.player-overlay { position: absolute; inset: 0; border: 0; background: rgba(43, 45, 66, .35); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 24px; }
.player-overlay small { font-size: 16px; }
.player-overlay.geschafft { background: rgba(31, 158, 137, .55); }
.play-riesig { display: grid; place-items: center; width: 110px; height: 110px; border-radius: 50%; background: var(--koralle); font-size: 52px; box-shadow: 0 6px 0 var(--koralle-dunkel); padding-left: 8px; }
.geschafft .play-riesig { background: var(--sonne); padding: 0; animation: puls .6s ease; }
.player-balken { height: 14px; border-radius: 999px; background: var(--papier-2); overflow: hidden; }
.player-balken i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--minze), var(--sonne)); }
.player-anweisung { font-size: 21px; font-weight: 500; margin: 12px 0 0; display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.player-knoepfe { margin-top: 10px; }
.player-knoepfe .btn { min-height: 48px; padding: 8px 18px; }

/* ---------- Rezept ---------- */
.rezept-blatt {
  position: relative; background: #fff; border-radius: 10px; padding: 22px 26px 18px; box-shadow: var(--schatten);
  background-image: repeating-linear-gradient(transparent 0 37px, #EAF1F5 37px 39px); border-top: 14px solid var(--minze); max-width: 820px; margin: 0 auto;
}
.rz-kopf { display: flex; align-items: center; gap: 14px; border-bottom: 3px dashed var(--rand); padding-bottom: 12px; margin-bottom: 8px; background: #fff; }
.rz-logo { width: 64px; }
.rz-kopf h2 { margin: 0; font-size: 34px; color: var(--minze); }
.rz-daten { margin-left: auto; text-align: right; }
.rz-daten b { display: block; font-size: 22px; }
.rz-daten small { display: block; color: var(--leise); }
.rz-liste { list-style: none; padding: 0; margin: 0; }
.rz-mittel { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 2px solid #F1F4F6; background: #fff; }
.rz-bild { font-size: 44px; line-height: 1; flex: none; }
.rz-mittel > div { flex: 1; }
.rz-mittel b { font-size: 22px; }
.rz-wie { display: inline-block; background: var(--minze-hell); color: #157A69; border-radius: 8px; padding: 0 8px; font-weight: 600; font-size: 16px; }
.rz-mittel p { margin: 4px 0; color: #444; font-size: 17px; }
.nur-erwachsene { display: inline-block; background: #FFF1CC; border: 2px solid var(--sonne); border-radius: 999px; padding: 1px 10px; font-size: 15px; font-weight: 600; }
.rz-hinweis { color: #B3261E !important; font-size: 16px !important; }
.rz-haken { width: 44px; height: 44px; border-radius: 12px; border: 3px solid var(--rand); background: #fff; color: transparent; font-size: 24px; font-weight: 700; flex: none; }
.rz-haken.an { background: var(--minze); border-color: var(--minze); color: #fff; }
.rz-fuss { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; min-height: 110px; }
.handschrift { font-family: 'Caveat', cursive; font-size: 44px; color: #1E3A8A; display: block; border-bottom: 2px solid var(--tinte); padding: 0 20px; animation: rein .6s ease; }
.unterschrift small { color: var(--leise); }
.stempel { width: 104px; height: 104px; border-radius: 50%; border: 5px solid rgba(232, 94, 61, .8); color: rgba(232, 94, 61, .9); display: grid; place-items: center; text-align: center; font-weight: 700; font-size: 15px; line-height: 1.1; transform: rotate(-14deg); }
.stempel.knall { animation: stempeln .45s cubic-bezier(.3, 1.6, .6, 1); }
@keyframes stempeln { from { transform: rotate(-14deg) scale(2.4); opacity: 0; } to { transform: rotate(-14deg) scale(1); opacity: 1; } }
.rz-warnung { margin: 10px 0 0; text-align: center; font-weight: 600; color: #B3261E; background: #FFF1EE; border-radius: 10px; padding: 8px; }
.gelernt { padding: 16px 20px; margin-top: 16px; border-left: 10px solid var(--lila); }
.gelernt p { font-size: 22px; font-weight: 600; margin: 0; }
.arzt-hinweis { padding: 14px 20px; margin-top: 12px; border-left: 10px solid var(--rot); }

/* ---------- Entlassung ---------- */
.urkunde { max-width: 620px; margin: 0 auto; background: #FFFDF7; border-radius: 26px; padding: 14px; box-shadow: var(--schatten); animation: urkunde .8s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes urkunde { from { transform: scale(.5) rotate(-8deg); opacity: 0; } }
.uk-rand { border: 6px double var(--sonne); border-radius: 18px; padding: 22px; text-align: center; }
.uk-oben { font-family: 'Caveat', cursive; font-size: 44px; color: var(--koralle); margin: 0; }
.uk-foto { width: 170px; height: 170px; border-radius: 50%; object-fit: cover; margin: 6px auto 10px; border: 7px solid var(--sonne); font-size: 90px; }
.urkunde h2 { font-size: 32px; color: var(--minze); }
.uk-team { color: var(--leise); }
.uk-sticker { display: inline-flex; flex-direction: column; align-items: center; margin-top: 8px; }
.uk-sticker span { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; font-size: 56px; background: #fff; border: 5px solid var(--sonne); box-shadow: var(--schatten); }
.uk-sticker.neu span { animation: sticker 1s ease .5s both; }
.uk-sticker em { font-style: normal; font-weight: 700; color: var(--koralle); margin-top: 6px; animation: puls .6s ease 1s both; }
@keyframes sticker { 0% { transform: scale(0) rotate(-180deg); } 70% { transform: scale(1.3) rotate(10deg); } 100% { transform: scale(1); } }
.jubel-team { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.jubel-team > div { width: 130px; }
.jubel-team > div:nth-child(2) .p-root { animation-delay: .2s; }

/* ---------- Notfall ---------- */
.notfall-szene { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(43, 45, 66, .55); overflow: hidden; }
.blaulicht-flackern { position: absolute; inset: 0; animation: blaulicht .5s steps(2) infinite; }
@keyframes blaulicht { 0% { background: rgba(61, 123, 255, .28); } 100% { background: rgba(255, 77, 61, .18); } }
.nf-wagen { position: absolute; top: 12%; width: 300px; animation: anfahrt 1.6s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes anfahrt { from { transform: translateX(-120vw); } to { transform: translateX(0); } }
.krankenwagen .blaulicht { animation: blaulicht-svg .3s steps(2) infinite; }
@keyframes blaulicht-svg { 50% { fill: #FF4D3D; } }
.nf-text { position: relative; margin-top: 180px; padding: 24px 28px; text-align: center; max-width: 92vw; animation: rein .4s ease 1.2s both; }
.nf-text h2 { color: var(--rot); font-size: 38px; }
.nf-fall { font-size: 28px; font-weight: 700; }

/* ---------- Quiz & Lernen ---------- */
.quiz-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; font-size: 22px; }
.sterne { display: flex; gap: 6px; flex-wrap: wrap; }
.sterne span { width: 20px; height: 20px; border-radius: 50%; background: var(--papier-2); }
.sterne .fertig { background: var(--minze); }
.sterne .jetzt { background: var(--koralle); transform: scale(1.3); }
.quiz-frage { padding: 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.qf-bild { font-size: 70px; line-height: 1; }
.quiz-frage h2 { font-size: 28px; margin: 0; }
.qf-satz { font-size: 26px; font-weight: 600; color: var(--lila); }
.quiz-antworten { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 16px; }
.antwort { padding: 18px; font-size: 22px; font-weight: 600; border: 4px solid transparent; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.antwort span { font-size: 44px; }
.antwort.richtig { border-color: var(--minze); background: var(--minze-hell); }
.antwort.falsch { border-color: var(--rot); background: #FFE3E0; animation: wackeln .4s; }
.antwort:disabled { cursor: default; }
@keyframes wackeln { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.quiz-erklaerung { margin-top: 16px; }
.quiz-ergebnis { text-align: center; font-size: 44px; letter-spacing: 4px; }
.zeichen-liste { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.zeichen { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-align: left; font: inherit; font-size: 19px; border: 0; width: auto; height: auto; border-radius: var(--rund); background: var(--karte); }
.zeichen span { font-size: 40px; }
.notruf { margin-top: 22px; padding: 22px; border: 4px solid var(--rot); text-align: center; }
.notruf h2 { font-size: 34px; color: var(--rot); }
.ws { text-align: left; max-width: 480px; margin: 10px auto 16px; font-size: 21px; }
.telefon { max-width: 340px; margin: 16px auto; padding: 18px; background: #2B2D42; }
.tel-anzeige { background: #D6F2EC; border-radius: 12px; font-size: 44px; font-weight: 700; text-align: center; letter-spacing: 8px; padding: 8px; margin-bottom: 14px; min-height: 70px; }
.tel-tasten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.taste { height: 72px; border-radius: 50%; border: 0; font-size: 32px; font-weight: 700; background: #F1F4F6; }
.taste.gruen { background: #3CC46A; }
.taste:active { transform: scale(.92); }

/* ---------- Eltern ---------- */
.eltern-tor { max-width: 460px; margin: 40px auto; padding: 26px; text-align: center; font-size: 24px; }
.schalter { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 10px; cursor: pointer; }
.schalter span { flex: 1; }
.schalter b { display: block; }
.schalter small { color: var(--leise); }
.schalter input { position: absolute; opacity: 0; }
.schalter i { width: 62px; height: 36px; border-radius: 999px; background: #D5D9DE; position: relative; transition: background .2s; flex: none; }
.schalter i::after { content: ''; position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); }
.schalter input:checked + i { background: var(--minze); }
.schalter input:checked + i::after { transform: translateX(26px); }
.info-text { padding: 18px 20px; font-size: 17px; }

/* ---------- Dialog & Konfetti ---------- */
.dialog-huelle { position: fixed; inset: 0; z-index: 60; background: rgba(43, 45, 66, .45); display: grid; place-items: center; padding: 16px; }
.dialog { padding: 24px; max-width: 460px; text-align: center; font-size: 21px; animation: rein .25s ease; }
.konfetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.konfetti i { position: absolute; top: -20px; width: 12px; height: 18px; border-radius: 3px; animation: fallen 2.5s ease-in forwards; }
@keyframes fallen { to { transform: translateY(110vh) rotate(var(--dreh)); } }

/* ---------- Kleinere Bildschirme ---------- */
@media (max-width: 760px) {
  body { font-size: 17px; }
  .kachel-raster { grid-template-columns: repeat(2, 1fr); }
  .aufnahme-raster { grid-template-columns: 1fr; }
  .szene-figur { width: 90px; }
  .blase { font-size: 18px; }
  .dran small { display: none; }
  .kopf-titel { font-size: 18px; }
  .koerper-huelle { flex-direction: column; }
  .koerper-extra { flex-direction: row; }
  .rz-kopf { flex-wrap: wrap; }
  .rz-daten { margin-left: 0; text-align: left; width: 100%; }
  .anzahl { width: 72px; height: 80px; font-size: 32px; }
}

/* ---------- Behandlungs-Uhr ---------- */
.uhr { font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; background: var(--karte); border-radius: 999px; padding: 6px 14px; box-shadow: var(--schatten); border: 3px solid var(--minze); }
.uhr.knapp { border-color: var(--rot); color: #B3261E; animation: uhr-puls 1s infinite; }
@keyframes uhr-puls { 50% { transform: scale(1.08); background: #FFE3E0; } }
.zeit-wahl { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 14px 18px; margin-top: 20px; }
.chip.an { background: var(--minze); color: #fff; border-color: var(--minze); }
.chip { --farbe: var(--rand); }

/* ---------- Krankenhaus ---------- */
.krankenhaus-szene { position: relative; height: 150px; overflow: hidden; margin-bottom: 10px; }
.kh-haus { position: absolute; right: 6%; bottom: 0; font-size: 110px; line-height: 1; }
.kh-wagen { position: absolute; bottom: 4px; width: 220px; animation: wegfahren 3s ease-in forwards; }
@keyframes wegfahren { from { left: -10%; } to { left: 62%; transform: scale(.55); opacity: .2; } }
.trost { padding: 16px 22px; border-left: 10px solid var(--sonne); }
.trost ul { margin: 0; padding-left: 22px; font-size: 20px; }
.trost li { margin-bottom: 6px; }

/* ---------- Unterschrift ---------- */
.unterschrift-dialog { width: min(720px, 100%); max-width: none; }
.unterschrift-feld {
  display: block; width: 100%; height: 220px; margin: 10px 0; border-radius: 16px; touch-action: none; cursor: crosshair;
  background: #FFFDF7 linear-gradient(transparent 168px, #2B2D42 168px, #2B2D42 170px, transparent 170px); border: 3px dashed var(--rand);
}
.unterschrift-bild { display: block; max-height: 70px; max-width: 240px; }
.unterschrift small { display: block; color: var(--leise); border-top: 2px solid var(--tinte); padding-top: 2px; }
.unterschrift-linie { display: block; width: 200px; height: 50px; }
.bf-sig { display: flex; flex-direction: column; align-items: flex-start; }
.bf-sig small { border-top: 2px solid #222; padding-top: 2px; min-width: 160px; }
.rezept-blatt .kaestchen { width: 22px; height: 22px; margin-top: 10px; }

/* ---------- Wartezimmer: schon behandelt ---------- */
.zuletzt { margin-top: 26px; }
.zuletzt h3 { font-size: 22px; }
.zuletzt-liste { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory; }
.zuletzt-eintrag { position: relative; flex: none; width: 150px; padding: 12px 10px; border: 0; font: inherit; text-align: center; scroll-snap-align: start; }
.zuletzt-eintrag img, .zuletzt-eintrag .ohne-foto { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 6px; border: 4px solid var(--minze); font-size: 42px; }
.ze-fall { position: absolute; top: 8px; right: 14px; font-size: 26px; }
.zuletzt-eintrag b { display: block; }
.zuletzt-eintrag small { color: var(--leise); font-size: 14px; line-height: 1.25; display: block; }
.verlauf li .btn { min-height: 44px; padding: 6px 12px; }

/* ---------- Anmelden & Admin ---------- */
.eingang-box { max-width: 480px; margin: 0 auto; padding: 24px 16px 40px; text-align: center; }
.eingang-figur { width: 150px; margin: 0 auto; }
.eingang-box h1 { font-size: 40px; color: var(--minze); }
.eingang-box h1 span { display: block; font-size: .45em; color: var(--koralle); letter-spacing: 3px; text-transform: uppercase; }
.eingang-box .reiter-knopf { text-decoration: none; color: inherit; }
.eingang-form { display: flex; flex-direction: column; gap: 14px; padding: 22px; text-align: left; margin-top: 10px; }
.eingang-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.eingang-info, .eingang-meldung { background: var(--minze-hell); border-radius: 14px; padding: 12px 16px; }
.eingang-fehler { background: #FFE3E0; color: #B3261E; border-radius: 14px; padding: 12px 16px; font-weight: 600; }
.admin-konten { display: grid; gap: 12px; }
.admin-konto { padding: 14px 18px; border-left: 8px solid var(--minze); }
.admin-konto.st-wartet { border-left-color: var(--sonne); background: #FFFBEF; }
.admin-konto.st-gesperrt { border-left-color: var(--rot); opacity: .75; }
.ak-kopf { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 20px; }
.ak-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.ak-knoepfe form { margin: 0; }
.ak-knoepfe .btn { min-height: 44px; padding: 8px 14px; font-size: 16px; }
.ak-pw { display: flex; gap: 6px; }
.ak-pw .name-feld { font-size: 16px; padding: 8px 10px; width: 170px; }
.admin-stimme { padding: 18px 20px; }
.stimme-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stimme-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.stimme-form .knopfreihe { grid-column: 1 / -1; justify-content: flex-start; }
.admin-stimme hr { border: 0; border-top: 2px dashed var(--rand); margin: 20px 0; }
.konto-zeile .knopfreihe { justify-content: flex-start; }
.konto-zeile form { margin: 0; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
a.btn-primaer { color: #fff; }

/* ---------- Patientenbrief (wird nur gedruckt) ---------- */
#druckbereich { display: none; }
.brief { font-size: 13pt; color: #222; }
.brief-kopf { display: flex; align-items: center; gap: 14px; border-bottom: 3px solid var(--minze); padding-bottom: 10px; margin-bottom: 12px; }
.brief-logo { width: 60px; }
.brief-titel h1 { font-size: 22pt; color: var(--minze); margin: 0; }
.brief-titel p { margin: 0; color: var(--koralle); font-weight: 600; }
.brief-patient { margin-left: auto; display: flex; align-items: center; gap: 10px; text-align: right; }
.brief-patient img, .brief-patient .ohne-foto { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; border: 3px solid var(--sonne); font-size: 36px; }
.brief-patient b { display: block; font-size: 16pt; }
.brief-patient small { display: block; color: #555; }
.brief h2 { font-size: 20pt; margin: 6px 0 2px; }
.brief-symptom { font-style: italic; color: #555; }
.brief h3 { font-size: 14pt; margin: 12px 0 4px; color: var(--minze); }
.brief-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.brief ol, .brief ul { margin: 0; padding-left: 20px; }
.brief li { margin-bottom: 3px; }
.brief-uebungen { list-style: none; padding-left: 0 !important; }
.brief-uebungen li { display: flex; gap: 8px; align-items: flex-start; }
.kaestchen { width: 16px; height: 16px; border: 2px solid #444; border-radius: 4px; flex: none; margin-top: 3px; }
.brief-hinweis { background: #EAF2FF; padding: 4px 8px; border-radius: 6px; }
.brief-medizin { width: 100%; border-collapse: collapse; }
.brief-medizin td { border-bottom: 1px solid #ddd; padding: 6px 4px; vertical-align: top; }
.bm-bild { font-size: 22pt; width: 40px; }
.bm-wie { font-weight: 600; color: #157A69; width: 34%; }
.brief-lernen { border-left: 6px solid var(--lila); padding-left: 10px; }
.brief-arzt { border-left: 6px solid var(--rot); padding-left: 10px; }
.brief-fuss { display: flex; align-items: center; gap: 30px; margin-top: 14px; }
.brief-fuss .handschrift { font-size: 26pt; display: inline-block; margin-left: 8px; padding: 0 10px; }
.brief-fuss .stempel { margin-left: auto; width: 86px; height: 86px; font-size: 11pt; }

/* ---------- Rezept-Bildschirm kompakt ---------- */
.reiter.klein { margin-bottom: 10px; }
.reiter.klein .reiter-knopf { padding: 8px 16px; font-size: 17px; }
.einleitung.klein { font-size: 16px; margin: 8px 0 0; }
.bs-rezept .rezept-blatt { padding: 12px 18px 10px; background-image: repeating-linear-gradient(transparent 0 31px, #EAF1F5 31px 33px); border-top-width: 10px; }
.bs-rezept .rz-kopf { padding-bottom: 6px; margin-bottom: 2px; }
.bs-rezept .rz-logo { width: 42px; }
.bs-rezept .rz-kopf h2 { font-size: 26px; }
.bs-rezept .rz-daten b { font-size: 18px; }
.bs-rezept .rz-daten small, .bs-rezept .rz-kopf small { font-size: 13px; }
.bs-rezept .rz-mittel { padding: 7px 0; gap: 10px; align-items: center; }
.bs-rezept .rz-bild { font-size: 30px; }
.bs-rezept .rz-mittel b { font-size: 18px; }
.bs-rezept .rz-wie { font-size: 14px; }
.bs-rezept .rz-mittel p { font-size: 15px; margin: 1px 0; }
.bs-rezept .nur-erwachsene { font-size: 13px; }
.bs-rezept .rz-hinweis { font-size: 14px !important; }
.bs-rezept .rz-haken { width: 38px; height: 38px; font-size: 20px; }
.bs-rezept .vorlesen { width: 36px; height: 36px; font-size: 17px; }
.bs-rezept .rz-fuss { min-height: 0; padding-top: 8px; }
.bs-rezept .stempel { width: 78px; height: 78px; font-size: 12px; }
.bs-rezept .rz-warnung { font-size: 14px; padding: 5px; margin-top: 6px; }

/* Knöpfe unten bleiben immer sichtbar – kein Runterscrollen nötig */
.knopfreihe.unten {
  position: sticky; bottom: 0; z-index: 15; margin-top: 16px;
  padding: 22px 0 calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(255, 248, 236, 0), var(--papier) 35%);
}

/* ---------- Drucken: schwarz-weiß, eine Seite ---------- */
.rezept-blatt .schnitt { display: none; }
@media print {
  @page { size: A4; margin: 10mm; }
  html, body { min-height: 0 !important; height: auto !important; }
  body { background: #fff !important; font-size: 10pt; }
  body.druckt > *:not(#druckbereich) { display: none !important; }
  body.druckt #druckbereich { display: block; filter: grayscale(1); }
  #druckbereich * { color: #000 !important; background: transparent !important; box-shadow: none !important; text-shadow: none !important; animation: none !important; }
  #druckbereich section, #druckbereich .brief-spalten, #druckbereich .rz-mittel { break-inside: avoid; }

  /* Rezept: kleine Karte zum Ausschneiden */
  .rezept-blatt.druck { position: relative; width: 125mm; max-width: none; margin: 4mm 0 0; padding: 5mm 6mm 4mm; border: 1.2pt dashed #000; border-radius: 0; font-size: 10pt; }
  .rezept-blatt.druck .schnitt { display: block; position: absolute; top: -2.6mm; left: 6mm; padding: 0 2mm; font-size: 8pt; background: #fff !important; }
  .druck .rz-kopf { gap: 3mm; padding-bottom: 2mm; margin-bottom: 1mm; border-bottom: 0.8pt solid #000; }
  .druck .rz-logo { width: 10mm; }
  .druck .rz-kopf h2 { font-size: 16pt; margin: 0; }
  .druck .rz-kopf small, .druck .rz-daten small { font-size: 8.5pt; }
  .druck .rz-daten b { font-size: 12pt; }
  .druck .rz-mittel { gap: 2.5mm; padding: 1.5mm 0; border-bottom: 0.5pt solid #999; align-items: flex-start; }
  .druck .kaestchen { width: 3.5mm; height: 3.5mm; margin-top: 1mm; border: 0.8pt solid #000; border-radius: 0.5mm; }
  .druck .rz-bild { font-size: 13pt; }
  .druck .rz-mittel b { font-size: 11pt; }
  .druck .rz-wie { font-size: 9pt; padding: 0 1.5mm; border: 0.6pt solid #000; }
  .druck .rz-mittel p { font-size: 9pt; margin: 0.4mm 0; }
  .druck .nur-erwachsene { font-size: 8pt; padding: 0 1.5mm; border: 0.6pt solid #000; }
  .druck .rz-hinweis { font-size: 8.5pt !important; }
  .druck .rz-fuss { min-height: 0; padding-top: 2mm; }
  .druck .unterschrift-bild { max-height: 12mm; max-width: 50mm; }
  .druck .unterschrift small { font-size: 8pt; border-top: 0.8pt solid #000; }
  .druck .unterschrift-linie { width: 50mm; height: 10mm; }
  .druck .stempel { width: 17mm; height: 17mm; font-size: 6.5pt; border: 1pt solid #000; }
  .druck .rz-warnung { font-size: 8.5pt; padding: 1mm; margin-top: 2mm; border: 0.6pt solid #000; border-radius: 0; }

  /* Patientenbrief: eine A4-Seite */
  .brief { font-size: 10pt; line-height: 1.3; }
  .brief-kopf { gap: 3mm; padding-bottom: 2mm; margin-bottom: 2mm; border-bottom: 1pt solid #000; }
  .brief-logo { width: 11mm; }
  .brief-titel h1 { font-size: 15pt; }
  .brief-patient img, .brief-patient .ohne-foto { width: 16mm; height: 16mm; border: 0.8pt solid #000; font-size: 20pt; }
  .brief-patient b { font-size: 12pt; }
  .brief h2 { font-size: 13pt; margin: 1mm 0 0; }
  .brief h3 { font-size: 10.5pt; margin: 2.5mm 0 1mm; }
  .brief li { margin-bottom: 0.5mm; }
  .brief-hinweis { padding: 0; font-style: italic; }
  .brief-medizin td { padding: 1mm; border-bottom: 0.5pt solid #999; }
  .bm-bild { font-size: 12pt; width: 8mm; }
  .brief-lernen, .brief-arzt { border-left: 1.5pt solid #000; padding-left: 3mm; }
  .brief-fuss { gap: 10mm; margin-top: 3mm; }
  .brief-fuss .unterschrift-bild { max-height: 12mm; max-width: 50mm; }
  .brief-fuss .handschrift { font-size: 16pt; }
  .brief-fuss .stempel { width: 17mm; height: 17mm; font-size: 6.5pt; border: 1pt solid #000; }
  .brief .rz-warnung { font-size: 8.5pt; padding: 1mm; border: 0.6pt solid #000; }
  .kaestchen { border: 0.8pt solid #000; width: 3.2mm; height: 3.2mm; }
}
@media (max-width: 760px) {
  .stimme-form { grid-template-columns: 1fr; }
  /* Handy: Knopfleiste in einer Zeile, Rezept noch dichter */
  .knopfreihe.unten { flex-wrap: nowrap; gap: 8px; padding-top: 14px; }
  .knopfreihe.unten .btn { flex: 1 1 auto; min-height: 50px; padding: 8px 10px; font-size: 15px; }
  .reiter.klein .reiter-knopf { padding: 6px 10px; font-size: 15px; }
  .bs-rezept .rezept-blatt { padding: 10px 12px 8px; }
  .bs-rezept .rz-kopf { flex-wrap: nowrap; }
  .bs-rezept .rz-logo { display: none; }
  .bs-rezept .rz-daten { width: auto; margin-left: auto; text-align: right; }
  .bs-rezept .rz-mittel { gap: 8px; }
  .bs-rezept .rz-bild { font-size: 24px; }
  .bs-rezept .rz-mittel b { font-size: 16px; }
  .bs-rezept .rz-mittel p { font-size: 14px; }
  .bs-rezept .rz-haken { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
