/* Kunzaria — a night that passes while you scroll. */
:root {
  color-scheme: dark;
  --night-0: #070b18;
  --night-1: #0e1630;
  --night-2: #1c2a52;
  --moon: #f3e9cf;
  --mist: #aab5d2;
  --mist-dim: #7885a8;
  --gold: #d7ad57;
  --gold-light: #f5d994;
  --teal: #234b50;
  --teal-light: #3f8a84;
  --amethyst: #a07cf2;
  --day-ink: #16213a;
  --glass: rgba(14, 22, 48, .56);
  --glass-line: rgba(245, 217, 148, .16);

  --sky-top: #070b18;
  --sky-mid: #0e1630;
  --sky-low: #1c2a52;
  --stars: 1;

  --serif: "Source Serif 4", "New York", ui-serif, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  --gutter: clamp(18px, 4vw, 56px);

  font-family: var(--sans);
  color: var(--moon);
  background: var(--night-0);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: transparent; overflow-x: clip; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h2 { text-wrap: balance; }
::selection { background: rgba(215, 173, 87, .35); }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--moon); color: var(--night-0); padding: 10px 14px; border-radius: 10px; }
.skip-link:focus { top: 12px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 4px; border-radius: 12px; }

/* ——— Sky ——— */
.sky {
  position: fixed; inset: 0; z-index: -2;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 52%, var(--sky-low) 100%);
}
.stars { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: var(--stars); pointer-events: none; }

/* ——— Bar ——— */
.bar {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) var(--gutter) 14px;
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
/* The brand, Discord and Log in share one pill: same height, border and type. */
.bar-brand, .bar-cta, .bar-play {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1; color: var(--moon);
  background: rgba(7, 11, 24, .45); border: 1px solid var(--glass-line);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  transition: background .2s, border-color .2s;
}
.bar-brand { padding: 0 16px; }
.bar-brand img { display: block; width: auto; height: 22px; }
.bar-cta svg { width: 17px; height: 17px; }
.bar-cta:hover, .bar-play:hover, .bar-play:focus-visible { background: rgba(215, 173, 87, .16); border-color: rgba(245, 217, 148, .4); }
.bar-play span { color: var(--gold-light); }

.eyebrow { font-family: var(--sans); font-size: 12px; font-weight: 700; line-height: 1.2; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.big-number { display: grid; justify-items: start; font-size: clamp(110px, 17vw, 260px) !important; line-height: .8 !important; letter-spacing: -.06em !important; color: var(--moon); }
.big-number span { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); -webkit-text-fill-color: var(--gold); margin: 18px 0 0 .5em; line-height: 1; }
section h2 { font-family: var(--serif); font-weight: 900; font-size: clamp(38px, 5.2vw, 76px); line-height: .98; letter-spacing: -.035em; }

/* ——— CTA ——— */
.cta {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 22px 15px 20px; border-radius: 999px;
  font-weight: 650; font-size: 16px; color: var(--night-0);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 -2px 0 rgba(120, 78, 18, .35) inset, 0 10px 36px -8px rgba(215, 173, 87, .55);
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s;
}
.cta svg { width: 22px; height: 22px; }
.cta-arrow { margin-left: 6px; font-size: 18px; transition: transform .25s; }
.cta::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.7) 48%, transparent 66%);
  transform: translateX(-120%);
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 -2px 0 rgba(120, 78, 18, .35) inset, 0 16px 44px -8px rgba(215, 173, 87, .75); }
.cta:hover .cta-arrow { transform: translate(3px, -3px); }
.cta:hover::after { transform: translateX(120%); transition: transform .8s ease; }
.cta:active { transform: scale(.98); }

