/* Lehrzeug Notenblick – werkzeugeigenes Design. Gemeinsames Design: /kern/kern.css */

/* =====================================================================
   Losomat
   ===================================================================== */
.hero-compact { padding: 44px 0 24px; }
.los-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.los-class { padding: 20px; display: grid; gap: 14px; }
.panel-title { margin: 0; font-size: 1.15rem; }
.class-row { display: flex; gap: 6px; align-items: center; }
.class-row .select-wrap { flex: 1; min-width: 0; }
.class-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.small { font-size: 13px; }
.roster-box { display: grid; gap: 6px; }
.roster-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.presence { margin: 0; font-weight: 700; }
.roster { list-style: none; margin: 0; padding: 4px; max-height: 330px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.roster li { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 8px; }
.roster li:hover { background: var(--sunken); }
.roster input { width: 18px; height: 18px; margin: 0; accent-color: var(--teal); flex: none; cursor: pointer; }
.roster label { cursor: pointer; flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14.5px; }
.roster li.is-absent label { color: var(--ink-3); text-decoration: line-through; }
.drop-zone { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 20px 14px; border: 2px dashed var(--line-2); border-radius: 14px; background: var(--surface-2); cursor: pointer; transition: border-color .15s, background-color .15s, transform .15s; }
.drop-zone:hover, .drop-zone:focus-visible { border-color: var(--teal); background: var(--teal-soft); }
.drop-zone .drop-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--teal-soft); color: var(--teal-ink); }
.drop-zone.is-compact { padding: 12px; gap: 2px; }
.drop-zone.is-compact .drop-ico { display: none; }
body.is-dragging .drop-zone { border-color: var(--teal); background: var(--teal-soft); transform: scale(1.02); }
body.is-dragging::after { content: "Datei loslassen, um die Klassenliste einzulesen"; position: fixed; inset: 0; z-index: 600; display: grid; place-items: center; background: rgba(10, 127, 104, .88); color: #fff; font-size: 1.5rem; font-weight: 700; pointer-events: none; }
.more summary { cursor: pointer; font-weight: 500; font-size: 14px; color: var(--ink-2); padding: 4px 0; }
.more[open] { display: grid; gap: 12px; }

.los-main { padding: 0; overflow: hidden; }
.tabs-bar { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs-bar [role="tab"] { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 11px 14px 10px; color: var(--ink-2); font-weight: 500; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; border-radius: 10px 10px 0 0; }
.tabs-bar [role="tab"]:hover { color: var(--ink); background: var(--sunken); }
.tabs-bar [role="tab"][aria-selected="true"] { color: var(--teal-ink); border-bottom-color: var(--teal); }

.stage-wrap { padding: 16px 16px 0; }
.stage { position: relative; display: flex; height: clamp(320px, 48vh, 540px); border-radius: 18px; background: #071B4A; color: #fff; overflow: hidden; box-shadow: 0 18px 40px -24px rgba(5, 16, 30, .8); }
.stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 260px at 85% -10%, rgba(18, 199, 163, .22), transparent 70%), radial-gradient(500px 240px at 0% 110%, rgba(46, 124, 246, .18), transparent 70%); pointer-events: none; }
.stage-inner { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 18px; }
.stage-idle { text-align: center; display: grid; justify-items: center; gap: 6px; max-width: 520px; }
.stage-logo { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 26px; background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .16); color: #F5A623; font-size: 3rem; font-weight: 700; margin-bottom: 8px; }
.stage-title { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; letter-spacing: -.02em; }
.stage-text { margin: 0; color: rgba(255, 255, 255, .72); }
.stage-names { width: 100%; height: 100%; display: grid; gap: 14px; }
.stage-names.n2 { grid-template-columns: 1fr 1fr; }
.stage-names.n3 { grid-template-columns: 1fr 1fr 1fr; }
.stage-names.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.name-box { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; overflow: hidden; border-radius: 16px; }
.stage-names:not(.n1) .name-box { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); }
.stage-name { display: block; font-weight: 700; line-height: 1.12; white-space: nowrap; letter-spacing: -.02em; text-shadow: 0 0 40px rgba(18, 199, 163, .35); }

