:root {
  --bg: #050811;
  --bg-soft: #0b111d;
  --panel: rgba(14, 21, 34, 0.9);
  --panel-2: rgba(20, 28, 45, 0.92);
  --line: rgba(197, 204, 220, 0.12);
  --line-strong: rgba(205, 167, 109, 0.28);
  --text: #f1ece2;
  --text-2: #c7c2b8;
  --muted: #8b8d91;
  --dim: #666e7a;
  --gold: #d9bd88;
  --gold-2: #cda76d;
  --danger: #c88f83;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(79, 103, 154, 0.16), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(136, 94, 48, 0.12), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 100%, rgba(55, 81, 127, 0.1), transparent 40%),
    linear-gradient(180deg, rgba(5, 8, 17, 0.02), rgba(5, 8, 17, 0.6));
  z-index: 0;
}

.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.28), transparent 100%),
    radial-gradient(1px 1px at 72% 12%, rgba(255, 255, 255, 0.2), transparent 100%),
    radial-gradient(1px 1px at 44% 42%, rgba(255, 255, 255, 0.16), transparent 100%),
    radial-gradient(1px 1px at 81% 64%, rgba(255, 255, 255, 0.18), transparent 100%),
    radial-gradient(1px 1px at 22% 78%, rgba(255, 255, 255, 0.16), transparent 100%),
    radial-gradient(1px 1px at 56% 86%, rgba(255, 255, 255, 0.14), transparent 100%);
  z-index: 0;
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid rgba(217, 189, 136, 0.7);
  outline-offset: 3px;
}

.serif { font-family: var(--serif); }
.shell { width: min(820px, calc(100% - 40px)); margin: 0 auto; }
.eyebrow {
  display: block;
  color: #8d877c;
  font-size: 11px;
  letter-spacing: 0.28em;
  line-height: 1.7;
}
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.hidden { display: none !important; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #e8e2d7;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(205, 167, 109, 0.3);
  border-radius: 50%;
  color: var(--gold);
  font-size: 11px;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #7d838c;
  font-size: 12px;
}
.header-links a:hover { color: var(--gold); }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  margin-top: 10px;
  border-radius: 2px;
  background: #08101b;
}

.hero-img,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-img { object-fit: cover; opacity: 0.74; }

