:root {
  --page-bg: #d8d2cb;
  --paper: #f7f2ec;
  --paper-2: #fffdf9;
  --ink: #302725;
  --muted: #746966;
  --line: #d9cec5;

  --coral: #c95f4d;
  --coral-strong: #973d32;
  --coral-soft: #f7dfd8;

  --plum: #76536f;
  --plum-soft: #eee4ec;

  --amber: #a97119;
  --amber-soft: #f7ebc9;

  --leaf: #3f7058;
  --leaf-soft: #e0ece4;

  --danger: #9c352f;
  --danger-soft: #f7dcda;

  --shadow: 0 18px 60px rgba(49, 38, 34, .16);
  --nav-height: 76px;
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-size: 16px;
}

html.large-text {
  font-size: 18px;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

button,
a,
summary,
input {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(201, 95, 77, .35);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.phone-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  min-height: 60px;
  padding: max(8px, env(safe-area-inset-top)) 14px 7px;
  border-bottom: 1px solid rgba(48, 39, 37, .1);
  background: rgba(247, 242, 236, .96);
  backdrop-filter: blur(16px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  background: transparent;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}

.brand-mark {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper-2);
  font-family: STSong, "Songti SC", serif;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 1.35rem;
  cursor: pointer;
}

.icon-button.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

#app {
  min-height: calc(100dvh - 60px);
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 24px);
}

.bottom-nav {
  position: fixed;
  z-index: 40;
  right: max(0px, calc((100vw - 430px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 430px) / 2));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding: 7px 14px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(48, 39, 37, .12);
  background: rgba(255, 253, 249, .97);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  display: grid;
  min-width: 0;
  min-height: 56px;
  place-content: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: #807673;
  cursor: pointer;
}

.bottom-nav button > span {
  font-size: 1.35rem;
  line-height: 1;
}

.bottom-nav small {
  font-size: .75rem;
  line-height: 1.2;
}

.bottom-nav button.is-active {
  color: var(--coral-strong);
  font-weight: 800;
}

.toast {
  position: fixed;
  z-index: 90;
  right: 50%;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 18px);
  width: max-content;
  max-width: min(350px, calc(100vw - 32px));
  padding: 11px 15px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-size: .88rem;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 10px);
  transition: opacity .2s ease, transform .2s ease;
}

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

h1,
h2,
h3,
p,
span,
small {
  overflow-wrap: anywhere;
}

h1,
h2,
.display-title {
  font-family: STSong, "Songti SC", "Noto Serif CJK SC", serif;
}

.page-heading {
  padding: 28px 20px 22px;
}

.page-heading.is-warm {
  background: var(--coral-soft);
}

.page-heading.is-dark {
  background: var(--ink);
  color: #fff;
}

.page-kicker {
  margin: 0 0 8px;
  color: var(--coral-strong);
  font-size: .76rem;
  font-weight: 900;
}

.page-heading.is-dark .page-kicker {
  color: #f2b6a9;
}

.page-heading h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.15;
}

.page-summary {
  max-width: 34rem;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.page-heading.is-dark .page-summary {
  color: rgba(255, 255, 255, .76);
}

.content-section {
  padding: 24px 20px;
}

.content-section + .content-section {
  border-top: 1px solid var(--line);
}

.section-heading {
  margin: 0 0 8px;
  font-size: 1.45rem;
  line-height: 1.3;
}

.section-intro {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.65;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  line-height: 1.35;
  cursor: pointer;
}

.button-primary {
  background: var(--ink);
  color: #fff;
}

.button-coral {
  background: var(--coral);
  color: #fff;
}

.button-secondary {
  border-color: var(--ink);
  background: transparent;
}

.button-danger {
  background: var(--danger);
  color: #fff;
}

.button-danger-outline {
  border-color: var(--danger);
  background: transparent;
  color: var(--danger);
}

.button-wide {
  width: 100%;
}

.button:disabled {
  cursor: default;
  opacity: .58;
}

.search-box {
  position: relative;
  margin-top: 18px;
}

.search-box span {
  position: absolute;
  top: 50%;
  left: 16px;
  color: var(--muted);
  transform: translateY(-50%);
}

.search-box input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px 0 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--ink);
  font-size: 1rem;
}