/* ——— I. Arrival ——— */
.arrive {
  --stage-h: min(64svh, 620px);
  --ground: clamp(44px, 9svh, 110px);
  position: relative; isolation: isolate;
  height: max(100svh, 720px);
  overflow: clip;
}
/* The hero stands in the combat background for what they're doing: scene above the horizon, floor below. */
.scene { --horizon: 64%; position: absolute; inset: 0; z-index: -1; background: var(--night-0); }
.scene-layer {
  position: absolute; inset: 0;
  filter: brightness(.8) saturate(.95);
  opacity: 0; transition: opacity 1s ease;
}
.scene-layer.is-shown { opacity: 1; }
.scene-sky, .scene-floor { position: absolute; left: 0; width: 100%; object-fit: cover; }
.scene-sky { top: 0; height: var(--horizon); object-position: 50% 100%; }
.scene-floor { top: calc(var(--horizon) - 1px); height: calc(101% - var(--horizon)); object-position: 50% 0; }
.scene::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 60%, transparent 40%, rgba(7, 11, 24, .55) 100%),
    linear-gradient(180deg, rgba(7, 11, 24, .7) 0%, rgba(7, 11, 24, .2) 30%, rgba(7, 11, 24, 0) 50%, rgba(7, 11, 24, .25) 82%, var(--night-0) 100%);
}
.portal-burst {
  position: absolute; z-index: 1; left: 50%; bottom: calc(var(--ground) + var(--stage-h) * .45);
  width: calc(var(--stage-h) * 1.1); aspect-ratio: 1; translate: -50% 50%;
  border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(245, 217, 148, .5), transparent);
}
.portal-burst.is-firing { animation: burst .9s cubic-bezier(.2,.7,.2,1); }
@keyframes burst { 0% { opacity: 1; transform: scale(.5); } 100% { opacity: 0; transform: scale(1.2); } }

.wordmark {
  position: absolute; left: 0; right: 0;
  top: clamp(72px, 12svh, 130px);
  z-index: 2;
  display: flex; justify-content: center;
  margin: 0;
  pointer-events: none;
}
/* The wordmark is custom-drawn: Source Serif 4 Black, recut, with the i as a planted sword. */
.wordmark-svg { display: block; width: min(76vw, 1210px); height: auto; overflow: visible; filter: drop-shadow(0 8px 40px rgba(7, 11, 24, .5)); }
.wm-l { fill: var(--moon); }
.wm-gem { fill: var(--gold); }
.wm-l, .wm-gem { animation: wm-rise 1.2s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 70ms + 150ms); }
@keyframes wm-rise { from { transform: translateY(240px); opacity: 0; } }

.stage-wrap {
  position: absolute; left: 50%; z-index: 3;
  bottom: var(--ground);
  translate: -50% 0;
  width: min(440px, 86vw);
  display: flex; flex-direction: column; align-items: center;
}
.character-stage {
  position: relative; display: block;
  width: 100%; height: var(--stage-h);
  padding: 0; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pedestal { position: absolute; left: 50%; bottom: 0; width: 86%; height: auto; transform: translateX(-50%); filter: drop-shadow(0 18px 24px rgba(0,0,0,.55)); }
#character, .character-preview {
  position: absolute; left: 50%; transform: translateX(-50%);
  height: 78%; width: 60%; bottom: 10%; overflow: visible; pointer-events: none;
}
#character { width: 100%; }
.character-preview { object-fit: contain; }
#character { transition: opacity .35s, transform .5s cubic-bezier(.2,.8,.2,1); }
.character-stage.is-summoning #character { opacity: 0; transform: translateX(-50%) translateY(16px) scale(.94); }
.character-stage:hover .pedestal { filter: drop-shadow(0 18px 24px rgba(0,0,0,.55)) drop-shadow(0 0 18px rgba(245,217,148,.35)); }

.nameplate {
  position: absolute; z-index: 4; right: calc(50% + 22%); top: 30%; text-align: right;
  display: grid; gap: 3px; white-space: nowrap;
  padding: 10px 14px; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: opacity .3s, transform .4s cubic-bezier(.2,.8,.2,1);
}
.nameplate.is-swapping { opacity: 0; transform: translateY(6px); }
.nameplate-name { font-family: var(--serif); font-weight: 900; font-size: 22px; letter-spacing: -.02em; }
.nameplate-meta { font-size: 12px; color: var(--mist); }

