/* Lehrzeug Klassenwelt – werkzeugeigenes Design. Gemeinsames Design: /kern/kern.css */
.kw-grid { grid-template-columns: 340px minmax(0, 1fr); }
.kw-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.kw-scenes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.kw-scenes label { position: relative; }
.kw-scenes input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.kw-scenes span { display: flex; align-items: center; gap: 8px; padding: 10px 10px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface-2); font-size: 14px; font-weight: 600; cursor: pointer; }
.kw-scenes span .i { width: 22px; height: 22px; color: var(--ink-2); flex: none; }
.kw-scenes kbd { margin-left: auto; font-size: 10px; padding: 0 4px; border-width: 1px; opacity: .55; }
.kw-scenes input:checked + span { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-ink); box-shadow: inset 0 0 0 1px var(--teal); }
.kw-scenes input:checked + span .i { color: var(--teal-ink); }
.kw-scenes input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.kw-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.kw-opt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 6px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface-2); font: inherit; font-size: 12px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.kw-opt:hover { border-color: var(--teal); }
.kw-opt[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-ink); box-shadow: inset 0 0 0 1px var(--teal); }
.kw-opt:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.kw-thumb { width: 100%; height: 64px; display: block; }
.kw-dice { width: 100%; height: 64px; display: grid; place-items: center; }
.kw-dice .i { width: 34px; height: 34px; color: var(--lila-ink, #6B3FD4); }

.kw-teamlist { display: grid; gap: 6px; margin: 8px 0; }
.kw-team { display: flex; align-items: center; gap: 8px; }
.kw-team .input { flex: 1; min-width: 0; }
.kw-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: none; }
.kw-coll-n { margin: 0 0 4px; font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.kw-coll-n b { font-size: 1.5rem; color: var(--teal-ink); }
.kw-coll-n .i { width: 20px; height: 20px; color: #F5A623; }
.kw-cups { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.kw-cups li { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.kw-cups b { color: var(--teal-ink); }

.kw-main { padding: 16px; }
.kw-wrap { display: grid; gap: 12px; }
.kw-frame { position: relative; border-radius: 22px; overflow: hidden; background: #8FD0FF; box-shadow: 0 18px 40px -22px rgba(7, 27, 74, .55), inset 0 0 0 3px rgba(255, 255, 255, .5); }
.kw-stage { width: 100%; aspect-ratio: 1000 / 600; }
.kw-svg { width: 100%; height: 100%; display: block; }
.kw-sign { position: absolute; left: 14px; top: 12px; display: flex; flex-direction: column; padding: 8px 16px 8px; border-radius: 14px; background: #B07A3F; color: #fff; border: 3px solid #8A5A2B; box-shadow: 0 6px 0 #8A5A2B, 0 12px 20px -10px rgba(0, 0, 0, .5); transform: rotate(-1.5deg); }
.kw-sign b { font-size: clamp(.95rem, 2.2vw, 1.5rem); line-height: 1.1; letter-spacing: -.01em; }
.kw-sign span { font-size: clamp(.72rem, 1.4vw, .95rem); opacity: .9; font-weight: 500; }
.kw-clock { position: absolute; right: 14px; top: 12px; min-width: 120px; padding: 8px 14px 10px; border-radius: 16px; background: rgba(7, 27, 74, .78); color: #fff; backdrop-filter: blur(4px); text-align: center; }
.kw-time { display: block; font-size: clamp(1.4rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kw-bar { display: block; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .22); overflow: hidden; margin-top: 6px; }
.kw-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #12C7A3, #FFD23F); border-radius: 4px; }
.kw-status { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); margin: 0; padding: 6px 18px; border-radius: 99px; background: rgba(255, 255, 255, .9); color: var(--navy, #071B4A); font-weight: 700; font-size: clamp(.8rem, 1.6vw, 1.1rem); box-shadow: 0 6px 18px -8px rgba(7, 27, 74, .5); white-space: nowrap; }
.kw-wrap.is-unruhe .kw-status { background: #F2604F; color: #fff; }
.kw-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kw-spacer { flex: 1; }
.kw-keys { margin-top: 12px; }
.kw-unruhe[aria-pressed="true"] { background: #F2604F; border-color: #F2604F; color: #fff; }

.kw-boosts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kw-boost { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; border: 2px solid var(--line-2); background: var(--surface); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink); }
.kw-boost b { color: var(--teal-ink); font-size: 15px; }
.kw-boost kbd { font-size: 10px; padding: 0 4px; border-width: 1px; opacity: .6; }
.kw-boost:hover:not(:disabled) { border-color: var(--teal); background: var(--teal-soft); }
.kw-boost:disabled { opacity: .5; cursor: not-allowed; }
.kw-boost:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.kw-done { position: absolute; inset: 0; display: grid; place-items: start start; padding: 86px 18px 16px; pointer-events: none; }
.kw-done[hidden] { display: none; }
.kw-done-in { pointer-events: auto; max-width: 460px; width: 100%; padding: 22px 24px; border-radius: 22px; background: #fff; text-align: center; box-shadow: 0 30px 60px -20px rgba(7, 27, 74, .6); animation: kwcard .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.kw-done-in h3 { margin: 0 0 6px; font-size: clamp(1.15rem, 2.6vw, 1.55rem); letter-spacing: -.01em; color: var(--navy, #071B4A); }
.kw-done-in p { margin: 0 0 12px; color: var(--ink-2); }
.kw-done-in .btn-row { justify-content: center; }
.kw-podium { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; text-align: left; }
.kw-podium li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }
.kw-podium small { margin-left: auto; color: var(--ink-3); }
.kw-podium li:first-child { background: #FFF4CC; font-weight: 700; }
@keyframes kwcard { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Bewegung in der Szene */
.kw-cloud { animation: kwdrift 70s linear infinite alternate; }
.kw-c2 { animation-duration: 90s; animation-direction: alternate-reverse; }
.kw-c3 { animation-duration: 110s; }
@keyframes kwdrift { from { transform: translateX(-40px); } to { transform: translateX(90px); } }
.kw-rays { animation: kwspin 60s linear infinite; }
@keyframes kwspin { to { transform: rotate(360deg); } }
.kw-spot { fill: rgba(255, 255, 255, .0); stroke: #fff; stroke-width: 3; stroke-dasharray: 7 7; opacity: .85; animation: kwspot 2.4s ease-in-out infinite; }
@keyframes kwspot { 50% { opacity: .35; } }
.kw-smoke { animation: kwsmoke 3.4s ease-out infinite; }
@keyframes kwsmoke { 0% { transform: translateY(0); opacity: .7; } 100% { transform: translateY(-26px); opacity: 0; } }
.kw-beam { animation: kwbeam 3s ease-in-out infinite alternate; transform-origin: 0 -164px; transform-box: view-box; }
@keyframes kwbeam { from { opacity: .3; } to { opacity: 1; } }
.kw-flag { animation: kwflag 1.6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: left center; }
@keyframes kwflag { from { transform: skewY(-6deg) scaleX(1); } to { transform: skewY(6deg) scaleX(.9); } }
.kw-hook { animation: kwhook 4s ease-in-out infinite alternate; transform-origin: -30px -212px; }
@keyframes kwhook { from { transform: translateX(-20px); } to { transform: translateX(22px); } }
.kw-sparkles { animation: kwsparkle 1.4s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes kwsparkle { from { opacity: .3; transform: scale(.85); } to { opacity: 1; transform: scale(1.1); } }
.kw-conf { animation: kwfall 3.4s linear forwards; }
@keyframes kwfall { to { transform: translateY(660px) rotate(540deg); } }

/* Fahrzeuge und Tiere bewegen sich nur, solange es ruhig läuft */
.kw-wheel { transform-box: fill-box; transform-origin: center; }
.kw-flame { opacity: 0; }
.kw-veh.is-boost .kw-flame { opacity: 1; }
.is-run .kw-wheel { animation: kwspin 1.8s linear infinite; }
.is-run .kw-dash { animation: none; }
@keyframes kwdash { to { stroke-dashoffset: -48; } }
.is-run .kw-bob { animation: kwbob 1.6s ease-in-out infinite alternate; }
@keyframes kwbob { to { transform: translateY(-1.5px); } }
.is-run .kw-hop { animation: kwhop 1.6s ease-in-out infinite; }
@keyframes kwhop { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-8px) rotate(-2deg); } }
.is-run .kw-trot { animation: kwtrot 1.2s ease-in-out infinite alternate; }
@keyframes kwtrot { from { transform: translateY(0) rotate(-1.5deg); } to { transform: translateY(-4px) rotate(1.5deg); } }
.is-run .kw-waddle { animation: kwwaddle 1.6s ease-in-out infinite alternate; transform-origin: 0 0; }
@keyframes kwwaddle { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
.is-done .kw-wheel { animation: kwspin 2s linear 2; }
.kw-tag text { font-family: var(--font); }
.kw-plus { font-size: 20px; font-weight: 700; fill: #FFD23F; stroke: #071B4A; stroke-width: 4px; paint-order: stroke; }
.kw-plus.is-pop { animation: kwplus .9s ease-out forwards; }
@keyframes kwplus { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-26px); } }
.kw-lane-star { paint-order: stroke; stroke: #071B4A; stroke-width: 4px; }

/* Unruhe: Gewitter */
.kw-storm { opacity: 0; pointer-events: none; transition: opacity .6s ease; }
.is-unruhe .kw-storm { opacity: 1; }
.kw-dim { opacity: .38; }
.kw-dark path { fill: #4A5675; }
.kw-drop { animation: kwrain .7s linear infinite; }
@keyframes kwrain { from { transform: translateY(-40px); opacity: 0; } 20% { opacity: 1; } to { transform: translateY(300px); opacity: .2; } }
.kw-psst { font-size: 40px; font-weight: 700; fill: #fff; stroke: #16224A; stroke-width: 6px; paint-order: stroke; }

.kw-wrap.is-full { background: #050D22; padding: 12px; height: 100vh; grid-template-rows: 1fr auto auto; align-content: center; }
.kw-wrap.is-full .kw-frame { width: min(100%, calc((100vh - 150px) * 1000 / 600)); margin: 0 auto; }
.kw-wrap.is-full .kw-boost, .kw-wrap.is-full .kw-tools .btn-secondary { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); }
.kw-wrap.is-full .icon-btn { color: #fff; }
@media (prefers-reduced-motion: reduce) { .kw-svg *, .kw-done-in { animation: none !important; } }
@media (max-width: 980px) { .kw-grid { grid-template-columns: minmax(0, 1fr); } .kw-main { order: -1; } }
@media (max-width: 520px) { .kw-picks { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kw-clock { min-width: 84px; padding: 5px 9px 7px; } .kw-sign { padding: 5px 10px; } .kw-status { font-size: .75rem; padding: 4px 12px; } }

/* Version 1.2: Bedienung mit Finger und Maus, Auswahl im Garten, Jahreszeiten */
.kw-boost, .kw-tools .btn, .kw-tools .icon-btn, .kw-sel .btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.kw-boost { min-height: 44px; }
.kw-wrap.is-full .kw-boost { padding: 12px 18px; font-size: 16px; }
.kw-wrap.is-full .kw-boost b { font-size: 18px; }
.kw-stage { touch-action: manipulation; }
.kw-item { cursor: pointer; }
.kw-selring { fill: rgba(255, 210, 63, .25); stroke: #FFD23F; stroke-width: 4; stroke-dasharray: 9 7; }
.kw-sel { position: absolute; left: 50%; top: 12px; translate: -50% 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: calc(100% - 300px); padding: 8px 10px 8px 16px; border-radius: 16px; background: rgba(255, 255, 255, .96); color: #071B4A; box-shadow: 0 10px 30px -12px rgba(7, 27, 74, .6); z-index: 3; }
.kw-sel[hidden] { display: none; }
.kw-sel p { margin: 0; font-weight: 600; font-size: 14px; }
.kw-sel-b { display: flex; gap: 6px; align-items: center; }
.kw-pt { animation: kwpt 26s linear infinite; }
.kw-pt1 { animation-duration: 31s; animation-delay: -8s; }
.kw-pt2 { animation-duration: 37s; animation-delay: -17s; }
.kw-pt3 { animation-duration: 29s; animation-delay: -23s; }
@keyframes kwpt { from { transform: translate(0, 0) rotate(0); } 50% { transform: translate(-40px, 310px) rotate(180deg); } to { transform: translate(10px, 640px) rotate(360deg); } }
.kw-wrap.is-pseudo { position: fixed; inset: 0; z-index: 2000; }
html.kw-noscroll, html.kw-noscroll body { overflow: hidden; }
@media (max-width: 1100px) { .kw-sel { max-width: calc(100% - 20px); top: auto; bottom: 50px; } }
