@font-face {
  font-family: "Sora";
  src: url("dist/assets/fonts/sora-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --emerald-950: #041f17;
  --emerald-900: #073226;
  --emerald-800: #0b4a37;
  --emerald-700: #0f704d;
  --leaf: #20b463;
  --sun: #ffe37b;
  --gold: #efbd4f;
  --amber: #d88b2c;
  --ivory: #fffbee;
  --ink: #082f24;
  --line: rgba(255, 228, 139, 0.44);
  --header-h: 88px;
  font-family: "Sora", sans-serif;
  color: var(--ivory);
  background: var(--emerald-950);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--emerald-950); }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: var(--emerald-950); }
button, a { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 10px 14px;
  color: var(--ink);
  background: var(--sun);
  border-radius: 6px;
}
.skip-link:focus { transform: none; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 190px 1fr 48px;
  align-items: center;
  gap: 34px;
  padding: 0 clamp(28px, 4.3vw, 76px);
  background: linear-gradient(180deg, rgba(3, 26, 19, 0.93), rgba(4, 40, 29, 0.68) 72%, transparent);
  border-bottom: 1px solid rgba(255, 244, 201, 0.17);
  transition: background .35s ease, height .35s ease;
}
.site-header.is-solid { background: rgba(4, 35, 26, 0.94); backdrop-filter: blur(16px); }
.header-brand { width: 154px; filter: drop-shadow(0 7px 12px rgba(0,0,0,.32)); }
.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(20px, 2vw, 34px);
  white-space: nowrap;
}
.main-nav a {
  position: relative;
  padding: 30px 0 22px;
  color: rgba(255,255,246,.88);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: clamp(14px, .82vw, 18px);
  font-weight: 760;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
  transition: color .25s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  inset: auto 50% 14px;
  width: 0;
  height: 2px;
  background: var(--sun);
  box-shadow: 0 0 12px var(--gold);
  transition: width .25s ease, left .25s ease;
}
.main-nav a:hover, .main-nav a.is-active { color: var(--sun); }
.main-nav a:hover::after, .main-nav a.is-active::after { width: 100%; left: 0; }
.menu-button { display: none; }

.scene {
  position: relative;
  min-height: 700px;
  height: 100svh;
  isolation: isolate;
  overflow: hidden;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  color: var(--sun);
  font-size: 13px;
  font-weight: 760;
  line-height: 1;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.eyebrow span { width: 38px; height: 1px; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.scene-index {
  position: absolute;
  z-index: 8;
  right: clamp(28px, 4vw, 70px);
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,238,.76);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
}
.scene-index span { color: var(--sun); font-size: 16px; }
.scene-index i { width: 70px; height: 1px; background: rgba(255, 227, 123, .5); }

/* HERO */
.hero { background: var(--emerald-900); }
.hero .scene-index { display: none; }
.hero-media, .hero-vignette, .hero-rays { position: absolute; inset: 0; }
.hero-media video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.035); }
.hero-vignette {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(2,28,19,.92) 0%, rgba(3,35,23,.73) 29%, rgba(3,35,23,.2) 55%, rgba(1,25,18,.23) 100%),
    linear-gradient(0deg, rgba(2,26,18,.86) 0%, transparent 34%),
    radial-gradient(circle at 75% 34%, transparent 0 24%, rgba(2,27,19,.12) 53%, rgba(2,27,19,.48) 100%);
}
.hero-rays {
  z-index: 2;
  left: 48%;
  background: radial-gradient(ellipse at 50% 42%, rgba(255,245,172,.36), rgba(255,220,95,.1) 28%, transparent 63%);
  mix-blend-mode: screen;
  animation: breathe 5s ease-in-out infinite;
}
.hero-copy {
  position: absolute;
  z-index: 8;
  left: clamp(46px, 7.2vw, 124px);
  top: 51%;
  width: min(580px, 44vw);
  transform: translateY(-46%);
  filter: drop-shadow(0 10px 25px rgba(0,0,0,.36));
}
.hero-logo { width: clamp(280px, 25vw, 420px); margin: 0 0 24px -12px; }
.hero h1 {
  margin: 0;
  font-size: clamp(34px, 3.15vw, 56px);
  font-weight: 430;
  line-height: 1.14;
  letter-spacing: -.045em;
}
.hero h1 span, .hero h1 strong { display: block; }
.hero h1 strong { color: var(--sun); font-weight: 720; text-shadow: 0 0 28px rgba(255,208,70,.16); }
.forest-button {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(290px, 24vw, 382px);
  aspect-ratio: 3.62 / 1;
  margin-top: 34px;
  color: white;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .095em;
  font-weight: 800;
  font-size: clamp(13px, 1vw, 17px);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), filter .25s ease;
}
.forest-button img { position: absolute; inset: 0; width: 100%; height: 100%; }
.forest-button span, .forest-button b { position: relative; z-index: 1; }
.forest-button b { position: absolute; right: 12%; top: 50%; transform: translateY(-53%); font-size: 28px; }
.forest-button:hover { transform: translateY(-3px) scale(1.018); filter: brightness(1.12) drop-shadow(0 0 24px rgba(54,255,130,.45)); }
.forest-button:active { transform: translateY(1px) scale(.992); }
.hero-aelen {
  position: absolute;
  z-index: 6;
  right: clamp(-92px, -3vw, -24px);
  bottom: -7.5%;
  width: min(54vw, 820px);
  height: 90%;
  pointer-events: none;
  transform: translate3d(var(--hero-x, 0), var(--hero-y, 0), 0);
  transition: transform .3s ease-out;
}
.hero-aelen > img {
  position: absolute;
  z-index: 2;
  right: 2%;
  bottom: 0;
  width: auto;
  height: 100%;
  object-fit: contain;
  object-position: bottom right;
  filter: drop-shadow(-22px 22px 30px rgba(1,28,18,.5));
  animation: character-breathe 5.5s ease-in-out infinite;
}
.hero-aelen__halo {
  position: absolute;
  z-index: 1;
  width: 78%;
  aspect-ratio: 1;
  right: 4%;
  top: 9%;
  border-radius: 50%;
  border: 1px solid rgba(255,231,145,.24);
  box-shadow: inset 0 0 80px rgba(255,227,123,.1), 0 0 100px rgba(255,227,123,.08);
}
.hero-aelen__halo::before, .hero-aelen__halo::after { content: ""; position: absolute; inset: 7%; border: 1px solid rgba(255,231,145,.14); border-radius: 50%; }
.hero-aelen__halo::after { inset: 18%; }
.leaf-field { position: absolute; inset: 0; z-index: 7; overflow: hidden; pointer-events: none; }
.leaf {
  position: absolute;
  top: -8%;
  width: 14px;
  height: 7px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, #b9e65f, #2f8d37);
  opacity: .66;
  filter: blur(.2px);
  animation: leaf-fall var(--fall, 9s) linear infinite;
  animation-delay: var(--delay, 0s);
}

