@font-face {
  font-family: Cinzel;
  src: url("/assets/fonts/cinzel-latin.woff2") format("woff2");
  font-weight: 500 700;
  font-display: optional;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Cinzel;
  src: url("/assets/fonts/cinzel-latin-ext.woff2") format("woff2");
  font-weight: 500 700;
  font-display: optional;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Inter;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: optional;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Inter;
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-display: optional;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Inter;
  src: url("/assets/fonts/inter-cyrillic.woff2") format("woff2");
  font-weight: 400 700;
  font-display: optional;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Noto Sans Arabic";
  src: url("/assets/fonts/noto-sans-arabic.woff2") format("woff2");
  font-weight: 400 700;
  font-display: optional;
}

@font-face {
  font-family: "Noto Sans SC";
  src: url("/assets/fonts/noto-sans-sc.woff2") format("woff2");
  font-weight: 400 700;
  font-display: optional;
  unicode-range: U+2E80-2FFF, U+3000-303F, U+31C0-31EF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE10-FE4F, U+FF00-FFEF;
}

:root {
  color-scheme: dark;
  scrollbar-gutter: stable;
  --obsidian: #0d0f14;
  --slate: #141824;
  --iron: #181d2b;
  --ivory: #f2ece1;
  --muted: #a8b0c2;
  --gold: #f3c65f;
  --trim: #786143;
  --etch: #d4af372b;
  --corner: #d4af37a6;
  --line: #e6c48231;
  --heading: Cinzel, Georgia, serif;
  --body: Inter, system-ui, sans-serif;
  --gutter: clamp(1rem, 4vw, 3.25rem);
  --header-height: 4.5rem;
  --chapter-glow: 92%;
  --panel-angle: 118deg;
  font: 1rem/1.7 var(--body);
  color: var(--ivory);
  background: var(--obsidian);
}

:root:lang(ru), :root:lang(zh), :root:lang(ar) { --heading: var(--body); }
:root:lang(zh) { --body: "Noto Sans SC", Inter, "Microsoft YaHei", sans-serif; }
:root:lang(ar) { --body: "Noto Sans Arabic", Inter, system-ui, sans-serif; }

