:root {
  --bg: #1C1610;
  --bg-elevated: #2A2119;
  --box: #EFE4D2;
  --ink: #FBF6EE;
  --ink-soft: #E3D6C3;
  --ink-dim: rgba(251, 246, 238, 0.55);
  --ink-on-box: #2A2119;
  --accent: #D4A055;
  --accent-deep: #B9853C;
  --accent-soft: #E9C891;
  --error: #F0A08A;
  --line: rgba(227, 214, 195, 0.18);
  --font-display: 'Fraunces', Georgia, serif;
  --font-sans: 'Nunito Sans', -apple-system, system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); }
body {
  color: var(--ink); font-family: var(--font-sans); min-height: 100vh; overflow-x: hidden;
  background-image:
    radial-gradient(circle at 15% 10%, rgba(212, 160, 85, 0.10), transparent 55%),
    radial-gradient(circle at 85% 90%, rgba(233, 200, 145, 0.06), transparent 55%);
}
.wrap { max-width: 680px; margin: 0 auto; padding: 28px 22px 80px; }
header {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 20px;
}
header .brand { font-family: var(--font-display); font-style: italic; font-size: 22px; color: var(--ink-soft); line-height: 1.15; }
header .brand strong { color: var(--accent); font-style: normal; font-weight: 600; }
header .counter { font-weight: 700; font-size: 12px; color: var(--accent); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; flex-shrink: 0; }

.profile { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.profile .avatar { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); flex-shrink: 0; }
.profile .p-name { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.profile .p-handle { font-size: 13.5px; color: var(--ink-soft); margin-top: 2px; }

.progress { height: 3px; background: rgba(227, 214, 195, 0.15); border-radius: 3px; margin-bottom: 34px; position: relative; overflow: hidden; }
.progress::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%);
  background: linear-gradient(90deg, var(--accent-soft), var(--accent)); border-radius: 3px;
  transition: width 0.55s cubic-bezier(0.65, 0, 0.35, 1);
}

.chat { display: flex; flex-direction: column; gap: 22px; }
.bubble { max-width: 92%; animation: fadeUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.bubble.bot { align-self: stretch; max-width: 100%; min-width: 0; }
.bubble.user {
  align-self: flex-end; background: var(--accent); color: var(--bg);
  padding: 12px 20px; border-radius: 20px 20px 5px 20px; font-size: 15px; font-weight: 700;
  word-break: break-word; max-width: 85%;
}
.bot-label {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px; font-weight: 600;
}
.bot-label::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.bot-text { font-family: var(--font-display); font-size: 21px; line-height: 1.45; overflow-wrap: break-word; }
.bot-text em { font-style: italic; color: var(--accent); }
.bot-text strong { font-weight: 600; }
.bot-text p + p { margin-top: 10px; }
.bot-text .small { font-family: var(--font-sans); font-size: 15px; color: var(--ink-soft); font-style: italic; margin-top: 12px; line-height: 1.5; }
.bot-text ul { margin: 10px 0 0 20px; }
.bot-text li { font-family: var(--font-sans); font-size: 16px; line-height: 1.5; color: var(--ink-soft); margin-bottom: 6px; }

.typing { display: flex; gap: 6px; padding: 8px 0; }
.typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: 0.4; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.options { display: flex; gap: 10px; margin-top: 18px; animation: fadeUp 0.5s 0.15s both; }
.opt {
  flex: 1; min-width: 0; background: var(--box); border: 1.5px solid transparent; color: var(--ink-on-box);
  padding: 16px 22px; border-radius: 14px; font-family: var(--font-sans); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all 0.18s ease;
}
.opt:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 20px -8px rgba(212, 160, 85, 0.45); }
.options.full .opt { background: var(--accent); color: var(--bg); font-size: 16px; padding: 18px; }
.options.full .opt:hover { background: var(--accent-deep); }

.options.stack { flex-direction: column; }
.opt-card {
  background: var(--bg-elevated); border: 1.5px solid var(--line); border-radius: 16px; padding: 18px 20px;
  cursor: pointer; transition: all 0.18s ease;
}
.opt-card:hover, .opt-card:focus { border-color: var(--accent); transform: translateY(-2px); outline: none; }
.opt-card.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.opt-card.primary:hover { background: var(--accent-deep); }
.opt-card.ghost { background: transparent; }
.oc-title { font-weight: 800; font-size: 16px; }
.oc-sub { font-size: 14px; line-height: 1.5; margin-top: 6px; opacity: 0.85; }

.form-block { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; animation: fadeUp 0.5s 0.15s both; }
.form-field label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; font-weight: 600; }
.form-field input {
  width: 100%; background: var(--bg-elevated); border: 1.5px solid var(--line); color: var(--ink);
  padding: 16px 18px; border-radius: 14px; font-size: 16px; font-family: var(--font-sans); outline: none;
}
.form-field input:focus { border-color: var(--accent); }
.form-field input.error { border-color: var(--error); }
.form-error { color: var(--error); font-size: 13px; margin-top: 6px; min-height: 1em; }
.form-submit {
  background: var(--accent); color: var(--bg); border: none; padding: 17px; border-radius: 14px;
  font-size: 16px; font-weight: 800; font-family: var(--font-sans); cursor: pointer;
}
.form-submit:hover { background: var(--accent-deep); }
.form-disclaimer { font-size: 12px; color: var(--ink-dim); line-height: 1.5; }

.result { background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 22px; padding: 28px 24px; }
.result .eyebrow { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.result h1 { font-family: var(--font-display); font-size: 64px; font-weight: 600; color: var(--accent); margin-top: 10px; line-height: 1; }
.result h1.title { font-size: 34px; line-height: 1.15; }
.result .h1-sub { color: var(--ink-soft); font-size: 15px; margin-top: 10px; line-height: 1.5; }
.result .interp { font-family: var(--font-display); font-size: 18px; line-height: 1.55; margin-top: 20px; }
.category-card { background: var(--box); color: var(--ink-on-box); border-radius: 16px; padding: 20px; margin-top: 22px; }
.category-card .label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 800; opacity: 0.7; }
.category-card .cat-name { font-family: var(--font-display); font-size: 24px; font-weight: 600; margin-top: 6px; }
.category-card .cat-desc { font-size: 15px; line-height: 1.6; margin-top: 10px; }
.breakdown { margin-top: 24px; }
.breakdown h3 { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 14px; }
.bd-row { display: grid; grid-template-columns: 1fr 90px 40px; gap: 12px; align-items: center; margin-bottom: 10px; font-size: 14px; color: var(--ink-soft); }
.bd-row.top { color: var(--accent); font-weight: 800; }
.bd-bar { height: 6px; background: rgba(227, 214, 195, 0.15); border-radius: 6px; overflow: hidden; }
.bd-bar-fill { height: 100%; background: var(--accent); border-radius: 6px; }
.bd-count { text-align: right; font-variant-numeric: tabular-nums; }

.buy-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px;
  background: var(--accent); color: var(--bg); text-decoration: none; padding: 17px; border-radius: 14px;
  font-weight: 800; font-size: 16px;
}
.buy-btn svg { width: 20px; height: 20px; }
.buy-btn:hover { background: var(--accent-deep); }
