:root {
  color-scheme: dark;
  --night: #081321;
  --navy: #0c1c2d;
  --ice: #eaf7f9;
  --white: #f9fdff;
  --muted: #b6c7d3;
  --coral: #ffa98b;
  --section-ice: #edf4ff;
  --hero-stage-width: 680px;
  --heading-serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --font: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--white); background: var(--night); font-family: var(--font); }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid #00888c; outline-offset: 4px; }
.visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 10; padding: 10px 16px; background: var(--night); }
.wrap { width: min(100% - 56px, 1140px); margin-inline: auto; }
main section[id] { scroll-margin-top: 16px; }

@media (min-width: 681px) {
  main > :is(.bonuses, .roster, .closing-preorder), .site-footer {
    width: var(--hero-stage-width);
    margin-inline: auto;
    box-shadow: 0 0 60px #10386b42;
  }
}

.roster {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(40px, 6vw, 70px) clamp(42px, 7vw, 78px);
  border-block: 1px solid #87759b;
  color: var(--section-ice);
  background: radial-gradient(ellipse at 50% 35%, #252858, #10162e 58%, #081222 88%);
}
.roster::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, #0b1528 0%, transparent 24% 54%, #0a1428 91%),
    radial-gradient(ellipse at 50% 41%, #12163230 13%, #0c132b9c 80%),
    url("assets/city.webp") center 46% / cover no-repeat;
  opacity: .62;
}
.roster .wrap, .bonuses > .section-heading { width: min(100% - 24px, 760px); }
.section-heading { text-align: center; }
.section-heading h2 {
  margin: 7px 0 12px;
  font: 900 clamp(31px, 8vw, 58px)/1.1 var(--heading-serif);
  letter-spacing: .09em;
  color: var(--section-ice);
  text-shadow: 0 2px #101735, 0 0 20px #97a8ffae;
}
.section-ornament {
  display: flex;
  width: min(84%, 440px);
  align-items: center;
  gap: 12px;
  margin-inline: auto;
  color: #e6c083;
}
.section-ornament::before, .section-ornament::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, #7c90db 28%, currentColor);
}
.section-ornament::after { transform: scaleX(-1); }
.section-ornament span {
  width: 23px;
  aspect-ratio: 1;
  background: conic-gradient(from 45deg, #d8ac60, #8c6331, #f6d99f, #ffefd0, #d8ac60);
  clip-path: polygon(50% 0, 64% 36%, 100% 50%, 64% 64%, 50% 100%, 36% 64%, 0 50%, 36% 36%);
}
.character-stage {
  --character-art-height: clamp(350px, 112vw, 570px);
  position: relative;
  isolation: isolate;
  height: calc(var(--character-art-height) * .76);
  background: radial-gradient(ellipse at 50% 42%, #231b52a6 4%, #292d6094 25%, transparent 68%);
}
.character-stage::before, .character-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 6%;
  left: 50%;
  translate: -50% 0;
  width: min(96%, 560px);
  aspect-ratio: 1;
  pointer-events: none;
  border: 1px solid #c6bcff85;
  border-radius: 50%;
  box-shadow: inset 0 0 56px #8eb9ff32, 0 0 28px #9892ff44;
  mask-image: linear-gradient(#000 26%, transparent 96%);
}
.character-stage::after {
  top: 9%;
  width: min(86%, 503px);
  border-style: dashed;
  border-color: #ecc17c91;
  box-shadow: inset 0 0 30px #b5a1ff19;
}
.character-role {
  position: absolute;
  inset: 13% 0 auto;
  overflow: hidden;
  color: #ebd5ff65;
  font: italic 800 clamp(22px, 7.8vw, 62px)/1 Georgia, serif;
  letter-spacing: .06em;
  text-align: center;
  white-space: nowrap;
}
.character-art {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: var(--character-art-height);
  pointer-events: none;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(0 0 9px #98b8f96b) drop-shadow(0 8px 11px #090e29a6);
  mask-image: linear-gradient(#000 60%, #0009 68%, transparent 76%);
}
.character-art.is-loading { opacity: 0; }
.character-arrow {
  position: absolute;
  z-index: 1;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  padding: 0;
  translate: 0 -50%;
  border: 1px solid #dbba87;
  border-radius: 11px;
  background: linear-gradient(145deg, #324571, #1a2446 70%);
  color: #ffedcb;
  box-shadow: 0 2px 0 #30274b, 0 4px 13px #060c22a6, inset 0 0 0 2px #91a4e236;
}
.character-arrow::before {
  content: "";
  width: 11px;
  aspect-ratio: 1;
  border-top: 3px solid;
  border-right: 3px solid;
  rotate: 45deg;
  translate: -2px 0;
}
.character-arrow.previous { left: 1px; }
.character-arrow.next { right: 1px; }
.character-arrow.previous::before { rotate: -135deg; translate: 2px 0; }
.character-arrow:hover { background: #405586; }
.character-arrow:focus-visible, .character-thumbs button:focus-visible { outline-color: #c4d7ff; }
.character-copy {
  position: relative;
  margin-top: -15px;
  padding-inline: clamp(8px, 3vw, 38px);
}
.character-label { display: flex; align-items: center; gap: 12px; }
.character-name {
  margin: 4px 0 0;
  color: #d0dbf5;
  font-size: clamp(12px, 2.9vw, 16px);
  line-height: 1.2;
}
.character-sprite {
  flex-shrink: 0;
  width: clamp(52px, 12vw, 64px);
  height: auto;
  aspect-ratio: 1;
  padding: 5px;
  object-fit: contain;
  image-rendering: pixelated;
  border: 1px solid #bf985c;
  border-radius: 11px;
  background: linear-gradient(#cbdaf5, #7d96bd);
  box-shadow: inset 0 0 0 2px #ffeed792;
}
.character-copy h3 {
  margin: 0;
  color: #ffe0a5;
  text-shadow: 0 2px 5px #080c20, 0 0 16px #bc79e86b;
  font: 900 clamp(25px, 7.2vw, 45px)/1.17 var(--heading-serif);
}
.character-copy > p {
  min-height: 3.3em;
  margin: 10px 0 19px;
  color: #e0e6fc;
  text-shadow: 0 1px 4px #090b20;
  font-size: clamp(14px, 1.7vw, 17px);
  line-height: 1.65;
}
.character-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(4px, 1.15vw, 11px);
  max-width: 606px;
  margin: 17px auto 0;
  padding: 3px;
}
.character-thumbs button {
  position: relative;
  min-width: 0;
  min-height: 44px;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 2px;
  border: 1px solid #798bb0;
  border-radius: 7px;
  background: linear-gradient(150deg, #455785, #1b284b);
  box-shadow: inset 0 0 0 1px #bfcffa44;
}
.character-thumbs img {
  position: absolute;
  inset: 10%;
  width: 80%;
  height: 80%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: grayscale(1);
  opacity: .76;
  transition: filter .2s, opacity .2s;
}
.character-thumbs button:hover img, .character-thumbs [aria-pressed="true"] img { filter: none; opacity: 1; }
.character-thumbs [aria-pressed="true"] {
  border-color: #ffe3af;
  background: linear-gradient(150deg, #e7c88c, #8d6b9f);
  box-shadow: inset 0 0 0 1px #fff9ee, 0 0 0 2px #bd935b, 0 0 15px #d1a4ef63;
}

.closing-preorder {
  container-type: inline-size;
  display: grid;
  justify-items: center;
  gap: clamp(18px, 4.5vw, 26px);
  padding-block: clamp(32px, 8vw, 56px) clamp(42px, 10vw, 68px);
  background: radial-gradient(ellipse at 50% 48%, #293b71 0%, #101a33 57%, #070e1b 100%);
  text-align: center;
}
.closing-preorder h2 {
  margin: 0;
  color: #ffe5a4;
  font: 900 clamp(27px, 7vw, 44px)/1.2 var(--heading-serif);
  letter-spacing: .1em;
  text-shadow: 0 2px #101735, 0 0 16px #ab88ff80;
}
.closing-preorder .store-badge { width: min(76%, 440px); }
.store-switch {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: 6px 9px;
  border: 1px solid #d8f1ff9e;
  border-radius: 20px;
  background: #14284f;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.store-switch:is(:hover, :focus-visible) { background: #2d497d; }

.site-footer {
  background: #000;
  color: #d6d6d6;
  font-size: clamp(12px, 2.8vw, 14px);
  line-height: 1.5;
}
.site-footer-inner {
  width: min(100% - 32px, 640px);
  margin-inline: auto;
  padding-block: 18px 15px;
}
.site-footer-game {
  display: grid;
  grid-template-columns: clamp(56px, 14vw, 86px) minmax(0, max-content);
  justify-content: center;
  align-items: center;
  gap: clamp(12px, 3.5vw, 20px);
}
.site-footer-icon {
  width: 100%;
  height: auto;
  border-radius: 22%;
}
.site-footer-details {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 2px clamp(9px, 3vw, 18px);
  margin: 0;
}
.site-footer-details dt {
  color: #edc955;
  font-weight: 800;
  letter-spacing: .07em;
}
.site-footer-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.site-footer-meta {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
}

@media (max-width: 760px) {
  .wrap { width: min(100% - 36px, 590px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

:root:lang(en) .section-heading h2 { font-size: clamp(26px, 7vw, 50px); letter-spacing: .015em; }
:root:lang(ko) { --font: "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; --heading-serif: "AppleMyungjo", Batang, serif; }
:root:lang(zh-Hans) { --font: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; --heading-serif: "Songti SC", SimSun, serif; }

:root:not(:lang(ja), :lang(ko), :lang(zh)) .section-heading h2 {
  font-size: clamp(26px, 7vw, 50px);
  letter-spacing: normal;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
:root:not(:lang(ja), :lang(ko), :lang(zh)) .closing-preorder h2 {
  max-inline-size: 93%;
  font-size: clamp(24px, 7vw, 42px);
  letter-spacing: normal;
  overflow-wrap: anywhere;
}
:root:lang(zh-Hant) { --font: "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif; --heading-serif: "Songti TC", "PMingLiU", serif; }
:root:lang(th) { --font: "Thonburi", "Leelawadee UI", system-ui, sans-serif; --heading-serif: var(--font); }
:root:lang(hi) { --font: "Kohinoor Devanagari", "Nirmala UI", system-ui, sans-serif; --heading-serif: var(--font); }
:root:lang(ar) { --font: "Geeza Pro", "Segoe UI", system-ui, sans-serif; --heading-serif: var(--font); }
[dir="rtl"] .character-role, [dir="rtl"] .site-footer-details dt { letter-spacing: normal; }
[dir="rtl"] .character-arrow.previous { left: auto; right: 1px; }
[dir="rtl"] .character-arrow.next { right: auto; left: 1px; }
[dir="rtl"] .character-arrow.previous::before { rotate: 45deg; translate: -2px 0; }
[dir="rtl"] .character-arrow.next::before { rotate: -135deg; translate: 2px 0; }
[dir="rtl"] .inline-arrow { transform: scaleX(-1); }
