/* ============================================================
   照见 · ZHAOJIAN
   纸感极简 / 移动优先 / 无外部字体与资源
   ============================================================ */

:root {
  --paper: #f6f2ea;
  --paper-2: #f0eadf;
  --paper-3: #e8e0d2;
  --card: rgba(255, 252, 246, 0.74);
  --card-solid: #fbf8f2;
  --ink: #1f1d1a;
  --ink-2: #3f3b35;
  --ink-3: #5c554c;
  --muted: #8b8174;
  --muted-2: #a89d8e;
  --line: #ded5c7;
  --line-soft: #e9e2d6;
  --line-strong: #cbbfaa;
  --accent: #b1543d;
  --accent-deep: #8e3d2c;
  --accent-soft: #f1dfd6;
  --sage: #5d7060;
  --sage-soft: #e2e8dd;
  --gold: #a17b3f;
  --danger: #a3382b;
  --shadow-sm: 0 10px 30px -20px rgba(60, 45, 25, 0.38);
  --shadow-md: 0 30px 70px -52px rgba(60, 45, 25, 0.52);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 13px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.22, 0.75, 0.24, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 82% -10%, rgba(255, 251, 242, 0.9), transparent 62%),
    radial-gradient(900px 600px at -8% 32%, rgba(232, 224, 210, 0.55), transparent 68%),
    linear-gradient(180deg, #f7f3eb 0%, #f4efe6 100%);
}

body.chatting {
  overflow: hidden;
}

::selection {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: default;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* ---------- boot / error ---------- */

.app {
  min-height: 100vh;
  min-height: 100dvh;
}

.boot,
.noscript {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  gap: 14px;
  color: var(--muted);
  font-family: var(--serif);
  letter-spacing: 0.18em;
  font-size: 14px;
}

.boot-mark {
  width: 34px;
  height: 34px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  position: relative;
  animation: boot-pulse 1.8s ease-in-out infinite;
}

.boot-mark::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  right: 2px;
  bottom: 3px;
}

@keyframes boot-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1); }
}

.noscript {
  padding: 32px;
  text-align: center;
  letter-spacing: 0;
  font-family: var(--sans);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.9;
}

.noscript h1 {
  font-family: var(--serif);
  letter-spacing: 0.08em;
  font-size: 30px;
}

.error-panel {
  max-width: 560px;
  margin: 16vh auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}

.error-panel h1 {
  font-family: var(--serif);
  font-size: 26px;
  margin-bottom: 10px;
}

.error-panel p {
  color: var(--ink-3);
  font-size: 14px;
}

/* ---------- shared page frame ---------- */

.screen {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 22px 22px calc(72px + var(--safe-b));
  animation: screen-in 0.5s var(--ease) both;
}

.screen.home-screen {
  max-width: 1080px;
  padding: 26px 24px calc(56px + var(--safe-b));
}

.screen.chat-screen {
  max-width: 760px;
  height: 100vh;
  height: 100dvh;
  padding: 0;
  display: flex;
  flex-direction: column;
  animation: none;
}

@keyframes screen-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.icon-btn:hover {
  background: rgba(255, 252, 246, 0.7);
  border-color: var(--line);
}

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

.topbar-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}

.text-btn {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.text-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong, var(--line));
}

/* ---------- brand ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  position: relative;
  flex: 0 0 auto;
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  right: 1px;
  bottom: 3px;
}

.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.18em;
  line-height: 1;
  padding-left: 1px;
}

.brand-en {
  display: block;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.26em;
  color: var(--muted);
  margin-top: 4px;
}

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.head-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px 7px 9px;
  background: rgba(255, 252, 246, 0.4);
  white-space: nowrap;
}

.head-chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
}

/* ---------- home ---------- */

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.home-hero {
  padding-top: clamp(42px, 8vh, 96px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 500;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.65;
}

.home-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 9.4vw, 48px);
  line-height: 1.32;
  letter-spacing: 0.02em;
  margin-top: 22px;
}

.home-hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}

.home-hero h1 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: var(--accent);
  opacity: 0.35;
}

.home-lede {
  margin-top: 24px;
  max-width: 32em;
  font-size: 15px;
  line-height: 1.95;
  color: var(--ink-3);
}

.home-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.home-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.home-meta span + span::before {
  content: "·";
  color: var(--muted-2);
  margin-right: 2px;
}

