/* ===== THEME TOKENS ===== */
:root {
  --bg: #F2F5F0;
  --surface: #FFFFFF;
  --surface-2: #E7EDE3;
  --surface-inset: #EDF1E9;
  --line: #D8E0D2;
  --ink: #16211D;
  --ink-dim: #4E5C52;
  --ink-faint: #82907E;
  --brand: #14313B;
  --brand-2: #0B2027;
  --accent: #0F9D74;
  --accent-2: #0B7A5B;
  --accent-rgb: 15, 157, 116;
  --accent-tint: #DFF3EA;
  --accent-tint-strong: #BEE7D5;
  --coral: #F2603C;
  --coral-deep: #CB4A2B;
  --coral-tint: #FCE3DA;
  --sun: #F0B429;
  --sun-tint: #FBEBC4;
  --good: #0B7A5B;
  --warn: #B4632A;
  --shadow: 0 1px 2px rgba(16,32,28,.07), 0 10px 28px rgba(16,32,28,.07);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D1512;
    --surface: #131F1B;
    --surface-2: #1B2A24;
    --surface-inset: #17231F;
    --line: #2A3A33;
    --ink: #EDF3EF;
    --ink-dim: #A9BAB2;
    --ink-faint: #71847B;
    --brand: #BFE1E8;
    --brand-2: #8FC0CA;
    --accent: #2FCB9C;
    --accent-2: #22B98C;
    --accent-rgb: 47, 203, 156;
    --accent-tint: #123328;
    --accent-tint-strong: #164231;
    --coral: #FF7A54;
    --coral-deep: #F2603C;
    --coral-tint: #3A2018;
    --sun: #F6C84C;
    --sun-tint: #3A2E12;
    --good: #2FCB9C;
    --warn: #E08A4E;
    --shadow: 0 1px 2px rgba(0,0,0,.45), 0 14px 34px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --bg: #0D1512;
  --surface: #131F1B;
  --surface-2: #1B2A24;
  --surface-inset: #17231F;
  --line: #2A3A33;
  --ink: #EDF3EF;
  --ink-dim: #A9BAB2;
  --ink-faint: #71847B;
  --brand: #BFE1E8;
  --brand-2: #8FC0CA;
  --accent: #2FCB9C;
  --accent-2: #22B98C;
  --accent-rgb: 47, 203, 156;
  --accent-tint: #123328;
  --accent-tint-strong: #164231;
  --coral: #FF7A54;
  --coral-deep: #F2603C;
  --coral-tint: #3A2018;
  --sun: #F6C84C;
  --sun-tint: #3A2E12;
  --good: #2FCB9C;
  --warn: #E08A4E;
  --shadow: 0 1px 2px rgba(0,0,0,.45), 0 14px 34px rgba(0,0,0,.5);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  /* Vân giấy nhẹ: noise SVG grayscale, alpha rất thấp, blend soft-light để không
     ám màu nền — tránh cảm giác nền phẳng/bóng mượt kiểu SaaS-do-AI-dựng. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0.33 0.33 0.33 0 0 0.33 0.33 0.33 0 0 0.33 0.33 0.33 0 0 0 0 0 0 0.05'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-blend-mode: soft-light;
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  transition: background-color .2s ease, color .2s ease;
}
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select {
  font: inherit;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  width: 100%;
  outline: none;
  background: var(--surface);
  color: var(--ink);
  transition: border-color .2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.14); }
textarea { resize: vertical; min-height: 88px; }
label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-dim); margin-bottom: 6px; }
label input, label textarea, label select { margin-top: 4px; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== TOPBAR ===== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 600; color: var(--ink); text-decoration: none;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--brand);
  color: var(--surface); font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-btn {
  padding: 7px 16px; border-radius: 8px;
  font-size: 14px; font-weight: 600;
  transition: all .15s;
  color: var(--ink-dim);
}
.topbar-btn:hover { background: var(--accent-tint); color: var(--accent-2); }
.topbar-btn.primary-outline {
  border: 1.5px solid var(--accent); color: var(--accent-2);
}
.topbar-btn.primary-outline:hover { background: var(--accent); color: var(--surface); }
.topbar-btn.ghost { color: var(--ink-faint); font-size: 13px; }
.topbar-btn.ghost:hover { color: var(--coral); background: transparent; }
.topbar-btn.icon-btn { padding: 7px 10px; font-size: 15px; line-height: 1; }
.topbar-btn.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

/* ===== PROGRESS BAR ===== */
.progress-bar-wrap {
  height: 3px; background: var(--line); position: sticky; top: 56px; z-index: 99;
}
.progress-bar-inner {
  height: 100%; background: var(--accent);
  transition: width .4s ease; border-radius: 0 2px 2px 0;
}

/* ===== MAIN ===== */
#app { min-height: calc(100vh - 56px); }

/* ===== SCREEN BASE ===== */
.screen {
  max-width: 480px; margin: 0 auto;
  padding: 28px 20px 60px;
  animation: fadeIn .25s ease;
}
.screen.wide { max-width: 860px; }
.screen.full-bleed { max-width: none; padding: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===== STEP HEADER ===== */
.step-label {
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px;
}
.step-title {
  font-size: 22px; font-weight: 800; color: var(--ink);
  line-height: 1.3; margin-bottom: 8px;
}
.step-title em { color: var(--accent-2); font-style: normal; }
.step-sub {
  font-size: 15px; color: var(--ink-dim); line-height: 1.6; margin-bottom: 24px;
}

/* ===== HERO ===== */
.hero { padding-top: 40px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-tint); color: var(--accent-2);
  font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  padding: 5px 12px; border-radius: 20px; margin-bottom: 20px;
}
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.8)} }
.hero h1 { font-size: clamp(26px,5vw,36px); font-weight: 900; line-height: 1.2; margin-bottom: 14px; }
.hero h1 em { color: var(--accent-2); font-style: normal; }
.hero .lead { font-size: 16px; color: var(--ink-dim); margin-bottom: 28px; line-height: 1.7; }
.hero-actions { display: flex; flex-direction: column; gap: 10px; }
.link-button {
  display: inline-block; margin-top: 12px; padding: 0;
  background: transparent; border: 0; cursor: pointer;
  color: var(--accent-2); font-size: 13px; font-weight: 700;
}
.link-button:hover { text-decoration: underline; }

