@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2026;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2026;
}

:root {
  color-scheme: light;
  --paper: #f6f3ee;
  --paper-2: #eee9df;
  --card: #fffdf9;
  --ink: #16171b;
  --ink-2: #3a3d45;
  --ink-3: #6b6f78;
  --ink-4: #9b9ea5;
  --line: rgba(22, 23, 27, 0.1);
  --line-strong: rgba(22, 23, 27, 0.18);
  /* The app's own palette: Skirk violet for the brand, rarity colours for wish data. */
  --accent: oklch(0.55 0.13 285);
  --accent-ink: oklch(0.45 0.13 285);
  --accent-soft: oklch(0.94 0.03 285);
  --gold: oklch(0.77 0.14 74);
  --gold-deep: oklch(0.64 0.15 60);
  --purple: oklch(0.62 0.16 305);
  --blue: oklch(0.7 0.09 235);
  --sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --serif: "Instrument Serif", "Songti SC", "Noto Serif SC", serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --page-pad: clamp(20px, 5vw, 64px);
  --max: 1240px;
  --shadow-window: 0 32px 64px -34px rgba(48, 36, 18, 0.42), 0 12px 28px -14px rgba(48, 36, 18, 0.18);
  --shadow-photo: 0 22px 40px -22px rgba(48, 36, 18, 0.5), 0 6px 14px -8px rgba(48, 36, 18, 0.2);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--paper);
  /* A faint paper grain, rasterised once as a small tile. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.24 0 0 0 0 0.16 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Chinese headings break at punctuation, never inside a phrase. */
h1,
h2,
h3 {
  margin: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

p {
  margin: 0;
}

.num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15em;
  letter-spacing: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Navigation ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
  padding: 0 var(--page-pad);
  transition: background-color 0.3s, box-shadow 0.3s;
}

.site-nav[data-scrolled] {
  background: rgba(246, 243, 238, 0.94);
  box-shadow: 0 1px 0 var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
}

.brand-name {
  font-family: var(--serif);
  font-size: 23px;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1;
}

.site-nav nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.site-nav nav a,
.nav-download {
  color: var(--ink-2);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav nav a:hover {
  color: var(--ink);
}

.nav-download {
  padding: 7px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  transition: background-color 0.2s, border-color 0.2s;
}

.nav-download:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), background-color 0.2s, border-color 0.2s, color 0.2s;
}

.button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0) scale(0.98);
}

.button-primary {
  background: var(--ink);
  color: #fff;
}

.button-primary:hover {
  background: #000;
}

.button-quiet {
  border-color: var(--line-strong);
  color: var(--ink);
}

.button-quiet:hover {
  border-color: var(--ink);
}

.button-large {
  height: 56px;
  padding: 0 28px;
  font-size: 16px;
}

/* ---------- Window and photo frames ---------- */

.window,
.photo {
  margin: 0;
  overflow: hidden;
  background: var(--card);
}

.window {
  border: 1px solid rgba(22, 23, 27, 0.09);
  border-radius: 14px;
  box-shadow: var(--shadow-window);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfaf8;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1;
}

.window-bar img {
  width: 14px;
  height: 14px;
}

.window-controls {
  width: 62px;
  height: 10px;
  margin-left: auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='62' height='10' fill='none' stroke='%239b9ea5' stroke-width='1.1'%3E%3Cpath d='M1 5h8'/%3E%3Crect x='27' y='1' width='8' height='8' rx='1'/%3E%3Cpath d='m53 1 8 8m0-8-8 8'/%3E%3C/svg%3E") no-repeat center / contain;
}

.window > img {
  display: block;
  width: 100%;
  height: auto;
}

