:root {
  color-scheme: light;
  --ink: #33263e;
  --muted: #685b70;
  --paper: #fbf8fc;
  --line: #d6cbdc;
  --gold: #f5d8a9;
  --plum: #342540;
  --serif: "STIX Two Text", "Songti SC", "Noto Serif CJK SC", "Noto Serif", Georgia, serif;
  --sans: "DM Sans", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body, h1, h2, h3, figure, p, ul { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .25em; }
button { font: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #885786; outline-offset: 5px; }
.cover :focus-visible, footer :focus-visible { outline-color: var(--gold); }
.wrap { width: min(84%, 76rem); margin-inline: auto; }
.skip { position: absolute; z-index: 4; left: 1rem; top: -6rem; background: white; color: var(--ink); padding: .65rem 1rem; }
.skip:focus { top: 1rem; }
.cover {
  color: #fff8f6;
  position: relative;
  isolation: isolate;
  background: #2c203b;
  border-bottom: 2px solid #c4a487;
}
.cover::after {
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, #20162fec 2%, #2b1c3bdc 22%, #39274794 40%, #51375e16 67%, transparent 84%),
    linear-gradient(180deg, #261a388c, transparent 26%, transparent 71%, #2c1d4669);
}
.sky-scene { overflow: hidden; isolation: isolate; pointer-events: none; }
.summit { position: absolute; inset: 0; z-index: -2; }
.sky-plate, .sky-scene canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.sky-plate { object-fit: cover; }
.summit .sky-plate { object-position: 54% 43%; filter: saturate(.84); }
.passage .sky-plate { filter: saturate(.92); }
.sky-scene canvas { z-index: 1; }
.hero-motion { position: absolute; left: 0; right: 0; bottom: 1.3rem; display: flex; justify-content: end; pointer-events: none; }
.motion-control {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.55rem;
  background: transparent; color: #604f69; border: 1px solid transparent; border-radius: 2rem;
  padding: .35rem .7rem; cursor: pointer; font-size: .88rem; pointer-events: auto;
}
.hero-motion .motion-control { color: #fff6ed; background: #2c203bd1; border-color: #d4bdc278; }
.motion-control:hover { border-color: currentColor; }
.motion-control i { width: .72rem; height: .76rem; border-inline: .19rem solid currentColor; }
.motion-control[data-paused] i { height: 0; width: 0; border: .39rem solid transparent; border-left: .64rem solid currentColor; border-right: 0; margin-inline: .04rem; }
.cloud-study .passage {
  position: relative; aspect-ratio: 16 / 9; border-radius: .25rem;
  background: #e6dce9; border: 1px solid #bfaec5; box-shadow: 0 .6rem 2.4rem #51365f14;
}
.cloud-study figcaption {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: .3rem; color: var(--muted); font-size: .9rem;
}
header, header nav, .brand, .status-row, .actions, footer .wrap { display: flex; align-items: center; }
header { min-height: 5.1rem; border-bottom: 1px solid #f7efce55; justify-content: space-between; gap: .7rem; }
.brand { gap: .65rem; font-family: var(--serif); font-size: 1.2rem; font-weight: 700; letter-spacing: .045em; text-decoration: none; }
.brand img { width: 2.55rem; height: 2.55rem; border-radius: 24%; border: 1px solid #ecd8b7b3; filter: grayscale(.95) sepia(.32); }
nav { gap: clamp(.8rem, 2.7vw, 2.6rem); }
nav a { padding-block: .65rem; font-size: .94rem; font-weight: 600; text-decoration: none; }
nav a:hover, .status-row a:hover { text-decoration: underline; }
#language { border-left: 1px solid #fff9; padding-left: clamp(.8rem, 2vw, 1.8rem); }
.hero { min-height: clamp(31rem, 73vh, 48rem); display: grid; align-items: center; padding-block: 3.8rem 5rem; }
.hero-copy { width: min(100%, 38rem); }
.genre, .section-label { font-size: .9rem; font-weight: 650; letter-spacing: .13em; }
.genre { color: #f9dba2; display: flex; align-items: center; gap: .8rem; }
.genre::before, .section-label::before { content: ""; width: 2rem; height: 1px; display: inline-block; background: currentColor; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; }
h1 { font-size: clamp(4.2rem, 7.7vw, 7.9rem); line-height: 1.14; letter-spacing: .035em; margin: 1rem 0 .2rem; text-shadow: 0 .08em .3em #271a3e80; }
:lang(en) h1 { font-size: clamp(3.5rem, 6.4vw, 6.6rem); line-height: .99; letter-spacing: -.05em; max-width: 8.2em; margin-bottom: .7rem; }
.other-title { color: #f5d69b; font: 500 clamp(1rem, 1.45vw, 1.35rem) var(--serif); text-transform: uppercase; letter-spacing: .29em; }
.intro { margin-top: 1.5rem; font-size: clamp(1rem, 1.35vw, 1.2rem); line-height: 1.85; max-width: 26em; text-wrap: pretty; color: #fcf5f7; }
.actions { gap: .75rem; margin-top: 1.9rem; flex-wrap: wrap; }
.action { display: flex; flex-direction: column; justify-content: center; gap: .25rem; padding: .78rem 1.2rem; min-width: 10.6rem; min-height: 4rem; text-decoration: none; border: 1px solid #dfc895; border-radius: .22rem; }
.android { color: #3b293c; background: #f6dbb6; }
.macos { color: #fff5ed; background: #30213fe3; }
.action strong { font-size: 1rem; }
.action small { font-size: .79rem; letter-spacing: .045em; }
.action[href]:hover { box-shadow: 0 0 0 2px var(--gold); }
[aria-disabled="true"] { cursor: default; }
.action[aria-disabled="true"] { border-style: dashed; }
.status-row { gap: .9rem; margin-top: 1rem; color: #f4e8ee; font-size: .9rem; flex-wrap: wrap; }
.status-row a { border-left: 1px solid #e1dcc67a; padding-left: .9rem; }
.journey { display: grid; grid-template-columns: .86fr 1.22fr; align-items: center; gap: clamp(2rem, 5vw, 6rem); }
.journey, .schools, .downloads { padding-block: clamp(3.3rem, 6.1vw, 6.3rem); }
.section-label { color: #805775; display: flex; align-items: center; gap: .65rem; }
.section-label::before { width: 1.7rem; }
h2 { font-size: clamp(2.15rem, 3.15vw, 3.6rem); line-height: 1.18; letter-spacing: -.025em; margin: .7rem 0 1rem; }
.chapter > p:not(.section-label), .school-intro, .platforms p { line-height: 1.85; color: var(--muted); text-wrap: pretty; }
.facts { list-style: none; padding: 0; margin-top: 1.6rem; display: flex; gap: 2rem; }
.facts li { display: grid; gap: .25rem; padding-left: .8rem; border-left: 2px solid #b78d70; }
.facts b { font: 600 1.35rem var(--serif); }
.facts span { font-size: .88rem; color: var(--muted); }
.combat-guide {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 6rem); border-top: 1px solid var(--line); padding-top: 2rem;
}
.combat-guide h3 { font-size: clamp(1.5rem, 2.2vw, 2.2rem); margin-bottom: 1rem; }
.combat-guide p, .link-steps { line-height: 1.75; color: var(--muted); }
.element-cycles, .element-cycles dd { margin: 0; }
.element-cycles dt { font-weight: 650; }
.element-cycles dd + dt { margin-top: 1.2rem; }
.element-cycles .cycle { color: var(--ink); font: 600 1.12rem/1.6 var(--serif); margin: .2rem 0 .4rem; }
.link-steps { margin: 0 0 1rem; padding-inline-start: 1.6rem; }
.link-steps li { padding-inline-start: .2rem; }
.link-steps li + li { margin-top: .6rem; }
.link-steps li::marker { color: #805775; font-weight: 650; }
.schools { background: #f0eaf3; border-block: 1px solid #d9cede; }
.school-intro { max-width: 48rem; }
.cast { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2rem; list-style: none; padding: 0; margin-top: 2rem; }
.cast li { min-width: 0; border-top: 2px solid var(--element); padding-top: .65rem; }
.cast img { width: 100%; aspect-ratio: 1; object-fit: contain; background: radial-gradient(ellipse at 50% 74%, var(--wash), transparent 74%); }
.cast span { display: block; margin-top: .75rem; font-size: .88rem; color: var(--muted); }
.cast h3, .platforms h3 { font-size: clamp(1.4rem, 1.9vw, 2rem); margin: .2rem 0 .25rem; }
.cast p { font-size: .95rem; }
.earth { --element: #946144; --wash: #dac09d; }
.metal { --element: #98714c; --wash: #e9d0b0; }
.water { --element: #626f9c; --wash: #c3cbe5; }
.wood { --element: #8a6d98; --wash: #d8c7e0; }
.fire { --element: #a35647; --wash: #deb7a4; }
.release-line { color: var(--muted); margin-bottom: 1.6rem; }
#retry { padding: .35rem .65rem; margin-left: .35rem; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: .25rem; cursor: pointer; }
.platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 2.8rem; }
.platforms article { border-top: 1px solid #bbaac2; padding-top: 1.2rem; min-width: 0; }
.platforms p { margin: .4rem 0; }
.file-link { display: inline-block; color: #69437b; font-weight: 650; padding: .5rem 0; }
.file-link[aria-disabled="true"] { color: var(--muted); }
.signing, details { font-size: .9rem; }
details { margin-top: .35rem; }
summary { cursor: pointer; }
code { display: block; margin-top: .5rem; overflow-wrap: anywhere; user-select: all; }
footer { background: var(--plum); color: #f8f0f3; }
footer .wrap { justify-content: space-between; padding-block: 1.55rem; font-size: .9rem; }
[hidden] { display: none !important; }
@media (max-width: 760px) {
  .wrap { width: 89%; }
  .journey, .combat-guide { grid-template-columns: 1fr; gap: 1.6rem; }
  .cast { gap: .85rem; grid-template-columns: repeat(3, 1fr); }
  .platforms { gap: 1.4rem; }
  .summit .sky-plate { object-position: 57% 50%; }
}
@media (max-width: 540px) {
  header { min-height: 4.3rem; }
  .brand { font-size: 1rem; gap: .35rem; }
  .brand img { width: 1.85rem; height: 1.85rem; }
  nav { gap: .7rem; }
  nav a { font-size: .88rem; }
  nav a:first-child { display: none; }
  :lang(en) .brand span { max-width: 4.7em; line-height: 1; }
  #language { padding-left: .65rem; }
  .cover::after { background: linear-gradient(180deg, #261c3a7a 0, #2c203817 21%, #2e1d418c 43%, #2d203fe8 75%, #241932ee),
    linear-gradient(90deg, #39283c4d, transparent 85%); }
  .hero { min-height: 34rem; padding-block: 5rem 3.8rem; align-items: end; }
  .hero-motion { bottom: .65rem; }
  h1 { font-size: clamp(3.65rem, 14.4vw, 5rem); }
  .intro { margin-top: 1.05rem; }
  .actions { flex-direction: column; align-items: flex-start; gap: .5rem; margin-top: 1.2rem; }
  .action { flex-direction: row; justify-content: space-between; align-items: center; width: min(100%, 23rem); min-height: 3.1rem; gap: .5rem; padding: .65rem .8rem; }
  .action small { letter-spacing: 0; font-size: .76rem; }
  .status-row { margin-top: .75rem; }
  .platforms { grid-template-columns: 1fr; }
  .cast { grid-template-columns: repeat(2, 1fr); }
  .cast li:last-child { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { :root { scroll-behavior: auto; } }
