/* Sayoru — dark, warm, abstract. No imagery of people; texture is pure CSS. */
:root {
  --bg: #120c10;
  --bg2: #1c1218;
  --ink: #f4e9e1;
  --ink-soft: #c9b6ab;
  --ink-mute: #8f7b74;
  --ember: #e8a07a;
  --ember-deep: #c96f55;
  --plum: #5a2a45;
  --wine: #3a1426;
  --line: rgba(244, 233, 225, 0.12);
  --card: rgba(255, 240, 230, 0.045);
  --radius: 18px;
  --font: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "PingFang TC", "Noto Sans TC", "Noto Sans JP", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", Roboto, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Hiragino Mincho ProN", "Yu Mincho", "Songti TC", "Noto Serif TC", "Noto Serif JP", Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--font); line-height: 1.6;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 700px at 85% -10%, rgba(201, 111, 85, 0.28), transparent 60%),
    radial-gradient(900px 600px at -10% 20%, rgba(90, 42, 69, 0.45), transparent 60%),
    radial-gradient(800px 800px at 50% 110%, rgba(58, 20, 38, 0.8), transparent 70%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.012) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(25deg, rgba(0, 0, 0, 0.05) 0 1px, transparent 1px 5px);
  background-attachment: fixed;
}
/* Fine fabric grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.18; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 0.9  0 0 0 0 0.85  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
body.gated { overflow: hidden; }
main { position: relative; z-index: 1; max-width: 1040px; margin: 0 auto; padding: 0 20px 40px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: 0.01em; line-height: 1.25; }
h2 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); margin: 0 0 6px; }
a { color: var(--ember); }
section { padding: 56px 0 8px; }
.section-sub { color: var(--ink-soft); margin: 0 0 24px; }

/* Brand */
.top { padding: 22px 0 0; }
.brand { margin: 0; font-family: var(--serif); font-size: 1.15rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); }
.brand-local { letter-spacing: 0.08em; text-transform: none; color: var(--ember); margin-left: 6px; font-size: 0.95em; }

/* Hero */
.hero { padding-top: clamp(40px, 9vw, 96px); text-align: center; }
.hero h1 { font-size: clamp(2rem, 6.4vw, 3.6rem); margin: 0 auto 14px; max-width: 16em; text-wrap: balance; }
.hero .sub { color: var(--ink-soft); max-width: 34em; margin: 0 auto 32px; font-size: clamp(1rem, 2.3vw, 1.12rem); text-wrap: pretty; }

