/* すやすやASMR — a soft lavender night with one pink accent (same tokens as src/theme.ts). */

:root {
  --bg: #17163a;
  --bg-top: #2d2470;
  --surface: #252457;
  --raised: #33317a;
  --border: #4a4796;
  --text: #f6f1ff;
  --muted: #bdb6e6;
  --accent: #ffc2da;
  --on-accent: #4a2a52;
  --star: #ffe9a8;
  /* No web font: iPhone and Mac have a rounded face built in; the app's Zen Maru Gothic is used if installed. */
  --f: 'Hiragino Maru Gothic ProN', 'Zen Maru Gothic', 'M PLUS Rounded 1c', 'Hiragino Sans', 'PingFang TC', 'Yu Gothic', 'Meiryo', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--f);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, var(--bg-top) 0%, transparent 70%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-weight: 700; line-height: 1.4; margin: 0; }

/* A field of slow, blinking stars behind everything. */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 46% 9%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 34%, var(--star) 50%, transparent 51%),
    radial-gradient(2px 2px at 82% 14%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 52%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 7% 78%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 82%, var(--star) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 38% 92%, #fff 50%, transparent 51%);
  opacity: 0.7;
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.35; } to { opacity: 0.8; } }

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* ---------- header / footer ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
}
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
.nav a:hover, .nav a[aria-current='page'] { color: var(--text); background: rgba(255, 255, 255, 0.08); }

.foot {
  margin-top: 72px;
  padding: 32px 0 48px;
  border-top: 1px solid rgba(74, 71, 150, 0.5);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.foot img { width: 96px; margin: 0 auto 12px; opacity: 0.9; }
.foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 8px; }
.foot nav a { color: var(--muted); }

