/* Wickborn, the game's page on smerdevstudio.com/Wickborn/.
   The layout follows Weird Summer's page (/weirdsummer/); the look is Wickborn's own: the title screen's night
   painting, the game's painted brass-and-parchment UI (Art Track/UI, used here as 9-slice frames and buttons),
   lantern gold and moss green on dark, Cinzel for titles and Alegreya for text. */

@font-face {
  font-family: "Cinzel";
  src: url("assets/fonts/Cinzel-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya";
  src: url("assets/fonts/Alegreya-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya";
  src: url("assets/fonts/Alegreya-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --night: #0b1120;
  --night-2: #141d33;
  --dusk-a: #0e1828;
  --dusk-b: #1d2446;
  --ink: #2b1c12;
  --ink-soft: #5a4330;
  --parchment: #dcc59a;
  --cream: #ead8b0;
  --text: #e9dcc0;
  --muted: #bcae92;
  --brass: #c8913a;
  --brass-deep: #7d5020;
  --amber: #ffb45a;
  --lantern: #ffd98a;
  --teal: #3e7f8c;
  --hood: #c8321f;
  --moss: #8fd46a;
  --rune: #6fe3ee;
  --body: "Alegreya", Georgia, "Times New Roman", serif;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --top: 64px;
  /* The game's painted frames (Art Track/UI): a parchment page and a smoked-glass page, both with brass corners. */
  --page: url("assets/img/ui/wb_page.webp");
  --page-dark: url("assets/img/ui/wb_page_dark.webp");
  --brass-rim: linear-gradient(145deg, #f3d48e 0%, #a8722e 34%, #e0ad5c 58%, #6a4319 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 500 18px/1.6 var(--body);
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--lantern); }
strong { font-weight: 700; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; }
h2 { font-size: clamp(28px, 3.8vw, 44px); color: var(--lantern); letter-spacing: 0.01em; text-wrap: balance; }
h3 { font-size: 20px; letter-spacing: 0.02em; }
p { margin: 0 0 1em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--parchment); color: var(--ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--lantern); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ---------------------------------------------------------------- frames
   Cards are drawn with the game's parchment page (--page) or smoked-glass page (--page-dark) as a 9-slice:
   `border-image: var(--page) 128 fill / 40px / 0 round`. The painted corners sit in a 40px band (the sprite's
   128px border at 5/16 scale), so each card's padding keeps its content inside them.
   Screenshots sit in a thin brass rim. */
.frame { padding: 4px; background: var(--brass-rim); border-radius: 8px; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38); }
.frame > img, .frame > video { width: 100%; border-radius: 5px; background: #000; }

/* ---------------------------------------------------------------- buttons
   The game's lit amber plate and its dark glass plate (UI_WB/plate_lit, plate_dark), 9-sliced. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 14px 32px;
  border-image: url("assets/img/ui/wb_plate_lit.webp") 45 53 fill / 16px 19px / 0 stretch;
  color: var(--ink);
  font: 700 16px/1.1 var(--display); letter-spacing: 0.06em; text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 230, 180, 0.6);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:hover { filter: brightness(1.08) saturate(1.05); transform: translateY(-1px); }
.btn:active { transform: translateY(2px); filter: brightness(0.94); }
.btn-dark {
  border-image-source: url("assets/img/ui/wb_plate_dark.webp");
  color: var(--cream); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.btn-small { min-height: 44px; padding: 10px 22px; font-size: 13px; border-image-width: 13px 16px; }
.btn-big { min-height: 62px; padding: 18px 38px; font-size: 17px; border-image-width: 18px 22px; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--top);
  display: flex; align-items: center; gap: 16px;
  padding: 0 max(16px, env(safe-area-inset-left));
  background: rgba(11, 17, 32, 0.84);
  backdrop-filter: saturate(1.3) blur(10px); -webkit-backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid rgba(200, 145, 58, 0.45);
}
.studio { display: inline-flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font: 700 15px/1 var(--display); letter-spacing: 0.04em; }
/* The studio's SD mark (/brand/, on the homepage's scripts/brand_mark.py): transparent, sized by height. */
.studio img { width: auto; height: 26px; }
.topbar nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.topbar nav a:not(.btn) { color: var(--cream); text-decoration: none; font: 700 13px/1 var(--display); letter-spacing: 0.08em; padding: 10px 12px; border-radius: 999px; white-space: nowrap; }
.topbar nav a:not(.btn):hover { color: var(--lantern); background: rgba(255, 217, 138, 0.08); }
.topbar nav .btn { margin-left: 10px; white-space: nowrap; }
/* The main theme's button (site.js): playing, the speaker's waves glow; off, a cross. */
.topbar nav { order: 1; }
.sound {
  order: 2; margin-left: 6px; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 15px 0 12px;
  border: 2px solid var(--brass); border-radius: 999px; background: var(--night-2); color: var(--cream);
  font: 700 12px/1 var(--display); letter-spacing: 0.08em; cursor: pointer; transition: color 0.15s ease, box-shadow 0.15s ease;
}
.sound svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sound .sound-body { fill: currentColor; }
.sound .sound-waves { display: none; }
.sound:hover { color: var(--lantern); }
.sound:focus-visible { outline: 2px solid var(--lantern); outline-offset: 2px; }
.sound[aria-pressed="true"] { color: var(--lantern); box-shadow: 0 0 16px rgba(255, 200, 110, 0.4); }
.sound[aria-pressed="true"] .sound-waves { display: inline; }
.sound[aria-pressed="true"] .sound-mute { display: none; }
.menu { order: 3; }
.menu { display: none; margin-left: auto; width: 46px; height: 42px; border: 2px solid var(--brass); border-radius: 10px; background: var(--night-2); cursor: pointer; }
.menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--lantern); margin: 0 auto; position: relative; transition: transform 0.2s ease; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -7px; }
.menu-bars::after { top: 7px; }
.menu[aria-expanded="true"] .menu-bars { background: transparent; }
.menu[aria-expanded="true"] .menu-bars::before { transform: translateY(7px) rotate(45deg); }
.menu[aria-expanded="true"] .menu-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; min-height: 100svh;
  display: grid; place-items: end center;
  padding: calc(var(--top) + 32px) 16px 96px;
  text-align: center;
  isolation: isolate; overflow: hidden;
}
.hero-art {
  position: absolute; inset: 0; z-index: -2;
  background: #0d1526 url("assets/img/hero-tall.webp") 62% 50% / cover no-repeat;
  animation: drift 30s ease-in-out infinite alternate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(8, 12, 24, 0.35) 0%, rgba(8, 12, 24, 0) 26%, rgba(8, 12, 24, 0.55) 58%, rgba(8, 12, 24, 0.94) 100%);
}
@keyframes drift { from { transform: scale(1.03) translateX(-0.8%); } to { transform: scale(1.07) translateX(0.8%); } }
.hero-inner { width: min(860px, 100%); }
.hero h1 { margin: 0 auto 10px; }
.logo { width: min(560px, 90%); margin: 0 auto; filter: drop-shadow(0 8px 26px rgba(0, 0, 0, 0.6)); }
/* Ryan, 2026-10-27: Wickborn is a series of three, and this is the first. */
.episode { display: block; margin-top: 2px; font: 700 clamp(16px, 2vw, 22px)/1.2 var(--display); letter-spacing: 0.08em; color: var(--cream); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85); }
.tagline { font: 700 clamp(22px, 3.2vw, 34px)/1.25 var(--display); color: var(--lantern); margin: 6px 0 12px; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8); }
.lede { font-size: clamp(18px, 2vw, 21px); margin: 0 auto 22px; max-width: 32em; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); }
.chips { list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chips li {
  background: rgba(10, 15, 28, 0.78); color: var(--cream);
  font: 700 13px/1.2 var(--display); letter-spacing: 0.06em;
  padding: 10px 16px; border: 1px solid var(--brass); border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}
.chips .chip-now { display: inline-flex; align-items: center; gap: 9px; color: var(--lantern); }
.chips .chip-now::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--lantern); box-shadow: 0 0 10px 3px rgba(255, 190, 90, 0.75); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (max-width: 699px) {
  /* Phones: the logo and tagline over the sky, Fen on the cliff in full view below them, and the rest of the
     words after the painting fades into the night. */
  .hero { display: block; min-height: 0; padding: calc(var(--top) + 28px) 16px 56px; }
  .hero-art { bottom: auto; height: min(100svh, 860px); background-position: 64% 100%; }
  /* 60px longer than the painting, so its slow drift (a scale) never shows an edge below the fade. */
  .hero::before {
    bottom: auto; height: calc(min(100svh, 860px) + 60px);
    background: linear-gradient(180deg, rgba(8, 12, 24, 0.6) 0%, rgba(8, 12, 24, 0.15) 30%, rgba(8, 12, 24, 0) 50%, rgba(8, 12, 24, 0.7) 78%, var(--night) calc(100% - 60px));
  }
  .tagline { margin-bottom: max(220px, calc(min(100svh, 860px) - 420px)); }
  .scroll-hint { display: none; }
}
@media (min-width: 700px) {
  .hero-art { background-image: url("assets/img/hero.webp"); background-position: 60% 50%; }
}
@media (min-width: 900px) {
  /* Wide screens: the words over the dark forest on the left, so Fen on the cliff and the Spire stay in view. */
  .hero { place-items: center start; text-align: left; padding-left: max(5vw, 32px); }
  .hero::before {
    background:
      linear-gradient(90deg, rgba(8, 12, 24, 0.82) 0%, rgba(8, 12, 24, 0.55) 34%, rgba(8, 12, 24, 0) 58%),
      linear-gradient(180deg, rgba(8, 12, 24, 0.2) 0%, rgba(8, 12, 24, 0) 40%, rgba(8, 12, 24, 0.6) 100%);
  }
  .hero-inner { width: min(620px, 50vw); }
  .logo { margin: 0; width: 100%; }
  .lede { margin-left: 0; }
  .chips, .cta { justify-content: flex-start; }
}
.scroll-hint {
  position: absolute; bottom: 24px; left: 50%; width: 30px; height: 46px; margin-left: -15px;
  border: 2px solid var(--lantern); border-radius: 20px; opacity: 0.8;
}
.scroll-hint::after { content: ""; position: absolute; left: 50%; top: 8px; width: 6px; height: 10px; margin-left: -3px; border-radius: 3px; background: var(--lantern); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ---------------------------------------------------------------- bands */
.band { position: relative; padding: clamp(64px, 9vw, 112px) 0; }
.band-paper { background: var(--parchment) url("assets/img/ui/wb_parchment.webp") 0 0 / 512px repeat; color: var(--ink); }
.band-paper h2 { color: var(--ink); }
.band-night { background: radial-gradient(ellipse at 18% 0%, #1d2a4a 0%, var(--night) 62%); }
.band-dusk { background: linear-gradient(180deg, var(--dusk-a) 0%, var(--dusk-b) 100%); }
.band-ember { background: radial-gradient(ellipse at 30% 40%, #5a3214 0%, #2a170d 55%, #170d08 100%); }
/* Where one band meets the next: a brass rule with the game's title ornament in the middle. */
.band + .band { border-top: 2px solid transparent; border-image: linear-gradient(90deg, transparent, var(--brass-deep) 12%, var(--lantern) 50%, var(--brass-deep) 88%, transparent) 1; }
.band + .band::after {
  content: ""; position: absolute; top: -13px; left: 50%; width: min(420px, 76vw); height: 24px; transform: translateX(-50%);
  background: url("assets/img/ui/hud_title_rule.webp") center / contain no-repeat; z-index: 2; pointer-events: none;
}
/* .band .kicker: a section's own paragraph styles never restyle the label. */
.band .kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 12px;
  color: var(--amber); font: 700 13px/1 var(--display); letter-spacing: 0.22em;
}
.band .kicker::before { content: ""; width: 8px; height: 8px; transform: rotate(45deg); background: currentColor; box-shadow: 0 0 10px currentColor; }
.band-paper .kicker { color: #9a4a17; }
.band-paper .kicker::before { box-shadow: none; }
.intro { max-width: 46em; font-size: 19px; color: var(--muted); margin-bottom: 36px; }
.band-paper .intro { color: var(--ink-soft); }

/* ---------------------------------------------------------------- story */
.story { display: grid; grid-template-columns: 1fr; gap: 40px; }
.story-text { max-width: 52em; }
.story-text h2 { font-size: clamp(26px, 3.4vw, 40px); }
.story-text p { font-size: 19px; }
blockquote {
  margin: 28px 0 0; padding: 34px 34px 26px;
  border-image: var(--page-dark) 128 fill / 40px / 0 round;
  font: 700 clamp(19px, 2.1vw, 23px)/1.45 var(--body); color: var(--lantern);
}
.acts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.act {
  position: relative; padding: 36px 28px 16px;
  border-image: var(--page) 128 fill / 40px / 0 round;
}
.act-num {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  border-image: url("assets/img/ui/wb_plate_dark.webp") 45 53 fill / 12px 14px / 0 stretch;
  color: var(--lantern); font: 700 12px/1 var(--display); letter-spacing: 0.14em; padding: 11px 20px;
}
.act h3 { margin-top: 6px; color: var(--ink); text-align: center; }
.act p { font-size: 17px; color: var(--ink-soft); }
.endings { font: 700 20px/1.35 var(--display); color: var(--ink); text-align: center; margin: 4px 0 0; }

/* ---------------------------------------------------------------- party */
.party { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.hero-card {
  padding: 34px 24px 14px; text-align: center;
  border-image: var(--page-dark) 128 fill / 40px / 0 round;
}
.portrait { position: relative; width: 138px; margin: 0 auto 14px; }
.portrait > img:first-child {
  width: 138px; height: 138px; border-radius: 50%; object-fit: cover;
  border: 4px solid transparent; background: var(--brass-rim) border-box;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6), 0 0 28px var(--glow, rgba(255, 190, 90, 0.35));
}
/* Each hero's in-game sprite, 32x48 at 2x, standing at the portrait's edge. */
.sprite { position: absolute; right: -26px; bottom: -10px; width: 64px; height: 96px; image-rendering: pixelated; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.6)); }
.card-fen { --glow: rgba(255, 120, 70, 0.45); }
.card-bram { --glow: rgba(255, 122, 46, 0.4); }
.card-sable { --glow: rgba(120, 200, 90, 0.4); }
.card-nix { --glow: rgba(91, 184, 255, 0.45); }
.hero-card h3 { color: var(--lantern); margin-bottom: 6px; }
.hero-card h3 span { display: block; margin-top: 4px; font: 700 13px/1.2 var(--display); letter-spacing: 0.1em; color: var(--muted); }
.gear { display: flex; align-items: center; justify-content: center; gap: 8px; font: 700 15px/1.3 var(--body); color: var(--amber); margin-bottom: 10px; }
.gear img { width: 28px; height: 28px; }
.hero-card p { font-size: 16.5px; }
.quote { font-style: italic; color: var(--muted); }
.moth {
  margin-top: 26px; display: grid; grid-template-columns: 150px 1fr; gap: 26px; align-items: center;
  padding: 30px 34px 16px; border-image: var(--page-dark) 128 fill / 40px / 0 round;
}
.moth img { width: 150px; height: 150px; border-radius: 50%; border: 4px solid transparent; background: var(--brass-rim) border-box; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6), 0 0 30px rgba(111, 227, 238, 0.3); }
.moth h3 { color: var(--lantern); }

/* ---------------------------------------------------------------- lantern */
.modes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.modes li { text-align: center; padding: 30px 22px 12px; border-image: var(--page-dark) 128 fill / 40px / 0 round; }
.modes img {
  width: 84px; height: 84px; margin: 0 auto 14px; padding: 12px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #2b3a55, #0b1120 72%);
  box-shadow: 0 0 0 3px var(--brass), 0 0 0 5px rgba(0, 0, 0, 0.6), 0 0 26px rgba(255, 200, 110, 0.35);
}
.modes h3 { color: var(--lantern); }
.modes p { font-size: 16.5px; color: var(--muted); }
.mode-locked img { filter: saturate(0.3) brightness(0.8); box-shadow: 0 0 0 3px var(--brass-deep), 0 0 0 5px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 236, 190, 0.5); }
.glyphs { margin-top: 40px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: center; }
.glyphs h3 { font-size: 26px; color: var(--lantern); }
.glyphs p { font-size: 18px; }
.glyphs strong { color: var(--lantern); }

/* ---------------------------------------------------------------- world */
.clips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 26px; }
.clip .frame { margin-bottom: 16px; }
.clip img { aspect-ratio: 16 / 9; object-fit: cover; }
.clip h3 { margin-bottom: 6px; color: var(--ink); }
.clip p { font-size: 17px; color: var(--ink-soft); }
.route { margin-top: 60px; padding: 34px clamp(26px, 3vw, 44px) 22px; border-image: var(--page-dark) 128 fill / 40px / 0 round; color: var(--text); }
.route h3 { text-align: center; margin-bottom: 24px; font-size: 26px; color: var(--lantern); }
.bosses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.bosses li { text-align: center; font-size: 15.5px; color: var(--muted); }
.bosses img, .unknown { width: 100%; aspect-ratio: 6 / 5; object-fit: cover; border-radius: 6px; margin-bottom: 12px; border: 3px solid transparent; background: var(--brass-rim) border-box; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }
.bosses li span { display: block; font: 700 16px/1.25 var(--display); color: var(--lantern); margin-bottom: 4px; }
.unknown {
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #3a1f5c 0%, #120b22 70%) padding-box, var(--brass-rim) border-box;
  font: 700 64px/1 var(--display); color: #d9b8ff; text-shadow: 0 0 22px #a56cff, 0 0 4px #fff;
}

