/* Hatford – Grundlagen: Farben, Schrift, Buttons, Fenster, Meldungen */
:root {
  --font: 'Fredoka', 'Arial Rounded MT Bold', 'Nunito', system-ui, sans-serif;
  --cream: #fff7e8;
  --cream-2: #f7e8cc;
  --cream-line: #e4cfa6;
  --ink: #4a3526;
  --ink-soft: #8a6e57;
  --blue: #3b8fe0;
  --blue-dark: #2467b0;
  --green: #5cc446;
  --green-dark: #3a9a2b;
  --orange: #ffb42e;
  --orange-dark: #e2841a;
  --red: #f35d52;
  --red-dark: #c23b33;
  --pill: rgba(34, 40, 30, .62);
  --shadow: 0 4px 0 rgba(0,0,0,.18), 0 8px 18px rgba(0,0,0,.18);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: #5fb848;
  font-family: var(--font); color: var(--ink);
  user-select: none; -webkit-user-select: none; touch-action: none;
  overscroll-behavior: none;
}
[hidden] { display: none !important; }
/* 100% statt 100vw/100vh: auf dem iPhone ist 100vh höher als das sichtbare Fenster (Bild gestreckt, Schilder verrutscht) */
#game-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.ui-layer { position: fixed; inset: 0; pointer-events: none; }
.ui-layer > * { pointer-events: auto; }
button { font-family: inherit; }
img.txt-ico { width: 1.3em; height: 1em; vertical-align: -0.15em; object-fit: contain; }
/* Eigene Symbole statt Emoji (js/ui/emoji.js): ein Feld aus assets/emoji.webp, so groß wie die Schrift */
i.em { display: inline-block; width: 1.14em; height: 1.14em; vertical-align: -0.2em; background: var(--em-img) 0 0 / var(--em-size) no-repeat; font-style: normal; flex: none; }
/* Gesichter: rundes Porträt aus dem 3D-Modell (js/arcade/icons.js) */
img.txt-face { width: 1.3em; height: 1.3em; vertical-align: -0.3em; border-radius: 50%; flex: none; }

/* ---------- Startbild: Titelbild mit Logo (assets/title-*.webp), dazu Ladebalken (wie der Titel danach) */
#startbg {
  position: fixed; inset: 0; background: #8fd0ff var(--title-p, url(../assets/title-portrait.webp)) center 8% / cover no-repeat;
}
/* Titelbilder mit Logo: je Saison (assets/season/<saison>/p|l|w.webp, gesetzt von js/season-date.js), sonst assets/title-*.webp; hochkant, 16:9 und sehr breit.
   Quer: Bildausschnitt (--t-px/--t-py) und wo das Logo im Bild sitzt (Mitte --t-lx, Unterkante --t-ly, Breite --t-lw,
   Seitenverhältnis --t-r); daraus setzt css/game.css den Start-Knopf genau unter das Logo. */
@media (min-aspect-ratio: 1/1) {
  :root { --t-r: 1.777; --t-px: .25; --t-py: .3; --t-lx: .312; --t-ly: .58; --t-lw: .46; }
  #startbg { background-image: var(--title-l, url(../assets/title-landscape.webp)); background-position: 25% 30%; }
}
@media (min-aspect-ratio: 2/1) {
  :root { --t-r: 2.224; --t-px: .3; --t-py: .3; --t-lx: .325; --t-ly: .66; --t-lw: .44; }
  #startbg { background-image: var(--title-w, url(../assets/title-wide.webp)); background-position: 30% 30%; }
}
/* Mars: eigene Titelbilder (aus dem Spiel gerendert: Landeplatz mit Rakete bei Nacht, Bürgermeister im Raumanzug, Logo im
   Himmel) – gelten auch während einer Saison (die setzt --title-* inline, darum !important) */