.course-list {
  display: grid;
  gap: 12px;
}

.course-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
}

.course-signal {
  position: relative;
  display: grid;
  min-height: 176px;
  place-content: center;
  overflow: hidden;
  background: var(--plum-soft);
  color: var(--plum);
}

.signal-word {
  position: relative;
  z-index: 2;
  font-family: STSong, "Songti SC", serif;
  font-size: 2.7rem;
  font-weight: 900;
}

.signal-bars {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  height: 10px;
}

.signal-bars i:nth-child(1) {
  background: var(--coral);
}

.signal-bars i:nth-child(2) {
  background: var(--amber);
}

.signal-bars i:nth-child(3) {
  background: var(--leaf);
}

.course-card-body {
  min-width: 0;
  padding: 16px;
}

.course-type {
  margin: 0 0 6px;
  color: var(--coral-strong);
  font-size: .75rem;
  font-weight: 900;
}

.course-card h2 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.35;
}

.course-card p {
  margin: 7px 0 12px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.6;
}

.course-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: .76rem;
}

.course-card .button {
  min-height: 46px;
}

.empty-search {
  padding: 30px 12px;
  color: var(--muted);
  text-align: center;
}

.course-hero {
  padding: 28px 20px 24px;
  background: var(--plum-soft);
  border-bottom: 8px solid var(--coral);
}

.course-hero h1 {
  max-width: 360px;
  margin: 0;
  font-size: 2.15rem;
  line-height: 1.12;
}

.course-hero p {
  margin: 12px 0 20px;
  color: #65535f;
  font-size: 1rem;
  line-height: 1.7;
}

.course-progress {
  padding: 15px 20px;
  background: var(--ink);
  color: #fff;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-row strong {
  flex: 0 0 auto;
  font-size: .9rem;
}

.progress-track {
  flex: 1;
  height: 7px;
  overflow: hidden;
  background: rgba(255, 255, 255, .2);
}

.progress-fill {
  display: block;
  height: 100%;
  background: var(--amber);
}

.progress-row small {
  color: rgba(255, 255, 255, .72);
}

.day-list {
  display: grid;
}

.day-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  min-height: 84px;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.day-row:last-child {
  border-bottom: 0;
}

.day-badge {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--plum);
  border-radius: 50%;
  color: var(--plum);
  font-weight: 900;
}

.day-row strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
  line-height: 1.4;
}

.day-row small {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.45;
}

.day-status {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 800;
}

.day-status.is-done {
  color: var(--leaf);
}

.day-status.is-next {
  color: var(--coral-strong);
}

.safety-link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 66px;
  padding: 11px 13px;
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  background: var(--danger-soft);
  text-align: left;
  cursor: pointer;
}

.safety-link > span:first-child {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-weight: 900;
}

.safety-link strong {
  display: block;
  margin-bottom: 3px;
}

.safety-link small {
  color: #764843;
  line-height: 1.4;
}

.disclaimer {
  margin: 0;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: #eee9e3;
  color: #665d59;
  font-size: .78rem;
  line-height: 1.65;
}

.day-head {
  padding: 23px 20px 20px;
}

.day-kicker {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: var(--coral-strong);
  font-size: .76rem;
  font-weight: 900;
}

.day-head h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.18;
}

.day-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}

.day-tabs button {
  min-width: 0;
  min-height: 52px;
  padding: 7px 4px;
  border: 0;
  border-bottom: 4px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: .78rem;
  cursor: pointer;
}

.day-tabs button.is-current {
  border-bottom-color: var(--coral);
  color: var(--ink);
  font-weight: 900;
}

.day-tabs button.is-done {
  color: var(--leaf);
}

.action-panel {
  margin: 20px;
  padding: 20px;
  border-left: 6px solid var(--coral);
  border-radius: var(--radius);
  background: var(--coral-soft);
}

.action-label {
  margin-bottom: 8px;
  color: var(--coral-strong);
  font-size: .76rem;
  font-weight: 900;
}

.action-panel h2 {
  margin: 0;
  font-size: 1.42rem;
  line-height: 1.45;
}