.home-offer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin-top: 15px;
  padding: 11px 14px;
  border: 1px solid rgba(177, 84, 61, 0.2);
  border-radius: 12px;
  background: rgba(177, 84, 61, 0.045);
  font-size: 11.5px;
  line-height: 1.6;
}

.home-offer-free {
  color: var(--muted);
}

.home-offer-paid {
  color: var(--ink-2);
}

.home-offer-paid b {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
}

.home-offer-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--paper);
  font-size: 13px;
  letter-spacing: 0.08em;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease);
}

.home-offer-cta:hover {
  background: var(--accent-deep);
}

.home-offer-cta:active {
  transform: scale(0.97);
}

.module-price {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-weight: 500;
}

.module-price::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.home-modules {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.module-card {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  animation: card-in 0.55s var(--ease) both;
  padding: 22px 22px 19px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.module-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong, #ccbfab);
  background: var(--card-solid);
  box-shadow: var(--shadow-md);
}

.module-card:active {
  transform: translateY(-1px) scale(0.995);
}

.module-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.module-index {
  font-family: var(--serif);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.module-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  flex: 0 0 auto;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.module-icon svg {
  width: 17px;
  height: 17px;
}

.module-card:hover .module-icon {
  border-color: var(--accent);
  color: var(--accent);
}

.module-card h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: 0.04em;
  margin-top: 7px;
}

.module-card .module-sub {
  font-size: 13.5px;
  color: var(--ink-3);
  margin-top: 5px;
}

.module-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.module-tags {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.module-arrow {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1;
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}

.module-card:hover .module-arrow {
  transform: translateX(3px);
  color: var(--accent);
}

.module-done,
.module-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.module-done {
  color: var(--sage);
}

.module-status {
  color: var(--accent);
}

.module-done::before,
.module-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ai-card {
  position: relative;
  margin-top: 13px;
  padding: 24px 22px 21px;
  border-radius: var(--r-lg);
  background: var(--ink);
  color: #f3ede3;
  overflow: hidden;
  text-align: left;
  width: 100%;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.ai-card::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -100px;
  top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(177, 84, 61, 0.38), transparent 68%);
  pointer-events: none;
}

.ai-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: 24px;
  bottom: -110px;
  border: 1px solid rgba(243, 237, 227, 0.15);
  border-radius: 50%;
  pointer-events: none;
}

.ai-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 60px -35px rgba(31, 29, 26, 0.7);
}

.ai-card .ai-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(243, 237, 227, 0.62);
}

.ai-card .ai-kicker::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(177, 84, 61, 0.16);
}

.ai-card h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 25px;
  letter-spacing: 0.04em;
  margin-top: 14px;
}

.ai-card p {
  color: rgba(243, 237, 227, 0.7);
  font-size: 13px;
  line-height: 1.8;
  margin-top: 8px;
  max-width: 33em;
}

.ai-card .ai-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: #f3ede3;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.ai-card .ai-arrow {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(243, 237, 227, 0.28);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.ai-card .ai-arrow svg {
  width: 15px;
  height: 15px;
}

.ai-card:hover .ai-arrow {
  background: #f3ede3;
  color: var(--ink);
}

.home-foot {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.home-foot p {
  max-width: 27em;
}

.home-foot-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

.home-foot-actions button {
  font-size: 11px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

.home-foot-actions button:hover {
  color: var(--accent);
}

.home-crisis {
  margin-top: 16px;
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted-2);
}

.home-crisis::before {
  content: "安全提示 · ";
  color: var(--muted);
}

/* ---------- intro ---------- */

.intro {
  padding-top: 34px;
}

.intro-kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.intro h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(31px, 7.6vw, 40px);
  line-height: 1.4;
  margin-top: 14px;
  letter-spacing: 0.02em;
}

.intro-lede {
  color: var(--ink-3);
  font-size: 14.5px;
  line-height: 1.95;
  margin-top: 16px;
  max-width: 33em;
}

.intro-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 30px;
  padding: 16px 0;
}

.intro-meta div {
  padding: 0 14px;
  border-left: 1px solid var(--line-soft);
}

.intro-meta div:first-child {
  border-left: 0;
  padding-left: 0;
}

.intro-meta b {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
}

.intro-meta span {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.intro-section {
  margin-top: 28px;
}

.intro-section h2 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.intro-section > p {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.9;
  margin-top: 8px;
}

.intro-note {
  margin-top: 26px;
  padding: 16px 18px;
  border-left: 2px solid var(--accent);
  background: rgba(177, 84, 61, 0.055);
  border-radius: 0 12px 12px 0;
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.85;
}

.age-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.age-option {
  text-align: left;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 246, 0.45);
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease);
}