.reels { width: 100%; height: 100%; display: grid; gap: 14px; }
.reels.n2 { grid-template-columns: 1fr 1fr; }
.reels.n3 { grid-template-columns: 1fr 1fr 1fr; }
.reels.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.reel { position: relative; overflow: hidden; min-height: 0; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); }
.reel-strip { will-change: transform; }
.reel-item { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.reel-item span { font-weight: 700; white-space: nowrap; line-height: 1.12; }

.cards { width: 100%; height: 100%; display: grid; gap: 16px; justify-items: center; align-items: center; }
.cards.n2 { grid-template-columns: 1fr 1fr; }
.cards.n3 { grid-template-columns: 1fr 1fr 1fr; }
.cards.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.flip { perspective: 1400px; width: 100%; height: 100%; max-width: 640px; min-height: 0; }
.cards.n1 .flip { width: min(640px, 92%); height: 82%; }
.flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.flip-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 18px; -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden; padding: 0 14px; }
.flip-front { background: linear-gradient(135deg, #0A7F68, #075E4D); border: 3px solid rgba(255, 255, 255, .22); box-shadow: inset 0 0 0 10px rgba(255, 255, 255, .06); }
.flip-q { font-size: clamp(3rem, 9vw, 7rem); font-weight: 700; color: #F5A623; }
.flip-back { background: #FFFFFF; transform: rotateY(180deg); }
.flip-back .stage-name { color: #071B4A; text-shadow: none; }

.wheel-box { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.wheel { display: block; border-radius: 50%; box-shadow: 0 0 0 6px rgba(255, 255, 255, .12), 0 20px 50px -20px rgba(0, 0, 0, .8); }
.wheel-pointer { position: absolute; top: 2px; left: 50%; margin-left: -15px; width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 30px solid #F5A623; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); }
.wheel-result { position: absolute; left: 0; right: 0; bottom: 5%; display: flex; justify-content: center; pointer-events: none; }
.wheel-result .stage-name { background: #FFFFFF; color: #071B4A; text-shadow: none; padding: .2em .9em; border-radius: 99px; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .6); }

.g-grid { width: 100%; max-height: 100%; overflow: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-content: start; padding: 2px; }
.g-grid.g7 .g-card, .g-grid.g8 .g-card { padding: 9px 12px; }
.g-grid.g7 .g-card li, .g-grid.g8 .g-card li { font-size: .95rem; }
.g-card { background: #FFFFFF; color: #071B4A; border-radius: 14px; padding: 12px 14px; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .7); }
.g-title { margin: 0 0 6px; font-weight: 700; color: #08735E; font-size: .95rem; }
.g-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.g-card li { font-weight: 500; font-size: 1.05rem; }
.g-card li.is-speaker { font-weight: 700; }
.speaker-tag { display: inline-block; font-size: .7rem; font-weight: 500; padding: 1px 7px; border-radius: 99px; background: #FFF2DC; color: #6B4500; vertical-align: .15em; }

.order-list { list-style: none; margin: 0; padding: 0; width: 100%; max-height: 100%; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 22px; align-content: start; counter-reset: ord; }
.order-list.is-cols { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 5px 16px; }
.order-list.is-cols li { font-size: 1rem; gap: 9px; }
.order-list.is-cols li::before { width: 26px; height: 26px; font-size: .8rem; }
.order-list li { counter-increment: ord; display: flex; align-items: center; gap: 12px; font-size: 1.15rem; font-weight: 500; min-width: 0; }
.order-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-list li::before { content: counter(ord); flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #F5A623; color: #071B4A; font-weight: 700; font-size: .9rem; }

.timer-face { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.timer-digits { font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.timer-face .timer-digits { max-height: 70%; }
.timer-bar { width: min(560px, 80%); height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .14); overflow: hidden; flex: none; }
.timer-bar span { display: block; height: 100%; background: #12C7A3; transform-origin: left center; transition: transform .25s linear; }
.timer-face.is-low .timer-digits { color: #F5A623; }
.timer-face.is-low .timer-bar span { background: #F5A623; }
.timer-face.is-end .timer-digits { color: #FF998B; animation: pulse 1s ease-in-out infinite; }

.think { position: absolute; top: 14px; right: 14px; width: 64px; height: 64px; }
.think svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.think circle { fill: none; stroke-width: 4; }
.think-bg { stroke: rgba(255, 255, 255, .15); }
.think-arc { stroke: #F5A623; stroke-linecap: round; transition: stroke-dashoffset .2s linear; }
.think span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; color: #fff; }

.stage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 0 16px; }
.stage-status { margin: 0; color: var(--ink-3); font-size: 14px; }
.stage-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.blackout { position: fixed; inset: 0; z-index: 700; background: #000; display: flex; align-items: flex-end; justify-content: center; cursor: pointer; }
.blackout span { color: rgba(255, 255, 255, .55); font-size: 13px; padding: 16px; }

.stage-wrap.is-beamer { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; padding: 2vh 2vw 0; background: #050B14; }
.stage-wrap.is-beamer .stage { flex: 1; height: auto; border-radius: 22px; }
.stage-wrap.is-beamer .stage-bar { padding: 1.4vh 0 1.6vh; }
.stage-wrap.is-beamer .stage-status { color: rgba(255, 255, 255, .72); }
.stage-wrap.is-beamer .icon-btn { color: rgba(255, 255, 255, .85); }
.stage-wrap.is-beamer .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.stage-wrap.is-beamer .btn-secondary { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .28); }
.stage-wrap.is-beamer .g-card li { font-size: clamp(1.1rem, 1.9vw, 1.8rem); }
.stage-wrap.is-beamer .g-title { font-size: clamp(.95rem, 1.3vw, 1.3rem); }
.stage-wrap.is-beamer .order-list li { font-size: clamp(1.15rem, 2vw, 2rem); }
.stage-wrap.is-beamer .stage-text { font-size: 1.2rem; }
body.beamer-open { overflow: hidden; }

.panel { padding: 4px 20px 22px; display: grid; gap: 16px; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; align-items: start; }
fieldset[disabled] .seg span { opacity: .5; cursor: not-allowed; }
.seg-btn { padding: 8px 13px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--surface-2); font-size: 14px; font-weight: 500; }
.seg-btn[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-ink); box-shadow: inset 0 0 0 1px var(--teal); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper .input { width: 84px; text-align: center; font-weight: 700; padding: 9px; }
.stepper .icon-btn { border: 1.5px solid var(--line-2); font-size: 20px; font-weight: 500; }
.pot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.pot-row .hint { font-size: 14px; }
.mini-title { margin: 0 0 6px; font-size: .95rem; }
.history { border-top: 1px solid var(--line); padding-top: 14px; }
.history-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; max-height: 160px; overflow: auto; font-size: 14px; }
.h-time { color: var(--ink-3); font-variant-numeric: tabular-nums; margin-right: 6px; }
.rules { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 8px; }
.rule-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rule-row .select-wrap { flex: 1 1 150px; min-width: 0; }
.rule-amp { font-weight: 700; color: var(--ink-3); }
.chips.rule-list { list-style: none; margin: 0; padding: 0; }
.rule-chip { padding: 3px 4px 3px 12px; font-size: 13px; }
.chip-x { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); }
.chip-x:hover { background: var(--line); color: var(--coral-ink); }
.chip-x .i { width: 14px; height: 14px; }
.timer-btns { align-self: end; }
kbd { font-family: var(--mono); font-size: .85em; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface); color: var(--ink); }
.notice.keys p + p { margin-top: 4px; }

.dlg-import { width: min(880px, calc(100% - 24px)); }
.dlg-form { padding: 22px 24px 24px; display: grid; gap: 14px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.import-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.import-grid textarea { min-height: 280px; font-size: 15px; line-height: 1.55; }
.import-preview { margin: 0; padding: 8px 10px 8px 40px; max-height: 280px; min-height: 120px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.import-preview li { padding: 1px 0; }
.pv-first { font-weight: 500; }
.pv-last { color: var(--ink-3); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.qr-big { width: min(330px, 78vw); height: auto; aspect-ratio: 1; }
.print-area { display: none; }

@media (max-width: 980px) {
  .los-grid { grid-template-columns: minmax(0, 1fr); }
  .roster { max-height: 220px; }
}
@media (max-width: 760px) {
  .stage { height: 300px; }
  .stage-wrap { padding: 12px 12px 0; }
  .panel { padding: 4px 14px 18px; }
  .tabs-bar [role="tab"] span { font-size: 14px; }
  .import-grid { grid-template-columns: minmax(0, 1fr); }
  .import-grid textarea { min-height: 160px; }
  .stage-primary { flex: 1 1 100%; }
  .stage-tools { margin-left: 0; }
}
@media print {
  body * { visibility: hidden !important; }
  .print-area, .print-area * { visibility: visible !important; }
  .print-area { display: block !important; position: absolute; left: 0; top: 0; width: 100%; color: #000; font-family: var(--font); }
  .print-area h1 { font-size: 20pt; margin: 0 0 12pt; }
  .print-area section { break-inside: avoid; margin-bottom: 12pt; }
  .print-area h2 { font-size: 13pt; margin: 0 0 4pt; }
  .print-area ul { margin: 0; padding-left: 16pt; }
  .print-area li { font-size: 12pt; line-height: 1.5; }
}

/* ---------- Ziehungsarten-Auswahl ---------- */
.mode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.mode { position: relative; }
.mode input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.mode span { display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface-2); text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s, transform .1s; }
.mode span .i { width: 26px; height: 26px; color: var(--ink-2); }
.mode b { font-weight: 500; font-size: 13px; line-height: 1.25; }
.mode:hover span { border-color: var(--teal); }
.mode input:checked + span { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-ink); box-shadow: inset 0 0 0 1px var(--teal); }
.mode input:checked + span .i { color: var(--teal-ink); }
.mode input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.role-grid { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.role-grid .check { font-size: 14px; }
.work-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.work-row .select-wrap { min-width: 150px; }
.quick-row { margin-top: 2px; }

/* ---------- Themen der Bühne ---------- */
.stage[data-theme="space"] { background: #070A1F; }
.stage[data-theme="space"]::before { background: radial-gradient(1.5px 1.5px at 10% 20%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 30% 70%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 55% 30%, #cfe 50%, transparent 51%), radial-gradient(1px 1px at 75% 85%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 88% 15%, #ffd 50%, transparent 51%), radial-gradient(1px 1px at 42% 48%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 65% 60%, #fff 50%, transparent 51%), radial-gradient(500px 300px at 80% 0%, rgba(124, 77, 255, .35), transparent 70%); background-size: 260px 260px, 310px 310px, 280px 280px, 330px 330px, 360px 360px, 210px 210px, 240px 240px, 100% 100%; animation: twinkle 6s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .6; } }
.stage[data-theme="ocean"] { background: linear-gradient(180deg, #053B57, #032438); }
.stage[data-theme="ocean"]::before { background: radial-gradient(600px 220px at 20% 0%, rgba(18, 199, 163, .3), transparent 70%), radial-gradient(500px 260px at 100% 100%, rgba(46, 124, 246, .35), transparent 70%); }
.stage[data-theme="autumn"] { background: linear-gradient(160deg, #3A1C0B, #241006); }
.stage[data-theme="autumn"]::before { background: radial-gradient(520px 260px at 85% 0%, rgba(245, 166, 35, .35), transparent 70%), radial-gradient(420px 220px at 0% 100%, rgba(242, 96, 79, .3), transparent 70%); }
.stage[data-theme="winter"] { background: linear-gradient(180deg, #13294B, #071B4A); }
.stage[data-theme="winter"]::before { background-image: radial-gradient(3px 3px at 20px 30px, rgba(255, 255, 255, .9) 50%, transparent 51%), radial-gradient(2px 2px at 90px 80px, rgba(255, 255, 255, .8) 50%, transparent 51%), radial-gradient(3px 3px at 150px 140px, rgba(255, 255, 255, .7) 50%, transparent 51%), radial-gradient(2px 2px at 60px 170px, rgba(255, 255, 255, .8) 50%, transparent 51%); background-size: 200px 200px; animation: snow 14s linear infinite; }
@keyframes snow { from { background-position: 0 0; } to { background-position: 40px 400px; } }
.stage[data-theme="neon"] { background: linear-gradient(135deg, #1B0533, #0A0320); }
.stage[data-theme="neon"]::before { background: radial-gradient(520px 260px at 90% 0%, rgba(255, 46, 196, .35), transparent 70%), radial-gradient(520px 260px at 0% 100%, rgba(0, 229, 255, .3), transparent 70%); }
.stage[data-theme="neon"] .stage-name { text-shadow: 0 0 18px rgba(255, 46, 196, .7), 0 0 40px rgba(0, 229, 255, .4); }

.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.stage-clock { position: absolute; right: 14px; bottom: 14px; z-index: 6; padding: 6px 14px; border-radius: 99px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: #fff; font-weight: 700; font-size: clamp(1rem, 2.2vw, 1.6rem); font-variant-numeric: tabular-nums; }
.stage-clock.is-low { background: #F5A623; color: #071B4A; }
.stage-clock.is-end { background: #F2604F; color: #fff; animation: pulse 1s ease-in-out infinite; }

/* ---------- Kacheln (Scheinwerfer, Letzter bleibt) ---------- */
.tiles { width: 100%; height: 100%; display: grid; gap: 8px; align-content: stretch; }
.tile { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; overflow: hidden; border-radius: 10px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); font-weight: 700; white-space: nowrap; padding: 0 6px; transition: background-color .08s, color .08s, transform .2s, opacity .35s; }
.tile.is-lit { background: #F5A623; color: #071B4A; border-color: #F5A623; box-shadow: 0 0 30px rgba(245, 166, 35, .7); transform: scale(1.06); }
.tile.is-out { opacity: .08; transform: scale(.8); }
.tile.is-win { background: #12C7A3; color: #071B4A; transform: scale(1.12); box-shadow: 0 0 40px rgba(18, 199, 163, .8); }
.tiles.is-dim .tile:not(.is-win) { opacity: .15; }

/* ---------- Wettrennen ---------- */
.race { width: 100%; height: 100%; display: grid; gap: 6px; position: relative; }
.lane { position: relative; display: grid; grid-template-columns: minmax(80px, 22%) 1fr; align-items: center; gap: 10px; min-height: 0; }
.lane-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.track { position: relative; height: 70%; min-height: 14px; border-radius: 99px; background: rgba(255, 255, 255, .07); border-right: 4px dashed rgba(255, 255, 255, .5); }
.runner { position: absolute; top: 50%; left: 0; width: var(--rs, 34px); height: var(--rs, 34px); margin-top: calc(var(--rs, 34px) / -2); border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: calc(var(--rs, 34px) * .45); color: #071B4A; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); will-change: transform; }
.lane.is-win .lane-name { color: #12C7A3; }

/* ---------- Lottokugeln ---------- */
.lotto-box { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.lotto-box canvas { display: block; }
.stage-names.balls .name-box { border-radius: 999px; background: #FFFFFF; border: 0; box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .12), 0 16px 34px -14px rgba(0, 0, 0, .8); padding: 0 4%; }
.stage-names.balls .stage-name { color: #071B4A; text-shadow: none; }
.stage-names.balls.n1 .name-box { width: min(92%, 900px); height: 62%; justify-self: center; align-self: center; }

/* ---------- Rubbellos ---------- */
.scratch-box { position: relative; width: min(760px, 94%); height: 72%; border-radius: 22px; background: #FFFFFF; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 20px 44px -18px rgba(0, 0, 0, .8); }
.scratch-box .stage-name { color: #071B4A; text-shadow: none; }
.scratch-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; transition: opacity .5s; }
.scratch-box canvas.is-gone { opacity: 0; pointer-events: none; }

/* ---------- Buchstabenrätsel ---------- */
.letters-box { display: grid; justify-items: center; gap: 18px; width: 100%; }
.letters-q { margin: 0; color: rgba(255, 255, 255, .75); font-weight: 500; font-size: clamp(1rem, 2vw, 1.5rem); }
.letters { display: flex; flex-wrap: wrap; justify-content: center; gap: .18em; font-weight: 700; line-height: 1; }
.letter { display: grid; place-items: center; width: .82em; height: 1.15em; border-bottom: .08em solid rgba(255, 255, 255, .55); }
.letter.is-space { border-bottom-color: transparent; width: .4em; }
.letter.is-open { color: #FFFFFF; border-bottom-color: #12C7A3; animation: pop .35s ease; }

/* ---------- Joker ---------- */
.flip-back.is-joker { background: linear-gradient(135deg, #FFE08A, #F5A623); }
.flip-front.is-joker { background: linear-gradient(135deg, #7C4DFF, #4A1FB8); }
.joker-text { display: grid; gap: .3em; text-align: center; color: #071B4A; padding: 0 6%; }
.joker-text small { font-size: .38em; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #6B4500; }
.joker-text span { font-weight: 700; line-height: 1.15; }

/* ---------- Gruppen-Erweiterungen ---------- */
.g-card { position: relative; border-top: 6px solid var(--gc, #0A7F68); }
.g-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; }
.g-head .g-title { margin: 0; }
.g-card li { cursor: pointer; border-radius: 6px; padding: 1px 4px; margin: 0 -4px; }
.g-card li:hover { background: #EEF4F2; }
.g-card li.is-picked { background: #F5A623; color: #071B4A; }
.role-tag { display: inline-block; font-size: .68rem; font-weight: 500; padding: 1px 7px; border-radius: 99px; background: #E6EFFE; color: #1F5FCB; margin-left: 4px; vertical-align: .15em; white-space: nowrap; }
.role-tag[data-role="speaker"] { background: #FFF2DC; color: #6B4500; }
.role-tag[data-role="time"] { background: #FDEBE8; color: #A3321F; }
.role-tag[data-role="writer"] { background: #E1F7F1; color: #08735E; }
.role-tag[data-role="lead"] { background: #EFE7FF; color: #5A2DB5; }
.score { display: flex; align-items: center; gap: 4px; }
.score b { min-width: 2ch; text-align: center; font-size: 1.15rem; color: #071B4A; }
.score button { width: 28px; height: 28px; border-radius: 8px; border: 1.5px solid #D2DBE5; background: #F7FAFC; color: #071B4A; font-weight: 700; line-height: 1; }
.score button:hover { border-color: #0A7F68; }
.g-card.is-lead { box-shadow: 0 0 0 3px #F5A623, 0 10px 24px -14px rgba(0, 0, 0, .7); }
.g-card.is-lead .g-title::after { content: " ★"; color: #C97F00; }
.g-card.is-lit { box-shadow: 0 0 0 4px #F5A623, 0 0 40px rgba(245, 166, 35, .7); transform: scale(1.03); }
.g-card.is-chosen { box-shadow: 0 0 0 5px #12C7A3, 0 0 50px rgba(18, 199, 163, .8); transform: scale(1.05); z-index: 2; }
.g-grid.is-dim .g-card:not(.is-chosen) { opacity: .35; }
.g-card { transition: transform .15s, box-shadow .15s, opacity .3s; }
.stage-wrap.is-beamer .role-tag { font-size: clamp(.7rem, 1vw, 1rem); }
.joker-text .jt { font-size: clamp(1.6rem, 5vw, 4.2rem); }
.joker-text .js { font-size: clamp(.95rem, 2vw, 1.7rem); font-weight: 500; }

/* ---------- Timer-Darstellungen ---------- */
.timer-face.ts-ring { display: grid; place-items: center; }
.timer-face.ts-ring > * { grid-area: 1 / 1; }
.tv { display: block; height: 86%; width: auto; max-width: 100%; overflow: visible; }
.ts-pie .tv, .ts-hourglass .tv { height: 74%; }
.tv-bg { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 14; }
.tv-arc { fill: none; stroke: #12C7A3; stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s; }
.tv-disc { fill: rgba(255, 255, 255, .1); }
.tv-pie { fill: #12C7A3; transition: fill .3s; }
.tv-glass { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .75); stroke-width: 4; stroke-linejoin: round; }
.tv-cap { fill: #C9A227; }
.tv-sand { fill: #F5A623; }
.tv-stream { stroke: #F5A623; stroke-width: 3; stroke-dasharray: 4 5; animation: sand .4s linear infinite; }
@keyframes sand { to { stroke-dashoffset: -9; } }
.timer-face.is-low .tv-arc { stroke: #F5A623; }
.timer-face.is-low .tv-pie { fill: #F5A623; }
.timer-face.is-end .tv-arc, .timer-face.is-end .tv-pie { stroke: #FF998B; fill: #FF998B; }
.timer-face.is-end .tv-arc { fill: none; }
/* ---------- Bewegte Hintergründe, Branding ---------- */
.bg-layer { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.stage-inner, .think, .stage-clock { z-index: 2; }
.beamer-brand { display: none; align-items: center; gap: 8px; opacity: .8; }
.beamer-brand .logo-img { width: 30px; height: 30px; }
.beamer-brand .wordmark { width: 96px; height: 21px; background: #FFFFFF; }
.stage-wrap.is-beamer .beamer-brand { display: flex; margin-left: auto; }
.stage-wrap.is-beamer .stage-tools { margin-left: 16px; }
.back-link { margin: 0 0 18px; }
#resetAll { justify-self: start; }

/* =====================================================================
   Notenblick
   ===================================================================== */
.nb-grid { display: grid; grid-template-columns: minmax(330px, 440px) minmax(0, 1fr); gap: 20px; align-items: start; }
.nb-input { padding: 20px; display: grid; gap: 14px; }
.nb-main { position: sticky; top: 76px; }
.nb-sec { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 14px 0 0; display: grid; gap: 10px; min-width: 0; }
.nb-sec-title { font-weight: 700; font-size: 1rem; padding: 0; margin-bottom: 4px; }
details.nb-sec summary { font-weight: 700; font-size: 1rem; color: var(--ink); }
.grade-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grade-inputs.many { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gi { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px; padding: 6px 6px 6px 10px; border-radius: 12px; background: var(--surface-2); border: 1.5px solid var(--line-2); border-left: 6px solid var(--gc, #0A7F68); }
.gi label { font-weight: 700; font-size: 15px; min-width: 2.2ch; }
.gi-ctl { display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
.gi input { width: 3.2em; text-align: center; font-weight: 700; padding: 6px 2px; border-radius: 8px; border: 1.5px solid var(--line-2); background: var(--surface); }
.gi button { width: 26px; height: 26px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-2); font-weight: 700; font-size: 16px; }
.gi button:hover { background: var(--sunken); color: var(--ink); }
.nb-stats { margin: 0; font-weight: 500; font-size: 14px; color: var(--ink-2); }
.nb-avg-field .input { max-width: 140px; }
.teacher-hints { display: grid; gap: 8px; }
.teacher-hints:empty { display: none; }
.th { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; background: var(--yellow-soft); color: var(--yellow-ink); }
.th.is-red { background: var(--coral-soft); color: var(--coral-ink); }
.th.is-ok { background: var(--teal-soft); color: var(--teal-ink); }
.th .i { margin-top: 2px; flex: none; }
.th b { font-weight: 700; }
.task-list, .work-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.task-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; gap: 6px; align-items: center; }
.task-row .input { padding: 8px 10px; font-size: 14.5px; }
.key-rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.key-rows .gi input { width: 4em; }
.work-list li { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.work-list li.is-current { border-color: var(--teal); background: var(--teal-soft); }
.work-list .wl-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-list .wl-meta small { color: var(--ink-3); margin-left: 6px; }
.work-list .wl-btns { display: flex; gap: 4px; flex: none; }

/* ---------- Folien ---------- */
.nb-slide { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2%; min-height: 0; text-align: center; }
.nb-kicker { margin: 0; color: #12C7A3; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: clamp(.8rem, 1.6vw, 1.15rem); }
.nb-big { margin: 0; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; font-size: clamp(2rem, 7vw, 6rem); }
.nb-sub { margin: 0; color: rgba(255, 255, 255, .75); font-size: clamp(1rem, 2.2vw, 1.6rem); }
.nb-title { margin: 0; font-weight: 700; font-size: clamp(1.1rem, 2.6vw, 2rem); letter-spacing: -.01em; }
.nb-chart { width: 100%; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.nb-bars { flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2%; align-items: end; padding: 0 2%; }
.nb-col { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.nb-track { width: 100%; flex: 1; display: flex; align-items: flex-end; min-height: 0; }
.nb-bar { width: 100%; border-radius: 10px 10px 4px 4px; transform-origin: bottom center; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .12); }
.nb-bar.is-masked { background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .28) 0 8px, transparent 8px 16px); opacity: .75; }
.nb-count { font-weight: 700; font-size: clamp(.9rem, 2.4vw, 2rem); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nb-label { font-weight: 700; font-size: clamp(.85rem, 2vw, 1.6rem); white-space: nowrap; }
.nb-caption { margin: 0; color: rgba(255, 255, 255, .72); font-size: clamp(.85rem, 1.6vw, 1.2rem); text-align: center; }
.nb-dots { flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2%; align-items: end; padding: 0 2%; }
.nb-dotcol { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.nb-dotstack { display: flex; flex-wrap: wrap-reverse; justify-content: center; align-content: flex-start; gap: 4px; width: 100%; }
.nb-dot { width: var(--ds, 18px); height: var(--ds, 18px); border-radius: 50%; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.nb-dot.is-masked { border: 3px dashed rgba(255, 255, 255, .7); background: transparent !important; box-shadow: none; display: grid; place-items: center; font-size: .55em; font-weight: 700; }
.nb-svg { width: 100%; flex: 1; min-height: 0; overflow: visible; }
.nb-donut-wrap { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; gap: 4%; }
.nb-donut-wrap svg { height: 100%; max-height: 100%; width: auto; aspect-ratio: 1; }
.nb-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: left; font-size: clamp(.85rem, 1.8vw, 1.4rem); font-weight: 500; }
.nb-legend li { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.nb-legend i { width: 18px; height: 18px; border-radius: 5px; flex: none; }
.nb-board { display: flex; gap: .08em; font-size: clamp(3rem, 15vw, 11rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.nb-board span { display: grid; place-items: center; min-width: .66em; padding: .06em .04em; border-radius: .12em; background: linear-gradient(180deg, #1C2C44 0 49%, #142338 51% 100%); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08); }
.nb-board span.is-sep { min-width: .3em; background: none; box-shadow: none; }
.nb-delta { margin: 0; font-weight: 500; font-size: clamp(.95rem, 2vw, 1.5rem); padding: .3em .9em; border-radius: 99px; background: rgba(18, 199, 163, .16); color: #7FF0CF; }
.nb-delta.is-down { background: rgba(245, 166, 35, .16); color: #FFD27A; }
.nb-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; width: 100%; max-width: 1100px; }
.nb-fact { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; padding: 18px 16px; display: grid; gap: 6px; }
.nb-fact b { font-size: clamp(1.8rem, 4.6vw, 3.6rem); line-height: 1; color: #12C7A3; }
.nb-fact span { color: rgba(255, 255, 255, .85); font-size: clamp(.9rem, 1.7vw, 1.3rem); }
.nb-tasks { width: 100%; max-width: 1100px; display: grid; gap: 1.6vh; }
.nb-task { display: grid; grid-template-columns: minmax(80px, 26%) 1fr auto; gap: 14px; align-items: center; font-size: clamp(.9rem, 2vw, 1.5rem); text-align: left; }
.nb-task .tn { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-task .tt { height: clamp(14px, 3.2vh, 34px); border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.nb-task .tb { height: 100%; border-radius: 99px; transform-origin: left center; }
.nb-task .tp { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 4ch; text-align: right; }
.nb-task .tag { display: inline-block; margin-left: 8px; font-size: .6em; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #12C7A3; color: #071B4A; vertical-align: .2em; }
.nb-task .tag.is-hard { background: #F5A623; }
.nb-key { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: 100%; max-width: 900px; }
.nb-keyc { border-radius: 16px; padding: 14px; background: rgba(255, 255, 255, .07); border-top: 6px solid var(--gc, #0A7F68); display: grid; gap: 4px; }
.nb-keyc b { font-size: clamp(1.6rem, 4vw, 3rem); line-height: 1; }
.nb-keyc span { color: rgba(255, 255, 255, .85); font-size: clamp(.85rem, 1.7vw, 1.25rem); }
.nb-comment { max-width: 1000px; display: grid; justify-items: center; gap: 2vh; }
.nb-cico { display: grid; place-items: center; width: clamp(56px, 9vh, 96px); height: clamp(56px, 9vh, 96px); border-radius: 26px; background: rgba(18, 199, 163, .16); color: #12C7A3; }
.nb-cico .i { width: 55%; height: 55%; }
.nb-cico.is-trap { background: rgba(245, 166, 35, .16); color: #F5A623; }
.nb-cico.is-tip { background: rgba(46, 124, 246, .2); color: #7DB5FF; }
.nb-ctext { margin: 0; font-size: clamp(1.15rem, 3.2vw, 2.6rem); line-height: 1.35; white-space: pre-wrap; font-weight: 500; }
.nb-trend { width: 100%; flex: 1; min-height: 0; }
@media (max-width: 1100px) { .nb-grid { grid-template-columns: minmax(0, 1fr); } .nb-main { position: static; } }
@media (max-width: 760px) { .grade-inputs, .grade-inputs.many, .key-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nb-key { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
