/* Rohrspiel – Retro-Look. Schrift „Press Start 2P“ (SIL OFL 1.1), lokal ausgeliefert. */
@font-face {
  font-family: 'Press Start 2P';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(press-start-2p.woff2) format('woff2');
}
:root { --bg: #0d1a12; --panel: #13281b; --green: #1a763a; --yellow: #ffed00; --text: #e9f5ec; --muted: #8fb39b; --red: #ff4d6d; --blue: #4dd8ff; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 12px/1.9 'Press Start 2P', ui-monospace, monospace; min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: none; image-rendering: pixelated; }
a { color: var(--yellow); }
.top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 1rem; border-bottom: 4px solid var(--yellow); background: #0a140e; }
.top h1 { margin: 0; font-size: clamp(14px, 4vw, 22px); color: var(--yellow); letter-spacing: 2px; text-shadow: 3px 3px 0 var(--green); }
.back { font-size: 10px; text-decoration: none; }
.nw { white-space: nowrap; }
.sound { font: inherit; font-size: 10px; background: none; border: 2px solid var(--muted); color: var(--muted); padding: .4rem .6rem; cursor: pointer; }
.sound[aria-pressed="true"] { border-color: var(--yellow); color: var(--yellow); }
main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 1rem; }
.panel { background: var(--panel); border: 4px solid var(--green); box-shadow: 6px 6px 0 #050b07; padding: 1.25rem; text-align: center; }
.intro { font-size: 10px; line-height: 2.2; color: var(--text); }
.y { color: var(--yellow); }
.life { color: var(--red); }
.clock { color: var(--blue); }
label { display: block; margin: 1rem 0 .5rem; color: var(--yellow); }
input[type="text"] { font: inherit; font-size: 14px; width: min(100%, 22rem); padding: .7rem; background: #050b07; color: var(--yellow);
  border: 3px solid var(--yellow); text-align: center; text-transform: none; outline: none; }
input[type="text"]:focus { box-shadow: 0 0 0 3px var(--green); }
.err { color: var(--red); font-size: 9px; min-height: 1.2em; margin: .5rem 0; }
.btn { font: inherit; font-size: 14px; margin-top: .75rem; padding: .9rem 1.4rem; background: var(--yellow); color: #0a140e; border: 0;
  box-shadow: 4px 4px 0 var(--green); cursor: pointer; min-height: 48px; }
.btn:hover, .btn:focus-visible { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--green); outline: none; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--green); }
h2 { color: var(--yellow); font-size: 14px; margin: 1.5rem 0 .75rem; }
.scores { list-style: none; padding: 0; margin: 0 auto; max-width: 30rem; text-align: left; font-size: 10px; }
.scores li { display: grid; grid-template-columns: 3.2em 1fr 3.5em 6em; gap: .5em; padding: .35rem .5rem; border-bottom: 2px dotted #24452f; }
.scores li .pt { text-align: right; color: var(--yellow); }
.scores li .lv { color: var(--muted); }
.scores li.me { background: #24452f; }
.scores li.empty { display: block; color: var(--muted); text-align: center; }
.scores .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-size: 10px; margin-bottom: .5rem; }
.hud b { color: var(--yellow); font-weight: 400; }
.hud b.life { color: var(--red); }
.timebar { position: relative; height: 18px; background: #050b07; border: 3px solid var(--green); margin-bottom: .75rem; }
.timebar #hud-bar { height: 100%; width: 100%; background: var(--yellow); }
.timebar #hud-bar.low { background: var(--red); }
.waterbar { position: relative; height: 14px; background: #050b07; border: 3px solid #1b4f72; margin: -.4rem 0 .75rem; }
.waterbar #hud-water { height: 100%; width: 100%; background: var(--blue); }
.waterbar #hud-water.low { background: var(--red); }
.waterbar span { position: absolute; left: 6px; top: 0; font-size: 8px; line-height: 8px; color: #fff; text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000, 1px 0 0 #000; white-space: nowrap; }
.timebar span { position: absolute; right: 6px; top: 0; font-size: 9px; line-height: 12px; color: #0a140e; mix-blend-mode: difference; filter: invert(1); }
.board-wrap { display: flex; justify-content: center; }
canvas { display: block; border: 4px solid var(--yellow); box-shadow: 6px 6px 0 #050b07; touch-action: manipulation; cursor: pointer;
  image-rendering: pixelated; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.msg { text-align: center; min-height: 2em; color: var(--yellow); margin: .75rem 0 0; font-size: 11px; }
.hint { text-align: center; color: var(--muted); font-size: 9px; margin: .25rem 0 0; }
.sum { margin: 0 auto; border-collapse: collapse; font-size: 10px; text-align: left; }
.sum td { padding: .35rem .6rem; }
.sum .calc { color: var(--muted); }
.sum .num { text-align: right; color: var(--yellow); }
.sum tfoot td { border-top: 2px solid var(--green); }
.big { font-size: 14px; color: var(--yellow); }
.foot { text-align: center; font-size: 8px; color: var(--muted); padding: 1rem; line-height: 2.2; }
@media (max-width: 520px) {
  body { font-size: 10px; }
  .top { padding: .6rem .6rem; gap: .5rem; }
  .top h1 { flex: 1 1 auto; min-width: 0; font-size: 11px; letter-spacing: 0; text-align: center; line-height: 1.6; }
  .back, .sound { flex: 0 0 auto; font-size: 8px; }
  .sound { padding: .3rem .4rem; }
  .back .lbl, .sound span { display: none; }
  main { padding: .75rem; }
  .panel { padding: 1rem .75rem; }
  .scores li { grid-template-columns: 2.6em 1fr 3em 5em; font-size: 9px; }
}

/* Pixel-Symbole: 1 Pixel = 2 px (bzw. 1,5 px auf kleinen Bildschirmen) */
.px { display: inline-block; vertical-align: -2px; line-height: 0; font-style: normal; }
.px svg { width: auto; height: 12px; display: inline-block; }
.hud .px svg { height: 11px; }
#hud-lives .px + .px { margin-left: 3px; }
.sum .px + .px { margin-left: 3px; }
