/* ============================================================
   K-Saju 2027 — styles
   Dark ink, warm gold, one vermilion seal.
   ============================================================ */

:root {
  --ink: #0a0811;
  --ink-2: #100d1a;
  --ink-3: #171223;
  --panel: rgba(28, 23, 41, 0.72);
  --panel-solid: #1a1527;
  --gold: #d9ba7c;
  --gold-bright: #f0d9a6;
  --gold-dim: rgba(217, 186, 124, 0.5);
  --line: rgba(217, 186, 124, 0.16);
  --line-strong: rgba(217, 186, 124, 0.34);
  --text: #f0ebf5;
  --muted: #a79fb7;
  --muted-2: #7d7591;
  --red: #b8452f;
  --red-bright: #d4553a;
  --jade: #7fb39a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif KR", "Noto Serif CJK KR", "Nanum Myeongjo", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Liberation Sans", sans-serif;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(184, 69, 47, 0.16), transparent 62%),
    radial-gradient(700px 480px at 12% 18%, rgba(79, 127, 184, 0.10), transparent 60%),
    radial-gradient(640px 520px at 92% 42%, rgba(217, 186, 124, 0.07), transparent 62%),
    linear-gradient(180deg, #0d0a15 0%, var(--ink) 46%, #08060d 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  /* faint hanji grain */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.008) 0 1px, transparent 1px 4px);
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(18px + env(safe-area-inset-top)) 0 10px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(10, 8, 17, 0.94) 30%, rgba(10, 8, 17, 0));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.brand { display: flex; align-items: center; gap: 9px; }

.brand-seal {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: linear-gradient(160deg, #c14e35, #8f2f1e);
  color: #ffe9d6;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(184, 69, 47, 0.4), inset 0 0 0 1px rgba(255, 220, 190, 0.25);
}

.brand-text {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.16em;
  color: var(--gold-bright);
}

.brand-year { color: var(--muted); font-size: 13px; letter-spacing: 0.1em; margin-left: 6px; }

.top-actions { display: flex; align-items: center; gap: 8px; }

.lang-toggle {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lang-btn.is-on { background: var(--gold); color: #221708; }

.ghost-mini {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
}

/* ---------- screens ---------- */
.screen { display: none; animation: fadeUp 0.45s ease both; }
.screen.is-active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

html[lang="ko"] .eyebrow { letter-spacing: 0.14em; }
html[lang="ko"] .display { letter-spacing: -0.03em; }
html[lang="ko"] .archetype-name { letter-spacing: -0.03em; }

/* ---------- hero ---------- */
.hero { padding: 26px 0 8px; position: relative; }

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.hero-top .eyebrow { margin: 4px 0 0; }

.year-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 8px;
  border: 1px solid rgba(217, 186, 124, 0.22);
  border-radius: 12px;
  background: rgba(217, 186, 124, 0.05);
  flex: none;
}

.yb-hanja {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1;
  color: var(--gold-bright);
  letter-spacing: 0.02em;
}

.yb-text {
  font-size: 8.5px;
  line-height: 1.45;
  letter-spacing: 0.14em;
  color: var(--muted-2);
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.display {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 9.2vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #f7f1e6;
}

.display em {
  font-style: italic;
  color: var(--gold-bright);
}

.hero-sub {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: 30em;
}

/* ---------- panels & forms ---------- */
.offer { display: grid; gap: 9px; margin: 24px 2px 0; }

.offer-row { display: flex; align-items: flex-start; gap: 10px; }

.offer-tag {
  flex: none;
  min-width: 54px;
  text-align: center;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  margin-top: 1px;
  border-radius: 999px;
  border: 1px solid rgba(127, 179, 154, 0.45);
  color: var(--jade);
}

.offer-tag.paid { border-color: rgba(217, 186, 124, 0.4); color: var(--gold); }

.offer-row p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }

.panel {
  position: relative;
  margin-top: 26px;
  padding: 22px 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(217, 186, 124, 0.07);
  border-radius: 15px;
  pointer-events: none;
}

.field { display: block; margin-bottom: 18px; }

.field-label {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 600;
}

.optional {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--muted-2);
  font-weight: 400;
}

input[type="text"],
input[type="date"],
input[type="time"] {
  width: 100%;
  padding: 13px 14px;
  background: rgba(9, 7, 15, 0.6);
  border: 1px solid rgba(217, 186, 124, 0.18);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  color-scheme: dark;
}

input:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(217, 186, 124, 0.1);
}

input::placeholder { color: var(--muted-2); }

.field-hint { display: block; margin-top: 7px; font-size: 12px; color: var(--muted-2); }

.time-row { display: flex; gap: 10px; align-items: center; }
.time-row input { flex: 1; }

.check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(217, 186, 124, 0.35);
  border-radius: 5px;
  background: rgba(9, 7, 15, 0.6);
  cursor: pointer;
  position: relative;
}