/* ---------- landing ---------- */
.hero {
  display: grid;
  gap: 32px;
  align-items: center;
  padding: 24px 0 40px;
}
@media (min-width: 760px) {
  .hero { grid-template-columns: 1.05fr 0.95fr; padding: 48px 0 64px; }
}
.kicker {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: rgba(255, 194, 218, 0.12);
  border: 1px solid rgba(255, 194, 218, 0.3);
  padding: 2px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero h1 { font-size: clamp(36px, 9vw, 56px); letter-spacing: 0.02em; }
.hero h1 .z { color: var(--accent); font-size: 0.5em; vertical-align: super; margin-left: 4px; }
.pitch { font-size: clamp(19px, 4.6vw, 24px); font-weight: 700; margin: 10px 0 12px; }
.lead { color: var(--muted); margin: 0 0 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 20px; list-style: none; }
.chips li {
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.soon { font-size: 14px; color: var(--muted); margin: 0; }
.soon strong { color: var(--star); }

.hero-art { position: relative; max-width: 420px; margin: 0 auto; width: 100%; }
.hero-art .frame {
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6), 0 0 0 8px rgba(255, 194, 218, 0.06);
  animation: breathe 7s ease-in-out infinite;
}
.hero-art .bubble {
  position: absolute;
  left: -6px;
  top: 18%;
  background: #fff;
  color: var(--on-accent);
  font-weight: 700;
  font-size: 15px;
  padding: 8px 16px;
  border-radius: 20px 20px 20px 6px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  animation: float 5s ease-in-out infinite;
}
.hero-art .zzz {
  position: absolute;
  right: 6%;
  top: 4%;
  color: var(--star);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.1em;
  animation: float 4s ease-in-out infinite reverse;
}
@keyframes breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.section { padding: 40px 0; }
.section-title { text-align: center; font-size: clamp(22px, 5.5vw, 28px); margin-bottom: 6px; }
.section-sub { text-align: center; color: var(--muted); margin: 0 0 28px; font-size: 15px; }

.features { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature {
  background: rgba(37, 36, 87, 0.75);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px;
}
.feature .icon { font-size: 26px; line-height: 1; margin-bottom: 10px; }
.feature h3 { font-size: 17px; margin-bottom: 4px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }

.cast { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); padding: 0; margin: 0; list-style: none; }
@media (min-width: 560px) { .cast { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 860px) { .cast { grid-template-columns: repeat(4, 1fr); } }
.cast li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 10px 10px 14px;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.cast li:hover { transform: translateY(-4px); border-color: var(--accent); }
.cast img { width: 100%; aspect-ratio: 1; border-radius: 16px; margin-bottom: 10px; }
.cast .name { font-weight: 700; font-size: 18px; }
.cast .desc { color: var(--muted); font-size: 12.5px; line-height: 1.6; margin-top: 2px; }
.cast .secret { border-style: dashed; }
.cast .secret .name { color: var(--star); letter-spacing: 0.2em; }

.promise {
  background: linear-gradient(135deg, rgba(255, 194, 218, 0.14), rgba(51, 49, 122, 0.6));
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px 22px;
  text-align: center;
}
.promise h2 { font-size: 20px; margin-bottom: 8px; }
.promise p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #ffd3e4; }
.btn-ghost { color: var(--text); border: 1px solid var(--border); background: rgba(255, 255, 255, 0.04); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- document pages (privacy / support) ---------- */
.page-hero { text-align: center; padding: 28px 0 28px; }
.page-hero img { width: 120px; margin: 0 auto 8px; }
.page-hero h1 { font-size: clamp(26px, 7vw, 34px); }
.page-hero p { color: var(--muted); margin: 6px 0 0; }

.card {
  background: rgba(37, 36, 87, 0.8);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px 20px;
}
@media (min-width: 640px) { .card { padding: 36px 40px; } }

.legal { color: rgba(246, 241, 255, 0.86); }
.legal .updated { font-size: 14px; color: var(--muted); margin: 0 0 20px; }
.legal h2 { font-size: 20px; color: var(--accent); margin: 32px 0 10px; }
.legal h2:first-of-type { margin-top: 0; }
.legal h3 { font-size: 17px; margin: 20px 0 6px; }
.legal p, .legal ul { margin: 0 0 14px; }
.legal ul { padding-left: 1.3em; }
.legal li { margin-bottom: 6px; }
.legal li::marker { color: var(--accent); }
.legal strong { color: var(--text); }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 14.5px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid rgba(74, 71, 150, 0.6); }
.legal th { color: var(--text); white-space: nowrap; width: 34%; }
.legal hr { border: 0; border-top: 1px dashed var(--border); margin: 36px 0 28px; }

.contact { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.contact h2 { font-size: 20px; }
.contact p { margin: 0; color: var(--muted); }

.faq { display: grid; gap: 10px; }
.faq details {
  background: rgba(37, 36, 87, 0.8);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 48px 16px 18px;
  font-weight: 700;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .a { padding: 0 18px 16px; color: var(--muted); font-size: 15px; }
.faq .a p { margin: 0 0 8px; }
.faq .a ol { margin: 0 0 8px; padding-left: 1.4em; }

.credits { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.credits > li { padding: 14px 16px; border-radius: 16px; background: rgba(23, 22, 58, 0.6); border: 1px solid rgba(74, 71, 150, 0.6); }
.credits .what { font-size: 13px; color: var(--accent); }
.credits .who { font-weight: 700; }
.credits .lic { font-size: 13.5px; color: var(--muted); }
.credits ul { margin: 6px 0 0; padding-left: 1.2em; font-size: 13.5px; color: var(--muted); }

.back { text-align: center; margin-top: 36px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Phone header: one line, brand and both links. */
.brand, .nav a { white-space: nowrap; }
@media (max-width: 420px) {
  .brand { font-size: 15px; gap: 8px; }
  .brand img { width: 30px; height: 30px; border-radius: 8px; }
  .nav a { padding: 6px 8px; font-size: 13px; }
  .hero-art .bubble { left: 10px; font-size: 14px; }
}
.legal .credits { padding-left: 0; }