.xp-layer { position: absolute; left: 54%; top: 34%; width: 0; height: 0; pointer-events: none; }
.xp-drop {
  position: absolute; left: 0; top: 0;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-family: var(--round); font-weight: 800; font-size: 17px; color: var(--gold-light);
  text-shadow: 0 1px 0 #000, 0 0 12px rgba(215,173,87,.5);
  animation: xp-rise 2.4s cubic-bezier(.25,.7,.3,1) forwards;
}
.xp-drop svg { width: 22px; height: 22px; padding: 3px; border-radius: 7px; background: var(--tint); }
.xp-drop svg path { stroke: #10162a; }
@keyframes xp-rise {
  0% { transform: translate(var(--dx), 30px) scale(.8); opacity: 0; }
  12% { opacity: 1; transform: translate(var(--dx), 0) scale(1); }
  75% { opacity: 1; }
  100% { transform: translate(calc(var(--dx) + var(--drift)), -110px); opacity: 0; }
}

.summon-hint {
  position: absolute; top: calc(100% + 14px); padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--glass-line); background: rgba(7, 11, 24, .35);
  font-size: 13px; font-weight: 600; color: var(--gold-light); cursor: pointer;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background .2s, border-color .2s;
}
.summon-hint:hover { background: rgba(215, 173, 87, .14); border-color: rgba(245, 217, 148, .45); }
.summon-glyph { display: inline-block; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.summon-hint:hover .summon-glyph { transform: rotate(180deg) scale(1.2); }

.arrive-copy {
  position: absolute; z-index: 5; left: var(--gutter); bottom: clamp(28px, 6svh, 64px);
  max-width: 380px; display: grid; gap: 18px; justify-items: start;
}
.thesis { text-wrap: balance; font-family: var(--serif); font-weight: 600; font-size: clamp(20px, 1.7vw, 25px); line-height: 1.25; letter-spacing: -.01em; color: var(--moon); }
.thesis em { font-style: italic; color: var(--gold-light); }
.cta-note { font-size: 13px; color: var(--mist); }

.visit {
  position: absolute; z-index: 5; right: var(--gutter); bottom: clamp(28px, 6svh, 64px);
  display: grid; justify-items: end; gap: 2px; text-align: right;
}
.visit-label { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--mist-dim); }
.visit-time { font-family: var(--serif); font-weight: 900; font-size: 44px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.visit-xp { font-size: 13px; color: var(--mist); }
.visit-xp strong { color: var(--gold-light); font-family: var(--round); font-variant-numeric: tabular-nums; }


/* ——— Pinned acts ——— */
.pin { position: sticky; top: 0; height: 100svh; display: grid; align-items: center; overflow: clip; }

/* ——— II. Away ——— */
.away { position: relative; height: 340svh; }
.away-grid {
  width: min(1200px, 100% - var(--gutter) * 2); margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 6vw, 96px); align-items: center;
}
.away-copy { display: grid; gap: 22px; }
.clock {
  font-family: var(--serif); font-weight: 900; font-variant-numeric: tabular-nums;
  font-size: clamp(88px, 13vw, 200px); line-height: .85; letter-spacing: -.05em;
  color: var(--moon);
  white-space: nowrap;
}
.clock small { font-size: .38em; letter-spacing: 0; margin-left: .04em; color: var(--gold); }
.night-track { position: relative; height: 6px; border-radius: 99px; background: rgba(170, 181, 210, .18); max-width: 520px; display: flex; justify-content: space-between; align-items: center; }
.night-track-fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p, 0) * 100%); border-radius: inherit; background: linear-gradient(90deg, #6d7fc4, var(--gold-light)); box-shadow: 0 0 16px rgba(245,217,148,.45); }
.night-track-end { position: relative; top: 20px; font-size: 14px; color: var(--mist-dim); }
.away-note { color: var(--mist-dim); font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; margin-top: 14px; }

.ledger {
  position: relative; padding: 22px; border-radius: 26px;
  background: linear-gradient(180deg, rgba(24, 34, 68, .72), rgba(12, 18, 40, .72));
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.6);
  display: grid; gap: 6px;
}
.ledger-head { display: grid; gap: 4px; margin-bottom: 10px; }
.ledger-head h3 { font-family: var(--serif); font-weight: 900; font-size: 26px; letter-spacing: -.02em; }
.ledger-sub { font-size: 13px; color: var(--mist-dim); }
.ledger-row {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 16px; background: rgba(170, 181, 210, .06);
}
.ledger-glyph { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #c7e2e2; }
.ledger-glyph svg { width: 26px; height: 26px; }
.ledger-xp { background: rgba(245, 217, 148, .16); color: var(--gold-light); font-family: var(--round); font-weight: 900; font-size: 14px; }
.ledger-log { background: rgba(170, 181, 210, .1); padding: 6px; object-fit: contain; }
.ledger-label { font-size: 15px; color: var(--moon); }
.ledger-value { font-family: var(--round); font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; color: #7fe0a8; }
.ledger-level .ledger-value { color: var(--moon); }
.ledger-level .ledger-value strong { color: var(--gold-light); }
.ledger-pet { grid-template-columns: 44px 1fr auto; background: linear-gradient(90deg, rgba(160, 124, 242, .22), rgba(160, 124, 242, .06)); border: 1px solid rgba(160, 124, 242, .35); transition: opacity .5s, transform .6s cubic-bezier(.2,.9,.25,1.3); }
.ledger-pet img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); }
.ledger-pet .ledger-label { font-size: 14px; }
.ledger-rare { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #cdb8ff; font-family: var(--sans); font-weight: 700; }
.ledger-pet[data-state="hidden"] { opacity: .0; transform: translateY(10px) scale(.96); }
.levelup {
  position: absolute; right: -14px; top: -18px;
  display: grid; justify-items: center; padding: 10px 16px; border-radius: 18px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--night-0);
  box-shadow: 0 12px 30px -6px rgba(215,173,87,.6);
  opacity: 0; transform: translateY(8px) scale(.9);
}
.levelup span { font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.levelup strong { font-family: var(--serif); font-weight: 900; font-size: 30px; line-height: 1; }
.levelup.is-on { animation: levelup 1.4s cubic-bezier(.2,.9,.25,1) both; }
@keyframes levelup { 0% { opacity: 0; transform: translateY(10px) scale(.8); } 15% { opacity: 1; transform: translateY(0) scale(1.08); } 30% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }

/* ——— III. Skills ——— */
.skills { position: relative; height: 300svh; }
.skills-layout {
  width: min(1240px, 100% - var(--gutter) * 2); margin: 0 auto;
  display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(20px, 5vw, 80px); align-items: center;
}
.skills-copy { display: grid; gap: 20px; }
.skills-copy p:last-child { color: var(--mist); font-size: 17px; line-height: 1.6; max-width: 40ch; }
.dial { --size: min(78svh, 620px, 92vw); position: relative; width: var(--size); aspect-ratio: 1; justify-self: center; }
.dial-rings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring { fill: none; stroke: rgba(245, 217, 148, .2); }
.ring-dash { stroke-dasharray: 2 10; stroke: rgba(245, 217, 148, .35); }
.ring-inner { stroke: rgba(170, 181, 210, .14); stroke-width: 10; }
.ring-progress { fill: none; stroke: var(--tint, var(--gold)); stroke-width: 10; stroke-linecap: round; stroke-dasharray: var(--arc, 50) 100; transform: rotate(-90deg); transform-origin: 300px 300px; transition: stroke .4s, stroke-dasharray .5s cubic-bezier(.2,.8,.2,1); filter: drop-shadow(0 0 10px var(--tint, var(--gold))); }
.dial-runes { font-family: var(--sans); font-size: 9.5px; font-weight: 700; letter-spacing: .32em; fill: rgba(245, 217, 148, .42); text-transform: uppercase; }
.dial-rings text { transform-origin: 300px 300px; transform: rotate(var(--rune-rot, 0deg)); }
.dial-nodes { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.dial-node {
  --r: calc(var(--size) * .4167);
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--size) * .1); aspect-ratio: 1; margin: calc(var(--size) * -.05);
  transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) rotate(calc(var(--a) * -1));
}
.dial-node button {
  width: 100%; height: 100%; border-radius: 50%; padding: 0; cursor: pointer;
  display: grid; place-items: center;
  background: var(--tint); border: 2px solid rgba(7, 11, 24, .6);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  transform: scale(.78); opacity: .55;
  transition: transform .45s cubic-bezier(.2,.9,.25,1.2), opacity .3s, box-shadow .3s;
}
.dial-node button svg { width: 56%; height: 56%; }
.dial-node button:hover { opacity: .95; transform: scale(.88); }
.dial-node.is-active button { transform: scale(1.12); opacity: 1; border-color: var(--gold-light); box-shadow: 0 0 0 4px rgba(245,217,148,.25), 0 0 34px rgba(245,217,148,.45); }
.dial-center { position: absolute; inset: 27%; display: grid; place-content: center; justify-items: center; text-align: center; gap: 8px; }
.dial-count { font-size: 11px; font-weight: 700; letter-spacing: .24em; color: var(--mist-dim); font-variant-numeric: tabular-nums; }
.dial-name { font-family: var(--serif); font-weight: 900; font-size: clamp(30px, 5vw, 58px); letter-spacing: -.03em; line-height: 1; }
.dial-line { font-size: 15px; color: var(--mist); max-width: 22ch; line-height: 1.45; }