:root[dir="rtl"] {
  --chapter-glow: 8%;
  --panel-angle: 242deg;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

body {
  margin: 0;
  min-width: 0;
  background:
    radial-gradient(ellipse at 86% 9%, #3b2b543d, transparent 33rem),
    radial-gradient(ellipse at 12% 27%, #263a5038, transparent 40rem),
    repeating-linear-gradient(121deg, #ffffff03 0 1px, transparent 1px 5px),
    linear-gradient(var(--slate), var(--obsidian) 66rem);
}

h1, h2, h3, figure, p { margin: 0; }
h1, h2, h3 { font-family: var(--heading); line-height: 1.2; color: #ffe2a2; }
h1 { font-weight: 700; }
img { display: block; max-width: 100%; }
a { color: #ffda8b; text-underline-offset: .22em; overflow-wrap: anywhere; }
a:hover { color: #fff0c8; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .65; cursor: not-allowed; }
:focus-visible { outline: 2px solid #a9eaff; outline-offset: 4px; }

main[id], .anchor-heading, #features, #daily-adventure, #faq {
  scroll-margin-block-start: calc(var(--header-height) + 1.25rem);
}

.shell {
  width: min(76rem, calc(100% - var(--gutter) - var(--gutter)));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 20;
  inset-block-start: .5rem;
  inset-inline-start: .5rem;
  padding: .6rem 1rem;
  transform: translateY(-150%);
  background: var(--iron);
}

.skip-link:focus { transform: none; }

.frame {
  position: relative;
  border: 1px solid var(--trim);
  border-radius: .8rem;
  background: linear-gradient(155deg, #22283a, var(--iron) 55%, #121521);
  box-shadow: inset 0 0 0 3px #0e1018, 0 16px 40px #03040852;
}

.frame::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 4px;
  pointer-events: none;
  border: 1px solid var(--etch);
  border-radius: .55rem;
  background:
    linear-gradient(var(--corner), var(--corner)) left top / 14px 1px,
    linear-gradient(var(--corner), var(--corner)) left top / 1px 14px,
    linear-gradient(var(--corner), var(--corner)) right top / 14px 1px,
    linear-gradient(var(--corner), var(--corner)) right top / 1px 14px,
    linear-gradient(var(--corner), var(--corner)) left bottom / 14px 1px,
    linear-gradient(var(--corner), var(--corner)) left bottom / 1px 14px,
    linear-gradient(var(--corner), var(--corner)) right bottom / 14px 1px,
    linear-gradient(var(--corner), var(--corner)) right bottom / 1px 14px;
  background-repeat: no-repeat;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: #f2cf86;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.45;
  text-transform: uppercase;
}

.eyebrow::before, .site-nav a::before {
  content: "";
  flex: none;
  width: .43rem;
  height: .43rem;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  box-shadow: 0 0 .65rem -1px currentColor;
}

.site-header {
  position: sticky;
  z-index: 5;
  inset-block-start: 0;
  border-bottom: 1px solid #b98f505c;
  background: linear-gradient(180deg, #1a1e2a, #10131d 93%);
  box-shadow: 0 5px 25px #06071180;
}

.site-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  min-height: var(--header-height);
  padding-inline-end: 4.75rem;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: .7rem;
  color: #ffe5ad;
  font: 700 1.23rem/1 var(--heading);
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  flex: none;
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid #cba361a3;
  border-radius: .62rem;
  box-shadow: 0 0 1rem #edaa4b35;
}

.site-nav, .footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem;
}

.site-nav a {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .4rem .67rem;
  border: 1px solid transparent;
  border-radius: .4rem;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a::before { width: .36rem; height: .36rem; visibility: hidden; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #ffe1a0; }
.site-nav a[aria-current="page"] {
  border-color: #b893514f;
  background: linear-gradient(180deg, #74542742, #191c28);
  box-shadow: inset 0 -2px #c28b4238;
}

.site-nav a[aria-current="page"]::before { visibility: visible; }

.menu-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  min-height: 3rem;
  padding: .4rem .78rem;
  border: 1px solid var(--trim);
  border-radius: .4rem;
  background: #222738;
  color: #ffe1a0;
  font-size: .86rem;
  font-weight: 700;
}

.menu-toggle svg { width: 1.05rem; height: 1.05rem; }

.language-switcher { position: absolute; inset-inline-end: 0; top: 50%; transform: translateY(-50%); }
.language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-width: 3rem;
  min-height: 3rem;
  padding: .4rem .58rem;
  border: 1px solid #aa8553;
  border-radius: .5rem;
  background: linear-gradient(160deg, #42352b, #1a1e2b 75%);
  box-shadow: inset 0 0 0 2px #151722, 0 0 .7rem #dba34c18;
  color: #ffe2a2;
  font-size: .79rem;
  font-weight: 700;
}

.language-toggle:hover, .language-toggle[aria-expanded="true"] { border-color: var(--gold); }
.language-toggle::after {
  content: "";
  width: .4rem;
  height: .4rem;
  margin-block-end: .18rem;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
}

.language-globe {
  position: relative;
  width: 1.05rem;
  height: 1.05rem;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.language-globe::before, .language-globe::after { content: ""; position: absolute; }
.language-globe::before { inset: -1px 25%; border-inline: 1px solid currentColor; border-radius: 50%; }
.language-globe::after { inset: 48% 0 auto; border-block-start: 1px solid currentColor; }
.language-options, .language-status {
  position: absolute;
  z-index: 1;
  inset-block-start: calc(100% + .4rem);
  inset-inline-end: 0;
  width: min(13.5rem, calc(100vw - 2 * var(--gutter)));
}

.language-options {
  max-height: calc(100dvh - var(--header-height) - 1rem);
  margin: 0;
  padding: .45rem;
  overflow-y: auto;
  list-style: none;
}

.language-options :is(button, a) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  width: 100%;
  min-height: 3rem;
  padding-inline: .62rem;
  border: 1px solid transparent;
  border-radius: .35rem;
  background: transparent;
  color: var(--ivory);
}

.language-abbreviation { color: var(--muted); font-size: .78rem; }
.language-options bdi:lang(ar) { font-family: "Noto Sans Arabic", sans-serif; }
.language-options bdi:lang(zh) { font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; }
.language-options a { text-decoration: none; }
.language-options :is(button, a):hover, .language-options [aria-current] {
  border-color: #b893516e;
  background: linear-gradient(#513b2c, #292733);
  color: #ffe1a0;
}

.language-options :is(button, a):focus-visible { outline-offset: -3px; }
.language-status {
  padding: .5rem .75rem;
  border: 1px solid #c08064;
  border-radius: .4rem;
  background: #312630;
  color: #ffe5d5;
  font-size: .82rem;
}
.language-options:not([hidden]) + .language-status { inset-block-start: auto; }

.site-footer {
  margin-top: clamp(3.5rem, 9vw, 6.5rem);
  padding-block: 1.8rem;
  border-top: 1px solid var(--trim);
  background: linear-gradient(180deg, #171b28, #10121a);
}

.footer-inner, .footer-brand {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.footer-inner { justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; }
.footer-brand { color: var(--muted); font-size: .84rem; }
.footer-brand img { width: 2.4rem; height: 2.4rem; border-radius: .5rem; }
.footer-brand strong { display: block; color: #ffe2a2; font: 700 1rem/1.3 var(--heading); }
.footer-nav a {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.75rem;
  padding: .4rem .62rem;
  color: var(--muted);
  font-size: .87rem;
}

.footer-nav a:hover, .footer-nav a[aria-current="page"] { color: #ffe1a0; }
.footer-nav .imprint-badge {
  border: 1px solid #816943;
  border-radius: .4rem;
  color: #ffe2a2;
  text-decoration: none;
}

.imprint-badge::before {
  content: "";
  width: .9rem;
  height: .65rem;
  border: 1px solid #bda87c6b;
  border-radius: 2px;
  background: linear-gradient(#1b1b20 33%, #d74650 33% 66%, #f1c74e 66%);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--trim);
  background:
    radial-gradient(ellipse at 82% 80%, #78432873, transparent 56%),
    radial-gradient(ellipse at 22% 14%, #2d2c49, transparent 58%),
    repeating-linear-gradient(124deg, #f8d28706 0 1px, transparent 1px 5px),
    linear-gradient(125deg, #121620, #10101a 66%, #1d1720);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.03fr);
  align-items: center;
  gap: clamp(1.25rem, 4vw, 3.5rem);
  padding-block: clamp(2.4rem, 6vw, 5rem);
}

.hero-copy h1 {
  max-width: 19ch;
  margin-block: .85rem 1.15rem;
  font-size: clamp(2.2rem, 4.6vw, 4.45rem);
  line-height: 1.06;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.hero-copy h1, .archive-banner h1 {
  color: #ffe2a2;
  filter: drop-shadow(0 .08em .05em #080810);
}

@supports (background-clip: text) {
  .hero-copy h1, .archive-banner h1 {
    background: linear-gradient(#fff0cc 10%, #f6d48f 52%, #d7a24f);
    background-clip: text;
    color: transparent;
  }
}

.hero-description { max-width: 33rem; color: #e1dbe0; font-size: clamp(1rem, 1.8vw, 1.13rem); }
.hero-actions, .form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
}

.hero-actions { margin-top: 1.5rem; }
.hero-caption { margin-top: 1rem; color: #bfb4a6; font-size: .8rem; }
.hero-caption [aria-hidden] { padding-inline: .2rem; color: var(--gold); }
.trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-block: 1.1rem 0;
  padding: 0;
  list-style: none;
}

.trust-pills li {
  padding: .28rem .64rem;
  border: 1px solid #9a785a80;
  border-radius: 2rem;
  background: linear-gradient(#322d31, #1b202d);
  color: #fff0d4;
  font-size: .76rem;
  font-weight: 650;
}

.button, .play-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .65rem;
  min-height: 3rem;
  padding: .52rem .9rem;
  border: 1px solid #b48b52;
  border-radius: .45rem;
  background: linear-gradient(#302a2b, #1c202e);
  color: #ffe6ad;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}

.button:hover:not(:disabled), .play-badge:hover {
  border-color: var(--gold);
  color: #fff4d6;
  box-shadow: 0 0 1rem #e7b45b32, inset 0 0 1rem #e7b45b10;
}

.play-badge {
  justify-content: start;
  min-height: 3.5rem;
  padding: .48rem 1rem;
  border-color: #f0ca77;
  background: linear-gradient(160deg, #29222b, #0e1018);
  box-shadow: 0 0 1.25rem #e7b45b28;
}
.play-badge svg { flex: none; width: 1.5rem; height: 1.65rem; }
.play-badge > span { display: grid; text-align: start; }
.play-badge small { color: var(--muted); font-size: .59rem; letter-spacing: .12em; text-transform: uppercase; }
.play-badge strong { color: var(--ivory); font-size: 1.02rem; }
.button svg { flex: none; width: 1.05rem; height: 1.05rem; }
.button-gold { background: linear-gradient(#ffe8aa, #dcb257); color: #27190e; border-color: #ffdb88; }
.button-gold:hover:not(:disabled) { color: #27190e; background: linear-gradient(#fff1c7, #edc971); }

.hero-visuals {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .34fr);
  gap: clamp(.55rem, 2.35vw, 1.4rem);
}
.hero-landscape { display: grid; place-items: center; }
.hero-phone, .join-phone { display: flex; flex-direction: column; justify-content: center; }

.showcase {
  justify-self: center;
  width: min(100%, 19rem);
  background: #161824;
  box-shadow: 0 18px 65px #070711aa, 0 0 40px #dd914123;
}

.showcase-art { display: block; width: 100%; height: auto; }
.showcase a { display: block; margin: 4px; border-radius: .45rem; overflow: hidden; cursor: zoom-in; }
.showcase figcaption {
  padding: .55rem .4rem .62rem;
  border-top: 1px solid #d6aa6375;
  color: var(--muted);
  font-size: .76rem;
  text-align: center;
}

.asset-slot {
  min-width: 0;
  padding: .48rem;
  background:
    radial-gradient(ellipse at var(--chapter-glow) 12%, #7b522b53, transparent 56%),
    linear-gradient(145deg, #252638, #111521 73%);
  color: var(--ivory);
}

.asset-window {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
  aspect-ratio: var(--asset-ratio);
  overflow: hidden;
  border: 1px solid #a9865d80;
  border-radius: .42rem;
  background:
    radial-gradient(ellipse at center, #b0834d49, transparent 65%),
    repeating-linear-gradient(132deg, #d7a65d0b 0 1px, transparent 1px 9px),
    #131520;
}

.asset-window img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-illustration { padding: .4rem; min-width: 0; }
.home-illustration img { display: block; width: 100%; height: auto; border-radius: .35rem; }
.charter-art img { inset: 12%; width: 76%; height: 76%; object-fit: contain; }
.portrait-slot { --asset-ratio: 1080 / 2400; }
.charter-art { --asset-ratio: 640 / 640; }
.asset-label { display: grid; align-content: center; gap: .3rem; padding: .62rem .55rem .52rem; font-size: .79rem; line-height: 1.5; }
.asset-label strong { color: #ffe0a0; }
.asset-label code {
  display: block;
  color: #dfc49a;
  font-size: .78rem;
  text-align: start;
  overflow-wrap: anywhere;
}
.asset-label span { color: #d2c9ca; }
.asset-window .asset-gallery-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffe2a2;
  font-size: 1.55rem;
  cursor: zoom-in;
}
.asset-gallery-button:focus-visible { outline-offset: -4px; }

.section-intro { display: grid; gap: .45rem; }
.section-intro h2, .join-card h2 { font-size: clamp(1.65rem, 3.5vw, 2.65rem); text-wrap: balance; }
.adventure, .player-faq, .join-section { padding-block-start: clamp(2rem, 6vw, 4rem); }
.adventure > .button { margin-block-start: 1.05rem; }
.adventure-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem;
  margin: 1.15rem 0 0;
  padding: 0;
  list-style: none;
}
.adventure-step {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: .55rem;
  padding: clamp(.9rem, 2vw, 1.25rem);
}
.adventure-step h3 { font-size: clamp(1.05rem, 2.04vw, 1.4rem); }
.adventure-step > p { color: #e1d9cf; line-height: 1.55; }
.step-number {
  justify-self: start;
  padding: .1rem .65rem;
  border: 1px solid var(--trim);
  border-radius: .3rem;
  background: #392b27;
  color: #ffe4a5;
  font-weight: 700;
}
.codex-entry .portrait-slot, .gallery-stage .portrait-slot {
  display: grid;
  grid-template-columns: minmax(0, 5.8rem) minmax(0, 1fr);
  align-items: center;
  gap: .4rem;
  margin-block-start: .85rem;
}

.faq-list { display: grid; gap: .55rem; margin-block-start: 1.1rem; }
.faq-list summary {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  min-height: 3rem;
  padding: .7rem 1.15rem;
  color: #ffdf99;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--gold); font-size: 1.2rem; }
.faq-list [open] summary::after { content: "\2212"; }
.faq-list p { max-width: 82ch; padding: 0 1.15rem 1.1rem; }
.join-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .34fr) minmax(0, .88fr);
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.05rem, 3.5vw, 2.5rem);
  background: radial-gradient(ellipse at var(--chapter-glow) 6%, #61503580, transparent 58%), #181d2b;
}
.join-card > div { align-self: center; }
.join-card h2 + p { margin-block-start: .65rem; }
.join-phone { max-width: 9rem; }
.join-art { display: grid; place-items: center; padding: 4px; }
.join-art img { display: block; width: 100%; height: auto; border-radius: .45rem; }
.share-status { margin-block-start: .5rem; color: #ffe0a0; }
.share-status:empty { margin: 0; }
.share-link { width: 100%; padding: .45rem; border: 1px solid var(--trim); border-radius: .3rem; direction: ltr; }
.mobile-play-rail { display: none; }

:root:has(.screenshot-gallery[open]) { overflow: hidden; }
.screenshot-gallery {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(.6rem, 2.4vw, 1.4rem);
  border: 0;
  background: radial-gradient(ellipse at 50% 20%, #282339, #0a0c13 69%);
  color: var(--ivory);
}
.screenshot-gallery[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: .65rem; }
.screenshot-gallery::backdrop { background: #08090df0; }
.gallery-header, .gallery-footer {
  width: min(100%, 58rem);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
}
.gallery-header h2 { font-size: clamp(1rem, 3vw, 1.5rem); }
.gallery-control { flex: none; min-width: 3rem; min-height: 3rem; padding: .25rem; font-size: 1.45rem; }
[dir="rtl"] .gallery-arrow span { transform: scaleX(-1); }
.gallery-stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  min-width: 0;
  overflow: auto;
  touch-action: pan-y pinch-zoom;
}
.gallery-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid #c49a64;
  border-radius: .45rem;
}
.gallery-stage .portrait-slot { width: min(100%, 30rem); margin: auto; }
.gallery-stage .asset-window::after { content: "\2727"; font-size: 1.55rem; color: #ffe2a2; }
.gallery-description { min-width: 0; text-align: center; font-size: .95rem; overflow-wrap: anywhere; }
#gallery-count { color: var(--muted); font-size: .82rem; }

@media (prefers-reduced-motion: no-preference) {
  .button, .play-badge, .codex-index a { transition: border-color .2s, box-shadow .2s; }
  .forge-slot-halo, .forge-slot-inner, .forge-slot-etch { transition: opacity .25s; }
  .site-nav, .language-options { animation: drawer-in .18s ease-out; }
  .gallery-stage > * { animation: drawer-in .15s ease-out; }
  @keyframes drawer-in {
    from { opacity: 0; transform: translateY(-.35rem); }
  }
}

.codex-intro {
  display: grid;
  justify-items: center;
  gap: .65rem;
  padding-block: clamp(2.4rem, 6vw, 4.2rem) 1.55rem;
  text-align: center;
}

.codex-intro h2 { font-size: clamp(1.7rem, 3.5vw, 2.85rem); }
.codex-intro > p:not(.eyebrow) { max-width: 63ch; color: var(--muted); }
.codex-intro .screenshot-hint { font-size: .88rem; }

.codex-index-rail {
  position: sticky;
  inset-block-start: var(--header-height);
  z-index: 4;
  border-block: 1px solid var(--trim);
  background: linear-gradient(180deg, #232231, #12151f);
  box-shadow: 0 9px 28px #08080bb3;
}

.codex-index {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: .35rem;
  padding: .5rem .3rem;
}

.codex-index a {
  display: flex;
  align-items: center;
  gap: .48rem;
  min-height: 3rem;
  padding: .42rem .5rem;
  border: 1px solid #78614380;
  border-radius: .42rem;
  background: linear-gradient(#282735, #171924);
  color: #e6decb;
  font-size: .77rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.codex-index [aria-hidden="true"] {
  flex: none;
  min-width: 1.35rem;
  color: #eec986;
  font: 700 .77rem/1 var(--heading);
  text-align: center;
}

.codex-index a:hover, .codex-index a[aria-current] {
  border-color: #dbb26c;
  background: linear-gradient(#503821, #2b2226);
  color: #ffe8b1;
  box-shadow: inset 0 -2px #dbb26c6e, 0 0 1rem #dba34c18;
}

.codex-index a:focus-visible { outline-offset: -3px; }
.codex-chapters { display: grid; gap: clamp(2rem, 6vw, 4rem); padding-top: 1.5rem; }
.codex-chapter { display: grid; gap: .9rem; }
.codex-chapter, #forge-preview { scroll-margin-block-start: calc(var(--header-height) + 7rem); }

.chapter-cover {
  --chapter-light: #d7a55938;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(.55rem, 3vw, 2rem);
  min-height: 9.5rem;
  padding: clamp(1.2rem, 3vw, 2.25rem);
  background:
    radial-gradient(ellipse at var(--chapter-glow) 52%, var(--chapter-light), transparent 49%),
    repeating-linear-gradient(135deg, #ffffff06 0 1px, transparent 1px 6px),
    linear-gradient(115deg, #212635, #151926 69%, #1f2230);
}

#fitness-mind .chapter-cover { --chapter-light: #50a39147; }
#combat .chapter-cover { --chapter-light: #8364c164; }
#legends .chapter-cover { --chapter-light: #b95a5359; }
#community .chapter-cover { --chapter-light: #5478bb69; }
#fair-play .chapter-cover { --chapter-light: #61867557; }

.chapter-cover h2 {
  margin-block: .45rem .48rem;
  font-size: clamp(1.45rem, 3.4vw, 2.55rem);
  overflow-wrap: anywhere;
}

.chapter-cover div > p:last-child { max-width: 65ch; color: #e1d9cf; }
.chapter-cover img {
  width: clamp(3.5rem, 10vw, 7.25rem);
  height: auto;
  border-radius: .6rem;
  filter: drop-shadow(0 .45rem .5rem #080b14ad);
}

.codex-entries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.codex-entry {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.15rem clamp(1rem, 2.5vw, 1.5rem) .35rem;
  border: 1px solid #ae8755;
  border-radius: .62rem;
  background:
    radial-gradient(ellipse at 98% 0, #d49a5e3b, transparent 58%),
    repeating-linear-gradient(121deg, #673e1507 0 1px, transparent 1px 4px),
    linear-gradient(160deg, #f6e8cd, #e8d5b5);
  color: #38291f;
  box-shadow: inset 0 0 0 3px #793f1a17, 0 8px 25px #07080b52;
}

.codex-entry h3 { margin-bottom: .45rem; color: #2e221d; font-size: clamp(1rem, 2vw, 1.25rem); overflow-wrap: anywhere; }
.codex-entry > p { line-height: 1.55; }
.codex-entry[id] { scroll-margin-top: 9rem; }
.codex-entry .codex-playbook {
  margin-block: .85rem;
  padding-inline-start: .75rem;
  border-inline-start: 3px solid #ae8755;
}
.codex-entry :focus-visible { outline-color: #704117; }
.codex-entry a { color: #68340e; font-weight: 700; }
.codex-entry a:hover { color: #3d210c; }
.codex-entry .codex-permalink { color: inherit; }
.codex-permalink:not(:hover, :focus-visible) { text-decoration: none; }
.codex-entry details { margin-block-start: auto; border-top: 1px solid #9c724d7d; }

.codex-screenshots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem;
  margin-block-start: .85rem;
}

.codex-screenshots a {
  display: grid;
  place-items: center;
  flex: 1 1 6.5rem;
  min-width: 0;
  max-width: 13.5rem;
  padding: 2px;
  border: 1px solid #816943;
  border-radius: .45rem;
  background: #161824;
  box-shadow: 0 .28rem .7rem #38291f35;
  cursor: zoom-in;
}

.codex-screenshots a:hover { border-color: #704117; box-shadow: 0 .28rem .7rem #38291f70; }
.codex-screenshots img { display: block; width: 100%; height: auto; border-radius: .25rem; }
.codex-screenshots .codex-screenshot-wide { flex-basis: 100%; max-width: 28rem; }

.codex-entry summary, .forge-reference summary {
  min-height: 3rem;
  padding-block: .7rem;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
}

.codex-entry summary { color: #683b19; }
.codex-entry summary:hover, .forge-reference summary:hover { text-decoration: underline; }
.codex-entry ul { display: grid; gap: .45rem; margin: 0 0 .85rem; padding-inline-start: 1.2rem; font-size: .93rem; line-height: 1.6; }
.codex-entry li::marker { color: #865121; }

.forge-lab[data-tier="common"] { --rarity: #8f9da8; --rarity-ink: #e0e7f2; --rarity-glow: #afbdd74a; --slot-hue: #bdd8e7; --slot-accent: #f4faff; }
.uncommon, .forge-lab[data-tier="uncommon"] { --rarity: #2ecc71; --rarity-ink: #aff2cd; --rarity-glow: #2ecc713b; }
.rare, .forge-lab[data-tier="rare"] { --rarity: #3498db; --rarity-ink: #b5e3ff; --rarity-glow: #3498db43; }
.epic, .forge-lab[data-tier="epic"] { --rarity: #9b59b6; --rarity-ink: #e8c5ff; --rarity-glow: #9b59b651; }
.legendary, .forge-lab[data-tier="legendary"] { --rarity: #f39c12; --rarity-ink: #ffda92; --rarity-glow: #f39c1243; }
.forge-lab[data-tier="uncommon"] { --rarity: #66a583; --slot-hue: #77f0ad; --slot-accent: #f9cd78; }
.forge-lab[data-tier="rare"] { --rarity: #598ab4; --slot-hue: #6ed9ff; --slot-accent: #b4a3ff; }
.forge-lab[data-tier="epic"] { --rarity: #9b68b7; --slot-hue: #dc94ff; --slot-accent: #778dff; }
.forge-lab[data-tier="legendary"] { --rarity: #c39045; --slot-hue: #ffcf68; --slot-accent: #ff8b4f; }

.forge-lab {
  --trim: var(--rarity);
  --etch: var(--rarity-glow);
  --corner: var(--rarity-ink);
  --slot-energy: 0;
  display: grid;
  grid-template-columns: minmax(11rem, .5fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1rem, 3vw, 2.2rem);
  padding: clamp(1rem, 3vw, 2rem);
}

.forge-stage {
  display: grid;
  place-items: center;
  align-self: center;
  gap: .55rem;
  margin: 0;
  padding: clamp(.85rem, 3vw, 1.5rem);
  border: 1px solid var(--rarity-glow);
  border-radius: .55rem;
  background:
    radial-gradient(circle, #282738, transparent 65%),
    repeating-linear-gradient(45deg, #e6c48208 0 1px, transparent 1px 10px),
    #11141e;
}

.forge-slot {
  position: relative;
  width: min(100%, 12rem);
  aspect-ratio: 128 / 148;
  filter: drop-shadow(0 .45rem .65rem #05070bbd);
}

.forge-slot-frame { display: block; width: 100%; }
.forge-slot-rim { fill: none; stroke: var(--rarity); stroke-width: 1.35; }
.forge-halo-core { stop-color: var(--slot-hue); stop-opacity: calc(.12 + .24 * var(--slot-energy)); }
.forge-slot-halo { opacity: 0; }
.forge-slot-sheen { fill: var(--slot-hue); opacity: 0; }
.forge-slot-etch { fill: none; stroke: var(--rarity); stroke-width: .8; opacity: .51; }
.forge-slot-inner, .forge-slot-flow, .forge-slot-signature { fill: none; stroke: var(--slot-hue); opacity: 0; }
.forge-slot-flow {
  stroke: var(--slot-accent);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-dasharray: 6 calc(var(--slot-flow-gap, 94) * 1);
}
.forge-slot-motes circle {
  r: calc(.7px + .8px * var(--slot-energy));
  fill: var(--slot-accent);
  opacity: calc(.35 + .52 * var(--slot-energy));
  filter: drop-shadow(0 0 2px var(--slot-hue));
}

.forge-lab:not([data-stage="matte"]) .forge-slot-halo { opacity: 1; }
.forge-lab:not([data-stage="matte"]) .forge-slot-inner { opacity: calc(.19 + .38 * var(--slot-energy)); }
.forge-lab[data-stage="sheen"] .forge-slot-sheen,
.forge-lab[data-stage="awakened"][data-tier="common"] .forge-slot-sheen { opacity: .1; }
.forge-lab:is([data-stage="filigree"], [data-stage="flow"], [data-stage="awakened"]) .forge-slot-etch {
  stroke: var(--slot-hue);
  opacity: calc(.33 + .56 * var(--slot-energy));
}
.forge-lab:is([data-stage="flow"], [data-stage="awakened"]) .forge-slot-flow { opacity: calc(.32 + .64 * var(--slot-energy)); }
.forge-lab[data-stage="awakened"] .forge-slot-inner { stroke-width: 1.8; }
.forge-lab[data-stage="awakened"] .forge-slot-signature {
  stroke: var(--slot-accent);
  opacity: calc(.39 + .60 * var(--slot-energy));
}

.forge-slot img {
  position: absolute;
  inset: 9% 12%;
  width: 76%;
  height: 66%;
  object-fit: contain;
  filter: drop-shadow(0 0 calc(var(--slot-energy) * 3px) var(--slot-hue));
}
.forge-lab[data-embers] .forge-slot img {
  filter: drop-shadow(0 0 calc(var(--slot-energy) * 3px) var(--slot-hue)) drop-shadow(0 0 1px #ff454bcb);
}
.forge-slot-label {
  position: absolute;
  inset: auto .3rem 7%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: .3rem;
  color: #e4c481;
  font-size: .67rem;
}
.forge-slot-label bdi {
  padding: 0 .28rem;
  border: 1px solid var(--slot-hue);
  border-radius: .24rem;
  background: linear-gradient(color-mix(in srgb, var(--slot-hue) 22%, #0d161d), #0d161d);
  color: #fff8e7;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.forge-lab[data-stage="awakened"] .forge-slot-label bdi { border-color: var(--slot-accent); border-radius: .5rem; font-weight: 800; }
.forge-stage figcaption { color: var(--rarity-ink); text-align: center; font-size: .85rem; font-weight: 650; }

@media (prefers-reduced-motion: no-preference) {
  .forge-lab:is([data-stage="sheen"], [data-stage="awakened"][data-tier="common"]) .forge-slot-sheen {
    animation: forge-slot-shimmer 4.8s ease-in-out infinite;
  }
  .forge-lab:is([data-stage="flow"], [data-stage="awakened"]) .forge-slot-flow {
    animation: forge-slot-current 4.8s linear infinite;
  }
  .forge-lab[data-embers] .forge-slot-motes { animation: forge-slot-embers 2.2s ease-in-out infinite alternate; }
}
@keyframes forge-slot-shimmer { from { transform: translateX(0); } 55%, to { transform: translateX(162px); } }
@keyframes forge-slot-current { to { stroke-dashoffset: -100; } }
@keyframes forge-slot-embers { from { opacity: .55; } to { opacity: 1; } }

.forge-copy h3 { margin-block: .5rem .55rem; font-size: clamp(1.25rem, 2.75vw, 1.85rem); }
.forge-copy > p:last-of-type { max-width: 65ch; color: #e0d9ce; }
.forge-controls {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: .85rem 1rem;
  margin-top: .9rem;
}

.forge-controls label { display: block; margin-bottom: .3rem; color: #f4dfb6; font-size: .85rem; font-weight: 700; }
.forge-controls select, .forge-controls input { width: 100%; min-height: 3rem; margin: 0; font: inherit; }
.forge-controls select {
  padding-inline: .52rem;
  border: 1px solid var(--rarity);
  border-radius: .4rem;
  background: #131722;
  color: var(--rarity-ink);
}

.forge-controls input { display: block; accent-color: var(--rarity); }
.forge-range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; }
.forge-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin-block: .8rem .25rem; }
.forge-stats, .forge-reference { overflow-wrap: anywhere; }
.forge-stats div { padding: .55rem .65rem; border: 1px solid var(--rarity-glow); border-radius: .4rem; background: #10131d91; }
.forge-stats dt { color: var(--muted); font-size: .75rem; }
.forge-stats dd { margin: 0; color: var(--rarity-ink); font-size: .9rem; font-weight: 700; }
.forge-reference { color: #e1d9cf; }
.forge-reference summary { color: #ffe2a2; }
.forge-reference table { width: 100%; border-collapse: collapse; font-size: .83rem; text-align: start; }
.forge-reference caption { margin-bottom: .45rem; color: var(--muted); text-align: start; }
.forge-reference :is(th, td) { padding: .4rem .3rem; border-bottom: 1px solid var(--line); text-align: start; }

.archive-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .8rem 1.6rem;
  max-width: 66.25rem;
  margin-block-start: clamp(1rem, 4vw, 2.4rem);
  padding: clamp(1.15rem, 4.5vw, 2.65rem);
  background:
    radial-gradient(ellipse at var(--chapter-glow) 50%, #91673940, transparent 54%),
    linear-gradient(150deg, #272839, #151924);
}

.archive-banner::after {
  content: "";
  position: absolute;
  inset-block-end: -4px;
  inset-inline-start: 1.5rem;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--gold);
  box-shadow: 0 0 .75rem #f3c65f78;
}

.archive-banner h1 {
  margin-top: .55rem;
  font-size: clamp(1.9rem, 5.7vw, 4rem);
  letter-spacing: -.028em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.archive-seal {
  width: clamp(4.2rem, 13vw, 8.25rem);
  height: auto;
  filter: drop-shadow(0 0 1.35rem #d3a05a39);
}
.archive-lead { max-width: 55ch; margin-block-start: .65rem; color: #dfd8cf; }
.archive-links { display: flex; flex-wrap: wrap; gap: .55rem; }

.tome-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  max-width: 66.25rem;
  margin-top: clamp(1rem, 3vw, 2rem);
}

.tome-rail, .legal-document { min-width: 0; }
.tome-index { background: linear-gradient(145deg, #202535, #151926); }
.tome-index summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  min-height: 3rem;
  padding: .65rem 1rem;
  color: #ffe2a2;
  font: 700 .88rem/1.4 var(--heading);
  cursor: pointer;
  list-style: none;
}

.tome-index summary::-webkit-details-marker { display: none; }
.tome-index summary::after {
  content: "";
  width: .53rem;
  height: .53rem;
  margin-inline: .25rem;
  transform: rotate(45deg);
  border: solid var(--gold);
  border-width: 0 1px 1px 0;
}

.tome-index[open] summary::after { transform: rotate(225deg); }
.tome-index nav { padding: .25rem .75rem .8rem; }
.index-group {
  padding-block: .4rem;
  border-top: 1px solid var(--line);
}

.index-group a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .31rem .4rem;
  border-radius: .3rem;
  color: var(--muted);
  font-size: .83rem;
  line-height: 1.35;
  text-decoration: none;
}

.index-group a:hover, .index-group a:focus-visible { background: #d4af371a; color: #ffe3a2; }
.legal-document { display: grid; gap: .9rem; }
.legal-section, .deletion-panel {
  padding: clamp(1.15rem, 4vw, 2.5rem);
  font-size: clamp(1rem, 1.35vw, 1.0625rem);
  overflow-wrap: anywhere;
}

.legal-document h2, .deletion-panel h2 {
  position: relative;
  margin: 0 0 .9rem;
  padding-bottom: .64rem;
  border-bottom: 1px solid var(--line);
  color: #ffdf99;
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
}

.legal-document h2::after, .deletion-panel h2::after {
  content: "";
  position: absolute;
  inset-block-end: -3px;
  inset-inline-start: .1rem;
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  background: #d4af37;
}

.legal-document p + p { margin-top: .9rem; }
.legal-document address { margin-block-start: .65rem; font-style: normal; }

.anchor-heading:target { color: #fff0c8; }

.protection {
  padding: .85rem 1rem;
  border: 1px solid var(--rarity-glow);
  border-inline-start: 3px solid var(--rarity);
  border-radius: .35rem;
  background: linear-gradient(var(--panel-angle), var(--rarity-glow), #141827 85%);
}

.protection-tags { display: flex; flex-wrap: wrap; gap: .35rem .55rem; margin-bottom: .5rem; }
.protection-tags span {
  padding: .21rem .52rem;
  border: 1px solid var(--rarity-glow);
  border-radius: .28rem;
  background: #101320cf;
  color: var(--rarity-ink);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .052em;
  text-transform: uppercase;
}

.protection + p { margin-top: .9rem; }
.deletion-banner .eyebrow { color: #ffa8a3; }
.deletion-layout { display: grid; gap: 1rem; max-width: 59rem; margin-top: clamp(1rem, 3vw, 2rem); }
.deletion-banner { max-width: 59rem; }

.danger-callout {
  display: flex;
  align-items: start;
  gap: .8rem;
  margin-top: 1.2rem;
  padding: .8rem .95rem;
  border: 1px solid #cc686477;
  border-inline-start: 3px solid #f0827b;
  border-radius: .4rem;
  background: linear-gradient(var(--panel-angle), #50242e, #2c1e2c);
  color: #ffe7e0;
}

.danger-callout svg { flex: none; width: 1.3rem; height: 1.3rem; margin-top: .19rem; color: #ffa8a3; }
.danger-callout a { color: #ffe0ad; }
.deletion-routes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.deletion-panel .eyebrow { margin-bottom: .48rem; }
.deletion-panel .eyebrow + h2 { margin-top: 0; }
.deletion-panel p + p, .deletion-panel .button { margin-top: .85rem; }
.route-guide { display: grid; gap: .55rem; counter-reset: deletion-step; }
.deletion-panel .route-step + .route-step { margin-top: 0; }
.route-step {
  position: relative;
  padding-inline-start: 2rem;
  counter-increment: deletion-step;
}

.route-step::before {
  content: counter(deletion-step);
  position: absolute;
  inset-block-start: .15rem;
  inset-inline-start: 0;
  display: grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  border: 1px solid var(--trim);
  border-radius: .26rem;
  background: #141725;
  color: #ffda8b;
  font-size: .73rem;
  font-weight: 700;
}

[dir="rtl"] .route-step::before { content: counter(deletion-step, arabic-indic); }

:lang(ar) .hero-copy h1, :lang(ar) .archive-banner h1 { line-height: 1.28; }
:lang(ar) :is(.eyebrow, h1, .play-badge small, .forge-stage span, .protection-tags span),
:lang(zh) :is(.eyebrow, h1) { letter-spacing: normal; }

.route-note { color: var(--muted); }
.deletion-overview { display: grid; gap: .45rem; }
.deletion-overview .danger-callout { margin-top: .75rem; }
.auth-dialog {
  width: 100%;
  max-width: 100%;
  max-height: none;
  padding: clamp(1rem, 4vw, 1.75rem);
  color: var(--ivory);
  overflow-wrap: anywhere;
}

.auth-dialog[open]:not(:modal) {
  position: relative;
  inset: auto;
  margin: 0;
}

.auth-dialog:modal {
  width: min(32rem, calc(100% - 1.5rem));
  max-height: calc(100% - 1.5rem);
  margin: auto;
  overscroll-behavior: contain;
}

.auth-dialog::backdrop { background: #070810da; }
.auth-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem;
  margin-bottom: 1rem;
}

.auth-heading h2 { font-size: clamp(1.3rem, 4vw, 1.65rem); }
.dialog-close {
  display: grid;
  flex: none;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--trim);
  border-radius: .4rem;
  background: #272938;
  color: #ffe1a0;
}

.dialog-close svg { width: 1rem; height: 1rem; }
.dialog-close:hover { border-color: var(--gold); }
#email-form, #confirmation { display: grid; gap: .75rem; }
#email-form label { display: grid; gap: .24rem; font-weight: 600; }
#email-form input {
  width: 100%;
  min-height: 3rem;
  padding: .52rem .74rem;
  border: 1px solid #8a795e;
  border-radius: .38rem;
  background: #111521;
  color: var(--ivory);
}

#email-submit { justify-self: start; }
#email-host-link, #google-option { margin-top: .85rem; }
#google-sign-in { max-width: 100%; }
.auth-dialog #status {
  margin-top: 1rem;
  padding: .62rem .75rem;
  border: 1px solid #ae9b653f;
  border-radius: .38rem;
  background: #0e1320;
  color: #dbddeb;
  font-size: .88rem;
}

.auth-help {
  display: flex;
  align-items: center;
  min-height: 3rem;
  margin-top: .45rem;
  font-size: .9rem;
}

#confirmation-title { font-size: 1.2rem; }
.confirm-checkbox { display: flex; align-items: start; gap: .64rem; min-height: 3rem; padding-block: .4rem; cursor: pointer; }
.confirm-checkbox input { flex: none; width: 1.25rem; height: 1.25rem; margin: .23rem 0 0; accent-color: #ffc98b; }
.button-danger { border-color: #d27d79; background: linear-gradient(#763944, #4a2534); color: #ffe9e4; }
.button-danger:hover:not(:disabled) { border-color: #ffa7a1; box-shadow: 0 0 1rem #f8756a3b; }

.verification-page {
  background: radial-gradient(ellipse at 50% 20%, #282433 0%, #0D0F14 64%);
}

.verification-main {
  display: grid;
  place-items: start center;
  min-height: min(42rem, 76svh);
  padding-block: clamp(2.5rem, 7vw, 6rem);
}

.verification-card {
  width: min(100%, 38rem);
  padding: clamp(1.45rem, 7vw, 3.5rem);
  border-color: #D4AF37;
  background: radial-gradient(ellipse at top, #30283A, transparent 62%), linear-gradient(#181D2B, #121620);
  color: #F2ECE1;
  text-align: center;
  box-shadow: 0 24px 80px #040306aa, inset 0 0 0 5px #d4af3718;
}

.verification-seal {
  position: relative;
  display: grid;
  place-items: center;
  width: 7rem;
  aspect-ratio: 1;
  margin: 0 auto 1.5rem;
  border: 1px solid #D4AF37;
  border-radius: 50%;
  background: radial-gradient(circle, #51402A, #1a2030 68%);
  box-shadow: 0 0 2.5rem #d4af3744, inset 0 0 1.2rem #0d0f14;
}

.verification-seal svg {
  display: none;
  position: absolute;
  inset-inline-end: -.3rem;
  inset-block-end: 0;
  width: 2.5rem;
  border: 1px solid #F3DB9B;
  border-radius: 50%;
  background: #103c32;
  color: #f3e5b3;
}

.verification-card[data-state="success"] .verification-seal svg { display: block; }
.verification-card h1 { margin: .55rem 0 .85rem; font-size: clamp(1.8rem, 5vw, 3rem); overflow-wrap: anywhere; }
.verification-status { display: grid; }
.verification-status > div { grid-area: 1 / 1; }
.verification-status > [hidden] { display: block !important; visibility: hidden; }
.verification-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-block: 1.6rem; }
.verification-actions .verification-primary { background: linear-gradient(#fae3a0, #dfb64d); color: #17130b; }
.verification-actions .verification-primary:hover { color: #17130b; }
.verification-card[data-state="success"] #open-game { border-color: #dec074; background: linear-gradient(#fae3a0, #dfb64d); color: #17130b; }
.verification-help { color: var(--muted); font-size: .9rem; }
.verification-card .archive-links { justify-content: center; margin-block-start: 1.2rem; }
.charter-art { width: min(100%, 16rem); margin: 1.25rem auto 0; text-align: start; }
.verification-card:not([data-state="success"]) .charter-art { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .verification-card[data-state="success"] .verification-seal { animation: charter-sealed .85s ease-out; }
  @keyframes charter-sealed {
    0% { transform: scale(.9); box-shadow: 0 0 1rem #d4af3755; }
    45% { transform: scale(1.08); box-shadow: 0 0 4rem #d4af3788; }
    100% { transform: scale(1); }
  }
}

@media (min-width: 59rem) {
  .tome-layout { grid-template-columns: minmax(0, 14rem) minmax(0, 51.25rem); }
  .tome-rail { position: sticky; inset-block-start: calc(var(--header-height) + 1rem); align-self: start; }
  .tome-index nav { max-height: calc(100dvh - var(--header-height) - 5rem); overflow-y: auto; }
}

@media (max-width: 77rem) {
  .codex-index {
    display: flex;
    width: 100%;
    overflow-x: auto;
    padding-inline: var(--gutter);
    scrollbar-width: thin;
    scrollbar-color: #9c764b #151823;
  }
  .codex-index a { flex: 0 0 auto; white-space: nowrap; }
  .codex-chapter, #forge-preview { scroll-margin-block-start: calc(var(--header-height) + 5.5rem); }
}

@media (max-width: 66rem) {
  :root { --header-height: 4.15rem; }
  .site-bar { flex-wrap: wrap; }
  .site-nav a::before { visibility: visible; opacity: .4; }
  .site-nav a[aria-current="page"]::before { opacity: 1; }
  .menu-toggle { display: inline-flex; margin-inline-start: auto; }
  .site-nav {
    position: absolute;
    inset-block-start: calc(100% + .4rem);
    inset-inline: var(--gutter);
    display: grid;
    width: auto;
    max-height: calc(100dvh - var(--header-height) - 1.5rem);
    overflow-y: auto;
    padding: .6rem;
    border: 1px solid var(--trim);
    border-radius: .65rem;
    background: linear-gradient(145deg, #24293a, #151824);
    box-shadow: inset 0 0 0 3px #0e1018, 0 18px 35px #0a0a13c6;
  }
  .menu-toggle[aria-expanded="false"] + .site-nav { display: none; }
}

@media (max-width: 66rem) and (scripting: none) {
  .site-header:has(.site-nav) { position: relative; }
  .site-header:has(.site-nav) + main .codex-index-rail { inset-block-start: 0; }
  .site-bar { padding: .45rem 0; }
  .site-header .menu-toggle + .site-nav {
    position: static;
    display: flex;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }
}

@media (width < 768px) {
  :root:has(.codex-home) { scroll-padding-block-end: calc(4.65rem + env(safe-area-inset-bottom)); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 1.45rem; padding-block: 1.85rem; }
  .hero-copy h1 { font-size: clamp(2.2rem, 8.1vw, 3.55rem); }
  .hero-visuals { max-width: 33rem; }
  .codex-entries, .forge-lab { grid-template-columns: minmax(0, 1fr); }
  .forge-slot { width: min(100%, 9.5rem); }
  .deletion-routes { grid-template-columns: minmax(0, 1fr); }
  .index-group { display: flex; flex-wrap: wrap; }
  .mobile-play-rail {
    position: fixed;
    z-index: 6;
    inset: auto 0 0;
    display: grid;
    justify-items: center;
    padding: .55rem var(--gutter) calc(.55rem + env(safe-area-inset-bottom));
    border-block-start: 1px solid #c79e62;
    background: linear-gradient(180deg, #232638, #10121b);
    box-shadow: 0 -.55rem 1.5rem #03040883;
  }
  .mobile-play-rail a { width: min(100%, 26rem); }
  .mobile-play-rail[data-hero-visible]:not(:focus-within) { visibility: hidden; }
  .codex-home .site-footer { padding-block-end: calc(5.75rem + env(safe-area-inset-bottom)); }
}

@media (max-width: 42rem) {
  .adventure-steps, .join-card { grid-template-columns: minmax(0, 1fr); }
  .adventure-step { grid-template-rows: auto; }
}

@media (max-width: 32rem) {
  .chapter-cover { align-items: start; }
  .site-bar { gap: .45rem; }
  .brand { gap: .45rem; font-size: 1.05rem; }
  .brand img { width: 2.35rem; height: 2.35rem; }
  .menu-toggle { justify-content: center; min-width: 3rem; padding-inline: .4rem; }
  .menu-toggle span { display: none; }
  .language-toggle { gap: .3rem; padding-inline: .4rem; }
}

@media (forced-colors: active) {
  .hero-copy h1, .archive-banner h1 { color: CanvasText; background: none; filter: none; }
  .site-nav a[aria-current="page"], .codex-index a[aria-current], .language-options [aria-current], .protection { border-color: Highlight; }
  .codex-entry :focus-visible { outline-color: Highlight; }
}