/* ---------------------------------------------------------------- features */
.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.features li { padding: 34px 26px 16px; border-image: var(--page) 128 fill / 40px / 0 round; color: var(--ink); }
.features h3 { font-size: 18px; color: var(--ink); margin-bottom: 8px; }
.features p { font-size: 16.5px; color: var(--ink-soft); }

/* ---------------------------------------------------------------- music */
.music { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.music p { font-size: 19px; color: var(--muted); }
.player { padding: 34px 34px 30px; border-image: var(--page-dark) 128 fill / 40px / 0 round; }
.track { font: 700 22px/1.2 var(--display); margin-bottom: 14px; color: var(--lantern); }
.track span { font: 500 16px var(--body); color: var(--muted); }
.player audio { width: 100%; }

/* ---------------------------------------------------------------- gallery */
.gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery a { display: block; padding: 3px; border-radius: 8px; background: var(--brass-rim); box-shadow: 0 8px 18px rgba(43, 28, 18, 0.35); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.gallery a:hover { transform: translateY(-3px); box-shadow: 0 14px 26px rgba(43, 28, 18, 0.45); }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; background: var(--night); }

.lightbox { width: min(1400px, 96vw); max-height: 94vh; padding: 4px; border: 0; border-radius: 10px; background: var(--brass-rim); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); overflow: visible; color: var(--text); }
.lightbox::backdrop { background: rgba(5, 8, 16, 0.86); }
.lightbox figure { margin: 0; background: var(--night); border-radius: 7px; overflow: hidden; }
.lightbox img { width: 100%; max-height: calc(94vh - 64px); object-fit: contain; background: #000; }
.lightbox figcaption { padding: 12px 18px 14px; font-size: 16px; }
.lightbox button {
  position: absolute; z-index: 2; width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  border: 3px solid transparent; background: radial-gradient(circle at 40% 35%, #2b3a55, #0b1120 72%) padding-box, var(--brass-rim) border-box;
  color: var(--lantern); font: 700 28px/1 var(--display); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.lb-close { top: -18px; right: -18px; background: radial-gradient(circle at 40% 35%, #b8442c, #5e1a10 72%) padding-box, var(--brass-rim) border-box !important; color: #fff !important; }
.lb-prev { left: -20px; top: 45%; }
.lb-next { right: -20px; top: 45%; }

/* ---------------------------------------------------------------- coming to iPhone */
.preorder { display: flex; align-items: center; justify-content: center; gap: clamp(24px, 5vw, 56px); flex-wrap: wrap; }
.preorder-icon { width: 180px; height: 180px; border-radius: 40px; border: 4px solid transparent; background: var(--brass-rim) border-box; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6), 0 0 50px rgba(255, 170, 80, 0.45); }
.preorder h2 { font-size: clamp(32px, 4.6vw, 52px); margin-bottom: 12px; text-shadow: 0 0 24px rgba(255, 160, 60, 0.45); }
.preorder p { font-size: 20px; max-width: 28em; }
.preorder strong { color: var(--lantern); }
.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

/* ---------------------------------------------------------------- motion
   The animated backgrounds. site.js fills each band's .fx layer with what drifts there: sky lanterns and embers
   over the hero, stars and embers at night, fireflies at dusk, a warm glow on the ember band, and faint lanterns,
   flames and Eyes on parchment. Only transform and opacity move. A band off screen is paused, and the layer is gone
   with reduced motion. site.js sets --travel (the band's height) on each layer. */
.hero-inner { position: relative; z-index: 1; }
.scroll-hint { z-index: 1; }
.band > .wrap { position: relative; z-index: 1; }
.fx { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.fx i { position: absolute; display: block; }
.fx.paused i, .fx.paused i::before, .fx.paused i::after { animation-play-state: paused; }

/* Sky lanterns, the Tally's own (UI_TALLY/sky_lantern), rising slowly with a swing. */
.fx-lantern {
  left: var(--x); bottom: -60px; width: var(--s); height: var(--s); opacity: 0;
  background: url("assets/img/ui/tally_sky_lantern.webp") center / contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(255, 170, 70, 0.8));
  animation: rise var(--d) linear var(--delay) infinite;
}
/* Embers: small warm sparks that rise and fade. */
.fx-ember { left: var(--x); bottom: -20px; width: var(--s); height: var(--s); border-radius: 50%; opacity: 0; background: #ffcf7a; box-shadow: 0 0 10px 3px rgba(255, 140, 50, 0.6); animation: rise var(--d) linear var(--delay) infinite; }
@keyframes rise {
  0% { opacity: 0; transform: translate(0, 0); }
  10% { opacity: var(--o, 0.9); }
  35% { transform: translate(var(--dx), calc(var(--travel) * -0.35)); }
  70% { transform: translate(calc(var(--dx) * -1), calc(var(--travel) * -0.7)); }
  88% { opacity: calc(var(--o, 0.9) * 0.6); }
  100% { opacity: 0; transform: translate(0, calc(var(--travel) * -1)); }
}
/* Stars. */
.fx-star { left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: #fff; box-shadow: 0 0 6px 1px rgba(200, 220, 255, 0.8); animation: twinkle var(--d) ease-in-out var(--delay) infinite alternate; }
@keyframes twinkle { from { opacity: 0.12; transform: scale(0.55); } to { opacity: 0.9; transform: scale(1); } }
/* Fireflies: the Moss Steps' green. */
.fx-fly { left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: #d8ff9a; box-shadow: 0 0 12px 4px rgba(143, 212, 106, 0.6); animation: wander var(--d) ease-in-out var(--delay) infinite alternate, blink 2.8s ease-in-out var(--delay) infinite alternate; }
@keyframes wander {
  0% { transform: translate(0, 0); }
  33% { transform: translate(var(--dx), var(--dy)); }
  66% { transform: translate(calc(var(--dx) * -0.7), calc(var(--dy) * 0.5)); }
  100% { transform: translate(calc(var(--dx) * 0.4), calc(var(--dy) * -0.8)); }
}
@keyframes blink { from { opacity: 0.15; } to { opacity: 1; } }
/* The ember band's glow: two soft lights breathing. */
.fx-glow {
  inset: -40% -20%;
  background:
    radial-gradient(closest-side, rgba(255, 170, 80, 0.3), transparent 70%) 26% 46% / 50% 70% no-repeat,
    radial-gradient(closest-side, rgba(255, 210, 140, 0.16), transparent 70%) 76% 58% / 44% 60% no-repeat;
  animation: breathe 9s ease-in-out infinite alternate;
}
@keyframes breathe { from { opacity: 0.6; transform: translate(-3%, -2%); } to { opacity: 1; transform: translate(3%, 3%); } }
/* Doodles on parchment: lanterns, flames, Eyes and keys, faint and bobbing. */
.fx-doodle {
  left: var(--x); top: var(--y); width: var(--s); height: var(--s); background: var(--ink); opacity: var(--o);
  -webkit-mask: var(--shape) center / contain no-repeat; mask: var(--shape) center / contain no-repeat;
  animation: bob var(--d) ease-in-out var(--delay) infinite alternate;
}
.fx-doodle.lantern { --shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 2h6v2h2v2h-1v11h1v2h-2v1H9v-1H7v-2h1V6H7V4h2zm1 6v7h4V8z'/%3E%3C/svg%3E"); }
.fx-doodle.flame { --shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c1 4 6 6 6 12a6 6 0 0 1-12 0c0-3 2-5 3-6 0 2 1 3 2 3 0-3-1-6 1-9z'/%3E%3C/svg%3E"); }
.fx-doodle.eye { --shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5c5 0 9 4 10 7-1 3-5 7-10 7S3 15 2 12c1-3 5-7 10-7zm0 3.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7z'/%3E%3C/svg%3E"); }
.fx-doodle.key { --shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7a5 5 0 1 1 4.6 7H13v2h2v2h-2v2h-3v-6.4A5 5 0 0 1 7 7zm2 0a2 2 0 1 0 4 0 2 2 0 0 0-4 0z'/%3E%3C/svg%3E"); }
@keyframes bob { from { transform: translateY(0) rotate(var(--r0)); } to { transform: translateY(-16px) rotate(var(--r1)); } }

/* ---------------------------------------------------------------- footer */
.footer { background: #070b15; color: var(--muted); padding: 44px 0 calc(32px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(200, 145, 58, 0.45); }
.footer-inner { display: grid; gap: 12px; justify-items: center; text-align: center; }
.footer p { margin: 0; font-size: 16px; }
.footer-links { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.footer-links a { color: var(--cream); font: 700 13px/1.8 var(--display); letter-spacing: 0.08em; text-decoration: none; }
.footer-links a:hover { color: var(--lantern); text-decoration: underline; }
.fine { font-size: 14px !important; opacity: 0.75; max-width: 46em; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 1080px) {
  .party, .features, .modes { grid-template-columns: repeat(2, 1fr); }
  .clips { grid-template-columns: repeat(2, 1fr); }
  .bosses { gap: 12px; }
}
/* The top bar's six links and its button need about 1000px; narrower, they fold into the menu. */
@media (max-width: 1020px) {
  .menu { display: block; margin-left: 0; }
  .sound { margin-left: auto; }
  .topbar nav {
    position: absolute; top: var(--top); left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px 16px 18px; background: rgba(11, 17, 32, 0.97); border-bottom: 1px solid var(--brass);
  }
  .topbar nav.open { display: flex; }
  .topbar nav a:not(.btn) { padding: 14px 12px; font-size: 15px; }
  .topbar nav .btn { margin: 8px 0 0; }
}
@media (max-width: 860px) {
  .acts { grid-template-columns: 1fr; gap: 30px; }
  .music, .glyphs { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  /* Five guardians on two rows: two, two, and the one at the top of the Spire across both columns. */
  .bosses { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .boss-unknown { grid-column: 1 / -1; }
  .boss-unknown .unknown { width: calc(50% - 6px); margin-inline: auto; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .party, .features, .clips, .modes { grid-template-columns: 1fr; }
  .moth { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 30px 24px 14px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .studio span { display: none; }
  .sound { width: 46px; padding: 0; justify-content: center; }
  .sound-text { display: none; }
  .chips li { font-size: 12px; padding: 9px 14px; }
  .cta .btn, .store-buttons .btn { width: 100%; text-align: center; text-wrap: balance; }
  .preorder { text-align: center; }
  .preorder p { margin-inline: auto; }
  .store-buttons { justify-content: center; }
  .lb-prev, .lb-next { top: auto; bottom: -24px; }
  .lb-prev { left: 30%; }
  .lb-next { right: 30%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art, .scroll-hint::after { animation: none; }
  .fx { display: none; }
  .btn, .gallery a { transition: none; }
}

/* ---------------------------------------------------------------- Episode Two: the Violet Year's night */
:root {
  --night: #0f0b1e;
  --night-2: #1b1430;
  --dusk-a: #15102a;
  --dusk-b: #2c1f55;
  --rune: #bfa4ff;
  --violet: #c9b2ff;
}
.band-night { background: radial-gradient(ellipse at 18% 0%, #2a1f52 0%, var(--night) 62%); }
.band-ember { background: radial-gradient(ellipse at 30% 40%, #43246f 0%, #1f1238 55%, #120a22 100%); }
.episode { color: var(--violet); }
.chips .chip-now { color: var(--violet); }
.chips .chip-now::before { background: var(--violet); box-shadow: 0 0 10px 3px rgba(190, 160, 255, 0.75); }
.card-fen { --glow: rgba(180, 130, 255, 0.5); }
.card-rook { --glow: rgba(159, 242, 200, 0.4); }
.card-tamsin { --glow: rgba(79, 179, 169, 0.5); }
.card-kip { --glow: rgba(200, 100, 42, 0.5); }

/* The bosses, straight under the hero. */
.strip { background: var(--night); padding: 18px; }
.strip ul { list-style: none; margin: 0 auto; padding: 0; max-width: 1280px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.strip a { display: block; position: relative; padding: 3px; border-radius: 8px; background: var(--brass-rim); text-decoration: none; }
.strip img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; }
.strip span { position: absolute; left: 12px; bottom: 10px; font: 700 15px/1.2 var(--display); letter-spacing: 0.04em; color: var(--cream); text-shadow: 0 1px 8px #000, 0 0 3px #000; }
@media (max-width: 700px) { .strip ul { grid-template-columns: 1fr; } }

/* Lanterns, not the painted item icons: the title screen's own. */
.modes img { object-fit: contain; }

/* The band's heading is longer than Episode One's: the whole block sits centred under the icon. */
#iphone .preorder { text-align: center; justify-items: center; }
#iphone .preorder p { max-width: 620px; margin-inline: auto; }
#iphone .store-buttons { justify-content: center; }