/* ——— IV. Bestiary ——— */
.bestiary { position: relative; padding: 18svh 0 10svh; overflow: clip; }
.bestiary-copy { width: min(1200px, 100% - var(--gutter) * 2); margin: 0 auto; display: grid; gap: 26px; }
.bestiary-copy > p:not(.eyebrow) { max-width: 54ch; color: var(--mist); font-size: 17px; line-height: 1.6; }
.tags { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--glass-line); color: var(--gold-light); background: rgba(215,173,87,.06); }
.procession { position: relative; height: clamp(300px, 46svh, 460px); margin-top: 6svh; }
.procession-track { position: absolute; left: 0; bottom: 64px; display: flex; align-items: flex-end; gap: clamp(20px, 3vw, 48px); padding-left: 60vw; will-change: transform; }
.monster { position: relative; flex: none; display: grid; justify-items: center; gap: 12px; }
.monster img { display: block; height: var(--h); width: auto; filter: drop-shadow(0 14px 18px rgba(0,0,0,.5)); transform-origin: 50% 100%; animation: breathe var(--t, 3.2s) ease-in-out infinite; animation-delay: var(--delay, 0s); }
.monster figcaption { position: absolute; top: calc(100% + 18px); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--mist-dim); white-space: nowrap; }
.monster.is-boss figcaption { color: var(--gold-light); }
.monster.is-boss figcaption::before { content: "Boss · "; color: var(--gold); }
@keyframes breathe { 50% { transform: scaleY(1.025) scaleX(.99); } }
.procession-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 80px; background: radial-gradient(70% 100% at 50% 0%, rgba(245, 217, 148, .10), transparent 70%); }