/* ===== INTRO OVERLAY ===== */
.intro-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 20px;
  background: rgba(13,21,18,.6);
}
.intro-card {
  max-width: 440px; width: 100%; max-height: calc(100vh - 40px); overflow-y: auto;
  padding: 26px; background: var(--surface); border-radius: 20px;
  box-shadow: 0 20px 60px rgba(13,21,18,.35);
}
.intro-card .eyebrow {
  display: inline-block; background: var(--accent-tint); color: var(--accent-2);
  font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 20px;
}
.intro-card h2 { font-size: 22px; font-weight: 800; margin: 12px 0 18px; color: var(--ink); }
.intro-steps { display: grid; gap: 14px; margin: 0 0 22px; padding: 0 0 0 22px; }
.intro-steps li { color: var(--ink); line-height: 1.5; font-size: 14px; }
.intro-card .btn.primary { width: 100%; }

/* ===== DEMO CARD ===== */
.demo-card {
  background: var(--surface); border-radius: 16px; padding: 18px;
  border: 1px solid var(--line); margin-top: 28px;
  box-shadow: var(--shadow);
}
.demo-card-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.demo-card-top span { font-size: 12px; color: var(--ink-faint); font-weight: 600; }
.live-badge {
  display: flex; align-items: center; gap: 5px;
  background: var(--accent-tint); color: var(--good);
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 12px;
}
.live-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); animation: pulse 2s infinite; }
.demo-name { font-size: 16px; font-weight: 700; margin-bottom: 12px; color: var(--ink); }
.demo-bars { display: flex; flex-direction: column; gap: 8px; }
.demo-bar-row { display: flex; align-items: center; gap: 10px; }
.demo-bar-row span { font-size: 13px; color: var(--ink-dim); min-width: 70px; }
.demo-bar-track { flex: 1; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.demo-bar-fill { height: 100%; border-radius: 4px; transition: width 1s ease; }
.demo-card-footer { margin-top: 14px; font-size: 12px; color: var(--ink-faint); font-style: italic; }

/* ===== ROLE SELECT ===== */
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.role-card {
  background: var(--surface); border: 2px solid var(--line); border-radius: 14px;
  padding: 20px 14px; text-align: center; cursor: pointer;
  transition: all .2s;
}
.role-card:hover { border-color: var(--accent-tint-strong); box-shadow: var(--shadow); }
.role-card.selected { border-color: var(--accent); background: var(--accent-tint); }
.role-card .role-icon { font-size: 32px; margin-bottom: 8px; }
.role-card h3 { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.role-card p { font-size: 12px; color: var(--ink-faint); line-height: 1.4; }

/* ===== GRADE CHIPS ===== */
.grade-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.grade-chip {
  background: var(--surface); border: 2px solid var(--line); border-radius: 10px;
  padding: 8px 16px; font-size: 14px; font-weight: 600; color: var(--ink-dim);
  cursor: pointer; transition: all .2s;
}
.grade-chip:hover { border-color: var(--accent-tint-strong); }
.grade-chip.selected { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-2); }

/* ===== CHOICE CARDS ===== */
.choice-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.choice-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 14px;
  padding: 14px 16px; cursor: pointer; transition: all .2s; text-align: left;
}
.choice-card:hover { border-color: var(--accent-tint-strong); box-shadow: var(--shadow); }
.choice-card.selected { border-color: var(--accent); background: var(--accent-tint); }
.choice-card .c-icon { font-size: 22px; flex-shrink: 0; width: 38px; text-align: center; }
.choice-card .c-text h3 { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.choice-card .c-text p { font-size: 12px; color: var(--ink-faint); line-height: 1.4; }
.choice-card .c-check {
  margin-left: auto; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: transparent;
  transition: all .2s;
}
.choice-card.selected .c-check { background: var(--accent); border-color: var(--accent); color: var(--surface); }

/* single select variant */
.choice-card.single.selected { border-color: var(--accent); background: var(--accent-tint); }

/* ===== VALUE PILLS ===== */
.value-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.value-pill {
  background: var(--surface); border: 2px solid var(--line); border-radius: 20px;
  padding: 8px 16px; font-size: 14px; font-weight: 600; color: var(--ink-dim);
  cursor: pointer; transition: all .2s;
}
.value-pill:hover { border-color: var(--accent-tint-strong); }
.value-pill.selected { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-2); }

