:root {
  color-scheme: light;
  --paper: #fbf9f6;
  --white: #fffdfb;
  --ink: #25213a;
  --muted: #5d586c;
  --purple: #583ba3;
  --purple-dark: #432682;
  --lavender: #eee8fa;
  --line: #e4dce8;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 1rem/1.75 var(--sans);
}

[hidden] { display: none !important; }

h1, h2, h3, h4, p, figure, ul, dl, dd { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 5px; }

.wrap {
  width: min(1120px, calc(100% - 80px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 2;
  top: .75rem;
  left: .75rem;
  transform: translateY(-200%);
  border-radius: .5rem;
  background: var(--white);
  padding: .5rem 1rem;
}
.skip-link:focus { transform: none; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2.5rem;
  min-height: 75px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-weight: 750;
  font-size: 1.25rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem clamp(1.25rem, 3vw, 2.65rem);
  color: var(--muted);
  font-size: .9rem;
}

nav a, .top-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

nav a:hover, .top-link:hover {
  color: var(--purple-dark);
  text-decoration: underline;
  text-underline-offset: .35em;
}

.hero {
  padding-block: clamp(3.25rem, 6.25vw, 6rem);
  background: linear-gradient(112deg, #faf6f2 4%, #f1eaf9 78%, #ece4f8);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 5vw, 5rem);
  align-items: center;
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 800;
  line-height: 1.2;
}

h1 {
  font-size: clamp(3.25rem, 6.5vw, 5.625rem);
  letter-spacing: -.04em;
}

h1 span {
  display: block;
  margin-top: .28em;
  color: var(--purple);
  font-size: .53em;
  letter-spacing: -.055em;
}

.hero-copy > p {
  max-width: 29em;
  margin-top: 1.55rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.55vw, 1.125rem);
  line-height: 1.9;
}

.button {
  display: inline-flex;
  min-height: 60px;
  align-items: center;
  justify-content: center;
  padding: .65rem 1.5rem;
  border: 1px solid transparent;
  border-radius: .65rem;
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
}

.download-button {
  width: min(100%, 14rem);
  margin-top: 1.8rem;
  background: var(--purple);
  color: white;
}
.download-button:hover { background: var(--purple-dark); }

.hero-copy > .platform-note {
  margin-top: .85rem;
  font-size: .84rem;
}

.platform-note a {
  color: var(--purple-dark);
  text-underline-offset: .2em;
}

.hero-figure {
  position: relative;
  display: grid;
  justify-items: end;
  padding: 0 .7rem 2rem 2.5rem;
}

.hero-art {
  width: min(100%, 365px);
  height: auto;
  border: 7px solid var(--white);
  border-radius: 48% 48% 1.15rem 1.15rem / 40% 40% 1.15rem 1.15rem;
  box-shadow: 0 14px 36px #3e275223;
}

.hero-example {
  position: absolute;
  bottom: 0;
  left: 0;
  width: min(17.8rem, 88%);
  padding: .85rem 1.05rem .95rem;
  border: 1px solid #e6ddef;
  border-radius: .85rem;
  background: var(--white);
  box-shadow: 0 10px 28px #39235116;
}

.hero-example span {
  display: block;
  margin-bottom: .25rem;
  color: var(--purple-dark);
  font-weight: 720;
  font-size: .78rem;
}

.hero-example q { display: block; font-size: .94rem; line-height: 1.55; }

.section {
  padding-block: clamp(3.3rem, 7vw, 6rem);
  scroll-margin-top: 1.25rem;
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  letter-spacing: -.04em;
}

.section-intro p, .world-intro {
  max-width: 39em;
  margin-top: .9rem;
  color: var(--muted);
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.5rem, 2vw, 1.4rem);
  list-style: none;
  margin-block: 1.85rem 1.55rem;
  padding: 0;
}

.character-grid li {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: var(--white);
}

.character-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.3;
  object-fit: cover;
  object-position: 50% 86%;
}

.character-grid span {
  display: block;
  padding: .65rem .9rem;
  font-weight: 680;
}

.feature-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1.1rem clamp(1.25rem, 3vw, 2.5rem);
}

.feature-columns > div {
  border-top: 1px solid var(--line);
  padding-top: .85rem;
}

