/* ==========================================================================
   Anistream — Official Website
   Single stylesheet. Sections:
   1. Design tokens (light / dark)
   2. Base & typography
   3. Layout helpers
   4. Components: buttons, badges, cards, header, theme toggle, footer
   5. Home page sections
   6. Legal pages
   7. Animations & motion preferences
   ========================================================================== */

/* 1. DESIGN TOKENS ------------------------------------------------------- */
:root {
  /* Exact brand palette — Light mode */
  --bg: #FFFFFF;
  --text: #000000;
  --button: #FFFFFF;
  --border: #EEEEEE;
  --input: #FAFAFA;
  --support: #E6F9ED;

  /* Brand accent (from the Anistream app icon) */
  --brand: #06C149;
  --brand-ink: #048A33;          /* accessible green for text on light bg */
  --on-brand: #000000;
  --sakura: #FFB7C5;

  /* Derived */
  --muted: rgba(0, 0, 0, 0.62);
  --faint: rgba(0, 0, 0, 0.42);
  --surface: var(--button);
  --overlay: rgba(255, 255, 255, 0.78);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.35);
  --glow: rgba(6, 193, 73, 0.22);
  --halftone: rgba(0, 0, 0, 0.07);

  /* Type */
  --font-display: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-jp: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;

  /* Shape & rhythm */
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --container: 1200px;
  --gutter: 16px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

/* Dark mode — exact palette */
:root[data-theme="dark"] {
  --bg: #181A20;
  --text: #FFFFFF;
  --button: #1F222A;
  --border: #35383F;
  --input: #1F222A;
  --support: #35383F;

  --brand-ink: #06C149;
  --muted: rgba(255, 255, 255, 0.68);
  --faint: rgba(255, 255, 255, 0.45);
  --overlay: rgba(24, 26, 32, 0.78);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 14px 36px -14px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  --glow: rgba(6, 193, 73, 0.18);
  --halftone: rgba(255, 255, 255, 0.06);

  color-scheme: dark;
}

/* No JS / before the theme script runs: follow the OS setting */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #181A20;
    --text: #FFFFFF;
    --button: #1F222A;
    --border: #35383F;
    --input: #1F222A;
    --support: #35383F;
    --brand-ink: #06C149;
    --muted: rgba(255, 255, 255, 0.68);
    --faint: rgba(255, 255, 255, 0.45);
    --overlay: rgba(24, 26, 32, 0.78);
    --halftone: rgba(255, 255, 255, 0.06);
    color-scheme: dark;
  }
}

/* 2. BASE ---------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

img, svg { display: block; max-width: 100%; }
svg.ico {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.link { color: var(--brand-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 700;
}
p { margin: 0; }

::selection { background: var(--brand); color: #000; }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 3. LAYOUT -------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

.section { padding-block: clamp(72px, 10vw, 128px); position: relative; }
.section--support { background: var(--support); }

.section-head {
  max-width: 680px;
  margin: 0 auto clamp(40px, 6vw, 64px);
  text-align: center;
}
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
.section-head p {
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.125rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-ink);
}
.eyebrow .jp {
  font-family: var(--font-jp);
  letter-spacing: 0.1em;
  color: var(--faint);
  font-weight: 500;
}

.text-gradient {
  background: linear-gradient(100deg, var(--brand-ink) 0%, var(--brand) 55%, #4ADE80 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 4. COMPONENTS ---------------------------------------------------------- */

/* Buttons */
.btn {
  --btn-bg: var(--button);
  --btn-fg: var(--text);
  --btn-bd: var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--brand {
  --btn-bg: var(--brand);
  --btn-fg: var(--on-brand);
  --btn-bd: var(--brand);
  box-shadow: 0 8px 24px -10px var(--brand);
}
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 0.92rem; }

/* Google Play button (all download CTAs use this) */
.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 22px 8px 18px;
  border-radius: 16px;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.play-btn:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -16px var(--brand); }
.play-btn svg { width: 28px; height: 28px; flex: none; }
.play-btn__text { display: flex; flex-direction: column; line-height: 1.1; }
.play-btn__small { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.play-btn__big { font-family: var(--font-display); font-size: 1.28rem; font-weight: 600; letter-spacing: -0.01em; }
.play-btn--invert { background: var(--bg); color: var(--text); border-color: var(--bg); }

/* Badge / pill */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--input);
  font-size: 0.85rem;
  font-weight: 600;
}
.badge__dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--support);
  color: var(--brand-ink);
}
.badge__dot svg { width: 14px; height: 14px; }

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--input);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Icon tile */
.icon-tile {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--support);
  color: var(--brand-ink);
  flex: none;
}
.icon-tile svg { width: 24px; height: 24px; }