/* ===== TEXT AREA INPUT ===== */
.open-input-wrap { margin-bottom: 20px; }
.open-input-wrap .char-count { font-size: 12px; color: var(--ink-faint); text-align: right; margin-top: 4px; }

/* ===== SELECTION COUNTER ===== */
.sel-count { font-size: 13px; color: var(--ink-faint); margin-bottom: 16px; }
.sel-count strong { color: var(--accent-2); }

/* ===== NAV BUTTONS ===== */
.nav-row { display: flex; gap: 10px; align-items: center; }
.nav-row .back-btn {
  padding: 12px 18px; border-radius: 12px; font-size: 15px; font-weight: 600;
  color: var(--ink-faint); background: var(--surface); border: 1.5px solid var(--line);
  transition: all .15s; flex-shrink: 0;
}
.nav-row .back-btn:hover { border-color: var(--accent-tint-strong); color: var(--accent-2); }

/* ===== BUTTONS ===== */
.btn {
  display: block; width: 100%;
  padding: 14px 20px; border-radius: 12px;
  font-size: 16px; font-weight: 700; text-align: center;
  transition: all .15s; cursor: pointer;
}
.btn.primary {
  background: var(--accent);
  color: #fff; border: none;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb),.28);
}
.btn.primary:hover { background: var(--accent-2); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(var(--accent-rgb),.34); }
.btn.primary:active { transform: none; }
.btn.primary:disabled { background: var(--accent-tint-strong); color: var(--ink-faint); box-shadow: none; transform: none; cursor: not-allowed; }
.btn.secondary {
  background: var(--surface); color: var(--accent-2);
  border: 1.5px solid var(--accent);
}
.btn.secondary:hover { background: var(--accent-tint); }
.btn.ghost-btn { background: transparent; color: var(--ink-faint); font-size: 14px; padding: 10px; }
.btn.ghost-btn:hover { color: var(--accent-2); }

/* ===== PROCESSING SCREEN ===== */
.processing-screen { text-align: center; padding-top: 60px; }
.ai-spinner {
  width: 64px; height: 64px; border-radius: 50%;
  border: 4px solid var(--accent-tint);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
  margin: 0 auto 24px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.processing-screen h2 { font-size: 20px; font-weight: 700; margin-bottom: 10px; color: var(--ink); }
.processing-screen p { color: var(--ink-faint); font-size: 15px; }
.ai-steps { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.ai-step {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border-radius: 10px; padding: 12px 14px;
  border: 1px solid var(--line); font-size: 14px; color: var(--ink-faint);
  transition: all .3s;
}
.ai-step.done { color: var(--ink); border-color: var(--accent-tint-strong); }
.ai-step .step-dot {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-tint);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.ai-step.done .step-dot { background: var(--accent-tint-strong); color: var(--good); }

/* ===== RESULT SCREEN ===== */
.demo-notice {
  background: var(--sun-tint); color: var(--warn); border-bottom: 1px solid var(--sun);
  font-size: 13px; padding: 10px 20px; text-align: center;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center;
}
.demo-exit-btn {
  background: var(--warn); color: #fff; border: none; border-radius: 20px;
  font-size: 12px; font-weight: 700; padding: 5px 14px; cursor: pointer;
}
.demo-exit-btn:hover { background: var(--coral-deep); }
.result-header { text-align: center; padding: 28px 20px 0; }
.result-header .result-eyebrow {
  display: inline-block;
  background: var(--accent-tint); color: var(--good);
  font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 20px; margin-bottom: 14px;
}
.result-header h1 { font-size: 22px; font-weight: 800; margin-bottom: 8px; color: var(--ink); }
.result-header h1 em { color: var(--accent-2); font-style: normal; }
.result-header p { font-size: 14px; color: var(--ink-faint); max-width: 400px; margin: 0 auto 12px; }
/* ─── ACTION PANEL ─────────────────────────────────────────────── */
.action-panel {
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.action-panel-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-2);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.action-panel-toggle::-webkit-details-marker { display: none; }
.action-panel-toggle::after {
  content: '▸';
  margin-left: auto;
  font-size: 11px;
  transition: transform 0.2s;
}
.action-panel[open] .action-panel-toggle::after { transform: rotate(90deg); }
.action-panel-body {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.action-section { display: flex; flex-direction: column; gap: 6px; }
.action-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}
.action-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.action-list li {
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.5;
}
.action-resources {
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.5;
  margin: 0;
}
.action-reflect { background: var(--sun-tint); border-radius: 8px; padding: 10px 12px; }
.action-reflect-q {
  font-size: 13px;
  color: var(--warn);
  font-style: italic;
  line-height: 1.6;
  margin: 0;
}

/* ─── PERSONALITY SCREEN ────────────────────────────────────────────────── */
.personality-block {
  margin-bottom: 20px;
}
.personality-q {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.5;
}
.personality-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pers-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
  font-size: 13px;
  color: var(--ink-dim);
}
.pers-btn:hover { border-color: var(--sun); background: var(--sun-tint); }
.pers-btn.selected { border-color: var(--warn); background: var(--sun-tint); }
.pers-icon { font-size: 20px; flex-shrink: 0; }
.pers-content { display: flex; flex-direction: column; gap: 2px; }
.pers-content strong { font-size: 13px; color: var(--ink); }
.pers-note { font-size: 11px; color: var(--ink-faint); }
/* Personality profile line in results */
.personality-profile-line {
  font-size: 13px;
  color: var(--ink-dim);
  margin: 8px auto 4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 420px;
}
.pers-profile-tag {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 12px;
  color: var(--ink-dim);
  font-weight: 500;
}
/* Personality fit warnings in career cards */
.personality-fit-notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.personality-fit-note {
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.45;
}
.personality-fit-note.warn {
  background: var(--sun-tint);
  border: 1px solid var(--sun);
  color: var(--warn);
}
.personality-fit-note.tip {
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint-strong);
  color: var(--good);
}

