*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;background:#0F1530;color:#EAF0FF;font-family:Inter,"Segoe UI",system-ui,-apple-system,sans-serif;-webkit-tap-highlight-color:transparent;overscroll-behavior:none}
body{user-select:none;-webkit-user-select:none;touch-action:manipulation}
button{font:inherit;color:inherit;border:0;background:none;cursor:pointer}
a{color:inherit;text-decoration:none}
input{font:inherit}
svg text{font-family:Inter,"Segoe UI",system-ui,sans-serif}
#app{height:100%}
.screen{min-height:100%;height:100%;display:flex;flex-direction:column}
.top{flex:none;height:72px;display:flex;align-items:center;padding:0 24px;gap:16px;background:#151C3B;border-bottom:1px solid #27305C}
.back{width:48px;height:48px;border-radius:50%;background:#222B55;display:flex;align-items:center;justify-content:center;font-size:28px;color:#C9D3FF;flex:none}
.eyebrow{font-size:13px;letter-spacing:.08em;text-transform:uppercase;color:#8E9BD6;font-weight:700}
.h1{font-size:25px;font-weight:800;line-height:1.15}
.spacer{flex:1}
.pill{background:#222B55;border-radius:999px;padding:9px 16px;font-size:17px;font-weight:700;display:flex;gap:6px;align-items:center;white-space:nowrap}
.pill .star,.star{color:#FFD54A}
.main{flex:1;display:flex;min-height:0}
.stage{flex:1;position:relative;padding:18px;overflow:auto;min-width:0}
.side{width:360px;flex:none;background:#151C3B;border-left:1px solid #27305C;padding:22px;display:flex;flex-direction:column;gap:14px;overflow:auto}
.side h2{font-size:21px;font-weight:800}
.tasks{display:flex;flex-direction:column;gap:12px}
.task{display:flex;gap:12px;align-items:flex-start;font-size:17px;line-height:1.35;color:#D6DDFB}
.task .c{flex:none;width:30px;height:30px;border-radius:50%;border:3px solid #4A5694;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:900}
.task.done .c{background:#3DD6B5;border-color:#3DD6B5;color:#0F1530}
.task.done{color:#8E9BD6}
.task.now .c{border-color:#FFD54A}
.task.now{color:#fff;font-weight:600}
.btns{display:flex;flex-direction:column;gap:10px}
.btn{min-height:56px;border-radius:16px;background:#FFD54A;color:#1B1B1B;font-size:19px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:10px;padding:0 20px;transition:transform .08s}
.btn:active{transform:scale(.97)}
.btn.ghost{background:#222B55;color:#EAF0FF}
.btn:disabled{opacity:.4}
.btn.small{min-height:44px;font-size:16px;border-radius:12px}
.hint{background:#1E2750;border-radius:14px;padding:14px 16px;font-size:16px;line-height:1.45;color:#C9D3FF}
.hint b{color:#FFD54A}
.hint.warn{background:#3A1E2A}.hint.warn b{color:#FF8A8A}
.card{background:#18214A;border-radius:20px;padding:20px}
.lab-label{font-size:14px;letter-spacing:.08em;text-transform:uppercase;color:#8E9BD6;font-weight:700;margin-bottom:6px}
.choice{background:#222B55;border-radius:14px;padding:14px 18px;font-size:18px;font-weight:600;border:3px solid transparent;text-align:left;width:100%;display:block}
.choice.sel{border-color:#FFD54A}
.choice.right{border-color:#3DD6B5;background:#1E3A3A}
.choice.wrong{border-color:#FF6B6B;background:#3A1E2A}
.choice:disabled{cursor:default}
/* Toast */
.toast{position:fixed;left:50%;top:84px;transform:translate(-50%,-20px);opacity:0;pointer-events:none;background:#3DD6B5;color:#0B2A24;font-weight:800;font-size:19px;padding:14px 24px;border-radius:16px;box-shadow:0 10px 30px rgba(0,0,0,.45);transition:.25s;z-index:50;max-width:80vw;text-align:center}
.toast.show{opacity:1;transform:translate(-50%,0)}
.toast.warn{background:#FF6B6B;color:#2A0B0B}
.toast.info{background:#FFD54A;color:#2A220B}
/* Werkbank */
.bench{display:flex;flex-direction:column;gap:12px;height:100%}
.bench-svg{width:100%;flex:1;min-height:300px;touch-action:none;display:block}
.bench .comp{cursor:grab}
.bench .comp.sel > g{filter:drop-shadow(0 0 6px #FFD54A)}
.flow{animation:flow 1s linear infinite}
.flow.rev{animation-direction:reverse}
@keyframes flow{to{stroke-dashoffset:-27}}
.tray{flex:none;background:#151C3B;border-radius:18px;padding:10px 14px}
.tray-label{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:#8E9BD6;font-weight:700}
.tray-items{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:6px}
.tray-item{display:flex;align-items:center;gap:8px;background:#222B55;border-radius:14px;padding:4px 14px 4px 6px;font-size:16px;font-weight:700;touch-action:none}
.tray-item.empty{opacity:.35}
.tray-tip{font-size:15px;color:#C9D3FF;margin-left:auto}
.tray-tip b{color:#FFD54A}
.dragghost{position:fixed;pointer-events:none;transform:translate(-50%,-50%);z-index:60;opacity:.85}
.term-ring{animation:pulse 1.6s ease-in-out infinite}
@keyframes pulse{50%{opacity:.35}}
/* Lückentext */
.gaptext{font-size:19px;line-height:2.3}
.gap{display:inline-block;min-width:130px;border-bottom:3px dashed #FFD54A;text-align:center;font-weight:800;color:#FFD54A;margin:0 4px;padding:0 6px;line-height:1.5}
.gap.ok{border-bottom:3px solid #3DD6B5;color:#3DD6B5}
.wordbank{margin-top:8px}
.word{display:inline-block;background:#2A3468;border-radius:10px;padding:8px 14px;font-size:18px;font-weight:700;margin:4px;border:3px solid transparent}
.word.picked{border-color:#FFD54A}
.word.used{opacity:.3}
/* Modal */
.modal-bg{position:fixed;inset:0;background:rgba(6,9,25,.72);display:flex;align-items:center;justify-content:center;z-index:70}
.modal{background:#1B2350;border-radius:26px;padding:26px 34px 30px;text-align:center;max-width:520px;width:90%;display:flex;flex-direction:column;align-items:center;gap:10px}
.modal p{font-size:18px;color:#C9D3FF;line-height:1.45}
.modal .btn{margin-top:8px;min-width:260px}
.stars{font-size:40px;color:#FFD54A;letter-spacing:6px}.stars .dim{color:#39437A}
/* Start */
.startbg{background:radial-gradient(circle at 50% 30%,#26306A 0,#0F1530 62%);min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px;gap:8px;text-align:center}
.bigtitle{font-size:56px;font-weight:900;line-height:1.05}
.startcards{display:flex;gap:24px;margin-top:30px;flex-wrap:wrap;justify-content:center}
.startcard{width:370px;background:#1E2750;border-radius:22px;padding:24px;text-align:left;border:3px solid transparent}
.startcard.primary{border-color:#FFD54A}
.startcard h3{font-size:23px;font-weight:800}
.startcard p{font-size:16px;color:#C9D3FF;margin:6px 0 16px}
.pinrow{display:flex;gap:10px;justify-content:center;margin:12px 0}
.pinbox{width:56px;height:66px;border-radius:14px;background:#0F1530;border:3px solid #39437A;font-size:32px;font-weight:900;display:flex;align-items:center;justify-content:center}
.pinbox.f{border-color:#FFD54A}
.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.key{height:52px;border-radius:12px;background:#2A3468;font-size:22px;font-weight:800}
/* Labor */
.labgrid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:24px;padding:22px 26px}
.labcol{display:flex;flex-direction:column;gap:11px}
.labitem{background:#222B55;border-radius:14px;padding:15px 18px;display:flex;justify-content:space-between;align-items:center;font-size:18px;font-weight:700;border:3px solid transparent;text-align:left;width:100%}
.labitem.big{flex-direction:column;align-items:flex-start;gap:4px;padding:18px 20px}
.labitem .sub{font-size:15px;color:#8E9BD6;font-weight:600}
.labitem.next{border-color:#FFD54A}
.labitem.locked{opacity:.45}
.labitem .ok{color:#3DD6B5;font-size:16px}
.labitem .go{color:#FFD54A;font-size:16px}
.game1{background:linear-gradient(135deg,#2A3468,#3A2A68)}
.game2{background:linear-gradient(135deg,#2A3468,#2A4A68)}
/* Pause */
.pause{position:fixed;inset:0;background:#0F1530;z-index:90;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;text-align:center}
/* Lehrer */
.light{background:#F4F5FA;color:#1B1E2E;min-height:100%}
.light .top{background:#fff;border-color:#E3E6F0}
.light .eyebrow{color:#6B74A0}
.light .btn.ghost{background:#EEF0F8;color:#1B1E2E}
.light .card{background:#fff}
.tbl{width:100%;border-collapse:separate;border-spacing:0 6px;font-size:16px}
.tbl td,.tbl th{padding:8px 6px;text-align:left}
.tbl th{color:#6B74A0;font-size:12px;text-transform:uppercase;letter-spacing:.06em}
.tbl tr.row td{background:#fff}
.tbl tr.row td:first-child{border-radius:12px 0 0 12px}.tbl tr.row td:last-child{border-radius:0 12px 12px 0}
.dot{display:inline-block;width:26px;height:26px;border-radius:7px;background:#E3E6F0}
.d1{background:#FFD54A}.d2{background:#7FD8C4}.d3{background:#2BB596}
.inp{height:48px;border-radius:12px;border:2px solid #D5D9EA;padding:0 14px;font-size:17px;background:#fff;color:#1B1E2E}
textarea.inp{height:auto;padding:10px 14px}
.codecards{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.codecard{border:2px dashed #999;border-radius:12px;padding:12px;text-align:center;color:#111;background:#fff}
.codecard b{display:block;font-size:30px;letter-spacing:4px}
@media print{ .noprint{display:none!important} body,html,.light{background:#fff} .codecards{grid-template-columns:repeat(3,1fr)} }
/* kleinere Bildschirme */
@media (max-width:1100px){ .side{width:300px} .labgrid{grid-template-columns:1fr 1fr} }
@media (max-width:820px){ .main{flex-direction:column} .side{width:auto;border-left:0;border-top:1px solid #27305C} .labgrid{grid-template-columns:1fr} }
