/* Thermalcenter 2 – Manga-Stil: dicke Tusche, Rasterpunkte, Speedlines, kräftige Flächen. */
:root {
  --kit-ink: #1a1530;
  --kit-ink-soft: #5a4f78;
  --kit-accent: #ff4f6d;
  --kit-card: #fffdf6;
  --ink: #1a1530;
  --paper: #fffdf6;
  --sun: #ffd23f;
  --sky: #5fd3ff;
  --hot: #ff4f6d;
  --text: #fffdf6;
  --manga: "Arial Black", "Helvetica Neue", Impact, var(--kit-font);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: #8fd16a; color: var(--ink); font-family: var(--kit-font); font-weight: 700;
  user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none;
}
#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
/* Rasterfolie am Bildrand wie in einem Manga-Panel */
.tone-overlay {
  position: fixed; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(26, 21, 48, .5) 1.2px, transparent 1.6px);
  background-size: 7px 7px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, transparent 62%, #000 100%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, transparent 62%, #000 100%);
  box-shadow: inset 0 0 0 4px var(--ink);
}
#app { position: relative; height: 100%; max-width: 540px; margin: 0 auto; pointer-events: none; }

.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  padding: calc(var(--safe-t) + 10px) calc(var(--safe-r) + 12px) calc(var(--safe-b) + 4px) calc(var(--safe-l) + 12px);
  opacity: 0; visibility: hidden; transform: translateY(24px) scale(.98);
  transition: opacity .3s ease, transform .45s cubic-bezier(.2, 1.4, .4, 1), visibility 0s .3s;
}
.screen.active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.screen.active > * { pointer-events: auto; }
#screen-game.active { pointer-events: none; }
#screen-game.active > .vario, #screen-game.active > .progress, #screen-game.active > .mentor { pointer-events: none; }

.topbar { display: flex; align-items: center; gap: 8px; min-height: 48px; }
.spacer { flex: 1; }
.screen-title {
  flex: 1; margin: 0; font: 900 italic 22px/1.1 var(--manga); color: var(--paper);
  -webkit-text-stroke: 1.5px var(--ink); text-shadow: 3px 3px 0 var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.icon-btn {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; border: 3px solid var(--ink); background: var(--paper);
  color: var(--ink); font: 900 18px/1 var(--kit-font); box-shadow: 0 3px 0 var(--ink); cursor: pointer; display: grid; place-items: center;
}
.icon-btn:active { transform: translateY(3px); box-shadow: none; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 12px;
  background: var(--paper); border: 3px solid var(--ink); box-shadow: 2px 3px 0 var(--ink); font-size: 14px; white-space: nowrap;
}
.star-ico { color: #f0a800; -webkit-text-stroke: 1px var(--ink); }

/* ---------- Start ---------- */
.hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; position: relative; }
.hero::before {
  /* Speedlines hinter dem Titel */
  content: ""; position: absolute; left: 50%; top: 44%; width: 170vmax; height: 170vmax; margin: -85vmax 0 0 -85vmax; z-index: -1;
  background: repeating-conic-gradient(from 0deg, rgba(255, 253, 246, .5) 0 2deg, transparent 2deg 9deg);
  -webkit-mask-image: radial-gradient(circle, transparent 11%, #000 13%, transparent 42%);
  mask-image: radial-gradient(circle, transparent 11%, #000 13%, transparent 42%);
  animation: spin 40s linear infinite; pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.title-wrap { position: relative; transform: rotate(-4deg); }
.title {
  margin: 0; font: 900 italic clamp(40px, 12.5vw, 66px)/0.95 var(--manga); letter-spacing: -1px; color: var(--paper);
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 5px 5px 0 var(--hot), 8px 9px 0 var(--ink);
  display: flex; flex-direction: column; align-items: center;
}
.title .word { display: block; white-space: nowrap; }
.title span span { display: inline-block; animation: hop 2.6s cubic-bezier(.3, 1.6, .5, 1) infinite; animation-delay: calc(var(--i) * .07s); }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-10px) rotate(-5deg); } }
.title-two {
  position: absolute; right: -34px; bottom: -30px; width: 60px; height: 60px; display: grid; place-items: center;
  font: 900 italic 40px/1 var(--manga); color: var(--ink); background: var(--sun); border: 4px solid var(--ink); border-radius: 50%;
  box-shadow: 4px 4px 0 var(--ink); animation: wobble 1.8s ease-in-out infinite;
}
@keyframes wobble { 50% { transform: rotate(14deg) scale(1.1); } }
.subtitle {
  margin: 18px 0 0; max-width: 330px; padding: 8px 14px; font-size: 16px; color: var(--ink); background: var(--paper);
  border: 3px solid var(--ink); border-radius: 4px 18px 4px 18px; box-shadow: 4px 4px 0 var(--ink); transform: rotate(1.5deg);
}
.home-stats { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.actions { display: grid; gap: 12px; margin: 0 auto 8px; width: min(100%, 340px); }
.actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn {
  font: 900 18px/1.1 var(--kit-font); padding: 15px 10px; border-radius: 6px 20px 6px 20px; border: 3px solid var(--ink); cursor: pointer;
  box-shadow: 5px 5px 0 var(--ink); color: var(--ink); background: var(--paper); transition: transform .1s;
}
.btn:active { transform: translate(5px, 5px); box-shadow: none; }
.btn-primary {
  background: var(--hot); color: #fff; font: 900 italic 28px/1 var(--manga); padding: 18px; letter-spacing: .5px;
  -webkit-text-stroke: 1px var(--ink); text-shadow: 2px 2px 0 var(--ink); animation: breathe 2s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.04) rotate(-1deg); } }