.action-reason {
  margin: 13px 0 0;
  color: #604b46;
  line-height: 1.7;
}

.observe-block {
  margin: 18px 0;
  padding-top: 16px;
  border-top: 1px solid rgba(151, 61, 50, .24);
}

.observe-block strong {
  display: block;
  margin-bottom: 6px;
  color: var(--coral-strong);
}

.observe-block p {
  margin: 0;
  line-height: 1.7;
}

.action-followup {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.reading-list {
  border-top: 1px solid var(--line);
}

.reading-section {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 23px 20px;
  border-bottom: 1px solid var(--line);
}

.section-number {
  color: var(--plum);
  font-family: STSong, "Songti SC", serif;
  font-size: 1.45rem;
  font-weight: 900;
}

.reading-section h2 {
  margin: 0 0 9px;
  font-size: 1.32rem;
  line-height: 1.4;
}

.reading-section p {
  margin: 0;
  color: #504744;
  font-size: 1rem;
  line-height: 1.8;
}

.branch-list {
  display: grid;
  gap: 9px;
}

.branch-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
}

.branch-list summary {
  min-height: 52px;
  padding: 14px 42px 14px 14px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.45;
}

.branch-list details p {
  margin: 0;
  padding: 0 14px 16px;
  color: var(--muted);
  line-height: 1.7;
}

.care-head {
  padding: 26px 20px 22px;
  background: var(--danger-soft);
  border-bottom: 7px solid var(--danger);
}

.care-head h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.18;
}

.care-head p {
  margin: 10px 0 0;
  color: #704944;
  line-height: 1.7;
}

.care-matrix {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.care-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-left-width: 7px;
  border-radius: var(--radius);
  background: var(--paper-2);
}