html[data-planet="mars"] { --title-p: url(../assets/title-mars-portrait.webp) !important; --title-l: url(../assets/title-mars-landscape.webp) !important; --title-w: url(../assets/title-mars-wide.webp) !important; }
html[data-planet="mars"] #startbg, html[data-planet="mars"] #loading.cover { background-color: #1a1030; }
@media (min-aspect-ratio: 1/1) { html[data-planet="mars"] { --t-lx: .27; --t-ly: .47; --t-lw: .42; } }
@media (min-aspect-ratio: 2/1) { html[data-planet="mars"] { --t-lx: .24; --t-ly: .48; --t-lw: .35; } }
#startbg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(40, 110, 200, .18), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 62%, rgba(20, 40, 20, .35)); }
#loading { position: fixed; inset: 0; z-index: 100; transition: opacity .5s; pointer-events: none; }
#loading.done { opacity: 0; }
/* Beim Start der Stadt deckt die Ladeanzeige das Spielfeld mit dem Titelbild ab, bis das erste Bild gezeichnet ist */
#loading.cover { background: #8fd0ff var(--title-p, url(../assets/title-portrait.webp)) center 8% / cover no-repeat; pointer-events: auto; }
@media (min-aspect-ratio: 1/1) { #loading.cover { background-image: var(--title-l, url(../assets/title-landscape.webp)); background-position: 25% 30%; } }
@media (min-aspect-ratio: 2/1) { #loading.cover { background-image: var(--title-w, url(../assets/title-wide.webp)); background-position: 30% 30%; } }
.ks-logo, .ts-logo {
  position: absolute; left: 50%; top: calc(4.5vh + var(--safe-top)); transform: translateX(-50%) rotate(-2deg); width: min(82vw, 460px);
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.28)); animation: logoin .7s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes logoin { from { transform: translateX(-50%) scale(.6) rotate(-8deg); opacity: 0; } }
.ks-load { position: absolute; left: 50%; bottom: calc(8vh + var(--safe-bottom)); transform: translateX(-50%); width: min(78vw, 420px); text-align: center; }
.ks-load b { display: block; margin-bottom: 10px; color: #fff; font-size: clamp(22px, 5.5vw, 30px); letter-spacing: 1px;
  text-shadow: 0 3px 0 #1d3f7a, 2px 0 0 #1d3f7a, -2px 0 0 #1d3f7a, 0 -2px 0 #1d3f7a, 0 6px 12px rgba(0,0,0,.35); }
#ld-tip { margin-top: 12px; color: #fff; font-weight: 600; font-size: clamp(13px, 3.4vw, 16px); line-height: 1.35; text-shadow: 0 2px 0 rgba(20, 40, 90, .8), 0 0 10px rgba(0,0,0,.45); transition: opacity .25s; min-height: 2.7em; }
#ld-tip.fade { opacity: 0; }
.ks-load .bar { height: 26px; border-radius: 16px; border: 4px solid #fff; background: #3b2a7a; overflow: hidden; box-shadow: 0 6px 14px rgba(0,0,0,.3); }
.ks-load .bar i { display: block; height: 100%; width: 0; border-radius: 12px; background: linear-gradient(#9cf27a, #4fc936 55%, #3aa826); box-shadow: inset 0 3px 0 rgba(255,255,255,.45); width: 100%; transform: scaleX(0); transform-origin: left center; transition: transform .2s; }
.ks-retry { margin-top: 14px; pointer-events: auto; }
@media (min-aspect-ratio: 1/1) {
  .ks-logo, .ts-logo { left: 26%; width: min(40vw, 420px); top: calc(5vh + var(--safe-top)); }
  .ks-load { left: 26%; width: min(38vw, 380px); }
}

/* ---------- Buttons */
.btn {
  border: 0; border-radius: 15px; padding: 9px 16px; font-size: 16px; font-weight: 700; color: #fff; cursor: pointer;
  background: linear-gradient(#8be04a, #46b62a 55%, #3a9a2b); box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 4px 0 rgba(0,0,0,.22);
  text-shadow: 0 1px 2px rgba(0,0,0,.35); display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  transition: transform .08s, filter .15s; white-space: nowrap;
}
.btn:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255,255,255,.3), 0 1px 0 rgba(0,0,0,.22); }
.btn.orange { background: linear-gradient(#ffc855, #f59a1e 55%, #e2841a); }
.btn.blue { background: linear-gradient(#7fc6ff, #3b8fe0 55%, #2a70c4); }
.btn.red { background: linear-gradient(#ff8d7e, #ef4d43 55%, #c23b33); }
.btn.small { padding: 7px 12px; font-size: 14px; border-radius: 11px; min-height: 38px; }
.btn.big { padding: 14px 28px; font-size: 22px; border-radius: 18px; }
.btn.wide { width: 100%; }
.btn[disabled], .btn.disabled { filter: grayscale(.9) brightness(1.05); opacity: .6; pointer-events: none; }

/* ---------- Fenster */
.modal-back {
  position: fixed; inset: 0; background: radial-gradient(120% 90% at 50% 42%, rgba(30, 40, 70, .34), rgba(8, 12, 24, .7)); display: flex; align-items: center; justify-content: center;
  z-index: 40; animation: fade .18s; padding: calc(10px + var(--safe-top)) calc(10px + var(--safe-right)) calc(10px + var(--safe-bottom)) calc(10px + var(--safe-left));
}
/* Liegt ein zweites Fenster darüber (z. B. „Willkommen zurück“ über dem Shop), ist nur das obere zu sehen –
   sonst schaut das untere an den Rändern hervor. Beim Schließen kommt das untere unverändert zurück. */
.modal-back:has(~ .modal-back) { background: transparent; }
.modal-back:has(~ .modal-back) > .panel { visibility: hidden; }
/* Fenster im Stil des Shops: cremefarbene Karte mit hellem Rand und brauner Kante, der Titel als dicke weiße Schrift
   mit farbigem Rand sitzt auf der Oberkante, der runde rote Schließen-Knopf auf der Ecke. Farbe des Titels: --o
   (je Fenster über cls, z. B. .t-green, siehe css/game.css). */
.panel {
  position: relative; width: min(760px, 100%); max-height: calc(100% - 24px); margin-top: 24px; display: flex; flex-direction: column;
  background: var(--cream); border-radius: 30px; border: 7px solid #ffe9c4; --o: #2b5fb5;
  box-shadow: 0 0 0 3px #b9814a, 0 9px 0 3px rgba(0,0,0,.2), 0 24px 44px rgba(0,0,0,.4);
  animation: pop .22s ease-out;
}
.panel.narrow { width: min(460px, 100%); }
.panel-head {
  position: relative; z-index: 2; margin: -34px -7px 0; padding: 0 58px 2px; min-height: 58px; display: grid; place-items: center;
  color: #fff; text-align: center; font-size: 30px; font-weight: 700; line-height: 1.02; letter-spacing: .3px;
  text-shadow: 3px 0 0 var(--o), -3px 0 0 var(--o), 0 3px 0 var(--o), 0 -3px 0 var(--o), 2px 2px 0 var(--o), -2px 2px 0 var(--o), 2px -2px 0 var(--o), -2px -2px 0 var(--o), 0 6px 0 var(--o), 0 9px 9px rgba(0,0,0,.3);
}
.panel-head .close, .panel-head .ph-back {
  position: absolute; right: -4px; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
  border: 4px solid #fff; background: linear-gradient(#ff8d7e, #ef4d43 55%, #c23b33); color: #fff; font-size: 22px; font-weight: 700; text-shadow: 0 2px 0 rgba(0,0,0,.25);
  cursor: pointer; display: grid; place-items: center; box-shadow: 0 0 0 2px #9c2b24, 0 4px 0 2px rgba(0,0,0,.22); padding: 0; font-family: inherit; line-height: 1;
}
.panel-head .close:active, .panel-head .ph-back:active { transform: translateY(calc(-50% + 2px)); }
/* Zurück-Pfeil links (Unterseiten) */
.panel-head .ph-back { right: auto; left: -4px; background: linear-gradient(#ffd96b, #f59f1b 60%, #e2841a); box-shadow: 0 0 0 2px #b0600a, 0 4px 0 2px rgba(0,0,0,.22); font-size: 30px; padding-bottom: 4px; }
.panel-head .ph-t { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 0 10px; margin: -4px 0 -10px; }   /* Innenabstand: Platz für den Schriftrand */
.panel-head .ph-t.wrap { white-space: normal; line-height: 1.12; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.panel-body { padding: 8px 14px 14px; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
.panel-body p { margin: 0 0 10px; line-height: 1.35; }
.panel-foot { padding: 0 14px 14px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
/* Knöpfe unten im Fenster: groß, mit hellem Rand wie der Preis-Knopf im Shop */
.panel-foot .btn { min-height: 48px; padding: 8px 20px; font-size: 18px; border-radius: 17px; border: 3px solid #ffe9c4;
  box-shadow: 0 0 0 2px #b9814a, inset 0 2px 0 rgba(255,255,255,.4), 0 5px 0 2px rgba(0,0,0,.18); }
.panel-foot .btn:active { box-shadow: 0 0 0 2px #b9814a, inset 0 2px 0 rgba(255,255,255,.3), 0 2px 0 2px rgba(0,0,0,.18); }

/* ---------- Ohne Scrollen: blättern (pager) und Reiter (tabs) */
.pg { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pg-list { display: flex; flex-direction: column; gap: 6px; touch-action: pan-y; }
.pg-nav { display: flex; align-items: center; justify-content: center; gap: 14px; }
.pg-nav[hidden] { display: none; }
.pg-b {
  width: 46px; height: 42px; border-radius: 50%; border: 3px solid #fff; cursor: pointer; font: 700 26px var(--font); line-height: 1; padding: 0 0 4px; color: #fff;
  background: linear-gradient(#7fc6ff, #3b8fe0 55%, #2a70c4); box-shadow: 0 0 0 2px #1f5aa0, 0 3px 0 2px rgba(0,0,0,.18); text-shadow: 0 2px 0 rgba(0,0,0,.25);
}
.pg-b:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.2); }
.pg-b[disabled] { filter: grayscale(1); opacity: .35; pointer-events: none; }
.pg-n { min-width: 56px; text-align: center; font-weight: 700; font-size: 15px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.tabs { display: flex; flex-direction: column; gap: 10px; }
.tabbar { display: flex; background: #f1e3c6; border-radius: 14px; padding: 4px; gap: 4px; }
.tab {
  position: relative; flex: 1; min-width: 0; min-height: 44px; border: 0; border-radius: 11px; background: none; cursor: pointer;
  font: 700 14px var(--font); color: var(--ink-soft); display: flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 6px;
}
.tab.on { background: #fff; color: var(--blue-dark); box-shadow: 0 3px 0 rgba(0,0,0,.1), 0 2px 6px rgba(0,0,0,.1); }
.tab .tab-i { font-size: 20px; line-height: 1; }
.tab .tab-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab .tab-dot { position: absolute; top: 5px; right: 7px; width: 10px; height: 10px; border-radius: 50%; background: #e53935; border: 2px solid #fff; }

.req-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 8px 0; }
.req {
  min-width: 86px; background: #fff; border-radius: 14px; border: 2px solid var(--cream-line); padding: 6px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.req img { width: 40px; height: 40px; object-fit: contain; }
.req .e { font-size: 32px; line-height: 40px; }
.req .q { font-size: 15px; font-weight: 700; }
.req .nm { font-size: 11px; color: var(--ink-soft); font-weight: 600; text-align: center; line-height: 1.1; }
.req.ok { border-color: #9fd98c; background: #f3fff0; }

.celebrate { text-align: center; }
/* Großes Bild oben wie im Shop: Himmel, Wiese, Leuchten, das Symbol groß in der Mitte */
.celebrate .big-ico {
  position: relative; display: grid; place-items: center; height: clamp(120px, 22vh, 190px); margin: -8px -14px 12px; border-radius: 22px 22px 0 0; overflow: hidden;
  font-size: clamp(72px, 13vh, 110px); line-height: 1;
  background: radial-gradient(circle at 50% 52%, rgba(255, 246, 190, .95), rgba(255, 226, 130, .35) 34%, transparent 58%),
    radial-gradient(60% 46% at 22% 110%, #7ed957 0 99%, transparent 100%), radial-gradient(70% 50% at 82% 114%, #5cc446 0 99%, transparent 100%),
    radial-gradient(18% 11% at 18% 24%, rgba(255,255,255,.9) 0 99%, transparent 100%), radial-gradient(22% 12% at 80% 34%, rgba(255,255,255,.75) 0 99%, transparent 100%),
    linear-gradient(#69bdff, #c9ecff 80%);
}
.celebrate .big-ico > * { filter: drop-shadow(0 8px 7px rgba(0,0,0,.28)); animation: spinin .6s ease-out, shbob 2.6s ease-in-out .6s infinite; }
.celebrate h3 { margin: 6px 0 8px; font-size: 22px; }

/* ---------- Meldungen */
.toasts { position: absolute; top: calc(120px + var(--safe-top)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; z-index: 70; }
.toast { background: var(--pill); color: #fff; padding: 9px 18px; border-radius: 16px; font-weight: 600; font-size: 16px; animation: toast 2.6s forwards; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.toast.bad { background: rgba(200, 50, 40, .88); }
.toast.good { background: rgba(50, 150, 50, .92); }

.muted { color: var(--ink-soft); font-size: 13px; }
.center { text-align: center; }

@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.2) rotate(-2deg); } 60% { transform: scale(.96); } 100% { transform: scale(1); } }
@keyframes pop { from { opacity: 0; scale: .85; } }
@keyframes fade { from { opacity: 0; } }
@keyframes spinin { from { transform: scale(.2) rotate(-200deg); opacity: 0; } }
@keyframes toast { 0% { opacity: 0; transform: translateY(-10px); } 10%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }

@media (max-width: 640px) {
  .panel-head { font-size: 26px; }
  .panel-body { padding: 6px 12px 12px; }
  .celebrate .big-ico { margin: -6px -12px 10px; }
  .panel-foot { padding: 0 12px 12px; }
}
/* niedrige Bildschirme (Handy quer): Kopf und Abstände schmaler, damit der Inhalt passt */
@media (max-height: 620px) { .celebrate .big-ico { height: 96px; font-size: 64px; } }
@media (max-height: 460px) {
  .panel { margin-top: 16px; max-height: calc(100% - 16px); }
  .panel-head { font-size: 22px; min-height: 44px; margin-top: -26px; }
  .panel-head .close, .panel-head .ph-back { width: 40px; height: 40px; }
  .panel-body { padding: 6px 12px 10px; }
  .panel-foot .btn { min-height: 42px; font-size: 16px; }
  .celebrate .big-ico { height: 76px; font-size: 52px; }
}
.ts-logo { animation: none; }   /* kommt nahtlos aus der Ladeanzeige */

/* Raketenflug (js/space-trip.js): Weltraum-Szene über das Neuladen hinweg. Nur transform/opacity – läuft auch weiter,
   während die Stadt aufgebaut wird. */
html[data-trip] { background: #070a18; }
html[data-trip] #loading, html[data-trip] #startbg { display: none; }
.trip { position: fixed; inset: 0; z-index: 10000; overflow: hidden; pointer-events: all; opacity: 0; transition: opacity .8s ease;
  background: radial-gradient(120% 90% at 50% 35%, #1b2552, #0b1030 55%, #05070f); }
.trip.on { opacity: 1; }
.trip.out { opacity: 0; transition-duration: .7s; pointer-events: none; }
.tr-stars { position: absolute; inset: 0; animation: trs 6s linear infinite; will-change: transform; }
.tr-stars i { position: absolute; left: 0; top: 0; width: 1px; height: 1px; border-radius: 50%; }
.tr-stars i + i { top: -100%; }
.tr-stars.s2 { animation-duration: 2.6s; } .tr-stars.s2 i { width: 2px; height: 2px; }
.tr-stars.s3 { animation-duration: .9s; } .tr-stars.s3 i { width: 2px; height: 22px; border-radius: 2px; opacity: .55; }
@keyframes trs { from { transform: translateY(0); } to { transform: translateY(100%); } }
.tr-planet { position: absolute; left: 50%; border-radius: 50%; will-change: transform; }
.tr-planet.p-earth { background: radial-gradient(30% 22% at 30% 38%, #5fbf5a 0 70%, transparent 72%), radial-gradient(22% 30% at 68% 60%, #4fae4c 0 70%, transparent 72%),
  radial-gradient(14% 10% at 52% 18%, #f4f8ff 0 70%, transparent 72%), radial-gradient(circle at 38% 32%, #8fd0ff, #2f7fd8 48%, #163a86 78%);
  box-shadow: 0 0 60px 10px rgba(120, 190, 255, .45), inset -30px -30px 80px rgba(0, 0, 30, .55); }
.tr-planet.p-mars { background: radial-gradient(26% 16% at 36% 44%, rgba(110, 40, 20, .55) 0 70%, transparent 72%), radial-gradient(18% 24% at 66% 62%, rgba(120, 45, 22, .5) 0 70%, transparent 72%),
  radial-gradient(12% 8% at 50% 12%, #fbe9dc 0 70%, transparent 72%), radial-gradient(circle at 38% 32%, #f39a62, #c45429 50%, #6e2410 80%);
  box-shadow: 0 0 50px 8px rgba(255, 140, 90, .35), inset -30px -30px 80px rgba(30, 0, 0, .55); }
.tr-from { width: 170vmax; height: 170vmax; margin-left: -85vmax; top: 64%; }
.tr-to { width: 70vmin; height: 70vmin; margin-left: -35vmin; top: 4%; transform: scale(.05); }
.trip.depart .tr-from { animation: trfrom 3.4s cubic-bezier(.3, 0, .6, 1) forwards; }
.trip.depart .tr-to { animation: trdot 3.4s ease-in forwards; }
.trip.arrive .tr-from { display: none; }
.trip.arrive .tr-to { animation: trto 3.2s cubic-bezier(.2, .1, .3, 1) forwards; }
.trip.land .tr-to { animation: none; transform: translateY(40vh) scale(5); transition: transform 1.1s cubic-bezier(.6, 0, .8, .6); }
@keyframes trfrom { to { transform: translateY(70vh) scale(.08); } }
@keyframes trdot { from { transform: scale(.0); opacity: 0; } to { transform: scale(.05); opacity: 1; } }
@keyframes trto { from { transform: scale(.05); } to { transform: translateY(6vh) scale(.62); } }
.tr-rocket { position: absolute; left: 50%; bottom: 20%; width: clamp(54px, 12vmin, 90px); margin-left: calc(clamp(54px, 12vmin, 90px) / -2); animation: trwob 1.6s ease-in-out infinite alternate; }
.tr-rocket svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 0 10px rgba(255, 190, 90, .35)); }
.tr-flame { transform-origin: 30px 118px; animation: trflame .09s linear infinite alternate; }
.trip.land .tr-rocket { animation: none; transform: translateY(-34vh) scale(.35); opacity: 0; transition: transform 1s ease-in, opacity .9s ease-in .2s; }
@keyframes trwob { from { transform: translate(-4px, 4px) rotate(-2deg); } to { transform: translate(4px, -6px) rotate(2deg); } }
@keyframes trflame { from { transform: scaleY(.8); } to { transform: scaleY(1.15); } }
.tr-text { position: absolute; left: 0; right: 0; bottom: calc(7% + var(--safe-bottom, 0px)); text-align: center; color: #fff; font: 700 clamp(18px, 4.6vw, 24px) Fredoka, sans-serif;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .6); padding: 0 20px; }
.trip.land .tr-text { opacity: 0; transition: opacity .4s; }
.tr-fact { position: absolute; left: 50%; top: 43%; transform: translateX(-50%); width: min(86vw, 460px); padding: 12px 16px; border-radius: 18px;
  background: rgba(255, 255, 255, .1); border: 2px solid rgba(255, 255, 255, .35); color: #fff; font: 600 clamp(14px, 3.8vw, 18px)/1.35 Fredoka, sans-serif; text-align: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3); animation: trfact .9s .5s ease-out both; }
.tr-fact b { display: block; font-size: 1.4em; margin-bottom: 4px; }
@keyframes trfact { from { opacity: 0; transform: translate(-50%, -12px); } }
.trip.land .tr-fact { opacity: 0; transition: opacity .4s; }
@media (prefers-reduced-motion: reduce) { .tr-stars, .tr-rocket, .tr-flame { animation: none; } }