.reflection-signal {
  border-radius: 8px; padding: 8px 12px; font-size: 13px; line-height: 1.45; margin-top: 10px;
}
.reflection-signal.good { background: var(--accent-tint); border: 1px solid var(--accent-tint-strong); color: var(--good); font-weight: 600; }
.reflection-signal.warn { background: var(--coral-tint); border: 1px solid var(--coral); color: var(--coral-deep); }
.reflection-signal.neutral { background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-dim); }

/* ─── REFLECTION FORM (inside action panel) ─────────────────────────────── */
.ref-badge {
  display: inline-flex;
  align-items: center;
  background: var(--sun-tint);
  color: var(--warn);
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
  padding: 1px 7px;
  margin-left: 6px;
}
.reflection-form-section {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ref-action-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink-dim);
  background: var(--surface);
  cursor: pointer;
}
.star-rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ref-label-inline {
  font-size: 13px;
  color: var(--ink-faint);
  white-space: nowrap;
}
.star-rating-wrap {
  display: flex;
  gap: 3px;
  align-items: center;
}
.star-btn {
  font-size: 22px;
  color: var(--line);
  cursor: pointer;
  line-height: 1;
  transition: color 0.1s, transform 0.1s;
  user-select: none;
}
.star-btn:hover { color: var(--sun); transform: scale(1.15); }
.star-btn.active { color: var(--sun); }
.ref-note-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink-dim);
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
  background: var(--surface);
}
.ref-note-input:focus { outline: none; border-color: var(--sun); box-shadow: 0 0 0 2px rgba(240,180,41,.18); }
.ref-custom-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--sun);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink-dim);
  font-family: inherit;
  box-sizing: border-box;
  background: var(--sun-tint);
}
.ref-custom-input:focus { outline: none; border-color: var(--warn); box-shadow: 0 0 0 2px rgba(180,99,42,.18); }
.btn-sm {
  padding: 7px 14px !important;
  font-size: 13px !important;
  width: auto !important;
  align-self: flex-start;
}
.ref-save-btn { align-self: flex-start; }

/* ─── REFLECTION CARDS in Journey ──────────────────────────────────────── */
.reflection-item .timeline-dot.ref-dot {
  font-size: 14px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sun-tint);
  border-radius: 50%;
}
.reflection-card {
  background: var(--sun-tint);
  border: 1px solid var(--sun);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}
.ref-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ref-card-date {
  font-size: 12px;
  color: var(--ink-faint);
}
.ref-card-cluster {
  font-size: 12px;
  font-weight: 600;
  color: var(--warn);
  background: var(--sun-tint);
  border-radius: 8px;
  padding: 1px 8px;
}
.ref-card-action {
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.4;
}
.ref-card-stars {
  font-size: 16px;
  color: var(--sun);
  letter-spacing: 1px;
}
.ref-card-note {
  font-size: 13px;
  color: var(--warn);
  font-style: italic;
  line-height: 1.5;
}

.custom-text-quote {
  font-size: 13px;
  color: var(--ink-dim);
  font-style: italic;
  line-height: 1.5;
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 8px;
  text-align: left;
}
.result-header .custom-text-quote {
  margin: 8px auto 12px;
  max-width: 420px;
}

.result-disclaimer {
  font-size: 13px !important;
  color: var(--ink-dim) !important;
  background: var(--sun-tint);
  border: 1px solid var(--sun);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 8px auto 20px !important;
  max-width: 420px;
  text-align: left;
}

.result-orientation {
  font-size: 13px !important;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 4px auto 12px !important;
  max-width: 420px;
  text-align: left;
  color: var(--ink-dim) !important;
}
.result-orientation.owner  { background: var(--accent-tint); border: 1px solid var(--accent-tint-strong); }
.result-orientation.investor { background: var(--surface-2); border: 1px solid var(--line); }
.result-orientation.expert { background: var(--coral-tint); border: 1px solid var(--coral); }

