:root{
  --ink:#0d1821;
  --muted:#65727c;
  --blue:#087fc7;
  --cyan:#35b7df;
  --red:#ff2846;
  --yellow:#ffc12f;
  --answerBlue:#157ed1;
  --green:#28c761;
  --grey:#9ca3aa;
  --line:rgba(20,42,57,.10);
  --glass:rgba(255,255,255,.72);
  --shadow:0 24px 70px rgba(23,47,63,.12);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink)}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
a{color:inherit}
.display-body{height:100vh;overflow:hidden;background:#f3f8fa}
#app{position:relative;height:100vh;overflow:hidden;background:
  radial-gradient(circle at 50% 30%,rgba(255,255,255,.95),rgba(243,248,250,.88) 46%,#e8f0f3 100%)}
.bg-shape{position:absolute;background:linear-gradient(145deg,#46a8cf,#0c6489);opacity:.45;filter:saturate(.9);box-shadow:inset 0 0 40px rgba(255,255,255,.25)}
.shape-a{left:-60px;top:100px;width:360px;height:130px;clip-path:polygon(0 0,100% 0,74% 100%,0 100%)}
.shape-b{right:-40px;bottom:65px;width:320px;height:110px;clip-path:polygon(30% 0,100% 0,100% 100%,0 100%)}
.shape-c{left:0;bottom:0;width:190px;height:62px;clip-path:polygon(0 0,72% 0,100% 100%,0 100%);opacity:.24}
.display-header{height:74px;padding:18px 28px;display:flex;align-items:center;gap:14px;position:relative;z-index:10}
.brand-dot{width:14px;height:14px;border-radius:50%;background:var(--blue);box-shadow:0 0 0 8px rgba(8,127,199,.1)}
.progress-text{font-weight:900;color:#60707a}
.display-scores{margin-left:auto;display:flex;gap:8px}
.score-pill{padding:9px 14px;border-radius:999px;background:rgba(255,255,255,.78);border:1px solid rgba(0,0,0,.06);backdrop-filter:blur(18px);font-weight:850;box-shadow:0 8px 25px rgba(0,0,0,.05)}
.screen{position:relative;z-index:5;height:calc(100vh - 118px);display:flex;align-items:center;justify-content:center;padding:18px 34px 26px}
.display-footer{height:44px;padding:0 28px;display:flex;justify-content:space-between;align-items:center;position:relative;z-index:10;color:#70808b;font-size:12px}
.display-footer a{text-decoration:none}
.hero{text-align:center;animation:heroIn .8s cubic-bezier(.2,.85,.2,1)}
.hero .kicker{font-weight:900;color:#70808b;letter-spacing:.14em;text-transform:uppercase}
.hero h1{font-size:clamp(52px,8vw,110px);line-height:.9;letter-spacing:-.055em;margin:12px 0 12px}
.hero p{font-size:clamp(18px,2vw,28px);font-weight:760;color:#63727d;margin:0}
@keyframes heroIn{from{opacity:0;transform:translateY(22px) scale(.97);filter:blur(10px)}to{opacity:1;transform:none;filter:none}}

.quiz-stage{width:min(1300px,96vw);height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}
.question-text{font-size:clamp(34px,5vw,76px);line-height:1.02;letter-spacing:-.045em;text-align:center;max-width:1180px;margin:0 0 34px;font-weight:950;animation:questionIn .65s cubic-bezier(.2,.85,.2,1)}
@keyframes questionIn{from{opacity:0;transform:translateY(-16px);filter:blur(7px)}to{opacity:1;transform:none;filter:none}}
.cards{position:relative;width:min(1000px,90vw);height:min(405px,47vh)}
.answer-card{position:absolute;left:50%;top:50%;width:min(270px,26vw);height:min(330px,38vh);border:3px solid rgba(15,25,34,.88);border-radius:30px;box-shadow:0 24px 50px rgba(21,41,54,.17);overflow:hidden;display:flex;align-items:center;justify-content:center;transition:transform .8s cubic-bezier(.18,.88,.23,1),background .55s ease,filter .5s ease,opacity .5s ease,box-shadow .5s ease}
.answer-card:before{content:"";position:absolute;inset:0;background:linear-gradient(145deg,rgba(255,255,255,.24),transparent 30%,rgba(0,0,0,.05));pointer-events:none}
.answer-card .num{position:absolute;top:12px;color:#fff;font-size:22px;font-weight:950;text-shadow:0 2px 6px rgba(0,0,0,.22)}
.answer-card .answer-copy{padding:45px 18px 18px;text-align:center;font-size:clamp(20px,2.4vw,34px);line-height:1.05;font-weight:950;color:#101820;opacity:0;transform:translateY(18px) scale(.96);filter:blur(6px);transition:.5s cubic-bezier(.2,.85,.2,1)}
.answer-card.visible .answer-copy{opacity:1;transform:none;filter:none}
.card-1{background:var(--red);z-index:1}
.card-2{background:var(--yellow);z-index:2}
.card-3{background:var(--answerBlue);z-index:3}
.cards.stacked .card-1{transform:translate(-72%,-50%) rotate(-3deg) scale(.96)}
.cards.stacked .card-2{transform:translate(-50%,-53%) rotate(1deg) scale(.98)}
.cards.stacked .card-3{transform:translate(-28%,-49%) rotate(3deg)}
.cards.open .card-1{transform:translate(-170%,-50%)}
.cards.open .card-2{transform:translate(-50%,-50%)}
.cards.open .card-3{transform:translate(70%,-50%)}
.prompt-text{min-height:62px;display:flex;align-items:center;justify-content:center;font-size:clamp(25px,3.5vw,52px);font-weight:950;letter-spacing:-.03em;margin-top:16px}
.prompt-text.pop{animation:promptPop .7s cubic-bezier(.2,.9,.15,1)}
@keyframes promptPop{0%{opacity:0;transform:scale(.75) translateY(18px);filter:blur(8px)}55%{transform:scale(1.08)}100%{opacity:1;transform:scale(1);filter:none}}
.prompt-text.reveal-copy{color:#159b49}
.winner-screen{text-align:center;max-width:1000px;animation:winnerIn 1s cubic-bezier(.2,.9,.2,1)}
@keyframes winnerIn{0%{opacity:0;transform:scale(.82);filter:blur(16px)}65%{transform:scale(1.04)}100%{opacity:1;transform:none;filter:none}}
.winner-screen .trophy{font-size:clamp(70px,10vw,150px);filter:drop-shadow(0 16px 20px rgba(0,0,0,.14))}
.winner-screen .winner-label{font-weight:950;color:#6c7983;letter-spacing:.16em}
.winner-screen h1{font-size:clamp(48px,8vw,112px);line-height:.92;letter-spacing:-.055em;margin:10px 0}
.winner-screen .winner-score{font-size:clamp(22px,3vw,42px);font-weight:850;color:#159b49}
.tie-list{margin-top:15px;font-size:clamp(24px,3vw,40px);font-weight:900}

/* CONTROL */
.control-body{background:
  radial-gradient(circle at 15% 0%,rgba(8,127,199,.12),transparent 28%),
  radial-gradient(circle at 90% 0%,rgba(90,173,210,.12),transparent 30%),
  #eef4f6;min-height:100vh}
.control-shell{max-width:1280px;margin:auto;padding:30px 22px 50px}
.control-head{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:22px}
.eyebrow{font-size:12px;font-weight:950;letter-spacing:.14em;color:#65737d}
.control-head h1{font-size:48px;letter-spacing:-.04em;margin:5px 0}
.control-head p{margin:0;color:var(--muted)}
.control-link{background:#10202b;color:white;text-decoration:none;padding:12px 16px;border-radius:999px;font-weight:850}
.control-grid{display:grid;grid-template-columns:1.3fr .7fr;gap:18px}
.glass-panel{background:var(--glass);border:1px solid rgba(255,255,255,.78);box-shadow:var(--shadow);backdrop-filter:blur(22px);border-radius:26px;padding:20px}
.glass-panel.full{grid-column:1/-1}
.section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}
.section-title h2{margin:0;letter-spacing:-.025em}
.badge{font-size:12px;font-weight:900;padding:7px 10px;border-radius:999px;background:#fff1cc;color:#8b6500}
.badge.online{background:#e1f7e8;color:#15743a}
.current-question-box{background:white;border:1px solid var(--line);border-radius:18px;padding:15px;font-weight:800;margin-bottom:14px;min-height:56px}
.big-controls{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.ctrl,.small-btn{border:0;border-radius:14px;background:#fff;padding:13px 12px;font-weight:900;box-shadow:0 5px 14px rgba(0,0,0,.04)}
.ctrl.primary,.small-btn.primary{background:#087fc7;color:white}
.ctrl.dark{background:#13212b;color:#fff}
.ctrl.answer{background:#e8f5ff;color:#086da8}
.ctrl.prompt{background:#fff3c6;color:#896300}
.ctrl.reveal{background:#e4f8e9;color:#168445}
.ctrl.winner{background:#f2e9ff;color:#6f3ca2}
.small-btn.danger{background:#ffe5e9;color:#b82534}
#teamControls,.team-editor-list{display:grid;gap:9px}
.team-score-row{background:white;border:1px solid var(--line);border-radius:16px;padding:11px;display:grid;grid-template-columns:1fr 48px 48px;gap:7px;align-items:center}
.team-score-row button{border:0;border-radius:11px;padding:9px;font-weight:950}
.score-minus{background:#ffe7ea;color:#bc2634}
.score-plus{background:#e5f8eb;color:#167e3d}
.settings-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}
.control-body input,.control-body textarea,.control-body select{width:100%;border:1px solid #d5e0e5;background:#fff;border-radius:12px;padding:11px 12px;outline:none}
.question-editor{background:rgba(255,255,255,.74);border:1px solid var(--line);border-radius:18px;padding:14px;margin-bottom:10px}
.question-editor-top{display:grid;grid-template-columns:1fr 50px;gap:8px;margin-bottom:9px}
.question-editor-top button{border:0;border-radius:11px;background:#ffe7ea;color:#b72633;font-weight:950}
.answer-editor-row{display:grid;grid-template-columns:36px 1fr 120px;gap:8px;margin-top:7px;align-items:center}
.editor-num{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:#18262f;color:white;font-weight:950}
.team-edit-row{display:grid;grid-template-columns:1fr 100px 50px;gap:8px;margin-bottom:8px}
.team-edit-row button{border:0;border-radius:11px;background:#ffe7ea;color:#b72633;font-weight:950}
.control-footer{display:flex;justify-content:flex-end;padding-top:22px;color:#6f7d87;font-size:13px}
.control-footer a{text-decoration:none}
@media(max-width:850px){
  .control-grid{grid-template-columns:1fr}.glass-panel.full{grid-column:auto}
  .control-head{flex-direction:column;align-items:flex-start}.big-controls{grid-template-columns:1fr 1fr}
  .display-scores{display:none}.answer-card{width:28vw;height:250px;border-radius:20px}
}

/* ===== Morph animation upgrade ===== */
.scene{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;will-change:opacity,transform,filter}
.scene-hidden{opacity:0;visibility:hidden;pointer-events:none;transform:scale(.985);filter:blur(8px);transition:opacity .32s ease,transform .45s cubic-bezier(.16,1,.3,1),filter .32s ease,visibility 0s linear .45s}
.scene-active{opacity:1;visibility:visible;pointer-events:auto;transform:scale(1);filter:blur(0);transition:opacity .42s ease,transform .65s cubic-bezier(.16,1,.3,1),filter .42s ease}
.scene-enter{animation:sceneEnter .62s cubic-bezier(.16,1,.3,1)}
@keyframes sceneEnter{from{opacity:0;transform:scale(.975) translateY(12px);filter:blur(10px)}to{opacity:1;transform:none;filter:none}}
.screen{overflow:hidden}
.intro-scene,.winner-scene{padding:18px 34px 26px}
.quiz-scene{padding:0 34px}

.answer-card{
  will-change:transform,background,filter,opacity,box-shadow;
  transition:
    transform 1.02s cubic-bezier(.16,1,.3,1),
    background-color .72s cubic-bezier(.16,1,.3,1),
    filter .6s cubic-bezier(.16,1,.3,1),
    opacity .55s ease,
    box-shadow .72s cubic-bezier(.16,1,.3,1),
    border-radius .8s cubic-bezier(.16,1,.3,1);
  transform-style:preserve-3d;
}
.answer-card .card-sheen{
  position:absolute;inset:-45% -55%;
  background:linear-gradient(110deg,transparent 38%,rgba(255,255,255,.38) 48%,transparent 58%);
  transform:translateX(-60%) rotate(8deg);
  opacity:0;
  pointer-events:none;
}
.cards.open .answer-card .card-sheen{animation:sheen 1.05s .14s ease-out}
@keyframes sheen{0%{opacity:0;transform:translateX(-70%) rotate(8deg)}25%{opacity:.85}100%{opacity:0;transform:translateX(75%) rotate(8deg)}}

.cards.stacked .card-1{transform:translate(-73%,-50%) rotate(-4.5deg) scale(.94)}
.cards.stacked .card-2{transform:translate(-50%,-53%) rotate(.7deg) scale(.975)}
.cards.stacked .card-3{transform:translate(-27%,-49%) rotate(4deg) scale(1)}
.cards.open .card-1{transform:translate(-170%,-50%) rotate(-.4deg) scale(1)}
.cards.open .card-2{transform:translate(-50%,-50%) rotate(0deg) scale(1)}
.cards.open .card-3{transform:translate(70%,-50%) rotate(.4deg) scale(1)}

.answer-card .num{
  transition:transform .7s cubic-bezier(.16,1,.3,1),font-size .6s ease,top .7s cubic-bezier(.16,1,.3,1);
}
.cards.stacked .answer-card .num{transform:translateY(2px) scale(.94)}
.cards.open .answer-card .num{transform:translateY(0) scale(1)}

.answer-card .answer-copy{
  transition:opacity .58s cubic-bezier(.16,1,.3,1),transform .75s cubic-bezier(.16,1,.3,1),filter .55s ease;
  transform:translateY(28px) scale(.93);
}
.answer-card.visible .answer-copy{opacity:1;transform:translateY(0) scale(1);filter:blur(0)}

.cards.asking .answer-card{animation:cardBreathe 1.65s ease-in-out infinite alternate}
.cards.asking .card-2{animation-delay:.08s}
.cards.asking .card-3{animation-delay:.16s}
@keyframes cardBreathe{from{margin-top:0}to{margin-top:-7px}}

.cards.reveal .answer-card{animation:none !important;background:var(--grey);filter:grayscale(.5) saturate(.25);opacity:.62;box-shadow:0 14px 28px rgba(24,39,49,.10)}
.cards.reveal .answer-card.correct{animation:none !important;background:var(--green);filter:none;opacity:1;box-shadow:0 30px 70px rgba(40,199,97,.32);border-radius:34px}
.cards.reveal .card-1.correct{transform:translate(-170%,-50%) rotate(-.4deg) scale(1.045)}
.cards.reveal .card-2.correct{transform:translate(-50%,-50%) rotate(0deg) scale(1.045)}
.cards.reveal .card-3.correct{transform:translate(70%,-50%) rotate(.4deg) scale(1.045)}
.cards.reveal .answer-card.wrong{transform-origin:center;filter:grayscale(.85) saturate(.12);opacity:.48}

.prompt-wrap{height:76px;display:flex;align-items:center;justify-content:center;margin-top:8px}
.prompt-text{min-height:62px;margin-top:0}
.prompt-enter{animation:promptMorph .72s cubic-bezier(.16,1,.3,1)}
@keyframes promptMorph{0%{opacity:0;transform:translateY(22px) scale(.88);filter:blur(10px)}58%{opacity:1;transform:translateY(-3px) scale(1.045);filter:blur(0)}100%{transform:none}}
.prompt-question{font-size:clamp(29px,3.8vw,58px)}
.prompt-number{display:inline-grid;place-items:center;width:1.15em;height:1.15em;border-radius:.32em;color:white;margin:0 .07em;box-shadow:0 .12em .3em rgba(0,0,0,.12)}
.prompt-number.n1{background:var(--red)}
.prompt-number.n2{background:var(--yellow);color:#171717}
.prompt-number.n3{background:var(--answerBlue)}
.reveal-copy strong{display:inline-block;padding:.12em .34em;border-radius:.28em;background:rgba(40,199,97,.13)}

.confetti-field{position:absolute;inset:-100px;overflow:hidden;pointer-events:none}
.confetti-field span{position:absolute;left:calc((var(--i) * 47) % 100 * 1%);top:-7%;width:12px;height:22px;border-radius:3px;background:hsl(calc(var(--i) * 51deg) 78% 55%);animation:confettiFall calc(2.2s + (var(--i) % 6) * .16s) calc((var(--i) % 8) * .08s) cubic-bezier(.2,.75,.28,1) both;transform:rotate(calc(var(--i) * 29deg))}
@keyframes confettiFall{0%{opacity:0;transform:translateY(-30px) rotate(0deg) scale(.7)}12%{opacity:1}100%{opacity:.95;transform:translateY(760px) rotate(760deg) scale(1)}}
.winner-screen{position:relative}

@media (prefers-reduced-motion: reduce){
  .answer-card,.answer-card .answer-copy,.answer-card .num,.scene-hidden,.scene-active{transition-duration:.01ms!important;animation-duration:.01ms!important}
  .cards.asking .answer-card,.confetti-field span,.card-sheen{animation:none!important}
}

/* ===== Audio activation ===== */
.audio-gate{position:absolute;inset:0;z-index:100;display:flex;align-items:flex-end;justify-content:center;padding:0 24px 72px;pointer-events:none;transition:opacity .42s ease,visibility .42s ease}
.audio-gate.ready{opacity:0;visibility:hidden}
.audio-gate-card{pointer-events:auto;display:flex;align-items:center;gap:14px;max-width:760px;width:min(760px,94vw);padding:14px 16px;border:1px solid rgba(15,38,52,.12);border-radius:22px;background:rgba(255,255,255,.88);backdrop-filter:blur(22px) saturate(160%);box-shadow:0 22px 60px rgba(20,42,56,.16);animation:audioGateIn .65s cubic-bezier(.16,1,.3,1)}
.audio-gate-card .audio-icon{width:44px;height:44px;display:grid;place-items:center;border-radius:14px;background:#e9f6fc;font-size:22px;flex:0 0 auto}
.audio-gate-card>div:nth-child(2){min-width:0;flex:1}
.audio-gate-card strong{display:block;font-size:15px}
.audio-gate-card span{display:block;color:#667681;font-size:12px;margin-top:2px}
.audio-gate-card button{border:0;border-radius:999px;background:#0a7fca;color:white;font-weight:900;padding:11px 15px;white-space:nowrap}
@keyframes audioGateIn{from{opacity:0;transform:translateY(18px) scale(.97);filter:blur(8px)}to{opacity:1;transform:none;filter:none}}
@media(max-width:680px){.audio-gate-card{flex-wrap:wrap}.audio-gate-card button{width:100%}}
/* v4: mobile Fernbedienung */
.remote-body{margin:0;background:#edf4f7;color:#10202b;font-family:Inter,-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",sans-serif;min-height:100vh}.remote-body *{box-sizing:border-box}.remote-shell{width:min(720px,100%);margin:auto;padding:calc(18px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom))}.remote-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.remote-brand{font-size:22px;font-weight:950;letter-spacing:-.04em}.remote-progress-label{font-size:13px;color:#667782;margin-top:2px;font-weight:750}.remote-top-actions{display:flex;align-items:center;gap:9px}.icon-button{width:44px;height:44px;border:1px solid #d9e3e8;background:#fff;border-radius:14px;font-size:20px;font-weight:850}.connection-dot{height:36px;padding:0 11px;border-radius:999px;background:#fff;border:1px solid #dce6ea;display:flex;align-items:center;gap:7px;font-size:12px;font-weight:800;color:#687984}.connection-dot i{width:8px;height:8px;border-radius:50%;background:#f0a72e}.connection-dot.online i{background:#21a768}.connection-dot.error i{background:#d9485a}.remote-progress-track{height:5px;background:#dce7ec;border-radius:99px;overflow:hidden;margin:15px 0 20px}.remote-progress-track span{display:block;height:100%;width:0;background:#1685c3;border-radius:99px;transition:width .55s cubic-bezier(.2,.8,.2,1)}
.remote-preview{background:#fff;border:1px solid #dce6ea;border-radius:24px;padding:20px;box-shadow:0 10px 32px rgba(25,58,72,.07);min-height:270px}.phase-pill{display:inline-flex;background:#eaf5fb;color:#0876b5;border-radius:999px;padding:7px 10px;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.06em}.remote-preview h1{font-size:clamp(23px,6vw,34px);line-height:1.08;letter-spacing:-.035em;margin:16px 0 18px}.remote-answers{display:grid;gap:8px}.remote-answer{display:grid;grid-template-columns:34px 1fr;align-items:center;gap:9px;min-height:46px;padding:7px 11px;border-radius:13px;background:#f3f6f7;color:#93a0a7;transition:.35s ease}.remote-answer b{width:28px;height:28px;border-radius:9px;background:#e3eaed;display:grid;place-items:center;color:#65747d}.remote-answer.shown{background:#f7fafb;color:#1a2b34}.remote-answer.shown:nth-child(1) b{background:#e5484d;color:#fff}.remote-answer.shown:nth-child(2) b{background:#f3b51b;color:#fff}.remote-answer.shown:nth-child(3) b{background:#2788d8;color:#fff}.remote-answer.right{background:#e9f8ee!important;color:#176a38!important}.remote-answer.right b{background:#28a75d!important}.remote-answer.wrong{opacity:.5}.remote-correct{min-height:24px;margin-top:12px;color:#168148;font-weight:900}
.remote-action-zone{padding:16px 0 6px}.remote-main-button{width:100%;min-height:88px;border:0;border-radius:23px;background:#102b3a;color:#fff;padding:18px 22px;font-size:clamp(19px,5vw,25px);font-weight:950;display:flex;align-items:center;justify-content:space-between;box-shadow:0 10px 24px rgba(16,43,58,.18);transition:transform .14s ease,background .3s ease}.remote-main-button:active{transform:scale(.985)}.remote-main-button span{width:45px;height:45px;border-radius:15px;background:rgba(255,255,255,.13);display:grid;place-items:center}.remote-main-button.reveal-action{background:#16854a}.remote-main-button.next-action{background:#087fc7}.remote-secondary-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:9px}.remote-secondary{min-height:50px;border:1px solid #d9e4e9;background:#fff;border-radius:15px;font-weight:850;color:#334851}.remote-secondary:disabled{opacity:.35}.remote-secondary span{margin-left:4px}.remote-score-section{margin-top:18px}.remote-section-head{display:flex;align-items:center;justify-content:space-between;margin:0 3px 9px}.remote-section-head h2{font-size:17px;margin:0}.text-button{border:0;background:transparent;color:#7b8990;font-weight:750;padding:8px}.remote-team-grid{display:grid;gap:8px}.remote-team{background:#fff;border:1px solid #dce6ea;border-radius:18px;padding:12px 12px 12px 15px;display:flex;align-items:center;justify-content:space-between;gap:10px}.remote-team strong,.remote-team span{display:block}.remote-team span{font-size:12px;color:#77868e;margin-top:2px}.score-actions{display:flex;gap:7px}.score-actions button{height:48px;min-width:48px;border:0;border-radius:14px;background:#edf2f4;font-size:18px;font-weight:950}.score-actions .plus{min-width:64px;background:#1685c3;color:#fff}.remote-footer{display:flex;justify-content:space-between;gap:10px;padding:22px 4px 0;font-size:12px}.remote-footer a{color:#74848d;text-decoration:none}
.settings-sheet{position:fixed;inset:0;z-index:50;pointer-events:none;visibility:hidden}.settings-sheet.open{pointer-events:auto;visibility:visible}.settings-backdrop{position:absolute;inset:0;border:0;background:rgba(8,24,33,.38);opacity:0;transition:.3s}.settings-sheet.open .settings-backdrop{opacity:1}.settings-panel{position:absolute;left:50%;bottom:0;width:min(760px,100%);max-height:92vh;overflow:auto;transform:translate(-50%,105%);transition:transform .42s cubic-bezier(.2,.8,.2,1);background:#f7fafb;border-radius:28px 28px 0 0;padding:10px 16px calc(22px + env(safe-area-inset-bottom));box-shadow:0 -16px 50px rgba(10,30,40,.18)}.settings-sheet.open .settings-panel{transform:translate(-50%,0)}.settings-handle{width:42px;height:5px;border-radius:99px;background:#c9d4d9;margin:2px auto 12px}.settings-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.settings-header small{font-weight:900;color:#7b8b93;letter-spacing:.08em}.settings-header h2{margin:2px 0 0;font-size:25px}.settings-row{display:grid;grid-template-columns:1fr 1fr;gap:9px}.settings-row label{font-size:12px;font-weight:850;color:#60717a}.settings-panel input,.settings-panel textarea{width:100%;margin-top:5px;border:1px solid #d6e1e6;border-radius:13px;background:#fff;padding:12px;font:inherit;outline:none}.settings-section-head{display:flex;justify-content:space-between;align-items:center;margin:22px 0 9px}.settings-section-head h3{margin:0}.question-editor{background:#fff;border:1px solid #dce6ea;border-radius:18px;padding:13px;margin-bottom:9px}.question-editor-top{display:flex;justify-content:space-between;align-items:center;font-weight:900;margin-bottom:7px}.question-editor-top button,.team-edit-row button{border:0;background:#feecef;color:#bb3545;border-radius:10px;width:38px;height:38px}.answer-editor-row{display:grid;grid-template-columns:30px 1fr 20px 40px;align-items:center;gap:6px;margin-top:7px}.answer-editor-row input[type=radio]{width:18px;height:18px;margin:0}.answer-editor-row small{font-size:10px;color:#718089}.editor-num{width:27px;height:27px;border-radius:9px;background:#edf3f5;display:grid;place-items:center;font-weight:900}.team-edit-row{display:grid;grid-template-columns:1fr 42px;gap:7px;margin-bottom:7px}.small-btn{border:0;border-radius:11px;padding:9px 11px;background:#e7f2f7;color:#126c9d;font-weight:850}.settings-save{position:sticky;bottom:0;width:100%;min-height:56px;border:0;border-radius:16px;background:#087fc7;color:#fff;font-weight:950;font-size:16px;margin-top:18px}.save-status{min-height:20px;color:#168148;font-size:12px;font-weight:850}.sheet-open{overflow:hidden}@media(max-width:520px){.remote-shell{padding-left:12px;padding-right:12px}.connection-dot span{display:none}.connection-dot{width:36px;padding:0;justify-content:center}.remote-preview{padding:17px;min-height:250px}.remote-secondary span{display:none}.remote-secondary{font-size:19px}.settings-row{grid-template-columns:1fr}.remote-main-button{min-height:82px}}@media(prefers-reduced-motion:reduce){.remote-body *{transition-duration:.01ms!important;animation-duration:.01ms!important}}

/* v4.2: mobile safe-area + fullscreen overlay fixes */
:root{
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Keep question counter away from browser/fullscreen close controls. */
.display-header{
  box-sizing:border-box;
  min-height:74px;
  height:calc(74px + var(--safe-top));
  padding-top:calc(18px + var(--safe-top));
  padding-left:max(88px, calc(28px + env(safe-area-inset-left, 0px)));
  padding-right:max(28px, calc(28px + env(safe-area-inset-right, 0px)));
}
.progress-text{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  text-align:center;
  white-space:nowrap;
  max-width:42vw;
  overflow:hidden;
  text-overflow:ellipsis;
}
.screen{
  height:calc(100dvh - 118px - var(--safe-top) - var(--safe-bottom));
}
.display-footer{
  padding-bottom:max(0px, var(--safe-bottom));
}

/* Settings editor: never start underneath iOS/Safari chrome. */
.settings-sheet{
  padding-top:max(16px, calc(var(--safe-top) + 12px));
}
.settings-panel{
  top:max(16px, calc(var(--safe-top) + 12px));
  bottom:0;
  max-height:calc(100dvh - max(16px, calc(var(--safe-top) + 12px)));
  height:auto;
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding-top:12px;
  padding-bottom:calc(22px + var(--safe-bottom));
}
.settings-header{
  position:sticky;
  top:-12px;
  z-index:20;
  background:rgba(247,250,251,.97);
  -webkit-backdrop-filter:blur(16px);
  backdrop-filter:blur(16px);
  padding:12px 0 10px;
}
.settings-save{
  z-index:21;
  box-shadow:0 -10px 22px rgba(247,250,251,.95);
  margin-bottom:2px;
}
.settings-save:disabled{opacity:.65;cursor:wait}
.question-editor textarea{min-height:74px;resize:vertical}

@media(max-width:600px){
  .display-header{
    padding-left:max(92px, calc(72px + env(safe-area-inset-left, 0px)));
    padding-right:max(16px, calc(16px + env(safe-area-inset-right, 0px)));
  }
  .brand-dot{display:none}
  .progress-text{
    left:max(92px, calc(72px + env(safe-area-inset-left, 0px)));
    transform:none;
    max-width:34vw;
    text-align:left;
  }
  .display-scores{max-width:50vw;overflow:hidden}
  .score-pill{padding:7px 9px;font-size:12px}
  .settings-panel{border-radius:22px 22px 0 0}
  .settings-header h2{font-size:22px}
  .answer-editor-row{grid-template-columns:28px minmax(0,1fr) 22px 36px}
  .answer-editor-row input{min-width:0}
}

/* Extra room when the presentation itself is in fullscreen. */
:fullscreen .display-header,
:-webkit-full-screen .display-header{
  padding-left:max(108px, calc(88px + env(safe-area-inset-left, 0px)));
}
:fullscreen .progress-text,
:-webkit-full-screen .progress-text{
  left:max(108px, calc(88px + env(safe-area-inset-left, 0px)));
  transform:none;
  text-align:left;
  max-width:36vw;
}


/* v4.3: legal footer only on idle/end screens */
.display-footer{
  transition:opacity .28s ease, visibility .28s ease;
}
.display-footer.footer-hidden{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}

/* v4.5: explanation cards, countdown and extra quiz feedback */
.decision-timer{height:54px;margin-top:10px;font-size:34px;font-weight:950;letter-spacing:-.04em;color:#172a34;display:flex;justify-content:center;align-items:center;transition:.25s}
.decision-timer.urgent{color:#d7474e;animation:timerPulse .8s ease-in-out infinite}
.decision-timer.time-up{font-size:clamp(20px,3vw,34px);letter-spacing:.04em;color:#fff;background:#172a34;padding:8px 18px;border-radius:15px;animation:timeUp .5s cubic-bezier(.16,1,.3,1)}
@keyframes timerPulse{50%{transform:scale(1.1)}}
@keyframes timeUp{from{opacity:0;transform:scale(.75)}to{opacity:1;transform:scale(1)}}

.explainer-overlay{position:absolute;inset:0;z-index:20;display:grid;place-items:center;padding:clamp(22px,5vw,70px);opacity:0;visibility:hidden;pointer-events:none;transform:scale(.96);filter:blur(10px);transition:.45s cubic-bezier(.16,1,.3,1)}
.explainer-overlay.visible{opacity:1;visibility:visible;transform:scale(1);filter:blur(0)}
.explainer-card{width:min(920px,90vw);max-height:72vh;overflow:auto;background:rgba(255,255,255,.96);border:1px solid rgba(30,80,105,.12);border-radius:32px;padding:clamp(28px,5vw,58px);box-shadow:0 28px 80px rgba(19,50,66,.18);text-align:left}
.explainer-kicker{font-size:13px;font-weight:950;letter-spacing:.14em;color:#1685c3;margin-bottom:10px}
.explainer-card h2{font-size:clamp(34px,5vw,64px);line-height:1.02;letter-spacing:-.045em;margin:0 0 24px}
.explainer-body{font-size:clamp(22px,2.7vw,34px);font-weight:750;line-height:1.35;color:#29414e}
.explainer-body ul{margin:0;padding-left:1.25em;display:grid;gap:12px}.explainer-body p{margin:0}
.explainer-editor{margin-top:14px;padding-top:12px;border-top:1px solid #e2eaee}
.explainer-editor-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.explainer-edit-card{background:#f4f8fa;border:1px solid #e0e9ed;border-radius:14px;padding:9px;margin-top:8px}
.explainer-edit-card textarea{min-height:86px;resize:vertical}
.explainer-edit-card button{border:0;background:transparent;color:#b63343;font-weight:850;padding:8px 3px}
@media(max-width:600px){
  .explainer-card{border-radius:24px;padding:24px;max-height:76vh}
  .explainer-body{font-size:20px}
  .decision-timer{font-size:28px}
}

.display-header .brand-dot{display:none!important}

/* v5.0: multi-quiz library */
.quiz-library{display:grid;gap:10px;margin:14px 0 18px}
.quiz-library-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;border:1px solid #dce7eb;border-radius:18px;background:#fff;overflow:hidden;transition:.2s}
.quiz-library-card.selected{border-color:#1596d2;box-shadow:0 0 0 2px rgba(21,150,210,.10)}
.quiz-library-main{border:0;background:transparent;text-align:left;padding:16px;min-width:0;cursor:pointer}
.quiz-library-title{display:block;font-size:17px;font-weight:900;color:#18313e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.quiz-library-meta{display:block;margin-top:3px;font-size:12px;font-weight:700;color:#738792;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.quiz-library-actions{display:flex;align-items:center;gap:5px;padding-right:10px}
.quiz-library-actions button{width:40px;height:40px;border:0;border-radius:12px;background:#f0f5f7;font-size:18px}
.active-badge{font-size:9px;font-weight:950;letter-spacing:.09em;color:#087eb6;background:#e6f6fd;padding:6px 7px;border-radius:999px}
.library-panel{max-width:620px}
@media(max-width:600px){
 .quiz-library-card{grid-template-columns:minmax(0,1fr) auto}
 .quiz-library-main{padding:14px 10px 14px 14px}
 .quiz-library-actions{gap:3px;padding-right:7px}
 .quiz-library-actions button{width:38px;height:38px}
 .active-badge{display:none}
}

/* v5.1: Timer sauber vom "Ist es 1, 2 oder 3?"-Text trennen */
.prompt-wrap{
  gap:0 !important;
}
.prompt-text{
  margin-bottom:clamp(24px,4vh,46px) !important;
}
.decision-timer{
  width:max-content;
  min-width:82px;
  height:auto;
  min-height:58px;
  margin:0 auto !important;
  padding:10px 18px;
  border-radius:18px;
  background:rgba(255,255,255,.86);
  border:1px solid rgba(23,42,52,.10);
  box-shadow:0 8px 28px rgba(25,58,74,.10);
  font-variant-numeric:tabular-nums;
  line-height:1;
}
.decision-timer:empty{
  display:none;
}
.decision-timer.urgent{
  background:#fff;
}
.decision-timer.time-up{
  min-width:0;
  padding:13px 22px;
}

/* v5.1: Erklärung im Editor klar sichtbar statt zwischen Inputs zu verschwinden */
.explainer-editor{
  margin-top:18px;
  padding:16px;
  border:1px solid #d9e7ed;
  border-radius:16px;
  background:#f7fafb;
}
.explainer-editor-head{
  align-items:flex-start;
  margin-bottom:4px;
}
.explainer-editor-head > div{
  min-width:0;
  display:grid;
  gap:4px;
}
.explainer-editor-head small{
  display:block;
  color:#748994;
  font-size:12px;
  line-height:1.35;
}
.optional-tag{
  display:inline-block;
  margin-left:5px;
  padding:3px 6px;
  border-radius:999px;
  background:#e8f5fb;
  color:#087fb8;
  font-size:9px;
  font-weight:950;
  letter-spacing:.08em;
  vertical-align:2px;
}
.explainer-add{
  flex:0 0 auto;
  white-space:nowrap;
}
.explainer-edit-card{
  margin-top:12px;
  display:grid;
  gap:8px;
}
.explainer-edit-card input,
.explainer-edit-card textarea{
  width:100%;
  box-sizing:border-box;
}
@media(max-width:600px){
  .prompt-text{margin-bottom:28px !important}
  .decision-timer{min-height:52px;padding:9px 16px;border-radius:16px}
  .explainer-editor-head{display:grid;grid-template-columns:1fr;gap:10px}
  .explainer-add{width:100%}
}


/* v5.3: Quizbibliothek nutzt dieselbe funktionierende Sheet-Animation wie Einstellungen */
#librarySheet.open{pointer-events:auto;visibility:visible}
#librarySheet.open .settings-backdrop{opacity:1}
#librarySheet.open .settings-panel{transform:translate(-50%,0)}

/* v5.3: Prompt + Timer bewusst untereinander, nicht mehr nebeneinander gequetscht */
.prompt-wrap{
  height:auto !important;
  min-height:132px;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:22px !important;
  margin-top:14px !important;
}
.prompt-text{
  min-height:0 !important;
  margin:0 !important;
  line-height:1.08;
}
.decision-timer{
  position:static !important;
  flex:0 0 auto;
  margin:0 auto !important;
}
@media(max-width:700px){
  .prompt-wrap{min-height:118px;gap:18px !important;margin-top:10px !important}
}