.age-option b {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.age-option span {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
}

.age-option:hover {
  border-color: var(--line-strong, #ccbfab);
}

.age-option.selected {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.age-option.selected span {
  color: rgba(246, 242, 234, 0.65);
}

.intro-actions {
  margin-top: 34px;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  letter-spacing: 0.08em;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.primary-btn:hover {
  background: #34302a;
}

.primary-btn:active {
  transform: scale(0.985);
}

.primary-btn:disabled {
  opacity: 0.45;
}

.primary-btn.accent {
  background: var(--accent);
}

.primary-btn.accent:hover {
  background: var(--accent-deep);
}

.primary-btn.light {
  background: #f3ede3;
  color: var(--ink);
}

.primary-btn.light:hover {
  background: #fffaf1;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 13px;
  background: transparent;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.ghost-btn:hover {
  border-color: var(--ink-3);
  background: rgba(255, 252, 246, 0.5);
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-row .primary-btn {
  flex: 1 1 220px;
}

.btn-row .ghost-btn {
  flex: 0 0 auto;
}

.intro-foot {
  margin-top: 18px;
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  text-align: center;
}

/* ---------- quiz ---------- */

.quiz-screen {
  max-width: 720px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(38px + var(--safe-b));
}

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
}

.quiz-progress-track {
  height: 2px;
  background: var(--line-soft);
  margin-top: 18px;
  border-radius: 2px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.45s var(--ease);
}

.quiz-caption {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.quiz-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 8vh, 86px) 0 34px;
}

.quiz-body.note-mode {
  justify-content: flex-start;
  padding-top: clamp(42px, 10vh, 100px);
}

.q-index {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.q-text {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(23px, 5.8vw, 30px);
  line-height: 1.58;
  letter-spacing: 0.01em;
  margin-top: 15px;
  max-width: 23em;
  text-wrap: pretty;
}

.q-hint {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 34px;
  max-width: 540px;
}

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 246, 0.36);
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.5;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}

.option:hover {
  border-color: var(--line-strong, #ccbfab);
  background: var(--card-solid);
}

.option:active {
  transform: scale(0.992);
}

.option-marker {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 11px;
  color: var(--muted);
  flex: 0 0 auto;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.option.selected {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.option.selected .option-marker {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.option-label {
  display: block;
  min-width: 0;
}

.option-label b {
  display: block;
  font-size: 14.5px;
  font-weight: 500;
}

.option-label small {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
}

.age-option:hover .option-label small,
.age-option.selected .option-label small {
  color: rgba(246, 242, 234, 0.66);
}

.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 11.5px;
  color: var(--muted);
  padding-top: 8px;
}

.quiz-footer button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  padding: 8px 0;
  white-space: nowrap;
}

.quiz-footer button svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.quiz-footer button:hover {
  color: var(--ink);
}

.quiz-footer button:disabled {
  opacity: 0.32;
}

.kbd-hint {
  display: none;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

/* note */

.note-title {
  font-family: var(--serif);
  font-size: clamp(25px, 6.4vw, 32px);
  line-height: 1.55;
  margin-top: 16px;
}

.note-lede {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-3);
  max-width: 34em;
}

.note-area {
  margin-top: 26px;
  width: 100%;
  min-height: 128px;
  resize: vertical;
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 252, 246, 0.55);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.8;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.note-area:focus {
  outline: none;
  border-color: var(--ink-3);
  background: var(--card-solid);
}

.note-area::placeholder {
  color: var(--muted-2);
}

.note-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--muted);
}

.note-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
}

.note-actions .primary-btn {
  flex: 1;
}

.note-skip {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 0;
  white-space: nowrap;
}

.note-skip:hover {
  color: var(--ink);
}

/* ---------- result ---------- */

.result-screen {
  max-width: 700px;
  padding-bottom: calc(104px + var(--safe-b));
}

.result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
}

.result-hero {
  padding-top: 32px;
}

.result-kicker {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.result-kicker strong {
  color: var(--accent);
  font-weight: 500;
}

.result-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 8.2vw, 48px);
  line-height: 1.35;
  letter-spacing: 0.02em;
  margin-top: 12px;
}

.result-tagline {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-top: 10px;
}

.result-summary {
  margin-top: 20px;
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--ink-3);
  max-width: 34em;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.result-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
}

.result-note-quote {
  margin-top: 24px;
  padding: 14px 16px;
  border-left: 2px solid var(--accent);
  background: rgba(177, 84, 61, 0.05);
  border-radius: 0 12px 12px 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-3);
}