.career-cards { display: flex; flex-direction: column; gap: 14px; padding: 0 20px; max-width: 520px; margin: 0 auto; }
.career-card {
  background: var(--surface); border-radius: 16px; overflow: hidden;
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow);
  transition: all .2s;
}
.career-card:hover { transform: translateY(-2px); }
.career-card.rank-1 { border-color: var(--accent-tint-strong); }
.career-card-head {
  padding: 16px 18px 12px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.career-rank {
  font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 8px; flex-shrink: 0;
}
.rank-1 .career-rank { background: var(--sun-tint); color: var(--warn); }
.rank-2 .career-rank { background: var(--accent-tint); color: var(--accent-2); }
.rank-3 .career-rank { background: var(--surface-2); color: var(--ink-faint); }
.career-card-icon { font-size: 28px; }
.career-title { font-size: 17px; font-weight: 800; color: var(--ink); margin-bottom: 3px; }
.career-examples { font-size: 13px; color: var(--ink-faint); }
.career-card-body { padding: 0 18px 14px; }
.career-why {
  background: var(--surface-2); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px;
}
.career-why .why-label { font-size: 11px; font-weight: 700; color: var(--ink-faint); letter-spacing: .8px; text-transform: uppercase; margin-bottom: 5px; }
.career-why p { font-size: 13px; color: var(--ink-dim); line-height: 1.5; }
.career-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.career-tag {
  background: var(--accent-tint); color: var(--accent-2);
  font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 8px;
}
.result-actions { padding: 20px 20px 40px; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }

/* ===== UNIVERSITY RECOMMENDATIONS ===== */
.uni-screen { padding: 28px 20px 60px; max-width: 520px; margin: 0 auto; }
.career-filter-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 20px; -webkit-mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%); }
.filter-tab {
  flex-shrink: 0; padding: 7px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 600; color: var(--ink-faint);
  background: var(--surface); border: 1.5px solid var(--line);
  cursor: pointer; transition: all .2s;
}
.filter-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.loc-filter-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; -webkit-mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%); }
.loc-tab {
  flex-shrink: 0; padding: 5px 13px; border-radius: 16px;
  font-size: 12px; font-weight: 600; color: var(--ink-faint);
  background: var(--surface-2); border: 1.5px solid var(--line);
  cursor: pointer; transition: all .2s;
}
.loc-tab.active { background: var(--accent-tint); color: var(--accent-2); border-color: var(--accent-tint-strong); }

.uni-card {
  background: var(--surface); border-radius: 14px; overflow: hidden;
  border: 1.5px solid var(--line); margin-bottom: 12px;
}
.uni-card-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.uni-name { font-size: 12px; color: var(--ink-faint); font-weight: 600; margin-bottom: 3px; }
.prog-name { font-size: 16px; font-weight: 800; color: var(--ink); }
.uni-card-body { padding: 10px 16px 14px; }
.uni-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.uni-meta-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--ink-dim);
  background: var(--surface-2); border-radius: 8px; padding: 4px 10px;
}
.uni-note { font-size: 13px; color: var(--ink-dim); line-height: 1.5; margin-bottom: 10px; }
.uni-diem-badge {
  font-size: 12px; color: var(--accent-2); background: var(--accent-tint);
  border-radius: 8px; padding: 6px 10px; margin-bottom: 10px; line-height: 1.5;
}
.uni-diem-badge a { color: inherit; text-decoration: underline; }
.uni-diem-badge.warn { color: var(--warn); background: var(--sun-tint); }
.uni-diem-badge.muted { color: var(--ink-faint); background: var(--surface-2); font-weight: 600; }
.cd-option-row { padding: 8px 0; border-top: 1px solid var(--line); }
.cd-option-row:first-of-type { border-top: none; }
.cd-option-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.cd-panel-warn { border: 1.5px solid var(--warn); background: var(--sun-tint); }
.fit-banner { display: block; }
.fit-banner.muted { background: var(--surface-2); border-color: var(--line); color: var(--ink-dim); }
.fit-banner .link-button { display: block; margin-top: 6px; }
.uni-fit-badge {
  font-size: 12px; border-radius: 8px; padding: 6px 10px; margin-bottom: 10px; line-height: 1.5; font-weight: 600;
}
.uni-fit-badge.good { color: var(--good); background: var(--accent-tint); }
.uni-fit-badge.bad { color: var(--coral-deep); background: var(--coral-tint); }
.uni-fit-badge.unknown { color: var(--ink-faint); background: var(--surface-2); font-weight: 400; }
.opportunity-card { border-top: 1.5px solid var(--line); padding-top: 14px; margin-top: 14px; }
.opportunity-card:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.opportunity-head { font-size: 14px; margin-bottom: 8px; }
.opportunity-program-row { margin-bottom: 6px; }
.opportunity-program-row .uni-fit-badge { margin-bottom: 4px; }
.pref-fit-tag { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.pref-fit-tag.good { color: var(--good); background: var(--accent-tint); }
.pref-fit-tag.bad { color: var(--coral-deep); background: var(--coral-tint); }
.uni-card-foot { padding: 0 16px 12px; display: flex; align-items: center; justify-content: space-between; }
.pref-rank-badge {
  font-size: 12px; font-weight: 700; color: var(--accent-2);
  background: var(--accent-tint); padding: 4px 8px 4px 10px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 6px;
}
.pref-remove-btn {
  background: none; border: none; cursor: pointer;
  color: var(--ink-faint); font-size: 11px; padding: 0; line-height: 1;
  font-weight: 700; transition: color 0.15s;
}
.pref-remove-btn:hover { color: var(--coral-deep); }
.pref-list-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.pref-list-row:last-child { border-bottom: none; }
.uni-source-link { font-size: 13px; color: var(--accent-2); font-weight: 600; }

.add-pref-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: 1.5px dashed var(--accent-tint-strong);
  color: var(--ink-faint); border-radius: 12px; padding: 12px 16px;
  font-size: 14px; font-weight: 600; cursor: pointer; width: 100%;
  margin-top: 4px; transition: all .2s;
}
.add-pref-btn:hover { border-color: var(--accent); color: var(--accent-2); background: var(--accent-tint); }

