/* Variante «Pilz-Turnier»: heller Tag, zwei Läufer mit Schildkappen, Münzen und Sterne.
   Alle Figuren sind selbst gezeichnet, es wird nichts von Nintendo übernommen. */

:root {
  --ink: #12365f;
  --gold: #ffd23f;
}

body {
  background: #4fb6f2;
  animation: none;
  font-family: ui-monospace, "SF Mono", Menlo, "Courier New", monospace;
  min-height: 100vh;
  min-height: 100dvh;
  /* Spiel: kein Doppeltipp-Zoom, keine Textauswahl beim Tippen */
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

#scene {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}

.brand, .eyebrow, .lead, .sub, .hint, .hud, .legal, .date {
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Heller Himmel: weisse Schrift bekommt eine dunkelblaue Kontur */
.brand strong, .brand span, .lead, .sub, .date, .eyebrow, .hud, .hint {
  color: #fff;
  -webkit-text-stroke: .2em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 .1em 0 var(--ink);
}
.brand span { color: #fff7cf; }
.eyebrow { color: var(--gold); }

.hud { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-weight: 900; font-size: 1.25rem; }
.hud-row { display: flex; gap: 18px; }
.hud .lives { color: #ff6b6b; letter-spacing: .12em; min-height: 1.2em; }
.hud-item { display: inline-flex; align-items: center; gap: 6px; }
.icon { display: inline-block; width: 18px; height: 18px; }
.icon.coin {
  background: var(--gold);
  border: 3px solid #d99a00;
  border-radius: 50%;
  box-shadow: 2px 2px 0 var(--ink);
}
.icon.star {
  background: var(--gold);
  clip-path: polygon(50% 0, 62% 36%, 100% 38%, 70% 60%, 80% 100%, 50% 76%, 20% 100%, 30% 60%, 0 38%, 38% 36%);
  filter: drop-shadow(2px 2px 0 var(--ink));
}

.hero { min-height: 0; padding-bottom: 30vh; }

/* Holzschild mit dem Titel */
.sign {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 10px;
  padding: 10px 20px;
  max-width: 100%;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 2px, transparent 2px 16px),
    #b9773a;
  border: 4px solid #5a3a1a;
  box-shadow: 0 6px 0 #3d2610;
  color: #fff6dc;
  font-size: clamp(1.1rem, 3.6vw, 2.1rem);
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #3d2610;
}
.mush { width: 1.6em; height: 1.35em; flex: none; }

.date { margin: 0 0 22px; font-size: clamp(1.4rem, 4.5vw, 2.6rem); font-weight: 900; }

.seconds {
  font-family: inherit;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 3px 0 #7a3b00, -3px 0 #7a3b00, 0 3px #7a3b00, 0 -3px #7a3b00, 6px 6px 0 #7a3b00, 9px 9px 0 rgba(18, 54, 95, .45);
}
.ms { font-weight: 900; color: #fff; text-shadow: 3px 3px 0 var(--ink); opacity: 1; }

/* jede Sekunde hüpft die Zahl */
.seconds.tick { animation: hop .3s steps(4); }
@keyframes hop {
  0%   { transform: translateY(0); }
  40%  { transform: translateY(-12px); }
  100% { transform: translateY(0); }
}
.ring { border-radius: 0; border-width: 4px; border-color: #fff; }
.ring.go { animation: ring .9s steps(6); }

.sub { color: #fff7cf; }
.msg {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  max-width: 92vw;
  padding: 8px 16px;
  text-align: center;
  font-weight: 900;
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(18, 54, 95, .9);
  border: 3px solid #fff;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .35);
  pointer-events: none;
}
.msg[hidden] { display: none; }
.msg strong { display: block; font-size: 1.3rem; color: var(--gold); }
.msg small { display: block; margin-top: 4px; color: #fff7cf; font-size: .75rem; }
.msg.blink { animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }

.foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #2b1a0c;
  border-top: 4px solid var(--gold);
  color: #f3dcb8;
}
.legal a { color: #fff; }

.hero, .counter { min-width: 0; max-width: 100%; }
.hero > * { max-width: 100%; overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .eyebrow { font-size: .75rem; letter-spacing: .08em; }
  .sign { font-size: 1rem; padding: 8px 12px; gap: 8px; }
  .date { font-size: 1.3rem; }
  .seconds { font-size: 10vw; }
  .ms { font-size: 4.5vw; }
  .lead { font-size: 1rem; }
  .sub { font-size: .75rem; letter-spacing: .04em; }
  .hud { font-size: 1rem; }
  .hud-row { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .msg.blink { animation: none; }
}

/* Handy hochkant: Kopfzeile in einer Reihe, Punktezähler oben rechts */
@media (max-width: 640px) {
  .top { flex-wrap: nowrap; padding: 12px; gap: 10px; }
  .wappen { height: 54px; width: 49px; }
  .brand strong { font-size: .9rem; letter-spacing: .04em; }
  .brand span { font-size: .8rem; letter-spacing: .04em; }
  .hud { font-size: .95rem; }
  .hud-row { gap: 8px; }
  .icon { width: 14px; height: 14px; }
}

/* Handy quer (niedriger Bildschirm): alles kompakter, nichts überlappt */
@media (max-height: 520px) {
  .top { padding: 8px 14px; }
  .wappen { height: 48px; width: 44px; }
  .eyebrow, .sub { display: none; }
  .msg { left: auto; right: 12px; transform: none; font-size: .75rem; padding: 6px 12px; }
  .msg strong { font-size: 1.05rem; }
  .hero { padding: 0 16px; padding-bottom: 38vh; justify-content: center; }
  .sign { margin: 0 0 6px; padding: 6px 14px; font-size: 1.1rem; box-shadow: 0 4px 0 #3d2610; }
  .date { margin: 0 0 4px; font-size: 1.1rem; }
  .lead { font-size: .85rem; }
  .counter { margin: 4px 0; }
  .seconds { font-size: min(8vw, 12vh); }
  .ms { font-size: min(3.2vw, 5vh); }
  .foot { padding: 8px 14px; font-size: .75rem; }
}