.photo {
  border: 1px solid rgba(22, 23, 27, 0.08);
  border-radius: 12px;
  box-shadow: var(--shadow-photo);
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  max-width: 1360px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 96px) var(--page-pad) clamp(88px, 10vw, 140px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  color: var(--ink-3);
  font-size: 14px;
  letter-spacing: 0.06em;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.hero h1 {
  font-size: clamp(56px, 7.6vw, 112px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero h1 .line {
  display: block;
}

.lead {
  max-width: 30em;
  margin-top: 30px;
  color: var(--ink-2);
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-meta {
  margin-top: 18px;
  color: var(--ink-3);
  font-size: 13px;
}

.hero-stage {
  position: relative;
  margin: 24px 4% 40px 2%;
}

.hero-window {
  position: relative;
  z-index: 1;
}

.hero-share {
  position: absolute;
  z-index: 2;
  left: -9%;
  bottom: -18%;
  width: 28%;
  rotate: -5deg;
}

.pity-chip {
  position: absolute;
  z-index: 3;
  right: -5%;
  bottom: -9%;
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  gap: 2px 16px;
  min-width: 210px;
  padding: 14px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-photo);
  rotate: 2deg;
}

.pity-chip-label {
  grid-column: 1 / -1;
  color: var(--ink-3);
  font-size: 12px;
}

.pity-chip-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.pity-chip-value b {
  font-family: var(--serif);
  font-size: 44px;
  font-style: italic;
  font-weight: 400;
  line-height: 1;
}

.pity-chip-value small {
  color: var(--ink-4);
  font-size: 14px;
}

.pity-chip-bar {
  grid-column: 1 / -1;
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-2);
}

.pity-chip-bar i {
  display: block;
  width: calc(43 / 90 * 100%);
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transform-origin: left center;
}

.sticker {
  position: absolute;
  z-index: 4;
  right: -4%;
  top: -14%;
  width: 21%;
  height: auto;
  rotate: 9deg;
  filter: drop-shadow(0 10px 14px rgba(48, 36, 18, 0.22));
}

/* ---------- Wish tape ---------- */

.tape-section {
  padding-bottom: clamp(72px, 9vw, 120px);
}

.tape-caption {
  max-width: var(--max);
  margin: 0 auto 28px;
  padding: 0 var(--page-pad);
  color: var(--ink-2);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.6;
}

.tape {
  overflow: hidden;
  padding-top: 26px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.tape-track {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: max-content;
  height: 84px;
  animation: tape-scroll 240s linear infinite;
}

.tape[data-paused] .tape-track {
  animation-play-state: paused;
}

.tape-cell {
  position: relative;
  flex: 0 0 auto;
  width: 9px;
  height: 22px;
  border-radius: 2px;
  background: color-mix(in oklch, var(--blue) 45%, var(--paper));
}

.tape-cell.r4 {
  height: 34px;
  background: var(--purple);
}

.tape-cell.r5 {
  width: 11px;
  height: 58px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
}

.tape-cell.r5::after {
  content: attr(data-pity);
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  translate: -50% 0;
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  line-height: 1;
}

@keyframes tape-scroll {
  to { transform: translateX(-50%); }
}

/* ---------- Section heads ---------- */

.section-head {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
  margin-bottom: clamp(40px, 6vw, 80px);
}

.section-index {
  padding-top: 0.55em;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  line-height: 1;
}

h2 {
  font-size: clamp(34px, 4.8vw, 66px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.035em;
}

/* ---------- Feature story ---------- */

.features {
  max-width: 1360px;
  margin: 0 auto;
  padding: clamp(72px, 9vw, 120px) var(--page-pad);
  border-top: 1px solid var(--line);
}

.story {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
}

.story-steps {
  margin: 0;
  padding: 0 0 0 96px;
  list-style: none;
}

.step {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 78vh;
  opacity: 0.32;
  transition: opacity 0.45s;
}

.step.is-active {
  opacity: 1;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.feature-icon svg {
  width: 26px;
  height: 26px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step h3 {
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.step p {
  margin-top: 14px;
  color: var(--ink-2);
}

.note {
  display: inline-block;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-3);
  font-size: 12px;
  line-height: 22px;
  vertical-align: 2px;
}

.facts {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 15px;
}

.facts li {
  position: relative;
  padding: 8px 0 8px 22px;
  border-top: 1px solid var(--line);
}

.facts li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--gold);
  rotate: 45deg;
  translate: 0 -50%;
}

.step-media {
  display: none;
}

.story-stage {
  position: sticky;
  top: 11vh;
  display: flex;
  align-items: center;
  height: 78vh;
}

.story-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1400 / 898;
}

.story-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.5s, transform 0.7s var(--ease-out), visibility 0s linear 0.5s;
}

.story-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.5s, transform 0.7s var(--ease-out), visibility 0s;
}

.story-slide-portrait {
  inset: -6% auto auto 50%;
  width: 34%;
  margin-left: -17%;
  rotate: -3deg;
}

.launcher-stage {
  display: grid;
  place-items: center;
}

/* Launcher illustration: the scheme and account pickers from the Windows launch page. */
.launcher-demo {
  width: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-photo);
}

