/* Guardians of Solaria - official site
   Palette and mood from the game's art bible: warm lantern light on a dark slate night, gold trim. */

:root {
  --ink: #101118;
  --slate: #2a2c3a;
  --slate-2: #1b1d27;
  --umber: #3a2c24;
  --amber: #f5a442;
  --gold: #c9a24b;
  --gold-light: #ecd28a;
  --bone: #eadfc8;
  --bone-dim: #b9af9b;
  --crimson: #ff3355;
  --gareth: #d0662c;
  --elora: #4f7cff;
  --alistair: #ffd65a;
  --lyra: #3fcb8e;
  --rare: #4f7cff;
  --epic: #a65cff;
  --legendary: #f5a442;
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  --max: 1180px;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
img, video, canvas { max-width: 100%; display: block; }
img { height: auto; } /* width/height attributes only reserve space; never stretch a narrowed image */
.wrap, .card, .tile, .affix, .realm { min-width: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }
a { color: var(--gold-light); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; color: var(--bone); letter-spacing: 0.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 2.6vw, 1.45rem); }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--bone); max-width: 42rem; }
.muted { color: var(--bone-dim); }
.eyebrow {
  font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 0.8rem; display: inline-flex; align-items: center; gap: 0.6rem;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section { position: relative; padding: clamp(3.5rem, 9vw, 7rem) 0; }
section + section { border-top: 1px solid rgba(201, 162, 75, 0.12); }
.section-head { max-width: 46rem; margin-bottom: clamp(1.5rem, 4vw, 3rem); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.85rem 1.4rem; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.04em; text-decoration: none;
  border: 1px solid rgba(201, 162, 75, 0.5); color: var(--bone); background: rgba(42, 44, 58, 0.7); backdrop-filter: blur(6px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; cursor: pointer; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(245, 164, 66, 0.2); }
.btn-primary { background: linear-gradient(180deg, #ffbf5e, #e38a2a); color: #2b1a08; border-color: #ffd58a; box-shadow: 0 0 0 1px rgba(0,0,0,0.3), 0 10px 30px rgba(245, 164, 66, 0.3); }
.btn-primary:hover { box-shadow: 0 14px 40px rgba(245, 164, 66, 0.45); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-small { padding: 0.55rem 1rem; font-size: 0.8rem; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem var(--gutter); background: rgba(16, 17, 24, 0.94) !important; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 162, 75, 0.28); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: background 0.3s ease;
}
.topbar .brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--bone); font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; }
.topbar .brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(201,162,75,0.5); }
@media (max-width: 520px) { .topbar .brand span { display: none; } }
.topbar nav { display: none; gap: 1.2rem; }
.topbar nav a { color: var(--bone-dim); text-decoration: none; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.02em; }
.topbar nav a:hover { color: var(--amber); }
@media (min-width: 900px) { .topbar nav { display: flex; } }

/* ---------- hero ---------- */
.hero { padding: 0; height: 100vh; height: 100svh; min-height: 540px; display: flex; flex-direction: column; position: relative; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 100%, #3a2c24 0%, #1b1d27 45%, #101118 100%); }
.hero-top { position: relative; z-index: 2; flex: none; text-align: center; padding: 4.4rem var(--gutter) 0; pointer-events: none; }
.hero-top img { pointer-events: auto; }
.hero-scene { position: absolute; inset: 0; }
.hero-scene canvas { width: 100%; height: 100%; touch-action: pan-y; }
.hero-fallback { position: absolute; inset: 0; background: url("../img/screens/01-town.webp") center/cover no-repeat; opacity: 0.55; }
.hero-fallback::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,17,24,0.4), rgba(16,17,24,0.95)); }
.hero-content { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; text-align: center; padding: 6rem var(--gutter) 0.8rem; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(16,17,24,0.55) 55%, rgba(16,17,24,0.92) 100%); }
.hero-content > * { pointer-events: auto; }
.hero-logo { width: min(440px, 56vw); margin: 0 auto; filter: drop-shadow(0 12px 30px rgba(0,0,0,0.6)); }
@media (max-width: 700px) { .hero .hero-logo { width: min(230px, 54vw); } .hero-top { padding-top: 3.9rem; } }
.hero-tag { font-family: var(--font-display); font-size: clamp(0.95rem, 2.4vw, 1.4rem); color: var(--gold-light); letter-spacing: 0.06em; margin: 0.5rem 0 0.2rem; text-shadow: 0 2px 12px rgba(0,0,0,0.8); }
.hero-sub { max-width: 34rem; margin: 0.3rem auto 0.9rem; font-size: 0.95rem; color: var(--bone); text-shadow: 0 2px 10px rgba(0,0,0,0.9); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }
.hero-bottom { position: relative; z-index: 2; flex: none; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 0.2rem var(--gutter) 1rem; pointer-events: none; background: rgba(16,17,24,0.92); }
@media (max-width: 700px) { .hero-picker button { width: 46px; height: 46px; } .hero-actions .btn { padding: 0.7rem 1.1rem; font-size: 0.85rem; } .hero-content { padding-top: 3rem; } .scroll-cue { display: none; } }
.hero-bottom > * { pointer-events: auto; }
.hero-hint { font-size: 0.8rem; color: var(--bone-dim); letter-spacing: 0.08em; text-transform: uppercase; }
.hero-picker { display: flex; gap: 0.5rem; }
.hero-picker button {
  width: 54px; height: 54px; border-radius: 50%; border: 2px solid rgba(201,162,75,0.4); padding: 0; background: var(--slate-2); cursor: pointer;
  overflow: hidden; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.hero-picker button img { width: 100%; height: 100%; }
.hero-picker button:hover, .hero-picker button.active { transform: translateY(-3px) scale(1.06); border-color: var(--c, var(--amber)); box-shadow: 0 0 18px var(--c, var(--amber)); }
.scroll-cue { width: 22px; height: 34px; border: 2px solid rgba(234,223,200,0.5); border-radius: 12px; position: relative; margin-top: 0.3rem; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 6px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--amber); animation: cue 1.6s ease-in-out infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(12px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .scroll-cue::after { animation: none; } }

/* ---------- story ---------- */
.story-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .story-grid { grid-template-columns: 1.05fr 1fr; gap: 3rem; } }
.story-lines { display: grid; gap: 0.9rem; counter-reset: line; }
.story-lines p { position: relative; padding-left: 2.6rem; margin: 0; font-size: 1.05rem; }
.story-lines p::before {
  counter-increment: line; content: counter(line, upper-roman); position: absolute; left: 0; top: 0.1rem;
  font-family: var(--font-display); color: var(--gold); font-size: 0.95rem; width: 2rem; text-align: right;
}
.story-lines strong { color: var(--amber); }
.video-frame { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid rgba(201,162,75,0.35); background: #000; aspect-ratio: 16 / 9; }
.video-frame video { width: 100%; height: 100%; object-fit: cover; }
.video-frame .play {
  position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(180deg, rgba(16,17,24,0.1), rgba(16,17,24,0.6)); border: 0; cursor: pointer; color: var(--bone);
}
.video-frame .play span { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: rgba(245,164,66,0.92); color: #2b1a08; box-shadow: 0 0 40px rgba(245,164,66,0.5); transition: transform 0.2s ease; }
.video-frame .play:hover span { transform: scale(1.08); }
.video-frame .play svg { width: 36px; height: 36px; margin-left: 4px; }
.video-frame.playing .play { display: none; }
.realm-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.4rem; }
.pill { font-size: 0.82rem; padding: 0.35rem 0.8rem; border-radius: 999px; border: 1px solid rgba(201,162,75,0.35); background: rgba(42,44,58,0.6); color: var(--bone); }

/* ---------- guardians ---------- */
.guardian-grid { display: grid; gap: 1.2rem; }
@media (min-width: 640px) { .guardian-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .guardian-grid { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: linear-gradient(180deg, rgba(42,44,58,0.75), rgba(27,29,39,0.9)); border: 1px solid rgba(201,162,75,0.25); border-radius: var(--radius);
  padding: 1.3rem; box-shadow: 0 10px 30px rgba(0,0,0,0.35); position: relative; overflow: hidden;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--c, var(--gold)); opacity: 0.9; }
.gcard { --c: var(--gold); cursor: pointer; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.gcard:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 30px color-mix(in srgb, var(--c) 30%, transparent); }
.gcard .portrait { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.9rem; }
.gcard .portrait img { width: 76px; height: 76px; border-radius: 50%; box-shadow: 0 0 0 3px var(--c), 0 0 24px color-mix(in srgb, var(--c) 50%, transparent); }
.gcard .title { font-family: var(--font-display); font-size: 0.8rem; color: var(--c); letter-spacing: 0.08em; text-transform: uppercase; }
.gcard h3 { margin: 0; }
.gcard .role { color: var(--bone); margin: 0 0 0.9rem; font-size: 0.98rem; }
.gcard .stat { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--bone-dim); border-top: 1px dashed rgba(201,162,75,0.25); padding: 0.4rem 0; }
.gcard .stat b { color: var(--bone); }
.abilities { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-top: 0.9rem; }
.abilities figure { margin: 0; text-align: center; font-size: 0.68rem; line-height: 1.2; color: var(--bone-dim); }
.abilities img { width: 100%; max-width: 56px; margin: 0 auto 0.3rem; border-radius: 50%; box-shadow: 0 0 0 2px rgba(201,162,75,0.4); }
.abilities figure.ult img { box-shadow: 0 0 0 2px var(--c), 0 0 14px var(--c); }