/* Card */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 32px);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
}

/* Header ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s;
}
.site-header.is-scrolled {
  background: var(--overlay);
  border-bottom-color: var(--border);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}
.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}
.brand img { width: 38px; height: 38px; border-radius: 11px; }

.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}
.nav__link:hover { color: var(--text); background: var(--input); }
.nav__link[aria-current="page"] { color: var(--text); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions .btn--brand { display: none; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--button);
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.icon-btn:hover { transform: rotate(-12deg); border-color: var(--brand); }
.icon-btn svg { width: 20px; height: 20px; }

/* Theme toggle icons */
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* Mobile menu */
.menu-toggle .i-close { display: none; }
.menu-open .menu-toggle .i-close { display: block; }
.menu-open .menu-toggle .i-menu { display: none; }

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  z-index: 99;
  padding: 12px var(--gutter) 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}
.menu-open .mobile-nav { opacity: 1; transform: none; visibility: visible; }
.menu-open .site-header { background: var(--bg); border-bottom-color: var(--border); }
.mobile-nav ul { list-style: none; margin: 0 0 16px; padding: 0; }
.mobile-nav a:not(.play-btn) {
  display: flex;
  justify-content: space-between;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.mobile-nav .play-btn { width: 100%; justify-content: center; }

@media (min-width: 960px) {
  .nav { display: block; }
  .menu-toggle, .mobile-nav { display: none; }
  .header-actions .btn--brand { display: inline-flex; }
}

/* Footer ------------------------------------------------------------- */
.site-footer {
  position: relative;
  border-top: 1px solid var(--border);
  padding: clamp(56px, 8vw, 88px) 0 28px;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }

.footer-brand p { margin: 16px 0 24px; color: var(--muted); max-width: 340px; }
.footer-col h3 {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--muted); transition: color 0.2s; }
.footer-col a:hover { color: var(--brand-ink); }
.footer-mail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  word-break: break-all;
}
.footer-mail svg { width: 18px; height: 18px; flex: none; color: var(--brand-ink); }

.footer-bottom {
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--faint);
}
.footer-watermark {
  position: absolute;
  right: -2%;
  bottom: -0.18em;
  font-family: var(--font-jp);
  font-weight: 800;
  font-size: clamp(5rem, 16vw, 13rem);
  line-height: 1;
  color: var(--text);
  opacity: 0.035;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
}

/* 5. HOME PAGE ----------------------------------------------------------- */

/* Shared anime decor: halftone dots + speed lines */
.halftone {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--halftone) 1.2px, transparent 1.4px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 65%);
  mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 65%);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 6vw, 72px) 0 clamp(64px, 9vw, 112px);
  margin-top: calc(var(--header-h) * -1);
  padding-top: calc(var(--header-h) + clamp(32px, 6vw, 72px));
}
.hero::before {
  content: "";
  position: absolute;
  width: 900px;
  height: 900px;
  right: -280px;
  top: -260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 62%);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  gap: 56px;
  align-items: center;
}
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.08fr 0.92fr; gap: 40px; } }

.hero__title {
  margin-top: 22px;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.hero__title span { display: block; }
.hero__lead {
  margin-top: 22px;
  max-width: 540px;
  font-size: clamp(1.02rem, 1.8vw, 1.18rem);
  color: var(--muted);
}
.hero__ctas {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hero__ctas .btn { min-height: 58px; padding: 0 24px; border-radius: 16px; }

.trust {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 28px;
  list-style: none;
  padding: 0;
}
@media (max-width: 400px) {
  .trust { gap: 16px; }
  .trust li + li { padding-left: 16px !important; }
}
.trust li { display: flex; flex-direction: column; }
.trust strong { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.1; }
.trust span { font-size: 0.84rem; color: var(--faint); }
.trust li + li { padding-left: 28px; border-left: 1px solid var(--border); }

/* Hero visual */
.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
}
.hero__kana {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  writing-mode: vertical-rl;
  font-family: var(--font-jp);
  font-weight: 900;
  font-size: clamp(7rem, 15vw, 11rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--brand) 45%, transparent);
  pointer-events: none;
  user-select: none;
  opacity: 0.8;
}
.hero__ring {
  position: absolute;
  width: min(440px, 88%);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--brand) 50%, transparent);
  animation: spin 40s linear infinite;
}
.hero__ring::after {
  content: "";
  position: absolute;
  top: 8%;
  right: 12%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 6px var(--glow);
}

