/* Demo-Tour (Startseite und /demo): alle Regeln gelten nur innerhalb von #demo. Die Bühne skaliert mit ihrer eigenen Größe (container queries). */
#demo { --green: #2f8f4e; --blue: #2a6fb0; }
#demo .player {width: min(1180px, 100%); margin: 0 auto; padding: 0 1rem 1.5rem; flex: 1;}
#demo .stage {position: relative; width: 100%; max-width: max(420px, calc((100svh - var(--chrome, 11rem)) * 1.7778)); margin-inline: auto; aspect-ratio: 16 / 9; container-type: size; border-radius: 18px; overflow: hidden;
  background: radial-gradient(60em 30em at 85% -10%, #8c2b4b 0%, transparent 60%), linear-gradient(160deg, var(--wine-dark), var(--wine) 75%); box-shadow: 0 24px 60px rgba(0,0,0,.45);}
#demo .stage:fullscreen {border-radius: 0; aspect-ratio: auto; width: 100vw; max-width: none; height: 100vh;}
#demo .inner {position: absolute; inset: 0; font-size: min(2.1cqw, 3.73cqh); line-height: 1.35;}
#demo .scene {position: absolute; inset: 0; display: grid; grid-template-columns: 34% 1fr; gap: 2em; align-items: center; padding: 2.2em 3em; opacity: 0; visibility: hidden; transition: opacity .5s;}
#demo .scene.on {opacity: 1; visibility: visible;}
#demo .cap small {display: inline-block; padding: .2em .8em; border-radius: 99em; background: rgba(255,255,255,.14); color: var(--gold-soft); font-weight: 700; font-size: .7em; letter-spacing: .04em;}
#demo .cap h2 {margin: .4em 0 .3em; font-size: 1.9em; line-height: 1.08; letter-spacing: -.01em;}
#demo .cap h2 em {font-style: normal; color: var(--gold);}
#demo .cap p {margin: 0; font-size: .82em; opacity: .85;}
#demo .vis {position: relative; height: 100%; min-width: 0; display: flex; flex-wrap: wrap; align-content: center; align-items: center; justify-content: center; gap: 1em;}
#demo .vis.nowrap {flex-wrap: nowrap;}
#demo .row-b {flex-basis: 100%; display: flex; gap: .6em; justify-content: center; flex-wrap: wrap;}
#demo .center {text-align: center;}
#demo .center .vis {grid-column: 1 / -1;}
#demo .scene.on .a {animation: pop .55s var(--d, 0s) cubic-bezier(.2,.9,.3,1.2) both;}
#demo .scene.on .a-up {animation-name: up;}
#demo .scene.on .a-left {animation-name: left;}
#demo .scene.on .a-right {animation-name: right;}
#demo .scene.on .a-fade {animation-name: fade;}
@keyframes pop {from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; }}
@keyframes up {from { opacity: 0; transform: translateY(1.2em); } to { opacity: 1; transform: none; }}
@keyframes left {from { opacity: 0; transform: translateX(-2em); } to { opacity: 1; transform: none; }}
@keyframes right {from { opacity: 0; transform: translateX(2em); } to { opacity: 1; transform: none; }}
@keyframes fade {from { opacity: 0; } to { opacity: 1; }}
#demo .scene.on .type {animation: type .9s var(--d, 0s) steps(16) both;}
@keyframes type {from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); }}
#demo .scene.on .grow {transform-origin: bottom; animation: grow 1s var(--d, 0s) cubic-bezier(.2,.8,.2,1) both;}
@keyframes grow {from { transform: scaleY(0); } to { transform: none; }}
#demo .scene.on .tap {animation: tap 1.1s var(--d, 0s) ease-out both;}
@keyframes tap {0% { box-shadow: 0 0 0 0 rgba(201,162,39,.9); } 60% { box-shadow: 0 0 0 .7em rgba(201,162,39,0); } 100% { box-shadow: 0 0 0 0 rgba(201,162,39,0); }}
#demo .scene.on .float {animation: float 3s ease-in-out infinite;}
@keyframes float {50% { transform: translateY(-.35em); }}
#demo .phone {width: 11em; height: 19em; background: #120a0e; border-radius: 1.5em; padding: .5em; box-shadow: 0 1em 2.5em rgba(0,0,0,.45); flex: none;}
#demo .phone .scr {height: 100%; border-radius: 1.1em; background: var(--cream); overflow: hidden; color: var(--ink); display: flex; flex-direction: column;}
#demo .phone .hd {background: var(--wine); color: #fff; padding: .55em .7em; font-weight: 800; font-size: .8em; display: flex; justify-content: space-between;}
#demo .row {display: flex; justify-content: space-between; gap: .4em; padding: .45em .7em; font-size: .72em; background: #fff; border-bottom: 1px solid var(--line);}
#demo .row b {font-weight: 800;}
#demo .row i {font-style: normal; color: var(--muted); white-space: nowrap;}
#demo .btn2 {margin: .5em; padding: .55em; border-radius: .8em; background: var(--gold); color: var(--wine-dark); text-align: center; font-weight: 800; font-size: .78em;}
#demo .toast {margin: .3em .5em; padding: .45em .6em; border-radius: .7em; background: #e3f4e6; color: #1d5b2a; font-size: .68em; font-weight: 700;}
#demo .tag {display: inline-block; margin-left: .3em; padding: 0 .4em; border-radius: .6em; background: var(--gold-soft); color: #7a5c00; font-size: .85em; font-weight: 700;}
#demo .card2 {background: #fff; color: var(--ink); border-radius: 1em; padding: 1em 1.2em; box-shadow: 0 1em 2.5em rgba(0,0,0,.3);}
#demo .pill {display: inline-block; padding: .25em .8em; border-radius: 99em; background: rgba(255,255,255,.15); font-size: .72em; font-weight: 700;}
#demo .pill.g {background: #e3f4e6; color: #1d5b2a;}
#demo .pill.y {background: var(--gold-soft); color: #6b5300;}
#demo .login2 {width: 13em;}
#demo .login2 h4 {margin: 0 0 .5em; font-size: 1em;}
#demo .fld {margin-bottom: .5em;}
#demo .fld span {display: block; font-size: .55em; font-weight: 700; color: var(--muted);}
#demo .fld div {border: 2px solid var(--line); border-radius: .5em; padding: .3em .5em; font-size: .72em; min-height: 1.9em;}
#demo .roles {display: grid; gap: .45em; width: 9.5em;}
#demo .roles div {padding: .7em .8em; border-radius: .9em; background: rgba(255,255,255,.12); font-weight: 800; font-size: .85em; display: flex; gap: .5em; align-items: center;}
#demo .roles div.sel {background: var(--gold); color: var(--wine-dark);}
#demo .qr {display: grid; grid-template-columns: repeat(11, 1fr); gap: 1px; width: 6.2em; height: 6.2em; padding: .35em; background: #fff; border-radius: .5em;}
#demo .qr i {background: transparent;}
#demo .qr i.k {background: #111;}
#demo .table7 {text-align: center; color: var(--ink);}
#demo .table7 b {display: block; font-size: 1em; margin-top: .3em;}
#demo .arrow {font-size: 1.6em; color: var(--gold);}
#demo .screen2 {width: 10.5em; min-height: 10em; background: #231419; border: 2px solid rgba(255,255,255,.18); border-radius: .9em; padding: .6em;}
#demo .screen2 h5 {margin: 0 0 .5em; font-size: .85em; display: flex; justify-content: space-between;}
#demo .bon {background: #fff; color: var(--ink); border-radius: .6em; padding: .5em .6em; font-size: .72em; margin-bottom: .4em; transition: background .4s;}
#demo .bon b {display: block; color: var(--wine);}
#demo .bon .ok {display: block; margin-top: .4em; padding: .3em; border-radius: .5em; background: var(--green); color: #fff; text-align: center; font-weight: 800;}
#demo .bon.done {background: #cfeed7;}
#demo .bill {width: 10.8em; font-size: .85em;}
#demo .bill h4 {margin: 0 0 .4em; font-size: 1em; display: flex; justify-content: space-between; align-items: center; gap: .3em; white-space: nowrap;}
#demo .bill h4 .pill {font-size: .6em; padding: .15em .6em;}
#demo .bill .tot {margin-top: .4em; padding-top: .4em; border-top: 2px solid var(--ink); display: flex; justify-content: space-between; font-weight: 800;}
#demo .tree {display: grid; gap: .8em; justify-items: center;}
#demo .node {padding: .7em 1.1em; border-radius: .9em; background: #fff; color: var(--ink); font-weight: 800; font-size: .85em; text-align: center; box-shadow: 0 .6em 1.6em rgba(0,0,0,.3);}
#demo .node small {display: block; font-weight: 600; color: var(--muted); font-size: .7em;}
#demo .kids {display: flex; gap: .8em;}
#demo .kids .node {background: var(--gold-soft);}
#demo .admin {width: 22em; color: var(--ink); background: #fff; border-radius: 1em; overflow: hidden; box-shadow: 0 1em 2.5em rgba(0,0,0,.35); font-size: .8em;}
#demo .admin .top {background: var(--wine); color: #fff; padding: .6em .9em; font-weight: 800; transition: background .6s;}
#demo .admin .tabs {display: flex; gap: .3em; padding: .5em .7em 0; flex-wrap: wrap;}
#demo .admin .tabs span {padding: .2em .7em; border-radius: 99em; background: var(--cream); font-size: .75em; font-weight: 700;}
#demo .admin .tabs span.s {background: var(--wine); color: #fff;}
#demo .admin .body {padding: .6em .9em .9em;}
#demo .admin .pr {color: var(--wine); font-weight: 800;}
#demo .chart {display: flex; align-items: flex-end; gap: .6em; height: 9em; padding: 0 .4em; border-bottom: 2px solid var(--line);}
#demo .chart div {flex: 1; background: linear-gradient(var(--gold), #b58f12); border-radius: .3em .3em 0 0;}
#demo .chart div:nth-child(even) {background: linear-gradient(#a8465f, var(--wine));}
#demo .kpis {display: flex; gap: .6em; margin-bottom: .6em;}
#demo .kpis div {flex: 1; background: var(--cream); border-radius: .6em; padding: .4em .5em; text-align: center;}
#demo .kpis b {display: block; font-size: 1.2em; color: var(--wine);}
#demo .kpis small {font-size: .65em; color: var(--muted);}
#demo .checks {display: grid; gap: .5em;}
#demo .checks div {display: flex; gap: .6em; align-items: center; background: rgba(255,255,255,.12); padding: .5em .9em; border-radius: .9em; font-weight: 700; font-size: .85em;}
#demo .checks div::before {content: "✓"; display: grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; background: var(--gold); color: var(--wine-dark); font-weight: 900;}
#demo .shield {font-size: 4.5em;}
#demo .logo-big {width: 17em; max-width: 90%; background: #fff; border-radius: 1em; padding: .6em 1em; box-shadow: 0 1em 2.5em rgba(0,0,0,.35);}
#demo .logo-er {height: 3.2em; background: #fff; border-radius: .7em; padding: .2em .6em;}
#demo .cta2 {display: inline-block; margin-top: .8em; padding: .6em 1.6em; border-radius: 99em; background: var(--gold); color: var(--wine-dark); font-weight: 800; font-size: .95em; text-decoration: none;}
#demo .conf i {position: absolute; width: .6em; height: .6em; border-radius: 50%; opacity: .0;}
#demo .scene.on .conf i {animation: conf 3.5s ease-in infinite;}
@keyframes conf {0% { opacity: 0; transform: translateY(-3em); } 15% { opacity: .9; } 100% { opacity: 0; transform: translateY(14em) rotate(200deg); }}
#demo .start {position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: .3em; border: 0; cursor: pointer; font: inherit; color: #fff; background: rgba(29,18,24,.72); backdrop-filter: blur(2px);}
#demo .start span {display: grid; place-items: center; width: 3.4em; height: 3.4em; border-radius: 50%; background: var(--gold); color: var(--wine-dark); font-size: 2em; padding-left: .12em; box-shadow: 0 0 0 .5em rgba(201,162,39,.3);}
#demo .start b {font-size: 1.2em; margin-top: .4em;}
#demo .start small {opacity: .8; font-size: .8em;}
#demo .start[hidden] {display: none;}
#demo .sub {min-height: 3.6em; margin: .9rem 0 .4rem; text-align: center; font-size: clamp(1rem, 2.2vw, 1.25rem); line-height: 1.5; color: #f3e8ec;}
#demo .ctrl {display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center;}
#demo .ctrl button, #demo .ctrl select {font: inherit; font-size: .95rem; min-height: 44px; padding: .4rem 1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #fff; cursor: pointer;}
#demo .ctrl button:hover {background: rgba(255,255,255,.18);}
#demo .ctrl button.main {background: var(--gold); color: var(--wine-dark); border-color: var(--gold); font-weight: 800; min-width: 7.5rem;}
#demo .ctrl select {max-width: 15rem; color: #fff;}
#demo .ctrl select option {color: #000;}
#demo .dots {display: flex; gap: .45rem; justify-content: center; margin: 1rem 0 .8rem; flex-wrap: wrap;}
#demo .dots button {width: 14px; height: 14px; min-height: 0; padding: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,.28); cursor: pointer;}
#demo .dots button.on {background: var(--gold); transform: scale(1.3);}
#demo .hint {text-align: center; font-size: .85rem; color: #b7a5ab; margin: 1rem 0 0;}
#demo .hint a {color: #fff;}
@media (max-width: 720px) {
  #demo .stage {aspect-ratio: 3 / 4; max-width: none;}
  #demo .inner {font-size: min(4.3cqw, 5.73cqh);}
  #demo .scene {grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: .8em; padding: 1.4em 1.2em; align-items: start;}
  #demo .cap h2 {font-size: 1.6em;}
  #demo .cap p {display: none;}
  #demo .vis {align-items: center; flex-wrap: wrap; gap: .6em;}
  #demo .phone {width: 9em; height: 15em;}
  #demo .admin {width: 100%;}
  #demo .kids {flex-wrap: wrap; justify-content: center; gap: .5em;}
  #demo .kids .node .pill {display: none;}
  #demo .tree {gap: .4em;}
  #demo .node {padding: .45em .8em; font-size: .78em;}
  #demo .screen2 {width: 10.5em; min-height: 8em;}
}
@media (prefers-reduced-motion: reduce) {
  #demo .scene.on .a, #demo .scene.on .float, #demo .scene.on .conf i {animation: none;}
}
