/* mc.emanuelgraf.me — styles. No external resources (CSP: self only). */

/* ---------- Tokens ---------- */
:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* day (light) */
  --bg: #f3f6ef;
  --bg-alt: #e7eedf;
  --surface: #ffffff;
  --surface-2: #f6f8f3;
  --text: #17201a;
  --text-muted: #4d5a50;
  --border: rgba(23, 32, 26, .12);
  --accent: #2f8f3a;
  --accent-2: #1f6e2a;
  --accent-ink: #ffffff;
  --accent-soft: rgba(47, 143, 58, .12);
  --gold: #b7850f;
  --danger: #c0392b;
  --danger-soft: rgba(192, 57, 43, .1);
  --warn: #c98a0b;
  --accent-text: #1f6e2a; /* accent used as small text: AA on light backgrounds */
  --warn-text: #8a5a00;
  --focus: #0b4fb3;
  --shadow: 0 1px 2px rgba(20, 30, 20, .06), 0 10px 30px -12px rgba(20, 40, 20, .25);
  --title-shadow: rgba(23, 60, 30, .18);

  --glass: rgba(255, 255, 255, .72);
  --glass-border: rgba(255, 255, 255, .7);
  --glass-text: #17201a;
  --glass-muted: #4a574d;

  --sky-top: #5fb4f0;
  --sky-mid: #9fd5f7;
  --sky-bottom: #dff2fb;
  --orb: #fff4b0;
  --orb-glow: rgba(255, 230, 120, .55);
  --cloud: rgba(255, 255, 255, .95);
  --cloud-shade: rgba(220, 235, 245, .95);
  --far: #8fb4d8;
  --mid: #5a9e45;
  --mid-dark: #4a8838;
  --trunk: #6b4a2b;
  --leaf: #3e8a2e;
  --leaf-2: #4f9c3a;
  --wall: #b07d48;
  --roof: #7a3d2a;
  --window: #a8dcf5;
  --door: #4a3220;
  --grass: #62b143;
  --dirt-a: #8b5a2b;
  --dirt-b: #74481f;
  --dirt-c: #a06c3a;
  --stars-opacity: 0;
  --hero-text: #0f2414;
  --hero-muted: #234030;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1024;
    --bg-alt: #0f1630;
    --surface: #141c3a;
    --surface-2: #19224a;
    --text: #e8ecf8;
    --text-muted: #a3acc8;
    --border: rgba(200, 210, 255, .13);
    --accent: #3fd07a;
    --accent-2: #2aa55c;
    --accent-ink: #062012;
    --accent-soft: rgba(63, 208, 122, .14);
    --gold: #f6c344;
    --danger: #ff6b5e;
    --danger-soft: rgba(255, 107, 94, .12);
    --warn: #f6b73c;
    --accent-text: var(--accent);
    --warn-text: var(--warn);
    --focus: #8ab4ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 40px -14px rgba(0, 0, 0, .7);
    --title-shadow: rgba(0, 0, 0, .45);

    --glass: rgba(18, 25, 56, .58);
    --glass-border: rgba(170, 190, 255, .18);
    --glass-text: #eef1fb;
    --glass-muted: #b4bdd9;

    --sky-top: #050816;
    --sky-mid: #0d1538;
    --sky-bottom: #24305f;
    --orb: #e9edf5;
    --orb-glow: rgba(200, 215, 255, .35);
    --cloud: rgba(120, 135, 180, .35);
    --cloud-shade: rgba(90, 105, 150, .35);
    --far: #1a2350;
    --mid: #173326;
    --mid-dark: #122a1f;
    --trunk: #2e2116;
    --leaf: #12301f;
    --leaf-2: #173a25;
    --wall: #4a3524;
    --roof: #2f1912;
    --window: #ffcf5c;
    --door: #20160e;
    --grass: #2c5e2a;
    --dirt-a: #3a2617;
    --dirt-b: #2f1e12;
    --dirt-c: #46301e;
    --stars-opacity: 1;
    --hero-text: #f2f4fb;
    --hero-muted: #c3cbe6;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1024;
  --bg-alt: #0f1630;
  --surface: #141c3a;
  --surface-2: #19224a;
  --text: #e8ecf8;
  --text-muted: #a3acc8;
  --border: rgba(200, 210, 255, .13);
  --accent: #3fd07a;
  --accent-2: #2aa55c;
  --accent-ink: #062012;
  --accent-soft: rgba(63, 208, 122, .14);
  --gold: #f6c344;
  --danger: #ff6b5e;
  --danger-soft: rgba(255, 107, 94, .12);
  --warn: #f6b73c;
  --accent-text: var(--accent);
  --warn-text: var(--warn);
  --focus: #8ab4ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 40px -14px rgba(0, 0, 0, .7);
  --title-shadow: rgba(0, 0, 0, .45);

  --glass: rgba(18, 25, 56, .58);
  --glass-border: rgba(170, 190, 255, .18);
  --glass-text: #eef1fb;
  --glass-muted: #b4bdd9;

  --sky-top: #050816;
  --sky-mid: #0d1538;
  --sky-bottom: #24305f;
  --orb: #e9edf5;
  --orb-glow: rgba(200, 215, 255, .35);
  --cloud: rgba(120, 135, 180, .35);
  --cloud-shade: rgba(90, 105, 150, .35);
  --far: #1a2350;
  --mid: #173326;
  --mid-dark: #122a1f;
  --trunk: #2e2116;
  --leaf: #12301f;
  --leaf-2: #173a25;
  --wall: #4a3524;
  --roof: #2f1912;
  --window: #ffcf5c;
  --door: #20160e;
  --grass: #2c5e2a;
  --dirt-a: #3a2617;
  --dirt-b: #2f1e12;
  --dirt-c: #46301e;
  --stars-opacity: 1;
  --hero-text: #f2f4fb;
  --hero-muted: #c3cbe6;
}

/* Hero tokens follow the SKY (in-game/local time, root[data-sky] set by sky.js / theme-init.js),
   not the UI theme: with a manual Tag/Nacht override the rest of the page follows the override,
   but text drawn on the sky must always contrast with the sky behind it. */