/* Phone frame (reused in hero + screenshots) */
.phone {
  position: relative;
  width: 260px;
  aspect-ratio: 9 / 19.5;
  padding: 10px;
  border-radius: 44px;
  background: #0E0F13;
  box-shadow: 0 0 0 1px #2A2D35, var(--shadow-lg);
  flex: none;
}
.phone::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 26%;
  height: 22px;
  border-radius: var(--radius-pill);
  background: #0E0F13;
  z-index: 2;
}
.phone .phone__screen {
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: #181A20;
  isolation: isolate;
}
/* Play screenshots ship with a baked-in rounded frame: scale it out of view */
.phone .phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
}
.hero .phone { width: clamp(230px, 26vw, 290px); animation: float 7s ease-in-out infinite; }

.float-card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 10px;
  border-radius: 16px;
  background: var(--overlay);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}
.float-card .icon-tile { width: 36px; height: 36px; border-radius: 11px; }
.float-card .icon-tile svg { width: 18px; height: 18px; }
.float-card small { display: block; color: var(--faint); font-weight: 500; font-size: 0.74rem; }
.float-card--1 { top: 14%; left: 0; animation: float 6s ease-in-out infinite 0.5s; }
.float-card--2 { top: 46%; right: -2%; animation: float 7s ease-in-out infinite 1.2s; }
.float-card--3 { bottom: 10%; left: 4%; animation: float 6.5s ease-in-out infinite 2s; }
@media (max-width: 480px) {
  .hero__visual { min-height: 470px; }
  .float-card { font-size: 0.78rem; padding: 8px 12px 8px 8px; }
  .float-card--1 { left: -2%; }
  .float-card--2 { right: -3%; }
}