/* STORY */
.story { background: var(--emerald-900); }
.story-world {
  position: absolute;
  inset: 0;
  background: url("dist/assets/scenes/forest-gate.webp?v=962acb9c52") center / cover no-repeat;
  transform: scale(1.035);
  animation: cinematic-drift 18s ease-in-out infinite alternate;
}
.story-world::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3,28,20,.62), transparent 36% 64%, rgba(3,28,20,.62)), linear-gradient(0deg, rgba(2,25,18,.93), transparent 43%, rgba(3,24,17,.24));
}
.story-heading {
  position: absolute;
  z-index: 5;
  top: calc(var(--header-h) + 40px);
  left: 50%;
  width: min(840px, 72vw);
  transform: translateX(-50%);
  text-align: center;
  text-shadow: 0 3px 24px rgba(0,0,0,.56);
}
.story-heading .eyebrow { justify-content: center; }
.story-heading h2 { margin: 0; font-size: clamp(30px, 3.15vw, 52px); line-height: 1.08; letter-spacing: -.04em; font-weight: 520; }
.story-character {
  position: absolute;
  z-index: 4;
  bottom: -7%;
  height: 83%;
  margin: 0;
  filter: saturate(.58) brightness(.57) drop-shadow(0 24px 36px rgba(0,0,0,.5));
  opacity: .5;
  transform: translateY(2%) scale(.96);
  transition: filter 1.1s ease, opacity 1.1s ease, transform 1.1s cubic-bezier(.2,.8,.2,1);
}
.story-character img { width: auto; height: 100%; object-fit: contain; }
.story-character--orwyn { left: clamp(-100px, -3vw, -22px); }
.story-character--nym { right: clamp(-100px, -4vw, -28px); }
.story-character.is-speaking { filter: saturate(1.05) brightness(1.06) drop-shadow(0 22px 40px rgba(0,0,0,.43)); opacity: 1; transform: translateY(0) scale(1.02); }
.story-light { position: absolute; z-index: 3; top: 13%; width: 50%; height: 72%; opacity: 0; transition: opacity 1.1s ease; pointer-events: none; mix-blend-mode: screen; }
.story-light--left { left: -6%; background: radial-gradient(ellipse, rgba(255,226,124,.38), transparent 64%); }
.story-light--right { right: -6%; background: radial-gradient(ellipse, rgba(206,255,153,.32), transparent 64%); }
.story[data-speaker="Orwyn"] .story-light--left, .story[data-speaker="Nym"] .story-light--right { opacity: 1; }
.story-caption {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 7.5%;
  width: min(900px, 68vw);
  transform: translateX(-50%);
  padding: 12px 54px 18px;
  background: linear-gradient(90deg, transparent, rgba(2, 26, 18, .7) 20%, rgba(2, 26, 18, .7) 80%, transparent);
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.42));
}
.story-caption__meta { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.story-caption__meta > span { color: var(--sun); text-transform: uppercase; font-weight: 800; letter-spacing: .17em; font-size: 12px; }
.story-caption__meta small { color: rgba(255,255,238,.66); font-size: 11px; letter-spacing: .11em; }
.story-progress { height: 1px; background: rgba(255,255,238,.2); overflow: hidden; }
.story-progress i { display: block; width: 16.666%; height: 100%; background: var(--sun); box-shadow: 0 0 10px var(--sun); transition: width .65s ease; }
.story-caption blockquote { margin: 12px 0 0; font-size: clamp(20px, 1.7vw, 29px); font-weight: 560; line-height: 1.36; letter-spacing: -.02em; text-align: center; text-wrap: balance; text-shadow: 0 2px 4px rgba(0,0,0,.9), 0 0 18px rgba(0,0,0,.72); }
.cinema-status {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 5.4%;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
  align-items: center;
  color: rgba(255,255,238,.55);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.cinema-status i { width: 5px; height: 5px; background: var(--sun); border-radius: 50%; box-shadow: 0 0 10px var(--sun); animation: blink 1.5s ease-in-out infinite; }

/* BATTLE */
.battle { background: var(--emerald-950); }
.battle-world, .battle-vignette { position: absolute; inset: 0; }
.battle-world { background: url("dist/assets/scenes/arena-forest.webp?v=962acb9c52") center / cover no-repeat; transform: scale(1.025); }
.battle-vignette {
  background:
    linear-gradient(180deg, rgba(3,31,22,.9) 0%, rgba(4,40,28,.22) 24%, rgba(3,30,21,.12) 60%, rgba(2,22,15,.94) 100%),
    radial-gradient(ellipse at 65% 55%, transparent 30%, rgba(2,24,16,.68) 100%);
}
.battle-heading {
  position: absolute;
  z-index: 4;
  top: calc(var(--header-h) + 18px);
  left: clamp(42px, 5.2vw, 90px);
  display: grid;
  grid-template-columns: minmax(420px, .85fr) minmax(340px, 520px);
  column-gap: clamp(36px, 8vw, 140px);
  align-items: end;
  width: calc(100% - clamp(84px, 10.4vw, 180px));
  text-shadow: 0 2px 18px rgba(0,0,0,.55);
}
.battle-heading .eyebrow { grid-column: 1 / -1; margin-bottom: 10px; }
.battle-heading h2 { margin: 0; font-size: clamp(30px, 2.8vw, 48px); line-height: 1.04; letter-spacing: -.045em; font-weight: 500; }
.battle-heading h2 strong { color: var(--sun); }
.battle-heading > p { margin: 0 0 3px; max-width: 500px; color: rgba(255,255,238,.82); font-size: clamp(13px, 1vw, 16px); line-height: 1.65; }
.battle-interface {
  position: absolute;
  z-index: 5;
  top: clamp(190px, 25vh, 220px);
  bottom: 18px;
  left: 50%;
  width: min(1500px, calc(100% - 80px));
  max-height: 720px;
  transform: translateX(-50%);
  border: 1px solid rgba(255,221,118,.42);
  border-radius: 24px;
  background: rgba(5,39,28,.58);
  box-shadow: 0 30px 80px rgba(0,0,0,.35), inset 0 1px rgba(255,255,255,.12);
  overflow: hidden;
  backdrop-filter: blur(7px);
}
.phase-track {
  position: absolute;
  z-index: 10;
  inset: 0 0 auto;
  height: 62px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
  padding: 0 20px;
  background: linear-gradient(180deg, rgba(4,48,33,.98), rgba(4,38,28,.93));
  border-bottom: 1px solid rgba(255,228,139,.26);
}
.phase-track button {
  position: relative;
  border: 0;
  border-right: 1px solid rgba(255,241,194,.12);
  border-radius: 0;
  color: rgba(255,255,238,.52);
  background: transparent;
  cursor: pointer;
  transition: color .3s ease, background .3s ease;
}
.phase-track button:last-child { border-right: 0; }
.phase-track button::before {
  content: "0" counter(phase-step);
  counter-increment: phase-step;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  margin-bottom: 3px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}
.phase-track { counter-reset: phase-step; }
.phase-track button {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 790;
  letter-spacing: .12em;
}
.phase-track button.is-active { color: var(--ink); background: linear-gradient(180deg, #ffe78d, #efbb4a); box-shadow: inset 0 -4px rgba(124,73,6,.18), 0 0 28px rgba(255,211,89,.24); }
.phase-track button.is-active::before { color: var(--ink); }
.battle-layout {
  position: absolute;
  inset: 62px 0 30px;
  display: grid;
  grid-template-columns: 330px 1fr;
}
.battle-guide {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 3.2vw, 48px);
  background: linear-gradient(120deg, rgba(3,38,27,.98), rgba(5,59,39,.88));
  border-right: 1px solid rgba(255,230,145,.25);
  box-shadow: 16px 0 46px rgba(0,0,0,.22);
}
.battle-guide__step { display: flex; align-items: center; gap: 12px; color: var(--sun); text-transform: uppercase; }
.battle-guide__step span { font-size: 42px; font-weight: 420; line-height: 1; }
.battle-guide__step small { font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.battle-guide h3 { margin: 14px 0 10px; font-size: clamp(22px, 2vw, 34px); line-height: 1.08; letter-spacing: -.035em; }
.battle-guide > p { margin: 0; color: rgba(255,255,238,.76); font-size: 12px; line-height: 1.55; }
.battle-equation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 9px;
  align-items: center;
  margin-top: 24px;
  padding: 14px;
  border: 1px solid rgba(255,227,123,.3);
  border-radius: 12px;
  background: rgba(255,247,214,.08);
}
.battle-equation span, .battle-equation strong { font-size: 10px; line-height: 1.35; }
.battle-equation span { color: rgba(255,255,238,.62); }
.battle-equation i { color: var(--sun); font-style: normal; font-size: 18px; }
.battle-equation strong { color: var(--sun); font-weight: 760; }
.battle-rule { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; }
.battle-rule i { flex: 0 0 auto; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 14px var(--gold); }
.battle-rule p { margin: 0; color: rgba(255,255,238,.66); font-size: 10px; line-height: 1.45; }
.battle-board {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: 62px minmax(90px, 1fr) minmax(112px, 1.16fr) 132px;
  background: linear-gradient(90deg, rgba(255,251,226,.04), rgba(230,248,186,.13) 54%, rgba(255,250,218,.05));
  overflow: hidden;
}
.board-hud { display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 0 24px; border-bottom: 1px solid rgba(255,234,164,.19); background: rgba(3,35,25,.46); }
.board-stat { display: flex; align-items: baseline; gap: 10px; }
.board-stat:last-child { justify-self: end; }
.board-stat span { color: rgba(255,255,238,.62); font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.board-stat strong { color: var(--sun); font-size: 34px; font-weight: 460; line-height: 1; transition: transform .3s ease, color .3s ease; }
.board-stat--energy strong { color: #91ef9e; }
.board-stat small { color: rgba(255,255,238,.65); font-size: 9px; font-weight: 700; }
.board-zone { position: relative; border-bottom: 1px solid rgba(255,234,164,.18); }
.board-zone__label { position: absolute; top: 12px; left: 18px; z-index: 3; display: grid; gap: 2px; text-transform: uppercase; }
.board-zone__label span { color: rgba(255,255,238,.8); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.board-zone__label small { color: var(--sun); font-size: 8px; font-weight: 750; letter-spacing: .08em; }
.health-target {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255,226,123,.5);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,220,110,.26), rgba(8,59,40,.62) 70%);
  box-shadow: 0 0 30px rgba(255,217,92,.12), inset 0 0 20px rgba(255,229,141,.12);
}
.health-target img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  object-position: center 24%;
  border: 2px solid rgba(255,226,123,.7);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(255,221,103,.18);
}
.health-target span { position: absolute; bottom: -11px; padding: 2px 7px; color: var(--ink); background: var(--sun); border-radius: 20px; font-size: 7px; font-weight: 820; letter-spacing: .12em; text-transform: uppercase; }
.attack-arrow {
  position: absolute;
  z-index: 3;
  left: calc(50% + 70px);
  bottom: -34px;
  display: grid;
  place-items: center;
  color: var(--sun);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .35s ease, transform .5s ease;
}
.attack-arrow span { padding: 4px 9px; border: 1px solid rgba(255,225,121,.45); border-radius: 20px; background: rgba(4,46,31,.9); font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.attack-arrow i { font-size: 25px; font-style: normal; line-height: .8; text-shadow: 0 0 12px var(--gold); }
.field-card {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 78px;
  margin: 0;
  transform: translateY(-43%);
  transition: opacity .45s ease, transform .65s cubic-bezier(.2,.8,.2,1), filter .35s ease;
}
.field-card--ready { left: calc(50% - 92px); }
.field-card--played { left: calc(50% + 28px); opacity: 0; transform: translateY(38px) scale(.78); }
.field-card img { width: 78px; height: 92px; object-fit: cover; border: 1px solid rgba(255,229,139,.7); border-radius: 11px; box-shadow: 0 10px 20px rgba(0,0,0,.35); }
.field-card figcaption { margin-top: 4px; color: var(--ivory); font-size: 8px; font-weight: 780; text-align: center; white-space: nowrap; }
.field-card figcaption small { display: block; margin-top: 2px; color: rgba(255,255,238,.54); font-size: 6px; font-weight: 650; }
.field-card__stat { position: absolute; z-index: 2; top: -7px; left: -7px; display: grid; place-items: center; width: 25px; height: 25px; color: var(--ink); background: var(--sun); border: 2px solid rgba(4,40,28,.85); border-radius: 50%; font-size: 10px; font-weight: 850; }
.play-arrow { position: absolute; z-index: 3; left: calc(50% + 148px); bottom: -34px; display: grid; place-items: center; color: var(--sun); opacity: 0; transform: translateY(12px); transition: opacity .35s ease, transform .5s ease; }
.play-arrow i { font-size: 25px; font-style: normal; line-height: .8; text-shadow: 0 0 12px var(--gold); }
.play-arrow span { padding: 4px 9px; border: 1px solid rgba(255,225,121,.45); border-radius: 20px; background: rgba(4,46,31,.9); font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.hand-zone { position: relative; background: rgba(4,38,27,.46); }
.hand-zone__label { position: absolute; top: 12px; left: 18px; display: grid; gap: 2px; text-transform: uppercase; }
.hand-zone__label span { color: rgba(255,255,238,.82); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.hand-zone__label small { color: rgba(255,255,238,.52); font-size: 7px; font-weight: 700; letter-spacing: .08em; }
.tutorial-hand {
  position: absolute;
  left: 50%;
  bottom: -16px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  transform: translateX(-50%);
}
.tutorial-hand figure { position: relative; width: 76px; margin: 0; transform-origin: 50% 120%; transition: opacity .4s ease, transform .55s ease, filter .35s ease; }
.tutorial-hand figure:nth-child(1) { transform: rotate(-8deg); }
.tutorial-hand figure:nth-child(2) { transform: rotate(-3deg); }
.tutorial-hand figure:nth-child(3) { z-index: 2; transform: translateY(-10px); }
.tutorial-hand figure:nth-child(4) { transform: rotate(7deg); }
.tutorial-hand img {
  width: 76px;
  height: 104px;
  object-fit: cover;
  border-radius: 11px;
  border: 1px solid rgba(255,231,147,.66);
  box-shadow: 0 10px 20px rgba(0,0,0,.36);
}
.tutorial-hand figure.is-selected img { border: 2px solid var(--sun); filter: brightness(1.12); box-shadow: 0 12px 26px rgba(0,0,0,.42), 0 0 22px rgba(255,219,84,.35); }
.tutorial-hand b { position: absolute; z-index: 4; top: -7px; left: -7px; display: grid; place-items: center; width: 27px; height: 27px; color: var(--ink); background: var(--sun); border: 2px solid rgba(4,40,28,.88); border-radius: 50%; font-size: 11px; }
.tutorial-hand figcaption { position: absolute; z-index: 4; left: 50%; bottom: 7px; transform: translateX(-50%); padding: 3px 7px; color: var(--ink); background: var(--sun); border-radius: 12px; font-size: 7px; font-weight: 850; white-space: nowrap; text-transform: uppercase; }
.battle[data-phase="start"] .tutorial-hand figure:last-child { animation: draw-card .75s ease both; }
.battle[data-phase="start"] .board-stat--energy strong { animation: number-pulse .7s ease both; }
.battle[data-phase="play"] .play-arrow { opacity: 1; transform: translateY(0); }
.battle[data-phase="play"] .field-card--played,
.battle[data-phase="attack"] .field-card--played,
.battle[data-phase="end"] .field-card--played { opacity: 1; transform: translateY(-43%) scale(1); }
.battle[data-phase="play"] [data-hand-selection],
.battle[data-phase="attack"] [data-hand-selection],
.battle[data-phase="end"] [data-hand-selection] { opacity: .16; transform: translateY(-24px) scale(.82); }
.battle[data-phase="play"] .board-stat--energy strong { animation: energy-spent .72s ease both; }
.battle[data-phase="attack"] .attack-arrow { opacity: 1; transform: translateY(0); }
.battle[data-phase="attack"] .field-card--ready { transform: translateY(-58%) scale(1.06); filter: brightness(1.22) drop-shadow(0 -7px 18px rgba(255,222,96,.46)); }
.battle[data-phase="attack"] .health-target { animation: target-hit .72s .35s ease both; }
.impact-ring { position: absolute; z-index: 5; top: 105px; left: 50%; width: 70px; height: 70px; border: 3px solid var(--sun); border-radius: 50%; opacity: 0; transform: translateX(-50%) scale(.3); }
.battle[data-phase="attack"] .impact-ring { animation: impact .8s .48s ease-out both; }
.battle-legend {
  position: absolute;
  z-index: 9;
  inset: auto 0 0;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  background: rgba(3,31,22,.94);
  border-top: 1px solid rgba(255,229,139,.25);
}
.battle-legend > span { color: rgba(255,255,238,.52); font-size: 8px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.battle-cycle { flex: 1; height: 2px; background: rgba(255,255,238,.13); overflow: hidden; }
.battle-cycle i { display: block; width: 25%; height: 100%; background: linear-gradient(90deg, var(--gold), var(--sun)); box-shadow: 0 0 10px var(--sun); transition: width .65s ease; }

/* Battle v2: the whole turn is visible as one illustrated sequence. */
.turn-story {
  position: absolute;
  z-index: 6;
  top: clamp(210px, 26vh, 230px);
  bottom: 32px;
  left: 50%;
  width: min(1560px, calc(100% - 80px));
  max-height: 560px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr);
  align-items: stretch;
}
.turn-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-width: 0;
  padding: clamp(24px, 2vw, 34px);
  overflow: hidden;
  border: 0;
  border-top: 1px solid rgba(255,232,153,.48);
  border-bottom: 1px solid rgba(255,232,153,.48);
  color: var(--ivory);
  background:
    radial-gradient(circle at 78% 15%, rgba(255,229,127,.15), transparent 31%),
    linear-gradient(150deg, rgba(5,57,38,.92), rgba(5,35,26,.76));
  box-shadow: 0 24px 48px rgba(0,0,0,.2);
  clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), filter .4s ease, box-shadow .4s ease, background .4s ease;
}
.turn-step[data-turn-step="play"] { background: radial-gradient(circle at 77% 13%, rgba(255,197,75,.2), transparent 32%), linear-gradient(150deg, rgba(105,65,19,.9), rgba(37,51,28,.82)); }
.turn-step[data-turn-step="attack"] { background: radial-gradient(circle at 77% 13%, rgba(255,234,142,.2), transparent 32%), linear-gradient(150deg, rgba(77,78,25,.9), rgba(24,54,31,.82)); }
.turn-step[data-turn-step="end"] { background: radial-gradient(circle at 77% 13%, rgba(255,247,199,.2), transparent 32%), linear-gradient(150deg, rgba(96,72,28,.88), rgba(17,49,32,.84)); }
.turn-step::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 46%, rgba(255,255,226,.06) 47%, transparent 49%);
  transform: translateX(-100%);
  transition: transform .7s ease;
}
.turn-step:hover, .turn-step:focus-visible, .turn-step.is-active {
  outline: none;
  transform: translateY(-9px);
  filter: brightness(1.09);
  box-shadow: 0 30px 70px rgba(0,0,0,.32), 0 0 0 1px rgba(255,225,118,.38), 0 0 30px rgba(255,205,80,.16);
}
.turn-step.is-active::after { transform: translateX(100%); }
.turn-step__number { display: block; color: var(--sun); font-size: clamp(34px, 3vw, 54px); font-weight: 380; line-height: .9; letter-spacing: -.05em; }
.turn-step > small { display: block; margin-top: 10px; color: var(--sun); font-size: 10px; font-weight: 840; letter-spacing: .17em; text-transform: uppercase; }
.turn-step h3 { margin: 8px 0 0; min-height: 2.2em; font-size: clamp(19px, 1.55vw, 27px); line-height: 1.08; letter-spacing: -.035em; }
.turn-step > p { margin: 15px 0 0; color: rgba(255,255,238,.82); font-size: clamp(12px, .92vw, 15px); line-height: 1.48; }
.turn-result { position: absolute; right: 24px; bottom: 22px; left: 24px; padding-top: 12px; border-top: 1px solid rgba(255,234,163,.25); color: var(--sun); font-size: clamp(11px, .84vw, 14px); font-weight: 810; letter-spacing: .07em; text-transform: uppercase; }
.turn-connector { align-self: center; color: var(--sun); font-size: 28px; font-style: normal; text-align: center; text-shadow: 0 0 18px var(--gold); animation: connector-pulse 1.7s ease-in-out infinite; }
.turn-visual { position: relative; height: clamp(135px, 19vh, 190px); margin-top: 18px; border-top: 1px solid rgba(255,240,186,.17); border-bottom: 1px solid rgba(255,240,186,.17); background: rgba(255,250,220,.055); overflow: hidden; }
.turn-visual--start { display: grid; grid-template-columns: 1fr .72fr; align-items: center; justify-items: center; }
.energy-change { display: flex; align-items: center; gap: 7px; }
.energy-change span, .energy-change strong { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid rgba(255,234,159,.45); border-radius: 50%; font-size: 25px; font-weight: 480; }
.energy-change span { color: rgba(255,255,238,.52); background: rgba(3,31,22,.55); }
.energy-change strong { color: var(--ink); background: radial-gradient(circle at 35% 30%, #fff0a4, #eeb747 74%); box-shadow: 0 0 23px rgba(255,211,79,.3); }
.energy-change i { color: var(--sun); font-style: normal; }
.turn-visual--start > img { width: 70px; height: 96px; object-fit: cover; border: 1px solid var(--gold); border-radius: 9px; box-shadow: 0 10px 24px rgba(0,0,0,.36); transform: rotate(7deg); }
.turn-visual--play { display: grid; grid-template-columns: 1fr .85fr; align-items: center; justify-items: center; }
.turn-visual--play figure, .turn-visual--attack figure { position: relative; margin: 0; }
.turn-visual--play figure img, .turn-visual--attack figure img { width: 88px; height: 118px; object-fit: cover; border: 2px solid var(--sun); border-radius: 11px; box-shadow: 0 12px 28px rgba(0,0,0,.4); }
.turn-visual figure > b { position: absolute; z-index: 2; top: -8px; left: -8px; display: grid; place-items: center; width: 31px; height: 31px; color: var(--ink); background: var(--sun); border: 2px solid rgba(4,40,28,.86); border-radius: 50%; font-size: 12px; }
.zone-mark { display: grid; place-items: center; gap: 4px; color: var(--sun); }
.zone-mark i { font-size: 44px; font-style: normal; line-height: .8; text-shadow: 0 0 14px var(--gold); }
.zone-mark span { font-size: 8px; font-weight: 820; letter-spacing: .1em; text-transform: uppercase; }
.turn-visual--attack { display: grid; grid-template-columns: .72fr auto 1.15fr; align-items: center; justify-items: center; gap: 3px; }
.damage-arrow { color: var(--sun); font-size: 31px; font-style: normal; text-shadow: 0 0 15px var(--gold); }
.health-change { display: grid; grid-template-columns: 58px auto auto auto; align-items: center; gap: 5px; }
.health-change img { grid-row: 1 / 3; width: 56px; height: 56px; object-fit: cover; border: 2px solid var(--sun); border-radius: 50%; box-shadow: 0 0 20px rgba(255,210,82,.2); }
.health-change span, .health-change strong { font-size: 22px; font-weight: 480; }
.health-change span { color: rgba(255,255,238,.57); }
.health-change strong { color: var(--sun); }
.health-change i { color: var(--sun); font-style: normal; }
.turn-visual--end { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; justify-items: center; }
.end-creatures { display: flex; align-items: end; }
.end-creatures img { width: 72px; height: 94px; object-fit: cover; border: 1px solid rgba(255,231,147,.72); border-radius: 9px; box-shadow: 0 10px 20px rgba(0,0,0,.3); }
.end-creatures img + img { margin-left: -21px; transform: translateY(7px) rotate(7deg); }
.turn-loop { color: var(--sun); font-size: 62px; font-weight: 300; line-height: 1; text-shadow: 0 0 22px rgba(255,210,82,.25); }
.turn-story__progress { position: absolute; right: 0; bottom: -17px; left: 0; height: 3px; background: rgba(255,249,215,.12); overflow: hidden; }
.turn-story__progress i { display: block; width: 25%; height: 100%; background: linear-gradient(90deg, var(--gold), var(--sun)); box-shadow: 0 0 12px var(--sun); transition: width .55s ease; }
.turn-story[data-step="start"] .turn-visual--start > img { animation: draw-card .8s ease both; }
.turn-story[data-step="play"] .turn-visual--play figure { animation: play-card-up .8s ease both; }
.turn-story[data-step="play"] .zone-mark { animation: number-pulse .8s ease both; }
.turn-story[data-step="attack"] .turn-visual--attack figure { animation: attack-card .68s ease both; }
.turn-story[data-step="attack"] .health-change { animation: target-flash .75s .25s ease both; }
.turn-story[data-step="end"] .turn-loop { animation: loop-turn 1.1s ease both; }

/* Battle v3 — one living battlefield, not an instructional card grid. */
.battle .battle-heading {
  z-index: 12;
  top: calc(var(--header-h) + clamp(118px, 13vh, 154px));
  left: clamp(38px, 4.5vw, 78px);
  display: block;
  width: min(470px, 34vw);
  text-shadow: 0 4px 24px rgba(0,0,0,.64);
}
.battle .battle-heading .eyebrow { margin-bottom: 13px; }
.battle .battle-heading h2 { font-size: clamp(35px, 3.3vw, 60px); line-height: 1.01; text-wrap: balance; }
.living-battle {
  position: absolute;
  z-index: 6;
  top: calc(var(--header-h) + 12px);
  right: clamp(28px, 3vw, 56px);
  bottom: 18px;
  left: clamp(28px, 3vw, 56px);
  min-height: 0;
}
.living-battle::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 78px 0 0;
  border: 1px solid rgba(255,228,139,.2);
  border-radius: 36px 36px 12px 12px;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(255,232,144,.15), transparent 34%),
    linear-gradient(180deg, rgba(255,255,230,.025), rgba(3,30,21,.18) 56%, rgba(2,25,18,.76));
  box-shadow: 0 32px 84px rgba(0,0,0,.27), inset 0 1px rgba(255,255,255,.12);
  pointer-events: none;
}
.living-hud {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  height: 94px;
  display: grid;
  grid-template-columns: 220px minmax(520px, 720px) 220px;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
}
.hud-opponent, .hud-energy {
  position: relative;
  height: 72px;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 10px;
  padding: 0 22px;
  border: 1px solid rgba(255,225,126,.5);
  color: var(--ivory);
  background: linear-gradient(135deg, rgba(4,54,37,.96), rgba(5,35,27,.84));
  box-shadow: 0 13px 34px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.12);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.hud-energy { grid-template-columns: 1fr auto; text-align: right; background: linear-gradient(225deg, rgba(8,94,52,.98), rgba(5,46,34,.87)); }
.hud-opponent span, .hud-energy span { align-self: end; color: var(--sun); font-size: 10px; font-weight: 820; letter-spacing: .15em; text-transform: uppercase; }
.hud-opponent strong, .hud-energy strong { grid-row: 1 / 3; font-size: 48px; font-weight: 420; line-height: 1; color: var(--sun); transition: color .35s ease, transform .35s ease; }
.hud-opponent strong { grid-column: 2; }
.hud-energy strong { grid-column: 2; }
.hud-opponent small, .hud-energy small { color: rgba(255,255,238,.68); font-size: 9px; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
.phase-orbit {
  height: 58px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  padding: 0 12px;
  border-top: 1px solid rgba(255,228,139,.3);
  border-bottom: 1px solid rgba(255,228,139,.3);
  background: linear-gradient(90deg, transparent, rgba(3,48,33,.88) 10%, rgba(3,48,33,.88) 90%, transparent);
}
.phase-orbit button {
  position: relative;
  height: 58px;
  border: 0;
  color: rgba(255,255,238,.48);
  background: transparent;
  cursor: pointer;
  text-transform: uppercase;
  transition: color .3s ease, transform .3s ease, text-shadow .3s ease;
}
.phase-orbit button::after {
  content: "";
  position: absolute;
  right: 15%;
  bottom: -1px;
  left: 15%;
  height: 2px;
  background: var(--sun);
  box-shadow: 0 0 14px var(--sun);
  opacity: 0;
  transform: scaleX(.2);
  transition: opacity .3s ease, transform .35s ease;
}
.phase-orbit button small { display: block; color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.phase-orbit button span { display: block; margin-top: 4px; font-size: 11px; font-weight: 850; letter-spacing: .13em; }
.phase-orbit button:hover, .phase-orbit button:focus-visible, .phase-orbit button.is-active { outline: none; color: var(--ivory); transform: translateY(-2px); text-shadow: 0 0 16px rgba(255,225,116,.45); }
.phase-orbit button.is-active::after { opacity: 1; transform: scaleX(1); }
.living-stage { position: absolute; z-index: 5; inset: 84px 0 0; overflow: hidden; border-radius: 32px 32px 10px 10px; }
.foe-aura {
  position: absolute;
  z-index: 1;
  top: -7%;
  left: 50%;
  width: min(43vw, 650px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border: 1px solid rgba(255,224,117,.25);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,228,128,.28), rgba(126,175,85,.09) 38%, transparent 68%);
  box-shadow: inset 0 0 80px rgba(255,230,145,.08);
  animation: foe-aura 4.5s ease-in-out infinite;
}
.foe-presence {
  position: absolute;
  z-index: 6;
  top: 1.5%;
  left: 50%;
  width: clamp(170px, 15vw, 250px);
  margin: 0;
  transform: translateX(-50%);
  text-align: center;
  transition: transform .5s ease, filter .4s ease;
}
.foe-presence::before {
  content: "";
  position: absolute;
  inset: -9px -9px 54px;
  border: 1px solid rgba(255,228,139,.56);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(5,60,39,.35), 0 0 54px rgba(255,221,91,.18);
}
.foe-presence img { position: relative; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center 26%; border-radius: 50%; filter: saturate(1.08) contrast(1.04); }
.foe-presence figcaption { position: relative; margin-top: 12px; text-shadow: 0 3px 16px rgba(0,0,0,.92); }
.foe-presence figcaption small { display: block; color: var(--sun); font-size: 8px; font-weight: 820; letter-spacing: .14em; text-transform: uppercase; }
.foe-presence figcaption strong { display: block; margin-top: 4px; font-size: clamp(15px, 1.15vw, 20px); font-weight: 720; }
.summoned-unit { position: absolute; z-index: 8; bottom: 24%; width: clamp(130px, 12vw, 196px); margin: 0; text-align: center; transition: opacity .45s ease, transform .65s cubic-bezier(.2,.85,.2,1), filter .4s ease; }
.summoned-unit--ironcap { left: 37%; transform: translateX(-50%); }
.summoned-unit--canopy { left: 61%; opacity: 0; transform: translate(-50%, 110px) scale(.72); }
.summoned-unit > div {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  padding: 8px;
  border: 1px solid rgba(255,225,126,.72);
  background: radial-gradient(circle at 50% 40%, rgba(255,238,161,.26), rgba(5,52,36,.82) 68%);
  box-shadow: 0 20px 36px rgba(0,0,0,.38), 0 0 34px rgba(255,218,75,.12);
  clip-path: polygon(50% 0, 88% 12%, 100% 50%, 86% 88%, 50% 100%, 13% 86%, 0 50%, 12% 13%);
}
.summoned-unit > div::after { content: ""; position: absolute; inset: 10%; border: 1px solid rgba(255,241,190,.3); border-radius: 50%; pointer-events: none; }
.summoned-unit img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.summoned-unit figcaption { margin-top: 8px; text-shadow: 0 3px 15px rgba(0,0,0,.88); }
.summoned-unit figcaption strong { display: block; color: var(--ivory); font-size: clamp(11px, .88vw, 15px); }
.summoned-unit figcaption span { display: block; margin-top: 3px; color: var(--sun); font-size: 8px; font-weight: 770; letter-spacing: .08em; text-transform: uppercase; }
.combat-path {
  position: absolute;
  z-index: 7;
  top: 44%;
  left: 39%;
  width: 17%;
  height: 5px;
  transform: rotate(-30deg);
  transform-origin: 0 50%;
  opacity: 0;
  background: linear-gradient(90deg, #fff7ae, #ffd44f 38%, rgba(255,229,103,.06));
  box-shadow: 0 0 12px #ffe77d, 0 0 30px rgba(188,255,96,.62);
  transition: opacity .25s ease;
}
.combat-path::before, .combat-path::after { content: ""; position: absolute; inset: -11px 0; background: repeating-linear-gradient(165deg, transparent 0 24px, rgba(218,255,139,.74) 25px 28px, transparent 29px 44px); }
.combat-path b { position: absolute; top: -38px; right: 13%; color: var(--sun); font-size: 32px; font-weight: 650; text-shadow: 0 0 20px #ffd34e; }
.impact-bloom { position: absolute; z-index: 9; top: 20%; left: 50%; width: 170px; height: 170px; transform: translate(-50%, -50%); opacity: 0; }
.impact-bloom i { position: absolute; inset: 0; border: 2px solid rgba(255,232,132,.85); border-radius: 50%; }
.impact-bloom i:nth-child(2) { inset: 24px; border-color: rgba(196,255,111,.62); }
.impact-bloom i:nth-child(3) { inset: 55px; border-color: rgba(255,255,219,.92); }
.turn-caption {
  position: absolute;
  z-index: 15;
  bottom: clamp(132px, 15vh, 176px);
  left: clamp(26px, 3vw, 52px);
  width: min(480px, 36vw);
  padding: 0 0 15px 22px;
  border-left: 2px solid var(--sun);
  border-bottom: 1px solid rgba(255,230,150,.36);
  text-shadow: 0 3px 18px rgba(0,0,0,.9);
}
.turn-caption small { display: block; color: var(--sun); font-size: 10px; font-weight: 850; letter-spacing: .18em; text-transform: uppercase; }
.turn-caption strong { display: block; margin-top: 7px; font-size: clamp(17px, 1.4vw, 24px); line-height: 1.25; }
.turn-caption span { display: block; margin-top: 8px; color: rgba(255,255,238,.72); font-size: 11px; font-weight: 720; letter-spacing: .08em; text-transform: uppercase; }
.living-hand {
  position: absolute;
  z-index: 12;
  bottom: -18px;
  left: 50%;
  width: min(600px, 44vw);
  height: 214px;
  transform: translateX(-50%);
  pointer-events: none;
}
.living-hand img {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: clamp(86px, 7.4vw, 126px);
  height: clamp(128px, 11vw, 182px);
  object-fit: cover;
  border: 1px solid rgba(255,235,171,.7);
  border-radius: 14px;
  box-shadow: 0 16px 30px rgba(0,0,0,.43);
  transform-origin: 50% 120%;
  transition: opacity .45s ease, transform .65s cubic-bezier(.2,.8,.2,1), filter .4s ease;
}
.living-hand img:nth-child(1) { transform: translateX(-184%) rotate(-15deg); }
.living-hand img:nth-child(2) { transform: translateX(-118%) translateY(-13px) rotate(-7deg); }
.living-hand img:nth-child(3) { z-index: 3; transform: translateX(-50%) translateY(-24px); }
.living-hand img:nth-child(4) { transform: translateX(18%) translateY(-12px) rotate(7deg); }
.living-hand img:nth-child(5) { transform: translateX(84%) rotate(15deg); }
.turn-owner { position: absolute; z-index: 14; right: clamp(26px, 3vw, 54px); bottom: 38px; display: flex; align-items: center; gap: 10px; color: var(--sun); font-size: 10px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.turn-owner i { width: 7px; height: 7px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 14px var(--sun); animation: blink 1.5s ease-in-out infinite; }

.battle[data-battle-phase="start"] .drawn-card { animation: live-draw 1s ease both; }
.battle[data-battle-phase="start"] .hud-energy strong { animation: live-number 1s ease both; }
.battle[data-battle-phase="play"] .hand-canopy { opacity: .12; transform: translateX(-50%) translateY(-170px) scale(.7); filter: brightness(1.7); }
.battle[data-battle-phase="play"] .summoned-unit--canopy,
.battle[data-battle-phase="attack"] .summoned-unit--canopy,
.battle[data-battle-phase="end"] .summoned-unit--canopy { opacity: 1; transform: translateX(-50%) scale(1); }
.battle[data-battle-phase="play"] .summoned-unit--canopy { animation: summon-arrival 1s ease both; }
.battle[data-battle-phase="play"] .hud-energy strong { animation: energy-empty 1s ease both; }
.battle[data-battle-phase="attack"] .combat-path { opacity: 1; animation: path-strike 1.05s ease both; }
.battle[data-battle-phase="attack"] .summoned-unit--ironcap { animation: unit-strike .85s ease both; }
.battle[data-battle-phase="attack"] .foe-presence { animation: foe-hit .9s .35s ease both; }
.battle[data-battle-phase="attack"] .impact-bloom { animation: impact-bloom 1s .28s ease-out both; }
.battle[data-battle-phase="attack"] .hud-opponent strong { animation: health-fall 1s .32s ease both; }
.battle[data-battle-phase="end"] .living-stage { box-shadow: inset 0 0 90px rgba(62,104,54,.2); }
.battle[data-battle-phase="end"] .turn-owner { color: rgba(255,255,238,.72); }

@keyframes foe-aura { 50% { opacity: .65; transform: translateX(-50%) scale(1.035); } }
@keyframes live-draw { from { opacity: 0; transform: translate(150%, -120px) rotate(25deg) scale(.72); } }
@keyframes live-number { 45% { transform: scale(1.35); color: #efffa5; text-shadow: 0 0 26px #dfff79; } }
@keyframes energy-empty { 45% { transform: scale(.7); filter: brightness(1.7); } }
@keyframes summon-arrival { from { opacity: 0; transform: translate(-50%, 120px) scale(.58); filter: brightness(2); } }
@keyframes path-strike { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(-30px 0); } }
@keyframes unit-strike { 45% { transform: translate(-50%, -72px) scale(1.1); filter: brightness(1.45) drop-shadow(0 0 24px #ffe178); } }
@keyframes foe-hit { 35% { transform: translateX(-50%) scale(.92) rotate(-2deg); filter: brightness(1.75); } 65% { transform: translateX(-50%) scale(1.03) rotate(2deg); } }
@keyframes impact-bloom { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.18); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.45); } }
@keyframes health-fall { 45% { transform: scale(1.28); color: #fff2a7; text-shadow: 0 0 24px #ffd850; } }

@keyframes breathe { 50% { opacity: .72; transform: scale(1.04); } }
@keyframes character-breathe { 50% { transform: translateY(-5px) scale(1.004); } }
@keyframes leaf-fall { from { transform: translate3d(0,-10vh,0) rotate(0); } to { transform: translate3d(var(--drift, 80px),112vh,0) rotate(540deg); } }
@keyframes cinematic-drift { from { transform: scale(1.035) translateX(-.3%); } to { transform: scale(1.07) translateX(.4%); } }
@keyframes blink { 50% { opacity: .3; } }
@keyframes target-hit { 45% { transform: translate(-50%, -50%) scale(.84); filter: brightness(1.8); } 100% { transform: translate(-50%, -50%) scale(1); } }
@keyframes impact { 0% { opacity: 0; transform: translateX(-50%) scale(.2); } 35% { opacity: .9; } 100% { opacity: 0; transform: translateX(-50%) scale(1.8); } }
@keyframes draw-card { from { opacity: .15; transform: translate(70px, -24px) rotate(18deg); } to { opacity: 1; transform: rotate(7deg); } }
@keyframes number-pulse { 45% { transform: scale(1.22); color: var(--sun); } }
@keyframes energy-spent { 35% { transform: scale(.78); color: rgba(145,239,158,.35); } 100% { transform: scale(1); } }
@keyframes connector-pulse { 50% { opacity: .48; transform: translateX(3px); } }
@keyframes play-card-up { from { transform: translateY(28px) scale(.86); opacity: .35; } to { transform: none; opacity: 1; } }
@keyframes attack-card { 45% { transform: translateX(17px) rotate(3deg); filter: brightness(1.35); } }
@keyframes target-flash { 45% { transform: scale(.86); filter: brightness(1.75); } }
@keyframes loop-turn { from { transform: rotate(-130deg); opacity: .25; } to { transform: rotate(0); opacity: 1; } }

@media (max-width: 1180px) {
  :root { --header-h: 78px; }
  .site-header { grid-template-columns: 150px 1fr 40px; gap: 20px; padding-inline: 28px; }
  .header-brand { width: 130px; }
  .main-nav { gap: 16px; }
  .main-nav a { font-size: 10px; letter-spacing: .07em; }
  .hero-aelen { width: min(58vw, 720px); right: -70px; }
  .hero-copy { left: 54px; }
  .story-character { height: 75%; }
  .battle-interface { width: calc(100% - 48px); }
  .battle-layout { grid-template-columns: 300px 1fr; }
  .battle-guide { padding: 26px; }
  .turn-story { width: calc(100% - 48px); grid-template-columns: minmax(0,1fr) 22px minmax(0,1fr) 22px minmax(0,1fr) 22px minmax(0,1fr); }
  .turn-step { padding: 20px; }
  .turn-result { right: 20px; bottom: 18px; left: 20px; }
  .living-hud { grid-template-columns: 170px minmax(390px, 1fr) 170px; gap: 14px; }
  .hud-opponent, .hud-energy { padding-inline: 16px; }
  .battle .battle-heading { width: min(390px, 33vw); }
  .summoned-unit--ironcap { left: 35%; }
  .summoned-unit--canopy { left: 64%; }
}

@media (max-width: 860px) {
  :root { --header-h: 70px; }
  .site-header { grid-template-columns: 130px 1fr 44px; padding-inline: 18px; background: rgba(3,32,23,.9); }
  .header-brand { width: 112px; }
  .menu-button { display: grid; place-content: center; gap: 7px; width: 42px; height: 42px; border: 1px solid rgba(255,230,146,.4); border-radius: 50%; background: rgba(7,67,45,.7); }
  .menu-button span { width: 18px; height: 1px; background: var(--ivory); transition: transform .25s ease; }
  .main-nav { position: fixed; inset: var(--header-h) 0 auto; display: none; padding: 22px; background: rgba(3,37,26,.97); border-bottom: 1px solid var(--line); }
  .site-header.menu-open .main-nav { display: grid; grid-template-columns: repeat(2, 1fr); }
  .main-nav a { padding: 12px 4px; font-size: 12px; }
  .main-nav a::after { bottom: 5px; }
  .scene { min-height: 780px; height: 100svh; }
  .scene-index { display: none; }
  .hero-copy { top: 43%; left: 24px; width: calc(100% - 48px); transform: translateY(-50%); }
  .hero .eyebrow { display: none; }
  .hero-logo { width: min(67vw, 320px); margin-bottom: 14px; }
  .hero h1 { font-size: clamp(30px, 8vw, 42px); max-width: 92%; }
  .forest-button { margin-top: 22px; width: min(310px, 82vw); }
  .hero-aelen { right: -30%; bottom: -18%; width: 105vw; height: 66%; opacity: .78; }
  .hero-vignette { background: linear-gradient(90deg, rgba(2,28,19,.9), rgba(3,35,23,.44) 74%, rgba(2,28,19,.32)), linear-gradient(0deg, rgba(2,26,18,.84), transparent 45%); }

  .story-heading { top: calc(var(--header-h) + 22px); width: calc(100% - 36px); }
  .story-heading .eyebrow { margin-bottom: 10px; }
  .story-heading h2 { font-size: clamp(25px, 6.5vw, 38px); }
  .story-character { height: 70%; bottom: 2%; }
  .story-character--orwyn { left: -41%; }
  .story-character--nym { right: -43%; }
  .story-caption { bottom: 9%; width: calc(100% - 28px); padding: 18px 18px 20px; }
  .story-caption blockquote { font-size: 18px; line-height: 1.42; }
  .cinema-status { bottom: 4%; }

  .battle { min-height: 100svh; height: 100svh; }
  .battle-heading { top: calc(var(--header-h) + 14px); left: 20px; width: calc(100% - 40px); display: block; }
  .battle-heading .eyebrow { margin-bottom: 8px; }
  .battle-heading h2 { font-size: 27px; }
  .battle-heading > p { margin-top: 7px; font-size: 11px; line-height: 1.5; }
  .battle-interface { top: 212px; bottom: 10px; width: calc(100% - 20px); max-height: none; border-radius: 18px; }
  .phase-track { height: 64px; padding: 0 4px; }
  .phase-track button { font-size: 8px; letter-spacing: .05em; }
  .battle-layout { inset: 64px 0 26px; grid-template-columns: 1fr; grid-template-rows: 206px 1fr; }
  .battle-guide { display: grid; grid-template-columns: 76px 1fr; grid-template-rows: auto auto 1fr; column-gap: 12px; padding: 16px 18px; border-right: 0; border-bottom: 1px solid rgba(255,230,145,.25); }
  .battle-guide__step { grid-row: 1 / 3; display: grid; align-content: start; gap: 4px; }
  .battle-guide__step span { font-size: 34px; }
  .battle-guide h3 { margin: 0; font-size: 20px; }
  .battle-guide > p { font-size: 9px; }
  .battle-equation { grid-column: 1 / -1; margin-top: 9px; padding: 8px 10px; }
  .battle-rule { display: none; }
  .battle-board { grid-template-rows: 48px minmax(85px, 1fr) minmax(105px, 1.1fr) 124px; }
  .board-hud { padding-inline: 12px; }
  .board-stat span { font-size: 7px; }
  .board-stat strong { font-size: 28px; }
  .board-zone__label { top: 8px; left: 10px; }
  .board-zone__label span { font-size: 7px; }
  .board-zone__label small { font-size: 6px; }
  .field-card { width: 64px; }
  .field-card img { width: 64px; height: 76px; }
  .field-card--ready { left: calc(50% - 72px); }
  .field-card--played { left: calc(50% + 14px); }
  .field-card figcaption { font-size: 6px; }
  .tutorial-hand figure, .tutorial-hand img { width: 61px; }
  .tutorial-hand img { height: 88px; }
  .tutorial-hand { gap: 4px; }
  .hand-zone__label { top: 8px; left: 10px; }
  .hand-zone__label small { display: none; }
  .play-arrow { left: calc(50% + 100px); }
  .attack-arrow { left: calc(50% + 58px); }
  .battle-legend { height: 26px; }
  .turn-story {
    position: absolute;
    top: 218px;
    bottom: 18px;
    width: calc(100% - 20px);
    max-height: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .turn-connector { display: none; }
  .turn-step { padding: 15px; }
  .turn-step:hover, .turn-step:focus-visible, .turn-step.is-active { transform: none; }
  .turn-step__number { font-size: 30px; }
  .turn-step > small { margin-top: 5px; font-size: 8px; }
  .turn-step h3 { min-height: 0; margin-top: 5px; font-size: 16px; }
  .turn-visual { height: 96px; margin-top: 9px; }
  .turn-step > p { margin-top: 8px; font-size: 8px; line-height: 1.35; }
  .turn-result { right: 14px; bottom: 10px; left: 14px; padding-top: 7px; font-size: 7px; }
  .turn-visual--play figure img, .turn-visual--attack figure img { width: 56px; height: 72px; }
  .energy-change span, .energy-change strong { width: 38px; height: 38px; font-size: 18px; }
  .turn-visual--start > img { width: 48px; height: 66px; }
  .health-change { grid-template-columns: 38px auto auto auto; }
  .health-change img { width: 38px; height: 38px; }
  .health-change span, .health-change strong { font-size: 14px; }
  .end-creatures img { width: 48px; height: 64px; }
  .turn-loop { font-size: 42px; }
}

@media (max-width: 860px) {
  .battle .battle-heading {
    top: calc(var(--header-h) + 10px);
    left: 20px;
    width: calc(100% - 40px);
  }
  .battle .battle-heading .eyebrow { margin-bottom: 5px; font-size: 8px; }
  .battle .battle-heading h2 { max-width: 340px; font-size: clamp(24px, 7vw, 31px); line-height: 1.03; }
  .living-battle { top: calc(var(--header-h) + 76px); right: 8px; bottom: 7px; left: 8px; }
  .living-battle::before { inset: 62px 0 0; border-radius: 18px 18px 8px 8px; }
  .living-hud { height: 66px; grid-template-columns: 63px minmax(0, 1fr) 63px; gap: 5px; }
  .hud-opponent, .hud-energy {
    height: 57px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    justify-items: center;
    padding: 5px 3px;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  }
  .hud-opponent span, .hud-energy span { grid-column: 1; grid-row: 1; align-self: end; font-size: 6px; letter-spacing: .07em; }
  .hud-opponent strong, .hud-energy strong { grid-column: 1; grid-row: 2; font-size: 28px; }
  .hud-opponent small, .hud-energy small { display: none; }
  .phase-orbit { height: 50px; padding-inline: 2px; }
  .phase-orbit button { height: 50px; }
  .phase-orbit button small { font-size: 6px; }
  .phase-orbit button span { margin-top: 3px; font-size: 7px; letter-spacing: .06em; }
  .phase-orbit button::after { right: 8%; left: 8%; }
  .living-stage { inset: 62px 0 0; border-radius: 17px 17px 7px 7px; }
  .foe-aura { top: -3%; width: 310px; }
  .foe-presence { top: 2%; width: 108px; }
  .foe-presence::before { inset: -5px -5px 37px; box-shadow: 0 0 0 4px rgba(5,60,39,.35), 0 0 30px rgba(255,221,91,.18); }
  .foe-presence figcaption { margin-top: 6px; }
  .foe-presence figcaption small { font-size: 5px; }
  .foe-presence figcaption strong { margin-top: 2px; font-size: 9px; }
  .summoned-unit { bottom: 25%; width: 90px; }
  .summoned-unit--ironcap { left: 31%; }
  .summoned-unit--canopy { left: 69%; }
  .summoned-unit > div { padding: 4px; }
  .summoned-unit figcaption { margin-top: 4px; }
  .summoned-unit figcaption strong { font-size: 8px; }
  .summoned-unit figcaption span { display: none; }
  .combat-path { top: 39%; left: 35%; width: 25%; transform: rotate(-42deg); }
  .combat-path b { top: -25px; font-size: 22px; }
  .impact-bloom { top: 18%; width: 96px; height: 96px; }
  .turn-caption {
    top: 144px;
    right: 14px;
    bottom: auto;
    left: 14px;
    width: auto;
    padding: 8px 5px 10px;
    border-left: 0;
    text-align: center;
    background: linear-gradient(90deg, transparent, rgba(3,35,25,.5), transparent);
  }
  .turn-caption small { font-size: 7px; }
  .turn-caption strong { margin-top: 4px; font-size: 12px; }
  .turn-caption span { margin-top: 4px; font-size: 7px; }
  .living-hand { bottom: -12px; width: 310px; height: 126px; }
  .living-hand img { width: 58px; height: 84px; border-radius: 8px; }
  .living-hand img:nth-child(1) { transform: translateX(-192%) rotate(-15deg); }
  .living-hand img:nth-child(2) { transform: translateX(-123%) translateY(-8px) rotate(-7deg); }
  .living-hand img:nth-child(3) { transform: translateX(-50%) translateY(-14px); }
  .living-hand img:nth-child(4) { transform: translateX(23%) translateY(-8px) rotate(7deg); }
  .living-hand img:nth-child(5) { transform: translateX(92%) rotate(15deg); }
  .turn-owner { right: 13px; bottom: 12px; font-size: 7px; }
  .battle[data-battle-phase="play"] .hand-canopy { transform: translateX(-50%) translateY(-105px) scale(.7); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .story-world { transform: scale(1.035); }
}

/* JOURNEY COMPLETION — the current game's six proofs, played as one living restoration. */
.journey-scene {
  --journey-progress: 0;
  color: var(--ivory);
  background: #052a1f;
}
.journey-world,
.journey-world::before,
.journey-world::after,
.journey-awakening,
.journey-dust { position: absolute; inset: 0; }
.journey-world {
  background: url("dist/assets/scenes/bg-journey-living-archive.webp?v=962acb9c52") center / cover no-repeat;
  filter: saturate(calc(.52 + var(--journey-progress) * .007)) brightness(calc(.56 + var(--journey-progress) * .0025));
  transform: scale(1.045);
  transition: filter 1s ease;
  animation: journey-camera 22s ease-in-out infinite alternate;
}
.journey-world::before {
  background:
    linear-gradient(90deg, rgba(2, 27, 19, .94) 0%, rgba(3, 34, 23, .73) 30%, rgba(3, 39, 25, .28) 65%, rgba(3, 28, 20, .56) 100%),
    linear-gradient(0deg, rgba(2, 26, 18, .92), transparent 44%);
  content: "";
}
.journey-world::after {
  opacity: calc(.16 + var(--journey-progress) * .0068);
  background: radial-gradient(circle at 73% 42%, rgba(255, 240, 157, .75), rgba(91, 231, 144, .18) 24%, transparent 58%);
  mix-blend-mode: screen;
  transition: opacity 1s ease;
  content: "";
}
.journey-awakening {
  z-index: 1;
  pointer-events: none;
}
.journey-awakening::before {
  position: absolute;
  top: 9%;
  right: 10%;
  width: min(48vw, 660px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 228, 123, calc(.08 + var(--journey-progress) * .0014));
  border-radius: 50%;
  box-shadow: inset 0 0 90px rgba(255, 228, 124, .04), 0 0 100px rgba(84, 238, 145, .04);
  transform: scale(calc(.86 + var(--journey-progress) * .0014));
  transition: transform 1s ease, border-color 1s ease;
  content: "";
}
.journey-awakening i {
  position: absolute;
  top: 43%;
  right: 31%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff4b3;
  box-shadow: 0 0 18px #ffe473, 0 0 42px #42d882;
  opacity: calc(var(--journey-progress) * .009);
  animation: journey-orbit 6s linear infinite;
}
.journey-awakening i:nth-child(2) { animation-delay: -2s; animation-duration: 7.5s; }
.journey-awakening i:nth-child(3) { animation-delay: -4s; animation-duration: 9s; }
.journey-dust { z-index: 2; overflow: hidden; pointer-events: none; }
.journey-dust i {
  position: absolute;
  bottom: -8%;
  width: 7px;
  height: 14px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, #fff1a5, #4cc979);
  opacity: .35;
  animation: journey-dust 9s linear infinite;
}
.journey-dust i:nth-child(1) { left: 8%; animation-delay: -3s; }
.journey-dust i:nth-child(2) { left: 27%; animation-delay: -7s; animation-duration: 11s; }
.journey-dust i:nth-child(3) { left: 45%; animation-delay: -5s; }
.journey-dust i:nth-child(4) { left: 64%; animation-delay: -1s; animation-duration: 12s; }
.journey-dust i:nth-child(5) { left: 79%; animation-delay: -8s; }
.journey-dust i:nth-child(6) { left: 92%; animation-delay: -4s; animation-duration: 10s; }

.journey-layout {
  position: absolute;
  z-index: 5;
  top: calc(var(--header-h) + clamp(30px, 4vh, 46px));
  right: clamp(34px, 5vw, 78px);
  bottom: 50px;
  left: clamp(38px, 6.2vw, 104px);
  display: grid;
  grid-template-columns: minmax(350px, .82fr) minmax(620px, 1.55fr);
  gap: clamp(36px, 4.5vw, 76px);
  align-items: center;
}
.journey-intro { align-self: stretch; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.journey-intro .eyebrow { margin-bottom: 13px; }
.journey-intro h2 {
  margin: 0;
  font-size: clamp(42px, 4vw, 68px);
  font-weight: 430;
  line-height: .98;
  letter-spacing: -.055em;
  text-shadow: 0 10px 34px rgba(0, 0, 0, .48);
}
.journey-intro h2 strong { color: var(--sun); font-weight: 760; }
.journey-intro > p:not(.eyebrow) {
  width: min(470px, 100%);
  margin: 18px 0 0;
  color: rgba(255, 255, 242, .76);
  font-size: clamp(12px, .93vw, 15px);
  font-weight: 520;
  line-height: 1.55;
}
.journey-gauge {
  position: relative;
  width: clamp(180px, 14vw, 204px);
  aspect-ratio: 1;
  margin-top: clamp(22px, 3vh, 34px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(from -90deg, #ffe57e calc(var(--journey-progress) * 1%), rgba(255, 255, 238, .13) 0);
  box-shadow: 0 25px 55px rgba(0, 0, 0, .31), 0 0 calc(var(--journey-progress) * .45px) rgba(255, 228, 112, .58);
  transition: background 1s ease, box-shadow 1s ease;
}
.journey-gauge::before {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 243, 184, .32);
  border-radius: inherit;
  background: radial-gradient(circle at 50% 27%, rgba(32, 139, 86, .54), rgba(3, 48, 33, .97) 65%);
  box-shadow: inset 0 0 44px rgba(0, 0, 0, .4);
  content: "";
}
.journey-gauge__inner { position: relative; z-index: 2; display: grid; justify-items: center; }
.journey-gauge__inner img { width: 37%; filter: drop-shadow(0 0 13px rgba(255, 228, 112, .36)); }
.journey-gauge__inner strong { margin-top: -2px; font-size: clamp(37px, 3.4vw, 57px); line-height: 1; letter-spacing: -.06em; }
.journey-gauge__inner small { margin-top: 7px; color: rgba(255, 255, 242, .64); font-size: 7px; font-weight: 780; letter-spacing: .15em; text-transform: uppercase; }
.journey-gauge__spark {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 12px #fff, 0 0 28px #ffe16d;
  opacity: calc(.2 + var(--journey-progress) * .008);
  transform-origin: 0 calc(50% + clamp(88px, 7vw, 102px));
  transform: rotate(calc(var(--journey-progress) * 3.6deg));
  transition: transform 1s ease;
}
.journey-reading { min-height: 75px; width: min(455px, 100%); margin-top: 18px; }
.journey-reading > span { color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.journey-reading > strong { display: block; margin-top: 5px; font-size: clamp(16px, 1.25vw, 21px); }
.journey-reading > p { margin: 5px 0 0; color: rgba(255, 255, 241, .68); font-size: 11px; line-height: 1.42; }
.journey-replay {
  width: max-content;
  margin-top: 11px;
  padding: 8px 0;
  border: 0;
  color: rgba(255, 255, 240, .78);
  background: transparent;
  font-size: 9px;
  font-weight: 780;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.journey-replay span { color: var(--sun); margin-right: 7px; }
.journey-replay:hover,
.journey-replay:focus-visible { color: var(--sun); outline: none; }

.journey-proofs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.35vw, 21px);
  align-content: center;
}
.journey-proof {
  position: relative;
  min-width: 0;
  height: clamp(188px, 25vh, 232px);
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 0;
  border: 1px solid rgba(255, 240, 184, .23);
  border-radius: 25px;
  color: rgba(255, 255, 241, .77);
  background: linear-gradient(155deg, rgba(15, 73, 51, .8), rgba(4, 42, 29, .68));
  box-shadow: 0 20px 42px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .08);
  backdrop-filter: blur(13px);
  cursor: pointer;
  text-align: left;
  transform: translateY(0);
  transition: transform .45s cubic-bezier(.2, .82, .2, 1), color .45s ease, background .45s ease, border-color .45s ease, box-shadow .45s ease;
}
.journey-proof:hover,
.journey-proof:focus-visible { z-index: 2; outline: none; transform: translateY(-7px); border-color: rgba(255, 230, 127, .7); }
.journey-proof__art { position: relative; min-height: 0; overflow: hidden; }
.journey-proof__art::after { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4, 39, 28, .98), transparent 52%); content: ""; }
.journey-proof__art img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.55) brightness(.7); transform: scale(1.04); transition: filter .65s ease, transform .85s cubic-bezier(.2, .8, .2, 1); }
.journey-proof:nth-child(4) .journey-proof__art img,
.journey-proof:nth-child(5) .journey-proof__art img { object-position: center 28%; }
.journey-proof__text { position: relative; display: grid; min-height: 74px; padding: 9px 52px 13px 16px; }
.journey-proof__text small { color: var(--gold); font-size: 8px; font-weight: 820; letter-spacing: .14em; text-transform: uppercase; }
.journey-proof__text strong { align-self: end; font-size: clamp(12px, 1vw, 16px); line-height: 1.12; }
.journey-proof__text em { position: absolute; right: 15px; bottom: 13px; color: var(--sun); font-size: clamp(15px, 1.25vw, 20px); font-style: normal; font-weight: 560; letter-spacing: -.04em; }
.journey-proof__seal {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .86);
  border-radius: 50%;
  color: white;
  background: #118052;
  box-shadow: 0 0 25px rgba(61, 231, 137, .64);
  opacity: 0;
  transform: scale(.45) rotate(-35deg);
  transition: opacity .45s ease, transform .55s cubic-bezier(.2, .9, .2, 1.3);
}
.journey-proof.is-complete {
  color: #0b3d2e;
  border-color: rgba(255, 255, 255, .82);
  background: linear-gradient(145deg, rgba(255, 255, 247, .94), rgba(230, 246, 221, .88));
  box-shadow: 0 24px 48px rgba(0, 0, 0, .25), 0 0 28px rgba(91, 231, 143, .18);
  transform: translateY(-5px);
}
.journey-proof.is-complete .journey-proof__art img { filter: saturate(1.04) brightness(1.03); transform: scale(1.105); }
.journey-proof.is-complete .journey-proof__text small { color: #257454; }
.journey-proof.is-complete .journey-proof__text em { color: #a96c09; }
.journey-proof.is-complete .journey-proof__seal { opacity: 1; transform: scale(1) rotate(0); }
.journey-playback { position: absolute; z-index: 15; right: 0; bottom: 0; left: 0; height: 4px; background: rgba(255, 255, 255, .13); }
.journey-playback span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #26c970, #ffe278); box-shadow: 0 0 16px #dfff8c; transition: width 1s ease; }
.journey-scene .scene-index { bottom: 23px; }

@keyframes journey-camera { from { transform: scale(1.045) translateX(-.2%); } to { transform: scale(1.085) translateX(.35%); } }
@keyframes journey-orbit { from { transform: rotate(0deg) translateX(170px) rotate(0deg); } to { transform: rotate(360deg) translateX(170px) rotate(-360deg); } }
@keyframes journey-dust { from { transform: translate3d(0, 0, 0) rotate(0); } to { transform: translate3d(55px, -116vh, 0) rotate(560deg); } }

@media (max-width: 1180px) {
  .journey-layout { left: 36px; right: 30px; grid-template-columns: minmax(300px, .72fr) minmax(550px, 1.45fr); gap: 30px; }
  .journey-intro h2 { font-size: 48px; }
  .journey-proof { height: 204px; }
  .journey-proof__text { padding-left: 13px; }
}

@media (max-width: 860px) {
  .journey-scene { min-height: 820px; height: 100svh; }
  .journey-world { background-position: 63% center; }
  .journey-world::before { background: linear-gradient(180deg, rgba(3, 31, 22, .9), rgba(3, 36, 25, .38) 45%, rgba(2, 27, 19, .94)); }
  .journey-layout { top: calc(var(--header-h) + 18px); right: 14px; bottom: 15px; left: 14px; display: block; }
  .journey-intro { position: static; display: block; }
  .journey-intro .eyebrow { margin-bottom: 8px; font-size: 8px; }
  .journey-intro h2 { max-width: 100%; font-size: clamp(29px, 8.2vw, 34px); line-height: .96; }
  .journey-intro > p:not(.eyebrow) { display: none; }
  .journey-gauge { width: 118px; position: absolute; top: 98px; left: 5px; margin: 0; }
  .journey-gauge__inner strong { font-size: 31px; }
  .journey-gauge__inner small { font-size: 5px; }
  .journey-gauge__spark { transform-origin: 0 64px; }
  .journey-reading { position: absolute; top: 108px; right: 0; width: calc(100% - 140px); min-height: 90px; margin: 0; }
  .journey-reading > span { font-size: 6px; }
  .journey-reading > strong { font-size: 14px; }
  .journey-reading > p { font-size: 8px; line-height: 1.35; }
  .journey-replay { position: absolute; top: 208px; right: 0; margin: 0; font-size: 6px; }
  .journey-proofs { position: absolute; right: 0; bottom: 18px; left: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .journey-proof { height: 133px; border-radius: 16px; }
  .journey-proof:hover, .journey-proof:focus-visible, .journey-proof.is-complete { transform: translateY(-2px); }
  .journey-proof__text { min-height: 48px; padding: 6px 37px 8px 9px; }
  .journey-proof__text small { font-size: 5px; }
  .journey-proof__text strong { font-size: 9px; }
  .journey-proof__text em { right: 8px; bottom: 8px; font-size: 12px; }
  .journey-proof__seal { top: 7px; right: 7px; width: 21px; height: 21px; font-size: 10px; }
  .journey-scene .scene-index { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .journey-world,
  .journey-awakening i,
  .journey-dust i { animation: none; }
}

/* Battle v4 — a mini cinematic built from the real Forest Legends table and card frames. */
.battle-vignette {
  background:
    linear-gradient(90deg, rgba(2,28,18,.18), transparent 12% 88%, rgba(2,28,18,.2)),
    linear-gradient(0deg, rgba(2,28,18,.23), transparent 24% 82%, rgba(255,251,220,.05));
}

.battle-movie {
  position: absolute;
  z-index: 7;
  inset: var(--header-h) 0 0;
  overflow: hidden;
  color: #102f25;
  outline: none;
}

.movie-identity {
  position: absolute;
  z-index: 30;
  left: clamp(20px, 2.2vw, 42px);
  display: grid;
  grid-template-columns: clamp(70px, 6vw, 106px) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  color: #fffdf1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.48));
}
.movie-identity--foe { top: 15px; }
.movie-identity--self { bottom: 14px; }
.movie-identity > img {
  grid-row: 1 / 3;
  width: clamp(70px, 6vw, 106px);
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 18%;
  border: 4px solid #f8df86;
  border-radius: 50%;
  background: #edf4d9;
  box-shadow: 0 0 0 3px rgba(30,104,68,.9), inset 0 0 0 2px #fff8d8;
}
.movie-identity--self > img { object-position: center 12%; }
.movie-identity div strong { display: block; font-size: clamp(18px, 1.5vw, 28px); line-height: 1; }
.movie-identity div span { display: block; margin-top: 3px; font-size: clamp(9px, .78vw, 14px); font-weight: 720; }
.movie-identity p {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  margin: 7px 0 0;
  padding: 5px 12px;
  border-radius: 999px;
  color: #0d3025;
  background: rgba(255,255,250,.92);
  box-shadow: 0 4px 12px rgba(24,58,35,.22);
}
.movie-identity p b { color: #e34b54; font-size: 20px; -webkit-text-stroke: 1px #983642; }
.movie-identity p strong { min-width: 30px; font-size: 22px; font-variant-numeric: tabular-nums; }
.movie-identity p i {
  width: 23px;
  height: 23px;
  border: 2px solid #d6c066;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #cbffd7, #22a966 46%, #087145 72%);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.25);
}
.movie-identity p em {
  width: 16px;
  height: 23px;
  background: url("dist/assets/cards/card-back.webp?v=962acb9c52") center / contain no-repeat;
}

.movie-coach {
  position: absolute;
  z-index: 34;
  top: 18px;
  left: 28%;
  width: min(47vw, 820px);
  min-height: 82px;
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px 24px 10px 12px;
  border: 2px solid rgba(36,148,102,.62);
  border-radius: 25px;
  background: rgba(255,255,248,.92);
  box-shadow: 0 11px 28px rgba(39,72,36,.18), inset 0 1px rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
}
.movie-coach img { width: 58px; height: 58px; object-fit: cover; object-position: center 17%; border: 2px solid #d9ba5f; border-radius: 50%; }
.movie-coach small { display: block; color: #19885e; font-size: 11px; font-weight: 820; letter-spacing: .03em; }
.movie-coach strong { display: block; margin-top: 3px; font-size: clamp(17px, 1.45vw, 25px); line-height: 1.16; }

.movie-menu, .movie-turn {
  position: absolute;
  z-index: 34;
  right: clamp(135px, 10vw, 178px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(195,151,48,.55);
  border-radius: 999px;
  color: #16382d;
  background: rgba(255,255,249,.92);
  box-shadow: 0 5px 12px rgba(29,59,34,.18);
  font-weight: 760;
}
.movie-menu { top: 22px; width: 116px; height: 42px; gap: 10px; }
.movie-menu i, .movie-menu i::before, .movie-menu i::after { width: 17px; height: 2px; background: #16382d; }
.movie-menu i { position: relative; }
.movie-menu i::before, .movie-menu i::after { content: ""; position: absolute; left: 0; }
.movie-menu i::before { top: -6px; }.movie-menu i::after { top: 6px; }
.movie-turn { top: 72px; min-width: 132px; height: 36px; padding: 0 15px; font-size: 12px; }

.movie-deck {
  position: absolute;
  z-index: 28;
  right: clamp(20px, 2.2vw, 42px);
  width: clamp(74px, 6.2vw, 106px);
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.35));
}
.movie-deck--foe { top: 16px; }
.movie-deck--self { bottom: 39%; }
.movie-deck img { display: block; width: 100%; border-radius: 10%; }
.movie-deck b {
  position: absolute;
  right: -7px;
  bottom: -8px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 3px solid #f6d36f;
  border-radius: 50%;
  color: white;
  background: #27a965;
  box-shadow: 0 0 0 3px rgba(19,91,62,.7);
  font-size: 18px;
}

.movie-row { position: absolute; left: 50%; z-index: 12; display: flex; justify-content: center; gap: 28px; transform: translateX(-50%); }
.movie-row--foe { top: clamp(132px, 17vh, 176px); }
.movie-row--self { bottom: clamp(198px, 23vh, 245px); }

.forest-card { position: relative; flex: none; container-type: size; }
.card-body { position: absolute; inset: 0; }
.hand-card { width: clamp(105px, 8.5vw, 146px); aspect-ratio: 760 / 1129; filter: drop-shadow(0 10px 10px rgba(17,40,23,.4)); }
.hand-card .card-paint {
  position: absolute;
  z-index: 0;
  top: 5.8%;
  left: 6%;
  width: 88.6%;
  height: 56.1%;
  overflow: hidden;
  background: #20392b;
}
.hand-card .card-paint img { width: 100%; height: 100%; object-fit: cover; }
.hand-card .card-frame { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; }
.card-cost, .card-stat, .board-gem {
  position: absolute;
  z-index: 5;
  transform: translate(-50%,-50%);
  color: #fff;
  font-weight: 850;
  line-height: 1;
  -webkit-text-stroke: 1.6px #14241a;
  paint-order: stroke fill;
  text-shadow: 0 2px 3px rgba(0,0,0,.55);
}
.card-cost { top: 8.2%; left: 12.1%; font-size: max(10px, 13.5cqw); }
.card-stat { top: 91.7%; font-size: max(10px, 13.5cqw); }
.card-stat--attack { left: 12.4%; }.card-stat--health { left: 88.1%; }
.card-copy {
  position: absolute;
  z-index: 4;
  top: 65%;
  left: 9%;
  width: 82%;
  height: 18.5%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  color: #14372b;
}
.card-copy strong { font-size: max(7px, 5.2cqw); line-height: 1.05; }
.card-copy small { display: block; margin-top: 4px; font-size: max(5px, 3.5cqw); line-height: 1.08; }

.board-card {
  --u: calc(100cqw / 950);
  --ax: 118;
  --ay: 1294;
  --hx: 837;
  --hy: 1293;
  --shift: -448;
  --corner: calc(262 * var(--u));
  width: clamp(112px, 9vw, 154px);
  aspect-ratio: 950 / 956;
  filter: drop-shadow(0 9px 8px rgba(22,40,20,.38));
  transform-origin: 50% 100%;
}
.board-card .card-paint {
  position: absolute;
  z-index: 0;
  left: calc(57 * var(--u));
  top: calc(82 * var(--u));
  width: calc(842 * var(--u));
  height: calc(792 * var(--u));
  overflow: hidden;
  background: #20392b;
}
.board-card .card-paint img { width: 100%; height: 100%; object-fit: cover; }
.board-card .card-frame, .board-card .card-lower-gems, .board-card .card-corner {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(1411 * var(--u));
  object-fit: fill;
  pointer-events: none;
}
.board-card .card-frame {
  clip-path: inset(0 0 calc(510 * var(--u)) 0 round 0 0 calc(52 * var(--u)) calc(52 * var(--u)));
  -webkit-mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
  mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
  -webkit-mask-size: calc(100% - var(--corner)) 100%, var(--corner) calc(100% - var(--corner));
  mask-size: calc(100% - var(--corner)) 100%, var(--corner) calc(100% - var(--corner));
  -webkit-mask-position: right top, left bottom;
  mask-position: right top, left bottom;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.board-card .card-corner {
  z-index: 2;
  transform: translateX(calc(5 * var(--u))) scaleX(-1);
  clip-path: inset(0 0 calc(1149 * var(--u)) calc(100% - var(--corner) + 5 * var(--u)));
}
.board-card .card-lower-gems {
  z-index: 3;
  top: calc(var(--shift) * var(--u));
  -webkit-mask-image:
    radial-gradient(circle calc(111 * var(--u)) at calc(var(--ax) * var(--u)) calc(var(--ay) * var(--u)), #000 97%, transparent 100%),
    radial-gradient(circle calc(111 * var(--u)) at calc(var(--hx) * var(--u)) calc(var(--hy) * var(--u)), #000 97%, transparent 100%);
  mask-image:
    radial-gradient(circle calc(111 * var(--u)) at calc(var(--ax) * var(--u)) calc(var(--ay) * var(--u)), #000 97%, transparent 100%),
    radial-gradient(circle calc(111 * var(--u)) at calc(var(--hx) * var(--u)) calc(var(--hy) * var(--u)), #000 97%, transparent 100%);
}
.board-gem { top: calc(846 * var(--u)); font-size: max(12px, 14cqw); }
.board-gem--attack { left: calc(var(--ax) * var(--u)); }
.board-gem--health { left: calc(var(--hx) * var(--u)); }

.movie-hand {
  position: absolute;
  z-index: 32;
  bottom: -16px;
  left: 50%;
  width: min(650px, 46vw);
  height: 235px;
  transform: translateX(-50%);
  pointer-events: none;
}
.movie-hand .hand-card { position: absolute; bottom: 0; left: 50%; transform-origin: 50% 116%; transition: opacity .65s ease, transform .9s cubic-bezier(.2,.84,.24,1), filter .4s ease; }
.hand-card--amber { transform: translateX(-185%) rotate(-12deg); }
.hand-card--ironcap { transform: translateX(-118%) translateY(-10px) rotate(-5deg); }
.hand-card--canopy { z-index: 4; transform: translateX(-50%) translateY(-20px) rotate(1deg); }
.hand-card--elytra { transform: translateX(19%) translateY(-8px) rotate(8deg); }

.movie-end-turn {
  position: absolute;
  z-index: 33;
  right: clamp(22px, 2.4vw, 46px);
  bottom: 22px;
  width: clamp(118px, 10vw, 172px);
  aspect-ratio: 1;
  border: 8px solid #f3d773;
  border-radius: 50%;
  color: white;
  background: radial-gradient(circle at 42% 30%, #44d582, #10995a 58%, #087743 78%);
  box-shadow: 0 0 0 4px rgba(20,91,61,.8), inset 0 0 0 4px rgba(255,255,255,.28), 0 12px 28px rgba(21,55,30,.35);
  font: 850 clamp(18px, 1.5vw, 28px)/.9 var(--font-ui);
  text-transform: uppercase;
  text-shadow: 0 2px 3px rgba(0,0,0,.35);
  cursor: pointer;
}
.movie-end-turn:focus-visible { outline: 3px solid #fff4a6; outline-offset: 4px; }
.movie-impact { position: absolute; z-index: 40; top: 26%; left: 50%; width: 120px; height: 120px; opacity: 0; transform: translate(-50%,-50%); pointer-events: none; }
.movie-impact i { position: absolute; inset: 0; border: 3px solid #fff8c4; border-radius: 50%; box-shadow: 0 0 24px #fff1a6; }
.movie-impact i:nth-child(2) { inset: 22px; border-color: #f9d75f; }.movie-impact i:nth-child(3) { inset: 44px; border-color: #fff; }
.damage-number { position: absolute; z-index: 50; top: 6%; left: 50%; color: #fff5ad; font-size: 36px; font-weight: 900; opacity: 0; transform: translate(-50%,0); -webkit-text-stroke: 2px #5b2d16; paint-order: stroke fill; text-shadow: 0 0 18px #ffef7f; }
.movie-replay { position: absolute; z-index: 60; right: 0; bottom: 0; left: 0; height: 4px; background: rgba(255,255,255,.18); }
.movie-replay span { display: block; width: 20%; height: 100%; background: linear-gradient(90deg,#1caf69,#ffe175); box-shadow: 0 0 14px #dfff8c; transition: width .55s ease; }

.battle[data-battle-phase="ready"] .hand-card--canopy { filter: drop-shadow(0 0 5px #ecffc9) drop-shadow(0 0 15px #4ddc79); animation: card-ready 1.5s ease-in-out infinite; }
.battle[data-battle-phase="ready"] .board-card--canopy,
.battle[data-battle-phase="play"] .board-card--canopy { opacity: 0; transform: translateY(90px) scale(.7); }
.battle[data-battle-phase="play"] .hand-card--canopy { z-index: 80; transform: translate(-50%,-42vh) scale(1.12); filter: drop-shadow(0 0 10px #fff5b3) drop-shadow(0 0 26px #57e58b); }
.battle[data-battle-phase="summon"] .hand-card--canopy,
.battle[data-battle-phase="attack"] .hand-card--canopy,
.battle[data-battle-phase="end"] .hand-card--canopy { opacity: 0; transform: translate(-50%,-38vh) scale(.62); }
.battle[data-battle-phase="summon"] .board-card--canopy { animation: table-card-land .9s cubic-bezier(.22,.88,.24,1.2) both; }
.battle[data-battle-phase="attack"] .board-card--canopy,
.battle[data-battle-phase="end"] .board-card--canopy { opacity: 1; transform: none; }
.battle[data-battle-phase="attack"] .board-card--ironcap { animation: table-card-strike 1.15s ease both; }
.battle[data-battle-phase="attack"] .board-card--amber { animation: table-card-hit 1.15s .27s ease both; }
.battle[data-battle-phase="attack"] .movie-impact { animation: table-impact .9s .3s ease-out both; }
.battle[data-battle-phase="attack"] .damage-number { animation: damage-rise 1s .28s ease-out both; }
.battle[data-battle-phase="end"] .board-card--amber { opacity: 0; transform: scale(.72); filter: brightness(1.5); }
.battle[data-battle-phase="end"] .movie-end-turn { animation: end-turn-ready 1.25s ease-in-out infinite; }

@keyframes card-ready { 50% { transform: translateX(-50%) translateY(-31px) rotate(1deg); } }
@keyframes table-card-land { from { opacity: 0; transform: translateY(110px) scale(.58) rotate(-8deg); filter: brightness(1.8); } to { opacity: 1; transform: none; } }
@keyframes table-card-strike { 45% { transform: translateY(-24vh) scale(1.06); filter: brightness(1.35) drop-shadow(0 0 20px #ffe580); } 75% { transform: translateY(-4vh) scale(.98); } }
@keyframes table-card-hit { 48% { transform: translateX(16px) rotate(6deg) scale(.9); filter: brightness(2); } 72% { transform: translateX(-8px) rotate(-4deg); } }
@keyframes table-impact { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.15); } 32% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.8); } }
@keyframes damage-rise { 0% { opacity: 0; transform: translate(-50%,8px) scale(.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-72px) scale(1.25); } }
@keyframes end-turn-ready { 50% { transform: scale(1.045); box-shadow: 0 0 0 4px rgba(20,91,61,.8), inset 0 0 0 4px rgba(255,255,255,.35), 0 0 32px rgba(255,226,100,.72); } }

@media (max-width: 860px) {
  /* On a phone the board fills the width, so the section title cannot sit over it:
     it was landing on Orwyn's own card and on the coach line. The board starts
     below its own band instead, and the title owns that band. */
  .battle-movie { inset: calc(var(--header-h) + 84px) 0 0; }
  .movie-coach { top: 68px; left: 8px; width: calc(100% - 16px); min-height: 54px; grid-template-columns: 38px 1fr; gap: 8px; padding: 6px 10px 6px 7px; border-radius: 16px; }
  .movie-coach img { width: 38px; height: 38px; }
  .movie-coach small { font-size: 7px; }.movie-coach strong { font-size: 10px; }
  .movie-menu { display: none; }.movie-turn { top: 128px; right: 9px; min-width: 92px; height: 27px; padding: 0 9px; font-size: 8px; }
  .movie-identity { left: 8px; grid-template-columns: 56px auto; column-gap: 7px; }
  .movie-identity--foe { top: 6px; }.movie-identity--self { bottom: 7px; }
  .movie-identity > img { width: 56px; border-width: 2px; box-shadow: 0 0 0 2px rgba(30,104,68,.9); }
  .movie-identity div strong { font-size: 13px; }.movie-identity div span { font-size: 7px; }
  .movie-identity p { gap: 4px; margin-top: 4px; padding: 3px 7px; }
  .movie-identity p b { font-size: 13px; }.movie-identity p strong { min-width: 19px; font-size: 13px; }.movie-identity p i { width: 15px; height: 15px; border-width: 1px; }.movie-identity p em { width: 10px; height: 15px; }
  .movie-deck { right: 8px; width: 50px; }.movie-deck--foe { top: 7px; }.movie-deck--self { bottom: 32%; }
  .movie-deck b { right: -4px; bottom: -5px; width: 25px; height: 25px; border-width: 2px; font-size: 10px; }
  .movie-row--foe { top: 25%; }.movie-row--self { bottom: 27%; gap: 18px; }
  .board-card { width: 86px; }
  .movie-hand { bottom: -7px; width: 280px; height: 142px; }
  .hand-card { width: 76px; }
  .hand-card--amber { transform: translateX(-178%) rotate(-12deg); }.hand-card--ironcap { transform: translateX(-113%) translateY(-6px) rotate(-5deg); }.hand-card--canopy { transform: translateX(-50%) translateY(-11px); }.hand-card--elytra { transform: translateX(13%) rotate(8deg); }
  .card-copy strong { font-size: 5px; }.card-copy small { display: none; }
  .movie-end-turn { right: 8px; bottom: 9px; width: 82px; border-width: 5px; font-size: 13px; }
  .movie-impact { top: 27%; width: 82px; height: 82px; }
  .damage-number { font-size: 24px; }
  .battle[data-battle-phase="play"] .hand-card--canopy { transform: translate(-50%,-34vh) scale(1.15); }
  @keyframes table-card-strike { 45% { transform: translateY(-28vh) scale(1.04); filter: brightness(1.35) drop-shadow(0 0 14px #ffe580); } 75% { transform: translateY(-4vh) scale(.98); } }
}

/* World Path — the next playable scene after the battle. */
.world-path {
  color: var(--ivory);
  background: #397e6c;
}
.path-world {
  position: absolute;
  z-index: -4;
  inset: -2%;
  background: url("dist/assets/scenes/forest-gate.webp?v=962acb9c52") center / cover no-repeat;
  animation: path-camera 18s ease-in-out infinite alternate;
}
.path-world::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(2,31,22,.83) 0%, rgba(3,40,29,.56) 28%, rgba(4,44,31,.08) 57%, rgba(3,31,23,.16) 100%),
    linear-gradient(0deg, rgba(3,30,22,.9) 0%, rgba(5,45,32,.1) 38%, rgba(3,33,25,.18) 100%);
}
.path-sun {
  position: absolute;
  z-index: -2;
  top: 3%;
  right: 7%;
  width: min(34vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,249,190,.72), rgba(255,223,103,.21) 34%, transparent 69%);
  mix-blend-mode: screen;
  animation: path-sun-pulse 5s ease-in-out infinite;
}
.path-mist {
  position: absolute;
  z-index: -1;
  width: 64vw;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,240,.35), transparent 68%);
  filter: blur(22px);
  opacity: .4;
  pointer-events: none;
}
.path-mist--one { top: 37%; left: 18%; animation: path-mist 13s ease-in-out infinite alternate; }
.path-mist--two { top: 52%; left: 51%; opacity: .26; animation: path-mist 17s -5s ease-in-out infinite alternate-reverse; }

.path-intro {
  position: absolute;
  z-index: 7;
  top: calc(var(--header-h) + clamp(34px, 5vh, 72px));
  left: clamp(34px, 5.2vw, 92px);
  width: min(42vw, 700px);
  text-shadow: 0 4px 28px rgba(0,0,0,.68);
}
.path-intro h2 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(44px, 5vw, 84px);
  font-weight: 420;
  letter-spacing: -.055em;
  line-height: .98;
}
.path-intro h2 strong { display: block; color: var(--sun); font-weight: 720; }
.path-intro > p:last-child {
  max-width: 420px;
  margin: 23px 0 0;
  color: rgba(255,255,240,.86);
  font-size: clamp(13px, 1vw, 18px);
  font-weight: 560;
  line-height: 1.62;
}

.path-feature {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
}
.path-feature__portrait {
  position: absolute;
  top: var(--header-h);
  right: -1.5vw;
  bottom: 0;
  width: 58vw;
  min-height: 0;
  overflow: visible;
  filter: drop-shadow(0 32px 34px rgba(0,0,0,.38));
}
.path-feature__portrait > img[data-path-portrait] {
  position: absolute;
  z-index: 1;
  right: -3.5vw;
  bottom: -5%;
  display: block;
  width: auto;
  height: 108%;
  max-width: none;
  -webkit-mask-image:
    linear-gradient(to top, transparent 0, #000 17%),
    linear-gradient(to right, transparent 0, #000 var(--fi, 12%));
  mask-image:
    linear-gradient(to top, transparent 0, #000 17%),
    linear-gradient(to right, transparent 0, #000 var(--fi, 12%));
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  transition: opacity .36s ease, transform .72s cubic-bezier(.2,.82,.2,1), filter .4s ease;
}
.path-feature__portrait > img.is-changing { opacity: 0; transform: scale(.94) translateY(18px); filter: brightness(1.42); }
.path-feature__halo {
  position: absolute;
  inset: 10% 0 7% 16%;
  background: radial-gradient(ellipse at 52% 58%, rgba(255,231,116,.34), rgba(88,226,144,.12) 39%, transparent 70%);
  filter: blur(18px);
  animation: path-halo 4.4s ease-in-out infinite;
}
.path-feature__copy {
  position: absolute;
  z-index: 5;
  left: 36%;
  bottom: 29%;
  width: min(22vw, 420px);
  padding: 22px 24px 24px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 22px;
  color: #123c2d;
  background: linear-gradient(135deg, rgba(255,255,249,.94), rgba(244,249,229,.78));
  box-shadow: 0 22px 52px rgba(0,31,22,.22), inset 0 1px 0 rgba(255,255,255,.92);
  text-shadow: none;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
.path-feature__copy > span {
  color: #9a6519;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: .18em;
}
.path-feature__copy > p { margin: 7px 0 0; color: #347052; font-size: 10px; font-weight: 830; letter-spacing: .15em; text-transform: uppercase; }
.path-feature__copy h3 { margin: 9px 0 8px; font-size: clamp(26px, 2.7vw, 50px); font-weight: 610; letter-spacing: -.045em; line-height: .98; }
.path-feature__copy small { display: block; max-width: 430px; color: rgba(18,60,45,.72); font-size: clamp(10px, .75vw, 14px); font-weight: 560; line-height: 1.55; }

.path-route {
  --traveller-x: 2.7%;
  --traveller-y: 75.8%;
  position: absolute;
  z-index: 10;
  right: clamp(26px, 4vw, 70px);
  bottom: clamp(22px, 4vh, 48px);
  left: clamp(26px, 4vw, 70px);
  height: clamp(210px, 27vh, 280px);
}
.path-route::before {
  position: absolute;
  inset: 10% -4% -15%;
  content: "";
  background: radial-gradient(ellipse at center, rgba(6,48,34,.15), rgba(3,28,21,.72) 72%);
  filter: blur(12px);
}
.path-route__line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.path-route__line path { fill: none; stroke-linecap: round; }
.path-route__shadow { stroke: rgba(2,36,25,.82); stroke-width: 13; filter: blur(1px); }
.path-route__gold { stroke: rgba(255,222,104,.74); stroke-width: 3; stroke-dasharray: 10 12; filter: drop-shadow(0 0 7px rgba(255,229,122,.85)); }
.path-route__spark { stroke: #fff7b7; stroke-width: 2; stroke-dasharray: 1 35; filter: drop-shadow(0 0 10px #fff0a2); animation: path-route-spark 9s linear infinite; }
.path-route__nodes { position: absolute; inset: 0; }
.path-node {
  --node-scale: 1;
  position: absolute;
  display: grid;
  width: clamp(64px, 5.4vw, 94px);
  aspect-ratio: 1;
  place-items: center;
  padding: 5px;
  border: 1px solid rgba(255,244,193,.82);
  border-radius: 50%;
  color: var(--ivory);
  background: linear-gradient(145deg, rgba(255,255,246,.9), rgba(19,100,62,.82));
  box-shadow: 0 11px 26px rgba(0,0,0,.32), 0 0 0 5px rgba(6,78,48,.42);
  cursor: pointer;
  transform: translate(-50%,-50%) scale(var(--node-scale));
  transition: transform .28s ease, filter .3s ease, box-shadow .3s ease, opacity .3s ease;
}
.path-node::before {
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(255,220,97,.22);
  border-radius: 50%;
  content: "";
  transition: inset .3s ease, border-color .3s ease;
}
.path-node img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; filter: saturate(.78) brightness(.84); transition: filter .3s ease; }
.path-node span {
  position: absolute;
  top: -8px;
  right: -7px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid rgba(255,255,243,.9);
  border-radius: 50%;
  color: #4c3407;
  background: var(--sun);
  box-shadow: 0 4px 10px rgba(0,0,0,.28);
  font-size: 9px;
  font-weight: 850;
}
.path-node small {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  width: 132px;
  color: rgba(255,255,240,.72);
  font-size: 8px;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: .07em;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,.92);
  text-transform: uppercase;
  transform: translateX(-50%);
  transition: color .3s ease, transform .3s ease;
}
.path-node:hover, .path-node:focus-visible, .path-node.is-active {
  --node-scale: 1.17;
  z-index: 4;
  outline: none;
  filter: brightness(1.08);
  box-shadow: 0 15px 30px rgba(0,0,0,.38), 0 0 0 6px rgba(255,224,101,.68), 0 0 34px rgba(255,226,91,.82);
}
.path-node:hover::before, .path-node:focus-visible::before, .path-node.is-active::before { inset: -13px; border-color: rgba(255,234,143,.72); }
.path-node:hover img, .path-node:focus-visible img, .path-node.is-active img { filter: saturate(1.1) brightness(1.08); }
.path-node:hover small, .path-node:focus-visible small, .path-node.is-active small { color: var(--sun); transform: translateX(-50%) translateY(3px); }
.path-node:active { --node-scale: .96; }
.path-node.is-passed { box-shadow: 0 11px 26px rgba(0,0,0,.3), 0 0 0 5px rgba(71,206,118,.56); }

.path-traveller {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  left: var(--traveller-x);
  top: var(--traveller-y);
  width: clamp(34px, 3vw, 52px);
  aspect-ratio: 1;
  padding: 3px;
  border: 2px solid var(--sun);
  border-radius: 50%;
  background: var(--ivory);
  box-shadow: 0 0 0 5px rgba(39,180,98,.38), 0 0 24px #dffb87;
  transform: translate(-50%,-50%);
  transition: left .85s cubic-bezier(.2,.82,.2,1), top .85s cubic-bezier(.2,.82,.2,1);
  animation: traveller-bob 1.7s ease-in-out infinite;
}
.path-traveller img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.path-playback { position: absolute; z-index: 12; right: 0; bottom: 0; left: 0; height: 4px; background: rgba(255,255,255,.17); }
.path-playback span { display: block; width: 14.28%; height: 100%; background: linear-gradient(90deg,#26c16b,#ffe170); box-shadow: 0 0 15px #dfff8c; transition: width .6s ease; }

@keyframes path-camera { from { transform: scale(1.03) translateX(-.25%); } to { transform: scale(1.075) translateX(.35%); } }
@keyframes path-sun-pulse { 50% { opacity: .64; transform: scale(1.08); } }
@keyframes path-mist { from { transform: translateX(-7%); } to { transform: translateX(10%); } }
@keyframes path-halo { 50% { opacity: .63; transform: scale(1.035); } }
@keyframes crest-float { 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes path-route-spark { to { stroke-dashoffset: -360; } }
@keyframes traveller-bob { 50% { margin-top: -6px; filter: brightness(1.1); } }

/* Tall desktop windows have enough vertical room to keep the glass caption
   completely off the full-height opponent silhouette. */
@media (min-width: 861px) and (max-aspect-ratio: 6 / 5) {
  .path-feature__copy {
    left: clamp(28px, 2.7vw, 50px);
    bottom: 25%;
    width: min(19vw, 340px);
  }
  .path-feature__copy h3 { font-size: clamp(30px, 2.2vw, 39px); }
}

@media (max-width: 860px) {
  .path-world { background-position: 58% center; }
  .path-world::after { background: linear-gradient(180deg, rgba(2,31,22,.86), rgba(3,35,25,.22) 44%, rgba(3,28,21,.82)); }
  .path-intro { top: calc(var(--header-h) + 22px); left: 18px; width: calc(100% - 36px); }
  .path-intro .eyebrow { margin-bottom: 10px; font-size: 9px; }
  .path-intro h2 { max-width: 90%; font-size: clamp(31px, 9.4vw, 44px); }
  .path-intro > p:last-child { max-width: 95%; margin-top: 12px; font-size: 10px; line-height: 1.45; }
  .path-feature { inset: 0; }
  .path-feature__portrait { top: 38%; right: -15vw; bottom: auto; width: 58vw; height: 32%; }
  .path-feature__portrait > img[data-path-portrait] { bottom: 0; width: auto; height: 100%; }
  .path-feature__copy { top: 42%; left: 10px; bottom: auto; width: 42vw; padding: 13px 12px 14px; border-radius: 14px; }
  .path-feature__copy > span { font-size: 9px; }.path-feature__copy > p { margin-top: 4px; font-size: 7px; }
  .path-feature__copy h3 { margin: 6px 0; font-size: clamp(17px, 5vw, 22px); overflow-wrap: anywhere; }
  .path-feature__copy small { font-size: 8px; line-height: 1.35; }
  .path-route { right: 6px; bottom: 22px; left: 6px; height: 205px; }
  .path-node { width: 49px; padding: 3px; box-shadow: 0 7px 16px rgba(0,0,0,.32), 0 0 0 3px rgba(6,78,48,.42); }
  .path-node span { top: -6px; right: -5px; width: 20px; height: 20px; border-width: 1px; font-size: 7px; }
  .path-node small { top: calc(100% + 5px); width: 74px; font-size: 5px; }
  .path-node:hover, .path-node:focus-visible, .path-node.is-active { box-shadow: 0 10px 20px rgba(0,0,0,.35), 0 0 0 4px rgba(255,224,101,.68), 0 0 22px rgba(255,226,91,.72); }
  .path-traveller { width: 29px; border-width: 1px; box-shadow: 0 0 0 3px rgba(39,180,98,.38), 0 0 15px #dfff8c; }
}

@media (prefers-reduced-motion: reduce) {
  .path-world, .path-sun, .path-mist, .path-feature__halo, .path-route__spark, .path-traveller { animation: none; }
}

/* MY CARDS — the approved living Archive language, staged as an interactive film. */
.collection-scene {
  color: var(--ivory);
  background: #062e22;
}
.collection-world,
.collection-light {
  position: absolute;
  inset: 0;
}
.collection-world {
  z-index: -3;
  background: url("dist/assets/scenes/bg-journey-living-archive.webp?v=962acb9c52") 52% center / cover no-repeat;
  transform: scale(1.035);
  animation: collection-camera 18s ease-in-out infinite alternate;
}
.collection-world::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 29, 20, .93) 0%, rgba(3, 40, 27, .72) 27%, rgba(4, 42, 29, .22) 57%, rgba(3, 31, 22, .62) 100%),
    linear-gradient(0deg, rgba(2, 26, 18, .9), transparent 38%, rgba(3, 30, 21, .3));
}
.collection-light {
  z-index: -2;
  left: 34%;
  background:
    radial-gradient(ellipse at 43% 40%, rgba(255, 226, 115, .3), transparent 32%),
    radial-gradient(ellipse at 72% 54%, rgba(91, 235, 151, .2), transparent 43%);
  mix-blend-mode: screen;
  animation: collection-light 5.5s ease-in-out infinite;
}
.collection-motes {
  position: absolute;
  inset: var(--header-h) 0 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.collection-motes i {
  position: absolute;
  top: 108%;
  width: 8px;
  height: 15px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, #ecff9d, #36a452);
  opacity: .45;
  animation: collection-leaf 10s linear infinite;
}
.collection-motes i:nth-child(1) { left: 12%; animation-delay: -2s; }
.collection-motes i:nth-child(2) { left: 31%; animation-delay: -7s; animation-duration: 13s; }
.collection-motes i:nth-child(3) { left: 48%; animation-delay: -4s; animation-duration: 9s; }
.collection-motes i:nth-child(4) { left: 67%; animation-delay: -9s; animation-duration: 14s; }
.collection-motes i:nth-child(5) { left: 82%; animation-delay: -1s; animation-duration: 11s; }
.collection-motes i:nth-child(6) { left: 93%; animation-delay: -6s; animation-duration: 12s; }

.collection-intro {
  position: absolute;
  z-index: 8;
  top: calc(var(--header-h) + clamp(70px, 10vh, 104px));
  left: clamp(42px, 5.3vw, 92px);
  width: min(31vw, 455px);
  text-shadow: 0 3px 23px rgba(0, 0, 0, .58);
}
.collection-intro h2 {
  margin: 0;
  font-size: clamp(42px, 4.1vw, 70px);
  font-weight: 470;
  line-height: .98;
  letter-spacing: -.055em;
}
.collection-intro h2 strong {
  display: block;
  margin-top: 7px;
  color: var(--sun);
  font-weight: 720;
}
.collection-intro > p:last-of-type {
  max-width: 440px;
  margin: 26px 0 0;
  color: rgba(255, 255, 239, .82);
  font-size: clamp(13px, 1vw, 17px);
  font-weight: 570;
  line-height: 1.65;
}
.collection-view {
  display: flex;
  align-items: center;
  gap: 27px;
  margin-top: 34px;
}
.collection-view button {
  position: relative;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  color: rgba(255, 255, 239, .66);
  background: transparent;
  font-size: clamp(12px, .85vw, 15px);
  font-weight: 760;
  letter-spacing: .04em;
  cursor: pointer;
}
.collection-view button b {
  margin-left: 7px;
  color: var(--sun);
  font-size: .84em;
  font-variant-numeric: tabular-nums;
}
.collection-view button::after {
  position: absolute;
  right: 50%;
  bottom: 3px;
  left: 50%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #45e89b, var(--sun));
  box-shadow: 0 0 10px rgba(107, 255, 178, .72);
  content: "";
  transition: left .25s ease, right .25s ease;
}
.collection-view button:hover,
.collection-view button:focus-visible,
.collection-view button.is-active { color: #fffef4; outline: none; }
.collection-view button.is-active::after { right: 0; left: 0; }

.collection-showcase {
  position: absolute;
  z-index: 7;
  top: calc(var(--header-h) + 42px);
  right: clamp(34px, 4.2vw, 74px);
  bottom: 22px;
  width: min(64vw, 970px);
}
.collection-hero {
  position: absolute;
  z-index: 6;
  top: 1%;
  left: 3%;
  width: clamp(220px, 18vw, 290px);
  height: 57%;
  display: grid;
  place-items: center;
}
.collection-aura {
  position: absolute;
  inset: 3% -19% -3%;
  border: 1px solid rgba(255, 229, 138, .28);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 233, 149, .26), rgba(92, 235, 149, .09) 46%, transparent 71%);
  box-shadow: inset 0 0 70px rgba(255, 230, 129, .07), 0 0 90px rgba(255, 218, 86, .08);
  animation: collection-aura 4s ease-in-out infinite;
}
.collection-aura i {
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(255, 230, 141, .21);
  border-radius: 50%;
}
.collection-aura i:nth-child(2) { inset: 23%; }
.collection-aura i:nth-child(3) { inset: 36%; }

.collection-card {
  position: relative;
  display: block;
  flex: none;
  aspect-ratio: 760 / 1129;
  container-type: size;
}
.collection-card__body { position: absolute; inset: 0; }
.collection-card__paint {
  position: absolute;
  z-index: 0;
  top: 5.8%;
  left: 6%;
  width: 88.6%;
  height: 56.1%;
  overflow: hidden;
  background: #20392b;
}
.collection-card__paint img { width: 100%; height: 100%; object-fit: cover; }
.collection-card__frame { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; }
.collection-card__cost,
.collection-card__stat {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -50%);
  color: white;
  font-size: max(10px, 13.5cqw);
  font-weight: 850;
  line-height: 1;
  -webkit-text-stroke: 1.5px #14241a;
  paint-order: stroke fill;
  text-shadow: 0 2px 3px rgba(0, 0, 0, .6);
}
.collection-card__cost { top: 8.2%; left: 12.1%; }
.collection-card__stat { top: 91.7%; }
.collection-card__stat--attack { left: 12.4%; }
.collection-card__stat--health { left: 88.1%; }
.collection-card__copy {
  position: absolute;
  z-index: 4;
  top: 65%;
  left: 9%;
  width: 82%;
  height: 18.5%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #14372b;
  text-align: center;
}
.collection-card__copy strong { font-size: max(7px, 5.2cqw); line-height: 1.05; }
.collection-card__copy small { display: block; margin-top: 4px; font-size: max(5px, 3.45cqw); line-height: 1.08; }
.collection-card--hero {
  z-index: 2;
  width: min(100%, 272px);
  filter: drop-shadow(0 28px 24px rgba(0, 0, 0, .46)) drop-shadow(0 0 24px rgba(255, 226, 119, .2));
  transform: rotate(-1.5deg);
}
.collection-card--hero.is-changing { animation: collection-card-reveal .78s cubic-bezier(.2, .82, .2, 1) both; }

.collection-detail {
  position: absolute;
  z-index: 8;
  top: 8%;
  right: 0;
  width: min(47%, 430px);
  min-height: 315px;
  padding: clamp(28px, 2.1vw, 38px);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 30px;
  color: #0a3d2e;
  background: linear-gradient(145deg, rgba(255, 255, 248, .95), rgba(235, 246, 223, .86));
  box-shadow: 0 22px 55px rgba(4, 35, 23, .28), inset 0 1px rgba(255, 255, 255, .95);
  backdrop-filter: blur(18px);
}
.collection-detail::before {
  position: absolute;
  top: 30px;
  bottom: 30px;
  left: 0;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold), #45bd77, transparent);
  content: "";
}
.collection-detail__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9f6710;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.collection-detail > p:nth-of-type(1) {
  margin: 21px 0 0;
  color: #2c785b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.collection-detail h3 {
  margin: 8px 0 0;
  font-size: clamp(30px, 2.7vw, 46px);
  font-weight: 740;
  line-height: .96;
  letter-spacing: -.055em;
}
.collection-detail__rule {
  min-height: 52px;
  margin: 19px 0 0;
  color: #4a6659;
  font-size: clamp(12px, .92vw, 15px);
  font-weight: 560;
  line-height: 1.48;
}
.collection-keywords { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.collection-keywords span {
  padding: 7px 11px;
  border: 1px solid rgba(19, 112, 75, .21);
  border-radius: 999px;
  color: #116646;
  background: rgba(53, 190, 126, .09);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.collection-owned {
  position: absolute;
  right: clamp(28px, 2.1vw, 38px);
  bottom: 22px;
  left: clamp(28px, 2.1vw, 38px);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 15px;
  color: #9f6710;
  font-size: 9px;
  font-weight: 820;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.collection-owned i {
  display: block;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(12, 79, 57, .14);
}
.collection-owned i::after {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #1db86a, var(--gold));
  transform: scaleX(var(--collection-progress, .2));
  transform-origin: left;
  transition: transform .55s ease;
  content: "";
}

.collection-shelf {
  position: absolute;
  z-index: 14;
  right: 0;
  bottom: 8px;
  left: 0;
  height: clamp(145px, 19vh, 182px);
  display: flex;
  align-items: end;
  justify-content: center;
  gap: clamp(10px, 1.25vw, 20px);
  padding: 12px 20px 0;
}
.collection-shelf::before {
  position: absolute;
  right: 3%;
  bottom: 7px;
  left: 3%;
  height: 18px;
  border: 1px solid rgba(255, 228, 133, .45);
  border-top: 0;
  border-radius: 0 0 50% 50%;
  background: linear-gradient(180deg, rgba(15, 87, 57, .1), rgba(4, 37, 26, .72));
  box-shadow: 0 18px 30px rgba(0, 0, 0, .35);
  content: "";
}
.collection-tile {
  position: relative;
  z-index: 2;
  width: clamp(78px, 6.1vw, 104px);
  height: 100%;
  display: grid;
  align-content: end;
  justify-items: center;
  padding: 0;
  border: 0;
  color: rgba(255, 255, 240, .72);
  background: transparent;
  cursor: pointer;
  transform-origin: 50% 100%;
  transition: transform .4s cubic-bezier(.2, .82, .2, 1), filter .3s ease, opacity .3s ease;
}
.collection-tile[hidden] { display: none; }
.collection-tile:nth-child(1) { transform: translateY(10px) rotate(-7deg); }
.collection-tile:nth-child(2) { transform: translateY(2px) rotate(-3deg); }
.collection-tile:nth-child(4) { transform: translateY(2px) rotate(3deg); }
.collection-tile:nth-child(5) { transform: translateY(10px) rotate(7deg); }
.collection-card--tile {
  width: 100%;
  filter: drop-shadow(0 10px 9px rgba(0, 0, 0, .45));
}
/* The tile's name is written onto the Card's own nameplate (see script.js),
   the way the large Card carries it, so this caption under the Card would say
   the same thing twice. It stays in the markup because it is where the name
   comes from. */
.collection-tile small {
  display: none;
  width: 132%;
  min-height: 23px;
  margin-top: 3px;
  color: inherit;
  font-size: clamp(6px, .53vw, 9px);
  font-weight: 760;
  line-height: 1.18;
  letter-spacing: .045em;
  text-align: center;
  text-shadow: 0 2px 7px rgba(0, 0, 0, .95);
  text-transform: uppercase;
}
.collection-tile em {
  position: absolute;
  top: 38%;
  left: 50%;
  z-index: 8;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 240, .65);
  border-radius: 999px;
  color: #153a2d;
  background: rgba(255, 255, 246, .9);
  font-size: 7px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
}
.collection-tile[data-owned="false"] .collection-card { filter: saturate(.25) brightness(.7) drop-shadow(0 10px 9px rgba(0, 0, 0, .45)); }
.collection-tile:hover,
.collection-tile:focus-visible,
.collection-tile.is-active {
  z-index: 4;
  color: var(--sun);
  outline: none;
  filter: brightness(1.08) drop-shadow(0 0 16px rgba(112, 255, 164, .38));
  transform: translateY(-17px) rotate(0) scale(1.09);
}
.collection-tile.is-active .collection-card--tile {
  filter: drop-shadow(0 0 7px #fff6be) drop-shadow(0 0 18px rgba(67, 238, 138, .7)) drop-shadow(0 14px 12px rgba(0, 0, 0, .42));
}

.collection-playback {
  position: absolute;
  z-index: 18;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: rgba(255, 255, 255, .16);
}
.collection-playback span {
  display: block;
  width: 20%;
  height: 100%;
  background: linear-gradient(90deg, #27c86f, #ffe176);
  box-shadow: 0 0 14px #dfff8c;
  transition: width .55s ease;
}

@keyframes collection-camera { from { transform: scale(1.035) translateX(-.3%); } to { transform: scale(1.075) translateX(.4%); } }
@keyframes collection-light { 50% { opacity: .72; transform: scale(1.04); } }
@keyframes collection-leaf { from { transform: translate3d(0, 0, 0) rotate(0); } to { transform: translate3d(78px, -118vh, 0) rotate(540deg); } }
@keyframes collection-aura { 50% { opacity: .62; transform: scale(1.035); } }
@keyframes collection-card-reveal {
  0% { opacity: .28; transform: translateY(38px) rotate(7deg) scale(.84); filter: brightness(1.7) drop-shadow(0 0 35px #fff3ad); }
  62% { opacity: 1; transform: translateY(-7px) rotate(-2deg) scale(1.025); }
  100% { transform: rotate(-1.5deg); }
}

@media (max-width: 1180px) {
  .collection-intro { left: 36px; width: 30vw; }
  .collection-intro h2 { font-size: clamp(37px, 4.5vw, 54px); }
  .collection-intro > p:last-of-type { font-size: 12px; }
  .collection-showcase { right: 24px; width: 66vw; }
  .collection-hero { left: 0; width: 23vw; }
  .collection-detail { width: 50%; padding: 27px; }
  .collection-detail h3 { font-size: 32px; }
  .collection-owned { right: 27px; left: 27px; }
}

@media (max-width: 860px) {
  .collection-scene { min-height: 820px; height: 100svh; }
  .collection-world { background-position: 61% center; }
  .collection-world::after { background: linear-gradient(180deg, rgba(2, 30, 21, .8), rgba(3, 36, 25, .3) 55%, rgba(2, 28, 20, .92)); }
  .collection-intro { top: calc(var(--header-h) + 20px); left: 20px; width: calc(100% - 40px); }
  .collection-intro .eyebrow { margin-bottom: 10px; font-size: 8px; }
  .collection-intro h2 { font-size: clamp(31px, 9vw, 43px); line-height: 1; }
  .collection-intro > p:last-of-type { width: 95%; margin-top: 12px; font-size: 10px; line-height: 1.45; }
  .collection-view { gap: 20px; margin-top: 12px; }
  .collection-view button { min-height: 34px; font-size: 10px; }
  .collection-showcase { top: calc(var(--header-h) + 270px); right: 10px; bottom: 6px; width: calc(100% - 20px); }
  .collection-hero { top: 0; left: 3%; width: min(39vw, 185px); height: 55%; }
  .collection-card--hero { width: 100%; }
  .collection-detail { top: 4%; right: 0; width: 55%; min-height: 245px; padding: 19px; border-radius: 20px; }
  .collection-detail::before { top: 18px; bottom: 18px; }
  .collection-detail__topline { font-size: 7px; }
  .collection-detail > p:nth-of-type(1) { margin-top: 13px; font-size: 7px; }
  .collection-detail h3 { margin-top: 5px; font-size: clamp(23px, 7.2vw, 31px); }
  .collection-detail__rule { min-height: 43px; margin-top: 11px; font-size: 9px; line-height: 1.35; }
  .collection-keywords { gap: 5px; margin-top: 8px; }
  .collection-keywords span { padding: 5px 7px; font-size: 6px; }
  .collection-owned { right: 19px; bottom: 14px; left: 19px; gap: 8px; font-size: 6px; }
  .collection-shelf { bottom: 2px; height: 128px; gap: 7px; padding-inline: 3px; }
  .collection-tile { width: min(16vw, 67px); }
  .collection-tile small { width: 120%; font-size: 5px; }
  .collection-tile:hover, .collection-tile:focus-visible, .collection-tile.is-active { transform: translateY(-9px) rotate(0) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .collection-world,
  .collection-light,
  .collection-motes i,
  .collection-aura,
  .collection-card--hero.is-changing { animation: none; }
}

/* Journey gallery: full-height paintings with quiet, overlaid captions. */
@media (min-width: 861px) {
  .journey-layout { grid-template-columns: minmax(270px, .65fr) minmax(0, 1.8fr); gap: clamp(24px, 3vw, 50px); top: calc(var(--header-h) + 28px); bottom: 48px; }
  .journey-intro h2 { font-size: clamp(36px, 3.25vw, 58px); }
  .journey-proofs { height: 100%; max-height: 760px; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 18px; }
}
.journey-proof,
.journey-proof.is-complete { display: block; height: 100%; color: #fffdf0; background: #103c2a; border: 1px solid rgba(255,239,184,.35); border-radius: 22px; transform: none; box-shadow: 0 14px 32px #001d2060; }
.journey-proof__art { position: absolute; inset: 0; }
.journey-proof__art img { object-position: center 32%; transform: scale(1); filter: saturate(.8) brightness(.85); }
.journey-proof__art::after { z-index: 1; background: linear-gradient(180deg, rgba(0,24,16,.16), transparent 32%, rgba(2,25,17,.15) 48%, rgba(2,25,17,.94) 100%); }
.journey-proof__text { position: absolute; z-index: 2; inset: auto 0 0; min-height: 0; padding: 22px 18px; display: flex; flex-direction: column; gap: 7px; text-shadow: 0 2px 10px #001b13; }
.journey-proof__text small,
.journey-proof.is-complete .journey-proof__text small { color: #f6e4ae; font-size: 9px; }
.journey-proof__text strong { align-self: flex-start; font-size: clamp(15px, 1.25vw, 22px); line-height: 1.18; max-width: 100%; }
.journey-proof__text em,
.journey-proof.is-complete .journey-proof__text em { position: static; order: -1; color: #ffe588; font-size: clamp(27px, 2.6vw, 43px); font-weight: 650; line-height: 1; margin-bottom: 5px; }
.journey-proof__seal { width: 25px; height: 25px; top: 14px; right: 14px; font-size: 13px; box-shadow: 0 0 14px #a6ed9440; }
.journey-proof.is-complete .journey-proof__art img { filter: saturate(1.08) brightness(1.02); transform: scale(1.015); }
.journey-proof:hover,
.journey-proof:focus-visible { transform: translateY(-5px); border-color: #ffe588; box-shadow: 0 18px 45px #00190f99, 0 0 24px #ffe58830; outline: 2px solid transparent; }
.journey-proof:hover .journey-proof__art img,
.journey-proof:focus-visible .journey-proof__art img { transform: scale(1.09); filter: saturate(1.15) brightness(1.1); }
.journey-proof:active { transform: translateY(-1px) scale(.98); }
@media (max-width: 860px) {
  .journey-scene { height: auto; min-height: 1200px; }
  .journey-layout { bottom: 35px; }
  .journey-proofs { top: 260px; bottom: 0; gap: 12px; grid-template-rows: repeat(3, minmax(0, 1fr)); }
  .journey-proof { border-radius: 17px; }
  .journey-proof__text { padding: 15px 12px; gap: 6px; }
  .journey-proof__text strong { font-size: 14px; }
  .journey-proof__text small { font-size: 8px; }
  .journey-proof__text em { font-size: 28px; }
  .journey-proof__seal { top: 10px; right: 10px; }
}

/* DUELS — a meeting in the current game's forest arena. */
.duels-scene { background: #062d20; }
.duels-world { position: absolute; inset: 0; background: url('dist/assets/scenes/arena-forest.webp?v=962acb9c52') center / cover; transform: scale(1.025); }
.duels-world::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg,#03271deb, #042f2030 45%,#03271de8),linear-gradient(90deg,#042c2150,transparent 30% 70%,#042c2150); }
.duels-aura { position: absolute; inset: 16% 10% 5%; background: radial-gradient(ellipse,#e9e59365, #68cd7e20 45%,transparent 70%); animation: duels-glow 6s ease-in-out infinite; pointer-events: none; }
.duels-heading { position: absolute; z-index: 5; top: calc(var(--header-h) + 25px); left: 6.2%; }
.duels-heading .eyebrow { font-size: 11px; margin-bottom: 12px; }
.duels-heading h2 { margin: 0; font-size: clamp(27px,2.7vw,46px); font-weight: 450; line-height: 1.12; letter-spacing: -.05em; text-shadow: 0 4px 22px #001d16; }
.duels-heading h2 strong { color: var(--sun); font-weight: 740; }
.duels-stage { position: absolute; inset: calc(var(--header-h) + 135px) 3% 145px; }
.duels-fighter { position: absolute; z-index: 2; margin: 0; bottom: 0; width: 37%; height: 100%; }
.duels-fighter--self { left: 0; }
.duels-fighter--opponent { right: 0; }
.duels-fighter > img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 0 25px #bfef8250); mask-image: linear-gradient(#000 80%, transparent 100%); animation: duels-breathe 6s ease-in-out infinite; transform-origin: bottom center; }
.duels-fighter--opponent > img { animation-delay: -3s; }
.duels-fighter figcaption { position: absolute; z-index: 4; bottom: 2%; left: 15%; right: 15%; text-align: center; text-shadow: 0 3px 12px #001e14, 0 0 25px #001e14; }
.duels-fighter figcaption strong { display: block; font-size: clamp(23px,2.4vw,38px); letter-spacing: -.04em; }
.duels-fighter figcaption span { display: block; margin-top: 5px; font-size: 10px; color: #f6e6af; }
.duels-meeting { position: absolute; z-index: 4; top: 0; bottom: 0; left: 34%; width: 32%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.duels-sigil { position: relative; width: clamp(70px,7vw,115px); aspect-ratio: 1; display: grid; place-items: center; }
.duels-sigil img { width: 70%; filter: drop-shadow(0 0 20px #ffdd74aa); }
.duels-sigil i { position: absolute; inset: 0; border: 1px solid #ffecaf70; border-radius: 50%; box-shadow: 0 0 35px #ffe78625,inset 0 0 30px #ffe78625; }
.duels-versus { margin: 18px 0; font-size: clamp(22px,2.6vw,40px); font-weight: 720; white-space: nowrap; letter-spacing: -.05em; text-shadow: 0 2px 20px #003c20; }
.duels-versus span { color: var(--sun); font-size: .53em; font-weight: 450; vertical-align: middle; }
.duels-glass { width: 100%; max-width: 385px; padding: 23px 25px 12px; color: #123e2e; border: 1px solid #fff9dcaa; border-radius: 24px; background: linear-gradient(135deg,#fffff1ed,#e5f1d7df); box-shadow: 0 15px 60px #001f2350; backdrop-filter: blur(15px); text-align: center; }
.duels-glass > p { font-size: 12px; line-height: 1.6; margin: 0 0 12px; }
.duels-glass > strong { display: block; font-size: 16px; line-height: 1.4; letter-spacing: -.025em; }
.duels-glass > span { display: block; margin-top: 14px; font-size: 10px; line-height: 1.6; color: #41604d; }
.duels-enter { width: 100%; max-width: 270px; height: 67px; margin: 12px auto 0; }
.duels-enter > span { font-size: 13px; }
.duels-roster { position: absolute; z-index: 8; bottom: 34px; left: 50%; transform: translateX(-50%); display: flex; justify-content: center; gap: 18px; }
.duels-roster button { position: relative; width: 86px; height: 94px; padding: 0; border: 0; color: #fffbee; background: none; cursor: pointer; transition: transform .3s,filter .3s; }
.duels-roster img { width: 70px; height: 70px; margin: 0 auto 8px; object-fit: cover; object-position: center 15%; border-radius: 50%; border: 2px solid #f5e5b360; background: #164f36; transition: border-color .3s,box-shadow .3s; }
.duels-roster span { font-size: 11px; }
.duels-roster button:hover,.duels-roster button:focus-visible,.duels-roster button.is-active { transform: translateY(-7px); color: var(--sun); outline: none; }
.duels-roster button:is(:hover,:focus-visible,.is-active) img { border-color: var(--sun); box-shadow: 0 0 20px #ffe37b65; }
.duels-roster button:active { transform: translateY(-3px) scale(.95); }
.duels-fighter.is-arriving > img { animation: duels-arrive .7s cubic-bezier(.2,.7,.2,1) both; }
@keyframes duels-breathe { 50% { transform: translateY(-6px) scale(1.018); } }
@keyframes duels-glow { 50% { opacity: .5; transform: scale(1.04); } }
@keyframes duels-arrive { from { opacity: 0; transform: translateX(24px) scale(.96); filter: brightness(1.5) drop-shadow(0 0 40px #ffe37b); } to { opacity: 1; transform: none; } }
@media (max-width: 860px) {
  .duels-scene { height: 100svh; min-height: 844px; }
  .duels-heading { top: calc(var(--header-h) + 22px); left: 22px; right: 20px; }
  .duels-heading .eyebrow { font-size: 8px; }
  .duels-heading h2 { font-size: clamp(25px,6.8vw,37px); }
  .duels-stage { inset: calc(var(--header-h) + 140px) 0 130px; }
  .duels-fighter { top: 0; bottom: auto; height: 49%; width: 57%; }
  .duels-fighter--self { left: -4%; }
  .duels-fighter--opponent { right: -4%; }
  .duels-fighter figcaption { bottom: -6px; }
  .duels-fighter figcaption strong { font-size: 22px; }
  .duels-fighter figcaption span { font-size: 8px; }
  .duels-meeting { top: 53%; bottom: auto; left: 8%; width: 84%; }
  .duels-sigil { display: none; }
  .duels-versus { margin: 0 0 14px; font-size: 25px; }
  .duels-glass { padding: 15px 20px 8px; }
  .duels-glass > p { font-size: 10px; margin-bottom: 8px; }
  .duels-glass > strong { font-size: 14px; }
  .duels-glass > span { font-size: 9px; margin-top: 9px; }
  .duels-enter { height: 58px; margin-top: 8px; }
  .duels-roster { bottom: 27px; width: 100%; gap: 4px; padding: 0 10px; }
  .duels-roster button { width: 18%; max-width: 78px; height: 78px; }
  .duels-roster img { width: 54px; height: 54px; margin-bottom: 6px; }
  .duels-roster span { font-size: 10px; }
  .duels-scene .scene-index { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .duels-fighter > img,.duels-aura,.duels-fighter.is-arriving > img { animation: none; }
}
@media (min-width: 861px) and (max-height: 780px) {
  .duels-sigil { width: 65px; }
  .duels-versus { margin: 12px 0; font-size: 29px; }
  .duels-glass { padding: 16px 22px 8px; }
  .duels-glass > p { margin-bottom: 8px; font-size: 11px; }
  .duels-glass > strong { font-size: 14px; }
  .duels-glass > span { margin-top: 10px; font-size: 9px; }
  .duels-enter { height: 58px; margin-top: 8px; }
}

/* The Duels lesson stays on the site; each action explains the next part. */
.duels-meeting { left: 30%; width: 40%; }
.duels-sigil { display: none; }
.duels-versus { font-size: 28px; margin: 0 0 14px; }
.duels-explainer { max-width: 460px; padding: 23px; text-align: left; }
.duels-explainer .duels-definition { font-size: 17px; line-height: 1.35; font-weight: 720; margin: 0 0 18px; }
.duels-steps { display: flex; gap: 7px; }
.duels-steps button { flex: 1; padding: 10px 5px; border: 1px solid #37725130; border-radius: 12px; color: #3b604d; background: #ffffff60; cursor: pointer; font-size: 11px; font-weight: 700; transition: background .25s,transform .25s; }
.duels-steps small { display: block; font-size: 9px; margin-bottom: 3px; opacity: .7; }
.duels-steps button[aria-pressed="true"] { color: #fff6cc; background: #126442; box-shadow: 0 4px 12px #16462b30; }
.duels-steps button:hover,.duels-steps button:focus-visible { transform: translateY(-2px); outline: 2px solid #b79b42; }
.duels-lesson { min-height: 264px; }
.duels-lesson h3 { margin: 12px 0 8px; font-size: 21px; line-height: 1.2; letter-spacing: -.04em; }
.duels-lesson p { margin: 0; font-size: 13px; line-height: 1.55; }
.duels-lesson .duels-lesson-note { margin-top: 10px; font-size: 11px; line-height: 1.5; color: #3d604c; }
.duels-demo { position: relative; height: auto; display: grid; grid-template-rows: 80px auto; row-gap: 8px; place-items: center; padding-bottom: 0; margin-top: 10px; }
.duels-demo > small { position: static; line-height: 1.4; font-size: 8px; font-weight: 750; letter-spacing: .08em; text-align: center; }
.duels-saved-deck { position: relative; width: 160px; height: 74px; }
.duels-saved-deck img { position: absolute; left: 53px; height: 70px; width: 49px; object-fit: contain; filter: drop-shadow(0 4px 4px #0f3d3140); transition: transform .6s; }
.duels-saved-deck img:first-child { transform: translateX(-28px) rotate(-12deg); }
.duels-saved-deck img:last-child { transform: translateX(28px) rotate(12deg); }
.duels-demo[data-duels-demo="1"] img:first-child { transform: translateX(-55px) translateY(-5px) rotate(-5deg); }
.duels-demo[data-duels-demo="1"] img:nth-child(2) { transform: translateY(2px); }
.duels-demo[data-duels-demo="1"] img:last-child { transform: translateX(55px) translateY(-5px) rotate(5deg); }
.duels-rank-demo { display: none; gap: 20px; }
.duels-rank-demo span { font-size: 11px; text-align: center; }
.duels-rank-demo b { display: block; font-size: 35px; color: #136544; }
.duels-demo[data-duels-demo="2"] .duels-saved-deck { display: none; }
.duels-demo[data-duels-demo="2"] .duels-rank-demo { display: flex; }
.duels-next { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 43px; margin-top: 12px; padding: 10px 12px; border: 0; border-radius: 10px; background: #135e3f; color: #fff7d6; font-size: 11px; font-weight: 650; cursor: pointer; transition: background .2s,transform .2s; }
.duels-next:hover,.duels-next:focus-visible { background: #247c50; outline: 2px solid #c1a754; }
.duels-next:active { transform: scale(.98); }
@media (min-width:861px) and (max-height:780px) {
  .duels-versus { display: none; }
  .duels-explainer { padding: 17px 20px; }
  .duels-explainer .duels-definition { margin-bottom: 10px; font-size: 15px; }
  .duels-demo { grid-template-rows: 52px auto; }
  .duels-saved-deck { transform: scale(.7); }
  .duels-lesson { min-height: 232px; }
  .duels-lesson h3 { font-size: 18px; }
  .duels-lesson p { font-size: 12px; }
}
@media (max-width:860px) {
  .duels-scene { min-height: 1180px; }
  .duels-stage { bottom: 130px; }
  .duels-fighter { height: 33%; }
  .duels-fighter figcaption strong { font-size: 19px; }
  .duels-meeting { top: 37%; left: 6%; width: 88%; }
  .duels-versus { font-size: 22px; margin-bottom: 10px; }
  .duels-explainer { padding: 18px; }
  .duels-explainer .duels-definition { font-size: 16px; margin-bottom: 12px; }
  .duels-lesson { min-height: 260px; }
  .duels-lesson h3 { font-size: 20px; }
  .duels-lesson p { font-size: 12px; }
  .duels-lesson .duels-lesson-note { font-size: 11px; }
  .duels-demo { grid-template-rows: 66px auto; }
  .duels-saved-deck { transform: scale(.8); }
}
@media (min-width:861px) and (max-height:780px) {
  .duels-lesson { min-height: 190px; }
  .duels-demo { grid-template-rows: 46px auto; row-gap: 7px; margin-top: 6px; }
  .duels-saved-deck { transform: scale(.55); }
  .duels-lesson h3 { margin: 8px 0 6px; }
  .duels-lesson p { line-height: 1.4; }
  .duels-lesson .duels-lesson-note { font-size: 10px; margin-top: 8px; }
  .duels-next { min-height: 38px; margin-top: 8px; }
  .duels-rank-demo b { font-size: 27px; }
}

/* TROVE — the Forest's paintings, stories and collection rules. */
.trove-scene { background: #062d20; }
.trove-world { position: absolute; inset: 0; background: linear-gradient(90deg,#02291cee 0%,#03291caa 40%,#042d2044),url('dist/assets/scenes/bg-journey-living-archive.webp?v=962acb9c52') center / cover; }
.trove-light { position: absolute; inset: 0; background: radial-gradient(ellipse at 72% 42%,#fff1a43a,transparent 55%); animation: duels-glow 8s ease-in-out infinite; pointer-events: none; }
.trove-intro { position: absolute; z-index: 4; top: calc(var(--header-h) + 38px); bottom: 55px; left: 6.2%; width: 33%; display: flex; flex-direction: column; justify-content: center; }
.trove-intro .eyebrow { font-size: 10px; }
.trove-intro h2 { margin: 0; font-size: clamp(38px,3.8vw,62px); font-weight: 450; line-height: 1.04; letter-spacing: -.055em; }
.trove-intro h2 strong { font-weight: 740; color: var(--sun); }
.trove-definition { max-width: 420px; margin: 20px 0; font-size: 14px; line-height: 1.6; color: #fffae3d9; }
.trove-filters { display: flex; gap: 12px; margin-bottom: 25px; }
.trove-filters button { padding: 11px 15px; border: 1px solid #ffedb35c; border-radius: 30px; color: #fff6d8; background: #ffffff0b; font-size: 12px; font-weight: 650; cursor: pointer; transition: background .3s,transform .3s; }
.trove-filters b { margin-left: 9px; font-size: 10px; opacity: .65; }
.trove-filters button[aria-pressed="true"] { color: #174b33; background: #fff4c9; box-shadow: 0 0 24px #ffe58425; }
.trove-filters button:hover,.trove-filters button:focus-visible { transform: translateY(-3px); outline: 2px solid #efce75; }
.trove-guide { border: 1px solid #fff5d386; padding: 23px; border-radius: 23px; color: #123f2b; background: linear-gradient(145deg,#ffffeeed,#e2efd7e8); box-shadow: 0 15px 40px #00180f40; backdrop-filter: blur(12px); }
.trove-guide-tabs { display: flex; gap: 8px; }
.trove-guide-tabs button { flex: 1; border: 1px solid #35794e25; border-radius: 11px; padding: 9px 4px; background: #fffef080; color: #305e43; font-size: 11px; font-weight: 650; cursor: pointer; transition: transform .25s,background .25s; }
.trove-guide-tabs small { display: block; margin-bottom: 4px; font-size: 8px; }
.trove-guide-tabs button[aria-pressed="true"] { background: #176342; color: #fff5cc; }
.trove-guide-tabs button:hover,.trove-guide-tabs button:focus-visible { transform: translateY(-2px); outline: 2px solid #b89e49; }
.trove-guide-copy { min-height: 145px; padding-top: 18px; }
.trove-guide-copy h3 { margin: 0 0 10px; font-size: 22px; line-height: 1.2; letter-spacing: -.04em; }
.trove-guide-copy p { margin: 0; font-size: 13px; line-height: 1.55; }
.trove-meaning { display: flex; align-items: center; gap: 12px; border-top: 1px solid #32724a30; padding-top: 12px; margin-top: 6px; min-height: 46px; font-size: 11px; font-weight: 600; line-height: 1.5; }
.trove-meaning img { width: 30px; height: 34px; object-fit: contain; filter: drop-shadow(0 0 6px #d7a34560); }
.trove-journey-link { display: flex; gap: 12px; justify-content: space-between; margin-top: 20px; font-size: 11px; line-height: 1.5; text-decoration: none; color: #ffeab0; }
.trove-journey-link:hover,.trove-journey-link:focus-visible { color: white; text-decoration: underline; }
.trove-gallery { position: absolute; z-index: 3; top: calc(var(--header-h) + 35px); bottom: 65px; right: 4%; width: 52%; display: grid; grid-template-rows: minmax(0,1fr) 78px; gap: 18px; }
.trove-painting { position: relative; min-height: 0; overflow: hidden; border: 1px solid #ffecc080; border-radius: 26px; box-shadow: 0 25px 80px #001c1590,0 0 45px #dfc16a15; background: #123e2b; }
.trove-main-art { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.trove-painting::after { position: absolute; inset: 0; content: ''; background: linear-gradient(transparent 25%,#042f1d10 45%,#02291de8 100%); pointer-events: none; }
.trove-caption { position: absolute; z-index: 2; bottom: 62px; left: 30px; right: 25px; text-shadow: 0 2px 14px #002915; }
.trove-caption small { color: #ffeaad; text-transform: uppercase; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.trove-caption h3 { margin: 9px 0 10px; font-size: clamp(27px,2.8vw,46px); line-height: 1.08; font-weight: 650; letter-spacing: -.04em; }
.trove-caption p { margin: 0; font-size: 12px; line-height: 1.5; color: #fff5d6; }
.trove-story-toggle { position: absolute; z-index: 5; left: 30px; bottom: 19px; border: 0; border-bottom: 1px solid #ffe8a080; padding: 4px 0 6px; background: none; color: #ffe8a0; font-size: 12px; font-weight: 650; cursor: pointer; }
.trove-story-toggle:hover,.trove-story-toggle:focus-visible { color: white; outline: 2px solid #fff4c8; outline-offset: 5px; }
.trove-story-toggle:disabled { cursor: default; opacity: .8; border-bottom: 0; }
.trove-story { position: absolute; z-index: 4; inset: auto 18px 58px; padding: 26px; border: 1px solid #ffffe3b0; border-radius: 19px; background: #fff9e6f2; box-shadow: 0 8px 35px #002c2150; color: #184830; backdrop-filter: blur(15px); }
.trove-story p { margin: 0; font-size: 15px; line-height: 1.7; }
.trove-shelf { display: flex; gap: 9px; padding: 5px 3px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #e6ce8a #113b29; }
.trove-shelf button { position: relative; flex: 1 0 55px; max-width: 110px; min-width: 0; padding: 0; border: 1px solid #fff0bf65; border-radius: 11px; overflow: hidden; background: #114d2d; cursor: pointer; transition: transform .3s,border-color .3s,box-shadow .3s; }
.trove-shelf img { width: 100%; height: 100%; object-fit: cover; }
.trove-shelf button:hover,.trove-shelf button:focus-visible,.trove-shelf button[aria-pressed="true"] { transform: translateY(-3px); border-color: #ffe580; box-shadow: 0 0 14px #ffe58060; outline: 1px solid #ffe580; }
.trove-painting.is-changing .trove-main-art { animation: trove-reveal .8s ease both; }
.trove-art-shimmer { position: absolute; z-index: 1; inset: 0; background: linear-gradient(110deg,transparent 25%,#fff6c320 45%,transparent 65%); pointer-events: none; animation: trove-shimmer 9s ease-in-out infinite; }
@keyframes trove-reveal { from { opacity: .3; transform: scale(1.06); } to { opacity: 1; transform: scale(1); } }
@keyframes trove-shimmer { from { transform: translateX(-100%); } 50%,to { transform: translateX(100%); } }
@media (min-width:861px) and (max-height:780px) {
  .trove-intro { top: calc(var(--header-h) + 20px); bottom: 35px; }
  .trove-intro h2 { font-size: 39px; }
  .trove-definition { font-size: 12px; margin: 12px 0; }
  .trove-filters { margin-bottom: 14px; }
  .trove-guide { padding: 17px; }
  .trove-guide-copy { min-height: 130px; padding-top: 13px; }
  .trove-guide-copy h3 { font-size: 20px; }
  .trove-guide-copy p { font-size: 12px; }
  .trove-journey-link { margin-top: 13px; font-size: 10px; }
}
@media (max-width:860px) {
  .trove-scene { height: auto; min-height: 1350px; }
  .trove-intro { top: calc(var(--header-h) + 24px); bottom: auto; left: 22px; width: calc(100% - 44px); display: block; }
  .trove-intro h2 { font-size: 36px; }
  .trove-intro .eyebrow { font-size: 8px; margin-bottom: 14px; }
  .trove-definition { font-size: 12px; margin: 15px 0; }
  .trove-filters { gap: 8px; margin-bottom: 18px; }
  .trove-filters button { font-size: 11px; padding: 10px 14px; }
  .trove-guide { padding: 17px; }
  .trove-guide-copy { min-height: 142px; }
  .trove-guide-copy h3 { font-size: 21px; }
  .trove-guide-copy p { font-size: 12px; }
  .trove-meaning { font-size: 10px; }
  .trove-journey-link { font-size: 10px; margin-top: 15px; }
  .trove-gallery { top: 660px; left: 16px; right: 16px; bottom: 45px; width: auto; grid-template-rows: minmax(0,1fr) 69px; gap: 14px; }
  .trove-painting { border-radius: 22px; }
  .trove-caption { left: 22px; right: 22px; }
  .trove-caption h3 { font-size: 30px; }
  .trove-caption p { font-size: 11px; }
  .trove-story-toggle { left: 22px; font-size: 11px; }
  .trove-story { padding: 19px; }
  .trove-story p { font-size: 13px; line-height: 1.6; }
  .trove-shelf button { flex: 0 0 59px; }
  .trove-scene .scene-index { display: none; }
}
@media (prefers-reduced-motion:reduce) {
  .trove-light,.trove-art-shimmer,.trove-painting.is-changing .trove-main-art { animation: none; }
}

/* Preserve every pixel of the portrait Legends and square Treasures. */
.trove-painting { display: grid; grid-template-rows: minmax(0,1fr) auto auto; justify-items: center; overflow: visible; border: 0; border-radius: 0; background: none; box-shadow: none; }
.trove-main-art { width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 12px 30px #001c1590); }
.trove-painting::after,.trove-art-shimmer { display: none; }
.trove-caption { position: static; width: 100%; padding: 17px 10px 0; text-align: center; }
.trove-caption h3 { font-size: clamp(23px,2.1vw,34px); margin: 6px 0 8px; }
.trove-caption p { font-size: 11px; }
.trove-story-toggle { position: static; margin-top: 10px; margin-bottom: 0; width: max-content; max-width: 100%; }
.trove-story { inset: auto 20px 45px; max-height: 80%; overflow-y: auto; }
.trove-shelf { justify-content: center; }
.trove-shelf img { object-fit: contain; }
.trove-shelf button { background: #03291c70; border-color: #fff0bf30; }
@keyframes trove-reveal { from { opacity: .2; } to { opacity: 1; } }
@media (max-width:860px) {
  .trove-scene { min-height: 1410px; }
  .trove-caption { padding-top: 14px; }
  .trove-caption h3 { font-size: 25px; }
  .trove-shelf { justify-content: flex-start; }
  .trove-story { left: 0; right: 0; }
}

/* A transparent illustrated frame surrounds, rather than crops, square Treasures. */
.trove-art-space { width: 100%; height: 100%; min-height: 0; container-type: size; display: grid; place-items: end center; }
.trove-art-mount { position: relative; width: 100%; height: 100%; }
.trove-treasure-frame { display: none; pointer-events: none; }
.trove-painting[data-kind="Treasure"] .trove-art-mount { width: min(100cqw,100cqh); height: min(100cqw,100cqh); filter: drop-shadow(0 12px 24px #001e16a0); }
.trove-painting[data-kind="Treasure"] .trove-main-art { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; filter: none; }
.trove-painting[data-kind="Treasure"] .trove-treasure-frame { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 2; }

/* Intrinsic image dimensions must never expand the gallery's allocated art row. */
.trove-art-space { position: relative; height: auto; align-self: stretch; overflow: hidden; min-width: 0; }
.trove-art-mount { position: absolute; inset: auto 0 0; width: 100%; height: min(100%,480px); }
.trove-main-art { position: absolute; inset: 0; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
.trove-painting[data-kind="Treasure"] .trove-art-mount { inset: auto auto 0 50%; transform: translateX(-50%); width: min(100cqw,100cqh,420px); height: min(100cqw,100cqh,420px); }
@media (max-width:860px) {
  .trove-art-mount { height: min(100%,440px); }
  .trove-painting[data-kind="Treasure"] .trove-art-mount { width: min(100cqw,100cqh,340px); height: min(100cqw,100cqh,340px); }
}

/* STORE — explore the real products, currency and use rules without a purchase flow. */
.store-scene { background: #062e20; }
.store-world { position: absolute; inset: 0; background: linear-gradient(180deg,#032c219c,#032c2150 50%,#03291de8),url('dist/assets/scenes/bg-store-enchanted-glade.webp?v=962acb9c52') center / cover; }
.store-sunlight { position: absolute; inset: 0; background: radial-gradient(ellipse at 51% 48%,#ffe4a247,transparent 55%); animation: duels-glow 8s ease-in-out infinite; pointer-events: none; }
.store-heading { position: absolute; top: calc(var(--header-h) + 30px); left: 6.2%; z-index: 3; }
.store-heading .eyebrow { font-size: 10px; margin-bottom: 13px; }
.store-heading h2 { margin: 0; font-size: clamp(32px,3.2vw,53px); font-weight: 450; letter-spacing: -.05em; line-height: 1.04; text-shadow: 0 3px 20px #022d20; }
.store-heading h2 strong { font-weight: 740; color: var(--sun); }
.store-heading > p:last-child { margin: 14px 0 0; max-width: 520px; font-size: 12px; line-height: 1.5; color: #fff5d6da; }
.store-layout { position: absolute; z-index: 4; top: calc(var(--header-h) + 205px); left: 6.2%; right: 4%; bottom: 130px; display: grid; grid-template-columns: .85fr 1.12fr 1.05fr; gap: 30px; align-items: center; }
.store-categories { display: grid; gap: 11px; }
.store-categories button { display: flex; gap: 14px; align-items: center; width: 100%; padding: 19px 16px; border: 1px solid #fff1bf60; border-radius: 16px; color: #fff6d8; background: #063b2a70; backdrop-filter: blur(12px); text-align: left; cursor: pointer; transition: transform .3s,background .3s,box-shadow .3s; }
.store-categories button > small { align-self: start; margin-top: 4px; color: #f9de91; font-size: 9px; }
.store-categories button > span { font-size: 17px; font-weight: 680; }
.store-categories em { display: block; margin-top: 6px; font-size: 10px; font-style: normal; font-weight: 450; opacity: .75; }
.store-categories b { margin-left: auto; font-size: 18px; font-weight: 400; }
.store-categories button[aria-pressed="true"] { background: #fff5d7ed; color: #16422e; box-shadow: 0 6px 25px #09281d40; }
.store-categories button[aria-pressed="true"] > small { color: #947328; }
.store-categories button:hover,.store-categories button:focus-visible { transform: translateX(5px); outline: 2px solid #e9cb79; }
.store-categories button:active { transform: translateX(3px) scale(.98); }
.store-showcase { position: relative; height: 100%; min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) auto; }
.store-item-aura { position: absolute; inset: 0 -8% 15%; background: radial-gradient(ellipse,#fff3a94d,transparent 66%); pointer-events: none; }
.store-art-well { position: relative; min-height: 0; overflow: hidden; }
.store-art-well img { position: absolute; inset: 0; width: 100%; height: 100%; max-height: 370px; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 12px 25px #032a2080); }
.store-showcase.is-changing .store-art-well img { animation: trove-reveal .65s ease both; }
.store-item-caption { position: relative; padding-top: 16px; text-align: center; }
.store-item-caption > small { color: #ffe7a8; font-size: 9px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.store-item-caption h3 { margin: 7px 0 9px; font-size: clamp(22px,2vw,32px); line-height: 1.12; letter-spacing: -.04em; }
.store-price { display: flex; gap: 7px; align-items: center; justify-content: center; color: #fff5ce; }
.store-price img { width: 25px; height: 25px; object-fit: contain; }
.store-price b { font-size: 19px; font-weight: 600; }
.store-price > span { font-size: 10px; }
.store-explanation { padding: 25px; border: 1px solid #ffffe4b0; border-radius: 23px; color: #17452e; background: linear-gradient(135deg,#ffffefef,#e6efd8ed); backdrop-filter: blur(12px); box-shadow: 0 18px 40px #022b1e40; }
.store-fact-label { font-size: 9px; font-weight: 730; text-transform: uppercase; letter-spacing: .14em; color: #4b7755; }
.store-explanation h3 { margin: 12px 0; font-size: 26px; line-height: 1.1; letter-spacing: -.04em; }
.store-explanation p { margin: 0; font-size: 12px; line-height: 1.55; }
.store-metric { display: flex; align-items: center; gap: 14px; margin: 19px 0; padding: 12px 0; border-block: 1px solid #39764c25; }
.store-metric strong { font-size: clamp(28px,3vw,43px); line-height: 1; letter-spacing: -.06em; white-space: nowrap; }
.store-metric span { font-size: 10px; line-height: 1.4; }
.store-explanation .store-unlock { font-size: 10px; color: #44674d; }
.store-more { padding: 12px 0 5px; border: 0; background: none; width: 100%; display: flex; justify-content: space-between; text-align: left; font-size: 11px; font-weight: 700; line-height: 1.4; cursor: pointer; color: #17583a; }
.store-more:hover,.store-more:focus-visible { text-decoration: underline; outline: 2px solid #bd9c4a; outline-offset: 4px; }
.store-explanation .store-more-copy { padding-top: 12px; font-size: 11px; line-height: 1.6; }
.store-currency-note { position: absolute; left: 6.2%; right: 4%; bottom: 44px; z-index: 4; padding-top: 17px; border-top: 1px solid #fff0b730; display: flex; align-items: center; gap: 12px; }
.store-currency-note > img { width: 37px; height: 37px; object-fit: contain; }
.store-currency-note p { margin: 0; }
.store-currency-note p strong { display: block; font-size: 14px; }
.store-currency-note p span { display: block; font-size: 10px; margin-top: 5px; color: #fff5d6c0; }
.store-currency-note a { margin-left: auto; font-size: 11px; color: #ffe6a0; text-decoration: none; }
.store-currency-note a:hover,.store-currency-note a:focus-visible { color: white; text-decoration: underline; }
.store-scene .scene-index { display: none; }
@media (min-width:861px) and (max-height:780px) {
  .store-heading { top: calc(var(--header-h) + 20px); }
  .store-heading h2 { font-size: 34px; }
  .store-heading > p:last-child { margin-top: 10px; font-size: 11px; }
  .store-layout { top: calc(var(--header-h) + 166px); bottom: 115px; gap: 22px; }
  .store-categories { gap: 9px; }
  .store-categories button { padding: 14px 12px; }
  .store-categories button > span { font-size: 15px; }
  .store-explanation { padding: 19px; }
  .store-explanation h3 { font-size: 22px; margin: 8px 0; }
  .store-explanation p { font-size: 11px; }
  .store-metric { margin: 12px 0; padding: 8px 0; }
  .store-explanation .store-more-copy { font-size: 10px; padding-top: 8px; }
  .store-currency-note { bottom: 30px; }
}
@media (max-width:860px) {
  .store-scene { height: auto; min-height: 1400px; }
  .store-heading { top: calc(var(--header-h) + 24px); left: 22px; right: 22px; }
  .store-heading h2 { font-size: 33px; }
  .store-heading .eyebrow { font-size: 8px; }
  .store-heading > p:last-child { font-size: 12px; }
  .store-layout { top: 285px; left: 18px; right: 18px; bottom: 175px; grid-template-columns: 1fr; grid-template-rows: 160px 320px auto; gap: 24px; align-content: start; }
  .store-categories { grid-template-columns: 1fr 1fr; gap: 9px; }
  .store-categories button { padding: 13px 10px; gap: 8px; }
  .store-categories button > span { font-size: 13px; }
  .store-categories button > small { font-size: 7px; }
  .store-categories em { font-size: 8px; line-height: 1.4; }
  .store-categories b { display: none; }
  .store-showcase { min-height: 0; }
  .store-item-caption h3 { font-size: 25px; }
  .store-explanation { padding: 22px; }
  .store-explanation h3 { font-size: 25px; }
  .store-currency-note { left: 22px; right: 22px; bottom: 30px; flex-wrap: wrap; }
  .store-currency-note p { flex: 1; }
  .store-currency-note p span { line-height: 1.5; }
  .store-currency-note a { width: 100%; margin: 5px 0 0 49px; font-size: 10px; }
}
@media (prefers-reduced-motion:reduce) {
  .store-sunlight,.store-showcase.is-changing .store-art-well img { animation: none; }
}
.store-art-well { container-type: size; }
.store-object-mount { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100cqw,100cqh,360px); height: min(100cqw,100cqh,360px); }
.store-object-mount [data-store-art] { inset: 8%; width: 84%; height: 84%; object-fit: contain; filter: none; }
.store-object-mount .store-object-frame { inset: 0; width: 100%; height: 100%; max-height: 100%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 8px 16px #00271960); }

/* A final open doorway into the game, using the current Forest gate and Wayfarers. */
.begin-scene { color: #fff9e8; background: #063322; --begin-x: 0px; --begin-y: 0px; }
.begin-world { position: absolute; inset: -20px; background: url('dist/assets/scenes/forest-gate.webp?v=962acb9c52') center / cover; transform: translate(var(--begin-x),var(--begin-y)) scale(1.035); transition: transform .8s ease-out; }
.begin-world::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg,#03312135,#093c2120 35%,#052e2390 65%,#03271df0),radial-gradient(ellipse at 50% 45%,#03271d80,transparent 65%); }
.begin-glow { position: absolute; width: 60%; height: 80%; top: 5%; left: 20%; background: radial-gradient(ellipse,#fff6b33d,transparent 65%); mix-blend-mode: screen; animation: duels-glow 7s ease-in-out infinite; }
.begin-character { position: absolute; bottom: 35px; width: 36%; height: 69%; object-fit: contain; object-position: center bottom; mask-image: linear-gradient(#000 65%,transparent 98%); filter: drop-shadow(0 0 25px #abdc7950); animation: duels-breathe 8s ease-in-out infinite; }
.begin-character--aelen { left: -3%; }
.begin-character--selene { right: -3%; animation-delay: -4s; }
.begin-copy { position: absolute; z-index: 4; top: calc(var(--header-h) + 25px); bottom: 85px; left: 25%; right: 25%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; text-shadow: 0 3px 20px #03351e,0 1px 4px #03351e; }
.begin-logo { width: clamp(180px,21vw,300px); margin-bottom: 25px; filter: drop-shadow(0 8px 20px #052b1b80); }
.begin-copy .eyebrow { margin-bottom: 15px; font-size: 11px; }
.begin-copy h2 { margin: 0; font-size: clamp(44px,5.4vw,83px); font-weight: 450; line-height: 1; letter-spacing: -.055em; white-space: nowrap; }
.begin-copy h2 strong { color: #ffe792; font-weight: 760; }
.begin-line { margin: 22px 0 26px; font-size: 16px; font-weight: 520; line-height: 1.7; color: #ffffe5; }
.begin-play { width: min(350px,100%); height: 90px; margin: 0; }
.begin-play > span { font-size: 15px; }
.begin-revisit { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 23px; font-size: 10px; font-weight: 550; line-height: 1.7; color: #fff5cf; }
.begin-revisit a { text-decoration: none; border-bottom: 1px solid #fff0b75c; transition: color .2s; }
.begin-revisit a:hover,.begin-revisit a:focus-visible { color: white; border-color: white; outline: none; }
.begin-footer { position: absolute; z-index: 5; bottom: 25px; left: 6.2%; right: 4%; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #fff1c033; padding-top: 18px; color: #fff2c5b3; font-size: 10px; }
.begin-footer a { text-decoration: none; color: #fff2c5; }
.begin-footer a:hover,.begin-footer a:focus-visible { text-decoration: underline; }
.begin-motes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.begin-motes i { position: absolute; bottom: -5%; width: 4px; height: 4px; border-radius: 50%; background: #fff6aa; box-shadow: 0 0 14px #ffe982,0 0 25px #edffc3; animation: begin-rise 11s linear infinite; }
.begin-motes i:nth-child(1) { left: 15%; animation-delay: -2s; }
.begin-motes i:nth-child(2) { left: 30%; animation-delay: -5s; }
.begin-motes i:nth-child(3) { left: 45%; animation-delay: -7s; }
.begin-motes i:nth-child(4) { left: 60%; animation-delay: -3s; }
.begin-motes i:nth-child(5) { left: 75%; animation-delay: -8s; }
.begin-motes i:nth-child(6) { left: 85%; animation-delay: -10s; }
@keyframes begin-rise { from { transform: translate(0,0); opacity: 0; } 15%,70% { opacity: .8; } to { transform: translate(45px,-95vh); opacity: 0; } }
@media (min-width:861px) and (max-height:780px) {
  .begin-logo { width: 190px; margin-bottom: 18px; }
  .begin-copy h2 { font-size: 62px; }
  .begin-line { margin: 16px 0; font-size: 14px; }
  .begin-play { height: 77px; }
  .begin-revisit { margin-top: 15px; }
}
@media (max-width:860px) {
  .begin-scene { min-height: 844px; }
  .begin-world { background-position: 58% center; }
  .begin-copy { top: calc(var(--header-h) + 25px); bottom: 160px; left: 22px; right: 22px; justify-content: flex-start; }
  .begin-logo { width: 205px; margin-bottom: 28px; }
  .begin-copy h2 { font-size: clamp(42px,11vw,62px); }
  .begin-copy .eyebrow { font-size: 8px; }
  .begin-line { font-size: 12px; margin: 18px 0 21px; }
  .begin-play { width: 290px; height: 77px; }
  .begin-play > span { font-size: 13px; }
  .begin-revisit { margin-top: 15px; font-size: 8px; gap: 6px; }
  .begin-character { width: 68%; height: 35%; bottom: 57px; opacity: .9; }
  .begin-character--aelen { left: -14%; }
  .begin-character--selene { right: -14%; }
  .begin-footer { left: 22px; right: 22px; bottom: 20px; font-size: 8px; }
}
@media (prefers-reduced-motion:reduce) {
  .begin-world { transition: none; }
  .begin-glow,.begin-character,.begin-motes i { animation: none; }
}

/* The final invitation is accompanied by friendly creatures from the current Cards. */
.begin-character--cub,.begin-character--drifter { mask-image: none; object-fit: contain; object-position: center; opacity: 1; }
.begin-character--cub { left: 0; width: 30%; height: 46%; bottom: 90px; }
.begin-character--drifter { right: 0; width: 30%; height: 44%; bottom: 155px; animation-duration: 10s; }
@media (max-width:860px) {
  .begin-character--cub { left: 1%; width: 48%; height: 27%; bottom: 75px; }
  .begin-character--drifter { right: 1%; width: 48%; height: 27%; bottom: 100px; }
}

/* Six current-card creatures gather around the open Forest gate. */
.begin-character { mask-image: none; object-position: center; }
.begin-character--veilwing { left: 3%; top: 120px; bottom: auto; width: 23%; height: 27%; animation-duration: 12s; }
.begin-character--fanback { right: 3%; top: 115px; bottom: auto; width: 23%; height: 27%; animation-duration: 11s; animation-delay: -5s; }
.begin-character--cub { width: 28%; height: 40%; bottom: 130px; }
.begin-character--drifter { width: 28%; height: 37%; bottom: 160px; }
.begin-character--prancer { z-index: 2; right: 15%; width: 23%; height: 26%; bottom: 70px; animation-duration: 9s; }
.begin-character--hexapod { z-index: 2; left: 14%; width: 23%; height: 26%; bottom: 65px; animation-duration: 10s; }
@media (max-width:860px) {
  .begin-scene { min-height: 1050px; }
  .begin-character--veilwing { left: 3%; top: auto; bottom: 300px; width: 38%; height: 18%; }
  .begin-character--fanback { right: 3%; top: auto; bottom: 310px; width: 38%; height: 18%; }
  .begin-character--cub { left: 0; width: 45%; height: 23%; bottom: 145px; }
  .begin-character--drifter { right: 0; width: 45%; height: 23%; bottom: 170px; }
  .begin-character--prancer { right: 8%; width: 40%; height: 18%; bottom: 65px; }
  .begin-character--hexapod { left: 9%; width: 40%; height: 18%; bottom: 60px; }
}

/* Small breathing spaces between the full-screen chapters. */
main > .scene + .scene { margin-top: 24px; border-top: 1px solid #dfca7d24; }
main { background: radial-gradient(ellipse at center,#154a33,#041f17); }
.begin-back { position: absolute; z-index: 5; bottom: 25px; right: 4%; color: #fff1c5c9; font-size: 10px; text-decoration: none; }
.begin-back:hover,.begin-back:focus-visible { color: white; text-decoration: underline; }
.site-footer { margin-top: 24px; color: #f7f4df; background: #041d16; border-top: 1px solid #e1c16d52; }
.footer-main { max-width: 1600px; margin: 0 auto; display: grid; grid-template-columns: 1.7fr 1.05fr .85fr 1fr; gap: clamp(25px,5vw,80px); padding: 66px 6.2% 55px; }
.footer-brand > a { display: block; width: 210px; max-width: 100%; }
.footer-brand p { margin: 24px 0 0; max-width: 320px; color: #e7e8cfaa; font-size: 14px; line-height: 1.8; }
/* Instagram and Facebook, 2026-11-15. The marks wear the footer's own gold outline rather
   than each network's brand colour, so the row reads as part of this footer and not as two
   borrowed logos; the glyphs themselves are the recognisable ones. 44x44 because a finger
   has to hit them on a phone, which is where most of the people who follow a game are. */
.footer-social { display: flex; gap: 12px; margin-top: 22px; }
.social-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid #d4c18b45; color: #e8d8a6; transition: color .2s, border-color .2s, background .2s, transform .2s; }
.social-mark svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.social-mark .social-dot,.social-mark .social-solid { fill: currentColor; stroke: none; }
.social-mark:hover,.social-mark:focus-visible { color: #041d16; border-color: #f4d67f; background: #f4d67f; transform: translateY(-2px); }
.footer-column { display: flex; flex-direction: column; align-items: flex-start; gap: 13px; }
.footer-column h2 { margin: 5px 0 13px; font-size: 11px; font-weight: 720; letter-spacing: .2em; text-transform: uppercase; color: #f4d67f; }
.footer-column > a,.footer-column > span { font-size: 14px; line-height: 1.5; text-decoration: none; }
.footer-column > a { color: #f2f3d7d9; transition: color .2s; }
.footer-column > a:hover,.footer-column > a:focus-visible { color: #ffe79b; text-decoration: underline; text-underline-offset: 5px; }
.footer-pending > span { color: #ccd9c89c; }
.footer-pending > p { margin: 9px 0 0; max-width: 180px; color: #b4c6ad80; font-size: 10px; line-height: 1.65; }
.footer-meta { max-width: 1600px; margin: 0 auto; padding: 24px 6.2%; display: flex; gap: 16px; align-items: center; border-top: 1px solid #e4cf8c21; color: #dce4ca8c; font-size: 10px; }
.footer-age { display: grid; place-items: center; width: 35px; height: 28px; border: 1px solid #d4c18b45; border-radius: 6px; color: #e8d8a6; font-size: 11px; }
.footer-meta > a { margin-left: auto; color: #e3d19f; font-size: 10px; text-decoration: none; }
.footer-meta > a:hover,.footer-meta > a:focus-visible { color: white; text-decoration: underline; }
.footer-company { max-width: 1600px; margin: 0 auto; padding: 0 6.2% 22px; color: #dce4ca70; font-size: 10px; line-height: 1.8; }
.footer-company > a { color: #e3d19f; text-decoration: none; }
.footer-company > a:hover,.footer-company > a:focus-visible { color: white; text-decoration: underline; }
.footer-payments { border-top: 1px solid #e4cf8c25; padding: 20px 6.2%; background: #031911; }
.footer-payment-images { max-width: 1400px; margin: auto; display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.payment-mark { min-width: 100px; height: 52px; display: grid; place-items: center; border: 1px solid #f5f0da30; border-radius: 8px; background: #fffef3; padding: 8px 12px; }
.payment-mark img { width: auto; height: auto; max-width: 78px; max-height: 33px; object-fit: contain; }
.payment-mark--3ds { min-width: 122px; }
.payment-mark--3ds img { max-width: 101px; max-height: 37px; }
@media (max-width:860px) {
  main > .scene + .scene { margin-top: 16px; }
  .site-footer { margin-top: 16px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 35px 22px; padding: 40px 22px 35px; }
  .footer-brand { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 25px; }
  .footer-brand > a { width: 130px; flex-shrink: 0; }
  .footer-brand p { margin: 0; font-size: 10px; line-height: 1.8; }
  /* the brand turns into a row here, so the two marks take a line of their own under it */
  .footer-social { flex-basis: 100%; margin-top: 0; gap: 10px; }
  .footer-column { gap: 12px; }
  .footer-column h2 { font-size: 9px; margin-bottom: 8px; }
  .footer-column > a,.footer-column > span { font-size: 11px; }
  .footer-pending > p { font-size: 9px; }
  .footer-meta { padding: 21px 22px; gap: 10px; font-size: 9px; flex-wrap: wrap; }
  .footer-meta > a { font-size: 9px; }
  .footer-company { padding: 0 22px 20px; font-size: 9px; line-height: 1.75; }
  .footer-payments { padding: 20px 22px; }
  .footer-payment-images { justify-content: center; gap: 9px; }
  .payment-mark { min-width: 85px; height: 45px; padding: 7px 10px; }
  .payment-mark img { max-width: 64px; max-height: 28px; }
  .payment-mark--3ds { min-width: 104px; }
  .payment-mark--3ds img { max-width: 84px; max-height: 31px; }
  .begin-back { right: 22px; bottom: 20px; font-size: 8px; }
}
/* The supplied 3D Secure artwork is white and needs the dark footer ground. */
.payment-mark--3ds { background: #0b3023; border-color: #fff8df30; }

/* Shared, feathered mist bridges each scene without a hard gap or border. */
main > .scene { margin-top: 0 !important; border-top: 0 !important; }
.scene-mist { position: relative; z-index: 40; height: 160px; margin-block: -80px; pointer-events: none; background: radial-gradient(ellipse at 16% 48%,#d8e4c762,transparent 56%),radial-gradient(ellipse at 77% 55%,#c8dab24f,transparent 60%),linear-gradient(180deg,transparent 0%,#64866a0d 15%,#6c8c7066 34%,#5d7f66ed 47%,#5d7f66 50%,#5d7f66ed 53%,#6c8c7066 66%,#64866a0d 85%,transparent); filter: blur(9px); }
.site-footer { margin-top: 0; border-top: 0; }
.movie-replay,.journey-playback,.collection-playback,.path-playback { display: none; }
.movie-hand { bottom: 78px; }
@media (max-width:860px) {
  .scene-mist { height: 110px; margin-block: -55px; filter: blur(7px); }
  .movie-hand { bottom: 64px; }
}
.movie-hand { bottom: 48px; }
.movie-row--self { bottom: clamp(260px,32vh,340px); }
@media (max-width:860px) {
  .movie-hand { bottom: 100px; }
  .movie-row--self { bottom: 280px; }
}
.scene-mist { background: url('assets/section-mist.svg?v=962acb9c52') center / 100% 100% no-repeat; filter: none; }
/* Fade the actual scene edge as well, so no rectangular seam shows through the mist. */
main > .scene { -webkit-mask-image: linear-gradient(180deg,transparent,#000 32px,#000 calc(100% - 32px),transparent); mask-image: linear-gradient(180deg,transparent,#000 32px,#000 calc(100% - 32px),transparent); }
main > .scene:first-child { -webkit-mask-image: linear-gradient(#000 calc(100% - 32px),transparent); mask-image: linear-gradient(#000 calc(100% - 32px),transparent); }

/* The Tale: edge-to-edge paintings, separate from the game's opening dialogue. */
.panorama-art,.panorama-shade,.panorama-mist { position: absolute; inset: 0; pointer-events: none; }
.panorama-art { overflow: hidden; }
.panorama-art img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0; transform: scale(1.025); transition: opacity 1.6s ease,transform 10s linear; }
.panorama-art img.is-current { opacity: 1; transform: scale(1.05); }
.panorama-shade { background: linear-gradient(0deg,#02281bef, #03291b88 24%,transparent 57%,#062c2322); }
.panorama-mist { inset: auto -8% 0; height: 27%; background: url('assets/section-mist.svg?v=962acb9c52') center / 100% 100% no-repeat; opacity: .5; animation: panorama-mist 16s ease-in-out infinite alternate; }
.panorama-copy { position: absolute; z-index: 4; left: 8%; bottom: 17%; width: min(720px,75%); text-shadow: 0 3px 24px #001c16b3; }
.panorama-copy .eyebrow { margin-bottom: 18px; }
.panorama-copy h2 { margin: 0 0 18px; font-size: clamp(42px,5.2vw,82px); line-height: 1.02; font-weight: 550; letter-spacing: -.045em; text-wrap: balance; }
.panorama-copy > p:last-child { max-width: 540px; margin: 0; font-size: clamp(16px,1.35vw,21px); line-height: 1.55; color: #fffae4e8; text-wrap: balance; }
.panorama-controls { position: absolute; z-index: 6; bottom: 7%; left: 8%; display: flex; align-items: center; gap: 20px; color: #ffedb4; }
.panorama-controls button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid #f9e7b04d; border-radius: 50%; background: #062e2266; color: #fff3ce; font-size: 22px; cursor: pointer; transition: background .25s,border-color .25s; }
.panorama-controls button:hover,.panorama-controls button:focus-visible { background: #52734b99; border-color: #ffe79e; outline: 2px solid #ffe79e; outline-offset: 4px; }
.panorama-controls span { font-size: 11px; letter-spacing: .16em; }
.panorama-controls .panorama-pause { margin-left: 5px; font-size: 15px; }
@keyframes panorama-mist { from { transform: translateX(-2%); } to { transform: translateX(2%); } }
@media(max-width:860px) {
  .panorama-copy { left: 7%; bottom: 23%; width: 86%; }
  .panorama-copy h2 { font-size: clamp(38px,10vw,60px); }
  .panorama-copy > p:last-child { font-size: 16px; }
  .panorama-copy .eyebrow { font-size: 9px; }
  .panorama-controls { left: 7%; bottom: 11%; gap: 16px; }
  .panorama-shade { background: linear-gradient(0deg,#02281bf5,#03291b9c 42%,transparent 76%); }
  .forest-panorama .scene-index { display: none; }
}
@media(prefers-reduced-motion:reduce) {
  .panorama-art img { transition: none; transform: none; }
  .panorama-mist { animation: none; }
}

@media(max-width:860px) {
  .panorama-art .panorama-heart-glimpse { object-position: 65% center; }
}

.panorama-art .panorama-heart-glimpse { filter: brightness(1.28) saturate(.92); }

/* Music uses the header's reserved action column. */
.header-actions { display: flex; align-items: center; gap: 10px; justify-self: end; }
.music-button { position: relative; display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border: 1px solid #ffe69266; border-radius: 50%; background: #073f2fbd; color: #ffe7a1; cursor: pointer; }
.music-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.music-off-line { position: absolute; width: 26px; height: 1.5px; background: currentColor; transform: rotate(-45deg); box-shadow: 0 0 0 2px #073f2f; }
.music-button[aria-pressed="true"] { background: #216344; box-shadow: 0 0 16px #f7d67f22; }
.music-button[aria-pressed="true"] .music-off-line { display: none; }
.music-button:hover,.music-button:focus-visible { outline: 2px solid #ffe7a1; outline-offset: 4px; }
.music-status { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media(max-width:860px) {
  .site-header { grid-template-columns: 130px 1fr auto; gap: 10px; }
  .header-actions { grid-column: 3; }
}

/* ══ Scene seams, 2026-10-22 ═══════════════════════════════════════════════
   The seam used to be a 160px divider whose SVG carried a fully opaque
   #64856a core, so it read as a grey stripe laid across the page — the
   "полоски" the Producer rejected twice. There is no band now: each scene
   slides up under the one before it and its artwork dissolves in over the
   top 140px, so one forest resolves into the next. Only the background
   layer is masked, never the copy, and only the INCOMING edge fades — the
   scene behind stays opaque, so no gap can open and show the page beneath. */
.scene-mist { height: 0; margin: 0; background: none; filter: none; overflow: visible; }
.scene-mist::after {
  content: ''; position: absolute; left: 0; right: 0; top: -110px; height: 220px;
  pointer-events: none;
  background:
    radial-gradient(58% 100% at 28% 50%, rgba(228,242,202,.10), transparent 72%),
    radial-gradient(52% 100% at 74% 50%, rgba(255,237,176,.085), transparent 74%);
  filter: blur(22px);
}
.scene-mist + .scene { margin-top: -140px; }

/* The old both-edge mask on the whole section is what forced a gap at the
   junction, which is why an opaque band had to be painted over it. */
main > .scene,
main > .scene:first-child { -webkit-mask-image: none; mask-image: none; }

.panorama-art, .battle-world, .path-world, .collection-world,
.journey-world, .duels-world, .trove-world, .store-world, .begin-world {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 140px);
          mask-image: linear-gradient(180deg, transparent 0, #000 140px);
}
/* The last scene also settles into the footer's own dark green. */
.begin-world {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 140px, #000 calc(100% - 90px), transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 140px, #000 calc(100% - 90px), transparent 100%);
}

/* ══ Legends and Treasures: the big piece opens, it does not just appear ══
   `trove-reveal` had been redefined further up the file as a bare opacity
   fade, so the earlier scale version never ran. This is the live one. */
@keyframes trove-reveal {
  0%   { opacity: 0; transform: translateY(26px) scale(.93); filter: saturate(.7) brightness(1.45); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes trove-frame-open {
  0%   { opacity: 0; transform: scale(.9) rotate(-1.5deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes trove-caption-rise {
  0%   { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: none; }
}
/* A slow breath on the large piece, so it is alive while it is simply shown.
   `translate` is used instead of `transform` because square Treasures already
   carry a transform for centring, and the two would overwrite each other. */
@keyframes art-breathe { 0%, 100% { translate: 0 0; } 50% { translate: 0 -11px; } }

.trove-painting.is-changing .trove-main-art { animation: trove-reveal .85s cubic-bezier(.2,.82,.2,1) both; }
.trove-painting.is-changing .trove-treasure-frame { animation: trove-frame-open .7s cubic-bezier(.2,.82,.2,1) both; }
.trove-painting.is-changing .trove-caption > * { animation: trove-caption-rise .6s ease both; }
.trove-painting.is-changing .trove-caption > *:nth-child(2) { animation-delay: .07s; }
.trove-painting.is-changing .trove-caption > *:nth-child(3) { animation-delay: .13s; }
.trove-art-mount { animation: art-breathe 7.5s ease-in-out infinite; }
.store-showcase.is-changing .store-art-well img { animation: trove-reveal .72s cubic-bezier(.2,.82,.2,1) both; }
.store-art-well img { animation: art-breathe 8.5s ease-in-out infinite; }

/* The thumbnail the visitor picked answers the press. */
.trove-shelf button { transition: transform .22s cubic-bezier(.2,.82,.2,1), box-shadow .22s ease, border-color .22s ease; }
.trove-shelf button[aria-pressed="true"] { transform: translateY(-5px) scale(1.04); }

@media (prefers-reduced-motion: reduce) {
  .trove-art-mount, .store-art-well img,
  .trove-painting.is-changing .trove-main-art,
  .trove-painting.is-changing .trove-treasure-frame,
  .trove-painting.is-changing .trove-caption > *,
  .store-showcase.is-changing .store-art-well img { animation: none; }
  .trove-shelf button { transition: none; }
}

/* ══ World Path edge labels on a phone ═════════════════════════════════════
   The first and last encounters sit at 7% and 93% across the path, and their
   labels are centred on the node, so at 375px the Trial's name was clipped by
   the left edge and the Final Forest Lord's by the right. They hang inward
   instead. Measured at 375×812: both now sit fully inside the viewport. */
.path-node--first small { left: 0; transform: none; text-align: left; }
.path-node--last small { left: auto; right: 0; transform: none; text-align: right; }
.path-node--first:hover small, .path-node--first:focus-visible small, .path-node--first.is-active small,
.path-node--last:hover small, .path-node--last:focus-visible small, .path-node--last.is-active small {
  transform: translateY(3px);
}

/* ══ The whole piece glows, not the art inside its frame ═══════════════════
   The reveal and the breath used to run on the inner <img>, so a Treasure
   moved INSIDE a frame that stood still. Both now run on the mount, which
   holds the artwork and its frame together, and the glow is a drop-shadow,
   so the light follows the real silhouette rather than a rectangle.
   `translate` and `scale` are used instead of `transform` because the square
   Treasure mount already carries a transform for centring. */
@keyframes piece-reveal {
  0%   { opacity: 0; translate: 0 28px; scale: .92; }
  60%  { opacity: 1; }
  100% { opacity: 1; translate: 0 0; scale: 1; }
}
@keyframes piece-glow {
  0%, 100% {
    translate: 0 0; scale: 1;
    filter: drop-shadow(0 12px 26px rgba(0,26,19,.55)) drop-shadow(0 0 12px rgba(255,226,140,.20));
  }
  50% {
    translate: 0 -12px; scale: 1.018;
    filter: drop-shadow(0 20px 36px rgba(0,26,19,.6)) drop-shadow(0 0 30px rgba(255,226,140,.5));
  }
}

.trove-art-mount, .store-object-mount { animation: piece-glow 7s ease-in-out infinite; }
.trove-painting.is-changing .trove-art-mount,
.store-showcase.is-changing .store-object-mount {
  animation: piece-reveal .8s cubic-bezier(.2,.82,.2,1) both, piece-glow 7s ease-in-out .8s infinite;
}
/* The inner pieces no longer animate on their own — they move with the mount. */
.trove-painting.is-changing .trove-main-art,
.trove-painting.is-changing .trove-treasure-frame,
.store-showcase.is-changing .store-art-well img { animation: none; }
/* The Treasure mount's own static drop-shadow would fight the glow. */
.trove-painting[data-kind="Treasure"] .trove-art-mount { filter: none; }

/* ══ Treasure thumbnails are square ════════════════════════════════════════
   The shelf's buttons are rectangular, which cropped the square Treasures.
   The scene now carries the kind, so the shelf can match the shape it holds. */
[data-trove][data-kind="Treasure"] .trove-shelf button { aspect-ratio: 1; flex: 0 0 auto; width: clamp(58px, 7vw, 96px); max-width: none; }
[data-trove][data-kind="Treasure"] .trove-shelf img { object-fit: contain; padding: 5px; }
[data-trove][data-kind="Treasure"] .trove-shelf { justify-content: center; gap: 12px; }

/* ══ Choose your Hero ══════════════════════════════════════════════════════ */
.wayfarer { background: var(--emerald-950); }
.wayfarer-world {
  position: absolute; inset: 0;
  background: url('dist/assets/scenes/bg-home.webp?v=962acb9c52') center / cover no-repeat;
  filter: saturate(1.05);
}
.wayfarer-world::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(3,28,20,.9) 0%, rgba(4,34,24,.62) 38%, rgba(4,30,22,.18) 62%, rgba(3,26,19,.55) 100%);
}
.wayfarer-sun {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(42% 58% at 62% 26%, rgba(255,236,168,.4), transparent 68%);
  mix-blend-mode: screen; animation: piece-glow 9s ease-in-out infinite;
}
.wayfarer-motes { position: absolute; inset: 0; pointer-events: none; }
.wayfarer-motes i {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,243,196,.95), rgba(255,226,140,0) 70%);
  animation: mote-drift 13s linear infinite;
}
.wayfarer-motes i:nth-child(1) { left: 12%; top: 72%; animation-delay: -1s; }
.wayfarer-motes i:nth-child(2) { left: 26%; top: 84%; animation-delay: -4s; }
.wayfarer-motes i:nth-child(3) { left: 44%; top: 66%; animation-delay: -7s; }
.wayfarer-motes i:nth-child(4) { left: 58%; top: 88%; animation-delay: -2s; }
.wayfarer-motes i:nth-child(5) { left: 71%; top: 70%; animation-delay: -9s; }
.wayfarer-motes i:nth-child(6) { left: 83%; top: 80%; animation-delay: -5s; }
.wayfarer-motes i:nth-child(7) { left: 34%; top: 58%; animation-delay: -11s; }
.wayfarer-motes i:nth-child(8) { left: 66%; top: 54%; animation-delay: -3s; }
@keyframes mote-drift {
  0%   { transform: translateY(0) scale(.7); opacity: 0; }
  18%  { opacity: 1; }
  80%  { opacity: .75; }
  100% { transform: translateY(-190px) scale(1.25); opacity: 0; }
}

.wayfarer-intro {
  position: absolute; z-index: 6;
  top: calc(var(--header-h) + clamp(70px, 11vh, 130px));
  left: clamp(38px, 4.5vw, 78px);
  width: min(430px, 36vw);
  text-shadow: 0 4px 24px rgba(0,0,0,.6);
}
.wayfarer-intro h2 { margin: 12px 0 16px; font-size: clamp(34px, 3.2vw, 58px); line-height: 1.02; text-wrap: balance; }
.wayfarer-intro p:not(.eyebrow) { max-width: 390px; color: #e9f0d8cc; font-size: 15px; line-height: 1.7; }

.wayfarer-stage {
  position: absolute; z-index: 5; right: clamp(20px, 7vw, 150px); bottom: 0;
  width: min(520px, 42vw); height: min(78%, 720px);
  display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center;
}
.wayfarer-halo {
  position: absolute; left: 50%; bottom: 14%; translate: -50% 0;
  width: 108%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,235,160,.3), rgba(120,220,150,.12) 46%, transparent 70%);
  animation: piece-glow 6.5s ease-in-out infinite;
}
.wayfarer-ring {
  position: absolute; left: 50%; bottom: 11%; translate: -50% 0;
  width: 74%; aspect-ratio: 2.6 / 1; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(255,230,150,.4);
  box-shadow: 0 0 34px rgba(255,226,140,.35), inset 0 0 30px rgba(255,226,140,.22);
  animation: ring-pulse 4.5s ease-in-out infinite;
}
@keyframes ring-pulse {
  0%, 100% { opacity: .5; scale: 1; }
  50%      { opacity: .95; scale: 1.06; }
}
.wayfarer-figure {
  position: relative; z-index: 2;
  width: 100%; height: 100%; min-height: 0;
  object-fit: contain; object-position: center bottom;
  filter: drop-shadow(0 18px 34px rgba(0,24,16,.6)) drop-shadow(0 0 22px rgba(255,228,150,.28));
}
.wayfarer-stage.is-arriving .wayfarer-figure { animation: wayfarer-arrive .7s cubic-bezier(.2,.82,.2,1) both; }
@keyframes wayfarer-arrive {
  0%   { opacity: 0; translate: 0 30px; scale: .95; filter: brightness(1.5) drop-shadow(0 0 40px rgba(255,232,160,.6)); }
  100% { opacity: 1; translate: 0 0; scale: 1; filter: drop-shadow(0 18px 34px rgba(0,24,16,.6)) drop-shadow(0 0 22px rgba(255,228,150,.28)); }
}
.wayfarer-name { position: relative; z-index: 3; text-align: center; padding-bottom: 18px; text-shadow: 0 3px 18px rgba(0,0,0,.6); }
.wayfarer-name small { display: block; color: #ffe79b; font-size: 10px; font-weight: 750; letter-spacing: .22em; }
.wayfarer-name h3 { margin: 6px 0 2px; font-size: clamp(27px, 2.5vw, 42px); line-height: 1.05; }
.wayfarer-name p { margin: 0; color: #e9f0d8cc; font-size: 14px; letter-spacing: .04em; }
.wayfarer-stage.is-arriving .wayfarer-name > * { animation: trove-caption-rise .55s ease both; }
.wayfarer-stage.is-arriving .wayfarer-name > *:nth-child(2) { animation-delay: .06s; }
.wayfarer-stage.is-arriving .wayfarer-name > *:nth-child(3) { animation-delay: .12s; }

.wayfarer-picks {
  position: absolute; z-index: 7; left: clamp(38px, 4.5vw, 78px); bottom: clamp(40px, 7vh, 80px);
  display: flex; flex-wrap: wrap; gap: 12px; width: min(470px, 40vw);
}
.wayfarer-picks button {
  position: relative; width: 70px; padding: 0 0 5px; cursor: pointer;
  border: 1px solid #fff0bf55; border-radius: 13px; overflow: hidden;
  background: #0a3a27b0; color: #f2f3d7d9;
  transition: transform .24s cubic-bezier(.2,.82,.2,1), box-shadow .24s ease, border-color .24s ease, color .24s ease;
}
.wayfarer-picks img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.wayfarer-picks span { display: block; padding-top: 5px; font-size: 10px; font-weight: 750; letter-spacing: .08em; }
.wayfarer-picks button:hover, .wayfarer-picks button:focus-visible {
  transform: translateY(-4px); border-color: #ffe580; box-shadow: 0 0 16px #ffe58055; color: #fff;
}
.wayfarer-picks button[aria-pressed="true"] {
  transform: translateY(-6px) scale(1.06); border-color: #ffe580; color: #fff;
  box-shadow: 0 0 0 2px #ffe58099, 0 0 26px #ffe5807a;
}

@media (max-width: 860px) {
  .wayfarer-intro { top: calc(var(--header-h) + 14px); left: 20px; width: calc(100% - 40px); }
  .wayfarer-intro h2 { font-size: clamp(24px, 7vw, 32px); }
  .wayfarer-intro p:not(.eyebrow) { font-size: 12px; max-width: none; }
  .wayfarer-stage { right: 0; left: 0; width: 100%; height: 50%; bottom: 150px; }
  .wayfarer-picks { left: 0; right: 0; width: 100%; justify-content: center; bottom: 26px; gap: 8px; padding: 0 14px; }
  .wayfarer-picks button { width: 52px; border-radius: 10px; }
  .wayfarer-picks span { font-size: 8px; }
  .wayfarer-name h3 { font-size: 25px; }
  .wayfarer-name p { font-size: 12px; }
}

/* ══ The creatures on the closing screen ══════════════════════════════════ */
.begin-character {
  filter: drop-shadow(0 14px 26px rgba(0,22,14,.5)) drop-shadow(0 0 20px rgba(190,240,160,.3));
  animation: creature-drift 9s ease-in-out infinite;
}
@keyframes creature-drift {
  0%, 100% { translate: 0 0; rotate: 0deg; filter: drop-shadow(0 14px 26px rgba(0,22,14,.5)) drop-shadow(0 0 18px rgba(190,240,160,.26)); }
  50%      { translate: 0 -16px; rotate: -1.1deg; filter: drop-shadow(0 22px 34px rgba(0,22,14,.55)) drop-shadow(0 0 34px rgba(210,250,180,.55)); }
}
.begin-character--cub { animation-duration: 8s; animation-delay: -1.5s; }
.begin-character--drifter { animation-duration: 10.5s; animation-delay: -4s; }
.begin-character--veilwing { animation-duration: 7.5s; animation-delay: -2.5s; }
.begin-character--fanback { animation-duration: 11s; animation-delay: -6s; }
.begin-character--prancer { animation-duration: 9.5s; animation-delay: -3s; }
.begin-character--hexapod { animation-duration: 12s; animation-delay: -7.5s; }

/* ══ A shorter footer, and payment marks without their white plates ═══════ */
.footer-main { padding: 42px 6.2% 32px; gap: clamp(20px, 3.6vw, 56px); }
.footer-brand > a { width: 158px; }
.footer-brand p { margin: 14px 0 0; font-size: 13px; line-height: 1.65; }
.footer-column { gap: 10px; }
.footer-meta { padding: 16px 6.2%; }
.footer-company { padding: 0 6.2% 16px; }
.footer-payments { padding: 14px 6.2%; background: none; border-top: 1px solid #e4cf8c1f; }
.payment-mark {
  min-width: 0; height: auto; padding: 0; border: 0; border-radius: 0; background: none;
  opacity: .9; transition: opacity .2s ease;
}
.payment-mark:hover { opacity: 1; }
.payment-mark img { max-width: 62px; max-height: 26px; }
.payment-mark--3ds { min-width: 0; background: none; border: 0; }
.payment-mark--3ds img { max-width: 84px; max-height: 30px; }
.footer-payment-images { gap: 22px; }

@media (max-width: 860px) {
  .footer-main { padding: 30px 22px 24px; gap: 26px 20px; }
  .footer-brand > a { width: 116px; }
  .footer-brand p { font-size: 10px; }
  .footer-meta { padding: 14px 22px; }
  .footer-company { padding: 0 22px 14px; }
  .footer-payments { padding: 12px 22px; }
  .payment-mark img { max-width: 52px; max-height: 22px; }
  .payment-mark--3ds img { max-width: 70px; max-height: 26px; }
  .footer-payment-images { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .trove-art-mount, .store-object-mount, .begin-character,
  .wayfarer-sun, .wayfarer-halo, .wayfarer-ring, .wayfarer-motes i,
  .wayfarer-stage.is-arriving .wayfarer-figure,
  .wayfarer-stage.is-arriving .wayfarer-name > * { animation: none; }
  .wayfarer-picks button { transition: none; }
}

/* ── Choose your Hero: corrections after looking at it ─────────────────────
   1. The Wayfarer paintings are not true cut-outs — they carry their own
      canvas, and at this size its straight left edge was visible as a seam
      down the middle of the Forest. A single soft radial mask dissolves the
      painting into the scene on every side; one gradient is used rather than
      two composited layers, because where `mask-composite` is unsupported the
      layers would combine into MORE visible area, which is the defect itself.
   2. Six picks have to sit on one row; at 470px the sixth wrapped alone.
   3. The name was landing on the section's own number in the corner. */
.wayfarer-figure {
  -webkit-mask-image: radial-gradient(ellipse 76% 94% at 50% 54%, #000 58%, rgba(0,0,0,.65) 78%, transparent 96%);
          mask-image: radial-gradient(ellipse 76% 94% at 50% 54%, #000 58%, rgba(0,0,0,.65) 78%, transparent 96%);
}
.wayfarer-stage { bottom: 58px; width: min(560px, 44vw); }
.wayfarer-picks { width: min(580px, 46vw); }
.wayfarer-picks button { width: 74px; }

@media (max-width: 860px) {
  .wayfarer-stage { bottom: 132px; width: 100%; }
  .wayfarer-picks { width: 100%; }
  .wayfarer-picks button { width: 50px; }
}

/* The box now takes each painting's own aspect ratio (set per Wayfarer in
   script.js), so the image fills it exactly and the soft mask feathers the
   real edge of the painting instead of the empty letterbox around it. */
.wayfarer-figure { width: auto; max-width: 100%; height: 100%; object-fit: fill; justify-self: center; }

/* The radial mask left the side edges mostly opaque, because the box edge sat
   well inside the ellipse's radius. Two straight gradients intersected give a
   proper feather on the sides and the foot of the painting. Where
   `mask-composite` is missing the layers would union and show the hard edge
   again, so the radial stays as the fallback and the pair is applied only
   behind @supports. */
@supports (mask-composite: intersect) or (-webkit-mask-composite: source-in) {
  .wayfarer-figure {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 15%, #000 85%, transparent 100%),
                        linear-gradient(180deg, #000 0, #000 72%, transparent 99%);
            mask-image: linear-gradient(90deg, transparent 0, #000 15%, #000 85%, transparent 100%),
                        linear-gradient(180deg, #000 0, #000 72%, transparent 99%);
    -webkit-mask-composite: source-in;
            mask-composite: intersect;
  }
}

/* The shelf is a flex row, so its buttons were being stretched to the row's
   height and `aspect-ratio` could never take effect — the square Treasures
   stayed in rectangles. Letting them size themselves lets the ratio win. */
[data-trove][data-kind="Treasure"] .trove-shelf { align-items: flex-start; }
[data-trove][data-kind="Treasure"] .trove-shelf button { align-self: flex-start; height: auto; }

/* ══ The glow was real but the container was cutting it off ════════════════
   The reveal and the breath DO run on the mount — artwork and frame together
   — but `.trove-art-space` and `.store-art-well` are `overflow: hidden`, so
   the motion was clipped at a fixed window and read as "the picture moves
   inside a frame that stands still". Checking that the animation was declared
   was not the same as checking that it could be seen. */
.trove-art-space, .store-art-well, .store-showcase, .collection-showcase { overflow: visible; }

/* ══ Treasure thumbnails: square in square, nothing cropped, no gaps ═══════
   The Treasure art is a true 1024×1024 square, so in a square button `cover`
   fills it exactly — the previous `contain` plus padding left empty margins. */
[data-trove][data-kind="Treasure"] .trove-shelf img { object-fit: cover; padding: 0; width: 100%; height: 100%; }
[data-trove][data-kind="Treasure"] .trove-shelf button { overflow: hidden; }



/* ══ The stray arc under the Cards ════════════════════════════════════════ */
.collection-shelf::before { display: none; }

/* ══ The creatures on the closing screen ══════════════════════════════════
   An earlier attempt gave all six one width and one height at once. That
   discarded each creature's own tuned size and position and they piled into
   the middle on top of one another. Size comes from `scale` instead, which
   enlarges each about its own place and leaves the layout — and the spread —
   as it was. `creature-drift` animates translate and rotate only, so the two
   do not fight. */
.begin-character { scale: 1.16; }

/* ══ 3D Secure went missing with its plate ════════════════════════════════
   Its mark is drawn in solid white, so with the dark plate removed it was
   white on near-white nothing and vanished against the page. It keeps a
   quiet dark pill of its own; Visa and Mastercard are full-colour and need
   none. */
.payment-mark--3ds {
  padding: 5px 12px; border-radius: 8px;
  background: #06281cc4; box-shadow: inset 0 0 0 1px #fff8df2e;
}

/* The 3D Secure mark is an SVG with a viewBox and no width/height of its own.
   Once its old fixed-size plate was removed it had nothing to derive a size
   from and collapsed to 0×0 — which is why it vanished from the footer while
   Visa and Mastercard, both bitmaps with intrinsic sizes, stayed. It is given
   an explicit size rather than a maximum. */
.payment-mark--3ds img { width: 84px; height: 30px; max-width: none; max-height: none; object-fit: contain; }
@media (max-width: 860px) {
  .payment-mark--3ds img { width: 70px; height: 25px; }
}

/* The per-Wayfarer size had no effect: `wayfarer-arrive` runs with
   `animation-fill-mode: both` and ends on `scale: 1`, so the animation's final
   value kept overriding the rule. The size is a custom property instead, and
   the keyframes finish on it rather than on a hard 1. */
@keyframes wayfarer-arrive {
  0%   { opacity: 0; translate: 0 30px; scale: .95; filter: brightness(1.5) drop-shadow(0 0 40px rgba(255,232,160,.6)); }
  100% { opacity: 1; translate: 0 0; scale: 1; filter: drop-shadow(0 18px 34px rgba(0,24,16,.6)) drop-shadow(0 0 22px rgba(255,228,150,.28)); }
}

/* With eight Cards on the shelf the last label reached the corner where the
   section's own number sits. The number moves out of the shelf's lane. */
#my-cards .scene-index { bottom: auto; top: calc(var(--header-h) + 18px); }

/* ══ Treasure thumbnails wear the same frame as the large piece ═══════════
   The large Treasure sits inside its frame with the artwork inset to 84%.
   A bare thumbnail could only crop the art or leave a margin; with the frame
   it is the same object in miniature. The button keeps no border of its own,
   because the frame IS the border. */
[data-trove][data-kind="Treasure"] .trove-shelf button {
  position: relative; border: 0; background: none; overflow: visible;
}
[data-trove][data-kind="Treasure"] .trove-shelf button > img:first-child {
  position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; border-radius: 6%;
}
.trove-shelf-frame {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; object-fit: contain; pointer-events: none;
}
[data-trove][data-kind="Treasure"] .trove-shelf button::after {
  content: ''; position: absolute; inset: 6%; z-index: 1; border-radius: 8%;
  background: #06281c66;
}
[data-trove][data-kind="Treasure"] .trove-shelf button[aria-pressed="true"] {
  outline: 0; filter: drop-shadow(0 0 10px #ffe58095) drop-shadow(0 0 3px #ffe580);
}
[data-trove][data-kind="Treasure"] .trove-shelf button:hover,
[data-trove][data-kind="Treasure"] .trove-shelf button:focus-visible {
  outline: 0; filter: drop-shadow(0 0 8px #ffe58070);
}



/* ══ One closing line: age, copyright, the company, the marks, the way up ══
   The three stacked strips became a single row, so the payment marks sit with
   the address and the age badge rather than in a band of their own. The
   company text is allowed to shrink and the marks never do; below 1100px the
   address drops to its own line instead of squeezing the marks out. */
.footer-meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px 18px; padding: 14px 6.2%;
}
.footer-copy { flex-shrink: 0; }
.footer-meta .footer-company {
  flex: 1 1 320px; min-width: 0; padding: 0; margin: 0;
  color: #dce4ca72; font-size: 10px; line-height: 1.6;
}
.footer-meta .footer-company a { color: #e3d19f; text-decoration: none; }
.footer-meta .footer-company a:hover { color: #fff; text-decoration: underline; }
.footer-payment-images { flex-shrink: 0; display: flex; align-items: center; gap: 18px; margin: 0; }
.footer-top { flex-shrink: 0; margin-left: 0; color: #e3d19f; font-size: 10px; text-decoration: none; }
.footer-top:hover, .footer-top:focus-visible { color: #fff; text-decoration: underline; }

@media (max-width: 1100px) {
  .footer-meta .footer-company { flex-basis: 100%; order: 5; }
}
@media (max-width: 860px) {
  .footer-meta { padding: 14px 22px; gap: 9px 14px; }
  .footer-payment-images { gap: 14px; }
}


/* ══ The thumbnail strip: taller, and no scrollbar ════════════════════════
   The row was fixed at 78px and scrolled sideways, which put a slider under
   the Trove. The row is taller now and every thumbnail is sized from that
   height, so the whole set fits across and there is nothing left to scroll.
   Portrait Legends and square Treasures each keep their own shape. */
.trove-gallery { grid-template-rows: minmax(0, 1fr) 124px; }
.trove-shelf {
  overflow: visible;
  scrollbar-width: none;
  justify-content: center; align-items: center;
  gap: 10px; padding: 0;
}
.trove-shelf::-webkit-scrollbar { display: none; }
.trove-shelf button {
  flex: 0 0 auto; width: auto; height: 100%; max-width: none; min-width: 0;
  aspect-ratio: 2 / 3;
}
[data-trove][data-kind="Treasure"] .trove-shelf button {
  aspect-ratio: 1; width: auto; height: 100%; align-self: center;
}
[data-trove][data-kind="Treasure"] .trove-shelf { align-items: center; }

@media (max-width: 860px) {
  /* Ten Legends cannot sit across a phone at a readable size, so the strip
     wraps onto a second line rather than hiding half of them behind a drag. */
  .trove-gallery { grid-template-rows: minmax(0, 1fr) auto; }
  .trove-shelf { flex-wrap: wrap; gap: 8px; align-items: flex-start; }
  .trove-shelf button { height: auto; width: clamp(52px, 15vw, 74px); }
  [data-trove][data-kind="Treasure"] .trove-shelf button { width: clamp(58px, 17vw, 84px); height: auto; }
}

/* On a phone the widths are set so the rows come out even: five Treasures on
   one line, ten Legends on exactly two, with nothing to drag. */
@media (max-width: 860px) {
  .trove-shelf { justify-content: center; gap: 8px; }
  .trove-shelf button,
  [data-trove][data-kind="Treasure"] .trove-shelf button { width: min(60px, calc((100% - 32px) / 5)); }
}

/* ══ Cookie banner ════════════════════════════════════════════════════════
   Shown only while no choice has been made. Until Accept is pressed nothing
   is loaded from Google, so this is the whole of what the visitor has to
   decide. It sits above the sound dock and the End-Turn control. */
.cookie-banner {
  position: fixed; z-index: 90; left: 0; right: 0; bottom: 0;
  background: #04221aee;
  border-top: 1px solid #ffe69240;
  box-shadow: 0 -18px 50px #00140dad;
  backdrop-filter: blur(10px);
  transform: translateY(102%);
  transition: transform .3s cubic-bezier(.2,.82,.2,1);
}
.cookie-banner.is-open { transform: translateY(0); }
.cookie-banner__inner {
  max-width: 1400px; margin: 0 auto; padding: 16px clamp(18px, 4vw, 64px);
  display: flex; align-items: center; gap: clamp(14px, 3vw, 44px); flex-wrap: wrap;
}
.cookie-banner__copy { flex: 1 1 320px; min-width: 0; color: #e9f0d8; }
.cookie-banner__copy strong { display: block; font-size: 15px; letter-spacing: -.01em; }
.cookie-banner__copy p { margin: 4px 0 0; font-size: 12px; line-height: 1.6; color: #e9f0d8bb; }
.cookie-banner__copy a { color: #ffe79b; }
.cookie-banner__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.cookie-banner button {
  height: 40px; padding: 0 22px; border-radius: 999px; cursor: pointer;
  font: 700 13px/1 inherit; letter-spacing: .04em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.cookie-banner__decline { border: 1px solid #ffe6924d; background: none; color: #e9f0d8; }
.cookie-banner__decline:hover { background: #ffe69216; }
.cookie-banner__accept { border: 0; background: #1f7d4f; color: #fff; box-shadow: 0 0 18px #2fbf8a4d; }
.cookie-banner__accept:hover { background: #26945e; transform: translateY(-1px); }
.cookie-banner button:focus-visible { outline: 2px solid #ffe7a1; outline-offset: 3px; }

@media (max-width: 860px) {
  .cookie-banner__inner { padding: 14px 18px; gap: 12px; }
  .cookie-banner__actions { width: 100%; }
  .cookie-banner__actions button { flex: 1 1 0; padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-banner { transition: none; }
}

/* ══ Play, always in the top bar ══════════════════════════════════════════
   The game has to be one press away from every screen and every page, so the
   button lives in the header rather than only in the hero and the closing
   screen. It keeps its place on a phone, where the nav collapses. */
.header-play {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  height: 40px; padding: 0 20px; border-radius: 999px;
  background: linear-gradient(180deg, #2a9a63, #157245);
  box-shadow: inset 0 1px 0 #ffffff3d, 0 0 0 1px #ffe6924d, 0 6px 18px #04221a66;
  color: #fff; font-size: 13px; font-weight: 750; letter-spacing: .06em;
  text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.header-play span { font-size: 15px; line-height: 1; }
.header-play:hover { background: linear-gradient(180deg, #31ad70, #18834e); transform: translateY(-1px); box-shadow: inset 0 1px 0 #ffffff4d, 0 0 0 1px #ffe692a6, 0 10px 24px #04221a7a; }
.header-play:focus-visible { outline: 2px solid #ffe7a1; outline-offset: 3px; }

@media (max-width: 860px) {
  .header-play { height: 34px; padding: 0 14px; font-size: 11px; letter-spacing: .04em; }
  .header-actions { gap: 8px; }
}
@media (max-width: 380px) {
  .header-play { padding: 0 11px; }
}

/* The header's last column was sized for one round button. With Play beside
   the music control the actions need their own width, and the nav has to be
   allowed to give it up rather than be overlapped. */
.site-header { grid-template-columns: 190px minmax(0, 1fr) auto; }
.main-nav { min-width: 0; }
@media (min-width: 861px) and (max-width: 1280px) {
  .main-nav { gap: clamp(12px, 1.3vw, 22px); }
  .main-nav a { font-size: clamp(11px, .78vw, 14px); letter-spacing: .06em; }
}

/* Nine sections plus the Play button need the nav tighter than it was: at
   1440 it was 100px wider than its column and the last items slid under the
   button. The gap carries the saving, so the labels keep their size. */
@media (min-width: 861px) {
  .main-nav { gap: clamp(10px, 0.95vw, 24px); }
  .main-nav a { font-size: clamp(11px, .76vw, 16px); letter-spacing: .07em; }
}

/* ══ The bar collapses earlier now ════════════════════════════════════════
   Nine sections and the Play button stop fitting across below about 1200px:
   measured at 1024 the nav ran 76px past its column and the last labels slid
   under the button. Rather than shrink the labels until they cannot be read,
   the nav folds into the menu it already has, and the bar keeps the logo,
   Play, the sound control and the menu. */
@media (min-width: 861px) and (max-width: 1200px) {
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto;
    display: none; padding: 22px;
    background: rgba(3, 37, 26, .97);
    border-bottom: 1px solid var(--line);
    z-index: 49;
  }
  .site-header.menu-open .main-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 18px; }
  .main-nav a { padding: 12px 0; font-size: 13px; }
  .menu-button { display: grid; }
  .site-header { grid-template-columns: 170px 1fr auto; }
}

/* ══ Phone, portrait: the hero figure must be whole ═══════════════════════
   The cut-out fills its canvas edge to edge, so any part of the box pushed
   off-screen cuts the character. It had `right: -30%` and ran 110px past the
   right edge, which took half of Aelen's face with it. The figure now sits
   fully inside the screen, sized by its width so its own proportions decide
   the height. */
@media (max-width: 860px) {
  .hero-aelen {
    right: -2%; bottom: -2%;
    width: 74vw; height: auto;
    opacity: .9;
  }
  .hero-aelen > img {
    position: relative; right: auto; bottom: auto;
    width: 100%; height: auto; object-fit: contain;
  }
  .hero-aelen__halo { width: 86%; right: 6%; top: 2%; }
}

/* ══ Phone, portrait: a stacked hero that does not overlap ════════════════
   With the figure whole, its head landed behind the CTA. On a phone the
   three things each get their own band instead: the copy sits in the upper
   half, the figure stands in the lower one, and nothing covers a face. */
@media (max-width: 860px) {
  .hero-copy {
    top: calc(var(--header-h) + 18px);
    transform: none;
    left: 22px;
    width: calc(100% - 44px);
  }
  .hero-logo { width: min(60vw, 268px); margin-bottom: 12px; }
  .hero-copy h1 { font-size: clamp(27px, 7.6vw, 34px); line-height: 1.12; }
  .hero-copy .forest-button { margin-top: 16px; }

  .hero-aelen {
    right: 0; bottom: 0;
    width: min(62vw, 300px); height: auto;
    opacity: .95;
  }
  .hero-aelen__halo { width: 84%; right: 8%; top: 4%; }
}

/* ─────────────── PHONE LEGIBILITY PASS ───────────────
   The phone layout was the desktop composition shrunk to fit: measured at
   393×852, 67 pieces of copy came out under 9px and seven of them at 5px —
   small enough that the name of a Forest Lord is a smudge. A phone is read at
   arm's length, so nothing the player has to READ is left under 9px below.

   Card faces are deliberately NOT raised. A Card drawn small on a battlefield
   is a picture of a Card; blowing up its printed rules would stop it looking
   like one. The rule text a player actually needs is in the panel beside it.

   This block is last in the file on purpose: it is a correction over the
   earlier phone rules, and each selector matches one of them exactly. */
@media (max-width: 860px) {
  /* Section copy — the sentence that explains the screen. */
  .path-intro > p:last-child,
  .collection-intro > p:last-of-type { font-size: 12.5px; line-height: 1.5; }
  .eyebrow { font-size: 9px; }

  /* The Forest World Path. The seven node labels were 5px and overlapped each
     other; the encounter's name is already set large in the card beside the
     map, so the map keeps the faces and drops the illegible captions. */
  .path-node small { display: none; }
  .path-node { width: 54px; }
  /* The first and last medallions sat against the screen edge and their lit
     ring was sliced; the map is inset so the whole ring has room. */
  .path-route { right: 22px; left: 22px; }
  .path-node span { width: 23px; height: 23px; font-size: 9px; }
  /* The Forest Lord was hung 15vw off the right edge: of a 273px square
     painting, 73px — better than a quarter of it — stood outside the screen,
     and on the Lords whose head sits right of centre that landed on the face.
     The painting is brought fully onto the screen; its width is set by the
     box's own left/right insets (which differ per Lord, 6%–14%), so the box
     height comes down with the width or `object-fit: fill` would squash it.
     It costs the Lord about 40px of height and it costs him no face. */
  .path-feature__portrait { top: 35%; right: 22px; width: 49vw; height: 27.5%; }
  .path-feature__copy > span { font-size: 10px; }
  .path-feature__copy > p { margin-top: 5px; font-size: 9.5px; }
  .path-feature__copy small { font-size: 10.5px; line-height: 1.4; }
  .path-feature__copy { width: 46vw; padding: 14px 13px 15px; }

  /* My Cards. The shelf names were the other 5px set. */
  .collection-showcase { top: calc(var(--header-h) + 246px); }
  /* The shelf is a fanned hand of eight Cards. Eight of anything readable
     will not stand in a row 393px wide — measured, the end Cards were sliced
     by the screen edge — so on a phone the hand becomes two rows of four and
     stops fanning. The names come off with the fan: the Card the player has
     chosen is named in full in the panel directly above, and a name set small
     enough to sit under an 82px thumbnail is a smudge either way. */
  .collection-shelf {
    bottom: 2px;
    height: 232px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-content: end;
    align-items: end;
    gap: 8px 7px;
    padding: 0 12px;
  }
  .collection-shelf::before { display: none; }
  .collection-tile { width: 100%; height: auto; }
  .collection-tile:nth-child(1),
  .collection-tile:nth-child(2),
  .collection-tile:nth-child(4),
  .collection-tile:nth-child(5) { transform: none; }
  .collection-tile:hover,
  .collection-tile:focus-visible,
  .collection-tile.is-active { transform: translateY(-8px) scale(1.06); }
  .collection-tile small { display: none; }
  .collection-detail { min-height: 262px; }
  .collection-detail__topline { font-size: 9px; }
  .collection-detail > p:nth-of-type(1) { margin-top: 12px; font-size: 9.5px; }
  .collection-detail__rule { font-size: 11px; line-height: 1.4; }
  .collection-keywords span { padding: 6px 8px; font-size: 9px; }
  .collection-owned { font-size: 9px; }
  .collection-view button b { font-size: 10px; }

  /* My Deck. The title wraps to two lines at this width and its second line
     was landing on Orwyn's avatar — measured, 1px apart. The board starts
     lower so the title keeps its own band. */
  .battle-movie { inset: calc(var(--header-h) + 102px) 0 0; }

  /* My Deck — the coaching line beside the board, not the board's own cards. */
  .movie-identity div span { font-size: 9px; }
  .movie-coach small { font-size: 9px; }
  .wayfarer-picks span { font-size: 9.5px; }
  .begin-copy .eyebrow { font-size: 9px; }
  .battle-movie .movie-turn { font-size: 9.5px; }

  /* Journey Completion. */
  /*
   * THE CAPTION HAS TO FIT THE CIRCLE, NOT THE BOX. At 9px it measured exactly
   * 118px — the full width of a 118px dial — so its two lines ran out over the
   * gold rim on every phone, which is the one place this dial is read. The box
   * never overflowed; the CIRCLE did. Held to 76px so both lines sit inside the
   * curve at the height they land.
   */
  .journey-gauge__inner small {
    max-width: 70px;
    margin-top: 1px;
    font-size: 8px;
    letter-spacing: .06em;
    line-height: 1.12;
    text-align: center;
  }
  /* The «100 %» gives back the height the caption needs to sit inside the curve. */
  .journey-gauge__inner strong { font-size: 28px; }
  .journey-gauge__inner img { width: 30%; }
  .journey-reading p { font-size: 11px; line-height: 1.45; }
  .journey-reading span,
  .journey-replay span { font-size: 9px; }
  .journey-proof__text small { font-size: 10px; }

  /* Duels, Trove, Store. */
  .duels-fighter figcaption span { font-size: 10px; }
  .duels-lesson .duels-demo small { font-size: 9.5px; }
  .trove-guide-tabs button small { font-size: 9px; }
  .store-categories button small { font-size: 9px; }
  .store-categories button span em { font-size: 9.5px; }
  /* The Gems note was pinned to the bottom of a section held open at a fixed
     1400px, so it floated 142px below the panel it belongs to — and further
     still on the categories whose panel is short. On a phone the Store is a
     column, not a composition, so its three parts are laid out in flow and
     the section is as tall as what is in it. Nothing can then drift. */
  .store-scene { height: auto; min-height: 0; padding-top: var(--header-h); }
  /* `position: relative` keeps the z-index these blocks depend on — made
     static, the Store's title dropped under its own light layer and read as
     a ghost — but `top` and `left` then become OFFSETS, which pushed it 94px
     further down. In flow they are reset. */
  .store-heading { position: relative; inset: auto; margin: 24px 22px 0; }
  .store-layout {
    position: relative;
    top: auto; right: auto; bottom: auto; left: auto;
    margin: 24px 18px 0;
  }
  .store-currency-note {
    position: relative;
    left: auto; right: auto; bottom: auto;
    margin: 36px 22px 34px;
  }

  /* Enter the Forest. All six creatures stood in a block BELOW the button, so
     the screen read as a button with a picture under it. They are placed
     around the button instead: two flying ones beside the logo at the top,
     the two largest closing in under the button on either side, and two along
     the bottom. The inset percentages look odd because every creature is also
     scaled 1.16 about its own centre, which hangs 8% of its width past each
     edge of its box — these numbers put the painting's real edge on the
     screen, and the measurement is in the acceptance checklist. */
  .begin-scene { min-height: 900px; }
  .begin-copy { z-index: 6; }

  /* Placed as shares of the screen, not in points, so a tall phone does not
     leave a band of empty ground under them. */
  .begin-character--veilwing { left: 2.7%; top: 10.7%; bottom: auto; width: 34%; height: 14%; }
  .begin-character--fanback  { right: 2.7%; top: 9.3%; bottom: auto; width: 34%; height: 14%; }

  .begin-character--cub      { left: 3.5%; top: 51.8%; bottom: auto; width: 44%; height: 21%; }
  .begin-character--drifter  { right: 3.5%; top: 50.2%; bottom: auto; width: 44%; height: 21%; }

  .begin-character--hexapod  { left: 3.2%; top: 69.8%; bottom: auto; width: 40%; height: 19%; }
  .begin-character--prancer  { right: 3.2%; top: 72%; bottom: auto; width: 40%; height: 19%; }

  /* Your Wayfarer, the same column as the rest: the painting takes whatever
     the heading leaves instead of hanging off the bottom of the screen. */
  .wayfarer {
    display: flex;
    flex-direction: column;
    padding-top: var(--header-h);
  }
  .wayfarer-intro { position: relative; inset: auto; width: auto; margin: 14px 20px 0; }
  .wayfarer-stage {
    position: relative;
    inset: auto;
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    margin-top: 8px;
  }
  .wayfarer-picks { position: relative; inset: auto; width: auto; margin: 0 14px 24px; }

  .begin-back { font-size: 10px; }
}

/* ══ The rectangle that blinked behind a Wayfarer ═══════════════════════════
   Pressing a Wayfarer flashed the painting's bare rectangle, frame edges and
   all, for one frame. The paintings are not cut-outs — they are rectangular
   pictures feathered by a CSS mask — and both arrival animations were
   animating `filter` on the masked image. A filter builds its own rendering
   context, and on the frame where that context is created the mask has not
   been applied yet, so the raw rectangle is what gets painted. The brightness
   flash then lit that one frame up, which is why it read as a blink.

   The cure is that the masked image is never handed an animated filter: the
   arrival is opacity and position only, and the static drop-shadows stay on
   the base rule where they never change. Redefined here, last in the file,
   because a later @keyframes block of the same name replaces the earlier one.
   The same defect sat in Duels, written the same way, so it is fixed with it. */
@keyframes wayfarer-arrive {
  0%   { opacity: 0; translate: 0 26px; }
  100% { opacity: 1; translate: 0 0; }
}
@keyframes duels-arrive {
  from { opacity: 0; transform: translateX(22px); }
  to   { opacity: 1; transform: none; }
}

/* ══ The phone is not 852 points tall ══════════════════════════════════════
   The pass above was measured at 393×852 — the iPhone's SCREEN. Safari keeps
   its address bar and its toolbar, so the page gets about 660, and every
   offset written as a fixed number of pixels against a section sized in
   `svh` went wrong at once: the coaching line landed on a Card, the button
   landed on the hero's face, and the shelf landed on the Card it describes.
   One cause, three symptoms, and she met all three on her own phone.

   What follows is sized so it holds from a 620-point page to a 900-point one.
   Where something cannot shrink any further, the section is given a floor and
   the page scrolls — an overlap is a defect, a scroll is a phone. */
@media (max-width: 860px) {
  /* The first screen. Subtracting a fixed 494px was still a guess about how
     many lines the headline takes, and at 412 and 430 points wide it took one
     more and the button came back onto his face. Nothing here is a number any
     more: the copy is laid out in flow and takes what it needs, the figure is
     given everything left over, and `object-fit: contain` makes the painting
     fit that space whatever its shape. It cannot overlap the copy at any
     width or any height, because it is never given the copy's space. */
  .hero {
    display: flex;
    flex-direction: column;
    padding-top: var(--header-h);
  }
  .hero-copy {
    position: relative;
    top: auto; left: auto;
    transform: none;
    width: auto;
    margin: 18px 22px 0;
  }
  .hero-aelen {
    position: relative;
    inset: auto;
    flex: 1 1 0;
    width: 100%;
    min-height: 0;
    height: auto;
    /* so the button's lower edge never grazes the top of his head */
    margin-top: 14px;
    opacity: .95;
  }
  .hero-aelen > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom right;
  }

  /* My Deck. The board's parts were a mix of pixels and percentages, so on a
     short screen the two Card rows collapsed onto each other and the played
     Card flew up THROUGH the coaching line — 42vh of travel against a plaque
     fixed at 68px. The rows are pinned, the flight is a fixed distance that
     keeps the Card below the plaque at every height in range, and the board
     has a floor under it. */
  .battle { min-height: 752px; }
  /* 148, not 132: a Card lunges 16px upward when it attacks, and that lunge
     was what still reached the plaque. The row is placed for the lunge. */
  .movie-row--foe { top: 148px; }
  .movie-row--self { bottom: max(245px, 27%); }
  .battle[data-battle-phase="play"] .hand-card--canopy {
    transform: translate(-50%, -220px) scale(1.12);
  }
  /* And the Card that attacks lunges 28% of the SCREEN's height, which on a
     tall phone carried it 210px up — straight under the plaque. The lunge is
     a distance now, chosen so its peak stays below the plaque on the shortest
     board the layout allows, and it is still longer than the Card is tall. */
  @keyframes table-card-strike {
    45% { transform: translateY(-115px) scale(1.04); filter: brightness(1.35) drop-shadow(0 0 14px #ffe580); }
    75% { transform: translateY(-28px) scale(.98); }
  }

  /* My Cards. Same root, same cure: the showcase started 246px below the
     header, which is a guess about the headline, and at 320 points wide the
     headline took the extra line and the intro landed on the Card. The intro
     is in flow and the showcase takes the rest; inside it the Card, the panel
     and the shelf each take a share, so none of them can climb onto another. */
  .collection-scene {
    display: flex;
    flex-direction: column;
    padding-top: var(--header-h);
  }
  .collection-intro {
    position: relative;
    top: auto; left: auto;
    width: auto;
    margin: 20px 20px 0;
  }
  /* Shares of the showcase were still numbers, and the Card did not obey
     them: a Card keeps its proportions, so its height follows its WIDTH, and
     it grew straight out of the share it was given and down onto the shelf —
     and again every time the next Card was dealt. The showcase is a grid
     instead: the Card and its panel are one row, the shelf is the next, and
     each row is as tall as what stands in it. Nothing is a percentage, so
     nothing can outgrow its share; the section grows with them. */
  .collection-scene { height: auto; min-height: 100svh; }
  .collection-showcase {
    position: relative;
    inset: auto;
    flex: 0 0 auto;
    width: auto;
    min-height: 0;
    margin: 16px 12px 20px;
    display: grid;
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
    /* the row gap swallows the dip a Card makes as it is dealt */
    gap: 26px 12px;
    align-items: start;
  }
  .collection-hero {
    position: relative;
    inset: auto;
    grid-area: 1 / 1;
    width: auto;
    height: auto;
  }
  .collection-detail {
    position: relative;
    inset: auto;
    grid-area: 1 / 2;
    width: auto;
    height: auto;
    min-height: 0;
  }
  .collection-shelf {
    position: relative;
    inset: auto;
    grid-area: 2 / 1 / 3 / -1;
    height: auto;
    padding: 0;
  }
  /* and the dip itself is shortened, because on a phone the Card is dealt
     into a space measured in tens of points, not hundreds */
  @keyframes collection-card-reveal {
    0%   { opacity: .28; transform: translateY(14px) rotate(5deg) scale(.9); filter: brightness(1.6) drop-shadow(0 0 24px #fff3ad); }
    62%  { opacity: 1; transform: translateY(-5px) rotate(-2deg) scale(1.02); }
    100% { transform: rotate(-1.5deg); }
  }

  /* «Owned · 2 copies» was pinned to the bottom of the panel while the rest
     of the panel flowed from the top, so on a narrow screen the keywords grew
     down into it. The panel is a column and the line is its last item: it sits
     at the bottom because everything above it has taken its room, not because
     of a number. */
  .collection-detail {
    display: flex;
    flex-direction: column;
    padding: 16px 16px 15px;
  }
  .collection-owned {
    position: relative;
    right: auto; bottom: auto; left: auto;
    margin-top: auto;
    padding-top: 10px;
  }

  /* The Trove. The gallery was pinned 660px down a section held open at
     1350, and the painting's frame was a tall box whatever stood in it — so
     a Treasure, which is SQUARE, sat at the bottom of it with a third of the
     frame empty above. The Trove is a column, the frame takes the shape of
     what it holds, and the caption follows the art instead of floating below
     a hole. */
  .trove-scene {
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding-top: var(--header-h);
  }
  .trove-intro { position: relative; inset: auto; margin: 24px 22px 0; }
  .trove-gallery {
    position: relative;
    inset: auto;
    width: auto;
    margin: 20px 16px 26px;
    grid-template-rows: auto 69px;
  }
  /* The frame is a grid of three rows — art, caption, story link — and its
     first row was `1fr` of a box whose height came from somewhere else. A
     Treasure is square and a Legend is tall, so whichever one was standing
     there, the row was the wrong size and the difference showed as a hole.
     Every row is `auto` now: each one is as tall as what is in it, and the
     art carries its own proportions instead of being poured into a box. */
  .trove-painting {
    aspect-ratio: auto;
    height: auto;
    grid-template-rows: auto auto auto;
    align-content: start;
    /* the rows must be allowed to fill the width, or the art's own box has
       no width to take its proportions from and collapses to nothing */
    justify-items: stretch;
  }
  /* The art was absolutely positioned inside that row, which is why the row
     had to be given a height in the first place. It stands in the row now,
     so the row can be as tall as the art and not a point taller. */
  .trove-art-space {
    width: 100%;
    min-height: 0;
    height: auto;
    grid-template-rows: auto;
    align-items: start;
    /* `container-type: size` is size CONTAINMENT: the box is forbidden to
       take its height from what is inside it. That is why the row stayed at
       zero however the art was sized. The art no longer needs container
       units here, so the containment goes. */
    container-type: normal;
  }
  .trove-art-mount {
    position: relative;
    inset: auto;
    transform: none;
    width: 100%;
    height: auto;
    margin: 0 auto;
  }
  .trove-main-art { position: relative; inset: auto; width: 100%; height: auto; }
  .trove-painting[data-kind="Treasure"] .trove-art-mount {
    width: min(100%, 420px);
    /* `height` must be named here: the earlier rule for a Treasure sets it in
       container units, and a container of no height makes it zero — which is
       exactly how the Treasure vanished. */
    height: auto;
    aspect-ratio: 1;
  }
  .trove-painting[data-kind="Treasure"] .trove-main-art {
    position: absolute;
    inset: 8%;
    width: 84%;
    height: 84%;
  }

  /* The header. At 320 points the three blocks asked for 388 and the menu
     button stood off the edge of the screen. They are a row that gives the
     logo what is left, rather than three fixed columns. */
  .site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-inline: 14px;
  }
  .header-brand { width: clamp(88px, 29vw, 112px); flex: 0 0 auto; }
  .header-actions { flex: 0 0 auto; gap: 7px; }
}

@media (max-width: 380px) {
  .header-play { padding-inline: 12px; font-size: 11px; letter-spacing: .04em; }
  .menu-button { width: 38px; height: 38px; }

  /* My Deck, the same way. The board keeps a floor under it, because its own
     pieces are a fixed size, and the section grows rather than squeezing it. */
  .battle {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: max(752px, 100svh);
    padding-top: var(--header-h);
  }
  .battle-heading {
    position: relative;
    top: auto; left: auto;
    width: auto;
    margin: 14px 20px 0;
  }
  .battle-movie {
    position: relative;
    inset: auto;
    flex: 1 1 0;
    min-height: 580px;
  }
}