.care-card.is-immediate {
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.care-card.is-prompt {
  border-left-color: var(--amber);
  background: var(--amber-soft);
}

.care-card.is-self {
  border-left-color: var(--leaf);
  background: var(--leaf-soft);
}

.care-card header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.care-level {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.care-card h2 {
  margin: 0;
  font-size: 1.3rem;
}

.care-card p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
}

.care-card .button {
  margin-top: 15px;
}

.care-note {
  margin: 0 20px 20px;
  padding: 14px;
  border-left: 4px solid var(--plum);
  background: var(--plum-soft);
  line-height: 1.65;
}

.results-summary {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 24px 20px;
  background: var(--ink);
  color: #fff;
}

.result-count {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  border: 3px solid var(--amber);
  border-radius: 50%;
  color: var(--amber-soft);
  font-family: STSong, "Songti SC", serif;
  font-size: 1.7rem;
  font-weight: 900;
}

.results-summary h1 {
  margin: 0 0 7px;
  font-size: 1.8rem;
}

.results-summary p {
  margin: 0;
  color: rgba(255, 255, 255, .74);
  line-height: 1.6;
}

.result-course {
  padding: 21px 20px;
  border-bottom: 1px solid var(--line);
}

.result-course header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.result-course h2 {
  margin: 0;
  font-size: 1.35rem;
}

.result-course header span {
  color: var(--leaf);
  font-size: .8rem;
  font-weight: 900;
}

.result-days {
  display: grid;
  gap: 0;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}

.result-day {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.status-dot {
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border: 2px solid var(--line);
  border-radius: 50%;
}

.result-day.is-done .status-dot {
  border-color: var(--leaf);
  background: var(--leaf);
}

.result-day strong {
  display: block;
  margin-bottom: 4px;
}

.result-day small {
  color: var(--muted);
  line-height: 1.5;
}

.settings-section {
  padding: 0 20px;
  background: var(--paper-2);
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.setting-row strong {
  display: block;
  margin-bottom: 4px;
}

.setting-row small {
  color: var(--muted);
  line-height: 1.5;
}

.setting-row input {
  width: 24px;
  height: 24px;
  accent-color: var(--coral);
}

.danger-zone {
  padding: 25px 20px;
  border-top: 1px solid var(--line);
}

.danger-zone h2 {
  margin: 0 0 7px;
  font-size: 1.25rem;
}

.danger-zone p {
  margin: 0 0 15px;
  color: var(--muted);
  line-height: 1.65;
}

.confirm-dialog {
  width: min(350px, calc(100% - 32px));
  padding: 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.confirm-dialog::backdrop {
  background: rgba(48, 39, 37, .62);
}

.confirm-dialog h2 {
  margin: 0 0 9px;
  font-size: 1.45rem;
}

.confirm-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 21px;
}

.app-error {
  padding: 42px 20px;
  text-align: center;
}

.app-error h1 {
  margin: 0 0 10px;
  font-size: 1.7rem;
}

.app-error p {
  color: var(--muted);
  line-height: 1.7;
}

@media (hover: hover) {
  .button:not(:disabled):hover,
  .day-row:hover,
  .safety-link:hover {
    filter: brightness(.96);
  }
}

@media (min-width: 560px) {
  body {
    padding: 24px 0;
  }

  .phone-shell {
    min-height: calc(100dvh - 48px);
    border: 1px solid rgba(48, 39, 37, .16);
    border-radius: 24px;
    box-shadow: var(--shadow);
  }

  .topbar {
    border-radius: 24px 24px 0 0;
  }

  .bottom-nav {
    right: calc((100vw - 430px) / 2);
    bottom: 24px;
    left: calc((100vw - 430px) / 2);
    border-radius: 0 0 24px 24px;
  }

  .toast {
    bottom: calc(var(--nav-height) + 42px);
  }
}

@media (max-width: 350px) {
  .course-card {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .course-hero h1,
  .day-head h1,
  .care-head h1 {
    font-size: 1.75rem;
  }

  .day-row {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .day-status {
    grid-column: 2;
  }

  .results-summary {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .result-count {
    width: 80px;
    height: 80px;
    font-size: 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* ---- 交互组件 v3 ---- */
.interaction-block { margin: 16px 0; padding: 14px; background: #faf6f0; border-radius: 12px; border: 1px solid #e8dfd4; }
.interaction-prompt { font-size: 14px; font-weight: 600; color: #5a3e2b; margin: 0 0 10px; }
.interaction-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.interaction-label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #4a3728; cursor: pointer; padding: 6px 10px; border-radius: 8px; transition: background 0.15s; }
.interaction-label:hover { background: #f0e8dc; }
.interaction-label input[type="checkbox"], .interaction-label input[type="radio"] { accent-color: #c4703f; width: 18px; height: 18px; }
.interaction-input { width: 100%; padding: 10px 12px; border: 1px solid #d4c4b0; border-radius: 8px; font-size: 15px; color: #3d2c29; background: #fff; box-sizing: border-box; }
.interaction-input:focus { outline: none; border-color: #c4703f; }
.interaction-submit { display: block; width: 100%; padding: 12px; margin-top: 10px; background: #c4703f; color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.interaction-submit:hover { background: #a86030; }
.interaction-submit:disabled { background: #a0988a; cursor: default; }
.interaction-feedback { margin-top: 12px; padding: 12px; background: #eef5e8; border-radius: 10px; font-size: 14px; color: #3d5a3d; line-height: 1.5; }

/* ---- 记录卡 v3.1：多字段 ---- */
.interaction-field { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.interaction-field-label { font-size: 13px; font-weight: 600; color: #6b5744; padding: 0; margin-bottom: 6px; }
.interaction-feedback.is-warn { background: #f7ece1; color: #8a5a2b; }

/* ---- 我的成果 · 7 天回顾 ---- */
.review-summary { margin: 12px 0 4px; }
.review-summary p { font-size: 14px; color: #6b5744; margin: 0 0 8px; }
.review-summary strong { color: #c4703f; }
.review-bar { height: 8px; background: #efe6d8; border-radius: 99px; overflow: hidden; }
.review-bar span { display: block; height: 100%; background: #c4703f; border-radius: 99px; transition: width 0.3s; }
.review-day { list-style: none; padding: 12px 14px; margin: 8px 0; background: #faf6f0; border: 1px solid #e8dfd4; border-radius: 12px; }
.review-day-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.review-day-head strong { font-size: 14px; color: #4a3728; }
.review-tags { font-size: 12px; color: #8a7f72; white-space: nowrap; }
.review-day.is-done .review-tags { color: #3d5a3d; }
.review-values { margin: 8px 0 0; padding-left: 18px; }
.review-values li { font-size: 13px; color: #6b5744; line-height: 1.7; }
.review-values strong { color: #3d2c29; }
.review-empty { margin: 8px 0 0; font-size: 12px; color: #a0988a; }
.review-finale { margin: 14px 0; padding: 14px; background: #eef5e8; border-radius: 12px; border: 1px solid #d8e5cc; }
.review-finale h3 { margin: 0 0 6px; font-size: 16px; color: #3d5a3d; }
.review-finale p { margin: 0 0 6px; font-size: 14px; color: #3d5a3d; line-height: 1.6; }
.review-finale-list { margin: 8px 0; padding-left: 18px; }
.review-finale-list li { font-size: 13px; color: #4a6a4a; line-height: 1.8; }
.review-next { margin-top: 8px !important; font-size: 13px !important; color: #5a7a5a !important; }

/* ---- 记录卡 v3.2：范围提示 + 分级反馈 ---- */
.interaction-hint { margin: 6px 0 0; font-size: 12px; color: #a0988a; line-height: 1.5; }
.interaction-feedback.is-alert { background: #f9e3e0; color: #8a3a2b; }
.review-flag { font-style: normal; margin-left: 6px; font-size: 12px; color: #8a3a2b; }

/* ---- v3.4 学习流重排+连胜+结算页+成就 ---- */
.day-progress { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; }
.progress-label { font-size: 13px; color: #8a7f72; white-space: nowrap; }
.progress-dots { display: flex; gap: 5px; flex: 1; }
.progress-dot { width: 8px; height: 8px; border-radius: 50%; background: #e8dfd4; flex: 0 0 auto; }
.progress-dot.is-done { background: #c4703f; }
.progress-dot.is-active { background: #c4703f; box-shadow: 0 0 0 3px rgba(196,112,63,0.25); }
.streak-chip { font-size: 12px; color: #c4703f; background: #faf0e6; padding: 2px 8px; border-radius: 99px; font-weight: 600; white-space: nowrap; }
.day-complete-zone { margin: 18px 0 8px; }
.day-complete-zone .button[disabled] { background: #a0988a; cursor: default; }

.wrapup-overlay { position: fixed; inset: 0; background: rgba(61,44,41,0.55); display: flex; align-items: center; justify-content: center; z-index: 90; padding: 20px; animation: wrapup-in 0.25s ease-out; }
@keyframes wrapup-in { from { opacity: 0; } to { opacity: 1; } }
.wrapup-card { background: #fffaf3; border-radius: 20px; padding: 28px 22px; max-width: 340px; width: 100%; text-align: center; box-shadow: 0 16px 48px rgba(61,44,41,0.35); animation: wrapup-card-in 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes wrapup-card-in { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.wrapup-check { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: #c4703f; color: #fff; font-size: 34px; line-height: 64px; font-weight: 700; }
.wrapup-card h2 { margin: 0 0 14px; font-size: 19px; color: #3d2c29; }
.wrapup-takeaway { background: #eef5e8; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; text-align: left; }
.wrapup-takeaway small { color: #5a7a5a; font-size: 11px; }
.wrapup-takeaway p { margin: 4px 0 0; font-size: 14px; color: #3d5a3d; line-height: 1.55; }
.wrapup-stats { display: flex; justify-content: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.wrapup-record { font-size: 12px; color: #8a7f72; background: #f5efe6; padding: 2px 8px; border-radius: 99px; }
.wrapup-progress { display: flex; justify-content: center; gap: 6px; margin-bottom: 16px; }
.wrapup-later { margin-top: 10px; background: none; border: none; color: #a0988a; font-size: 13px; cursor: pointer; text-decoration: underline; }

.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.badge { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: #f5efe6; color: #6b5744; border: 1px solid #e8dfd4; }
.badge-gold { background: #fdf3d7; color: #8a6d1f; border-color: #ecd9a0; }

/* ---- 仪式感 v2：彩带/火苗动画/里程碑/毕业典礼 ---- */
.confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 120; }

.streak-chip { animation: flame-flicker 2.2s ease-in-out infinite; }
@keyframes flame-flicker {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

.wrapup-milestone { background: #fdf0e0; border: 1px solid #f0cfa8; color: #a8601f; border-radius: 10px; padding: 9px 12px; margin-bottom: 12px; font-size: 14px; font-weight: 600; animation: milestone-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
@keyframes milestone-pop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.wrapup-check.is-finale { background: #f0b429; font-size: 38px; line-height: 64px; animation: badge-reveal 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.5); }
@keyframes badge-reveal { from { transform: scale(0.3) rotate(-20deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }

.wrapup-card.is-finale { background: #fffdf5; border: 2px solid #f0d9a0; }
.wrapup-finale-stats { font-size: 13px; color: #6b5744; margin: 6px 0 10px; }
.wrapup-finale-stats strong { color: #c4703f; font-size: 15px; }

.wrapup-progress .progress-dot.is-done { animation: dot-pop 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.4) backwards; }
.wrapup-progress .progress-dot:nth-child(1) { animation-delay: 0.02s; }
.wrapup-progress .progress-dot:nth-child(2) { animation-delay: 0.08s; }
.wrapup-progress .progress-dot:nth-child(3) { animation-delay: 0.14s; }
.wrapup-progress .progress-dot:nth-child(4) { animation-delay: 0.2s; }
.wrapup-progress .progress-dot:nth-child(5) { animation-delay: 0.26s; }
.wrapup-progress .progress-dot:nth-child(6) { animation-delay: 0.32s; }
.wrapup-progress .progress-dot:nth-child(7) { animation-delay: 0.38s; }
@keyframes dot-pop { from { transform: scale(0); } to { transform: scale(1); } }

.wrapup-teaser { font-size: 12px; color: #a0988a; margin: 2px 0 10px; }

@media (prefers-reduced-motion: reduce) {
  .streak-chip, .wrapup-check.is-finale, .wrapup-progress .progress-dot.is-done, .wrapup-milestone { animation: none !important; }
}

/* ---- 营记 v3.5：每日固定记录组 ---- */
.log-section { margin-top: 16px; padding-top: 14px; border-top: 1px dashed #e8dfd4; }
.log-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.log-badge { font-size: 11px; font-weight: 700; color: #fff; background: #8fbc8f; border-radius: 6px; padding: 2px 7px; letter-spacing: 1px; }
.log-title { font-size: 15px; color: #3d2c29; }
.log-intro { font-size: 12px; color: #a0988a; margin: 0 0 10px; line-height: 1.5; }
.log-more { margin-top: 4px; }
.log-more summary { font-size: 13px; color: #6b5744; cursor: pointer; padding: 8px 0; font-weight: 600; }
.log-more summary::marker { color: #c4703f; }
.log-more .interaction-field { margin-top: 10px; }
.log-more[open] summary { color: #c4703f; }

/* ---- 小结增强 ---- */
.review-subhead { margin: 12px 0 4px; font-size: 13px; color: #5a7a5a; }
.review-finale-count { font-size: 12px; color: #5a7a5a; margin-top: 8px !important; }
.review-finale-empty { font-size: 13px; color: #7a8a6a; }

/* ---- v3.6：七项欠账落地组件 ---- */
.action-label { display: flex; align-items: center; gap: 8px; }
.action-type { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; }
.action-type.is-daily { background: #eef5e8; color: #4a6a4a; }
.action-type.is-todo { background: #f0eaf7; color: #6a5a8a; }
.action-type.is-habit { background: #fdf0e0; color: #a8601f; }

.term { display: inline; background: none; border: none; padding: 0; margin: 0; font: inherit; color: #c4703f; border-bottom: 1px dashed #c4703f; cursor: pointer; }
.term-card { position: fixed; left: 50%; transform: translateX(-50%); bottom: 90px; width: min(340px, calc(100vw - 40px)); background: #fffaf3; border: 1px solid #e8dfd4; border-radius: 14px; padding: 14px 16px; box-shadow: 0 12px 32px rgba(61,44,41,0.28); z-index: 110; animation: term-in 0.25s ease-out; }
@keyframes term-in { from { opacity: 0; transform: translateX(-50%) translateY(8px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.term-card strong { color: #c4703f; font-size: 14px; }
.term-card p { margin: 6px 0 10px; font-size: 13px; color: #4a3728; line-height: 1.6; }
.term-card-close { width: 100%; padding: 9px; border: none; border-radius: 9px; background: #f5efe6; color: #6b5744; font-size: 13px; font-weight: 600; cursor: pointer; }

.review-section { margin-top: 4px; }
.review-quiz { background: #f7f4fd; border: 1px solid #e4ddf2; border-radius: 12px; padding: 14px; margin: 10px 0; }
.review-quiz-source { font-size: 11px; color: #8a7aa8; margin: 0 0 6px; }
.review-quiz-question { font-size: 14px; color: #3d2c29; margin: 0 0 10px; line-height: 1.5; }
.review-quiz .act-option { background: #fff; }
.act-option-correct { background: #e8f3e0 !important; border-color: #8fbc8f !important; }
.act-option-wrong { background: #f9e3e0 !important; border-color: #d97b66 !important; }
.review-quiz-feedback { font-size: 13px; margin: 10px 0 0; padding: 9px 11px; border-radius: 9px; }
.review-quiz-feedback.is-correct { background: #e8f3e0; color: #3d5a3d; }
.review-quiz-feedback.is-wrong { background: #f9e3e0; color: #8a3a2b; }

.ask-lingzhi { margin-top: 4px; }
.ask-inner { display: flex; align-items: center; gap: 10px; background: #f0f4fa; border: 1px solid #dce4f0; border-radius: 14px; padding: 13px 14px; }
.ask-mark { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: #4a6a9a; color: #fff; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ask-copy { flex: 1; min-width: 0; }
.ask-copy strong { display: block; font-size: 14px; color: #2f4468; }
.ask-copy small { display: block; font-size: 11.5px; color: #6a7a95; margin-top: 3px; line-height: 1.45; }
.ask-button { flex: 0 0 auto; border: none; background: #4a6a9a; color: #fff; font-size: 13px; font-weight: 600; padding: 8px 13px; border-radius: 9px; cursor: pointer; }

.unit-guide { margin-top: 4px; }
.guide-block { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; }
.guide-tag { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: #fff; background: #c4703f; border-radius: 6px; padding: 3px 8px; margin-top: 1px; }
.guide-block p { margin: 0; font-size: 13.5px; color: #4a3728; line-height: 1.6; }
.guide-list { margin: 0; padding-left: 16px; }
.guide-list li { font-size: 13.5px; color: #4a3728; line-height: 1.7; }

/* ---- 审查整改 v3.7 ---- */
.wrapup-teaser-hint { font-size: 12px; color: #a8601f; background: #fdf7ee; border-radius: 8px; padding: 6px 10px; margin-bottom: 10px; }

/* ---- 整改 v3.8：目标环/onboarding/常驻进度/错题/导航 ---- */
.day-progress { position: sticky; top: 0; z-index: 30; background: #f7f2ec; padding: 8px 0 6px; }
.day-progress .progress-dots { align-items: center; }

.goal-ring-row { display: flex; align-items: center; gap: 12px; background: #f7f4fd; border: 1px solid #e4ddf2; border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.goal-ring { width: 44px; height: 44px; flex: 0 0 auto; transform: rotate(-90deg); }
.goal-ring-bg { fill: none; stroke: #e4ddf2; stroke-width: 3; }
.goal-ring-fill { fill: none; stroke: #8a7ac8; stroke-width: 3; stroke-linecap: round; transition: stroke-dasharray 0.4s ease; }
.goal-ring-fill.is-done { stroke: #6aa86a; }
.goal-ring-copy strong { display: block; font-size: 13.5px; color: #4a3a68; }
.goal-ring-copy small { display: block; font-size: 12px; color: #7a6a95; margin-top: 2px; }

.onboarding-card { max-width: 340px; }
.onboarding-lead { font-size: 13.5px; color: #6b5744; margin: 0 0 14px; line-height: 1.6; }
.onboarding-options { display: flex; flex-direction: column; gap: 9px; }
.onboarding-option { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1.5px solid #e8dfd4; background: #fffdf9; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.onboarding-option:hover { border-color: #c4703f; background: #fdf6ef; }
.onboarding-option strong { font-size: 14.5px; color: #3d2c29; }
.onboarding-option small { font-size: 12px; color: #8a7f72; }
.onboarding-option.is-recommended { border-color: #c4703f; background: #fdf3ea; }
.onboarding-note { font-size: 11.5px; color: #a0988a; margin: 12px 0 0; }

.setting-row-stack { flex-direction: column; align-items: stretch; gap: 8px; }
.goal-picker { display: flex; gap: 8px; }
.goal-pill { flex: 1; padding: 9px 0; border-radius: 9px; border: 1.5px solid #e8dfd4; background: #fffdf9; color: #6b5744; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.goal-pill.is-active { border-color: #c4703f; background: #fdf3ea; color: #a8601f; }

.review-quiz.is-mistake { background: #fdf6ef; border-color: #f0dcc8; }
.review-quiz.is-mistake .review-quiz-source { color: #a8601f; }

.nav-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.nav-chip { font-size: 12.5px; padding: 7px 11px; border-radius: 99px; border: 1px solid #e8dfd4; background: #fffdf9; color: #5a4a3a; cursor: pointer; text-align: left; }
.nav-chip:hover { border-color: #c4703f; color: #a8601f; }


/* 28 天阶段感：进度点周分组 + 周标题（付费课） */
.progress-dot.is-week-end { margin-right: 7px; }
.week-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 4px 6px;
}
.week-header .week-no {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #c4703f;
  border-radius: 999px;
  padding: 2px 9px;
}
.week-header strong { font-size: 15px; color: #4a3f36; }
.week-header small { color: #8a7f72; font-size: 12px; }

.axis-chip {
  display: inline-block;
  font-size: 12px;
  color: #7a5c43;
  background: #f6ead9;
  border: 1px solid #e6d3ba;
  border-radius: 999px;
  padding: 2px 9px;
  margin-right: 6px;
}

/* 阶段节点卡片（付费课复评/方案确认日） */
.milestone-card {
  margin: 12px 0 4px;
  padding: 14px 16px;
  background: #fdf7ef;
  border: 1px solid #ecd9bd;
  border-radius: 16px;
}
.milestone-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.milestone-tag {
  font-size: 12px; font-weight: 700; color: #fff;
  background: #b4643a; border-radius: 999px; padding: 2px 10px;
}
.milestone-head strong { font-size: 16px; color: #4a3f36; }
.milestone-card p { color: #6f6459; font-size: 13px; line-height: 1.65; margin: 8px 0 0; }
.milestone-flow {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 10px;
}
.ms-step {
  font-size: 12px; color: #7a5c43; background: #f6ead9;
  border: 1px solid #e6d3ba; border-radius: 999px; padding: 3px 10px;
}
.ms-arrow { color: #b99e80; font-size: 12px; }
.milestone-demo { font-size: 12px; color: #b09a86 !important; margin-top: 8px !important; }

/* 天数多时（>10）横向滚动：一行展示，当前天自动滚入视野 */
.day-tabs.is-scroll {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.day-tabs.is-scroll::-webkit-scrollbar { display: none; }
.day-tabs.is-scroll button { flex: 0 0 auto; min-width: 66px; }

/* 程序化焦点标题（切换页面时聚焦到 h1，供读屏播报）：不显示浏览器默认描边 */
h1[tabindex="-1"]:focus,
h1[tabindex="-1"]:focus-visible {
  outline: none;
}

/* 天数多时（>14）进度点自适应：标签与点分两行，点可折行且缩小，窄屏不溢出 */
.day-progress.is-dense { flex-wrap: wrap; }
.day-progress.is-dense .progress-dots {
  flex: 1 1 100%;
  min-width: 0;
  flex-wrap: wrap;
  gap: 4px;
}
.day-progress.is-dense .progress-dot { width: 7px; height: 7px; }
.day-progress.is-dense .progress-dot.is-week-end { margin-right: 5px; }