.hero-shade {
  background:
    linear-gradient(90deg, rgba(5, 8, 17, 0.88), rgba(5, 8, 17, 0.16) 70%, rgba(5, 8, 17, 0.04)),
    linear-gradient(180deg, rgba(5, 8, 17, 0.02), rgba(5, 8, 17, 0.32) 58%, #050811 100%);
}

.hero-copy {
  position: absolute;
  right: 0;
  bottom: 72px;
  left: 0;
  padding: 0 34px;
}

.hero-kicker {
  display: block;
  color: #d4be95;
  font-size: 11px;
  letter-spacing: 0.26em;
}

.hero-title {
  display: block;
  margin: 14px 0 0;
  color: #f2ebdf;
  font-family: var(--serif);
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 400;
  line-height: 1.36;
}

.hero-caption {
  display: block;
  max-width: 560px;
  margin-top: 12px;
  color: #b6afa2;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.9;
}

.home-body { padding-bottom: 54px; }

.primary-card {
  display: block;
  position: relative;
  margin-top: -40px;
  padding: 28px 30px 24px;
  border: 1px solid rgba(205, 167, 109, 0.24);
  background:
    radial-gradient(circle at 92% 0%, rgba(205, 167, 109, 0.2), transparent 42%),
    linear-gradient(145deg, rgba(24, 32, 50, 0.98), rgba(8, 12, 21, 0.99));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
  transition: transform 180ms ease, border-color 180ms ease;
}

.primary-card:hover { transform: translateY(-2px); border-color: rgba(205, 167, 109, 0.45); }

.card-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.card-kicker { color: var(--gold); font-size: 12px; letter-spacing: 0.3em; }
.card-count { color: #7d7d7d; font-size: 11px; }

.primary-title {
  display: block;
  margin-top: 24px;
  color: #f1eadf;
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 400;
  line-height: 1.25;
}

.primary-copy {
  display: block;
  max-width: 560px;
  margin-top: 8px;
  color: #9c9d9b;
  font-size: 14px;
}

.card-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(205, 196, 177, 0.12);
  color: var(--gold);
  font-size: 13px;
}

.script-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 16px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(18, 24, 38, 0.9), rgba(7, 11, 20, 0.96));
  transition: border-color 180ms ease, transform 180ms ease;
}
.script-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.script-title { display: block; margin-top: 7px; color: #e6dfd3; font-family: var(--serif); font-size: 24px; }
.script-copy { display: block; margin-top: 4px; color: #888a89; font-size: 13px; }
.card-arrow { color: var(--gold); font-size: 24px; }

.home-note {
  margin-top: 22px;
  padding: 16px 18px;
  border-left: 1px solid rgba(205, 167, 109, 0.32);
  background: rgba(255, 255, 255, 0.015);
  color: #6e7682;
  font-size: 12px;
  line-height: 1.8;
}

.home-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(201, 207, 222, 0.08);
  color: #626a76;
  font-size: 11px;
}
.home-footer a:hover { color: var(--gold); }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 42px 0 26px;
}
.page-head h1 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 400;
  line-height: 1.35;
}
.page-lede { max-width: 560px; margin: 10px 0 0; color: #969897; font-family: var(--serif); line-height: 1.9; }
.back-link { color: var(--gold); font-size: 12px; white-space: nowrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease;
}
.btn:hover { transform: translateY(-1px); opacity: 0.92; }
.btn-primary { background: linear-gradient(135deg, #e7cd9c, #cda76d); color: #17120c; box-shadow: 0 14px 34px rgba(205, 167, 109, 0.15); }
.btn-ghost { border-color: rgba(216, 204, 181, 0.2); background: rgba(255, 255, 255, 0.025); color: #d6cfc1; }
.btn-quiet { min-height: 34px; padding: 0; color: #a99b84; font-size: 12px; }
.btn-block { width: 100%; }

.blind-setup {
  padding: 58px 34px 34px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 0%, rgba(205, 167, 109, 0.12), transparent 34%),
    linear-gradient(160deg, rgba(15, 22, 36, 0.9), rgba(6, 10, 18, 0.96));
}
.blind-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  border: 1px solid rgba(213, 194, 157, 0.28);
  border-radius: 50%;
  color: var(--gold);
  font-size: 19px;
}
.blind-title { margin: 16px 0 0; font-family: var(--serif); font-size: clamp(32px, 5.5vw, 50px); font-weight: 400; line-height: 1.35; }
.blind-lede { max-width: 580px; margin: 14px 0 0; color: #a4a3a0; font-family: var(--serif); line-height: 1.9; }
.blind-actions { display: flex; align-items: center; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.blind-hint { margin: 14px 0 0; color: #717985; font-size: 12px; }
.blind-notes { margin-top: 40px; border-top: 1px solid rgba(201, 207, 222, 0.08); }
.note-row { display: flex; gap: 24px; padding: 14px 0; border-bottom: 1px solid rgba(201, 207, 222, 0.07); }
.note-k { flex: 0 0 88px; color: #777e8a; font-size: 12px; }
.note-v { color: #c7c0b2; font-size: 13px; }
.disclaimer { display: block; margin-top: 24px; color: #626976; font-size: 11px; line-height: 1.8; }

.history { margin-top: 34px; padding-top: 24px; border-top: 1px solid rgba(201, 207, 222, 0.08); }
.history-list { margin-top: 10px; }
.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid rgba(201, 207, 222, 0.07);
  background: transparent;
  color: inherit;
  text-align: left;
}
.history-row:hover { color: var(--gold); }
.history-main { display: flex; flex-direction: column; gap: 3px; }
.history-name { color: #d5cec1; font-family: var(--serif); font-size: 16px; }
.history-meta { color: #6e7683; font-size: 11px; }
.history-emotion { color: #a99b84; font-size: 11px; }

.life-hero {
  position: relative;
  padding: 62px 34px 42px;
  border-bottom: 1px solid rgba(201, 207, 222, 0.08);
  background:
    radial-gradient(circle at 82% 0%, rgba(205, 167, 109, 0.17), transparent 34%),
    radial-gradient(circle at 5% 52%, rgba(80, 104, 156, 0.14), transparent 36%);
}
.life-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; color: #8d8679; font-size: 12px; }
.life-meta span + span { padding-left: 14px; border-left: 1px solid rgba(201, 207, 222, 0.11); }
.life-name { margin: 18px 0 0; font-family: var(--serif); font-size: clamp(44px, 8vw, 70px); font-weight: 400; line-height: 1.18; letter-spacing: 0.02em; }
.life-one-line { max-width: 620px; margin: 16px 0 0; color: #bdb3a1; font-family: var(--serif); font-size: 16px; line-height: 1.9; }
.level-line { display: flex; align-items: center; gap: 10px; margin-top: 16px; color: #6f7683; font-size: 11px; }
.level-pill { padding: 2px 9px; border: 1px solid rgba(205, 167, 109, 0.3); border-radius: 999px; color: var(--gold); font-size: 10px; }
.fact-row { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(201, 207, 222, 0.09); }
.fact-k { display: block; color: #6f7682; font-size: 10px; }
.fact-v { display: block; margin-top: 3px; color: #d8d1c3; font-size: 13px; }

.life-body { padding-bottom: 50px; }
.section { padding: 26px 0 30px; border-bottom: 1px solid rgba(201, 207, 222, 0.08); }
.section-title { display: block; margin-top: 7px; color: #e8e1d4; font-family: var(--serif); font-size: 28px; line-height: 1.4; }
.six-grid { display: grid; grid-template-columns: 1fr; margin-top: 18px; border: 1px solid rgba(201, 207, 222, 0.09); background: rgba(255, 255, 255, 0.017); }
.six-row { display: flex; gap: 20px; padding: 14px 18px; border-bottom: 1px solid rgba(201, 207, 222, 0.07); }
.six-row:last-child { border-bottom: 0; }
.six-label { flex: 0 0 68px; color: #b6a27f; font-size: 12px; }
.six-value { flex: 1; color: #c5c1b8; font-size: 13px; line-height: 1.8; }

.prose { margin-top: 18px; color: #c9c5bc; font-family: var(--serif); font-size: 17px; line-height: 2.05; }
.prose p { margin: 0 0 16px; }
.timeline { margin-top: 20px; }
.time-row { display: grid; grid-template-columns: 82px 1fr; gap: 18px; padding: 14px 0; border-bottom: 1px solid rgba(201, 207, 222, 0.07); }
.time-year { color: #cbb488; font-family: var(--serif); font-size: 15px; }
.time-age { display: block; margin-top: 2px; color: #666e7b; font-size: 10px; }
.time-event { display: block; color: #d8d2c6; font-size: 13px; line-height: 1.7; }
.time-change { display: block; margin-top: 3px; color: #7f8794; font-size: 11px; line-height: 1.65; }

.emotion-row { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.emotion-btn {
  flex: 1;
  min-width: 90px;
  padding: 12px 10px;
  border: 1px solid rgba(201, 207, 222, 0.13);
  border-radius: 999px;
  background: transparent;
  color: #9b9d9f;
  font-size: 12px;
}
.emotion-btn.is-active { border-color: rgba(205, 167, 109, 0.65); background: rgba(205, 167, 109, 0.12); color: #e0c796; }
.small-note { display: block; margin-top: 10px; color: #676f7d; font-size: 10px; }

.card-action { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.card-action .btn:first-child { flex: 1; }
.life-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.life-actions .btn { flex: 1; }
.bottom-links { display: flex; justify-content: center; gap: 12px; margin-top: 26px; color: #8f887b; font-size: 12px; }
.bottom-links a:hover { color: var(--gold); }

.form-card { margin-top: 6px; padding: 26px 26px 28px; border: 1px solid var(--line); background: linear-gradient(160deg, rgba(16, 23, 38, 0.88), rgba(7, 11, 20, 0.96)); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field.full { grid-column: 1 / -1; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 7px; }
.field-label { color: #bbb3a5; font-size: 12px; }
.optional { color: #676e7b; font-size: 10px; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(195, 202, 219, 0.14);
  border-radius: 8px;
  background: rgba(8, 12, 21, 0.75);
  color: #e7e2d8;
  font-size: 13px;
}
.field textarea { min-height: 68px; resize: vertical; line-height: 1.7; }
.field input::placeholder, .field textarea::placeholder { color: #5e6674; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(205, 167, 109, 0.5); }

.seg { display: inline-flex; overflow: hidden; border: 1px solid rgba(201, 207, 222, 0.13); border-radius: 999px; }
.seg button { padding: 5px 13px; border: 0; background: transparent; color: #7c828c; font-size: 11px; }
.seg button.is-active { background: rgba(205, 167, 109, 0.13); color: var(--gold); }
.pill-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border: 1px solid rgba(201, 207, 222, 0.14); border-radius: 999px; background: transparent; color: #777f8b; font-size: 11px; }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: #555d6a; }
.pill-toggle.is-on { border-color: rgba(205, 167, 109, 0.55); color: var(--gold); }
.pill-toggle.is-on .pill-dot { background: var(--gold); box-shadow: 0 0 10px rgba(205, 167, 109, 0.5); }
.lunar-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; }
.leap-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding: 8px 12px; border: 1px solid rgba(205, 167, 109, 0.16); border-radius: 8px; color: #a99b84; font-size: 11px; }
.form-error { display: block; margin: 4px 0 12px; color: var(--danger); font-size: 12px; }
.form-submit { width: 100%; margin-top: 4px; }
.form-note { display: block; margin-top: 14px; color: #6d7480; font-size: 11px; line-height: 1.8; }

.chart-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.chart-pillar { padding: 14px 8px; border: 1px solid rgba(201, 207, 222, 0.1); background: rgba(255, 255, 255, 0.016); text-align: center; }
.chart-pillar-label { display: block; color: #777f8b; font-size: 10px; }
.chart-pillar-value { display: block; margin-top: 4px; color: #e2d5bd; font-family: var(--serif); font-size: 22px; }
.chart-pillar.is-three { display: none; }
.chart-grid.is-three { grid-template-columns: repeat(3, 1fr); }
.elements { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.element-pill { padding: 4px 10px; border: 1px solid rgba(201, 207, 222, 0.1); border-radius: 999px; color: #aaa294; font-size: 11px; }
.element-pill strong { color: #d6c39d; font-weight: 400; }
.chart-meta { display: block; margin-top: 10px; color: #6d7480; font-size: 11px; line-height: 1.8; }

.script-result-hero { padding: 40px 0 24px; }
.script-headline { margin: 12px 0 0; font-family: var(--serif); font-size: clamp(32px, 5vw, 48px); font-weight: 400; line-height: 1.35; }
.script-prologue { max-width: 650px; margin: 14px 0 0; color: #c2bbae; font-family: var(--serif); font-size: 16px; line-height: 1.95; }
.script-chart-line { display: block; margin-top: 12px; color: #c8b184; font-size: 11px; }
.act { margin-top: 22px; }
.act-label { display: block; color: #c7ad7e; font-size: 11px; letter-spacing: 0.18em; }
.act-text { display: block; margin-top: 6px; color: #cac5ba; font-family: var(--serif); font-size: 16px; line-height: 2; }
.choice-block { margin-top: 24px; padding: 18px; border-left: 1px solid rgba(205, 167, 109, 0.45); background: rgba(205, 167, 109, 0.04); }
.script-closing { display: block; margin-top: 20px; color: #d9d1c2; font-family: var(--serif); font-size: 16px; line-height: 1.95; }
.script-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.script-actions .btn { flex: 1; }
.script-ai { margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(201, 207, 222, 0.08); }
.ai-copy { display: block; margin-top: 8px; color: #8d8d8c; font-size: 12px; line-height: 1.8; }
.ai-result { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(201, 207, 222, 0.08); }
.ai-kicker { display: block; color: var(--gold); font-size: 10px; letter-spacing: 0.22em; }
.ai-fallback { margin-top: 10px; padding: 10px 12px; border: 1px solid rgba(205, 167, 109, 0.2); color: #a99b84; font-size: 11px; line-height: 1.7; }
.diff-box { margin-top: 18px; padding: 16px; border: 1px solid rgba(201, 207, 222, 0.1); }
.diff-title { display: block; color: var(--gold); font-size: 11px; }
.diff-row { display: flex; gap: 12px; margin-top: 8px; color: #8f8a80; font-size: 12px; line-height: 1.7; }
.diff-row span:first-child { flex: 0 0 60px; color: #b6a27f; }
.ab-block { margin-top: 14px; padding: 16px; border: 1px solid rgba(201, 207, 222, 0.1); background: rgba(255, 255, 255, 0.015); }
.ab-block.is-alt { border-color: rgba(205, 167, 109, 0.25); background: rgba(205, 167, 109, 0.04); }
.ab-label { display: block; color: var(--gold); font-size: 10px; letter-spacing: 0.18em; }
.ab-text { display: block; margin-top: 6px; color: #c8c3b8; font-family: var(--serif); font-size: 15px; line-height: 1.95; }

.legal { padding: 34px 0 56px; }
.legal-title { margin: 10px 0 0; font-family: var(--serif); font-size: clamp(30px, 5vw, 44px); font-weight: 400; line-height: 1.45; }
.legal-updated { display: block; margin-top: 12px; color: #6f7683; font-size: 11px; }
.legal-section { padding: 22px 0; border-bottom: 1px solid rgba(201, 207, 222, 0.08); }
.legal-index { display: block; color: var(--gold); font-size: 10px; letter-spacing: 0.18em; }
.legal-heading { display: block; margin-top: 5px; color: #e8e1d4; font-family: var(--serif); font-size: 22px; }
.legal-text { display: block; margin-top: 8px; color: #a9a7a1; font-size: 13px; line-height: 1.95; }
.legal-foot { display: flex; justify-content: center; gap: 12px; margin-top: 28px; color: #9a8f7e; font-size: 12px; }

.life-canvas { position: fixed; left: -9999px; top: 0; width: 750px; height: 1000px; pointer-events: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  max-width: min(88vw, 460px);
  padding: 10px 16px;
  border: 1px solid rgba(205, 167, 109, 0.24);
  border-radius: 999px;
  background: rgba(8, 12, 21, 0.95);
  color: #e7dfd0;
  font-size: 12px;
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.noscript { position: relative; z-index: 2; padding: 24px; color: var(--text); text-align: center; }

@media (min-width: 760px) {
  .shell { width: min(880px, calc(100% - 64px)); }
  .hero { min-height: 500px; }
  .hero-copy { bottom: 84px; padding: 0 44px; }
  .primary-card { padding: 34px 38px 28px; }
  .six-grid { grid-template-columns: 1fr; }
  .blind-setup { padding: 70px 48px 40px; }
  .life-hero { padding: 76px 48px 48px; }
  .life-body { padding-bottom: 64px; }
  .form-card { padding: 32px 34px 34px; }
  .chart-grid { gap: 12px; }
}

@media (max-width: 620px) {
  .header-links { gap: 12px; }
  .hero { min-height: 390px; }
  .hero-copy { bottom: 58px; padding: 0 22px; }
  .primary-card { padding: 24px 22px 20px; }
  .script-card { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .field.full { grid-column: auto; }
  .six-value { font-size: 12px; }
  .fact-row { gap: 20px; }
  .time-row { grid-template-columns: 68px 1fr; gap: 12px; }
  .script-actions .btn, .life-actions .btn { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

button.back-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-size: 12px;
  white-space: nowrap;
}

/* ── Web landing / wide layout ───────────────────────────── */
.shell-wide {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
}

.site-header {
  padding-top: 28px;
}

.landing {
  padding: 18px 0 46px;
}

.landing-hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  border: 1px solid rgba(197, 204, 220, 0.1);
  background: #07101b;
}

.landing-art,
.landing-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.landing-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 64% center;
  opacity: 0.82;
}

.landing-shade {
  background:
    linear-gradient(90deg, rgba(5, 8, 17, 0.97) 0%, rgba(5, 8, 17, 0.78) 35%, rgba(5, 8, 17, 0.16) 72%, rgba(5, 8, 17, 0.04) 100%),
    linear-gradient(180deg, rgba(5, 8, 17, 0.08), rgba(5, 8, 17, 0.18) 55%, #050811 100%);
}

.landing-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(190px, 0.6fr);
  align-items: end;
  gap: 50px;
  min-height: 660px;
  padding: 80px 0 58px;
}

.landing-copy { max-width: 720px; }

.landing-title {
  margin: 20px 0 0;
  color: #f3ecdf;
  font-family: var(--serif);
  font-size: clamp(56px, 6.3vw, 92px);
  font-weight: 400;
  line-height: 1.13;
  letter-spacing: -0.02em;
}

.landing-title span { color: var(--gold); }

.landing-lede {
  max-width: 560px;
  margin: 24px 0 0;
  color: #b0aa9e;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.95;
}

.landing-cta {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.landing-cta .btn { min-height: 48px; padding: 0 26px; }
.landing-cta .btn span { color: #6e531f; }

.landing-meta {
  justify-self: end;
  width: 100%;
  max-width: 220px;
  padding-left: 24px;
  border-left: 1px solid rgba(205, 167, 109, 0.22);
}

.landing-meta div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 17px 0;
  border-bottom: 1px solid rgba(201, 207, 222, 0.09);
}

.landing-meta div:last-child { border-bottom: 0; }
.landing-meta strong {
  color: #e9dfcd;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 400;
  line-height: 1.2;
}
.landing-meta span { color: #aaa39a; font-size: 11px; letter-spacing: 0.1em; }

.home-entry-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 18px;
  margin-top: 18px;
}

.entry-card {
  position: relative;
  display: block;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(201, 207, 222, 0.12);
  background: #0a111d;
  transition: border-color 200ms ease, transform 200ms ease;
}

.entry-card:hover { transform: translateY(-3px); border-color: rgba(205, 167, 109, 0.45); }

.entry-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 500ms ease, opacity 500ms ease;
}
.entry-card:hover > img { transform: scale(1.03); opacity: 0.84; }

.entry-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 17, 0.9), rgba(5, 8, 17, 0.28) 70%, rgba(5, 8, 17, 0.1)),
    linear-gradient(180deg, rgba(5, 8, 17, 0.04), rgba(5, 8, 17, 0.25) 48%, rgba(5, 8, 17, 0.92));
}

.entry-copy {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: 28px 30px 26px;
}

.entry-kicker { color: #d4be95; font-size: 10px; letter-spacing: 0.22em; }
.entry-copy h2 {
  margin: 12px 0 0;
  color: #f1eadf;
  font-family: var(--serif);
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 400;
  line-height: 1.25;
}
.entry-copy p { max-width: 460px; margin: 8px 0 0; color: #aaa69e; font-size: 13px; line-height: 1.75; }
.entry-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(205, 196, 177, 0.15);
  color: var(--gold);
  font-size: 12px;
}
.entry-link span:last-child { font-size: 18px; }

.home-note {
  margin-top: 20px;
  color: #626a76;
  font-size: 11px;
  line-height: 1.8;
}

.blind-setup { max-width: 980px; margin: 0 auto; }
.page-head { max-width: 980px; margin: 0 auto; }
.form-card { max-width: 980px; margin-left: auto; margin-right: auto; }
.life-body { max-width: 980px; margin: 0 auto; }
.shell-wide > .section { max-width: 980px; margin-left: auto; margin-right: auto; }

@media (max-width: 900px) {
  .landing-hero { min-height: 610px; }
  .landing-inner { grid-template-columns: 1fr; min-height: 610px; padding: 110px 0 54px; }
  .landing-meta { display: none; }
  .landing-title { font-size: clamp(52px, 10vw, 76px); }
  .home-entry-grid { grid-template-columns: 1fr; }
  .entry-card { min-height: 300px; }
}

@media (max-width: 620px) {
  .shell-wide { width: calc(100% - 32px); }
  .site-header { padding-top: 20px; }
  .landing { padding-top: 10px; }
  .landing-hero { min-height: 590px; }
  .landing-inner { min-height: 590px; padding: 150px 0 38px; }
  .landing-art img { object-position: 62% center; }
  .landing-shade {
    background:
      linear-gradient(90deg, rgba(5, 8, 17, 0.92), rgba(5, 8, 17, 0.28) 80%),
      linear-gradient(180deg, rgba(5, 8, 17, 0.15), rgba(5, 8, 17, 0.25) 38%, rgba(5, 8, 17, 0.92) 86%, #050811 100%);
  }
  .landing-title { font-size: clamp(46px, 12vw, 64px); }
  .landing-lede { font-size: 16px; }
  .landing-cta { margin-top: 26px; }
  .landing-cta .btn { flex: 1; min-width: 0; padding: 0 12px; }
  .entry-card { min-height: 280px; }
  .entry-copy { padding: 22px; }
  .entry-copy h2 { font-size: 32px; }
  .blind-setup { padding: 38px 22px 26px; }
  .page-head { padding-top: 30px; }
  .life-body { width: 100%; }
}

.life-hero { overflow: hidden; }
.life-hero-art {
  position: absolute;
  top: 0;
  right: 0;
  width: 48%;
  height: 100%;
  opacity: 0.26;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent, #000 42%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 42%);
}
.life-hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 65% center; }
.life-hero > :not(.life-hero-art) { position: relative; z-index: 1; }
@media (max-width: 700px) {
  .life-hero-art { width: 70%; opacity: 0.16; }
}

/* ── Reference-inspired app theme ───────────────────────── */
:root {
  --bg: #080614;
  --bg-soft: #0f0a20;
  --panel: rgba(23, 17, 44, 0.92);
  --panel-2: rgba(31, 22, 58, 0.92);
  --line: rgba(167, 139, 250, 0.17);
  --line-strong: rgba(240, 201, 117, 0.34);
  --text: #f5efff;
  --text-2: #d4cce6;
  --muted: #948ba6;
  --dim: #6f6584;
  --gold: #f0c975;
  --gold-2: #d6a84e;
  --purple: #8b5cf6;
  --purple-soft: #b197fc;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
}

html, body {
  background: #080614;
}

body {
  background:
    radial-gradient(circle at 8% 4%, rgba(101, 67, 182, 0.22), transparent 30%),
    radial-gradient(circle at 92% 18%, rgba(213, 154, 55, 0.11), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(79, 46, 143, 0.16), transparent 38%),
    #080614;
  color: var(--text);
}

body::before {
  background:
    radial-gradient(circle at 50% 100%, rgba(85, 48, 151, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(8, 6, 20, 0.04), rgba(8, 6, 20, 0.72));
}

.starfield {
  opacity: 0.34;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 220, 160, 0.35), transparent 100%),
    radial-gradient(1px 1px at 72% 12%, rgba(205, 184, 255, 0.25), transparent 100%),
    radial-gradient(1px 1px at 44% 42%, rgba(255, 230, 180, 0.18), transparent 100%),
    radial-gradient(1px 1px at 81% 64%, rgba(215, 193, 255, 0.22), transparent 100%),
    radial-gradient(1px 1px at 22% 78%, rgba(255, 220, 160, 0.2), transparent 100%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  background: rgba(8, 6, 20, 0.76);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(167, 139, 250, 0.08);
}

.brand { gap: 11px; }

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(240, 201, 117, 0.55);
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 234, 177, 0.95), transparent 22%),
    conic-gradient(from 210deg, #8d5b2f, #e5ba69, #8250c9, #2c1a43, #d2a45b, #8d5b2f);
  box-shadow: 0 0 26px rgba(204, 151, 74, 0.2);
  color: transparent;
  font-size: 0;
}

.brand-mark::after {
  content: "✦";
  color: #fff4d7;
  font-size: 14px;
  text-shadow: 0 0 9px rgba(255, 225, 157, 0.7);
}

.brand-text { display: flex; flex-direction: column; gap: 1px; }
.brand-text strong { color: #f3ebff; font-family: var(--serif); font-size: 18px; font-weight: 400; letter-spacing: 0.02em; }
.brand-text small { color: #8d7ba9; font-size: 9px; letter-spacing: 0.16em; }
.header-links { gap: 16px; color: #948ba6; }
.header-links a { padding: 7px 10px; border-radius: 999px; }
.header-links a:hover, .header-links a.gold { background: rgba(139, 92, 246, 0.16); color: #e7d6ae; }
.header-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(167, 139, 250, 0.24);
  border-radius: 50%;
  color: #c7b8e7;
  font-size: 14px;
}

.app-home { padding: 18px 0 16px; }

.home-main-card {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 22px;
  background: #120c28;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.home-main-art,
.home-main-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.home-main-art img { width: 100%; height: 100%; object-fit: cover; object-position: 68% center; opacity: 0.74; }
.home-main-shade {
  background:
    linear-gradient(90deg, rgba(15, 9, 34, 0.98) 0%, rgba(17, 10, 38, 0.84) 37%, rgba(18, 10, 39, 0.18) 78%, rgba(18, 10, 39, 0.08)),
    linear-gradient(180deg, rgba(12, 8, 28, 0.12), rgba(13, 8, 29, 0.48) 65%, rgba(13, 8, 29, 0.88));
}

.home-main-copy {
  position: relative;
  z-index: 2;
  max-width: 600px;
  padding: 42px 38px;
}

.section-kicker {
  display: block;
  color: #d7b66e;
  font-size: 10px;
  letter-spacing: 0.24em;
  line-height: 1.6;
}

.home-main-copy h1 {
  margin: 12px 0 0;
  color: #fff8ef;
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.home-main-copy p {
  max-width: 500px;
  margin: 12px 0 0;
  color: #b8add0;
  font-size: 14px;
  line-height: 1.85;
}

.home-main-actions { display: flex; align-items: center; gap: 18px; margin-top: 24px; flex-wrap: wrap; }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: #e9d5a6; font-size: 12px; }
.text-link span { color: #b58aff; }

.home-orbit {
  position: absolute;
  right: 38px;
  bottom: 34px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 128px;
  border: 1px solid rgba(240, 201, 117, 0.38);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.22), rgba(15, 9, 33, 0.72) 65%);
  box-shadow: 0 0 55px rgba(139, 92, 246, 0.19);
}
.home-orbit::before, .home-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(167, 139, 250, 0.17);
  border-radius: 50%;
}
.home-orbit::before { inset: -12px; }
.home-orbit::after { inset: 12px; border-color: rgba(240, 201, 117, 0.14); }
.home-orbit strong { color: #f8e6b4; font-family: var(--serif); font-size: 40px; font-weight: 400; line-height: 1; }
.home-orbit span { margin-top: 5px; color: #a997c7; font-size: 9px; letter-spacing: 0.12em; }

.home-cards {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 16px;
  margin-top: 16px;
}

.home-script-card,
.home-stat-card,
.home-recent-card {
  border: 1px solid rgba(167, 139, 250, 0.17);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(139, 92, 246, 0.2), transparent 44%),
    linear-gradient(145deg, rgba(28, 20, 54, 0.96), rgba(13, 9, 28, 0.98));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.home-script-card {
  position: relative;
  display: block;
  padding: 24px 26px;
  transition: transform 180ms ease, border-color 180ms ease;
}
.home-script-card:hover { transform: translateY(-2px); border-color: rgba(240, 201, 117, 0.35); }
.card-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.34), rgba(240, 201, 117, 0.1));
  color: #e9d5a6;
  font-size: 18px;
}
.home-script-card h2 { margin: 8px 0 0; color: #f2e9ff; font-family: var(--serif); font-size: 30px; font-weight: 400; line-height: 1.3; }
.home-script-card p { margin: 8px 0 18px; color: #9d93b1; font-size: 12px; line-height: 1.8; }

.home-stat-card { padding: 24px 22px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 18px; }
.mini-stats div { display: flex; flex-direction: column; gap: 3px; }
.mini-stats strong { color: #f7e9c5; font-family: var(--serif); font-size: 24px; font-weight: 400; line-height: 1.15; }
.mini-stats span { color: #7f7494; font-size: 9px; }

.home-note { margin-top: 18px; color: #6f6584; font-size: 10px; line-height: 1.8; }

.home-footer { margin-top: 30px; color: #625974; }
.home-footer a:hover { color: var(--gold); }

.bottom-nav {
  display: none;
  position: fixed;
  right: 14px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 14px;
  z-index: 30;
  align-items: center;
  justify-content: space-around;
  padding: 8px 6px;
  border: 1px solid rgba(167, 139, 250, 0.24);
  border-radius: 20px;
  background: rgba(14, 9, 28, 0.92);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 58px; color: #7d718f; font-size: 9px; }
.bottom-nav a span { font-size: 16px; line-height: 1; }
.bottom-nav a.is-active { color: var(--gold); }
.bottom-nav a.is-active span { text-shadow: 0 0 14px rgba(240, 201, 117, 0.5); }

/* app cards across pages */
.blind-setup {
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 0%, rgba(139, 92, 246, 0.22), transparent 40%),
    linear-gradient(150deg, rgba(28, 20, 54, 0.96), rgba(12, 8, 27, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}
.blind-mark { border-color: rgba(240, 201, 117, 0.5); background: radial-gradient(circle, rgba(240, 201, 117, 0.14), transparent 68%); }
.blind-title { color: #f7efff; }
.blind-title .gold { color: var(--gold); }
.blind-lede { color: #a99bbb; }
.blind-notes { border-top-color: rgba(167, 139, 250, 0.12); }
.note-row { border-bottom-color: rgba(167, 139, 250, 0.09); }
.note-k { color: #7d718f; }
.note-v { color: #c8bde0; }
.history { border-top-color: rgba(167, 139, 250, 0.12); }
.history-row { border-bottom-color: rgba(167, 139, 250, 0.1); }
.history-name { color: #e3d9f4; }
.history-meta { color: #7d718f; }
.history-emotion { color: #c8aa6c; }

.life-hero {
  margin-top: 18px;
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 22px;
  background:
    radial-gradient(circle at 86% 0%, rgba(139, 92, 246, 0.23), transparent 40%),
    radial-gradient(circle at 8% 60%, rgba(218, 167, 74, 0.08), transparent 36%),
    linear-gradient(145deg, rgba(27, 18, 53, 0.97), rgba(13, 8, 29, 0.99));
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.3);
}
.life-name { color: #fff8ef; }
.life-one-line { color: #c1b4d8; }
.life-meta { color: #ab9bc2; }
.life-meta span + span { border-left-color: rgba(167, 139, 250, 0.17); }
.fact-row { border-top-color: rgba(167, 139, 250, 0.12); }
.fact-v { color: #e7d9f8; }
.fact-k { color: #7d718f; }
.level-pill { border-color: rgba(240, 201, 117, 0.38); background: rgba(240, 201, 117, 0.08); }

.life-body { margin-top: 16px; }
.life-body .section,
.shell-wide > .section {
  margin-top: 12px;
  padding: 24px 26px;
  border: 1px solid rgba(167, 139, 250, 0.15);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(22, 15, 44, 0.88), rgba(12, 8, 27, 0.94));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
}
.section-title { color: #f4eaff; }
.six-grid { border: 0; background: transparent; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.six-row { display: block; padding: 13px 15px; border: 1px solid rgba(167, 139, 250, 0.11); border-radius: 12px; background: rgba(255, 255, 255, 0.018); }
.six-label { display: block; flex: none; margin-bottom: 3px; color: #c4a464; font-size: 10px; }
.six-value { display: block; color: #cfc4e2; font-size: 12px; line-height: 1.7; }

.prose { color: #cfc5df; }
.time-row { border-bottom-color: rgba(167, 139, 250, 0.1); }
.time-year { color: #d9b875; }
.time-event { color: #ddd3eb; }
.time-change { color: #9486a9; }
.emotion-btn { border-color: rgba(167, 139, 250, 0.18); background: rgba(255, 255, 255, 0.016); color: #9b8fb0; }
.emotion-btn.is-active { border-color: rgba(240, 201, 117, 0.56); background: rgba(240, 201, 117, 0.1); color: #f0d49d; }
.card-action, .life-actions { gap: 10px; }
.btn-primary { background: linear-gradient(135deg, #f5d7a0, #d6a84e); color: #21150b; box-shadow: 0 14px 34px rgba(214, 168, 78, 0.15); }
.btn-ghost { border-color: rgba(167, 139, 250, 0.23); background: rgba(139, 92, 246, 0.06); color: #d9cbed; }
.bottom-links { color: #8b7ba2; }

.form-card {
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(139, 92, 246, 0.16), transparent 42%),
    linear-gradient(145deg, rgba(27, 18, 52, 0.96), rgba(12, 8, 27, 0.99));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
}
.field input, .field select, .field textarea { border-color: rgba(167, 139, 250, 0.16); background: rgba(10, 6, 24, 0.82); color: #e8def8; }
.field-label { color: #b7a9ca; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(240, 201, 117, 0.58); }
.seg { border-color: rgba(167, 139, 250, 0.18); }
.seg button { color: #8d80a2; }
.seg button.is-active { background: rgba(139, 92, 246, 0.22); color: #f0d49d; }
.pill-toggle { border-color: rgba(167, 139, 250, 0.2); color: #8d80a2; }
.pill-toggle.is-on { border-color: rgba(240, 201, 117, 0.5); color: #f0d49d; }
.pill-toggle.is-on .pill-dot { background: #f0c975; }
.leap-row { border-color: rgba(167, 139, 250, 0.16); }
.script-chart-line { color: #d4b36d; }
.chart-pillar { border-color: rgba(167, 139, 250, 0.16); border-radius: 14px; background: rgba(139, 92, 246, 0.06); }
.chart-pillar-value { color: #f0dfb8; }
.element-pill { border-color: rgba(167, 139, 250, 0.14); color: #b6a8c9; background: rgba(255, 255, 255, 0.015); }
.act-label, .ab-label { color: #d4b36d; }
.act-text, .ab-text { color: #d1c6e2; }
.choice-block { border-left-color: rgba(240, 201, 117, 0.52); background: rgba(240, 201, 117, 0.04); }
.ab-block { border-color: rgba(167, 139, 250, 0.13); background: rgba(255, 255, 255, 0.015); }
.ab-block.is-alt { border-color: rgba(240, 201, 117, 0.28); background: rgba(240, 201, 117, 0.04); }
.diff-box { border-color: rgba(167, 139, 250, 0.14); }
.diff-row { color: #a69ab8; }
.script-actions .btn { min-height: 42px; }
.legal-title { color: #f4eaff; }
.legal-section { border-bottom-color: rgba(167, 139, 250, 0.1); }
.legal-heading { color: #efe4ff; }
.legal-text { color: #a99bbb; }
.legal-foot { color: #a895c1; }

@media (max-width: 760px) {
  body { padding-bottom: 88px; }
  .site-header { padding: 12px 0; }
  .header-links { display: none; }
  .header-icon { width: 32px; height: 32px; }
  .bottom-nav { display: flex; }
  .app-home { padding-top: 10px; }
  .home-main-card { min-height: 420px; border-radius: 20px; }
  .home-main-art img { object-position: 66% center; }
  .home-main-shade {
    background:
      linear-gradient(90deg, rgba(15, 9, 34, 0.96), rgba(17, 10, 38, 0.5) 80%),
      linear-gradient(180deg, rgba(12, 8, 28, 0.1), rgba(13, 8, 29, 0.4) 42%, rgba(13, 8, 29, 0.95) 88%, #080614 100%);
  }
  .home-main-copy { padding: 230px 22px 24px; }
  .home-main-copy h1 { font-size: 42px; }
  .home-main-copy p { font-size: 13px; }
  .home-orbit { right: 18px; top: 18px; bottom: auto; width: 82px; height: 82px; }
  .home-orbit strong { font-size: 28px; }
  .home-orbit span { font-size: 8px; }
  .home-main-actions { gap: 12px; }
  .home-main-actions .btn { min-height: 42px; padding: 0 18px; }
  .home-cards { grid-template-columns: 1fr; gap: 12px; }
  .home-script-card { padding: 20px; }
  .home-stat-card { padding: 20px; }
  .home-footer { margin-bottom: 10px; }
  .life-hero { border-radius: 20px; }
  .life-body .section, .shell-wide > .section { padding: 20px 18px; border-radius: 16px; }
  .six-grid { grid-template-columns: 1fr; }
  .six-row { padding: 12px 14px; }
  .page-head { padding-top: 22px; }
  .blind-setup { border-radius: 20px; }
  .form-card { border-radius: 20px; }
  .script-actions .btn { flex: 1 1 100%; }
}

.home-script-card::after {
  content: "剧";
  position: absolute;
  right: 24px;
  bottom: -30px;
  color: rgba(177, 151, 252, 0.055);
  font-family: var(--serif);
  font-size: 190px;
  line-height: 1;
  pointer-events: none;
}
@media (max-width: 760px) {
  .home-script-card::after { right: 10px; bottom: -18px; font-size: 130px; }
}

/* ── v3: reference-native app dashboard ─────────────────── */
.v3-home {
  max-width: 1080px;
  padding-top: 24px;
}

.top-actions { display: flex; align-items: center; gap: 10px; }
.top-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid rgba(240, 201, 117, 0.3);
  border-radius: 999px;
  background: rgba(240, 201, 117, 0.06);
  color: #e4c987;
  font-size: 10px;
  white-space: nowrap;
}
.top-chip .dot { width: 5px; height: 5px; border-radius: 50%; background: #f0c975; box-shadow: 0 0 8px rgba(240, 201, 117, 0.7); }

.v3-greeting {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 6px 2px 22px;
}
.v3-greeting h1 {
  margin: 8px 0 0;
  color: #fbf7ff;
  font-family: var(--sans);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.v3-greeting p { max-width: 560px; margin: 8px 0 0; color: #9d91b3; font-size: 12px; line-height: 1.8; }
.v3-date { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.v3-date strong { color: #f5e6c1; font-family: var(--sans); font-size: 26px; font-weight: 300; line-height: 1; }
.v3-date span { margin-top: 5px; color: #766a8c; font-size: 9px; letter-spacing: 0.08em; }

.v3-hero-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  min-height: 232px;
  overflow: hidden;
  padding: 28px 34px;
  border: 1px solid rgba(203, 175, 255, 0.25);
  border-radius: 24px;
  background:
    radial-gradient(circle at 80% 10%, rgba(244, 206, 125, 0.2), transparent 25%),
    radial-gradient(circle at 0% 100%, rgba(139, 92, 246, 0.34), transparent 50%),
    linear-gradient(135deg, #2b1656 0%, #3a1d6e 40%, #1b1036 100%);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.v3-hero-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: 12%;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(240, 201, 117, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(139, 92, 246, 0.16) inset;
}
.v3-hero-glow {
  position: absolute;
  right: 12%;
  bottom: -100px;
  width: 280px;
  height: 200px;
  background: rgba(139, 92, 246, 0.28);
  filter: blur(50px);
  pointer-events: none;
}
.v3-hero-content { position: relative; z-index: 2; max-width: 560px; }
.v3-chip {
  display: inline-flex;
  padding: 4px 10px;
  border: 1px solid rgba(240, 201, 117, 0.4);
  border-radius: 999px;
  background: rgba(240, 201, 117, 0.08);
  color: #f0d08a;
  font-size: 9px;
  letter-spacing: 0.12em;
}
.v3-hero-card h2 {
  margin: 12px 0 0;
  color: #fff8f0;
  font-family: var(--sans);
  font-size: clamp(34px, 4.2vw, 48px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
}
.v3-hero-card p { max-width: 430px; margin: 9px 0 0; color: #c3b3df; font-size: 12px; line-height: 1.8; }
.v3-hero-card .btn { margin-top: 18px; min-height: 42px; padding: 0 19px; font-size: 12px; }
.v3-hero-card .btn .icon { width: 15px; height: 15px; }
.v3-hero-card .btn-primary { color: #2b1a08; }

.v3-orb {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 138px;
  height: 138px;
  border: 1px solid rgba(240, 201, 117, 0.45);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 230, 170, 0.16), transparent 32%),
    radial-gradient(circle, rgba(94, 53, 170, 0.72), rgba(24, 13, 48, 0.92) 70%);
  box-shadow: 0 0 0 10px rgba(240, 201, 117, 0.035), 0 0 60px rgba(139, 92, 246, 0.3);
}
.v3-orb::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(240, 201, 117, 0.18); border-radius: 50%; }
.v3-orb span { color: #f9e9bb; font-family: var(--sans); font-size: 40px; font-weight: 300; line-height: 1; }
.v3-orb small { margin-top: 4px; color: #b6a2d3; font-size: 8px; letter-spacing: 0.1em; }

.v3-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.v3-action-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-height: 132px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(29, 20, 58, 0.98), rgba(14, 9, 30, 0.98));
  transition: transform 180ms ease, border-color 180ms ease;
}
.v3-action-card:hover { transform: translateY(-2px); border-color: rgba(240, 201, 117, 0.36); }
.v3-action-card.v3-purple {
  background:
    radial-gradient(circle at 100% 0%, rgba(139, 92, 246, 0.22), transparent 45%),
    linear-gradient(145deg, rgba(37, 23, 74, 0.98), rgba(16, 10, 34, 0.98));
}
.v3-action-card.v3-gold {
  background:
    radial-gradient(circle at 100% 0%, rgba(240, 201, 117, 0.13), transparent 45%),
    linear-gradient(145deg, rgba(35, 25, 44, 0.98), rgba(15, 10, 27, 0.98));
}
.v3-icon-tile {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.45), rgba(240, 201, 117, 0.12));
  color: #f4e6c8;
}
.v3-action-card.v3-gold .v3-icon-tile { background: linear-gradient(135deg, rgba(240, 201, 117, 0.34), rgba(139, 92, 246, 0.2)); }
.v3-card-label { display: block; color: #c8ac74; font-size: 9px; letter-spacing: 0.16em; }
.v3-action-card h3 { margin: 5px 0 0; color: #f1e9fb; font-family: var(--sans); font-size: 18px; font-weight: 600; line-height: 1.35; }
.v3-action-card p { margin: 4px 0 0; color: #9185a8; font-size: 10px; line-height: 1.6; }
.v3-arrow { position: absolute; right: 16px; bottom: 14px; color: #9b7ed0; }
.v3-action-card.v3-gold .v3-arrow { color: #c8a45d; }

.v3-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.v3-stat {
  position: relative;
  min-height: 98px;
  padding: 15px 16px;
  border: 1px solid rgba(167, 139, 250, 0.14);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(25, 17, 48, 0.9), rgba(12, 8, 26, 0.96));
}
.v3-stat::after { content: ""; position: absolute; top: 12px; right: 12px; width: 5px; height: 5px; border-radius: 50%; background: #8b5cf6; box-shadow: 0 0 9px rgba(139, 92, 246, 0.8); }
.v3-stat:nth-child(2)::after { background: #f0c975; box-shadow: 0 0 9px rgba(240, 201, 117, 0.8); }
.v3-stat:nth-child(3)::after { background: #34d399; box-shadow: 0 0 9px rgba(52, 211, 153, 0.7); }
.v3-stat span { display: block; color: #827494; font-size: 9px; letter-spacing: 0.08em; }
.v3-stat strong { display: block; margin-top: 8px; color: #f7e9c8; font-family: var(--sans); font-size: 25px; font-weight: 400; line-height: 1; }
.v3-stat small { display: block; margin-top: 5px; color: #6f6381; font-size: 9px; }
.v3-note { margin-top: 18px; color: #6c607e; font-size: 9px; line-height: 1.8; }

.bottom-nav a svg { width: 19px; height: 19px; }
.bottom-nav a span { font-size: 9px; }
.bottom-nav a.is-active svg { filter: drop-shadow(0 0 6px rgba(240, 201, 117, 0.45)); }

/* reference typography: sans UI headings */
.blind-title,
.page-head h1,
.life-name,
.script-headline,
.legal-title,
.section-title,
.home-script-card h2,
.home-main-copy h1 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.blind-title { font-size: clamp(32px, 4.2vw, 46px); }
.page-head h1 { font-size: clamp(30px, 4vw, 42px); }
.life-name { font-size: clamp(42px, 5vw, 62px); font-weight: 500; }
.script-headline { font-size: clamp(30px, 4vw, 44px); }
.legal-title { font-size: clamp(28px, 3.6vw, 40px); }
.section-title { font-size: 23px; }
.prose { font-family: var(--sans); font-size: 14px; line-height: 2; color: #c9bed8; }
.life-one-line { font-family: var(--sans); font-size: 14px; }
.landing-title, .hero-title { font-family: var(--sans); }

@media (max-width: 760px) {
  .v3-home { padding-top: 18px; }
  .top-chip { padding: 4px 8px; font-size: 9px; }
  .top-actions { gap: 6px; }
  .v3-greeting { padding-bottom: 18px; }
  .v3-greeting h1 { font-size: 28px; }
  .v3-date { display: none; }
  .v3-hero-card { min-height: 300px; align-items: flex-end; padding: 22px; border-radius: 22px; }
  .v3-hero-card::before { right: -30%; top: -50%; }
  .v3-orb { position: absolute; top: 22px; right: 22px; width: 86px; height: 86px; }
  .v3-orb span { font-size: 28px; }
  .v3-orb small { font-size: 7px; }
  .v3-hero-content { max-width: 100%; }
  .v3-hero-card h2 { font-size: 34px; }
  .v3-hero-card p { font-size: 11px; }
  .v3-action-grid { grid-template-columns: 1fr; gap: 10px; }
  .v3-action-card { min-height: 112px; padding: 17px; }
  .v3-action-card h3 { font-size: 17px; }
  .v3-stat-grid { gap: 8px; }
  .v3-stat { min-height: 88px; padding: 12px 11px; }
  .v3-stat strong { font-size: 19px; }
  .v3-stat small { font-size: 8px; }
}

/* ── v4: desktop rail + mobile app shell ────────────────── */
#app {
  padding-left: 232px;
}

.side-rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: 232px;
  padding: 24px 16px 20px;
  border-right: 1px solid rgba(167, 139, 250, 0.12);
  background:
    radial-gradient(circle at 20% 0%, rgba(139, 92, 246, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(12, 8, 26, 0.99), rgba(8, 6, 20, 0.99));
  backdrop-filter: blur(20px);
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 26px;
}
.rail-brand .brand-text strong { font-size: 17px; }

.rail-nav { display: flex; flex-direction: column; gap: 4px; }
.rail-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #9789ad;
  font-size: 12px;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.rail-nav a .icon { color: #7f6e9c; }
.rail-nav a:hover { background: rgba(139, 92, 246, 0.08); color: #e4d8f5; }
.rail-nav a.is-active {
  border-color: rgba(240, 201, 117, 0.17);
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.22), rgba(240, 201, 117, 0.05));
  color: #f7e5bb;
}
.rail-nav a.is-active .icon { color: #f0c975; }

.rail-foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding: 18px 12px 4px;
  border-top: 1px solid rgba(167, 139, 250, 0.1);
}
.rail-label { color: #75678b; font-size: 9px; letter-spacing: 0.16em; }
.rail-foot strong { color: #e9d8b5; font-family: var(--sans); font-size: 15px; font-weight: 400; }
.rail-foot > span:last-child { color: #6f6381; font-size: 9px; }

.mobile-bar { display: none; }

.v4-home { max-width: 1120px; padding-top: 38px; }
.v4-home .v3-greeting { padding: 0 2px 24px; }
.v4-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(270px, 0.8fr);
  gap: 16px;
  align-items: start;
}
.v4-home-main { min-width: 0; }
.v4-home-side { position: sticky; top: 24px; }
.v4-home .v3-hero-card { min-height: 264px; }
.v4-home .v3-action-grid { margin-top: 14px; }

.side-panel {
  padding: 18px;
  border: 1px solid rgba(167, 139, 250, 0.15);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(25, 17, 48, 0.94), rgba(11, 7, 24, 0.98));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  margin-bottom: 12px;
}
.side-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.side-panel-head a { color: #9b82c6; font-size: 10px; }
.side-life {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  border-top: 1px solid rgba(167, 139, 250, 0.09);
}
.side-life:hover strong { color: var(--gold); }
.side-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(240, 201, 117, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(240, 201, 117, 0.08));
  color: #f1d9a5;
  font-family: var(--sans);
  font-size: 12px;
}
.side-life-main { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 1px; }
.side-life-main strong { overflow: hidden; color: #e8dcf6; font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.side-life-main small { overflow: hidden; color: #796d8e; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.side-emotion { color: #8e7da8; font-size: 9px; white-space: nowrap; }
.side-empty { padding: 15px 0 3px; color: #86779e; font-size: 11px; line-height: 1.8; }
.side-empty a { color: #d8b975; }
.side-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 10px; }
.side-stats div { display: flex; flex-direction: column; gap: 3px; }
.side-stats strong { color: #f0dfb9; font-family: var(--sans); font-size: 19px; font-weight: 400; line-height: 1.1; }
.side-stats span { color: #776b8c; font-size: 9px; }

@media (max-width: 1050px) {
  #app { padding-left: 210px; }
  .side-rail { width: 210px; padding-left: 12px; padding-right: 12px; }
  .v4-home-grid { grid-template-columns: minmax(0, 1.65fr) minmax(240px, 0.75fr); }
}

@media (max-width: 900px) {
  #app { padding-left: 0; padding-bottom: 76px; }
  .side-rail { display: none; }
  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(100% - 32px);
    margin: 0 auto;
    padding: 12px 0;
    background: rgba(8, 6, 20, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(167, 139, 250, 0.08);
  }
  .mobile-bar .brand { gap: 8px; }
  .mobile-bar .brand-mark { width: 30px; height: 30px; }
  .mobile-bar .brand-text strong { font-size: 16px; }
  .v4-home { padding-top: 18px; }
  .v4-home-grid { grid-template-columns: 1fr; gap: 12px; }
  .v4-home-side { position: static; }
  .side-panel { padding: 16px; }
  .v3-greeting { padding-bottom: 18px; }
}