.warning-box {
  background: var(--sun-tint); border: 1.5px solid var(--sun);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 16px;
  font-size: 13px; color: var(--warn); line-height: 1.5;
}
.warning-box strong { display: block; margin-bottom: 3px; }

/* ===== SAVE / AUTH SCREEN ===== */
.auth-card {
  background: var(--surface); border-radius: 16px; padding: 24px 20px;
  border: 1.5px solid var(--line); box-shadow: var(--shadow);
}
.auth-tabs { display: flex; gap: 4px; background: var(--surface-2); border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.auth-tab {
  flex: 1; padding: 8px; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--ink-faint);
  cursor: pointer; transition: all .2s; text-align: center;
}
.auth-tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.auth-role-row { display: flex; gap: 8px; margin-bottom: 16px; }
.auth-role-btn {
  flex: 1; padding: 10px; border-radius: 10px;
  border: 1.5px solid var(--line); font-size: 14px; font-weight: 600;
  color: var(--ink-faint); background: var(--surface); cursor: pointer; transition: all .2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.auth-role-btn.selected { border-color: var(--accent); color: var(--accent-2); background: var(--accent-tint); }
.form-group { margin-bottom: 14px; }
.link-btn { background: none; color: var(--accent-2); font-size: 13px; cursor: pointer; }
.divider { text-align: center; color: var(--ink-faint); font-size: 13px; margin: 12px 0; }
.result-preview-strip {
  background: var(--accent-tint);
  border-radius: 14px; padding: 16px 18px; margin-bottom: 20px;
  border: 1.5px solid var(--accent-tint-strong);
}
.result-preview-strip .rp-label { font-size: 11px; font-weight: 700; color: var(--accent-2); letter-spacing: .8px; text-transform: uppercase; margin-bottom: 8px; }
.result-preview-strip .rp-item { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.result-preview-strip .rp-note { font-size: 12px; color: var(--ink-faint); }

/* ===== DASHBOARD (post-login) ===== */
.dashboard-wrap { max-width: 860px; margin: 0 auto; padding: 24px 20px 60px; }
.dashboard-top {
  display: grid; grid-template-columns: 1fr auto; gap: 16px;
  align-items: start; margin-bottom: 24px;
}
.dashboard-top h1 { font-size: 22px; font-weight: 800; margin-bottom: 4px; color: var(--ink); }
.dashboard-top p { font-size: 14px; color: var(--ink-faint); }
.dashboard-nav {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 20px;
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%);
}
.dash-nav-btn {
  flex-shrink: 0; padding: 8px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 600; color: var(--ink-faint);
  background: var(--surface); border: 1.5px solid var(--line);
  cursor: pointer; transition: all .2s;
}
.dash-nav-btn.active, .dash-nav-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .dashboard-grid { grid-template-columns: 1fr; } }
.panel {
  background: var(--surface); border-radius: 16px; padding: 18px 18px;
  border: 1.5px solid var(--line); box-shadow: var(--shadow);
}
.panel.full { grid-column: 1 / -1; }
.panel-kicker { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.panel h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }

