@font-face{font-family:Syne;src:url(assets/syne-4.ttf);font-weight:800}@font-face{font-family:DM;src:url(assets/dm-sans-1.ttf);font-weight:500 800}
*{box-sizing:border-box}
body{margin:0;color:#211d2a;font:500 16px DM,system-ui,sans-serif;background:radial-gradient(ellipse at 90% 0%,#daf5e8,transparent 60%),#fff6f9}
header,main,footer{width:min(1380px,95vw);margin:auto}
header,footer{display:flex;align-items:center;justify-content:space-between;gap:8px}
header{height:60px;position:relative;z-index:40}
header a.brand{display:flex;align-items:center;min-width:0;min-height:44px;text-decoration:none;color:inherit;font:800 clamp(14px,1.6vw,21px) Syne,sans-serif;letter-spacing:-.055em;white-space:nowrap}
header a span{color:#118859}
header img{width:32px;margin-right:7px;flex:none}
button,summary{font:inherit;font-weight:700;cursor:pointer;touch-action:manipulation}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #118859;outline-offset:3px}

/* Optionen: ein Knopf in der Kopfzeile, das Menü klappt über das Spielfeld. */
#options{flex:none}
#options summary{list-style:none;display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:0 14px;background:#fff7;border:1px solid #a7b8ae;border-radius:12px;font-size:15px;color:#211d2a}
#options summary::-webkit-details-marker{display:none}
#options summary::after{content:'⌄';font:700 16px/1 system-ui}
#options[open] summary::after{transform:rotate(180deg)}
.tools{position:absolute;top:100%;right:0;width:min(300px,calc(100vw - 24px));display:flex;flex-direction:column;align-items:stretch;gap:7px;padding:10px;background:#fffdfb;border:1px solid #d9cfd9;border-radius:16px;box-shadow:0 14px 34px #2a1c3340}
.tools button,header .tools .arcade-audio button{min-height:44px;width:auto;min-width:0;border-radius:12px;font:700 15px DM,system-ui,sans-serif;display:flex;align-items:center;justify-content:center;text-align:center;padding:7px 12px;margin:0;background:#fff;border:1px solid #a3b4ab;color:#29202e}
header .tools .arcade-audio{display:flex;flex-direction:column;align-items:stretch;margin:0}
header .tools .arcade-audio button::after{content:none}
#gameAudio:empty{display:none}

main{position:relative;display:flex;flex-direction:column;border-radius:20px;overflow:hidden;isolation:isolate;height:clamp(350px,calc(100svh - 102px),820px);background:linear-gradient(160deg,#725790,#eda7b5 55%,#9be6ce)}
.flight-view{position:relative;flex:1;min-height:0;overflow:hidden}
canvas{display:block;width:100%;height:100%;touch-action:none}
section{position:absolute;inset:0;display:flex;align-items:center;padding:clamp(20px,5vw,72px);color:#fff;background:linear-gradient(90deg,#251a3bdc,transparent 85%);pointer-events:none}
section>div{max-width:440px}
h1{font:800 clamp(60px,7.8vw,120px)/.85 Syne,sans-serif;letter-spacing:-.075em;margin:.22em 0}
h1 i{font-style:normal;color:#ffabd1}
.eyebrow,#meter span{font:700 11px DM,sans-serif;letter-spacing:.16em;color:#a4f7d7}
.play{background:#33e2a5;color:#142e25;border:0;border-radius:12px;padding:14px 22px;min-width:140px;min-height:52px;font-size:17px;pointer-events:auto}
#message{max-width:34ch;line-height:1.42}
#meter,#pause,#feedback{position:absolute;color:white}
#meter,#pause{top:14px;border-radius:12px;background:#272037e6}
#meter{left:14px;padding:7px 13px;min-height:44px}
#meter span,#meter strong{display:block;white-space:nowrap}
#meter strong{font:800 21px/1.1 Syne}
#meter strong span{display:inline;font:inherit;letter-spacing:normal;color:inherit}
#pearls{font:700 14px/1 DM,system-ui,sans-serif;font-style:normal;color:#fff3a8;margin-left:5px;vertical-align:2px}
#pause{right:14px;min-width:44px;min-height:44px;padding:0 14px;border:1px solid #a7b8ae}
#feedback{top:20%;left:0;width:100%;padding:0 12px;text-align:center;pointer-events:none;font:800 clamp(20px,3.5vw,36px) Syne;text-shadow:0 2px 10px #51334d}
footer{font-size:12px;color:#475b52;padding:9px 2px}
[hidden]{display:none!important}

#coach-toggle{position:absolute;top:14px;right:68px;z-index:1;min-height:44px;padding:0 12px;border:1px solid #d0d4df;border-radius:12px;background:#272037ed;color:white;font-size:14px;white-space:nowrap}
main:not([data-mode="run"]) #coach-toggle{right:14px}
main[data-mode="crash"] #coach-toggle,main[data-mode="end"] #coach-toggle{display:none}
#coach-toggle[aria-pressed="true"]{color:#a4f7d7}
/* Die Hilfezeile liegt über dem unteren Rand des Flugfelds: Das Feld ändert seine Größe nie. */
#coach-cue{position:absolute;left:0;right:0;bottom:0;min-height:52px;padding:7px 12px max(7px,env(safe-area-inset-bottom));display:flex;flex-direction:column;justify-content:center;text-align:center;background:#272037ec;color:#fff;pointer-events:none}
#coach-goal{display:block;font-size:12px;color:#ece0ff}
#coach-action{display:block;font-size:17px}
#coach-cue[data-action="tap"]{background:#0c4b37;color:#dbffef}
#coach-cue[data-action="rule"] #coach-action{font-size:14px;font-weight:600}
#coach-target{position:absolute;width:0;height:0;transform:translate(-50%,calc(-100% - 4px));border-width:12px 8px 0;border-style:solid;border-color:#fff8bd transparent transparent;filter:drop-shadow(0 1px 2px #442b39);pointer-events:none}
#crash-mark{position:absolute;z-index:2;width:44px;height:44px;margin:-22px 0 0 -22px;display:grid;place-items:center;border-radius:50%;border:3px solid #fff;background:#d8315b;color:#fff;font:800 22px/1 system-ui,sans-serif;box-shadow:0 0 0 6px #d8315b55;pointer-events:none}
@media(prefers-reduced-motion:no-preference){#crash-mark{animation:crash-pop .3s ease-out both}@keyframes crash-pop{from{transform:scale(.3);opacity:0}}}

@media(max-width:620px){
  main,header,footer{width:100%}
  main{border-radius:12px;height:calc(100svh - 83px);min-height:360px}
  header,footer{padding:0 12px}
  header{height:51px}
  footer{height:30px}
  .tools{right:12px}
  #options summary{min-height:40px;font-size:14px;padding:0 11px}
  section{align-items:flex-end;background:linear-gradient(0deg,#241b35ee,transparent 64%)}
  h1{font-size:clamp(44px,11vw,67px)}
  #message{margin:8px 0 12px}
  .eyebrow{margin:0}
}
@media(max-width:380px){
  header a.brand{font-size:13px}
  header img{width:28px;margin-right:5px}
}
@media(max-width:350px){
  header{gap:6px}
  header a.brand{font-size:11.5px}
  header img{width:22px;margin-right:4px}
  #options summary{font-size:13px;padding:0 9px;gap:5px}
  #meter{left:8px;padding:7px 9px}
  #pause{right:8px}
  #coach-toggle{right:58px;padding:0 9px;font-size:13px}
  main:not([data-mode="run"]) #coach-toggle{right:8px}
  footer{font-size:11px}
  #coach-cue[data-action="rule"] #coach-action{font-size:13px}
}

/* „Nochmal“ und „Nächster Flug“ sind auf der Karte die Haupttaste (in arcade-finish.css verliert .hds-finish-next gegen die allgemeine Tastenregel). */
.flight-view .hds-finish-actions .hds-finish-next{background:#33e2a5;border-color:#33e2a5;color:#142e25;font-size:16px;min-height:50px}

/* Farbwelt je Flug: Waschplatz am Morgen, Schneideplatz am Tag, Föhnplatz im Abendlicht. */
main[data-theme="0"]{background:linear-gradient(165deg,#3f86ad,#9bd7e3 52%,#d9f6e8)}
main[data-theme="2"]{background:linear-gradient(165deg,#3b2a66,#c75f8e 50%,#ffb56e)}