/* ---------- realms ---------- */
.realm-grid { display: grid; gap: 1.2rem; margin-bottom: 2rem; }
@media (min-width: 820px) { .realm-grid { grid-template-columns: repeat(3, 1fr); } }
.realm { display: flex; gap: 1rem; align-items: flex-start; }
.realm img { width: 72px; height: 72px; flex: none; }
.realm h3 { margin-bottom: 0.2rem; }
.realm .range { font-size: 0.8rem; color: var(--amber); letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--font-display); }
.realm p { margin: 0.4rem 0 0; font-size: 0.95rem; color: var(--bone-dim); }
.rules { display: grid; gap: 0.9rem; margin: 0 0 2rem; padding: 0; list-style: none; }
@media (min-width: 720px) { .rules { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .rules { grid-template-columns: repeat(4, 1fr); } }
.rules li { background: rgba(42,44,58,0.5); border: 1px solid rgba(201,162,75,0.2); border-radius: 12px; padding: 1rem 1.1rem; font-size: 0.95rem; }
.rules li b { display: block; color: var(--amber); font-family: var(--font-display); font-size: 0.9rem; margin-bottom: 0.25rem; }
.explorer { background: rgba(27,29,39,0.8); border: 1px solid rgba(201,162,75,0.25); border-radius: var(--radius); padding: 1rem; }
.explorer-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 1rem; }
.explorer-bar .count { margin-left: auto; font-size: 0.85rem; color: var(--bone-dim); }
.chip { border: 1px solid rgba(201,162,75,0.35); background: transparent; color: var(--bone); padding: 0.4rem 0.9rem; border-radius: 999px; font: 700 0.82rem var(--font-body); cursor: pointer; }
.chip.active, .chip:hover { background: var(--gold); color: #1a1408; border-color: var(--gold); }
.dungeon-list { display: grid; gap: 0.6rem; max-height: 520px; overflow: auto; padding-right: 4px; scrollbar-width: thin; }
@media (min-width: 640px) { .dungeon-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .dungeon-list { grid-template-columns: repeat(3, 1fr); } }
.drow { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(0, 38%); gap: 0.6rem; align-items: center; min-width: 0; padding: 0.6rem 0.7rem; border-radius: 10px; background: rgba(42,44,58,0.55); border: 1px solid rgba(201,162,75,0.15); }
.drow .num { font-family: var(--font-display); font-weight: 700; color: var(--gold-light); font-size: 1.1rem; text-align: center; background: rgba(16,17,24,0.6); border-radius: 8px; padding: 0.35rem 0; }
.drow .name { font-weight: 800; font-size: 0.92rem; line-height: 1.25; overflow-wrap: anywhere; }
.drow .meta { font-size: 0.78rem; color: var(--bone-dim); }
.drow .boss { text-align: right; font-size: 0.72rem; color: var(--bone-dim); overflow-wrap: anywhere; }
.drow .boss b { display: block; color: var(--crimson); font-size: 0.82rem; font-weight: 800; }
.drow.r1 { border-left: 3px solid #e0a030; } .drow.r2 { border-left: 3px solid #6fd36c; } .drow.r3 { border-left: 3px solid #ff7a2e; }

/* ---------- 3D scene blocks ---------- */
.scene-block { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(201,162,75,0.3); box-shadow: var(--shadow); background: #0c0d13; }
.scene-block canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; }
.scene-block .scene-fallback { position: absolute; inset: 0; background-size: cover; background-position: center; }
.scene-block .scene-ui { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.8rem; display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: flex-end; background: linear-gradient(180deg, transparent, rgba(16,17,24,0.85)); pointer-events: none; }
.scene-block .scene-ui > * { pointer-events: auto; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--bone-dim); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; background: rgba(12,13,19,0.7); transition: opacity 0.5s ease; }
.loading.done { opacity: 0; pointer-events: none; }
.scene-block .credit { position: absolute; right: 0.6rem; top: 0.5rem; font-size: 0.7rem; color: rgba(234,223,200,0.55); }

/* dungeon diorama: a tall section with a sticky canvas, the camera follows the scroll */
.dungeon-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; align-items: end; }
.dungeon-section { padding: 0; }
.dungeon-section .tall { height: 240vh; height: 240svh; position: relative; }
.dungeon-scene { position: absolute; inset: 0; }
.dungeon-scene canvas { width: 100%; height: 100%; }
.dungeon-copy { position: relative; z-index: 2; padding: 0 var(--gutter) 2.2rem; max-width: 40rem; }
.dungeon-copy .panel { background: rgba(16,17,24,0.72); backdrop-filter: blur(8px); border: 1px solid rgba(201,162,75,0.3); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
@media (max-width: 700px) { .dungeon-copy { padding-bottom: 1rem; } .dungeon-copy .panel { padding: 0.8rem 1rem; } .dungeon-copy h3 { font-size: 1.05rem; margin-bottom: 0.2rem; } .dungeon-copy p { font-size: 0.9rem; } .dungeon-copy .eyebrow { margin-bottom: 0.3rem; } }
.dungeon-copy p { margin: 0; }
.dungeon-copy .step { display: none; }
.dungeon-copy .step.on { display: block; }
.progress { height: 3px; background: rgba(234,223,200,0.15); border-radius: 2px; margin-top: 0.9rem; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--amber); }