/* signal bars */
.signal-rows { display: flex; flex-direction: column; gap: 10px; }
.signal-row { display: flex; align-items: center; gap: 10px; }
.signal-row .s-label { font-size: 13px; font-weight: 600; min-width: 72px; color: var(--ink-dim); }
.signal-row .s-track { flex: 1; height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.signal-row .s-fill { height: 100%; border-radius: 5px; transition: width 1s ease; }
.signal-row .s-level { font-size: 12px; color: var(--ink-faint); min-width: 72px; text-align: right; }
.microcopy { font-size: 12px; color: var(--ink-faint); margin-top: 10px; line-height: 1.5; }

/* ===== PARENT VIEW ===== */
.parent-screen { max-width: 520px; margin: 0 auto; padding: 28px 20px 60px; }
.parent-intro-card {
  background: var(--accent-tint);
  border-radius: 16px; padding: 20px 18px; margin-bottom: 20px;
  border: 1.5px solid var(--accent-tint-strong);
}
.parent-intro-card h2 { font-size: 18px; font-weight: 800; margin-bottom: 6px; color: var(--ink); }
.parent-intro-card p { font-size: 14px; color: var(--ink-dim); line-height: 1.6; }
.tips-list { display: flex; flex-direction: column; gap: 10px; }
.tip-item {
  background: var(--surface); border-radius: 12px; padding: 14px 16px;
  border: 1.5px solid var(--line); display: flex; gap: 12px; align-items: flex-start;
}
.tip-item .tip-icon { font-size: 20px; flex-shrink: 0; }
.tip-item h4 { font-size: 14px; font-weight: 700; margin-bottom: 3px; color: var(--ink); }
.tip-item p { font-size: 13px; color: var(--ink-dim); line-height: 1.5; }

/* ===== EXPLORE ===== */
.explore-screen { max-width: 860px; margin: 0 auto; padding: 28px 20px 60px; }
.explore-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 28px; }
@media (max-width: 600px) { .explore-grid { grid-template-columns: 1fr; } }
.explore-card {
  background: var(--surface); border-radius: 16px; padding: 20px 18px;
  border: 1.5px solid var(--line); cursor: pointer; transition: all .2s;
}
.explore-card:hover { border-color: var(--accent-tint-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.explore-card .e-icon { font-size: 28px; margin-bottom: 10px; }
.explore-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 5px; color: var(--ink); }
.explore-card p { font-size: 13px; color: var(--ink-faint); line-height: 1.5; }

/* ===== SCORE CALCULATOR ===== */
.calc-card { background: var(--surface); border-radius: 16px; padding: 20px 18px; border: 1.5px solid var(--line); margin-bottom: 16px; }
.calc-result-box {
  background: var(--surface-2);
  border-radius: 12px; padding: 12px 14px; margin-top: 14px;
  border: 1.5px solid var(--line);
}
/* combo rows */
.combo-row {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 12px; border-radius: 10px;
  margin-bottom: 6px; background: var(--surface);
  border: 1.5px solid var(--line);
}
.combo-row.highlight {
  background: var(--accent-tint); border-color: var(--accent-tint-strong);
}
.combo-head {
  display: flex; align-items: center; gap: 6px;
}
.combo-star { font-size: 14px; }
.combo-code {
  font-size: 13px; font-weight: 800; color: var(--accent-2);
  background: var(--accent-tint); padding: 2px 8px; border-radius: 6px; flex-shrink: 0;
}
.combo-label {
  font-size: 13px; font-weight: 600; color: var(--ink); flex: 1;
}
.combo-score {
  font-size: 22px; font-weight: 900; color: var(--accent-2); flex-shrink: 0;
}
.combo-row.highlight .combo-score { color: var(--good); }
.combo-source-tag { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; align-self: flex-start; }
.combo-source-tag.hsa { color: var(--accent-2); background: var(--accent-tint); }
.combo-source-tag.thpt { color: var(--ink-faint); background: var(--surface-2); }
.combo-note { font-size: 12px; color: var(--ink-faint); padding-left: 2px; }
.calc-fav-label { position: relative; }
.calc-fav-tag {
  font-size: 10px; font-weight: 700; color: var(--accent-2); background: var(--accent-tint);
  padding: 1px 6px; border-radius: 6px; margin-left: 6px; white-space: nowrap;
}
.calc-fav-tag.best { color: var(--warn); background: var(--sun-tint); }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--brand-2); color: #fff;
  padding: 12px 22px; border-radius: 12px;
  font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: all .3s; white-space: nowrap;
  z-index: 999; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== JOURNEY PROGRESS (dashboard) ===== */
.journey-steps {
  display: flex; gap: 0; margin-bottom: 20px;
  background: var(--surface-2); border-radius: 12px; overflow: hidden;
  border: 1.5px solid var(--line);
}
.journey-step {
  flex: 1; padding: 10px 8px; text-align: center;
  font-size: 12px; font-weight: 600; color: var(--ink-faint);
  border-right: 1px solid var(--line); position: relative;
}
.journey-step:last-child { border-right: none; }
.journey-step.done { color: var(--good); background: var(--accent-tint); }
.journey-step.current { color: var(--accent-2); background: var(--accent-tint); }
.journey-step .js-num { font-size: 10px; display: block; margin-bottom: 2px; }

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.muted { color: var(--ink-faint); }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.small { font-size: 13px; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 8px;
  background: var(--accent-tint); color: var(--accent-2);
}
.badge.green { background: var(--accent-tint); color: var(--good); }
.badge.yellow { background: var(--sun-tint); color: var(--warn); }

/* ===== ABILITY PANEL (results + calculator) ===== */
.ability-panel {
  max-width: 480px; margin: 0 auto 24px;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 16px; padding: 18px 20px;
}
.ability-panel--teaser {
  background: var(--accent-tint); border: 2px solid var(--accent); text-align: center;
  box-shadow: var(--shadow);
}
.ap-teaser-kicker {
  font-size: 12px; font-weight: 800; letter-spacing: .6px; color: var(--accent-2);
  margin-bottom: 6px;
}
.ability-panel--teaser .ap-head {
  text-transform: none; font-size: 17px; color: var(--ink); letter-spacing: normal;
}
.ap-head {
  font-size: 13px; font-weight: 800; letter-spacing: .8px;
  text-transform: uppercase; color: var(--accent-2); margin-bottom: 8px;
}
.ap-teaser-text {
  font-size: 14px; color: var(--ink-dim); line-height: 1.6; margin-bottom: 14px;
}
.ap-teaser-text em { color: var(--accent-2); font-style: normal; font-weight: 600; }
.ap-sub {
  font-size: 13px; color: var(--ink-faint); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.ap-update-btn {
  font-size: 12px; font-weight: 700; color: var(--accent-2);
  background: var(--accent-tint); padding: 3px 10px; border-radius: 10px;
  transition: background .15s;
}
.ap-update-btn:hover { background: var(--accent); color: #fff; }
.ap-rows { display: flex; flex-direction: column; gap: 12px; }
.ap-row {
  padding: 12px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.ap-cluster {
  font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 4px;
}
.ap-score-note {
  font-size: 12px; color: var(--ink-faint); margin-bottom: 6px;
}
.ap-cat-badge {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; margin-bottom: 5px;
}
.ap-cat-note {
  font-size: 13px; color: var(--ink-dim); line-height: 1.5;
}
.ap-no-data {
  font-size: 12px; color: var(--ink-faint); font-style: italic;
}

/* ===== CUSTOM FREE-TEXT INPUT ===== */
.custom-input-wrap {
  margin: 4px 0 8px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1.5px dashed var(--line);
  border-radius: 12px;
}
.custom-input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
  margin-bottom: 8px;
}
.custom-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color .15s;
}
.custom-input:focus { border-color: var(--accent); }
.custom-input::placeholder { color: var(--ink-faint); }
.custom-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 10px;
  background: var(--accent-tint);
  border: 1.5px solid var(--accent-tint-strong);
  border-radius: 20px;
  font-size: 13px;
  color: var(--good);
}
.custom-chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--ink-faint);
  padding: 0;
  line-height: 1;
}
.custom-chip-remove:hover { color: var(--coral-deep); }