.result-ai-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.52);
  color: var(--ink-2);
  font-size: 11px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.result-ai-link:hover {
  border-color: var(--line-strong);
  background: var(--card-solid);
  color: var(--ink);
}

.result-ai-link .rail-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(177, 84, 61, 0.12);
}

.result-ai-link .rail-arrow {
  color: var(--accent);
  font-size: 12px;
}

.result-note-quote span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 4px;
}

.section {
  margin-top: 44px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 23px;
  letter-spacing: 0.03em;
}

.section-head span {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  white-space: nowrap;
}

.section-lead {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 38em;
}

.score-panel {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}

.ring-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto;
}

.ring-wrap svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: var(--line-soft);
  stroke-width: 6;
}

.ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.1s var(--ease);
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ring-center b {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
}

.ring-center span {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-top: 7px;
}

.score-copy h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
}

.score-copy p {
  margin-top: 7px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-3);
}

.score-copy .score-caveat {
  margin-top: 10px;
  font-size: 10.5px;
  color: var(--muted);
}

.dim-list {
  margin-top: 16px;
}

.dim-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.dim-row:first-child {
  border-top: 1px solid var(--line-soft);
}

.dim-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.dim-row-head b {
  font-size: 13.5px;
  font-weight: 500;
}

.dim-row-head span {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink-2);
}

.dim-bar {
  height: 5px;
  margin-top: 9px;
  border-radius: 999px;
  background: var(--paper-3);
  overflow: hidden;
}

.dim-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent);
  transition: width 1s var(--ease);
}

.dim-fill.sage {
  background: var(--sage);
}

.dim-poles {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}

.dim-note {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
}

.radar-panel {
  margin-top: 18px;
  padding: 16px 12px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}

.radar-panel svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.radar-label {
  font-family: var(--sans);
  font-size: 10px;
  fill: var(--ink-3);
  letter-spacing: 0.04em;
}

.radar-score {
  font-family: var(--serif);
  font-size: 9px;
  fill: var(--muted);
}

.radar-grid {
  fill: none;
  stroke: var(--line-soft);
  stroke-width: 0.8;
}

.radar-axis {
  stroke: var(--line-soft);
  stroke-width: 0.8;
}

.radar-shape {
  fill: rgba(177, 84, 61, 0.13);
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.radar-dot {
  fill: var(--paper);
  stroke: var(--accent);
  stroke-width: 1.4;
}

.trait-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.trait-card {
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 252, 246, 0.5);
}

.trait-card b {
  display: block;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
}

.trait-card span {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.65;
}

.trait-card.wide {
  grid-column: 1 / -1;
}

.trait-card.accent {
  background: rgba(177, 84, 61, 0.055);
  border-color: rgba(177, 84, 61, 0.22);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--ink-3);
  background: rgba(255, 252, 246, 0.44);
}

.tag.accent {
  border-color: rgba(177, 84, 61, 0.24);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.plain-list {
  list-style: none;
  margin-top: 12px;
}

.plain-list li {
  position: relative;
  padding: 11px 0 11px 20px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 20px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.plain-list li:first-child {
  border-top: 1px solid var(--line-soft);
}

.number-list {
  list-style: none;
  counter-reset: step;
  margin-top: 12px;
}

.number-list li {
  counter-increment: step;
  position: relative;
  padding: 0 0 16px 38px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

.number-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--serif);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.number-list li::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 20px;
  bottom: 2px;
  width: 1px;
  background: var(--line);
}

.number-list li:last-child::after {
  display: none;
}

.number-list li:last-child {
  padding-bottom: 0;
}

.pattern-card {
  margin-top: 14px;
  padding: 20px 19px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}

.pattern-card.featured {
  border-color: rgba(177, 84, 61, 0.28);
  background: linear-gradient(180deg, rgba(177, 84, 61, 0.045), rgba(255, 252, 246, 0.62));
}

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

.pattern-num {
  font-family: var(--serif);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.pattern-card h3 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.45;
  margin-top: 3px;
}

.pattern-card .pattern-sub {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
}

.pattern-why {
  margin-top: 13px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-2);
}

.pattern-block {
  margin-top: 15px;
}

.pattern-block h4 {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  color: var(--accent);
  text-transform: uppercase;
}

.pattern-block p {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-3);
}

.loop-list {
  list-style: none;
  counter-reset: loop;
  margin-top: 8px;
  display: grid;
  gap: 7px;
}