/* bosses */
.wrap.stack { display: flex; flex-direction: column; }
.boss-scene, .pets-scene { aspect-ratio: 16 / 9; max-height: 70vh; max-height: 70svh; }
@media (max-width: 819px) {
  .boss-scene, .pets-scene { aspect-ratio: auto; height: 64vh; height: 64svh; min-height: 380px; max-height: none; }
  .wrap.stack .scene-first { order: -1; margin: 0 0 1.3rem; }
  .wrap.stack .section-head { margin-bottom: 1.2rem; }
}
.boss-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.boss-tab { display: flex; align-items: center; gap: 0.5rem; border-radius: 999px; padding: 0.3rem 0.9rem 0.3rem 0.3rem; border: 1px solid rgba(201,162,75,0.35); background: rgba(42,44,58,0.6); color: var(--bone); font: 700 0.82rem var(--font-body); cursor: pointer; }
.boss-tab img { width: 34px; height: 34px; border-radius: 50%; }
.boss-tab.active { border-color: var(--crimson); box-shadow: 0 0 18px rgba(255,51,85,0.35); }
.boss-caption { display: flex; flex-direction: column; gap: 0.1rem; }
.boss-caption b { font-family: var(--font-display); font-size: 1.2rem; color: var(--bone); }
.boss-caption span { font-size: 0.85rem; color: var(--bone-dim); }
.wake { display: grid; gap: 0.8rem; margin-top: 1.5rem; }
@media (min-width: 720px) { .wake { grid-template-columns: repeat(3, 1fr); } }
.wake div { padding: 0.9rem 1rem; border-radius: 12px; background: rgba(42,44,58,0.5); border: 1px solid rgba(255,51,85,0.25); font-size: 0.95rem; }
.wake b { color: var(--crimson); font-family: var(--font-display); font-size: 0.85rem; display: block; margin-bottom: 0.2rem; }