.launcher-demo-large {
  width: min(560px, 90%);
  padding: 34px;
}

.launcher-label {
  margin: 0 0 10px;
  color: var(--ink-3);
  font-size: 13px;
}

.launcher-label:not(:first-child) {
  margin-top: 22px;
}

.launcher-schemes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-size: 14px;
  text-align: center;
}

.launcher-schemes span:not(.launcher-pill) {
  position: relative;
  z-index: 1;
  padding: 9px 0;
  color: var(--ink-2);
  line-height: 1.2;
}

.launcher-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 4);
  border-radius: 9px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(22, 23, 27, 0.1), 0 0 0 1px var(--line);
  transform: translateX(calc(var(--scheme, 0) * 100%));
  transition: transform 0.55s var(--ease-out);
}

.launcher-accounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.launcher-demo-large .launcher-accounts {
  margin-top: 0;
}

.launcher-account {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 14px;
  transition: background-color 0.35s, border-color 0.35s, color 0.35s;
}

.launcher-account.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.launcher-go {
  display: inline-flex;
  margin-top: 22px;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

/* Feature icons replay the app's one-shot sidebar motions when their step becomes active. */
.feature-icon [class*="nav-"] {
  transform-box: fill-box;
  transform-origin: center;
}

.nav-icon-fill {
  fill: currentColor;
  fill-opacity: 0.16;
}

.nav-launch-trail,
.nav-gacha-trail {
  opacity: 0;
  stroke-dasharray: 1;
}

.nav-daily-check,
.nav-share-link {
  stroke-dasharray: 1;
}

.nav-characters-sparkle {
  opacity: 0;
  transition: opacity 0.2s;
}

.step.is-active .nav-characters-sparkle {
  opacity: 1;
}

.step.is-active .nav-gacha-star { animation: nav-gacha-star 640ms var(--ease-out); }
.step.is-active .nav-gacha-trail { animation: nav-trail 520ms var(--ease-out); }
.step.is-active .nav-gacha-sparkle { animation: nav-sparkle 480ms 300ms var(--ease-out) backwards; }
.step.is-active .nav-share-node { animation: nav-pop 420ms var(--ease-out) backwards; }
.step.is-active .nav-share-node:nth-of-type(2) { animation-delay: 90ms; }
.step.is-active .nav-share-node:nth-of-type(3) { animation-delay: 180ms; }
.step.is-active .nav-share-link { animation: nav-draw 420ms 200ms var(--ease-out) backwards; }
.step.is-active .nav-daily-rings { animation: nav-daily-rings 420ms var(--ease-out); }
.step.is-active .nav-daily-check { animation: nav-draw 420ms 120ms var(--ease-out) backwards; }
.step.is-active .nav-characters-card { animation: nav-characters-card 480ms var(--ease-out); }
.step.is-active .nav-characters-person { animation: nav-characters-person 480ms 60ms var(--ease-out) backwards; }
.step.is-active .nav-characters-sparkle { animation: nav-sparkle 520ms 160ms var(--ease-out) backwards; }
.step.is-active .nav-launch-play { animation: nav-launch-play 560ms var(--ease-out); }
.step.is-active .nav-launch-trail { animation: nav-trail 560ms var(--ease-out); }

@keyframes nav-launch-play {
  0% { transform: translateX(-2.5px) scale(0.8); }
  55% { transform: translateX(1.2px) scale(1.06); }
  100% { transform: none; }
}

@keyframes nav-trail {
  0% { opacity: 0; stroke-dashoffset: 1; }
  35% { opacity: 1; stroke-dashoffset: 0; }
  100% { opacity: 0; stroke-dashoffset: 0; }
}

@keyframes nav-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes nav-pop {
  from { transform: scale(0); }
}

@keyframes nav-daily-rings {
  0% { transform: translateY(-1.5px); }
  60% { transform: translateY(0.4px); }
  100% { transform: none; }
}

@keyframes nav-characters-card {
  0% { transform: rotate(-10deg) scale(0.88); }
  60% { transform: rotate(2deg) scale(1.03); }
  100% { transform: none; }
}

@keyframes nav-characters-person {
  0% { transform: translateY(2.5px); opacity: 0; }
  70% { transform: translateY(-0.5px); opacity: 1; }
  100% { transform: none; opacity: 1; }
}

@keyframes nav-sparkle {
  0% { transform: scale(0) rotate(-90deg); opacity: 0; }
  60% { transform: scale(1.3) rotate(10deg); opacity: 1; }
  100% { transform: none; opacity: 1; }
}

@keyframes nav-gacha-star {
  0% { transform: translate(4px, -4px) rotate(-70deg) scale(0.45); opacity: 0.3; }
  60% { transform: rotate(10deg) scale(1.1); opacity: 1; }
  100% { transform: none; }
}

/* ---------- Wish simulator ---------- */

.gacha-sim {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  max-width: 1360px;
  margin: 0 auto;
  padding: clamp(72px, 9vw, 120px) var(--page-pad);
  border-top: 1px solid var(--line);
}

.sim-copy .section-index {
  padding: 0;
  margin-bottom: 18px;
}

.sim-copy > p:not(.section-index) {
  max-width: 28em;
  margin-top: 24px;
  color: var(--ink-2);
}

.sim-copy .sim-aside {
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 14px;
}

.sim-board {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 3vw, 34px);
  border-radius: 24px;
  /* A night sky behind the tiles: two fixed layers of specks over deep indigo. */
  background:
    radial-gradient(1.2px 1.2px at 12% 18%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1px 1px at 76% 12%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1.4px 1.4px at 88% 64%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(1px 1px at 32% 82%, rgba(255, 255, 255, 0.45), transparent 60%),
    radial-gradient(1px 1px at 54% 40%, rgba(255, 255, 255, 0.35), transparent 60%),
    radial-gradient(120% 90% at 50% 0%, #2c2a52 0%, #17162b 58%, #100f1d 100%);
  color: #f3f1ec;
  box-shadow: 0 40px 80px -40px rgba(23, 22, 43, 0.65);
}

.sim-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 32px;
  margin-bottom: 22px;
}

.sim-stats div {
  display: grid;
  gap: 2px;
}

.sim-stats span {
  color: rgba(243, 241, 236, 0.6);
  font-size: 13px;
}

.sim-stats b {
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}

.sim-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(8px, 1.2vw, 12px);
  margin: 0;
  padding: 0;
  list-style: none;
  perspective: 900px;
}