.loop-list li {
  counter-increment: loop;
  position: relative;
  padding: 9px 12px 9px 34px;
  border-radius: 10px;
  background: rgba(246, 242, 234, 0.72);
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-3);
}

.loop-list li::before {
  content: counter(loop);
  position: absolute;
  left: 12px;
  top: 9px;
  font-family: var(--serif);
  font-size: 10px;
  color: var(--accent);
}

.sign-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.sign-list span {
  font-size: 11px;
  line-height: 1.6;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--paper-2);
  color: var(--ink-3);
}

.script-card {
  margin-top: 10px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card-solid);
}

.script-card .script-scene {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 6px;
}

.script-card .script-text {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
}

.script-card .script-copy {
  margin-top: 8px;
  font-size: 10px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}

.script-card .script-copy:hover {
  color: var(--accent);
}

.section-cta {
  margin-top: 30px;
  padding: 22px;
  border-radius: var(--r-lg);
  background: var(--ink);
  color: #f3ede3;
}

.section-cta h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
}

.section-cta p {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.8;
  color: rgba(243, 237, 227, 0.67);
}

.section-cta .primary-btn {
  margin-top: 15px;
  min-height: 46px;
  font-size: 13px;
}

.week-plan {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 252, 246, 0.45);
  overflow: hidden;
}

.week-plan summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  color: var(--ink-2);
}

.week-plan summary::-webkit-details-marker {
  display: none;
}

.week-plan summary span {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.week-plan[open] summary {
  border-bottom: 1px solid var(--line-soft);
}

.week-list {
  list-style: none;
  padding: 6px 16px 14px;
}

.week-list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-3);
}

.week-list li:last-child {
  border-bottom: 0;
}

.week-list b {
  flex: 0 0 auto;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 11px;
  color: var(--accent);
  padding-top: 1px;
}

.week-list strong {
  display: block;
  font-weight: 500;
  color: var(--ink-2);
}

.disclaimer-box {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.85;
}

.disclaimer-box strong {
  display: block;
  font-weight: 500;
  color: var(--ink-3);
  margin-bottom: 4px;
}

.result-foot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.result-foot-actions .ghost-btn {
  flex: 1 1 140px;
}

.result-badge.premium-lock-badge {
  margin-left: 7px;
  border-color: rgba(177, 84, 61, 0.26);
  color: var(--accent);
}

.result-badge.premium-lock-badge::before {
  background: var(--accent);
}

/* ---------- paywall ---------- */

.paywall-gate {
  margin-top: 18px;
  padding: 22px 20px 20px;
  border: 1px solid rgba(177, 84, 61, 0.28);
  border-radius: var(--r-lg);
  background:
    radial-gradient(260px 180px at 100% 0, rgba(177, 84, 61, 0.1), transparent 70%),
    linear-gradient(180deg, rgba(255, 252, 246, 0.78), rgba(246, 242, 234, 0.6));
}

.paywall-gate-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.paywall-gate-icon {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(177, 84, 61, 0.35);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex: 0 0 auto;
}

.paywall-gate-icon svg {
  width: 16px;
  height: 16px;
}

.paywall-gate-kicker {
  font-size: 9.5px;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.paywall-gate h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 25px;
  line-height: 1.45;
  margin-top: 13px;
}

.paywall-gate > p {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-3);
}

.paywall-preview {
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(246, 242, 234, 0.8);
  color: var(--ink-2) !important;
}

.paywall-preview b {
  font-weight: 500;
  color: var(--accent-deep);
}

.paywall-gate-list {
  list-style: none;
  margin-top: 14px;
  display: grid;
  gap: 7px;
}

.paywall-gate-list li {
  position: relative;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.75;
  color: var(--ink-2);
}

.paywall-gate-list li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 8px;
  width: 7px;
  height: 4px;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}

.paywall-gate .primary-btn {
  margin-top: 17px;
}