/* Sakura petals */
.petals { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.petals i {
  position: absolute;
  top: -40px;
  width: 14px;
  height: 11px;
  background: var(--sakura);
  border-radius: 14px 1px 14px 1px;
  opacity: 0.75;
  animation: petal-fall linear infinite;
}
.petals i:nth-child(1) { left: 8%;  animation-duration: 14s; animation-delay: -2s; }
.petals i:nth-child(2) { left: 22%; animation-duration: 18s; animation-delay: -8s; transform: scale(0.7); }
.petals i:nth-child(3) { left: 38%; animation-duration: 16s; animation-delay: -5s; }
.petals i:nth-child(4) { left: 55%; animation-duration: 20s; animation-delay: -12s; transform: scale(0.8); }
.petals i:nth-child(5) { left: 68%; animation-duration: 15s; animation-delay: -1s; }
.petals i:nth-child(6) { left: 80%; animation-duration: 19s; animation-delay: -9s; transform: scale(0.6); }
.petals i:nth-child(7) { left: 92%; animation-duration: 17s; animation-delay: -4s; }
.petals i:nth-child(8) { left: 47%; animation-duration: 22s; animation-delay: -15s; transform: scale(0.5); }

/* Genre marquee */
.marquee {
  position: relative;
  border-block: 1px solid var(--border);
  background: var(--input);
  overflow: hidden;
  padding: 18px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: 48px;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.marquee__item .jp { font-family: var(--font-jp); font-size: 0.8rem; font-weight: 600; color: var(--faint); letter-spacing: 0.08em; }
.marquee__item::after {
  content: "✦";
  margin-left: 36px;
  color: var(--brand);
  font-size: 0.9rem;
  align-self: center;
}

/* Overview */
.overview { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .overview { grid-template-columns: 1fr 1fr; gap: 72px; } }
.overview h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
.overview__text p { margin-top: 18px; color: var(--muted); font-size: 1.06rem; }
.overview__text p:first-of-type { margin-top: 22px; }
.formats { display: grid; gap: 16px; }
.format {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
}
.format h3 { font-size: 1.2rem; }
.format p { color: var(--muted); font-size: 0.95rem; margin-top: 4px; }
.format__kana {
  margin-left: auto;
  font-family: var(--font-jp);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--border);
  writing-mode: vertical-rl;
  line-height: 1;
  user-select: none;
}
:root[data-theme="dark"] .format__kana { color: #2A2D35; }

/* Features bento */
.features {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .features { grid-template-columns: repeat(2, 1fr); grid-auto-flow: dense; }
  .feature--wide { grid-column: span 2; }
}
@media (min-width: 1024px) {
  .features { grid-template-columns: repeat(3, 1fr); grid-auto-flow: row; }
  .feature--wide { grid-column: span 2; }
}
.feature { display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
.feature h3 { font-size: 1.25rem; }
.feature p { color: var(--muted); font-size: 0.97rem; }
.feature__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.feature--wide { background: linear-gradient(135deg, var(--surface) 40%, var(--support) 140%); }
.feature__num {
  position: absolute;
  top: 22px;
  right: 26px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--faint);
}

/* Offline visual */
.dl-bars { display: grid; gap: 10px; margin-top: auto; padding-top: 8px; max-width: 420px; }
.dl-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--input);
  border: 1px solid var(--border);
}
.dl-bar__thumb { width: 38px; height: 38px; border-radius: 10px; flex: none; background: linear-gradient(135deg, #06C149, #0E5C2C); }
.dl-bar:nth-child(2) .dl-bar__thumb { background: linear-gradient(135deg, #FFB7C5, #8B3A62); }
.dl-bar__track { flex: 1; height: 6px; border-radius: 6px; background: var(--border); overflow: hidden; }
.dl-bar__fill { height: 100%; width: var(--w, 60%); border-radius: inherit; background: var(--brand); }
.dl-bar svg { width: 18px; height: 18px; color: var(--brand-ink); }

/* Community visual */
.avatars { display: flex; align-items: center; margin-top: auto; padding-top: 8px; }
.avatars span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  margin-left: -10px;
  background: linear-gradient(135deg, var(--a, #06C149), var(--b, #0E5C2C));
}
.avatars span:first-child { margin-left: 0; }
.avatars em {
  margin-left: 14px;
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

/* Screenshots */
.shots { position: relative; }
.shots__track {
  display: flex;
  gap: clamp(16px, 3vw, 28px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 12px var(--gutter) 32px;
  margin-inline: calc(var(--gutter) * -1);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.shots__track::-webkit-scrollbar { display: none; }
@media (min-width: 1280px) { .shots__track { justify-content: center; } }
.shot {
  scroll-snap-align: center;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin: 0;
}
.shot .phone { width: clamp(200px, 22vw, 228px); transition: transform 0.4s var(--ease); }
.shot:hover .phone { transform: translateY(-8px) rotate(-1deg); }
.shot figcaption { text-align: center; }
.shot figcaption strong { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.shot figcaption span { font-size: 0.86rem; color: var(--muted); }
.shots__nav { display: flex; justify-content: center; gap: 10px; }
@media (min-width: 1280px) { .shots__nav { display: none; } }

/* Steps */
.steps { display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding-top: 76px; overflow: hidden; }
.step__num {
  position: absolute;
  top: 20px;
  left: 28px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3.4rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--brand-ink);
}
.step__kana {
  position: absolute;
  top: 18px;
  right: 22px;
  writing-mode: vertical-rl;
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--faint);
}
.step h3 { font-size: 1.3rem; margin-bottom: 10px; }
.step p { color: var(--muted); }
/* Manga speed lines on hover */
.step::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(from 0deg at 100% 0%, transparent 0deg 4deg, var(--halftone) 4deg 5deg);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.step:hover::after { opacity: 1; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.faq details[open] { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); box-shadow: var(--shadow-sm); }
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--support) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23048A33' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 24px 22px; color: var(--muted); }

/* Download CTA */
.cta {
  position: relative;
  overflow: hidden;
  border-radius: clamp(24px, 4vw, 40px);
  padding: clamp(48px, 8vw, 96px) clamp(24px, 6vw, 80px);
  background: #0E0F13;
  color: #FFFFFF;
  text-align: center;
  isolation: isolate;
}
:root[data-theme="dark"] .cta { background: #1F222A; border: 1px solid #35383F; }
.cta::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto;
  height: 120%;
  background: radial-gradient(ellipse at 50% 0%, rgba(6, 193, 73, 0.45), transparent 60%);
  z-index: -1;
}
.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-conic-gradient(from 0deg at 50% 120%, transparent 0deg 3deg, rgba(255, 255, 255, 0.035) 3deg 4deg);
}
.cta h2 { font-size: clamp(2.1rem, 5vw, 3.6rem); max-width: 760px; margin-inline: auto; }
.cta p { margin: 18px auto 0; max-width: 540px; color: rgba(255, 255, 255, 0.72); font-size: 1.08rem; }
.cta .play-btn { margin-top: 36px; background: #FFFFFF; color: #000000; border-color: #FFFFFF; }
.cta small { display: block; margin-top: 22px; color: rgba(255, 255, 255, 0.5); font-size: 0.84rem; }
.cta small a { text-decoration: underline; text-underline-offset: 3px; }
.cta small a:hover { color: #FFFFFF; }
.cta__kana {
  position: absolute;
  left: 4%;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--font-jp);
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 6rem);
  color: transparent;
  -webkit-text-stroke: 1px rgba(6, 193, 73, 0.35);
  pointer-events: none;
  user-select: none;
}
.cta__kana--r { left: auto; right: 4%; }
@media (max-width: 640px) { .cta__kana { display: none; } }

/* 6. LEGAL PAGES -------------------------------------------------------- */
.legal-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + clamp(28px, 5vw, 56px)) 0 clamp(36px, 5vw, 56px);
  margin-top: calc(var(--header-h) * -1);
  background: var(--support);
  border-bottom: 1px solid var(--border);
}
.legal-hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; letter-spacing: -0.035em; margin-top: 24px; }
.legal-hero p { margin-top: 14px; color: var(--muted); max-width: 640px; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--button);
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.back-link:hover { transform: translateX(-3px); border-color: var(--brand); }
.back-link span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #000;
}
.back-link svg { width: 16px; height: 16px; }
.legal-hero__kana {
  position: absolute;
  right: 3%;
  bottom: -0.15em;
  font-family: var(--font-jp);
  font-weight: 900;
  font-size: clamp(4rem, 13vw, 10rem);
  line-height: 1;
  color: var(--text);
  opacity: 0.05;
  pointer-events: none;
  user-select: none;
}
@media (max-width: 640px) { .legal-hero__kana { display: none; } }

.legal-layout {
  display: grid;
  gap: 40px;
  padding-block: clamp(40px, 6vw, 72px) clamp(72px, 10vw, 112px);
}
@media (min-width: 1024px) { .legal-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 64px; } }

