/* GIPFELSTUERMER - Huelle, HUD, Screens, Touch. Bunt-Allgaeu (Farbe lebt im Canvas). */
@font-face { font-family: 'Spline Sans Mono'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('../assets/fonts/spline-mono.woff2') format('woff2'); }
@font-face { font-family: 'Sofia Sans Condensed'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../assets/fonts/sofia-condensed.woff2') format('woff2'); }

:root { --mono: 'Spline Sans Mono', ui-monospace, monospace; --disp: 'Sofia Sans Condensed', 'Arial Narrow', sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(120% 120% at 50% 0%, #243429 0%, #161f1b 100%);
  color: #fff; font-family: var(--mono);
  display: grid; place-items: center; min-height: 100svh; overflow: hidden;
  -webkit-user-select: none; user-select: none; touch-action: none;
}
#app { display: grid; place-items: center; }
#stage {
  position: relative; line-height: 0;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.07);
}
#game { display: block; width: 100%; height: 100%; }

/* HUD */
.hud { position: absolute; top: 0; left: 0; right: 0; display: flex; gap: 18px; align-items: center;
  padding: 9px 12px; font-family: var(--mono); pointer-events: none;
  background: linear-gradient(180deg, rgba(8,16,12,.42), transparent); }
.hud__cell { display: flex; flex-direction: column; line-height: 1.1; }
.hud__cell--lives { margin-left: auto; }
.hud__label { font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.hud__val { font-size: 15px; font-weight: 700; }
.hud__lives { display: flex; gap: 2px; }

/* Screens */
.screen { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 13px; padding: 24px; line-height: 1.2; /* ueberschreibt das geerbte line-height:0 von #stage */
  background: radial-gradient(120% 120% at 50% 32%, rgba(10,22,16,.28), rgba(8,16,12,.66)); }
.screen.on { display: flex; }
.screen--mini { background: transparent; }
.kicker { margin: 0; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.wordmark { margin: 0; font-family: var(--disp); font-weight: 800; text-transform: uppercase; line-height: .84; letter-spacing: .01em; }
.wordmark span { display: block; font-size: clamp(30px, 8vw, 56px); }
.wordmark span:last-child { color: #ffe06a; -webkit-text-stroke: 1px rgba(0,0,0,.22); }
.tag { margin: 0; max-width: 30em; font-size: 12.5px; line-height: 1.5; color: rgba(255,255,255,.9); }
.screen-title { margin: 0; font-family: var(--disp); font-weight: 800; text-transform: uppercase; font-size: clamp(26px, 6vw, 46px); }
.screen-title--win { color: #ffe06a; }
.screen-sub { margin: 0; font-size: 13px; color: rgba(255,255,255,.85); }
.big-stamp { margin: 0; font-family: var(--disp); font-weight: 800; font-size: clamp(34px, 9vw, 62px); color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.18); }
.legend { display: flex; flex-direction: column; align-items: center; gap: 9px; font-size: 12px; color: rgba(255,255,255,.86); }
.legend span { display: inline-flex; align-items: center; gap: 6px; line-height: 1; white-space: nowrap; }
.legend kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 20px; padding: 0 6px; background: rgba(255,255,255,.18); border-radius: 5px; font-family: var(--mono); font-size: 11px; }

.btn { margin-top: 4px; font-family: var(--mono); font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  font-size: 12px; color: #223028; background: #ffe06a; border: 0; border-radius: 999px; padding: 11px 22px; cursor: pointer;
  box-shadow: 0 6px 0 #c9a52f; transition: transform .1s ease, box-shadow .1s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #c9a52f; }
.btn--big { font-size: 13px; padding: 13px 26px; }

/* Mute + Back */
.mute, .back { position: absolute; z-index: 5; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; text-decoration: none; background: rgba(10,18,14,.5); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 5px 11px; cursor: pointer; }
.mute { top: 8px; right: 8px; }
.back { bottom: 8px; left: 8px; }
.mute .mute__off { display: none; }
.mute[aria-pressed="true"] .mute__on { display: none; }
.mute[aria-pressed="true"] .mute__off { display: inline; }

/* Touch (nur auf Touch-Geraeten) */
.touch { display: none; position: absolute; inset: auto 0 0 0; padding: 0 12px 12px; justify-content: space-between; align-items: flex-end; z-index: 4; pointer-events: none; }
.touch__move { display: flex; gap: 10px; }
.tbtn { pointer-events: auto; width: 58px; height: 58px; border-radius: 50%; border: 1px solid rgba(255,255,255,.32);
  background: rgba(20,30,24,.42); color: #fff; font-size: 22px; cursor: pointer; touch-action: none; }
.tbtn--jump { width: 66px; height: 66px; background: rgba(255,224,106,.34); }
.tbtn:active { background: rgba(255,255,255,.34); }
@media (pointer: coarse) { .touch { display: flex; } }
/* Mobil vollflaechig: Karten-Rahmen weg, Spiel fuellt den ganzen Screen */
@media (pointer: coarse) {
  #stage { border-radius: 0; box-shadow: none; }
  /* "Showroom"-Zurueck NICHT unten links lassen (dort sitzen die Lauf-Buttons) ->
     nach oben links; HUD-Werte ruecken rechts daneben, damit nichts kollidiert. */
  .back { top: 8px; bottom: auto; left: 8px; }
  /* HUD-Werte ruecken zwischen "Showroom" (links) und "Ton"-Button (rechts) -> keine Ueberlappung. */
  .hud { padding-left: 118px; padding-right: 62px; }
}

/* Quer-Modus-Hinweis (von main.js nur auf Touch-Geraeten im Hochkant eingeblendet) */
.rotate { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; text-align: center; padding: 32px;
  background: radial-gradient(120% 120% at 50% 30%, #243429 0%, #161f1b 100%); }
.rotate[hidden] { display: none; }
.rotate__ico { width: 78px; height: 78px; transform-origin: 50% 50%; animation: rotatehint 2.6s ease-in-out infinite; }
.rotate__txt { margin: 0; font-family: var(--disp); font-weight: 800; text-transform: uppercase; font-size: 30px; letter-spacing: .02em; color: #ffe06a; }
.rotate__sub { margin: 0; max-width: 24em; font-size: 13px; line-height: 1.55; color: rgba(255,255,255,.85); }
@keyframes rotatehint { 0%, 22% { transform: rotate(-12deg); } 60%, 100% { transform: rotate(78deg); } }

@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .rotate__ico { animation: none; transform: rotate(78deg); } }