/* Player */
.player {
  max-width: 520px; margin: 0 auto; padding: 22px 22px 18px; text-align: left;
  background: linear-gradient(160deg, rgba(232, 160, 122, 0.12), rgba(90, 42, 69, 0.2));
  border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
}
.player-top { margin: 0 0 4px; font-size: 0.85rem; letter-spacing: 0.08em; color: var(--ember); display: flex; align-items: center; gap: 8px; }
.hp-icon { width: 16px; height: 14px; border: 2px solid currentColor; border-bottom: 0; border-radius: 10px 10px 0 0; position: relative; display: inline-block; }
.hp-icon::before, .hp-icon::after { content: ""; position: absolute; bottom: -5px; width: 5px; height: 7px; background: currentColor; border-radius: 2px; }
.hp-icon::before { left: -3px; } .hp-icon::after { right: -3px; }
.voice-line { margin: 0 0 14px; font-family: var(--serif); font-size: 1.1rem; color: var(--ink); }
.player-row { display: flex; align-items: center; gap: 18px; }
.play-btn {
  flex: 0 0 auto; width: 68px; height: 68px; border-radius: 50%; border: 0; cursor: pointer; position: relative;
  background: radial-gradient(circle at 35% 30%, #f6c3a2, var(--ember) 45%, var(--ember-deep));
  box-shadow: 0 0 0 6px rgba(232, 160, 122, 0.12), 0 10px 30px -6px rgba(232, 160, 122, 0.55);
  transition: transform 0.15s ease;
}
.play-btn:active { transform: scale(0.96); }
.play-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.play-btn .icon { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translate(-35%, -50%);
  border-style: solid; border-width: 12px 0 12px 19px; border-color: transparent transparent transparent #2a1018; }
.is-playing .play-btn .icon { border: 0; width: 18px; height: 22px; transform: translate(-50%, -50%);
  background: linear-gradient(90deg, #2a1018 0 6px, transparent 6px 12px, #2a1018 12px 18px); }
.is-loading .play-btn::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--ink); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.track { flex: 1 1 auto; min-width: 0; }
.track-label { margin: 0 0 6px; font-size: 0.82rem; color: var(--ink-mute); letter-spacing: 0.06em; }
.time { margin: 6px 0 0; font-variant-numeric: tabular-nums; font-size: 0.85rem; color: var(--ink-soft); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: rgba(244, 233, 225, 0.18); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(244, 233, 225, 0.18); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--ember); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--ink); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--ink); }
input[type=range]:disabled { opacity: 0.55; cursor: default; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; border: 1px solid transparent; transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--ember), var(--ember-deep)); color: #23090f; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(244, 233, 225, 0.28); }
.btn-ghost:hover { border-color: var(--ember); color: var(--ember); }
.btn-line { background: #06c755; color: #fff; }
.btn-block { width: 100%; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 0.92rem; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn:focus-visible, .linkish:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.linkish { background: none; border: 0; padding: 0; color: var(--ember); font: inherit; text-decoration: underline; cursor: pointer; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; display: flex; flex-direction: column; }
.plan-name { margin: 0 0 10px; font-size: 1.15rem; }
.plan-price { margin: 0 0 8px; }
.plan-price .amount { font-size: 1.7rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.plan-price .unit { color: var(--ink-mute); font-size: 0.92rem; }
.plan-desc { color: var(--ink-soft); margin: 0 0 18px; flex: 1; }

/* Lead */
.lead { max-width: 560px; margin: 0 auto; }
.lead-form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field-label { font-size: 0.88rem; color: var(--ink-soft); }
input[type=email] { width: 100%; min-height: 50px; padding: 0 16px; border-radius: 12px; font: inherit; color: var(--ink);
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(244, 233, 225, 0.2); }
input[type=email]::placeholder { color: var(--ink-mute); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--ink-soft); cursor: pointer; }
.check input { margin: 4px 0 0; width: 18px; height: 18px; accent-color: var(--ember); flex: 0 0 auto; }
.form-msg { margin: 0; min-height: 1.2em; font-size: 0.92rem; }
.form-msg.err { color: #ff9f8f; }
.form-msg.ok { color: #b9e6c0; font-size: 1rem; padding: 12px 0; }
.line-block { margin-top: 18px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-mute); font-size: 0.85rem; margin: 0 0 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.hint { font-size: 0.85rem; color: var(--ink-mute); margin: 8px 0 0; text-align: center; }

/* Stories — abstract art only */
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.story { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; padding: 0 0 18px; }
.story-art { height: 120px; margin-bottom: 14px; }
.story-1 .story-art { background: radial-gradient(circle at 30% 40%, rgba(120, 160, 200, 0.35), transparent 55%), repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 9px), linear-gradient(160deg, #1e2233, #3a1426); }
.story-2 .story-art { background: radial-gradient(circle at 70% 30%, rgba(232, 160, 122, 0.55), transparent 45%), radial-gradient(circle at 20% 80%, rgba(201, 111, 85, 0.35), transparent 50%), linear-gradient(200deg, #24121c, #120c10); }
.story-3 .story-art { background: radial-gradient(ellipse at 50% 120%, rgba(246, 195, 162, 0.55), transparent 60%), repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 7px), linear-gradient(180deg, #2b1a24, #5a2a45); }
.story h3 { margin: 0 18px 8px; font-size: 1.1rem; }
.tags { list-style: none; margin: 0 18px 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 0.78rem; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(232, 160, 122, 0.4); color: var(--ember); }
.duration { margin: 0 18px; color: var(--ink-mute); font-size: 0.85rem; }

/* FAQ */
.faq { max-width: 720px; margin: 0 auto; }
details { border-bottom: 1px solid var(--line); padding: 4px 0; }
summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--ember); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 16px; color: var(--ink-soft); }

/* Footer */
.foot { margin-top: 64px; padding: 28px 0 10px; border-top: 1px solid var(--line); text-align: center; color: var(--ink-mute); font-size: 0.85rem; }
.foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-bottom: 12px; }
.foot nav a, .foot nav .linkish { color: var(--ink-soft); }
.synthetic, .small { margin: 4px 0; font-size: 0.78rem; }

/* Age gate */
.gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(800px 500px at 50% 0%, rgba(90, 42, 69, 0.6), transparent 70%), rgba(10, 6, 9, 0.97); }
.gate[hidden] { display: none; }
.gate-card { max-width: 440px; width: 100%; text-align: center; padding: 34px 26px; border-radius: 24px; border: 1px solid var(--line); background: rgba(28, 18, 24, 0.92); }
.gate-card h2 { margin: 10px 0 10px; }
.gate-card p { color: var(--ink-soft); }
.badge18 { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--ember); color: var(--ember); font-weight: 700; margin: 18px 0 0; }
.gate-actions { display: grid; gap: 10px; margin-top: 22px; }
.gate-check { text-align: left; margin-top: 16px; font-size: 0.85rem; }

/* Dialogs */
dialog.modal { width: min(520px, calc(100% - 28px)); max-height: calc(100% - 40px); overflow: auto; padding: 30px 24px 24px; border-radius: 22px;
  border: 1px solid var(--line); background: #1d1219; color: var(--ink); }
dialog.modal::backdrop { background: rgba(8, 4, 7, 0.78); backdrop-filter: blur(3px); }
dialog.modal h2 { margin-top: 0; padding-right: 30px; }
.modal-x { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-soft); font-size: 1.6rem; cursor: pointer; }
.modal-plan { color: var(--ink-soft); }
.modal-plan strong { color: var(--ember); }
.modal-text p { color: var(--ink-soft); font-size: 0.93rem; }
.delete-form { margin: 18px 0; padding-top: 14px; border-top: 1px solid var(--line); }
.delete-form h3 { margin: 0 0 10px; font-size: 1rem; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; min-height: 44px; }
.stats-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .plans, .story-grid { grid-template-columns: 1fr; }
  section { padding-top: 44px; }
  .player { padding: 18px 16px 14px; }
  .play-btn { width: 60px; height: 60px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