.toc {
  align-self: start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--input);
  padding: 20px;
}
@media (min-width: 1024px) { .toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; } }
.toc h2 { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; font-weight: 600; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
.toc a {
  display: flex;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
  transition: background-color 0.2s, color 0.2s;
}
.toc a::before { counter-increment: toc; content: counter(toc, decimal-leading-zero); font-weight: 700; color: var(--faint); font-size: 0.78rem; padding-top: 2px; }
.toc a:hover, .toc a.is-active { background: var(--support); color: var(--text); }
.toc a.is-active::before { color: var(--brand-ink); }

.prose { max-width: 760px; font-size: 1.02rem; }
.prose > section { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--border); }
.prose > section:last-child { border-bottom: 0; margin-bottom: 0; }
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin-bottom: 16px; display: flex; gap: 12px; align-items: baseline; }
.prose h2 .n { font-size: 0.9rem; color: var(--brand-ink); font-weight: 700; min-width: 26px; }
.prose h3 { font-size: 1.12rem; margin: 24px 0 8px; }
.prose p, .prose ul, .prose ol { color: var(--muted); margin: 0 0 14px; }
.prose ul { padding-left: 0; list-style: none; }
.prose ul li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--brand);
  transform: rotate(45deg);
}
.prose strong { color: var(--text); }
.prose a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.prose .lead { font-size: 1.1rem; color: var(--text); }
.callout {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--support);
  border: 1px solid var(--border);
  margin: 4px 0 18px;
}
.callout svg { width: 22px; height: 22px; flex: none; color: var(--brand-ink); margin-top: 2px; }
.callout p { margin: 0; color: var(--text); }
.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--input);
}
.contact-card p { margin: 0; }

/* Editable placeholder marker — remove the class once real info is added */
.placeholder {
  background: color-mix(in srgb, var(--sakura) 35%, transparent);
  border-bottom: 1px dashed #C2185B;
  padding: 0 4px;
  border-radius: 4px;
  color: var(--text);
}

/* 404 */
.not-found { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.not-found h1 { font-size: clamp(5rem, 18vw, 10rem); font-weight: 800; letter-spacing: -0.05em; }
.not-found p { color: var(--muted); margin: 12px auto 28px; max-width: 420px; }

/* 7. ANIMATION ---------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes petal-fall {
  0% { transform: translate3d(0, -40px, 0) rotate(0deg); }
  50% { transform: translate3d(60px, 50vh, 0) rotate(200deg); }
  100% { transform: translate3d(-20px, 105vh, 0) rotate(420deg); }
}
.hero-in > * { animation: hero-in 0.9s var(--ease) both; }
.hero-in > *:nth-child(2) { animation-delay: 0.08s; }
.hero-in > *:nth-child(3) { animation-delay: 0.16s; }
.hero-in > *:nth-child(4) { animation-delay: 0.24s; }
.hero-in > *:nth-child(5) { animation-delay: 0.32s; }
@keyframes hero-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .petals { display: none; }
}