:root[data-sky="day"] .hero,
:root[data-sky="day"] .topbar:not(.is-scrolled) {
  --title-shadow: rgba(23, 60, 30, .18);
  --glass: rgba(255, 255, 255, .72);
  --glass-border: rgba(255, 255, 255, .7);
  --glass-text: #17201a;
  --glass-muted: #4a574d;
  --orb: #fff4b0;
  --orb-glow: rgba(255, 230, 120, .55);
  --cloud: rgba(255, 255, 255, .95);
  --cloud-shade: rgba(220, 235, 245, .95);
  --far: #8fb4d8;
  --mid: #5a9e45;
  --mid-dark: #4a8838;
  --trunk: #6b4a2b;
  --leaf: #3e8a2e;
  --leaf-2: #4f9c3a;
  --wall: #b07d48;
  --roof: #7a3d2a;
  --window: #a8dcf5;
  --door: #4a3220;
  --grass: #62b143;
  --dirt-a: #8b5a2b;
  --dirt-b: #74481f;
  --dirt-c: #a06c3a;
  --hero-text: #0f2414;
  --hero-muted: #234030;
}
:root[data-sky="night"] .hero,
:root[data-sky="night"] .topbar:not(.is-scrolled) {
  --title-shadow: rgba(0, 0, 0, .45);
  --glass: rgba(18, 25, 56, .58);
  --glass-border: rgba(170, 190, 255, .18);
  --glass-text: #eef1fb;
  --glass-muted: #b4bdd9;
  --orb: #e9edf5;
  --orb-glow: rgba(200, 215, 255, .35);
  --cloud: rgba(120, 135, 180, .35);
  --cloud-shade: rgba(90, 105, 150, .35);
  --far: #1a2350;
  --mid: #173326;
  --mid-dark: #122a1f;
  --trunk: #2e2116;
  --leaf: #12301f;
  --leaf-2: #173a25;
  --wall: #4a3524;
  --roof: #2f1912;
  --window: #ffcf5c;
  --door: #20160e;
  --grass: #2c5e2a;
  --dirt-a: #3a2617;
  --dirt-b: #2f1e12;
  --dirt-c: #46301e;
  --hero-text: #f2f4fb;
  --hero-muted: #c3cbe6;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition: background-color .6s var(--ease), color .6s var(--ease);
}
img { max-width: 100%; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
.no-anim, .no-anim *, .no-anim *::before, .no-anim *::after { transition: none !important; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
h1, h2, h3 { line-height: 1.15; margin: 0; }
p { margin: 0; }
code { font-family: var(--mono); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
/* two-tone ring where the background is the sky (light-blue in day mode) */
.hero :focus-visible, .topbar :focus-visible { box-shadow: 0 0 0 6px var(--bg); }
[hidden] { display: none !important; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: 8px;
  box-shadow: var(--shadow); transition: top .2s;
}
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  --b-bg: var(--surface-2);
  --b-ink: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 44px; padding: .65em 1.15em;
  font: 600 .98rem/1.1 var(--font);
  color: var(--b-ink); background: var(--b-bg);
  border: 0; border-radius: 10px; cursor: pointer;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .22), inset 0 2px 0 rgba(255, 255, 255, .22), 0 6px 16px -8px rgba(0, 0, 0, .5);
  transition: transform .15s var(--ease), filter .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .22), inset 0 2px 0 rgba(255, 255, 255, .2); }