/* ——— V. Companions ——— */
.companions { position: relative; padding: 16svh 0 12svh; }
.companions-copy { width: min(1200px, 100% - var(--gutter) * 2); margin: 0 auto; display: grid; justify-items: center; text-align: center; }
.companions-copy .big-number { justify-items: center; }
.companions-copy .big-number span { margin-left: 0; }
.companions-copy h2 { max-width: 16ch; }
.companions-copy p:not(.eyebrow) { max-width: 54ch; color: var(--mist); font-size: 17px; line-height: 1.6; }
.pets { list-style: none; margin: 6svh auto 0; padding: 0; position: relative; width: min(1180px, 100% - var(--gutter) * 2); height: clamp(320px, 44svh, 440px); }
.pets li {
  position: absolute; left: var(--x); top: var(--y);
  width: calc(clamp(110px, 14vw, 190px) * var(--s)); translate: -50% 0;
  display: grid; justify-items: center; gap: 10px;
  animation: bob 5s ease-in-out infinite; animation-delay: var(--d);
  transform: translate3d(var(--px, 0), var(--py, 0), 0);
}
.pets img { width: 100%; height: auto; filter: drop-shadow(0 18px 18px rgba(0,0,0,.45)); transition: transform .4s cubic-bezier(.2,.9,.25,1.3); }
.pets li:hover img { transform: translateY(-6px) rotate(-3deg) scale(1.05); }
.pets span { display: grid; justify-items: center; font-size: 12px; color: var(--mist); white-space: nowrap; }
.pets strong { font-family: var(--serif); font-size: 18px; color: var(--moon); }
@keyframes bob { 50% { translate: -50% -12px; } }
.pedestals { margin-top: 8svh; display: grid; gap: 22px; }
.pedestals-label { text-align: center; color: var(--mist-dim); font-size: 12px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; padding: 0 var(--gutter); }
.pedestal-rail { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.pedestal-strip { display: flex; gap: 40px; width: max-content; animation: rail 48s linear infinite; }
.pedestal-strip img { width: 220px; height: auto; filter: drop-shadow(0 12px 16px rgba(0,0,0,.45)); }
@keyframes rail { to { transform: translateX(-50%); } }

/* ——— VI. Gate ——— */
.gate { position: relative; isolation: isolate; min-height: max(100svh, 700px); display: grid; grid-template-rows: 1fr auto; overflow: clip; }
.gate-copy { align-self: start; justify-self: center; width: min(760px, 100% - var(--gutter) * 2); display: grid; justify-items: center; gap: 22px; text-align: center; padding-top: 18svh; color: var(--day-ink); position: relative; z-index: 2; }
.gate h2.gate-mark { line-height: 0; }
.gate-mark img { display: block; width: min(64vw, 760px); height: auto; }
.gate-line { font-size: 14px; color: #33405e; }
.cta-large { padding: 19px 28px 19px 24px; font-size: 18px; box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 -2px 0 rgba(120, 78, 18, .35) inset, 0 18px 40px -10px rgba(120, 78, 18, .55); }
.gate-land { position: absolute; inset: 0; z-index: -1; }
.gate-land::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(169, 210, 238, .9) 0%, rgba(190, 218, 236, .72) 30%, rgba(214, 226, 226, .35) 50%, transparent 64%); }
.gate-scene { --horizon: 66%; filter: none; mask-image: linear-gradient(transparent, #000 22%); -webkit-mask-image: linear-gradient(transparent, #000 22%); }
.gate-hero { position: absolute; z-index: 1; left: 50%; bottom: 12%; height: 30%; aspect-ratio: 1; translate: -50% 0; overflow: visible; filter: drop-shadow(0 8px 10px rgba(22, 33, 58, .3)); }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px var(--gutter) calc(18px + env(safe-area-inset-bottom, 0px)); font-size: 12px; color: #f3f0e2; background: rgba(40, 52, 30, .35); position: relative; z-index: 2; }

/* ——— Responsive ——— */
@media (max-width: 900px) {
  .away-grid, .skills-layout { grid-template-columns: 1fr; gap: 28px; }
  .away .pin, .skills .pin { align-items: start; padding-top: calc(env(safe-area-inset-top, 0px) + 76px); }
  .clock { font-size: clamp(72px, 22vw, 140px); }
  .away-copy { gap: 14px; }
  .ledger { padding: 16px; border-radius: 22px; }
  .ledger-head h3 { font-size: 21px; }
  .ledger-row { padding: 8px 10px; grid-template-columns: 38px 1fr auto; }
  .ledger-glyph, .ledger-pet img { width: 38px; height: 38px; }
  .ledger-label { font-size: 14px; }
  .ledger-value { font-size: 16px; }
  .levelup { right: 8px; }
  .skills-copy { text-align: center; justify-items: center; gap: 12px; }
  .skills-copy .big-number { font-size: clamp(72px, 20vw, 120px) !important; justify-items: center; }
  .dial { --size: min(88vw, 56svh); }
}
@media (max-width: 720px) {
  .arrive { --stage-h: min(44svh, 400px); --ground: 214px; height: max(100svh, 700px); }
  .wordmark { top: calc(env(safe-area-inset-top, 0px) + 80px); }
  .wordmark-svg { width: 88vw; }
  .gate-mark img { width: 80vw; }
  .scene { --horizon: 60%; }
  .nameplate { right: auto; left: 0; top: 16%; text-align: left; padding: 7px 10px; border-radius: 12px; }
  .nameplate-name { font-size: 17px; }
  .nameplate-meta { font-size: 11px; }
  .summon-hint { top: calc(100% + 8px); }
  .arrive-copy { left: 0; right: 0; bottom: 34px; margin: 0 auto; max-width: none; padding: 0 var(--gutter); justify-items: center; text-align: center; gap: 14px; }
  .ledger-pet .ledger-label { font-size: 13px; }
  .ledger-rare { font-size: 9px; letter-spacing: .1em; }
  .thesis { font-size: 21px; max-width: 22ch; }
  .visit { display: none; }
  .bar-cta span { display: none; }
  .bar-cta { width: 40px; padding: 0; }
  .bestiary { padding-top: 12svh; }
  .procession { height: 300px; }
  .monster figcaption { font-size: 10px; }
  .pets { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 12px; padding-top: 8px; }
  .pets li { position: relative; left: auto; top: auto; translate: none; width: auto; margin: 0 auto; max-width: 150px; animation-name: bob-small; }
  .pets li:last-child { grid-column: 1 / -1; max-width: 140px; }
  @keyframes bob-small { 50% { translate: 0 -8px; } }
  .pedestal-strip img { width: 160px; }
  .gate-copy p { font-size: 16px; }
  .foot { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .pedestal-strip { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .bar-cta, .bar-play, .nameplate, .ledger, .summon-hint { background: #121a36; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
/* The game entry stays beside the existing community link. */
.bar-actions{display:flex;align-items:center;gap:10px}
@media(max-width:600px){.bar-actions{gap:6px}.bar-play{padding:0 14px}.bar-cta svg{width:18px;height:18px}}

.foot { flex-wrap: wrap; gap: 16px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 16px; }
.foot a { color: inherit; text-underline-offset: 4px; }