.paywall-restore {
  display: block;
  width: 100%;
  margin-top: 11px;
  padding: 4px 0;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.paywall-restore:hover {
  color: var(--accent);
}

.paywall-micro {
  margin-top: 10px !important;
  text-align: center;
  font-size: 9.5px !important;
  color: var(--muted-2) !important;
}

body.paywall-open {
  overflow: hidden;
}

.paywall-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 14px calc(14px + var(--safe-b));
  background: rgba(31, 29, 26, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}

.paywall-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.paywall-sheet {
  width: min(560px, 100%);
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 21px 22px calc(22px + var(--safe-b));
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 40px 100px -30px rgba(20, 15, 10, 0.55);
  transform: translateY(18px);
  transition: transform 0.3s var(--ease);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.paywall-backdrop.show .paywall-sheet {
  transform: translateY(0);
}

.paywall-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.paywall-eyebrow {
  font-size: 9.5px;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.paywall-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  flex: 0 0 auto;
}

.paywall-close:hover {
  color: var(--ink);
  border-color: var(--ink-3);
}

.paywall-sheet h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 7vw, 32px);
  line-height: 1.35;
  margin-top: 11px;
}

.paywall-sub {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-3);
}

.paywall-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 15px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.paywall-price strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 42px;
  line-height: 1;
  color: var(--accent);
}

.paywall-price span {
  font-size: 10.5px;
  color: var(--muted);
}

.paywall-activate-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px dashed rgba(177, 84, 61, 0.3);
  border-radius: 12px;
  background: rgba(177, 84, 61, 0.04);
  font-size: 11px;
  color: var(--muted);
}

.paywall-activate-inline button {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.paywall-activate-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(177, 84, 61, 0.28);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(177, 84, 61, 0.075), rgba(255, 252, 246, 0.55));
}

.paywall-activate-head h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.45;
  margin-top: 3px;
}

.paywall-activate-kicker {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.paywall-activate-box .code-row {
  margin-top: 9px;
}

.paywall-disclaimer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.paywall-disclaimer h3 {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.13em;
  color: var(--accent);
}

.paywall-disclaimer p {
  margin-top: 6px;
  font-size: 9.5px;
  line-height: 1.85;
  color: var(--muted);
}

.paywall-features {
  list-style: none;
  margin-top: 14px;
  display: grid;
  gap: 7px;
}

.paywall-features li {
  position: relative;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.75;
  color: var(--ink-2);
}

.paywall-features li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 8px;
  width: 7px;
  height: 4px;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}

.paywall-pay,
.paywall-code {
  margin-top: 19px;
}

.paywall-pay h3,
.paywall-code h3 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.03em;
}

.paywall-pay h3 span,
.paywall-code h3 span {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.paywall-qr-wrap {
  margin-top: 11px;
  text-align: center;
}

.pay-method-intro {
  margin-top: 10px;
  font-size: 10.5px;
  color: var(--muted);
}

.pay-method-tabs {
  display: flex;
  gap: 6px;
  margin-top: 9px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(246, 242, 234, 0.7);
}

.pay-method-tab {
  flex: 1;
  min-height: 32px;
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--muted);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.pay-method-tab.is-active {
  background: var(--card-solid);
  color: var(--ink);
  box-shadow: 0 2px 10px -6px rgba(40, 30, 15, 0.4);
}

.paywall-qr {
  width: min(210px, 70%);
  height: auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.paywall-qr-photo {
  width: min(238px, 72%);
  max-height: 292px;
  object-fit: contain;
  padding: 5px;
}

.pay-qr-hint {
  margin-top: 6px;
  font-size: 10px;
  color: var(--muted);
}

.paywall-contact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-solid);
  font-size: 12px;
  color: var(--muted);
}

.paywall-contact b {
  font-weight: 500;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.03em;
}

.paywall-copy {
  margin-left: auto;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  color: var(--ink-3);
}

.paywall-copy:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.paywall-config {
  margin-top: 10px;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 11.5px;
  line-height: 1.75;
}

.paywall-config code {
  font-family: var(--mono);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.45);
  padding: 1px 4px;
  border-radius: 4px;
}

.paywall-note {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.75;
  color: var(--muted);
}

.code-row {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.code-input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-solid);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  outline: none;
}

.code-input:focus {
  border-color: var(--ink-3);
}

.code-input::placeholder {
  color: var(--muted-2);
  font-family: var(--sans);
  letter-spacing: 0;
  font-size: 11px;
}

.code-submit {
  width: 82px;
  min-height: 46px;
  flex: 0 0 auto;
  padding: 0 12px;
  font-size: 12px;
}

.code-status {
  min-height: 17px;
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}

.code-status.is-error {
  color: var(--danger);
}

.code-status.is-ok {
  color: var(--sage);
}

.paywall-small {
  margin-top: 19px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 9.5px;
  line-height: 1.75;
  color: var(--muted-2);
}

@media (max-width: 560px) {
  .paywall-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .paywall-sheet {
    width: 100%;
    max-height: 92dvh;
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
    padding: 19px 19px calc(20px + var(--safe-b));
  }
}