.btn:disabled { cursor: not-allowed; filter: grayscale(.6) brightness(.9); opacity: .7; transform: none; }
.btn--primary { --b-bg: linear-gradient(180deg, #4bd884, #2aa55c); --b-ink: #062012; }
.btn--lg { min-height: 52px; padding: .8em 1.5em; font-size: 1.05rem; }
.btn__icon { width: 1.05em; height: 1.05em; fill: currentColor; flex: none; }
.btn__spinner {
  display: none; width: 1em; height: 1em; border: 2.5px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin .8s linear infinite;
}
.btn.is-busy .btn__spinner { display: inline-block; }
.btn[aria-disabled="true"] { opacity: .7; cursor: progress; }

.link-btn {
  display: inline-flex; align-items: center; gap: .4em; min-height: 44px; padding: 0 .4em;
  background: none; border: 0; color: inherit; font: 600 .85rem var(--font); cursor: pointer; opacity: .85;
}
.link-btn:hover { opacity: 1; }
.link-btn svg { width: 14px; height: 14px; fill: currentColor; }
.link-btn.is-spinning svg { animation: spin .7s linear infinite; }

.chip {
  display: inline-flex; align-items: center; gap: .5em; margin-top: .6em; max-width: 100%;
  padding: .45em .75em; min-height: 44px;
  background: var(--accent-soft); color: var(--text);
  border: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 8px;
  font: 600 .95rem var(--mono); cursor: pointer;
  transition: background-color .2s, transform .15s;
}
.chip:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.chip:active { transform: scale(.97); }
.chip code { overflow-wrap: anywhere; }
.chip svg { width: 14px; height: 14px; fill: currentColor; flex: none; opacity: .75; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 10px var(--gutter);
  color: var(--hero-text);
  transition: background-color .3s, box-shadow .3s, backdrop-filter .3s, color .3s;
}
.topbar.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: 0 1px 0 var(--border);
  color: var(--text);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0;
  color: inherit; text-decoration: none; font: 700 1rem var(--mono); letter-spacing: -.01em;
}
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand:hover { color: inherit; }
.brand img { flex: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3)); }
.topbar > nav { margin-left: auto; }
.nav { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: flex; align-items: center; min-height: 44px; padding: 10px 12px; border-radius: 8px;
  color: inherit; text-decoration: none; font-weight: 600; font-size: .92rem; opacity: .85;
}
.nav a:hover { opacity: 1; background: color-mix(in srgb, currentColor 10%, transparent); color: inherit; }
.sky-toggle {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-height: 44px; min-width: 44px; padding: 0 12px 0 8px; margin-left: 4px;
  font: 600 .85rem var(--font); color: inherit;
  background: color-mix(in srgb, currentColor 10%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  border-radius: 999px; cursor: pointer;
}
.sky-toggle:hover { background: color-mix(in srgb, currentColor 16%, transparent); }
.sky-toggle__icon {
  width: 22px; height: 22px; border-radius: 4px; position: relative;
  background: #ffd84a; box-shadow: 0 0 0 3px rgba(255, 216, 74, .3);
  transition: background-color .4s, box-shadow .4s;
}
.sky-toggle[data-mode="dark"] .sky-toggle__icon { background: #e9edf5; box-shadow: inset -6px 0 0 #b8c0d6, 0 0 0 3px rgba(200, 210, 255, .25); }
/* auto: half sun, half moon; the glow follows what the sky currently is */
.sky-toggle[data-mode="auto"] .sky-toggle__icon { background: linear-gradient(90deg, #ffd84a 0 50%, #e9edf5 50% 100%); box-shadow: inset -4px 0 0 #b8c0d6, 0 0 0 3px rgba(255, 216, 74, .3); }
.sky-toggle[data-mode="auto"][data-sky="night"] .sky-toggle__icon { box-shadow: inset -4px 0 0 #b8c0d6, 0 0 0 3px rgba(200, 210, 255, .25); }
.sky-toggle[data-mode="auto"] .sky-toggle__icon::after {
  content: "A"; position: absolute; right: -7px; bottom: -6px; width: 13px; height: 13px; border-radius: 3px;
  display: grid; place-items: center; font: 800 9px/1 var(--mono); color: #062012; background: #3fd07a;
}
/* compact menu for narrow screens (no JS needed: <details>) */
.navmenu { display: none; position: relative; margin-left: auto; }
.navmenu > summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  list-style: none; cursor: pointer; font: 600 .85rem var(--font); color: inherit;
  border-radius: 999px; border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  background: color-mix(in srgb, currentColor 10%, transparent);
}
.navmenu > summary::-webkit-details-marker { display: none; }
.navmenu__bars, .navmenu__bars::before, .navmenu__bars::after {
  display: block; width: 16px; height: 2px; background: currentColor; border-radius: 1px; position: relative;
}
.navmenu__bars::before, .navmenu__bars::after { content: ""; position: absolute; left: 0; }
.navmenu__bars::before { top: -5px; }
.navmenu__bars::after { top: 5px; }
.navmenu[open] > summary { background: color-mix(in srgb, currentColor 18%, transparent); }
.navmenu__list {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 200px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.navmenu__list a {
  display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 8px;
  color: inherit; text-decoration: none; font-weight: 600;
}
.navmenu__list a:hover, .navmenu__list a:focus-visible { background: var(--accent-soft); }
@media (max-width: 1040px) {
  .topbar > nav { display: none; }
  .navmenu { display: block; }
}
@media (max-width: 380px) {
  .sky-toggle__label { display: none; }
  .sky-toggle { padding: 0; justify-content: center; }
}

/* ---------- Hero / sky ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: max(680px, 100svh);
  display: flex; flex-direction: column; justify-content: center;
  padding: 96px var(--gutter) clamp(150px, 26vh, 260px);
  color: var(--hero-text);
  overflow: hidden;
}
.sky {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 55%, var(--sky-bottom) 100%);
  transition: background .8s var(--ease);
}
.sky > * { will-change: transform; }
.stars { position: absolute; inset: 0 0 30% 0; opacity: var(--sky-stars, var(--stars-opacity)); transition: opacity 4s linear; }
.star {
  position: absolute; width: 2px; height: 2px; background: #fff; border-radius: 0;
  animation: twinkle var(--tw, 4s) ease-in-out infinite; animation-delay: var(--td, 0s);
}
.star.big { width: 3px; height: 3px; box-shadow: 0 0 6px rgba(255, 255, 255, .8); }
@keyframes twinkle { 0%, 100% { opacity: .9; } 50% { opacity: .2; } }
.shooting {
  position: absolute; width: 120px; height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff);
  transform: rotate(-18deg); opacity: 0; pointer-events: none;
  animation: shoot 1.1s ease-out forwards;
}
@keyframes shoot {
  0% { opacity: 0; translate: 0 0; }
  15% { opacity: 1; }
  100% { opacity: 0; translate: -340px 110px; }
}
.orb {
  /* position on the day arc comes from sky.js (--orb-x/--orb-y as fractions); defaults for no-JS.
     The height reference is the first screen, not the (tall, on phones) hero. */
  position: absolute; left: calc(var(--orb-x, .44) * 100%); top: calc(var(--orb-y, .14) * min(100svh, 900px)); translate: -50% -50%;
  width: clamp(40px, 5.5vw, 72px); aspect-ratio: 1;
  transition: left 5s linear, top 5s linear, opacity 1.5s var(--ease), background .8s, box-shadow .8s;
}
.sky-jump .orb { transition: none; }
.orb--sun {
  background: #fff4b0; opacity: var(--orb-o, calc(1 - var(--stars-opacity)));
  box-shadow: 0 0 0 10px rgba(255, 230, 120, .33), 0 0 80px 30px rgba(255, 230, 120, .55);
}
.orb--moon {
  background: #e9edf5; opacity: var(--orb-o, var(--stars-opacity));
  box-shadow: 0 0 0 8px rgba(200, 215, 255, .12), 0 0 60px 20px rgba(200, 215, 255, .3);
}
@media (max-width: 760px) { .orb { width: 34px; } }
.orb--moon::before, .orb--moon::after { content: ""; position: absolute; background: rgba(140, 150, 175, .45); }
.orb--moon::before { width: 22%; height: 22%; left: 20%; top: 24%; }
.orb--moon::after { width: 16%; height: 16%; right: 22%; bottom: 22%; box-shadow: -18px -6px 0 -2px rgba(140, 150, 175, .45); }
/* moon phase: 0 full, 1-3 waning (lit part shrinks to the left), 4 new, 5-7 waxing (lit part on the right).
   The dark part is clipped away so the sky shows through, as in the game; the glow stays on the lit side. */
.orb--moon[data-moon="1"] { clip-path: inset(-60px 28% -60px -60px); }
.orb--moon[data-moon="2"] { clip-path: inset(-60px 50% -60px -60px); }
.orb--moon[data-moon="3"] { clip-path: inset(-60px 72% -60px -60px); }
.orb--moon[data-moon="5"] { clip-path: inset(-60px -60px -60px 72%); }
.orb--moon[data-moon="6"] { clip-path: inset(-60px -60px -60px 50%); }
.orb--moon[data-moon="7"] { clip-path: inset(-60px -60px -60px 28%); }
.orb__shade { display: none; }
.moonicon__shade { position: absolute; top: 0; bottom: 0; right: 0; width: 0; background: #1a2140; }
[data-moon="1"] > .moonicon__shade { width: 28%; }
[data-moon="2"] > .moonicon__shade { width: 50%; }
[data-moon="3"] > .moonicon__shade { width: 72%; }
[data-moon="4"] > .moonicon__shade { width: 100%; }
[data-moon="5"] > .moonicon__shade { width: 72%; right: auto; left: 0; }
[data-moon="6"] > .moonicon__shade { width: 50%; right: auto; left: 0; }
[data-moon="7"] > .moonicon__shade { width: 28%; right: auto; left: 0; }
.orb--moon[data-moon="4"] { background: transparent; box-shadow: inset 0 0 0 2px rgba(200, 215, 255, .18); }
.orb--moon[data-moon="4"]::before, .orb--moon[data-moon="4"]::after { display: none; }

.clouds { position: absolute; inset: 0; pointer-events: none; }
.cloud {
  position: absolute; left: 0; height: 22px; width: 140px;
  background: var(--cloud);
  box-shadow: 0 8px 0 var(--cloud-shade);
  animation: drift var(--dur, 120s) linear infinite; animation-delay: var(--delay, 0s);
  transition: background .8s, box-shadow .8s;
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; }
.cloud::before { width: 60%; height: 18px; left: 18%; top: -18px; }
.cloud::after { width: 30%; height: 14px; left: 32%; top: -30px; }
.c1 { top: 18%; --dur: 140s; --delay: -20s; }
.c2 { top: 30%; --dur: 190s; --delay: -110s; width: 200px; }
.c3 { top: 11%; --dur: 160s; --delay: -70s; width: 110px; }
.c4 { top: 40%; --dur: 230s; --delay: -160s; width: 170px; }
@keyframes drift { from { transform: translateX(-260px); } to { transform: translateX(calc(100vw + 40px)); } }

.land { position: absolute; left: 0; bottom: 0; width: 100%; display: block; }
.land--far { height: clamp(200px, 46vh, 420px); bottom: 0; }
.land--far path { fill: var(--far); transition: fill .8s; }
.land--mid { height: clamp(170px, 38vh, 360px); }
.land--mid > path { fill: var(--mid); transition: fill .8s; }
.land--mid .trunk { fill: var(--trunk); }
.land--mid .leaf { fill: var(--leaf); }
.land--mid .leaf + .leaf { fill: var(--leaf-2); }
.land--mid .wall { fill: var(--wall); }
.land--mid .roof { fill: var(--roof); }
.land--mid .window { fill: var(--window); }
.land--mid .door { fill: var(--door); }
.land--mid .torch { fill: #6b4a2b; }
.land--mid .flame { fill: #ffb22e; animation: flicker 1.6s steps(3) infinite; }
.land--mid rect, .land--mid path { transition: fill .8s; }
:root[data-sky="day"] .land--mid .window { filter: none !important; }
:root[data-sky="night"] .land--mid .window { filter: drop-shadow(0 0 6px rgba(255, 200, 80, .9)) !important; }
:root[data-theme="dark"] .land--mid .window { filter: drop-shadow(0 0 6px rgba(255, 200, 80, .9)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .land--mid .window { filter: drop-shadow(0 0 6px rgba(255, 200, 80, .9)); } }
@keyframes flicker { 0%, 100% { opacity: 1; } 50% { opacity: .65; } }
.land--front { height: clamp(110px, 24vh, 220px); }
.land--front .grass { fill: var(--grass); transition: fill .8s; }
.land--front .dirt-a { fill: var(--dirt-a); }
.land--front .dirt-b { fill: var(--dirt-b); }
.land--front .dirt-c { fill: var(--dirt-c); }
.hero::after { /* soft fade into page */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40px; z-index: -1;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg) 60%, transparent));
  pointer-events: none;
}

.hero__inner {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  display: grid; gap: clamp(28px, 5vw, 56px); align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
}
@media (max-width: 920px) { .hero__inner { grid-template-columns: minmax(0, 1fr); } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px; border-radius: 999px;
  font: 600 .8rem var(--mono); letter-spacing: .04em; text-transform: uppercase;
  color: var(--hero-text);
  background: color-mix(in srgb, var(--glass) 70%, transparent);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.pip { width: 8px; height: 8px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.title {
  margin: 18px 0 16px;
  font-size: clamp(2.4rem, 7.2vw, 4.6rem); font-weight: 900; letter-spacing: -.03em;
  text-shadow: 4px 4px 0 var(--title-shadow);
}
.title__line { display: inline-block; }
.title__line--accent {
  background: linear-gradient(180deg, #7ef0a6 0%, #3fd07a 55%, #22a052 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(4px 4px 0 var(--title-shadow));
}
:root[data-theme="light"] .title__line--accent { background-image: linear-gradient(180deg, #2fae55, #1b7a35); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .title__line--accent { background-image: linear-gradient(180deg, #2fae55, #1b7a35); } }
:root[data-sky="day"] .title__line--accent { background-image: linear-gradient(180deg, #2fae55, #1b7a35); }
:root[data-sky="night"] .title__line--accent { background-image: linear-gradient(180deg, #7ef0a6 0%, #3fd07a 55%, #22a052 100%); }
.lead { max-width: 34em; font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--hero-muted); }
.address {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 26px; padding: 8px 8px 8px 16px; width: fit-content; max-width: 100%;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 14px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
.address__value { font-size: clamp(.98rem, 2.4vw, 1.15rem); font-weight: 700; color: var(--glass-text); overflow-wrap: anywhere; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 18px; translate: -50% 0;
  width: 44px; height: 44px; border: 2px solid rgba(255, 255, 255, .7); border-radius: 16px;
  display: grid; justify-items: center; padding-top: 8px;
}
.scroll-cue span { width: 4px; height: 8px; background: #fff; animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
@media (max-height: 700px), (max-width: 920px) { .scroll-cue { display: none; } }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.glass {
  background: var(--glass); color: var(--glass-text);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
}

/* ---------- Status card ---------- */
.status { padding: clamp(18px, 3vw, 26px); scroll-margin-top: 80px; position: relative; overflow: hidden; }
.status::before { /* pixel accent strip */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 12px, var(--accent-2) 12px 24px);
  opacity: .9; transition: opacity .4s;
}
.status[data-state="offline"]::before { background: repeating-linear-gradient(90deg, var(--danger) 0 12px, color-mix(in srgb, var(--danger) 70%, #000) 12px 24px); }
.status[data-state="loading"]::before { background: repeating-linear-gradient(90deg, var(--warn) 0 12px, color-mix(in srgb, var(--warn) 70%, #000) 12px 24px); }
.status__head { display: flex; align-items: center; gap: 14px; }
.status__icon { width: 44px; height: 44px; border-radius: 8px; flex: none; background: rgba(0, 0, 0, .15); }
.status__titles { min-width: 0; flex: 1; }
.status__title { font-size: 1.1rem; font-weight: 800; }
.status__motd {
  font-size: .9rem; color: var(--glass-muted); margin-top: 2px;
  white-space: pre-line; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.badge {
  --c: var(--warn);
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  padding: 6px 12px; border-radius: 999px;
  font: 700 .8rem var(--font); letter-spacing: .02em;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.badge__dot {
  position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--text-muted)); flex: none;
}
.badge__dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit;
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.2); opacity: 0; } }
.status[data-state="online"] .badge { --c: var(--accent); color: var(--accent-text); }
.status[data-state="loading"] .badge { color: var(--warn-text); }
.status[data-state="offline"] .badge { --c: var(--danger); }
.status[data-state="unknown"] .badge { --c: var(--glass-muted); }
.status[data-state="unknown"] .badge__dot::after { animation: none; }
.status[data-state="unknown"]::before { background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--glass-muted) 70%, transparent) 0 12px, color-mix(in srgb, var(--glass-muted) 45%, transparent) 12px 24px); }
.status[data-state="loading"] .players__empty { animation: pulse-bg 1.4s ease-in-out infinite; }
@keyframes pulse-bg { 50% { background: color-mix(in srgb, var(--glass-text) 8%, transparent); } }
.status[data-state="offline"] .badge__dot::after { animation: none; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 20px 0 14px; }
.stat {
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--glass-text) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-text) 8%, transparent);
  min-width: 0;
}
.stat dt { font: 600 .7rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--glass-muted); }
.stat dd { margin: 2px 0 0; font-weight: 800; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  .stats { gap: 6px; }
  .stat { padding: 8px 9px; }
  .stat dd { font-size: .92rem; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
  .flip__text { font-size: .84rem; }
}
.stat dd.is-updated { animation: flash .9s var(--ease); }
@keyframes flash { 0% { color: var(--accent-text); transform: translateY(-3px); } 100% { color: inherit; transform: none; } }

.slots { display: flex; gap: 6px; height: 14px; margin-bottom: 18px; }
.slot {
  flex: 1; border-radius: 3px;
  background: color-mix(in srgb, var(--glass-text) 10%, transparent);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12);
  transition: background-color .5s var(--ease), box-shadow .5s;
}
.slot.is-filled {
  background: linear-gradient(180deg, #6fe39b, #2aa55c);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2), inset 0 2px 0 rgba(255, 255, 255, .35), 0 0 12px rgba(63, 208, 122, .45);
}
.players__title { font: 700 .72rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--glass-muted); margin-bottom: 8px; }
.players { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.player {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px;
  background: color-mix(in srgb, var(--glass-text) 6%, transparent);
  animation: enter .5s var(--ease) both;
}
.player.is-leaving { animation: leave .35s var(--ease) forwards; }
.player img { width: 36px; height: 36px; border-radius: 6px; flex: none; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); background: #6b5a44; }
.player__name { font-weight: 700; overflow-wrap: anywhere; }
.player__tag { margin-left: auto; font: 600 .72rem var(--mono); color: var(--accent-text); flex: none; }
@keyframes enter { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes leave { to { opacity: 0; transform: translateX(12px); } }
.players__empty {
  padding: 14px; border-radius: 12px; text-align: center; font-size: .92rem; color: var(--glass-muted);
  border: 1px dashed color-mix(in srgb, var(--glass-text) 20%, transparent);
}
.status__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--glass-text) 10%, transparent);
  font-size: .82rem; color: var(--glass-muted);
}

/* ---------- Sections ---------- */
main { display: block; }
.section { padding: clamp(64px, 10vw, 112px) var(--gutter); scroll-margin-top: 40px; position: relative; }
.section > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section--alt { background: var(--bg-alt); transition: background-color .6s var(--ease); }
.section--alt::before { /* stepped pixel edge */
  content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px;
  background: var(--bg-alt); transition: background-color .6s var(--ease);
  -webkit-mask: linear-gradient(#000 0 0) bottom / 100% 6px no-repeat, repeating-linear-gradient(90deg, #000 0 48px, transparent 48px 72px, #000 72px 120px, transparent 120px 132px);
  mask: linear-gradient(#000 0 0) bottom / 100% 6px no-repeat, repeating-linear-gradient(90deg, #000 0 48px, transparent 48px 72px, #000 72px 120px, transparent 120px 132px);
}
.section__head { text-align: center; margin-bottom: clamp(32px, 5vw, 52px); }
.kicker {
  display: inline-block; font: 700 .78rem var(--mono); text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent-text); margin-bottom: 10px;
}
.kicker::before { content: "▪ "; }
.section__head h2 { font-size: clamp(1.8rem, 4.4vw, 2.7rem); font-weight: 900; letter-spacing: -.02em; text-shadow: 3px 3px 0 var(--title-shadow); }
.section__lead { margin: 14px auto 0; max-width: 40em; color: var(--text-muted); font-size: 1.05rem; }

/* Steps */
.steps { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); counter-reset: none; }
.step { padding: 24px 22px; position: relative; transition: transform .25s var(--ease), box-shadow .25s; }
.step:hover { transform: translateY(-4px); }
.step__num {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px;
  font: 800 1.15rem var(--mono); color: #062012;
  background: linear-gradient(180deg, #6fe39b, #2aa55c);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .22), inset 0 2px 0 rgba(255, 255, 255, .3);
  border-radius: 6px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: .96rem; }

/* Journey */
.journey { display: grid; gap: 22px; }
.journey__track {
  position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
}
.journey__rail {
  position: absolute; left: 12.5%; right: 12.5%; top: 38px; height: 6px; border-radius: 3px;
  background: repeating-linear-gradient(90deg, var(--border) 0 10px, transparent 10px 16px);
}
.journey__fill {
  display: block; height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, #2aa55c, #6fe39b);
  box-shadow: 0 0 12px rgba(63, 208, 122, .5);
  transition: width 1.2s var(--ease);
}
.journey__stop {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 4px 12px; min-width: 0;
  background: none; border: 0; border-radius: 14px; color: var(--text); cursor: pointer;
  font: inherit; transition: transform .25s var(--ease), background-color .25s;
}
.journey__stop img {
  width: 64px; height: 64px; padding: 10px; box-sizing: border-box;
  background: var(--surface); border: 2px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.journey__stop:hover img { transform: translateY(-3px) rotate(-3deg); }
.journey__stop[aria-selected="true"] img { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); transform: translateY(-4px) scale(1.06); }
.journey__stop[data-state="todo"] img { filter: grayscale(.55) brightness(.92); }
.journey__stop[data-state="current"] img { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); } 50% { box-shadow: 0 0 0 9px transparent, 0 0 26px rgba(63, 208, 122, .45); } }
.journey__name { font-weight: 800; font-size: .98rem; text-align: center; }
.journey__tag {
  font: 600 .68rem var(--mono); text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 8px; border-radius: 999px; color: var(--text-muted); background: color-mix(in srgb, var(--text) 7%, transparent);
  white-space: nowrap;
}
.journey__stop[data-state="current"] .journey__tag { color: var(--accent-ink); background: var(--accent); }
:root[data-theme="light"] .journey__stop[data-state="current"] .journey__tag { color: #fff; background: var(--accent-2); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .journey__stop[data-state="current"] .journey__tag { color: #fff; background: var(--accent-2); } }
.journey__stop[data-state="done"] .journey__tag { color: var(--accent-text); background: var(--accent-soft); }
.journey__stop[aria-selected="true"]::after {
  content: ""; position: absolute; bottom: -12px; left: 50%; translate: -50% 0;
  border: 10px solid transparent; border-bottom-color: var(--glass-border);
}
@media (max-width: 520px) {
  .journey__stop img { width: 52px; height: 52px; padding: 8px; }
  .journey__rail { top: 32px; }
  .journey__name { font-size: .82rem; }
  .journey__tag { font-size: .6rem; padding: 2px 5px; }
}
@media (max-width: 380px) {
  /* keep the state in the accessible name, hide it visually */
  .journey__tag { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
.journey__panels { padding: clamp(20px, 4vw, 32px); min-height: 220px; color: var(--text); background: color-mix(in srgb, var(--surface) 80%, transparent); }
.journey__panel { animation: enter .45s var(--ease) both; border-radius: 8px; }
.journey__panel h3 { font-size: clamp(1.25rem, 3vw, 1.55rem); margin-bottom: 8px; }
.journey__panel > p { color: var(--text-muted); max-width: 46em; }
.checklist { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.checklist li {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px;
  border-radius: 8px; font-size: .9rem; font-weight: 600;
  background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text-muted);
}
.checklist li::before {
  content: ""; width: 14px; height: 14px; border-radius: 3px; flex: none;
  border: 2px solid color-mix(in srgb, var(--text) 35%, transparent);
}
.checklist li[data-done="true"] { color: var(--text); background: var(--accent-soft); }
.checklist li[data-done="true"]::before {
  border-color: var(--accent); background: var(--accent);
  box-shadow: inset 0 0 0 2px var(--surface);
}

/* Quests / flip cards */
.quests { margin-top: clamp(48px, 7vw, 72px); }
.quests__title { text-align: center; font-size: clamp(1.3rem, 3vw, 1.6rem); }
.quests__hint { text-align: center; color: var(--text-muted); font-size: .92rem; margin: 6px 0 22px; }
.flips { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); }
.flips > li { display: grid; } /* cards in a row share the tallest height */
.flip {
  position: relative; display: grid; width: 100%; height: auto; min-height: 220px; padding: 0;
  background: none; border: 0; cursor: pointer; perspective: 900px; font: inherit; color: var(--text);
  border-radius: var(--radius);
}
.flip__face {
  position: relative; grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 18px 14px; text-align: center;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  transition: transform .6s var(--ease), opacity .4s;
}
.flip__front img { width: 64px; height: 64px; transition: transform .3s var(--ease); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .25)); }
.flip:hover .flip__front img { transform: translateY(-4px) rotate(4deg) scale(1.05); }
.flip__title { font-weight: 800; font-size: 1.02rem; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; max-width: 100%; }
.flip__sub { font: 600 .7rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text); }
.flip__back {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), var(--surface));
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.flip__text { font-size: .9rem; color: var(--text-muted); line-height: 1.5; }
.flip[aria-pressed="true"] .flip__front { transform: rotateY(-180deg); }
.flip[aria-pressed="true"] .flip__back { transform: rotateY(0); }

/* Crew */
.crew { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); max-width: 760px !important; }
.crew__card { display: flex; align-items: center; gap: 18px; padding: 20px; transition: transform .25s var(--ease), border-color .3s; }
.crew__card:hover { transform: translateY(-3px); }
.crew__card:not(.is-online) .crew__head { filter: grayscale(.7) brightness(.9); }
.crew__head { width: 64px; height: 64px; border-radius: 10px; flex: none; box-shadow: 0 4px 0 rgba(0, 0, 0, .25); background: #6b5a44; }
.crew__name { font: 800 1.12rem var(--mono); overflow-wrap: anywhere; }
.crew__state { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-size: .88rem; color: var(--text-muted); }
.crew__state .badge__dot { --c: color-mix(in srgb, var(--text) 30%, transparent); }
.crew__state .badge__dot::after { animation: none; }
.crew__card.is-online { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.crew__card.is-online .badge__dot { --c: var(--accent); }
.crew__card.is-online .badge__dot::after { animation: pulse 2s var(--ease) infinite; }
.crew__card.is-online .crew__state { color: var(--accent-text); font-weight: 700; }

/* ---------- Contact form ---------- */
.contact {
  max-width: 760px !important; padding: clamp(20px, 4vw, 34px);
  display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr));
  color: var(--text); background: color-mix(in srgb, var(--surface) 88%, transparent);
  position: relative;
}
@media (max-width: 620px) { .contact { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .92rem; }
.field__hint { font-weight: 500; color: var(--text-muted); }
.field input, .field textarea {
  width: 100%; min-height: 46px; padding: 11px 14px;
  font: inherit; font-size: 1rem; color: var(--text);
  background: var(--surface-2); border: 2px solid var(--border); border-radius: 10px;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--text) 25%, transparent); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.field [aria-invalid="true"] { border-color: var(--danger); background: var(--danger-soft); }
.field__error { color: var(--danger); font-size: .86rem; font-weight: 600; }
.field__meta { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.counter { margin-left: auto; font: 600 .78rem var(--mono); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.counter.is-over { color: var(--danger); }

.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.contact__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.guard { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 240px; font-size: .86rem; color: var(--text-muted); }
.guard__icon { width: 22px; height: 22px; flex: none; fill: color-mix(in srgb, var(--text) 30%, transparent); transition: fill .3s; }
.guard__body { display: grid; gap: 6px; flex: 1; min-width: 0; }
.guard__bar { display: block; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; max-width: 240px; }
.guard__fill { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s linear; }
.guard[data-state="idle"] .guard__bar { display: none; }
.guard[data-state="working"] .guard__icon { fill: var(--warn); animation: bob 1s ease-in-out infinite; }
.guard[data-state="ready"] .guard__icon { fill: var(--accent); }
.guard[data-state="ready"] .guard__bar { display: none; }
.guard[data-state="ready"] .guard__text { color: var(--accent-text); font-weight: 600; }
.guard[data-state="error"] .guard__icon { fill: var(--danger); }
@keyframes bob { 50% { transform: translateY(-2px); } }

.form-result {
  grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 12px; font-weight: 600;
  animation: enter .4s var(--ease) both;
}
.form-result[data-kind="ok"] { background: var(--accent-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.form-result[data-kind="error"] { background: var(--danger-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); }
.form-result::before {
  content: "!"; display: grid; place-items: center; width: 22px; height: 22px; flex: none; margin-top: 1px;
  border-radius: 4px; font: 900 .85rem/1 var(--mono); color: #fff; background: var(--danger);
}
.form-result.is-empty { display: block; padding: 0; border: 0; animation: none; }
.form-result.is-empty::before { display: none; }
.form-result[data-kind="ok"]::before { content: "\2713"; color: #062012; background: var(--accent); }
.contact.is-sent { animation: sent .6s var(--ease); }
@keyframes sent { 30% { transform: scale(1.01); box-shadow: 0 0 0 6px var(--accent-soft), var(--shadow); } }

/* ---------- World widget (status card) ---------- */
.world {
  display: flex; flex-wrap: wrap; gap: 6px 8px; margin: -4px 0 14px;
}
.world__item {
  display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 4px 10px; border-radius: 8px;
  font-size: .86rem; background: color-mix(in srgb, var(--glass-text) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-text) 8%, transparent);
}
.world__k { font: 600 .68rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--glass-muted); }
.world__v { font-variant-numeric: tabular-nums; font-weight: 800; }
.world__frozen {
  margin-left: 2px; padding: 1px 7px; border-radius: 999px; font: 700 .68rem var(--mono); text-transform: uppercase; letter-spacing: .04em;
  color: var(--glass-muted); border: 1px dashed color-mix(in srgb, var(--glass-text) 30%, transparent);
}
.moonicon { position: relative; width: 14px; height: 14px; flex: none; overflow: hidden; background: #e9edf5; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.wx { position: relative; width: 16px; height: 14px; flex: none; }
.wx__a, .wx__b { position: absolute; }
.wx[data-wx="clear"] .wx__a { inset: 1px 2px; background: #ffd84a; box-shadow: 0 0 0 2px rgba(255, 216, 74, .35); }
.wx[data-wx="rain"] .wx__a, .wx[data-wx="thunder"] .wx__a { left: 0; right: 0; top: 0; height: 8px; background: #9aa6b8; box-shadow: inset 0 -2px 0 #7a8698; }
.wx[data-wx="rain"] .wx__b { left: 3px; top: 10px; width: 2px; height: 4px; background: #4f8de0; box-shadow: 4px -1px 0 #4f8de0, 8px 0 0 #4f8de0; }
.wx[data-wx="thunder"] .wx__a { background: #5d6577; box-shadow: inset 0 -2px 0 #444b5a; }
.wx[data-wx="thunder"] .wx__b { left: 6px; top: 7px; width: 5px; height: 7px; background: #ffd84a; clip-path: polygon(40% 0, 100% 0, 60% 45%, 100% 45%, 20% 100%, 40% 55%, 0 55%); }

/* ---------- Notices ---------- */
.notice {
  padding: 14px 16px; border-radius: 12px; text-align: center; color: var(--text-muted); font-size: .95rem;
  border: 1px dashed color-mix(in srgb, var(--text) 22%, transparent);
}

/* ---------- Live map ---------- */
.mapwrap { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); align-items: start; }
@media (max-width: 860px) { .mapwrap { grid-template-columns: minmax(0, 1fr); } }
.map { position: relative; overflow: hidden; height: min(60vh, 480px); min-height: 260px; padding: 0; background: var(--surface-2); }
.map__canvas { position: absolute; inset: 0; border-radius: inherit; }
#map .leaflet-container { font: inherit; font-size: .85rem; background: #101722; border-radius: inherit; }
#map .leaflet-container:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
#map .map--notiles.leaflet-container {
  background: color-mix(in srgb, var(--grass) 55%, var(--bg));
}
.map-gridtile {
  box-shadow: inset -1px -1px 0 color-mix(in srgb, var(--text) 18%, transparent);
  background:
    linear-gradient(color-mix(in srgb, var(--text) 7%, transparent) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, color-mix(in srgb, var(--text) 7%, transparent) 1px, transparent 1px) 0 0 / 32px 32px;
}
.map__overlay, .map__note {
  position: absolute; z-index: 900; margin: 0; pointer-events: none;
  padding: 10px 14px; border-radius: 10px; font-weight: 700; font-size: .92rem;
  background: var(--glass); color: var(--glass-text); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--shadow);
}
.map__overlay { left: 50%; top: 50%; translate: -50% -50%; text-align: center; max-width: calc(100% - 32px); }
.map__note { left: 12px; right: 12px; bottom: 12px; font-weight: 600; font-size: .82rem; width: fit-content; }
.map.is-empty .map__canvas::after { content: none; }
/* Leaflet controls in the site look; 44 px touch targets */
#map .leaflet-bar { border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 10px; overflow: hidden; }
#map .leaflet-bar a {
  width: 44px; height: 44px; line-height: 42px; font: 700 1.3rem/42px var(--font);
  background: var(--surface); color: var(--text); border-bottom-color: var(--border);
}
#map .leaflet-bar a:hover { background: var(--surface-2); }
#map .map-ctl { display: flex; }
#map .map-ctl a { display: flex; align-items: center; justify-content: center; border-bottom: 0; }
#map .map-ctl a + a { border-left: 1px solid var(--border); }
#map .map-ctl a.map-ctl__follow { width: auto; min-width: 44px; padding: 0 14px; font-size: .9rem; white-space: nowrap; }
#map .map-ctl a[aria-pressed="true"] { background: var(--accent); color: #fff; }
.map:fullscreen { width: 100%; height: 100%; border-radius: 0; }
.map.map--fs { position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; }
html.map-fs-lock { overflow: hidden; }
.leaflet-marker-icon.map-player { cursor: pointer; }
#map .leaflet-bar a.leaflet-disabled { color: color-mix(in srgb, var(--text) 35%, transparent); background: var(--surface); }
#map .leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--text-muted); font-size: .72rem; }
.map-tiles { image-rendering: pixelated; }
/* players */
.leaflet-marker-icon.map-player { background: none; border: 0; }
.leaflet-marker-icon.map-player.is-moving { transition: transform 1.2s var(--ease); }
.map-player__inner {
  /* pin: label + head above the (approximate) position, a stem pointing at it */
  position: absolute; left: 0; top: 0; translate: -50% -100%; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.map-player__inner::after { content: ""; width: 4px; height: 10px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .5); }
.map-player__inner img { width: 28px; height: 28px; border-radius: 5px; background: #6b5a44; box-shadow: 0 0 0 2px #fff, 0 3px 8px rgba(0, 0, 0, .5); order: 1; }
.map-player__label {
  display: grid; justify-items: center; padding: 2px 8px; border-radius: 6px; white-space: nowrap; line-height: 1.25;
  background: rgba(10, 14, 28, .82); color: #f2f4fb; order: 0;
}
.map-player__inner::after { order: 2; }
.map-player__name { font-weight: 800; font-size: .8rem; }
.map-player__sub { font-size: .66rem; opacity: .85; }
.map-cell { fill: #3fd07a; fill-opacity: .2; stroke: #3fd07a; stroke-width: 2; stroke-dasharray: 6 4; }
.leaflet-marker-icon.map-spawn { background: none; border: 0; }
.map-spawn__inner { position: absolute; left: 0; top: 0; translate: -6px -6px; display: flex; align-items: center; gap: 5px; }
.map-spawn__dot { width: 12px; height: 12px; background: #ffd84a; box-shadow: 0 0 0 2px rgba(10, 14, 28, .8); rotate: 45deg; }
.map-spawn__label { font: 700 .7rem var(--mono); padding: 1px 6px; border-radius: 5px; background: rgba(10, 14, 28, .75); color: #ffe9a0; }
/* side panel */
.mapside { padding: 18px; display: grid; gap: 10px; }
.mapside__title { font-size: 1.05rem; }
.maplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.maplist__item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--text) 5%, transparent); font-size: .92rem; }
.maplist__item img { width: 24px; height: 24px; border-radius: 4px; flex: none; background: #6b5a44; }
.maplist__item--away { border: 1px dashed color-mix(in srgb, var(--text) 25%, transparent); background: none; }
.mapside__empty { color: var(--text-muted); font-size: .92rem; }
.mapside__hint { color: var(--text-muted); font-size: .8rem; }

/* ---------- Fortschritte ---------- */
.adv { display: grid; gap: 18px; max-width: 900px !important; }
.recent { padding: 16px 18px; }
.recent__title, .duel__title { font: 700 .74rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 10px; }
.recent__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.recent__item { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--text) 5%, transparent); }
.recent__item img { grid-row: span 2; width: 28px; height: 28px; border-radius: 4px; background: #6b5a44; }
.recent__text { display: grid; min-width: 0; line-height: 1.3; }
.recent__text strong { overflow-wrap: anywhere; }
.recent__who { font-size: .8rem; color: var(--text-muted); }
.recent__item time { grid-column: 2; font-size: .78rem; color: var(--text-muted); }
.recent__item[data-frame="challenge"] { box-shadow: inset 3px 0 0 var(--gold); }
.advtabs-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.advtab {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px 6px 8px;
  font: 700 .98rem var(--mono); color: var(--text); cursor: pointer;
  background: var(--surface); border: 2px solid var(--border); border-radius: 12px;
}
.advtab img { width: 28px; height: 28px; border-radius: 4px; background: #6b5a44; }
.advtab:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.advtab[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.advpanel { padding: clamp(16px, 3vw, 26px); display: grid; gap: 10px; }
.advsum { display: grid; gap: 8px; margin-bottom: 8px; }
.advsum__big { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; font-variant-numeric: tabular-nums; }
.advsum__big strong { font-size: 1.3em; color: var(--accent-text); }
.advsum__pct { color: var(--text-muted); font-size: .7em; }
.advsum__bar, .advtabs__bar { display: block; height: 10px; border-radius: 3px; overflow: hidden; background: color-mix(in srgb, var(--text) 10%, transparent); }
.advsum__fill, .advtabs__fill { display: block; height: 100%; width: var(--w, 0%); background: linear-gradient(90deg, #2aa55c, #6fe39b); transition: width .8s var(--ease); }
.advsum__sub { color: var(--text-muted); font-size: .9rem; }
.advtabs { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.advtabs__sum {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "arrow title count" "arrow bar bar";
  align-items: center; column-gap: 10px; row-gap: 6px; padding: 12px 14px; min-height: 48px; cursor: pointer; list-style: none; border-radius: 12px;
}
.advtabs__sum::-webkit-details-marker { display: none; }
.advtabs__sum::before {
  content: ""; grid-area: arrow; width: 10px; height: 10px; border-right: 3px solid currentColor; border-bottom: 3px solid currentColor;
  rotate: -45deg; transition: rotate .2s var(--ease); opacity: .7;
}
.advtabs[open] > .advtabs__sum::before { rotate: 45deg; }
.advtabs__title { grid-area: title; font-weight: 800; font-size: 1.05rem; }
.advtabs__count { grid-area: count; font: 700 .85rem var(--mono); color: var(--text-muted); }
.advtabs__bar { grid-area: bar; height: 6px; }
.advlist { list-style: none; margin: 0; padding: 4px 12px 12px; display: grid; gap: 2px; }
.advi {
  --depth: 0;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 8px 8px 8px calc(8px + min(var(--depth), 6) * 14px); border-radius: 8px;
  background-image: repeating-linear-gradient(90deg, transparent 0 7px, color-mix(in srgb, var(--text) 10%, transparent) 7px 9px, transparent 9px 14px);
  background-size: calc(min(var(--depth), 6) * 14px) 100%; background-repeat: no-repeat; background-position: 8px 0;
}
@media (max-width: 520px) { .advi { padding-left: calc(6px + min(var(--depth), 6) * 7px); background-image: none; } }
.advi:hover { background-color: color-mix(in srgb, var(--text) 4%, transparent); }
.advi__badge {
  width: 30px; height: 30px; margin-top: 2px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  border: 2px solid color-mix(in srgb, var(--text) 28%, transparent);
}
.advi[data-frame="task"] .advi__badge { border-radius: 4px; }
.advi[data-frame="goal"] .advi__badge { border-radius: 12px; }
.advi[data-frame="challenge"] .advi__badge {
  border: 0; clip-path: polygon(50% 0, 62% 18%, 85% 15%, 82% 38%, 100% 50%, 82% 62%, 85% 85%, 62% 82%, 50% 100%, 38% 82%, 15% 85%, 18% 62%, 0 50%, 18% 38%, 15% 15%, 38% 18%);
  background: color-mix(in srgb, var(--gold) 30%, transparent);
}
.advi[data-done="true"] .advi__badge { background: var(--accent); border-color: var(--accent-2); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); }
.advi[data-done="true"][data-frame="challenge"] .advi__badge { background: linear-gradient(180deg, #ffe07a, #e0a520); }
.advi[data-done="true"] .advi__badge::after { content: ""; width: 10px; height: 6px; border-left: 3px solid #062012; border-bottom: 3px solid #062012; rotate: -45deg; translate: 0 -2px; }
.advi__title { font-weight: 800; line-height: 1.3; }
.advi__desc { color: var(--text-muted); font-size: .9rem; line-height: 1.4; }
.advi__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 3px; font-size: .8rem; color: var(--accent-text); font-weight: 600; }
.advi[data-done="false"] .advi__title { color: var(--text-muted); font-weight: 700; }
.advi__first { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 6px; border-radius: 999px; color: var(--text); background: color-mix(in srgb, var(--gold) 20%, transparent); font-size: .74rem; }
.crown { width: 14px; height: 10px; background: var(--gold); clip-path: polygon(0 100%, 0 20%, 25% 55%, 50% 0, 75% 55%, 100% 20%, 100% 100%); }
.advi__prog { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.advi__prog progress { -webkit-appearance: none; appearance: none; width: min(240px, 60%); height: 8px; border: 0; border-radius: 3px; background: color-mix(in srgb, var(--text) 12%, transparent); overflow: hidden; }
.advi__prog progress::-webkit-progress-bar { background: color-mix(in srgb, var(--text) 12%, transparent); }
.advi__prog progress::-webkit-progress-value { background: var(--accent); }
.advi__prog progress::-moz-progress-bar { background: var(--accent); }
.advi__progtext { font: 700 .78rem var(--mono); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.advi__crit { margin-top: 4px; font-size: .84rem; }
.advi__crit summary { cursor: pointer; color: var(--accent-text); font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }
.advi__crit p { color: var(--text-muted); margin-top: 4px; }

/* ---------- Logbuch ---------- */
.logbook { max-width: 760px !important; padding: clamp(14px, 3vw, 22px); display: grid; gap: 12px; }
.loglist { list-style: none; margin: 0; padding: 0; display: grid; }
.logi {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center;
  padding: 10px 8px; border-bottom: 1px solid var(--border); border-radius: 6px;
}
.logi:last-child { border-bottom: 0; }
.logi__text { overflow-wrap: anywhere; line-height: 1.4; }
.logi__text em { font-style: normal; font-weight: 700; color: var(--accent-text); }
.logi time { font-size: .8rem; color: var(--text-muted); white-space: nowrap; }
@media (max-width: 520px) { .logi { grid-template-columns: auto minmax(0, 1fr); } .logi time { grid-column: 2; } }
.logi__icon { width: 14px; height: 14px; background: color-mix(in srgb, var(--text) 35%, transparent); }
.logi[data-type="join"] .logi__icon { border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent); }
.logi[data-type="leave"] .logi__icon { border-radius: 50%; background: none; border: 2px solid color-mix(in srgb, var(--text) 40%, transparent); }
.logi[data-type="adv"] .logi__icon { background: var(--accent); border-radius: 3px; }
.logi[data-frame="goal"] .logi__icon { border-radius: 6px; background: #4f9de0; }
.logi[data-frame="challenge"] .logi__icon { background: var(--gold); clip-path: polygon(50% 0, 65% 30%, 100% 35%, 72% 60%, 80% 100%, 50% 80%, 20% 100%, 28% 60%, 0 35%, 35% 30%); }
.logi[data-type="death"] .logi__icon { background: var(--danger); clip-path: polygon(20% 0, 50% 30%, 80% 0, 100% 20%, 70% 50%, 100% 80%, 80% 100%, 50% 70%, 20% 100%, 0 80%, 30% 50%, 0 20%); }
.logi.is-new { animation: newrow 3s var(--ease); }
@keyframes newrow { 0%, 30% { background: var(--accent-soft); } 100% { background: transparent; } }
.logbook__more { justify-self: center; }
.logi:focus-visible { outline-offset: 0; }

/* ---------- Crew duel ---------- */
.crew__since { margin-top: 4px; font-size: .82rem; color: var(--text-muted); }
.duel { max-width: 760px !important; margin-top: 16px; padding: clamp(16px, 3vw, 24px); }
.duel__head { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; margin-bottom: 12px; }
.duel__who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font: 800 .95rem var(--mono); }
.duel__who img { width: 32px; height: 32px; border-radius: 5px; background: #6b5a44; flex: none; }
.duel__who--r { justify-self: end; flex-direction: row-reverse; }
.duel__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel__vs { font: 800 .8rem var(--mono); color: var(--text-muted); text-transform: uppercase; }
.duel__rows { display: grid; gap: 8px; }
.duel__row {
  display: grid; align-items: center; gap: 4px 10px;
  grid-template-columns: 4.2em minmax(0, 1fr) 8.5em minmax(0, 1fr) 4.2em; grid-template-areas: "vl bl lab br vr";
}
.duel__val { font: 700 .9rem var(--mono); font-variant-numeric: tabular-nums; }
.duel__val--l { grid-area: vl; text-align: right; }
.duel__val--r { grid-area: vr; }
.duel__label { grid-area: lab; text-align: center; font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.duel__bar { display: flex; height: 12px; border-radius: 3px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; }
.duel__bar--l { grid-area: bl; justify-content: flex-end; }
.duel__bar--r { grid-area: br; }
.duel__fill { display: block; width: var(--w, 0%); height: 100%; background: color-mix(in srgb, var(--text) 35%, transparent); transition: width .8s var(--ease); }
.duel__bar.is-lead .duel__fill { background: linear-gradient(90deg, #2aa55c, #6fe39b); }
.duel__row[data-metric="Tode"] .duel__bar.is-lead .duel__fill { background: var(--danger); }
@media (max-width: 560px) {
  .duel__row { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-areas: "lab lab lab lab" "vl bl br vr"; column-gap: 6px; }
  .duel__label { margin-top: 4px; }
}

/* ---------- Quest chips (flip cards) ---------- */
.flip__chip {
  margin-top: 2px; padding: 2px 9px; border-radius: 999px; font: 700 .72rem var(--font); max-width: 100%; overflow-wrap: anywhere;
  color: var(--text-muted); background: color-mix(in srgb, var(--text) 7%, transparent);
}
.flip__chip[data-state="done"] { color: var(--accent-text); background: var(--accent-soft); }
.flip__chip[data-state="progress"] { color: var(--warn-text); background: color-mix(in srgb, var(--warn) 14%, transparent); }

/* ---------- Footer ---------- */
.footer { padding: 36px var(--gutter) 44px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .9rem; }
.footer__inner { max-width: var(--maxw); margin: 0 auto; display: grid; gap: 6px; text-align: center; }
.footer img { vertical-align: -3px; margin-right: 4px; }
.footer__small { font-size: .78rem; opacity: .8; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80; translate: -50% 0;
  max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 12px;
  background: #101626; color: #f1f4fb; font-weight: 600; font-size: .95rem;
  box-shadow: 0 12px 36px -10px rgba(0, 0, 0, .6), inset 0 -3px 0 rgba(0, 0, 0, .3);
  border: 1px solid rgba(255, 255, 255, .12);
  opacity: 0; transform: translateY(20px) scale(.96); pointer-events: none;
  transition: opacity .25s var(--ease), transform .3s var(--ease);
}
.toast:empty { padding: 0; border: 0; }
.toast.is-visible { opacity: 1; transform: none; }
.toast::before { content: ""; display: inline-block; width: 10px; height: 10px; background: #3fd07a; margin-right: 10px; vertical-align: 1px; }

/* ---------- Reveal on scroll ---------- */
/* uses `translate` (not `transform`) so hover lifts on .step / .crew__card keep working */
.reveal { opacity: 0; translate: 0 18px; transition: opacity .7s var(--ease), translate .7s var(--ease), transform .25s var(--ease), box-shadow .25s, border-color .3s; }
.reveal.is-in { opacity: 1; translate: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .cloud { animation: none !important; transform: translateX(var(--rx, 20vw)); }
  .c1 { --rx: 8vw; } .c2 { --rx: 46vw; } .c3 { --rx: 70vw; } .c4 { --rx: 24vw; }
  .shooting { display: none; }
  .reveal { opacity: 1; translate: none; }
  /* flip cards cross-fade instead of rotating */
  .flip__face { transform: none !important; }
  .flip__back { opacity: 0; }
  .flip[aria-pressed="true"] .flip__front { opacity: 0; }
  .flip[aria-pressed="true"] .flip__back { opacity: 1; }
}
