/* Lehrzeug Zeitwerk – werkzeugeigenes Design. Gemeinsames Design: /kern/kern.css */
.zw-grid { grid-template-columns: 340px minmax(0, 1fr); }
.zw-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.zw-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.zw-modes label { position: relative; }
.zw-modes input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.zw-modes span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 8px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface-2); font-size: 12.5px; font-weight: 500; cursor: pointer; text-align: center; position: relative; }
.zw-modes span .i { width: 22px; height: 22px; color: var(--ink-2); }
.zw-modes kbd { position: absolute; top: 4px; right: 5px; font-size: 10px; padding: 0 4px; border-width: 1px; opacity: .6; }
.zw-modes input:checked + span { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-ink); box-shadow: inset 0 0 0 1px var(--teal); }
.zw-modes input:checked + span .i { color: var(--teal-ink); }
.zw-modes input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.zw-unit { display: flex; align-items: center; gap: 8px; }
.zw-unit span { color: var(--ink-3); font-size: 14px; }
.zw-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.zw-dot.is-y { background: #F5A623; }
.zw-dot.is-r { background: #F2604F; }

.zw-main { padding: 16px; }
.zw-stage-wrap { display: grid; gap: 12px; }
.zw-stage { position: relative; height: clamp(380px, 62vh, 640px); border-radius: 20px; background: radial-gradient(800px 380px at 85% -10%, rgba(18, 199, 163, .2), transparent 70%), radial-gradient(600px 300px at 0% 110%, rgba(155, 89, 255, .2), transparent 70%), #071B4A; color: #fff; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 18px 18px 40px; box-shadow: 0 18px 40px -24px rgba(5, 16, 30, .8); }
.zw-stage[data-phase="warn"] { background-color: #1D2350; }
.zw-stage[data-phase="crit"], .zw-stage[data-phase="end"] { background-color: #2A1840; }
.zw-task { margin: 0; font-size: clamp(1.1rem, 2.6vw, 2rem); font-weight: 700; text-align: center; letter-spacing: -.01em; max-width: 92%; color: #FFFFFF; }
.zw-vis { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.zw-svg { height: 100%; max-height: 100%; width: auto; max-width: 100%; display: block; overflow: visible; }
.zw-stage[data-mode="balken"] .zw-svg { width: 100%; height: auto; }
.zw-num { font-family: var(--font); }
.zw-digits { margin: 0; font-weight: 700; font-size: clamp(2.2rem, 7vw, 4.4rem); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: #FFFFFF; }
.zw-stage[data-mode="digital"] .zw-vis { display: none; }
.zw-stage[data-mode="digital"] .zw-digits { font-size: clamp(5rem, 19vw, 15rem); }
.zw-stage[data-phase="warn"] .zw-digits { color: #F5A623; }
.zw-stage[data-phase="crit"] .zw-digits, .zw-stage[data-phase="end"] .zw-digits { color: #FF8B7E; }
.zw-stage.is-over .zw-digits { color: #FF8B7E; }
.zw-stage[data-phase="end"]:not(.is-calm) .zw-digits { animation: pulse 1.2s ease-in-out infinite; }
.zw-status { margin: 0; min-height: 1.4em; color: rgba(255, 255, 255, .78); font-size: clamp(.95rem, 1.8vw, 1.25rem); font-weight: 500; text-align: center; }
.zw-brand { position: absolute; left: 16px; bottom: 12px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255, 255, 255, .55); font-weight: 500; }
.zw-brand .logo-img { width: 24px; height: 24px; }
.zw-flash { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; }
.zw-flash.is-on { animation: zwflash 1s ease-in-out 3; }
@keyframes zwflash { 0%, 100% { box-shadow: inset 0 0 0 0 rgba(242, 96, 79, 0); } 50% { box-shadow: inset 0 0 0 18px rgba(242, 96, 79, .85); } }
.zw-light.is-on { filter: drop-shadow(0 0 24px currentColor); }
.zw-stream { stroke-dasharray: 6 8; animation: zwsand .5s linear infinite; }
@keyframes zwsand { to { stroke-dashoffset: -14; } }
.zw-flame { transform-box: fill-box; }
.zw-flame:not(.is-calm) > path { transform-origin: 160px 90px; animation: zwflick 1.4s ease-in-out infinite alternate; }
@keyframes zwflick { 0% { transform: scale(1, 1) rotate(-2deg); } 50% { transform: scale(.94, 1.06) rotate(1.5deg); } 100% { transform: scale(1.03, .96) rotate(-1deg); } }
.zw-smoke { stroke-dasharray: 8 10; animation: zwsand 1.2s linear infinite; }
.zw-wave:not(.is-calm) { animation: zwwave 2.4s linear infinite; }
@keyframes zwwave { to { transform: translateX(-40px); } }
.zw-bubbles circle { animation: zwbub 4s ease-in infinite; }
.zw-bubbles circle:nth-child(2) { animation-delay: 1.2s; }
.zw-bubbles circle:nth-child(3) { animation-delay: 2.1s; }
.zw-bubbles circle:nth-child(4) { animation-delay: 3s; }
@keyframes zwbub { 0% { transform: translateY(0); opacity: .6; } 100% { transform: translateY(-260px); opacity: 0; } }
.zw-sun { animation: zwsun 6s ease-in-out infinite alternate; transform-origin: 340px 70px; }
@keyframes zwsun { to { transform: scale(1.08); } }
.zw-stage.is-calm *, .zw-stage.is-calm .zw-digits { animation: none !important; }

.zw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.zw-plus { display: flex; gap: 2px; }
.zw-spacer { flex: 1; }
.zw-keys { margin-top: 12px; }
.zw-stage-wrap.is-full { background: #050D22; padding: 16px; height: 100vh; grid-template-rows: 1fr auto; }
.zw-stage-wrap.is-full .zw-stage { height: 100%; }
.zw-stage-wrap.is-full .zw-bar .btn-secondary, .zw-stage-wrap.is-full .zw-bar .btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .2); }
.zw-stage-wrap.is-full .icon-btn { color: #fff; }

.zw-forest { display: grid; gap: 8px; }
.zw-forest-count { margin: 0; font-size: 14px; color: var(--ink-2); }
.zw-forest-count b { font-size: 1.3rem; color: var(--teal-ink); }
.zw-trees { display: flex; flex-wrap: wrap; gap: 2px; }
.zw-tree .i { width: 22px; height: 22px; stroke-width: 2.2; }
.zw-tree.t0 { color: #1E8A45; } .zw-tree.t1 { color: #2FAE5C; } .zw-tree.t2 { color: #0B8F74; } .zw-tree.t3 { color: #46C774; }
.zw-more { font-size: 13px; color: var(--ink-3); align-self: center; margin-left: 4px; }
@media (max-width: 980px) { .zw-grid { grid-template-columns: minmax(0, 1fr); } .zw-main { order: -1; } }
@media (max-width: 520px) { .zw-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); } .zw-plus { display: none; } }