.feature-columns h3 { margin-bottom: .35rem; font-size: 1rem; }
.feature-columns p, .feature-section > p { color: var(--muted); }
.feature-section > h2 + p { margin-top: .9rem; }
.feature-section > h2 + .feature-columns { margin-top: 1.55rem; }
.dream-mail { background: #f6f0f8; }
.model-access { background: #f3eef9; }

.plan-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-block: 1.5rem;
  text-align: left;
  font-size: .95rem;
}

.plan-table th, .plan-table td {
  padding: .7rem clamp(.25rem, 2vw, 1rem);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.plan-table thead { background: var(--lavender); }
.plan-table th:first-child { width: 26%; }
.plan-table td { color: var(--muted); }

.memory { background: var(--lavender); }

.memory-grid {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(1.75rem, 5vw, 5rem);
  align-items: center;
}

.memory-demo {
  padding: clamp(1.1rem, 3vw, 2.15rem);
  border: 1px solid #ded2ed;
  border-radius: 1.1rem;
  background: var(--white);
}

.memory-demo h3 { margin-bottom: .85rem; font-size: 1rem; }

.memory-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .25rem;
  margin-bottom: .9rem;
  padding: .25rem;
  border-radius: .7rem;
  background: #f3eef9;
}

.memory-tabs button {
  min-height: 44px;
  padding: .25rem .12rem;
  border: 1px solid transparent;
  border-radius: .5rem;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 660;
}

.memory-tabs button:hover { color: var(--purple-dark); }

.memory-tabs [aria-selected="true"] {
  border-color: #e4d8ef;
  color: var(--purple-dark);
  background: var(--white);
}

.memory-panel {
  padding: .85rem 0 .25rem .9rem;
  border-left: 3px solid #9f82ca;
}
.memory-panel + .memory-panel { margin-top: .9rem; }
.memory-panel[role="tabpanel"] { min-height: 7rem; margin-top: 0; }
.memory-panel h4 { margin-bottom: .35rem; font-size: 1rem; }
.memory-panel p { color: var(--muted); }

.world-grid {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(1.75rem, 6vw, 6rem);
}

.world-grid > img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1.05;
  object-fit: cover;
  object-position: 50% 40%;
  border-radius: 1.15rem;
}

.world-list { margin-top: 1.55rem; }
.world-list div { padding-block: .75rem; border-top: 1px solid var(--line); }
.world-list dt { margin-bottom: .12rem; font-weight: 720; }
.world-list dd { color: var(--muted); }

.changelog { border-top: 1px solid var(--line); }

.release-list {
  list-style: none;
  margin: 1.55rem 0 0;
  padding: 0;
}

.release-list li {
  display: grid;
  grid-template-columns: minmax(13rem, 1fr) minmax(0, 3fr);
  gap: .3rem 1.5rem;
  padding-block: .9rem;
  border-top: 1px solid var(--line);
}

.release-list h3 { font-size: 1rem; }
.release-list h3 > time, .release-date {
  display: block;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 400;
}
.release-list p { color: var(--muted); }
.release-archive { border-top: 1px solid var(--line); }
.release-archive > .release-list { margin-top: 0; }
.release-archive .release-list p { margin: 0; }

.faq { border-block: 1px solid var(--line); background: #f6f0f8; }

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  gap: 1.5rem clamp(2rem, 5vw, 4.5rem);
}

.faq-items { border-top: 1px solid #dfd3e7; }

details { border-bottom: 1px solid #dfd3e7; }

summary {
  display: list-item;
  padding: .85rem .2rem;
  font-weight: 680;
  cursor: pointer;
}

summary::marker { color: var(--purple); }
summary:hover { color: var(--purple-dark); }
details p { margin: 0 .2rem .95rem; color: var(--muted); }

.site-footer { background: var(--white); }
.site-footer .brand { font-size: 1rem; }
.top-link { color: var(--muted); font-size: .875rem; }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 56px); }
}

@media (max-width: 730px) {
  .wrap { width: calc(100% - 40px); }
  .header-inner { flex-wrap: wrap; gap: .25rem 1.1rem; padding-block: .65rem .2rem; }
  nav { gap: 0 1.05rem; width: 100%; }
  .hero-grid, .memory-grid, .world-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-figure { width: min(100%, 430px); margin-inline: auto; }
  .hero-art { width: min(100%, 330px); }
  .world-grid > img { order: 1; max-width: 430px; aspect-ratio: 1.2; }
}

@media (max-width: 470px) {
  nav { gap: 0 .9rem; }
  nav a { font-size: .84rem; }
  .hero { padding-block: 2.6rem 2.5rem; }
  h1 { font-size: clamp(2.85rem, 12vw, 3.55rem); }
  .hero-grid { gap: 1.6rem; }
  .hero-copy > p { margin-top: 1.1rem; }
  .download-button { width: 100%; margin-top: 1.25rem; }
  .hero-copy > .platform-note { margin-top: .7rem; }
  .hero-figure { padding-left: 2rem; padding-right: .15rem; }
  .hero-art { width: min(88%, 315px); border-width: 5px; }
  .character-grid img { aspect-ratio: .9; }
  .character-grid span { padding: .45rem .1rem; text-align: center; font-size: .82rem; }
  .plan-table { font-size: .84rem; }
  .release-list li { grid-template-columns: minmax(0, 1fr); }
  .release-list h3 > time, .release-date { display: inline; margin-left: .35rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