.sim-tile {
  position: relative;
  display: grid;
  align-content: end;
  justify-items: center;
  gap: 4px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  padding: 10px 6px;
  border-radius: 12px;
  font-size: clamp(11px, 1.1vw, 14px);
  line-height: 1.3;
  text-align: center;
}

.sim-tile.is-empty {
  border: 1px dashed rgba(243, 241, 236, 0.2);
}

.sim-tile.r3 { background: linear-gradient(180deg, #3b5b8c, #2a4068); }
.sim-tile.r4 { background: linear-gradient(180deg, #6d4c9f, #4a3373); }
.sim-tile.r5 { background: linear-gradient(180deg, #d8a24b, #a8692c); color: #fff8ea; }

.sim-tile .stars {
  color: rgba(255, 236, 170, 0.95);
  font-size: 0.8em;
  letter-spacing: 0.06em;
}

.sim-tile.is-revealed {
  animation: tile-in 520ms var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}

.sim-tile.r5.is-revealed::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: tile-shine 900ms ease-out forwards;
  animation-delay: calc(var(--i, 0) * 70ms + 420ms);
}

@keyframes tile-in {
  from { opacity: 0; transform: rotateY(80deg) scale(0.92); }
}

@keyframes tile-shine {
  to { transform: translateX(120%); }
}

.sim-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.sim-actions .button-primary {
  background: #f3f1ec;
  color: #16162a;
}

.sim-actions .button-primary:hover {
  background: #fff;
}

.sim-result {
  color: rgba(243, 241, 236, 0.75);
  font-size: 14px;
}

/* ---------- Data ---------- */

.data {
  max-width: 1360px;
  margin: 0 auto;
  padding: clamp(72px, 9vw, 120px) var(--page-pad);
  border-top: 1px solid var(--line);
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  padding-left: 96px;
}

.data-grid article {
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}

.data-grid h3 {
  font-size: 20px;
  font-weight: 700;
}

.data-grid p {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 15px;
}

/* ---------- Download ---------- */

.download {
  padding: clamp(40px, 6vw, 72px) var(--page-pad);
}

.download-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px);
  border-radius: 28px;
  background: var(--ink);
  color: #f3f1ec;
}

.download-logo {
  width: clamp(72px, 9vw, 112px);
  height: auto;
  rotate: -6deg;
}

.download-copy h2 {
  color: #fff;
}

.download-copy > p {
  max-width: 36em;
  margin-top: 16px;
  color: rgba(243, 241, 236, 0.75);
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 32px;
}

.download-actions .button-primary {
  background: #f3f1ec;
  color: var(--ink);
}

.download-actions .button-primary:hover {
  background: #fff;
}

.download-meta {
  color: rgba(243, 241, 236, 0.65);
  font-size: 14px;
}

.download-mac {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(243, 241, 236, 0.14);
  color: rgba(243, 241, 236, 0.55);
  font-size: 14px;
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 1360px;
  margin: 0 auto;
  padding: clamp(72px, 9vw, 120px) var(--page-pad);
}

.faq-list {
  max-width: 860px;
  margin-left: 96px;
  border-top: 1px solid var(--line-strong);
}

.faq details {
  border-bottom: 1px solid var(--line-strong);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 1.6px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.6px 14px no-repeat;
  transition: transform 0.3s var(--ease-out);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  max-width: 44em;
  padding-bottom: 24px;
  color: var(--ink-2);
}

/* ---------- Footer ---------- */

.site-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 36px var(--page-pad) 48px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.footer-brand img {
  width: 28px;
  height: 28px;
}

.footer-brand .brand-name {
  font-size: 20px;
}

/* ---------- Motion ---------- */

/* Entrance and scroll reveals only touch transform and opacity, and only run with JS enabled. */
.js .hero h1 .line,
.js .hero .eyebrow,
.js .hero .lead,
.js .hero-actions,
.js .hero-meta {
  animation: rise 900ms var(--ease-out) backwards;
}

.js .hero h1 .line:nth-child(2) { animation-delay: 80ms; }
.js .hero .lead { animation-delay: 160ms; }
.js .hero-actions { animation-delay: 220ms; }
.js .hero-meta { animation-delay: 260ms; }

.js .hero-window { animation: rise 1100ms 120ms var(--ease-out) backwards; }
.js .hero-share { animation: drop-in 1000ms 520ms var(--ease-out) backwards; }
.js .pity-chip { animation: drop-in 900ms 700ms var(--ease-out) backwards; }
.js .pity-chip-bar i { animation: grow 1400ms 900ms var(--ease-out) backwards; }
.js .sticker { animation: slap 700ms 900ms cubic-bezier(0.34, 1.56, 0.64, 1) backwards; }

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
}

@keyframes drop-in {
  from { opacity: 0; transform: translateY(-36px) rotate(-6deg); }
}

@keyframes grow {
  from { transform: scaleX(0); }
}

@keyframes slap {
  from { opacity: 0; transform: scale(1.5) rotate(-18deg); }
}

.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-stage {
    margin: 48px 6% 72px;
  }
}

@media (max-width: 900px) {
  .site-nav nav {
    display: none;
  }

  .nav-download {
    margin-left: auto;
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .section-index {
    padding-top: 0;
  }

  .story {
    grid-template-columns: minmax(0, 1fr);
  }

  .story-steps,
  .data-grid {
    padding-left: 0;
  }

  .faq-list {
    margin-left: 0;
  }

  .story-stage {
    display: none;
  }

  .step {
    min-height: 0;
    padding: 28px 0 44px;
    opacity: 1;
  }

  .step-media {
    display: block;
    margin-top: 28px;
  }

  .step-media-portrait {
    width: min(320px, 70%);
    rotate: -2deg;
  }

  .gacha-sim {
    grid-template-columns: minmax(0, 1fr);
  }

  .data-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .hero-share {
    left: -4%;
    bottom: -26%;
    width: 34%;
  }

  .pity-chip {
    right: -2%;
    bottom: -16%;
    min-width: 0;
    padding: 10px 12px 12px;
  }

  .pity-chip-value b {
    font-size: 32px;
  }

  .sticker {
    width: 24%;
  }

  .download-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .sim-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  .sim-tile {
    padding: 6px 2px;
    border-radius: 8px;
    font-size: 10px;
  }

  .sim-stats {
    gap: 20px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .tape-track {
    animation: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