.floating-ai {
  position: fixed;
  left: 50%;
  bottom: calc(16px + var(--safe-b));
  transform: translate(-50%, 14px);
  z-index: 30;
  width: calc(100% - 44px);
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px 11px 18px;
  border-radius: 999px;
  background: rgba(31, 29, 26, 0.96);
  color: #f3ede3;
  box-shadow: 0 18px 50px -20px rgba(31, 29, 26, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease);
}

.floating-ai.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
  animation: float-in 0.5s var(--ease) both;
}

@keyframes float-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.floating-ai .fa-text {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  letter-spacing: 0.04em;
  min-width: 0;
}

.floating-ai .fa-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(177, 84, 61, 0.18);
  flex: 0 0 auto;
}

.floating-ai .fa-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-ai .fa-btn {
  flex: 0 0 auto;
  padding: 10px 15px;
  border-radius: 999px;
  background: #f3ede3;
  color: var(--ink);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

/* ---------- chat ---------- */

.chat-shell {
  min-height: 0;
}

.chat-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(246, 242, 234, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2;
}

.chat-trial-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-bottom: 1px solid rgba(177, 84, 61, 0.16);
  background: linear-gradient(90deg, rgba(177, 84, 61, 0.09), rgba(177, 84, 61, 0.035));
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--ink-3);
}

.chat-trial-bar.is-expired {
  background: rgba(177, 84, 61, 0.06);
}

.chat-trial-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
  animation: trial-pulse 1.8s ease-in-out infinite;
}

.chat-trial-bar.is-expired .chat-trial-dot {
  animation: none;
  opacity: 0.5;
}

@keyframes trial-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.chat-trial-label {
  color: var(--ink-3);
}

.chat-trial-time {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.chat-trial-bar button {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid rgba(177, 84, 61, 0.3);
  border-radius: 999px;
  color: var(--accent-deep);
  font-size: 9.5px;
  background: rgba(255, 252, 246, 0.5);
}

.chat-expired {
  margin: 4px 0 18px;
  padding: 20px 18px;
  border: 1px solid rgba(177, 84, 61, 0.3);
  border-radius: var(--r-lg);
  background:
    radial-gradient(220px 150px at 100% 0, rgba(177, 84, 61, 0.12), transparent 70%),
    rgba(255, 252, 246, 0.72);
}

.chat-expired-icon {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(177, 84, 61, 0.3);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.chat-expired-icon svg {
  width: 16px;
  height: 16px;
}

.chat-expired-kicker {
  display: block;
  margin-top: 11px;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.chat-expired h2 {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  margin-top: 4px;
}

.chat-expired p {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.85;
  color: var(--ink-3);
}

.chat-expired .primary-btn {
  margin-top: 14px;
  min-height: 46px;
  font-size: 13px;
}

.chat-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.chat-title b {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.chat-title span {
  font-size: 9px;
  letter-spacing: 0.13em;
  color: var(--muted);
}

.chat-context-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}

.chat-context-pill::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sage);
}

.chat-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 18px 18px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

.chat-intro {
  max-width: 90%;
  margin-bottom: 18px;
}

.chat-intro .assistant-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  letter-spacing: 0.13em;
  color: var(--muted);
  margin-bottom: 7px;
}

.assistant-avatar {
  width: 20px;
  height: 20px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  position: relative;
  flex: 0 0 auto;
}

.assistant-avatar::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  right: 0;
  bottom: 2px;
}

.chat-intro p {
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--ink-2);
}

.chat-intro .chat-disclaimer {
  margin-top: 8px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.msg {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
  animation: msg-in 0.34s var(--ease) both;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg.user {
  align-items: flex-end;
}

.msg.user .bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px 16px 4px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg.assistant {
  align-items: flex-start;
}

.msg.assistant .bubble {
  width: 100%;
  max-width: 94%;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 4px 18px 18px 18px;
  background: rgba(255, 252, 246, 0.7);
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

.msg.assistant .msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 7px;
}

.ai-lead {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
}

.ai-section {
  margin-top: 13px;
}

.ai-section h4 {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.13em;
  color: var(--accent);
  margin-bottom: 5px;
}

.ai-section p {
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-2);
}

.ai-section ol,
.ai-section ul {
  list-style: none;
  margin-top: 6px;
}

.ai-section ol li,
.ai-section ul li {
  position: relative;
  padding-left: 16px;
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

.ai-section ol {
  counter-reset: ai-step;
}

.ai-section ol li {
  counter-increment: ai-step;
}

.ai-section ol li::before {
  content: counter(ai-step);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--serif);
  font-size: 10px;
  color: var(--accent);
}

.ai-section ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong, #c9bfae);
}