/* ---------- feature sections (text + screenshot) ---------- */
.feature { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .feature { grid-template-columns: 1fr 1fr; gap: 3rem; } .feature.flip > :first-child { order: 2; } }
.shot { border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(201,162,75,0.35); box-shadow: var(--shadow); background: #000; }
.shot img { width: 100%; }
.shot-stack { position: relative; }
.shot-stack .shot + .shot { margin-top: 0.9rem; }
@media (max-width: 899px) {
  .shot-stack { display: flex; gap: 0.8rem; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 0.4rem; }
  .shot-stack::-webkit-scrollbar { display: none; }
  .shot-stack .shot { flex: 0 0 86%; scroll-snap-align: center; margin: 0 !important; }
}
.shot.tall img { max-height: 60vh; max-height: 60svh; object-fit: cover; object-position: top; }
.checks { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.6rem; }
.checks li { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 1rem; }
.checks li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 0.5rem; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.checks img { width: 34px; height: 34px; flex: none; margin-top: -0.2rem; }
.icon-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.2rem; }
.icon-row figure { margin: 0; width: 84px; text-align: center; font-size: 0.72rem; color: var(--bone-dim); line-height: 1.2; }
.icon-row img { width: 64px; height: 64px; margin: 0 auto 0.3rem; }

/* keystone affixes */
.affix-grid { display: grid; gap: 0.8rem; margin-top: 1.4rem; }
@media (min-width: 640px) { .affix-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .affix-grid { grid-template-columns: repeat(5, 1fr); } }
.affix { display: flex; gap: 0.7rem; align-items: center; padding: 0.7rem; border-radius: 12px; background: rgba(42,44,58,0.55); border: 1px solid rgba(201,162,75,0.2); }
.affix img { width: 52px; height: 52px; flex: none; border-radius: 50%; }
.affix b { display: block; font-size: 0.92rem; }
.affix small { display: block; font-size: 0.78rem; color: var(--bone-dim); line-height: 1.3; }
.affix .slot { font-size: 0.68rem; color: var(--amber); letter-spacing: 0.08em; text-transform: uppercase; }
.keystone-steps { counter-reset: k; display: grid; gap: 0.8rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.keystone-steps li { position: relative; padding-left: 2.4rem; font-size: 0.98rem; }
.keystone-steps li::before { counter-increment: k; content: "+" counter(k); position: absolute; left: 0; top: 0; font-family: var(--font-display); font-weight: 700; color: var(--amber); }

/* pets */
.pet-nav { display: flex; gap: 0.5rem; align-items: center; margin-left: auto; }
.pet-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(201,162,75,0.5); background: rgba(27,29,39,0.85); color: var(--bone); font-size: 1.2rem; cursor: pointer; }
.pet-caption b { font-family: var(--font-display); font-size: 1.2rem; display: block; }
.pet-caption span { font-size: 0.85rem; color: var(--bone-dim); }
.rarity-common { color: #b8b8b8; } .rarity-rare { color: var(--rare); } .rarity-epic { color: var(--epic); } .rarity-legendary { color: var(--legendary); } .rarity-supporter { color: #ff8ad8; }
.pet-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.pet-list span { font-size: 0.78rem; padding: 0.25rem 0.6rem; border-radius: 999px; background: rgba(42,44,58,0.6); border: 1px solid rgba(201,162,75,0.2); }
.pet-list span i { font-style: normal; opacity: 0.7; }
.wing-list { columns: 2; gap: 1rem; font-size: 0.92rem; padding-left: 1.2rem; margin: 0.6rem 0 0; }
@media (min-width: 640px) { .wing-list { columns: 3; } }

/* loot marquee */
.loot-wall { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid rgba(201,162,75,0.3); background: radial-gradient(60% 100% at 50% 100%, rgba(245,164,66,0.18), transparent), #15161f; padding: 1rem 0; }
.loot-wall .track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.loot-wall .track > div { width: 960px; height: 384px; background: url("../img/items-sheet.webp") 0 0 / 960px 384px no-repeat; }
@media (max-width: 700px) { .loot-wall .track > div { width: 720px; height: 288px; background-size: 720px 288px; } }
@keyframes marquee { to { transform: translateX(-50%); } }
.loot-wall:hover .track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .loot-wall .track { animation: none; } }
.rarity-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.rarity-bar span { padding: 0.3rem 0.8rem; border-radius: 8px; border: 2px solid var(--rc); font-size: 0.8rem; font-weight: 800; color: var(--rc); }

/* every-day grid */
.tiles { display: grid; gap: 1rem; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile { display: flex; gap: 0.9rem; align-items: flex-start; }
.tile img { width: 56px; height: 56px; flex: none; }
.tile h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.tile p { margin: 0; font-size: 0.95rem; color: var(--bone-dim); }

/* fair */
.fair { background: linear-gradient(180deg, rgba(58,44,36,0.35), transparent); }
.fair-grid { display: grid; gap: 1rem; }
@media (min-width: 820px) { .fair-grid { grid-template-columns: repeat(3, 1fr); } }
.fair-grid .card { --c: var(--alistair); }
.fair-grid .card h3 { font-size: 1.1rem; }

/* download */
.download { text-align: center; background: radial-gradient(80% 60% at 50% 0%, rgba(245,164,66,0.18), transparent); }
.download .hero-logo { width: min(380px, 70vw); }
.store-row { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; margin-top: 1.2rem; }
.screens { display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 420px); gap: 0.9rem; overflow-x: auto; padding: 1.4rem 0 0.6rem; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.screens .shot { scroll-snap-align: center; }

/* footer */
footer { padding: 2.5rem 0 3rem; border-top: 1px solid rgba(201,162,75,0.15); font-size: 0.85rem; color: var(--bone-dim); }
footer .cols { display: grid; gap: 1.4rem; }
@media (min-width: 820px) { footer .cols { grid-template-columns: 1.4fr 1fr 1fr; } }
footer h4 { font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.3rem; }
footer a { color: var(--bone); text-decoration: none; }
footer a:hover { color: var(--amber); }
.fine { margin-top: 1.6rem; font-size: 0.78rem; }

/* ---------- phone pass (owner feedback from the iPhone) ---------- */
/* every game screenshot shows whole, at its own ratio, never cropped or zoomed (the host frame may reset img rules) */
.shot img, .screens img, .video-frame { width: 100% !important; max-width: 100% !important; height: auto !important; object-fit: contain; display: block; }
.shot { aspect-ratio: auto; }
.video-frame video { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.screens { grid-auto-columns: min(86vw, 420px); }
/* the top bar: slimmer on phones and it hides while scrolling down */
.topbar { transition: background 0.3s ease, transform 0.3s ease; }
.topbar.hide { transform: translateY(-110%); }
@media (max-width: 700px) { .topbar { padding: 0.4rem var(--gutter); } .topbar .btn-small { padding: 0.45rem 0.85rem; font-size: 0.72rem; } .topbar .brand img { width: 30px; height: 30px; } }

/* ---------- character select (demo style) ---------- */
.select { display: grid; gap: 1.2rem; }
@media (min-width: 900px) { .select { grid-template-columns: 1.15fr 0.85fr; gap: 2rem; align-items: stretch; } }
.select-stage { position: relative; height: 64vh; height: 64svh; min-height: 400px; max-height: 720px; background: radial-gradient(70% 60% at 50% 70%, #2a2c3a, #0c0d13 80%); }
@media (min-width: 900px) { .select-stage { height: 72vh; height: 72svh; } }
.select-stage .arrow { position: absolute; top: 45%; z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(201,162,75,0.6); background: rgba(16,17,24,0.75); color: var(--bone); font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.select-stage .arrow.prev { left: 0.6rem; } .select-stage .arrow.next { right: 0.6rem; }
.select-stage .portraits { position: absolute; left: 0; right: 0; bottom: 0.7rem; z-index: 3; display: flex; justify-content: center; gap: 0.5rem; }
.select-stage .portraits button { width: 52px; height: 52px; border-radius: 50%; padding: 0; overflow: hidden; border: 2px solid rgba(201,162,75,0.4); background: var(--slate-2); cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.select-stage .portraits button img { width: 100%; height: 100%; }
.select-stage .portraits button.active { border-color: var(--c); box-shadow: 0 0 18px var(--c); transform: translateY(-3px) scale(1.08); }
.select-hint { position: absolute; top: 0.6rem; left: 0; right: 0; text-align: center; z-index: 3; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(234,223,200,0.6); pointer-events: none; }
.select-stage .scene-fallback { background-size: contain; background-repeat: no-repeat; background-position: center 40%; }
.select-info { background: linear-gradient(180deg, rgba(42,44,58,0.75), rgba(27,29,39,0.9)); border: 1px solid rgba(201,162,75,0.25); border-radius: var(--radius); padding: 1.3rem; position: relative; overflow: hidden; }
.select-info::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--c, var(--gold)); }
.select-info .title { font-family: var(--font-display); font-size: 0.8rem; color: var(--c); letter-spacing: 0.1em; text-transform: uppercase; }
.select-info h3 { font-size: clamp(1.6rem, 5vw, 2.2rem); margin: 0 0 0.3rem; }
.select-info .role { color: var(--bone); margin-bottom: 0.9rem; }
.select-info .stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.4rem 1rem; margin-bottom: 1rem; }
.select-info .stat { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--bone-dim); border-bottom: 1px dashed rgba(201,162,75,0.25); padding: 0.35rem 0; }
.select-info .stat b { color: var(--bone); }
.select-info .ability { display: flex; gap: 0.8rem; align-items: center; width: 100%; text-align: left; background: rgba(16,17,24,0.4); border: 1px solid rgba(201,162,75,0.2); border-radius: 12px; padding: 0.5rem 0.7rem; margin-top: 0.5rem; color: var(--bone); cursor: pointer; font: inherit; transition: border-color 0.2s ease, background 0.2s ease; }
.select-info .ability:hover, .select-info .ability.on { border-color: var(--c); background: rgba(42,44,58,0.8); }
.select-info .ability img { width: 48px; height: 48px; flex: none; border-radius: 50%; box-shadow: 0 0 0 2px rgba(201,162,75,0.4); }
.select-info .ability.ult img { box-shadow: 0 0 0 2px var(--c), 0 0 12px var(--c); }
.select-info .ability b { display: block; font-size: 0.95rem; }
.select-info .ability small { display: block; color: var(--bone-dim); font-size: 0.8rem; line-height: 1.3; }
.select-info .tap { font-size: 0.75rem; color: var(--bone-dim); margin: 0.8rem 0 0; }
/* store strip: a swipe row of full-width 16:9 shots */
.screens { display: flex; gap: 0.8rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 1.4rem 0 0.6rem; }
.screens .shot { flex: 0 0 100%; scroll-snap-align: center; }
@media (min-width: 700px) { .screens .shot { flex-basis: min(60%, 520px); } }