.check input:checked { background: var(--gold); border-color: var(--gold); }
.check input:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #221708;
  font-size: 12px;
  font-weight: 700;
}

.seg {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(217, 186, 124, 0.14);
  border-radius: 12px;
  background: rgba(9, 7, 15, 0.45);
}

.seg button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  padding: 9px 6px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.seg button.is-on { background: rgba(217, 186, 124, 0.14); color: var(--gold-bright); }

.form-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(184, 69, 47, 0.14);
  border: 1px solid rgba(184, 69, 47, 0.4);
  color: #f0b7a8;
  font-size: 13px;
}

/* ---------- buttons ---------- */
.primary-btn {
  border: 0;
  border-radius: 999px;
  padding: 15px 22px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #23180a;
  background: linear-gradient(180deg, #f0d9a6 0%, #d9b56f 52%, #c39c52 100%);
  box-shadow: 0 8px 24px rgba(217, 186, 124, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.primary-btn:active { transform: translateY(1px) scale(0.995); }
.primary-btn:disabled { opacity: 0.5; cursor: default; }
.primary-btn.wide { width: 100%; margin-top: 4px; }

.ghost-btn {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 15px 22px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--gold-bright);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.ghost-btn:hover { background: rgba(217, 186, 124, 0.08); }
.ghost-btn.wide { width: 100%; }

.small-btn {
  border: 0;
  border-radius: 9px;
  padding: 10px 16px;
  background: var(--gold);
  color: #23180a;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.text-btn {
  display: block;
  width: 100%;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  padding: 10px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(167, 159, 183, 0.35);
}

.text-btn.strong { color: var(--gold); text-decoration: none; font-weight: 600; }
.text-btn.test { color: var(--muted-2); font-size: 12px; }

.fine { font-size: 12px; color: var(--muted-2); line-height: 1.55; margin: 10px 0 0; }
.center { text-align: center; }

.disclaimer {
  margin: 20px 4px 8px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted-2);
  text-align: center;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 30px 18px 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  border-top: 1px solid rgba(217, 186, 124, 0.08);
  margin-top: 26px;
  text-align: center;
}

.footer .dot { opacity: 0.5; }
.footer a { color: var(--gold-dim); text-decoration: none; }
.footer a:hover { color: var(--gold-bright); }

/* ---------- cross promo ---------- */
.promo-block { display: block; }

.promo-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 9px;
  padding: 12px 13px;
  border: 1px solid rgba(217, 186, 124, 0.14);
  border-radius: 14px;
  background: rgba(8, 6, 12, 0.32);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.promo-card:hover { border-color: rgba(217, 186, 124, 0.38); background: rgba(217, 186, 124, 0.05); }

.promo-mark {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(155deg, #3a2c4c, #241a33);
  color: #ffe9d6;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1;
}

.promo-mark.rose { background: linear-gradient(155deg, #4a1f2a, #2c141c); }
.promo-mark.coral { background: linear-gradient(155deg, #c14e35, #8f2f1e); }

.promo-copy { min-width: 0; flex: 1; }
.promo-copy strong { display: block; font-size: 13px; color: var(--text); }
.promo-copy span { display: block; font-size: 11.5px; line-height: 1.45; color: var(--muted-2); }
.promo-arrow { color: var(--gold); font-size: 14px; }

/* ---------- result top ---------- */
.result-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 6px;
}

.back-btn {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--gold);
  cursor: pointer;
}

.back-btn svg { width: 18px; height: 18px; }

.result-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.result-name { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-birth { font-size: 11.5px; color: var(--muted-2); letter-spacing: 0.03em; }

/* ---------- hero card ---------- */
.hero-card {
  position: relative;
  overflow: hidden;
  margin-top: 12px;
  padding: 26px 20px 20px;
  border: 1px solid rgba(217, 186, 124, 0.28);
  border-radius: 24px;
  background:
    radial-gradient(420px 260px at 50% -20%, rgba(184, 69, 47, 0.24), transparent 70%),
    linear-gradient(165deg, #1b1426 0%, #120e1c 55%, #0c0913 100%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(217, 186, 124, 0.12);
  border-radius: 17px;
  pointer-events: none;
}

.hero-card-glow {
  position: absolute;
  width: 240px;
  height: 240px;
  right: -70px;
  bottom: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 186, 124, 0.16), transparent 65%);
  pointer-events: none;
}

.card-kicker {
  margin: 0 0 12px;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 600;
}

.archetype-name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 8.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: #fbf5e9;
}

.archetype-ko {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--gold-bright);
  letter-spacing: 0.06em;
}

.archetype-essence {
  margin: 14px auto 0;
  max-width: 26em;
  font-size: 14.5px;
  line-height: 1.7;
  color: #c9c1d6;
}

.pillars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(217, 186, 124, 0.14);
}

.pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 2px;
}

.pillar-role {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.pillar-hanja {
  font-family: var(--serif);
  font-size: 25px;
  letter-spacing: 0.06em;
  color: #f4e9d3;
  line-height: 1.2;
}

.pillar.is-self .pillar-hanja { color: var(--gold-bright); }

.pillar-en { font-size: 9px; line-height: 1.3; color: var(--muted); letter-spacing: 0; min-height: 22px; }
.pillar-ko { font-size: 9.5px; line-height: 1.3; color: var(--muted-2); }

.daymaster-row {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.dm-pill,
.dm-strength {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(217, 186, 124, 0.2);
  color: var(--muted);
}

.dm-pill { color: var(--gold-bright); background: rgba(217, 186, 124, 0.07); }

/* ---------- blocks ---------- */
.block {
  position: relative;
  margin-top: 26px;
  padding: 22px 18px;
  scroll-margin-top: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.008)), rgba(20, 16, 31, 0.66);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.block-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: -0.01em;
  color: #f4e9d3;
}

.block-note { font-size: 10.5px; color: var(--muted-2); letter-spacing: 0.04em; }
.block-sub { margin: -6px 0 14px; font-size: 13px; color: var(--muted); }

/* element bars */
.element-bars { display: grid; gap: 11px; }

.el-row {
  display: grid;
  grid-template-columns: 78px 1fr 42px;
  gap: 10px;
  align-items: center;
}

.el-name { font-size: 12.5px; color: var(--muted); }
.el-name b { color: var(--text); font-weight: 600; margin-right: 4px; }

.el-track {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  overflow: hidden;
}

.el-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  width: 0;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.el-pct { font-size: 12px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* year block */
.year-head h2 { font-size: 19px; }

.year-meta { display: flex; align-items: center; gap: 9px; margin: -4px 0 10px; }
.year-meta-note { font-size: 11px; color: var(--muted-2); letter-spacing: 0.04em; }

.rel-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(217, 186, 124, 0.3);
  color: var(--gold-bright);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.rel-badge.is-hard { border-color: rgba(184, 69, 47, 0.55); color: #f0a898; }
.rel-badge.is-warm { background: rgba(217, 186, 124, 0.1); }

.year-relation { margin: 0 0 18px; font-size: 14.5px; line-height: 1.7; color: #cfc7da; }

.score-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(9, 7, 15, 0.42);
  border: 1px solid rgba(217, 186, 124, 0.12);
}

.score-dial { position: relative; width: 86px; height: 86px; flex: none; }
.score-dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial-track { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 7; }
.dial-fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.score-number {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 26px;
  color: var(--gold-bright);
}

.score-copy { min-width: 0; }
.score-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 5px;
}
.score-line { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 0; }

.chip {
  font-size: 12.5px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(217, 186, 124, 0.26);
  background: rgba(217, 186, 124, 0.06);
  color: var(--gold-bright);
}

.summary { margin: 16px 0 0; font-size: 15px; line-height: 1.8; color: #d7d0e2; }

/* lucky */
.lucky-grid { display: grid; grid-template-columns: 1.3fr 0.7fr 0.9fr; gap: 8px; }

.lucky-item {
  padding: 13px 10px;
  border-radius: 14px;
  background: rgba(9, 7, 15, 0.42);
  border: 1px solid rgba(217, 186, 124, 0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.lucky-label { font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); }
.lucky-item strong { font-size: 13.5px; font-weight: 600; color: var(--text); }
.lucky-big { font-family: var(--serif); font-size: 28px !important; color: var(--gold-bright) !important; line-height: 1; }

.swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 16px rgba(217, 186, 124, 0.18);
}

/* story card */
.card-stage { position: relative; border-radius: 18px; overflow: hidden; background: #0a0811; }

#storyCanvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

.card-badge {
  display: inline-block;
  margin: 0 0 10px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(217, 186, 124, 0.1);
  border: 1px solid rgba(217, 186, 124, 0.45);
  color: var(--gold-bright);
}

.row-2 { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 9px; margin-top: 12px; }

/* locked block */
.locked-block { overflow: hidden; border-color: rgba(217, 186, 124, 0.26); }

.locked-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(300px 160px at 85% 0%, rgba(217, 186, 124, 0.1), transparent 70%);
  pointer-events: none;
}

.lock-head { display: flex; gap: 12px; align-items: flex-start; position: relative; }

.lock-icon {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid rgba(217, 186, 124, 0.28);
  color: var(--gold);
  background: rgba(217, 186, 124, 0.06);
}

.lock-icon svg { width: 19px; height: 19px; }

.lock-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  color: #f4e9d3;
}

.lock-head .block-sub { margin: 4px 0 0; }

.locked-preview {
  margin: 16px 0 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(217, 186, 124, 0.18);
  background: rgba(9, 7, 15, 0.4);
  filter: blur(0.4px);
  opacity: 0.75;
  min-height: 92px;
}

.lp-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 12px; color: var(--muted); }
.lp-month { width: 62px; color: var(--muted-2); }
.lp-bar { flex: 1; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.lp-bar span { display: block; height: 100%; background: rgba(217, 186, 124, 0.5); border-radius: 999px; }
.lp-score { width: 26px; text-align: right; color: var(--muted-2); }

.feature-list {
  list-style: none;
  margin: 14px 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.feature-list li {
  position: relative;
  padding-left: 22px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #d2cadf;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-size: 12px;
}

/* months */
.months-highlight { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 16px; }

.hl {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(217, 186, 124, 0.2);
  background: rgba(217, 186, 124, 0.05);
}

.hl-caution { border-color: rgba(184, 69, 47, 0.32); background: rgba(184, 69, 47, 0.08); }
.hl-label { display: block; font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 3px; }
.hl strong { font-family: var(--serif); font-size: 15.5px; font-weight: 500; color: var(--gold-bright); line-height: 1.3; display: block; }
.hl-caution strong { color: #f0a898; }

.month-list { display: grid; gap: 10px; }

.month-card {
  border: 1px solid rgba(217, 186, 124, 0.12);
  border-radius: 15px;
  background: rgba(9, 7, 15, 0.36);
  overflow: hidden;
}

.month-card.is-best { border-color: rgba(217, 186, 124, 0.42); background: rgba(217, 186, 124, 0.055); }
.month-card.is-caution { border-color: rgba(184, 69, 47, 0.36); }

.month-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 118px 1fr 40px 12px;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  border: 0;
  background: none;
  color: inherit;
  font-family: var(--sans);
  text-align: left;
  cursor: pointer;
}

.month-name { font-family: var(--serif); font-size: 15.5px; color: #f4e9d3; }
.month-pillar {
  font-size: 10px;
  color: var(--muted-2);
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.month-mini-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.month-mini-track span { display: block; height: 100%; border-radius: 999px; background: var(--gold); }
.month-card.is-caution .month-mini-track span { background: var(--red-bright); }

.month-score { font-family: var(--serif); font-size: 16px; color: var(--gold-bright); text-align: right; }.month-card.is-caution .month-score { color: #f0a898; }

.month-chevron { color: var(--muted-2); font-size: 11px; transition: transform 0.2s; }
.month-card.is-open .month-chevron { transform: rotate(180deg); }

.month-body { display: none; padding: 0 15px 15px; }
.month-card.is-open .month-body { display: block; animation: fadeUp 0.3s ease both; }

.month-theme { margin: 0 0 8px; font-size: 13.5px; line-height: 1.65; color: #d7d0e2; }
.month-advice { margin: 0; font-size: 13px; line-height: 1.65; color: var(--muted); }
.month-focus {
  display: inline-block;
  margin-top: 10px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(217, 186, 124, 0.22);
  color: var(--gold);
}

/* deep */
.deep-list { display: grid; gap: 12px; }

.deep-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(217, 186, 124, 0.12);
  background: rgba(9, 7, 15, 0.36);
}

.deep-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.deep-top h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 19px; color: #f4e9d3; }

.deep-score {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--gold-bright);
}

.deep-el { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.deep-body { margin: 0; font-size: 13.5px; line-height: 1.72; color: #d2cadf; }
.deep-moves { margin: 12px 0 0; padding: 0 0 0 18px; display: grid; gap: 6px; }
.deep-moves li { font-size: 12.5px; line-height: 1.55; color: var(--muted); }

.result-actions { margin-top: 26px; }

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 3, 8, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease both;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 92dvh;
  overflow-y: auto;
  padding: 12px 22px calc(22px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  border: 1px solid rgba(217, 186, 124, 0.22);
  border-bottom: 0;
  background:
    radial-gradient(380px 200px at 50% 0%, rgba(184, 69, 47, 0.18), transparent 70%),
    linear-gradient(180deg, #1b1528, #0e0b16);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
  animation: sheetUp 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes sheetUp { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }

.sheet-grab { width: 40px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); margin: 0 auto 16px; }

.sheet-kicker { margin: 0 0 8px; font-size: 10px; letter-spacing: 0.28em; color: var(--gold); text-align: center; }

.sheet-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 27px;
  text-align: center;
  color: #f7f1e6;
}

.sheet-sub { margin: 0 0 16px; font-size: 13.5px; color: var(--muted); text-align: center; line-height: 1.6; }

.features {
  list-style: none;
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(9, 7, 15, 0.45);
  border: 1px solid rgba(217, 186, 124, 0.12);
  display: grid;
  gap: 9px;
}

.features li { position: relative; padding-left: 22px; font-size: 13px; line-height: 1.5; color: #d7d0e2; }
.features li::before { content: "✦"; position: absolute; left: 0; top: -1px; color: var(--gold); font-size: 11px; }

.price-row { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-bottom: 14px; }
.price { font-family: var(--serif); font-size: 40px; color: var(--gold-bright); line-height: 1; }
.price-once { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); }

/* ---------- year-end launch offer ---------- */

.price-was {
  align-self: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted-2);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(184, 69, 47, 0.85);
}

.promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -4px 0 14px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(184, 69, 47, 0.55);
  background: rgba(184, 69, 47, 0.14);
  color: #f0c9b6;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.35;
  text-transform: uppercase;
  white-space: nowrap;
}

.promo-badge::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red-bright);
}

.promo-badge.sm { margin: 0; padding: 3px 8px; font-size: 9px; letter-spacing: 0.05em; }

.promo-badge.center {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin: -4px auto 14px;
}

.lock-price {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 16px 0 14px;
}

.lock-price-now {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
  color: var(--gold-bright);
}

.restore { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(217, 186, 124, 0.1); }

.restore-box { display: flex; gap: 7px; margin: 4px 0 8px; }
.restore-box input { flex: 1; padding: 11px 12px; font-size: 14px; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(4, 3, 8, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.overlay[hidden] { display: none; }

.busy-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid rgba(217, 186, 124, 0.22);
  background: #171122;
  color: var(--muted);
  font-size: 13.5px;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(217, 186, 124, 0.25);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(26px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  max-width: min(92vw, 460px);
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid rgba(217, 186, 124, 0.28);
  background: rgba(23, 17, 34, 0.96);
  color: #ece4d6;
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 100;
}

.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.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;
}

/* ---------- wider screens ---------- */
@media (min-width: 700px) {
  .app { padding: 0 28px 50px; }
  .hero { padding-top: 44px; }
  .modal { align-items: center; }
  .sheet { border-radius: 26px; max-height: 88vh; border-bottom: 1px solid rgba(217, 186, 124, 0.22); }
  .sheet-grab { display: none; }
}

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