:root {
  --bg: #f5f6f1;
  --surface: #ffffff;
  --surface-soft: #eef3ed;
  --ink: #20332d;
  --muted: #6f7d77;
  --line: #dfe6e1;
  --green: #376d5c;
  --green-dark: #285447;
  --mint: #a9cebd;
  --coral: #e8876b;
  --gold: #e9b85a;
  --violet: #8b7aae;
  --danger: #ba5a4d;
  --shadow: 0 16px 40px rgba(45, 77, 66, .09);
  --radius-sm: 8px;
  --radius: 16px;
  --content: 1180px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(55,109,92,.22); outline-offset: 2px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { width: 0; height: 0; position: absolute; overflow: hidden; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 240px; padding: 30px 22px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 20; }
.brand { border: 0; background: transparent; display: flex; align-items: center; gap: 11px; padding: 0 10px 34px; cursor: pointer; }
.brand-mark { width: 34px; height: 34px; position: relative; display: inline-block; }
.brand-mark span { position: absolute; width: 22px; height: 27px; border-radius: 100% 0 100% 100%; background: var(--green); transform: rotate(31deg); left: 3px; top: 5px; }
.brand-mark span:last-child { transform: rotate(112deg) scale(.72); background: var(--coral); left: 13px; top: -1px; }
.brand-name { font-family: Georgia, "Songti SC", serif; font-size: 24px; font-weight: 700; letter-spacing: 0; }
.side-nav { display: grid; gap: 8px; }
.nav-item { border: 0; background: transparent; display: flex; align-items: center; gap: 13px; min-height: 48px; padding: 0 14px; border-radius: var(--radius-sm); color: var(--muted); cursor: pointer; transition: .2s ease; }
.nav-item:hover { background: #f4f6f3; color: var(--ink); }
.nav-item.active { background: var(--surface-soft); color: var(--green-dark); font-weight: 650; }
.privacy-note { margin-top: auto; padding: 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; }
.privacy-note svg { color: var(--green); flex: 0 0 auto; }
.privacy-note strong, .privacy-note span { display: block; }
.privacy-note strong { font-size: 13px; }
.privacy-note span { margin-top: 4px; font-size: 11px; line-height: 1.5; color: var(--muted); }
.main { margin-left: 240px; min-height: 100vh; }
.page { max-width: var(--content); margin: 0 auto; padding: 36px 48px 72px; animation: enter .35s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }
@keyframes fadeIn { from { opacity: 0; } }
.topbar { min-height: 48px; margin-bottom: 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.eyebrow { margin: 0 0 8px; font-size: 13px; color: var(--green); font-weight: 700; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-family: Georgia, "Songti SC", serif; font-size: 32px; line-height: 1.25; letter-spacing: 0; }
h2 { font-size: 22px; line-height: 1.35; letter-spacing: 0; }
h3 { font-size: 16px; line-height: 1.45; letter-spacing: 0; }
.subtle { color: var(--muted); line-height: 1.65; }
.avatar { width: 42px; height: 42px; border: 0; border-radius: 50%; background: #f0d8ca; color: #7e493c; font-weight: 750; cursor: pointer; }
.hero { position: relative; min-height: 298px; padding: 42px 46% 36px 42px; background: #dfece5; border-radius: var(--radius); overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0 0 0 48%; background: url("assets/mind-garden.svg") center/cover no-repeat; }
.hero-content { position: relative; z-index: 1; }
.hero h1 { max-width: 520px; font-size: 38px; }
.hero p { max-width: 470px; color: #4d665d; line-height: 1.7; }
.hero-actions { margin-top: 25px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn { min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; cursor: pointer; transition: .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 8px 18px rgba(55,109,92,.18); }
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary { background: rgba(255,255,255,.74); border-color: rgba(55,109,92,.18); color: var(--green-dark); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-icon { width: 42px; min-height: 42px; padding: 0; }
.favorite-btn { width: 44px !important; min-width: 44px !important; max-width: 44px; height: 44px; padding: 0 !important; flex-shrink: 0; border-color: var(--line); color: var(--muted); }
.favorite-btn.is-favorited { color: var(--coral); border-color: var(--coral); background: rgba(232,135,107,.08); }
.detail-actions { display: flex; gap: 12px; align-items: center; }

/* 心情日历样式 */
.mood-calendar-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.mood-calendar-page .detail-back {
  align-self: flex-start;
  margin-bottom: 16px;
}

.mood-calendar-page .page-header {
  text-align: center;
  margin-bottom: 32px;
}

.mood-calendar-page .page-header h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--text-primary);
}

.mood-calendar-page .page-header p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.mood-calendar-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.calendar-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.weekday {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-day {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: all 0.2s ease;
  min-height: 80px;
}

.calendar-day.empty {
  background: transparent;
  border: none;
}

.calendar-day.has-mood {
  background: linear-gradient(135deg, rgba(169,206,189,0.15), rgba(169,206,189,0.08));
  border-color: var(--mint);
  box-shadow: 0 2px 8px rgba(55,109,92,0.08);
}

.calendar-day.today {
  border-color: var(--green);
  border-width: 3px;
  background: linear-gradient(135deg, rgba(55,109,92,0.08), rgba(55,109,92,0.04));
}

.day-number {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.mood-emoji {
  font-size: 18px;
  margin-bottom: 2px;
  line-height: 1;
}

.mood-name {
  font-size: 11px;
  color: var(--green-dark);
  font-weight: 500;
}

.mood-legend {
  margin-top: 32px;
  padding: 20px;
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
}

.legend-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  text-align: center;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.legend-emoji {
  font-size: 18px;
}

.legend-text {
  color: var(--muted);
  font-weight: 500;
}

/* 确认弹窗样式 */
.confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.confirm-modal.fade-in {
  opacity: 1;
}

.confirm-modal.fade-out {
  opacity: 0;
}

.confirm-modal-content {
  background: white;
  border-radius: 12px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transform: scale(0.9);
  transition: transform 0.2s ease;
}

.confirm-modal.fade-in .confirm-modal-content {
  transform: scale(1);
}

.confirm-modal.fade-out .confirm-modal-content {
  transform: scale(0.9);
}

.confirm-modal-message {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 24px 0;
  text-align: center;
}

.confirm-modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.confirm-modal-buttons .btn {
  min-width: 80px;
}

/* === poster modal === */
.poster-overlay {
  position: fixed; z-index: 110; inset: 0;
  background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center;
  animation: fadeIn .2s;
}
.poster-modal {
  background: #fff; border-radius: 12px; max-width: 90vw; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.15);
}
.poster-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.poster-header h2 { font-size: 16px; margin: 0; }
.poster-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--muted); padding: 0 4px; line-height: 1; }
.poster-close:hover { color: var(--text); }
.poster-preview {
  overflow: auto; padding: 16px; display: flex; justify-content: center; align-items: flex-start;
  background: var(--bg); max-height: 65vh;
}
.poster-preview canvas {
  border-radius: 4px; box-shadow: 0 2px 12px rgba(0,0,0,.08); display: block;
}
.poster-actions {
  display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--border);
  justify-content: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .calendar-day {
    padding: 6px;
  }
  
  .day-number {
    font-size: 14px;
  }
  
  .mood-emoji {
    font-size: 16px;
  }
  
  .mood-name {
    font-size: 10px;
  }
  
  .calendar-title {
    font-size: 20px;
  }
}
.section-head { margin: 38px 0 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-head h2 { margin-bottom: 3px; }
.section-head p { margin-bottom: 0; font-size: 13px; color: var(--muted); }
.text-button { border: 0; background: transparent; color: var(--green); display: inline-flex; align-items: center; gap: 4px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.test-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.test-card { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 20px; min-height: 196px; display: flex; flex-direction: column; text-align: left; cursor: pointer; transition: .22s ease; }
.test-card:hover { transform: translateY(-3px); border-color: #bfd0c8; box-shadow: var(--shadow); }
.test-card .icon-box { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 20px; }
.test-card h3 { margin-bottom: 7px; }
.test-card p { font-size: 13px; line-height: 1.55; color: var(--muted); }
.test-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); }
.test-meta span { display: inline-flex; gap: 5px; align-items: center; }
.test-meta svg { width: 15px; height: 15px; }
.icon-green { background: #e1eee8; color: var(--green); }
.icon-coral { background: #fae8e2; color: #b9604c; }
.icon-gold { background: #fbefd8; color: #9b6b17; }
.icon-violet { background: #eeeaf5; color: #6d5b94; }
.daily { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; }
.checkin, .mini-insight { border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm); padding: 24px; }
.moods { display: flex; gap: 8px; margin-top: 20px; }
.mood { flex: 1; min-height: 70px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm); display: grid; place-items: center; gap: 3px; cursor: pointer; color: var(--muted); }
.mood span:first-child { font-family: Georgia, serif; font-size: 23px; color: var(--ink); }
.mood span:last-child { font-size: 11px; }
.mood:hover, .mood.selected { border-color: var(--green); background: var(--surface-soft); color: var(--green); }
.mini-insight { background: #2f5f51; color: white; }
.mini-insight p { color: #d9e8e2; line-height: 1.65; }
.insight-value { margin: 18px 0 4px; font-family: Georgia, serif; font-size: 38px; }
.bottom-nav { display: none; }

.catalog-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 28px; }
.search-box { width: 320px; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; display: flex; align-items: center; gap: 10px; }
.search-box input { border: 0; outline: 0; width: 100%; background: transparent; color: var(--ink); }
.search-box input::placeholder { color: #96a19c; }
.filter-row { margin: 28px 0 20px; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
.filter-chip { min-height: 36px; border: 1px solid var(--line); background: #fff; padding: 0 15px; border-radius: 999px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.filter-chip.active { color: #fff; background: var(--green); border-color: var(--green); }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.catalog-card { min-height: 250px; }
.tag { display: inline-flex; align-self: flex-start; min-height: 24px; padding: 0 9px; align-items: center; border-radius: 999px; background: #f2f4f1; color: var(--muted); font-size: 11px; font-weight: 650; }
.catalog-card .tag { margin-left: auto; margin-top: -62px; margin-bottom: 39px; }
.empty-state { grid-column: 1/-1; min-height: 260px; display: grid; place-items: center; text-align: center; color: var(--muted); }

.assessment-page { max-width: 920px; }
.assessment-bar { display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; gap: 20px; }
.progress-wrap { display: grid; gap: 8px; }
.progress-info { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.progress { height: 6px; background: #dfe6e1; border-radius: 99px; overflow: hidden; }
.progress > span { height: 100%; display: block; border-radius: inherit; background: var(--coral); transition: width .25s ease; }
.question-stage { min-height: calc(100vh - 160px); display: flex; flex-direction: column; justify-content: center; padding: 48px 8%; }
.question-index { color: var(--green); font-size: 13px; font-weight: 750; }
.question-stage h1 { margin: 13px 0 30px; max-width: 720px; font-size: 31px; }
.options { display: grid; gap: 12px; }
.option { min-height: 60px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer; transition: .18s; line-height: 1.5; overflow-wrap: anywhere; }
.option:hover { border-color: #a8c1b6; }
.option.selected { background: var(--surface-soft); border-color: var(--green); }
.radio { width: 20px; height: 20px; border: 1.5px solid #a6b0ab; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.option.selected .radio { border-color: var(--green); }
.option.selected .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.question-footer { margin-top: 30px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.autosave { display: inline-flex; align-items: center; gap: 5px; }
.autosave svg { width: 15px; height: 15px; }

.detail-page { max-width: 980px; }
.detail-back { margin-bottom: 28px; }
.detail-hero { display: grid; grid-template-columns: 1fr 300px; gap: 40px; padding: 36px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.detail-visual { min-height: 285px; border-radius: var(--radius-sm); position: relative; overflow: hidden; background: #e1eee8; }
.detail-visual::before { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: #f0c872; right: -35px; top: -42px; }
.detail-visual::after { content: ""; position: absolute; width: 260px; height: 155px; border-radius: 50% 50% 0 0; background: #79a995; bottom: -36px; left: 20px; transform: rotate(-8deg); }
.detail-leaf { position: absolute; z-index: 2; width: 110px; height: 150px; border-radius: 100% 0 100% 100%; background: var(--coral); transform: rotate(25deg); left: 78px; top: 64px; }
.detail-copy h1 { font-size: 34px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 20px 0; color: var(--muted); font-size: 13px; }
.detail-meta span { display: inline-flex; gap: 5px; align-items: center; }
.detail-meta svg { width: 16px; height: 16px; }
.instruction-box { margin: 20px 0; padding-left: 14px; border-left: 3px solid #bfd3c9; }
.instruction-box strong { display: block; margin-bottom: 5px; font-size: 12px; }
.instruction-box p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.detail-points { display: grid; gap: 10px; margin: 24px 0 30px; }
.detail-points span { display: flex; gap: 9px; align-items: center; font-size: 14px; }
.detail-points svg { width: 17px; color: var(--green); }
.notice { margin-top: 18px; padding: 14px 16px; border-left: 3px solid var(--gold); background: #fff9ed; color: #705b35; font-size: 12px; line-height: 1.65; }

.result-page { max-width: 980px; }
/* 分数方向摘要（替代原分数环） */
.scl-score-summary { width: 180px; min-height: 140px; padding: 16px; border: 1px solid color-mix(in srgb, var(--coral) 24%, transparent); border-radius: var(--radius-sm); background: rgba(255,255,255,.83); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.scl-score-summary strong { max-width: 160px; color: var(--coral); font-family: Georgia, "Songti SC", serif; font-size: 36px; line-height: 1.05; overflow-wrap: anywhere; }
.scl-score-summary span { max-width: 150px; margin-top: 5px; color: var(--ink); font-size: 12px; font-weight: 680; line-height: 1.4; }
.scl-score-summary small { max-width: 150px; margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.score-ring { display: none; } /* 已废弃，保留选择器避免报错 */
.result-band { display: inline-flex; padding: 7px 14px; border-radius: 999px; background: #fae8e2; color: #a44f3b; font-weight: 750; font-size: 13px; }
.result-conclusion { font-size: 26px; font-weight: 800; color: #a44f3b; margin: 0 0 6px; line-height: 1.3; }
.scl-hero-copy .result-conclusion { margin-top: 18px; }
.individual-report .result-conclusion { color: var(--report-accent); }
.result-panel { padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.result-panel.wide { grid-column: 1/-1; }
.result-panel p { color: var(--muted); line-height: 1.75; font-size: 14px; }
.result-panel h2 { font-size: 16px; margin-bottom: 14px; }
.result-actions { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }

.scl-result { --factor-0: #376d5c; --factor-1: #e8876b; --factor-2: #c99738; --factor-3: #7c6aa2; max-width: 1080px; }
.scl-hero { min-height: 286px; padding: 38px 44px; border: 1px solid #d5e2dc; border-radius: var(--radius); background: #e7f0eb; display: grid; grid-template-columns: minmax(0,1fr) 190px; gap: 42px; align-items: center; }
.scl-hero.is-attention { background: #fff8e8; border-color: #e8d6a6; }
.scl-hero.is-safety { background: #fff3ef; border-color: #efd1c9; }
.scl-hero-copy h1 { max-width: 650px; font-size: 34px; }
.scl-hero-copy > p:not(.eyebrow) { max-width: 680px; margin: 14px 0 20px; color: #52675f; line-height: 1.75; }
.scl-hero .scl-score-summary { margin: 0; }
.result-band-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.result-band-row > small { color: var(--muted); font-size: 10px; }
.scl-report-nav { position: sticky; top: 10px; z-index: 12; min-height: 58px; margin: 16px 0 0; padding: 10px 12px 10px 18px; border: 1px solid #d7e1dc; border-radius: var(--radius-sm); background: rgba(255,255,255,.96); box-shadow: 0 8px 24px rgba(35,63,51,.08); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.scl-report-nav > strong { flex: 0 0 auto; color: var(--green-dark); font-size: 13px; }
.scl-report-nav > div { min-width: 0; display: flex; align-items: center; gap: 4px; }
.scl-report-nav a { min-height: 36px; padding: 0 12px; border-radius: 6px; color: #52675f; display: inline-flex; align-items: center; font-size: 11px; font-weight: 650; white-space: nowrap; }
.scl-report-nav a:hover, .scl-report-nav a:focus-visible { background: #eaf2ed; color: var(--green-dark); }
.scl-metrics { margin: 16px 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.scl-metric { min-height: 128px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.scl-metric > span { display: block; min-height: 36px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.scl-metric strong { display: block; margin-top: 4px; font-family: Georgia, "Songti SC", serif; font-size: 29px; color: var(--ink); }
.scl-metric strong small { margin-left: 4px; font: 500 11px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; color: var(--muted); }
.scl-metric p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.scl-profile-entry { min-height: 72px; padding: 14px 18px; border: 1px solid #cbded5; border-radius: var(--radius-sm); background: #edf5f1; color: var(--green-dark); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.scl-profile-entry span, .scl-profile-entry strong, .scl-profile-entry small { display: block; }
.scl-profile-entry strong { font-size: 14px; }
.scl-profile-entry small { margin-top: 4px; color: #52675f; font-size: 10px; line-height: 1.5; }
.scl-profile-entry svg { width: 18px; height: 18px; flex: 0 0 auto; }
.scl-profile-entry:hover, .scl-profile-entry:focus-visible { border-color: var(--green); background: #e5f0ea; }
#scl-overall, #scl-screening, #scl-profile, #scl-next { scroll-margin-top: 84px; }
.scl-result .result-panel { margin-top: 16px; }
.scl-overview { display: grid; grid-template-columns: 230px 1fr; gap: 26px; align-items: center; }
.scl-overview h2, .panel-heading h2, .scl-bottom-grid h2 { margin-bottom: 0; }
.scl-overview > p { margin: 0; }
.panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.panel-heading > span { color: var(--muted); font-size: 11px; }
.screening-rule-list { margin-top: 20px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.screening-rule { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f8faf8; display: grid; grid-template-columns: 30px minmax(0,1fr) auto; gap: 10px; align-items: center; }
.screening-rule.is-matched { border-color: #e8c6ba; background: #fff5f1; }
.screening-rule-icon { width: 30px; height: 30px; border-radius: 50%; background: #e5eee9; color: var(--green); display: grid; place-items: center; }
.screening-rule.is-matched .screening-rule-icon { background: #f6ded5; color: #9b4e3c; }
.screening-rule-icon svg { width: 15px; height: 15px; }
.screening-rule span, .screening-rule strong, .screening-rule small, .screening-rule-state b { display: block; }
.screening-rule span { color: var(--muted); font-size: 10px; }
.screening-rule strong { margin-top: 2px; font-family: Georgia, "Songti SC", serif; font-size: 21px; }
.screening-rule small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.screening-rule-state { text-align: right; }
.screening-rule-state b { color: var(--green); font-size: 11px; }
.screening-rule.is-matched .screening-rule-state b { color: #9b4e3c; }
.scl-screening .report-caveat a { color: var(--green); font-weight: 700; }
.scl-scale { margin: 23px 0 12px; padding: 10px 14px; border-radius: var(--radius-sm); background: #f5f7f4; display: grid; grid-template-columns: repeat(5,1fr); color: var(--muted); font-size: 10px; text-align: center; }
.scl-factor-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.scl-factor { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfcfa; }
.scl-factor.is-elevated { border-color: #e5c7bd; background: #fff9f6; }
.scl-factor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.scl-factor-head strong, .scl-factor-head span { display: block; }
.scl-factor-head strong { font-size: 14px; }
.scl-factor-head span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.scl-factor-head b { font-family: Georgia, serif; font-size: 23px; }
.scl-factor-track { height: 7px; margin: 12px 0 7px; border-radius: 99px; background: #e9eeea; overflow: hidden; }
.scl-factor-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--factor-color); }
.scl-factor-status { display: flex; justify-content: space-between; gap: 8px; color: var(--green-dark); font-size: 10px; }
.scl-factor-status small { color: var(--muted); }
.scl-factor p { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.scl-bottom-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.priority-list { margin-top: 20px; display: grid; gap: 14px; }
.priority-item { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.priority-item > span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #e5efea; color: var(--green); font-size: 11px; font-weight: 750; }
.priority-item strong { font-size: 13px; }
.priority-item p { margin: 3px 0 0; font-size: 11px; line-height: 1.55; }
.priority-item small { display: block; margin-top: 7px; color: #52675f; font-size: 10px; line-height: 1.6; }
.priority-empty { margin-top: 20px; padding: 16px; background: #f2f6f3; border-radius: var(--radius-sm); color: #4c655b; font-size: 12px; line-height: 1.65; }
.report-caveat { margin: 18px 0 0 !important; padding-top: 14px; border-top: 1px solid var(--line); font-size: 10px !important; }
.additional-score { margin: 20px 0 12px; display: flex; align-items: baseline; gap: 12px; }
.additional-score strong { font-family: Georgia, serif; font-size: 38px; color: var(--violet); }
.additional-score span { color: var(--muted); font-size: 12px; }
.calculation-note > div { display: flex; align-items: center; gap: 10px; }
.calculation-note svg { color: var(--green); }
.calculation-note h2 { margin: 0; font-size: 17px; }
.calculation-note p { margin: 12px 0 0; font-size: 12px; }
.scl-next-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.scl-next-grid > div { padding: 17px; border-left: 3px solid var(--green); background: #f5f8f6; }
.scl-next-grid > div:nth-child(2) { border-left-color: var(--gold); }
.scl-next-grid > div:nth-child(3) { border-left-color: var(--violet); }
.scl-next-grid b { width: 24px; height: 24px; margin-bottom: 12px; border-radius: 50%; background: #fff; color: var(--green); display: grid; place-items: center; font-size: 10px; }
.scl-next-grid strong { display: block; font-size: 13px; }
.scl-next-grid p { margin: 6px 0 0; font-size: 11px; line-height: 1.65; }
.safety-notice { border-left-color: var(--danger); background: #fff1ed; color: #7c4037; }

.records-list { display: grid; gap: 14px; }
.record-card { --record-accent: var(--green); --record-soft: #eef3ed; position: relative; width: 100%; padding: 20px 22px; overflow: hidden; border: 1px solid var(--line); border-left: 3px solid var(--record-accent); background: #fff; border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 14px; text-align: left; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.record-card:hover { border-color: color-mix(in srgb, var(--record-accent) 52%, var(--line)); box-shadow: 0 8px 24px rgba(45,77,66,.09); transform: translateY(-1px); }
.record-top { display: flex; gap: 14px; align-items: flex-start; }
.record-score-box { flex-shrink: 0; width: 88px; min-height: 76px; padding: 10px 8px; border: 1px solid color-mix(in srgb, var(--record-accent) 24%, var(--line)); border-radius: 7px; background: var(--record-soft); color: var(--record-accent); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; }
.record-score-box strong { max-width: 100%; color: var(--record-accent); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; font-size: 13px; font-weight: 760; line-height: 1.3; overflow-wrap: anywhere; }
.record-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.record-info h3 { display: -webkit-box; margin: 0; overflow: hidden; color: #2a3a34; font-size: 16px; font-weight: 680; line-height: 1.45; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.record-report-name { margin: 0; color: var(--record-accent); font-size: 11px; font-weight: 650; line-height: 1.4; }
.record-divider { width: 100%; height: 1px; background: var(--line); }
.record-bottom { display: flex; align-items: center; justify-content: space-between; }
.record-bottom-left { display: flex; flex-direction: column; gap: 3px; }
.record-bottom-status { color: var(--ink); font-size: 13px; font-weight: 680; line-height: 1.45; }
.record-date { color: var(--muted); font-size: 11px; line-height: 1.45; }
.record-open { display: inline-flex; align-items: center; gap: 3px; color: var(--green-dark); font-size: 11px; font-weight: 650; flex-shrink: 0; }
.record-open svg { width: 14px; height: 14px; transition: transform .18s ease; }
.record-card:hover .record-open svg { transform: translateX(2px); }
.empty-records { padding: 60px 20px; border: 1px dashed #cfd8d3; border-radius: var(--radius-sm); text-align: center; }

.profile-hero { padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); display: flex; gap: 18px; align-items: center; }
.profile-avatar { width: 68px; height: 68px; flex: 0 0 auto; border-radius: 50%; background: #f0d8ca; display: grid; place-items: center; font-family: Georgia, serif; font-size: 22px; color: #7e493c; }
.profile-hero h2 { margin-bottom: 3px; }
.profile-hero p { margin: 0; color: var(--muted); font-size: 13px; }
.profile-grid { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.profile-section { padding: 8px 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.setting-row { width: 100%; min-height: 58px; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 0; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; }
.setting-row:last-child { border-bottom: 0; }
.setting-row > svg:first-child { color: var(--green); }
.setting-row span { flex: 1; }
.setting-row small { color: var(--muted); }
.setting-row .i-arrow { color: #9ba49f; }
.switch { width: 42px; height: 24px; border: 0; border-radius: 99px; background: #cbd3cf; padding: 3px; cursor: pointer; }
.switch::after { content: ""; display: block; width: 18px; height: 18px; border-radius: 50%; background: white; transition: .2s; }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(18px); }
.danger-text { color: var(--danger); }
.toast { position: fixed; left: 50%; bottom: 30px; z-index: 100; transform: translate(-50%, 20px); padding: 11px 16px; border-radius: var(--radius-sm); background: #1f332c; color: #fff; font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.is-assessment .sidebar, .is-assessment .bottom-nav { display: none; }
.is-assessment .main { margin-left: 0; padding-bottom: 0; }

/* Scale-specific reports share layout primitives, while copy and meaning come from each scale. */
.individual-report { max-width: 1080px; }
.individual-hero { min-height: 270px; padding: 40px 44px; border: 1px solid color-mix(in srgb, var(--report-accent) 24%, var(--line)); border-radius: var(--radius); background: var(--report-soft); display: grid; grid-template-columns: minmax(0,1fr) 190px; align-items: center; gap: 42px; }
.individual-hero h1 { max-width: 720px; margin-top: 7px; font-size: 34px; }
.individual-hero > div:first-child > p:not(.eyebrow) { max-width: 690px; margin: 12px 0 20px; color: #52615c; line-height: 1.75; }
.individual-report .eyebrow { color: var(--report-accent); }
.individual-outcome { min-height: 28px; padding: 5px 11px; border: 1px solid color-mix(in srgb, var(--report-accent) 34%, transparent); border-radius: 6px; background: rgba(255,255,255,.7); color: var(--report-accent); display: inline-flex; align-items: center; font-size: 12px; font-weight: 720; }
.individual-key { width: 180px; min-height: 180px; padding: 18px; border: 1px solid color-mix(in srgb, var(--report-accent) 24%, #fff); border-radius: 50%; background: rgba(255,255,255,.83); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.individual-key strong { max-width: 148px; color: var(--report-accent); font-family: Georgia, "Songti SC", serif; font-size: 42px; line-height: 1.05; overflow-wrap: anywhere; }
.individual-key span { max-width: 132px; margin-top: 7px; color: var(--ink); font-size: 12px; font-weight: 680; line-height: 1.4; }
.individual-key small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.individual-key .direction-hint { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.individual-summary { margin: 16px 0; padding: 26px 30px; border-left: 4px solid var(--report-accent); background: #fff; display: grid; grid-template-columns: minmax(180px,260px) minmax(0,1fr); gap: 28px; align-items: start; }
.individual-summary h2 { margin-top: 5px; font-size: 18px; }
.individual-summary p { margin: 0; color: #4c5d56; line-height: 1.8; }
.individual-summary .individual-result-copy { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); }
.individual-profile { margin-top: 16px; }
.individual-dimension-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.individual-dimension { min-width: 0; min-height: 174px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfcfa; }
.individual-dimension-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.individual-dimension-head > div { min-width: 0; }
.individual-dimension-head strong, .individual-dimension-head span { display: block; }
.individual-dimension-head strong { color: var(--ink); font-size: 14px; }
.individual-dimension-head span { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.individual-dimension-head b { flex: 0 0 auto; color: var(--report-accent); font-family: Georgia, serif; font-size: 25px; }
.individual-dimension-head b small { margin-left: 3px; font: 500 9px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
.individual-track { height: 7px; margin: 16px 0 8px; overflow: hidden; border-radius: 99px; background: #e8ece9; }
.individual-track span { display: block; height: 100%; border-radius: inherit; background: var(--report-accent); }
.individual-scale { display: grid; grid-template-columns: 24px minmax(0,1fr) 24px; gap: 7px; align-items: start; color: var(--muted); font-size: 9px; }
.individual-scale span:last-child { text-align: right; }
.individual-scale em { color: #52615c; font-style: normal; line-height: 1.55; text-align: center; }
.individual-bottom { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.individual-actions > div { padding: 12px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 25px minmax(0,1fr); gap: 11px; }
.individual-actions > div:first-child { border-top: 0; }
.individual-actions b { width: 23px; height: 23px; border-radius: 50%; background: var(--report-soft); color: var(--report-accent); display: grid; place-items: center; font-size: 10px; }
.individual-actions p { margin: 0; color: #465750; }
.legacy-report { max-width: 760px; }
.legacy-report h1 { margin: 8px 0 15px; }
.legacy-report dl { margin-top: 20px; }
.legacy-report dl > div { padding: 15px; background: #f4f6f4; display: flex; align-items: center; justify-content: space-between; }
.legacy-report dt { color: var(--muted); }
.legacy-report dd { margin: 0; font-family: Georgia, serif; font-size: 28px; }
.record-card.individualized .record-score-box { background: var(--record-soft); }

@media (max-width: 1050px) {
  .sidebar { width: 92px; padding-inline: 16px; }
  .brand { padding-inline: 13px; }
  .brand-name, .side-nav span, .privacy-note { display: none; }
  .side-nav .nav-item { justify-content: center; padding: 0; }
  .main { margin-left: 92px; }
  .hero { padding-right: 39%; }
  .test-grid, .catalog-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 720px) {
  body { background: #f8f9f5; }
  .sidebar { display: none; }
  .main { margin-left: 0; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .page { padding: 22px 18px 34px; }
  .topbar { margin-bottom: 22px; }
  h1 { font-size: 27px; }
  .topbar h1 { font-size: 26px; }
  .hero { min-height: 420px; padding: 28px 24px 205px; }
  .hero::after { inset: auto 0 0 0; height: 220px; background-position: 50% 58%; }
  .hero h1 { font-size: 31px; }
  .hero p { font-size: 14px; }
  .hero-actions .btn { flex: 1; }
  .section-head { margin-top: 30px; }
  .section-head h2 { font-size: 20px; }
  .test-grid, .catalog-grid { grid-template-columns: 1fr; }
  .test-card { min-height: 178px; }
  .daily { grid-template-columns: 1fr; }
  .moods { gap: 5px; }
  .mood { min-height: 64px; }
  .bottom-nav { position: fixed; display: grid; grid-template-columns: repeat(4,1fr); inset: auto 0 0 0; min-height: calc(64px + env(safe-area-inset-bottom)); padding: 5px 10px env(safe-area-inset-bottom); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); z-index: 30; backdrop-filter: blur(12px); }
  .bottom-nav .nav-item { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-height: 54px; padding: 0; font-size: 10px; }
  .bottom-nav .nav-item.active { background: transparent; color: var(--green); }
  .bottom-nav svg { width: 21px; height: 21px; }
  .catalog-head { grid-template-columns: 1fr; gap: 18px; }
  .search-box { width: 100%; }
  .filter-row { margin-top: 20px; margin-inline: -18px; padding-inline: 18px; }
  .assessment-page { padding-top: 14px; }
  .assessment-bar { grid-template-columns: 42px 1fr 42px; gap: 10px; }
  .question-stage { min-height: calc(100vh - 170px); padding: 28px 0 18px; justify-content: flex-start; }
  .question-stage h1 { font-size: 25px; margin-bottom: 25px; }
  .option { min-height: 58px; }
  .question-footer { align-items: flex-end; }
  .detail-hero { grid-template-columns: 1fr; padding: 22px; gap: 25px; }
  .detail-visual { min-height: 210px; order: -1; }
  .detail-copy h1 { font-size: 29px; }
  .detail-copy .btn { width: 100%; }
  .result-layout { grid-template-columns: 1fr; }
  .result-panel.wide { grid-column: auto; }
  .result-actions { flex-direction: column; }
  .result-actions .btn { width: 100%; }
  .scl-hero { min-height: 0; padding: 26px 22px; grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .scl-hero-copy h1 { font-size: 27px; }
  .result-conclusion { font-size: 22px; }
  .scl-hero .scl-score-summary { margin: 0 auto; order: -1; width: 148px; }
  .scl-report-nav { top: 8px; margin-inline: -6px; padding: 8px 10px; align-items: flex-start; flex-direction: column; gap: 5px; }
  .scl-report-nav > strong { padding-inline: 8px; }
  .scl-report-nav > div { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .scl-report-nav > div::-webkit-scrollbar { display: none; }
  .scl-report-nav a { padding-inline: 8px; }
  .scl-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .scl-metric { min-height: 122px; padding: 16px; }
  .scl-profile-entry { align-items: flex-start; }
  .scl-overview { grid-template-columns: 1fr; gap: 5px; }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .screening-rule-list, .scl-next-grid { grid-template-columns: 1fr; }
  .scl-scale { grid-template-columns: 1fr; gap: 4px; text-align: left; }
  .scl-factor-grid, .scl-bottom-grid { grid-template-columns: 1fr; }
  .records-list { gap: 12px; }
  .record-card { padding: 16px; }
  .record-score-box { width: 70px; min-height: 68px; }
  .record-score-box strong { font-size: 11px; }
  .record-info h3 { font-size: 15px; }
  .record-bottom-status { font-size: 12px; }
  .record-date { font-size: 10px; }
  .record-open { font-size: 10px; }
  .individual-hero { min-height: 0; padding: 26px 22px; grid-template-columns: 1fr; gap: 22px; text-align: center; }
  .individual-hero h1 { font-size: 27px; }
  .individual-key { width: 146px; min-height: 146px; margin: 0 auto; order: -1; }
  .individual-key strong { font-size: 34px; }
  .individual-summary { padding: 22px 18px; grid-template-columns: 1fr; gap: 10px; }
  .individual-dimension-grid, .individual-bottom { grid-template-columns: 1fr; }
  .individual-dimension { min-height: 0; }
  .profile-grid { grid-template-columns: 1fr; }
  .toast { bottom: 86px; max-width: calc(100% - 36px); white-space: nowrap; }
  .is-assessment .toast { bottom: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