.ai-script {
  margin-top: 12px;
  padding: 12px 13px;
  border-left: 2px solid var(--accent);
  background: rgba(177, 84, 61, 0.045);
  border-radius: 0 10px 10px 0;
}

.ai-script .scene {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}

.ai-script .say {
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink);
}

.ai-followup {
  margin-top: 13px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.ai-refs {
  margin-top: 10px;
  font-size: 9.5px;
  color: var(--muted-2);
  line-height: 1.7;
}

.ai-refs details summary {
  cursor: pointer;
  list-style: none;
  color: var(--muted);
}

.ai-refs details summary::-webkit-details-marker {
  display: none;
}

.ai-refs details summary::after {
  content: " +";
}

.ai-refs details[open] summary::after {
  content: " −";
}

.chat-quick {
  flex: 0 0 auto;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 4px 18px 9px;
  scrollbar-width: none;
  background: linear-gradient(180deg, rgba(246, 242, 234, 0), var(--paper) 35%);
}

.chat-quick::-webkit-scrollbar {
  display: none;
}

.quick-chip {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.55);
  color: var(--ink-3);
  font-size: 11px;
  white-space: nowrap;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.quick-chip:hover {
  border-color: var(--ink-3);
  background: var(--card-solid);
}

.chat-composer {
  flex: 0 0 auto;
  padding: 6px 14px calc(10px + var(--safe-b));
  background: var(--paper);
  border-top: 1px solid var(--line-soft);
}

.composer-inner {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 7px 7px 7px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 252, 246, 0.7);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.composer-inner:focus-within {
  border-color: var(--ink-3);
  background: var(--card-solid);
}

.composer-inner textarea {
  flex: 1;
  min-height: 26px;
  max-height: 120px;
  padding: 5px 0;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}

.composer-inner textarea::placeholder {
  color: var(--muted-2);
}

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--paper);
  flex: 0 0 auto;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.send-btn:disabled {
  opacity: 0.32;
}

.send-btn:active {
  transform: scale(0.94);
}

.send-btn svg {
  width: 16px;
  height: 16px;
}

.composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 5px 0;
  font-size: 9px;
  letter-spacing: 0.03em;
  color: var(--muted-2);
}

.composer-foot a {
  color: inherit;
  text-decoration: none;
}

.typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}

.typing span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing 1.2s ease-in-out infinite;
}

.typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

.chat-empty-hint {
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.8;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + var(--safe-b));
  transform: translate(-50%, 8px);
  z-index: 80;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(31, 29, 26, 0.94);
  color: var(--paper);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  white-space: nowrap;
}

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

/* ---------- responsive ---------- */

@media (min-width: 860px) {
  .home-screen {
    padding: 34px 40px 64px;
  }

  .home-grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 72px;
    align-items: start;
  }

  .home-hero {
    position: sticky;
    top: 46px;
    padding-top: clamp(60px, 12vh, 120px);
  }

  .home-hero h1 {
    font-size: 52px;
    line-height: 1.34;
  }

  .home-lede {
    font-size: 15.5px;
  }

  .home-modules {
    margin-top: clamp(56px, 12vh, 112px);
  }

  .module-card {
    padding: 24px 24px 20px;
  }

  .home-foot {
    grid-column: 2;
  }

  .kbd-hint {
    display: inline;
  }
}

@media (max-width: 400px) {
  .screen {
    padding-left: 18px;
    padding-right: 18px;
  }

  .home-screen {
    padding-left: 18px;
    padding-right: 18px;
  }

  .module-card {
    padding: 19px 18px 17px;
  }

  .module-card h2 {
    font-size: 22px;
  }

  .score-panel {
    grid-template-columns: 1fr;
    gap: 12px;
    text-align: center;
    padding: 18px;
  }

  .score-copy h3 {
    font-size: 19px;
  }

  .ring-wrap {
    width: 128px;
    height: 128px;
  }

  .ring-center b {
    font-size: 36px;
  }

  .trait-grid {
    grid-template-columns: 1fr;
  }

  .intro-meta div {
    padding: 0 9px;
  }

  .intro-meta b {
    font-size: 18px;
  }

  .quiz-body {
    padding-top: 32px;
  }

  .options {
    margin-top: 27px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