/* ---------- Panels, Listen ---------- */
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 2px 24px; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.panel {
  background: var(--paper); border: 3px solid var(--ink); border-radius: 6px; box-shadow: 5px 5px 0 var(--ink); padding: 10px 12px; margin-bottom: 14px;
}
.panel-head { margin: 0 0 6px; font: 900 italic 16px/1.2 var(--manga); }
.world { margin-bottom: 18px; }
.world-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; padding: 8px 12px;
  background: var(--ink); color: var(--paper); border-radius: 4px; transform: skewX(-8deg); font: 900 italic 17px/1.2 var(--manga);
}
.world-head > * { transform: skewX(8deg); }
.world-head small { font: 700 13px var(--kit-font); opacity: .85; white-space: nowrap; }
.level-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.lv {
  position: relative; min-height: 96px; padding: 8px 6px 6px; border: 3px solid var(--ink); border-radius: 4px; background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  font: 800 12px/1.15 var(--kit-font); color: var(--ink); text-align: center; animation: pop-in .45s cubic-bezier(.3, 1.6, .5, 1) both;
  animation-delay: calc(var(--i) * 40ms);
}
@keyframes pop-in { from { transform: scale(.6) rotate(-6deg); opacity: 0; } }
.lv:active { transform: translate(4px, 4px); box-shadow: none; }
.lv .num { font: 900 italic 24px/1 var(--manga); }
.lv .type { font-size: 18px; line-height: 1; }
.lv .name { hyphens: auto; overflow-wrap: anywhere; }
.lv .stars { font-size: 15px; letter-spacing: 1px; color: #c9c2d9; -webkit-text-stroke: .6px var(--ink); }
.lv .stars .on { color: #f0a800; }
.lv.locked { background: #d9d3e6; cursor: not-allowed; }
.lv.locked > :not(.type) { opacity: .4; }
.lv.next { background: #fff2b3; }
.lv.next::after {
  content: ""; position: absolute; inset: -8px; border: 3px dashed var(--hot); border-radius: 6px; animation: spin-dash 1.4s ease-in-out infinite; pointer-events: none;
}
@keyframes spin-dash { 50% { transform: scale(1.04); opacity: .5; } }

.polar-big { width: 100%; height: 200px; display: block; }
.legend { margin: 6px 0 0; font-size: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.lg { display: inline-block; width: 11px; height: 11px; border: 2px solid var(--ink); background: #fff; }
.lg-circle { border-radius: 50%; }
.lg-diamond { transform: rotate(45deg) scale(.85); }
.lg-cross { border: 0; width: auto; height: auto; background: none; font-weight: 900; }
.glider-list { display: grid; gap: 12px; }
.gcard {
  display: grid; grid-template-columns: 64px 1fr; gap: 4px 12px; align-items: center; padding: 10px; background: var(--paper);
  border: 3px solid var(--ink); border-radius: 4px 18px 4px 18px; box-shadow: 4px 4px 0 var(--ink); cursor: pointer; text-align: left;
  font: inherit; color: var(--ink); width: 100%; animation: pop-in .45s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i) * 60ms);
}
.gcard.sel { background: #fff2b3; box-shadow: 4px 4px 0 var(--hot), 7px 7px 0 var(--ink); }
.gcard.locked { background: #e3deec; }
.gcard canvas { grid-row: span 2; width: 64px; height: 48px; }
.gcard h3 { margin: 0; font: 900 italic 17px/1.15 var(--manga); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.gcard h3 small { font: 800 12px var(--kit-font); padding: 1px 6px; border: 2px solid var(--ink); border-radius: 6px; }
.gcard .gstats { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; font-size: 12px; }
.gcard .gstats b { font-variant-numeric: tabular-nums; }
.gcard .gdesc { grid-column: 1 / -1; margin: 2px 0 0; font-size: 12.5px; font-weight: 600; color: var(--kit-ink-soft); }
.gcard .gstate { grid-column: 1 / -1; font-size: 13px; font-weight: 900; }

/* ---------- Spiel-HUD ---------- */
.hud { gap: 6px; }
.pill {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 3px 4px; border-radius: 4px;
  background: var(--paper); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.pill small { font-size: 10px; text-transform: uppercase; letter-spacing: .3px; color: var(--kit-ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pill b { display: block; font: 900 17px/1.1 var(--kit-font); font-variant-numeric: tabular-nums; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: clip; }
.pill.bump b { animation: bump .35s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes bump { 40% { transform: scale(1.35); } }
.pill.warn { background: #ffd0d6; }
.progress { height: 10px; margin: 8px 2px 0; border: 3px solid var(--ink); border-radius: 6px; background: var(--paper); overflow: hidden; }
.progress i { display: block; height: 100%; width: 100%; background: repeating-linear-gradient(-45deg, var(--sun) 0 6px, #ffb000 6px 12px); transform-origin: left; transform: scaleX(0); transition: transform .3s; }

.vario {
  align-self: center; margin-top: 8px; padding: 4px 12px 6px; background: var(--paper); border: 3px solid var(--ink);
  border-radius: 6px 22px 6px 22px; box-shadow: 4px 4px 0 var(--ink); display: grid; grid-template-columns: auto auto; align-items: center; gap: 0 8px;
}
.vario canvas { width: 92px; height: 52px; grid-row: span 2; }
.vario-num { display: flex; align-items: baseline; gap: 3px; }
.vario-num b { font: 900 italic 32px/1 var(--manga); font-variant-numeric: tabular-nums; min-width: 3.1ch; text-align: right; }
.vario-num small { font-size: 12px; }
.vario-sub { font-size: 11.5px; color: var(--kit-ink-soft); white-space: nowrap; }
.vario.up .vario-num b { color: #b05a00; }
.vario.down .vario-num b { color: #1d4fb8; }
.vario.pulse { animation: vpulse .3s ease-out; }
@keyframes vpulse { 40% { transform: scale(1.08); } }

.mentor {
  display: flex; align-items: flex-start; gap: 6px; margin: 10px 4px 0; max-width: 330px; opacity: 0; transform: translateX(-30px);
  transition: opacity .3s, transform .45s cubic-bezier(.3, 1.5, .5, 1);
}
.mentor.show { opacity: 1; transform: none; }
.mentor-face { width: 52px; height: 52px; flex-shrink: 0; }
.mentor-face svg { width: 100%; height: 100%; display: block; }
.bubble {
  position: relative; margin: 4px 0 0; padding: 7px 10px; background: var(--paper); border: 3px solid var(--ink); border-radius: 14px;
  font-size: 14px; line-height: 1.3; box-shadow: 3px 3px 0 var(--ink);
}
.bubble::before { content: ""; position: absolute; left: -11px; top: 12px; border: 7px solid transparent; border-right-color: var(--ink); }

.controls {
  margin-top: auto; display: grid; grid-template-columns: 78px 1fr 78px; gap: 10px; align-items: end;
  height: min(44vh, 360px); pointer-events: auto; padding-bottom: 6px;
}
.brake { height: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; touch-action: none; cursor: grab; outline: none; --v: 0; }
.brake:focus-visible .brake-track { outline: 3px solid var(--hot); outline-offset: 3px; }
.brake-label { font: 900 italic 13px/1 var(--manga); color: var(--paper); -webkit-text-stroke: 1px var(--ink); text-shadow: 2px 2px 0 var(--ink); }
.brake-track {
  position: relative; flex: 1; width: 64px; border: 3px solid var(--ink); border-radius: 12px; background: rgba(255, 253, 246, .82);
  box-shadow: 4px 4px 0 var(--ink); --hh: 54px;
}
.zone-stall { position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--hh) / 2 + (100% - var(--hh)) * var(--stall, .9)); background-color: rgba(255, 79, 109, .55); border-radius: 0 0 9px 9px; border-top: 3px solid var(--ink); }
.mark { position: absolute; right: 3px; font-style: normal; font-size: 12px; line-height: 1; transform: translateY(-50%); }
.mark::before { content: ""; position: absolute; right: 14px; top: 50%; width: 26px; border-top: 2px dashed var(--ink); }
.mark-min { top: calc(var(--hh) / 2 + (100% - var(--hh)) * var(--min, .5)); }
.mark-best { top: calc(var(--hh) / 2 + (100% - var(--hh)) * var(--best, .3)); }
.rope { position: absolute; left: 50%; top: 0; width: 4px; margin-left: -2px; height: calc(var(--hh) / 2 + (100% - var(--hh)) * var(--v)); background: var(--ink); }
.handle {
  position: absolute; left: 50%; top: calc((100% - var(--hh)) * var(--v)); width: 50px; height: var(--hh); margin-left: -25px;
  border: 3px solid var(--ink); border-radius: 18px 18px 22px 22px; background: linear-gradient(180deg, #ff7a8f, var(--hot));
  box-shadow: 0 4px 0 var(--ink), inset 0 6px 0 rgba(255, 255, 255, .35); transition: transform .15s cubic-bezier(.3, 1.8, .5, 1);
}
.handle::after { content: ""; position: absolute; left: 10px; right: 10px; top: 16px; height: 14px; border: 3px solid var(--ink); border-radius: 8px; background: var(--paper); }
.brake.grab .handle { transform: scale(1.12, .92); }
.brake.danger .handle { background: repeating-linear-gradient(45deg, var(--hot) 0 6px, var(--ink) 6px 9px); }
.center-ctrl { display: flex; flex-direction: column; gap: 8px; align-items: stretch; justify-content: flex-end; min-width: 0; }
.polar-mini {
  width: 100%; height: 86px; display: block; background: rgba(255, 253, 246, .85); border: 3px solid var(--ink); border-radius: 6px; box-shadow: 3px 3px 0 var(--ink);
}
.btn-accel {
  min-height: 56px; border: 3px solid var(--ink); border-radius: 6px 18px 6px 18px; background: var(--paper); box-shadow: 4px 4px 0 var(--ink);
  font: 900 italic 15px/1.1 var(--manga); color: var(--ink); cursor: pointer; touch-action: none; padding: 6px;
}
.btn-accel.on { background: var(--sun); transform: translate(4px, 4px); box-shadow: none; }

/* ---------- Dialoge ---------- */
.manga-card { border-radius: 6px 26px 6px 26px; box-shadow: 6px 6px 0 var(--ink); animation: card-in .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes card-in { from { transform: scale(.7) rotate(-4deg); opacity: 0; } }
.manga-card h2 { margin: 0; font: 900 italic 24px/1.15 var(--manga); }
.brief-kicker { margin: 0; font-size: 13px; color: var(--kit-ink-soft); text-transform: uppercase; letter-spacing: .5px; }
.brief-goal { margin: 0; padding: 8px 10px; background: #fff2b3; border: 3px solid var(--ink); border-radius: 6px; font-size: 16px; }
.brief-tip { display: flex; gap: 6px; align-items: flex-start; }
.brief-tip .bubble { font-size: 13.5px; }
.picker { display: grid; grid-template-columns: 46px 1fr 46px; gap: 8px; align-items: center; }
.picker-mid { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.picker-mid b { font: 900 italic 18px/1.2 var(--manga); }
.picker-mid small { font-size: 12px; color: var(--kit-ink-soft); }
.picker-mid.locked b { opacity: .5; }
.brief-best { margin: 0; font-size: 13px; text-align: center; color: var(--kit-ink-soft); }
.kit-btn:disabled { opacity: .45; cursor: not-allowed; }
.result-card { text-align: center; }
.res-stars { display: flex; justify-content: center; gap: 10px; font-size: 52px; line-height: 1; }
.res-stars span { color: #d9d3e6; -webkit-text-stroke: 2px var(--ink); transform: scale(.4); opacity: .5; transition: transform .5s cubic-bezier(.3, 2, .5, 1), opacity .2s, color .2s; }
.res-stars span.on { color: #ffc400; transform: scale(1) rotate(-8deg); opacity: 1; }
.res-stars span:nth-child(2).on { transform: scale(1.2) translateY(-6px); }
.res-stars span:nth-child(3).on { transform: scale(1) rotate(8deg); }
.res-reason { margin: 0; font-size: 15px; }
.res-stats { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; text-align: left; font-size: 14px; padding: 8px 10px; border: 2px dashed var(--ink); border-radius: 8px; }
.res-stats dt { color: var(--kit-ink-soft); }
.res-stats dd { margin: 0; font-weight: 900; font-variant-numeric: tabular-nums; text-align: right; }
.res-unlock:empty { display: none; }
.res-unlock { margin: 0; padding: 8px; background: var(--sun); border: 3px solid var(--ink); border-radius: 6px; font-weight: 900; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.04); } }
.help-card { max-height: calc(100dvh - 30px); overflow-y: auto; }
.help-list { margin: 0; padding-left: 20px; display: grid; gap: 7px; font-size: 14.5px; }
.help-keys { margin: 0; font-size: 13px; color: var(--kit-ink-soft); }

.kit-footer { color: var(--ink); background: rgba(255, 253, 246, .85); border-radius: 10px; margin: 0 auto; }
.kit-footer a { color: var(--ink); }

@media (max-height: 640px) {
  .controls { height: 40vh; grid-template-columns: 70px 1fr 70px; }
  .brake-track { width: 58px; --hh: 46px; }
  .handle { width: 44px; margin-left: -22px; }
  .polar-mini { height: 64px; }
  .vario canvas { width: 76px; height: 42px; }
  .vario-num b { font-size: 26px; }
  .mentor-face { width: 42px; height: 42px; }
  .bubble { font-size: 13px; }
}
@media (min-width: 700px) {
  .controls { grid-template-columns: 96px 1fr 96px; }
  .brake-track { width: 76px; }
}
.pill.ok { background: #c9f5c0; }
/* Mentor blinzelt */
.mentor-face .eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.5s infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

/* ---------- Modi auf dem Startbildschirm ---------- */
.btn-mode { background: var(--sky); font: 900 italic 18px/1.1 var(--manga); }
.btn-mode:last-child { background: var(--sun); }

/* ---------- Hangar: Polare bleibt beim Scrollen oben stehen ---------- */
#screen-hangar .scroll { padding-top: 0; }
.polar-panel {
  position: sticky; top: 0; z-index: 3; margin-top: 8px;
  box-shadow: 5px 5px 0 var(--ink), 0 12px 18px -10px rgba(26, 21, 48, .55);
}
#screen-hangar .polar-big { height: clamp(130px, 24vh, 200px); }
.gcard.view { outline: 4px solid var(--gc, var(--hot)); outline-offset: 2px; }
.gcard canvas { height: 56px; }

/* ---------- Dialoge Endlos und Training ---------- */
.mode-card {
  display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; text-align: left;
  font: inherit; color: var(--ink); background: var(--paper); border: 3px solid var(--ink); border-radius: 6px 18px 6px 18px;
  box-shadow: 4px 4px 0 var(--ink); cursor: pointer;
}
.mode-card:active { transform: translate(4px, 4px); box-shadow: none; }
.mode-card:disabled { opacity: .45; cursor: not-allowed; }
.mode-ico { width: 48px; height: 48px; display: grid; place-items: center; font-size: 26px; background: var(--sun); border: 3px solid var(--ink); border-radius: 50%; }
.mode-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mode-txt b { font: 900 italic 17px/1.15 var(--manga); }
.mode-txt small { font-size: 13px; font-weight: 600; color: var(--kit-ink-soft); }
.mode-txt em { font-style: normal; font-size: 13px; font-weight: 900; color: var(--hot); }
.train-card { max-height: calc(100dvh - 24px); overflow-y: auto; }
.train-intro { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--kit-ink-soft); }
.drills { display: grid; gap: 8px; }
.drill {
  display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 8px 10px; min-height: 48px; font: inherit; color: var(--ink);
  background: var(--paper); border: 3px solid var(--ink); border-radius: 8px; cursor: pointer;
}
.drill b { font: 900 italic 15px/1.2 var(--manga); }
.drill small { font-size: 12.5px; font-weight: 600; color: var(--kit-ink-soft); }
.drill.on { background: #fff2b3; box-shadow: 4px 4px 0 var(--hot); }
.drill.on b::before { content: "✔ "; }
.train-opts { display: grid; gap: 6px; }
.seg-row { display: grid; gap: 3px; font-size: 13px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; }
.seg button {
  min-height: 38px; padding: 4px 2px; border: 0; border-left: 2px solid var(--ink); background: var(--paper); color: var(--ink);
  font: 800 12.5px/1.1 var(--kit-font); cursor: pointer;
}
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--sun); }
.seg button.on::before { content: "● "; }

/* ---------- Spiel: Sollfahrt und Auswertung ---------- */
.vario-stf { grid-column: 2; font-size: 12px; font-weight: 900; color: #1f7a4d; white-space: nowrap; }
.review-bar {
  position: absolute; left: 12px; right: 12px; bottom: calc(var(--safe-b) + 14px); z-index: 4; pointer-events: auto;
  display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--paper); border: 3px solid var(--ink);
  border-radius: 6px 18px 6px 18px; box-shadow: 5px 5px 0 var(--ink);
}
.review-bar p { margin: 0; flex: 1; font-size: 13px; }
.review-bar .kit-btn { flex-shrink: 0; }
.review-bar[hidden] { display: none; }
#screen-game:has(.review-bar:not([hidden])) .controls { visibility: hidden; }
.res-stars[hidden] { display: none; }

/* Hangar-Knopf zeigt den gewählten Schirm klein darunter */
.btn-hangar { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding-top: 10px; padding-bottom: 10px; }
.btn-hangar small { font-size: 12px; font-weight: 700; color: var(--kit-ink-soft); }

/* Polare und Bremsmarkierungen nur in den ersten Levels oder per Schalter */
.polar-mini[hidden] { display: none; }
#screen-game.no-marks .mark { display: none; }

/* Hangar: Vario-Auswahl mit Vorschau */
.hangar-sub { margin: 18px 0 8px; font: 900 italic 18px/1.2 var(--manga); color: var(--paper); -webkit-text-stroke: 1px var(--ink); text-shadow: 2px 2px 0 var(--ink); }
.vario-list { display: grid; gap: 10px; }
.vcard { display: grid; grid-template-columns: 1fr 46px; gap: 8px; align-items: center; padding: 8px; background: var(--paper); border: 3px solid var(--ink); border-radius: 4px 16px 4px 16px; box-shadow: 4px 4px 0 var(--ink); }
.vcard.sel { background: #fff2b3; }
.vcard.playing .icon-btn { background: var(--sun); animation: bump .4s ease-in-out infinite; }
.vpick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 44px; padding: 2px 4px; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.vpick b { font: 900 italic 16px/1.2 var(--manga); }
.vcard.sel .vpick b::before { content: "✔ "; }
.vpick small { font-size: 12.5px; font-weight: 600; color: var(--kit-ink-soft); }

/* Tastenhinweise: nur sichtbar, wenn eine Tastatur erkannt wurde */
.key-hint { display: none; }
html.has-keys .key-hint {
  display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 5px;
  font: 900 12px/1 var(--kit-font); color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); border-radius: 6px; box-shadow: 0 2px 0 var(--ink);
}
html.has-keys .key-inline { margin-left: 6px; font-size: 11px; vertical-align: middle; }
html.has-keys .key-hint.on { background: var(--sun); transform: translateY(2px); box-shadow: none; }
