/* Shared look for the extra Wortjäger games (tower.html, platform.html). Matches index.html. */
:root {
  --bg: #0b0e1a;
  --panel: #141a2e;
  --panel-2: #1b2340;
  --line: #2a3456;
  --fg: #e9ecf5;
  --muted: #8a93b3;
  --gold: #ffc94a;
  --ok: #5be0a0;
  --bad: #ff5d73;
  --der: #6aa8ff;
  --die: #ff7a9a;
  --das: #5be0a0;
  --f-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "DejaVu Sans Mono", monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.5 var(--f-body); min-height: 100vh; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px max(16px, env(safe-area-inset-left)) 12px max(16px, env(safe-area-inset-right));
  border-bottom: 1px solid var(--line); background: var(--panel);
}
.brand { font: 700 22px/1 var(--f-display); letter-spacing: .02em; }
.brand span { display: inline-block; margin-left: 10px; font: 500 12px/1 var(--f-mono); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; }
.brand b { color: var(--gold); font-weight: 700; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; background: var(--bg); padding: 4px; border-radius: 10px; border: 1px solid var(--line); }
.tab { border: 0; background: transparent; padding: 6px 14px; border-radius: 7px; color: var(--muted); font-weight: 500; text-decoration: none; }
.tab.on { background: var(--panel-2); color: var(--fg); }
.tab:hover { color: var(--fg); }

main { max-width: 1100px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-left)) 32px max(16px, env(safe-area-inset-right)); }

.stage { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg); }
#cv { display: block; width: 100%; touch-action: none; }
.overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 24px 16px; text-align: center; background: rgba(11, 14, 26, .92); overflow-y: auto;
}
.overlay h1 { margin: 0; font: 700 clamp(34px, 7vw, 56px)/1 var(--f-display); letter-spacing: .02em; }
.overlay h1 b { color: var(--gold); }
.overlay h2 { margin: 0; font: 700 30px/1.1 var(--f-display); }
.lede { margin: 0; max-width: 56ch; color: var(--muted); }
.howto { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; width: min(760px, 100%); text-align: left; }
.howto div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.howto strong { display: block; color: var(--fg); font: 700 14px/1.3 var(--f-display); margin-bottom: 2px; }
.today { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chip { font: 500 13px/1 var(--f-mono); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); white-space: nowrap; }
.chip b { color: var(--gold); font-weight: 500; }
.opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; font-size: 14px; color: var(--muted); }
.opts label { display: flex; align-items: center; gap: 8px; }
select { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.big {
  border: 0; border-radius: 12px; padding: 14px 34px; background: var(--gold); color: #1a1405;
  font: 700 20px/1 var(--f-display); letter-spacing: .04em; text-transform: uppercase;
  box-shadow: 0 0 0 4px rgba(255, 201, 74, .18);
}
.big:hover { filter: brightness(1.08); }
.keys { margin: 0; font: 12px/1.5 var(--f-mono); color: var(--muted); }
.ghost { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 7px 14px; }
.ghost:hover { border-color: var(--muted); }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; width: min(640px, 100%); }
.result-grid div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.result-grid strong { display: block; font: 700 26px/1.1 var(--f-display); font-variant-numeric: tabular-nums; }
.result-grid span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.wordlist { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 640px; }
.wordlist > span { font-size: 13px; padding: 3px 10px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.art-der { color: var(--der); } .art-die { color: var(--die); } .art-das { color: var(--das); }
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); max-width: calc(100% - 32px); z-index: 10;
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