/* ===== ABILITY FOLLOW-UP (q-subjects inline) ===== */
.ability-followup {
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 4px;
  animation: fadeIn .2s ease;
}
.ability-q {
  font-size: 14px; color: var(--ink); margin-bottom: 12px; line-height: 1.5;
}
.ability-q strong { color: var(--accent-2); }
.ability-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px;
}
.ability-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 20px; font-size: 14px; font-weight: 600;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-dim);
  transition: all .15s;
}
.ability-chip:hover { border-color: var(--accent); color: var(--accent-2); }
.ability-chip.selected {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.ability-hint {
  font-size: 12px; color: var(--ink-faint); margin: 0;
}
.ability-hint.selected-hint { color: var(--good); }

/* ===== JOURNEY / TIMELINE ===== */
.journey-return-cta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.journey-streak {
  font-size: 13px; font-weight: 700; color: var(--warn);
  background: var(--sun-tint); padding: 5px 12px; border-radius: 20px;
}
.timeline-wrap { display: flex; flex-direction: column; gap: 0; }
.timeline-elapsed {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0 8px 32px;
}
.timeline-elapsed span {
  font-size: 12px; font-weight: 700; color: var(--ink-faint);
  background: var(--accent-tint); padding: 3px 10px; border-radius: 12px;
}
.timeline-item {
  display: flex; gap: 14px; padding-bottom: 4px;
}
.timeline-dot-wrap {
  display: flex; flex-direction: column; align-items: center;
  padding-top: 4px; min-width: 20px;
}
.timeline-dot {
  font-size: 14px; color: var(--line); line-height: 1;
  transition: color .2s;
}
.timeline-item.latest .timeline-dot { color: var(--accent); font-size: 16px; }
.timeline-line {
  width: 2px; flex: 1; min-height: 24px;
  background: linear-gradient(var(--line), var(--surface-2));
  margin: 6px 0;
}
.snapshot-card {
  flex: 1; background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 16px;
  transition: border-color .2s;
}
.timeline-item.latest .snapshot-card {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.12);
}
.snapshot-header {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.snapshot-date {
  font-size: 12px; font-weight: 700; color: var(--ink-faint);
}
.snapshot-grade {
  font-size: 12px; font-weight: 600; color: var(--accent-2);
  background: var(--accent-tint); padding: 2px 8px; border-radius: 8px;
}
.snapshot-latest-badge {
  font-size: 11px; font-weight: 700; color: var(--good);
  background: var(--accent-tint); padding: 2px 8px; border-radius: 8px;
}
.snapshot-clusters {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px;
}
.snapshot-cluster-tag {
  font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 10px;
}
.snapshot-cluster-tag.rank-1 { background: var(--accent-tint); color: var(--accent-2); }
.snapshot-cluster-tag.rank-2 { background: var(--surface-2); color: var(--ink-dim); }
.snapshot-cluster-tag.rank-3 { background: var(--surface-2); color: var(--ink-faint); font-size: 12px; }
.snapshot-lv {
  font-size: 12px; color: var(--ink-faint); margin-bottom: 8px; line-height: 1.5;
}
.snapshot-narrative {
  font-size: 13px; color: var(--ink-dim); line-height: 1.6;
  background: var(--surface-2); border-radius: 8px; padding: 8px 12px;
  border-left: 3px solid var(--accent); margin-top: 6px;
}

/* Empty journey */
.empty-journey {
  text-align: center; padding: 40px 20px;
  background: var(--surface); border-radius: 16px; border: 1.5px dashed var(--line);
  margin-top: 8px;
}
.empty-journey-icon { font-size: 48px; margin-bottom: 12px; }
.empty-journey h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.empty-journey p { font-size: 14px; color: var(--ink-dim); line-height: 1.6; }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .topbar { padding: 0 14px; }
  .topbar-actions { gap: 3px; }
  .topbar-btn { padding: 6px 9px; font-size: 12.5px; }
  .topbar-btn.icon-btn { padding: 6px 7px; }
  #account-button { max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .screen { padding: 20px 16px 60px; }
  .step-title { font-size: 20px; }
  .hero h1 { font-size: 26px; }
}
