:root {
  --accent: #816f91;
  --accent-soft: #eee8f0;
  --ink: #2f2932;
  --muted: #7a717d;
  --line: #ded6df;
  --paper: #fffdfd;
  --canvas: #f5f0f5;
  --shadow: 0 16px 40px rgba(96, 73, 103, .12);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at 90% -10%, color-mix(in srgb, var(--accent) 13%, white), transparent 34%), var(--canvas); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { width: min(100%, 780px); min-height: 100vh; margin: 0 auto; background: rgba(255,255,255,.34); padding-bottom: 108px; }
.app-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; min-height: 76px; padding: max(12px, env(safe-area-inset-top)) 20px 12px; background: rgba(250,247,250,.92); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(129,111,145,.14); }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; color: white; font: 700 22px/1 Georgia,serif; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 78%, white), var(--accent)); box-shadow: var(--shadow); }
.brand-copy { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.brand-copy small, .eyebrow, .page-title small, .section-heading small { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.brand-copy strong { font-size: 19px; }
.icon-button, .text-button { min-height: 44px; border: 0; color: var(--accent); background: transparent; font-weight: 700; }
.page { display: none; padding: 28px 20px 24px; }
.page.active { display: block; animation: reveal .2s ease; }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } }
.hero { padding: 20px 0 14px; }
.hero h1, .page-title h1 { margin: 8px 0 12px; font-size: clamp(32px, 8.7vw, 52px); line-height: 1.16; letter-spacing: -.04em; }
.hero p, .page-title p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.page-title { margin-bottom: 28px; }
.section-block { margin-top: 30px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-heading h2 { margin: 4px 0 0; font-size: 23px; }
.goal-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.goal-card { min-height: 116px; padding: 18px; border-radius: 24px; color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, white); border: 1px solid color-mix(in srgb, var(--accent) 18%, white); }
.goal-card span { display: block; font-size: 12px; opacity: .72; }
.goal-card strong { display: block; margin-top: 16px; font-size: 20px; }
.goal-card small { display: block; margin-top: 4px; opacity: .68; }
.empty-card, .privacy-note, .composer, .fact-pool, .space-card { padding: 24px; border: 1px solid rgba(129,111,145,.14); border-radius: 28px; background: var(--paper); box-shadow: var(--shadow); }
.empty-card { text-align: center; }
.empty-card.compact { margin-top: 18px; padding: 20px; text-align: left; box-shadow: none; }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 14px; color: white; font-size: 28px; border-radius: 18px; background: var(--accent); }
.empty-card strong { display: block; font-size: 19px; }
.empty-card p { color: var(--muted); line-height: 1.6; }
.primary-button, .secondary-button { min-height: 50px; width: 100%; padding: 0 18px; border-radius: 17px; font-weight: 800; border: 1px solid var(--accent); }
.primary-button { color: white; background: var(--accent); box-shadow: 0 10px 25px color-mix(in srgb, var(--accent) 25%, transparent); }
.primary-button:disabled { opacity: .38; box-shadow: none; }
.secondary-button { color: var(--accent); background: white; }
.privacy-note { display: flex; gap: 14px; margin-top: 26px; box-shadow: none; background: color-mix(in srgb, var(--accent) 6%, white); }
.privacy-note span { flex: 0 0 auto; color: var(--accent); font-weight: 800; }
.privacy-note p { margin: 0; color: var(--muted); line-height: 1.6; }
.space-card { margin-top: 16px; box-shadow: none; }
.space-card-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.space-card-head small { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.space-card-head h2 { margin: 5px 0 0; font-size: 22px; }
.local-badge { padding: 7px 10px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 12px; font-weight: 800; }
.space-card dl { margin: 20px 0 14px; border-top: 1px solid var(--line); }
.space-card dl div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.space-card dt { color: var(--muted); }.space-card dd { margin: 0; font-weight: 800; text-align: right; overflow-wrap: anywhere; }
.warning-text { color: #a35e35; }
.space-card > p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.backup-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
label { display: grid; gap: 8px; color: var(--ink); font-weight: 700; }
textarea, input { width: 100%; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: white; outline: none; }
textarea { min-height: 118px; padding: 15px; resize: vertical; line-height: 1.55; }
input { min-height: 48px; padding: 0 14px; }
textarea:focus, input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.composer { display: grid; gap: 18px; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chip { flex: 0 0 auto; min-height: 40px; padding: 0 14px; border: 1px solid color-mix(in srgb, var(--accent) 22%, white); border-radius: 999px; color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, white); }
.chip.active { color: white; background: var(--accent); }
.count { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; color: var(--accent); font-weight: 800; background: var(--accent-soft); }
.list-stack { display: grid; gap: 12px; }
.idea-item { padding: 17px; border-radius: 20px; background: white; border-left: 6px solid var(--accent); box-shadow: 0 9px 24px rgba(74,55,80,.08); }
.idea-item strong { display: block; font-size: 17px; }
.idea-item small { display: block; margin-top: 7px; color: var(--accent); }
.empty-inline { padding: 26px 16px; margin-bottom: 18px; text-align: center; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); }
.month-toolbar { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; margin-bottom: 14px; padding: 8px; border-radius: 20px; background: white; box-shadow: var(--shadow); }
.month-toolbar strong { text-align: center; font-size: 18px; }
.month-toolbar button { width: 44px; height: 44px; border: 0; border-radius: 14px; color: var(--accent); background: var(--accent-soft); font-size: 28px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); }
.calendar-weekdays span { padding: 9px 0; color: var(--muted); font-size: 12px; text-align: center; }
.calendar-grid { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: white; }
.calendar-day { min-height: 58px; padding: 8px 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; text-align: center; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.muted { color: #bcb4be; background: #faf8fa; }
.calendar-day.today span { display: inline-grid; place-items: center; width: 27px; height: 27px; border-radius: 10px; color: white; background: var(--accent); }
.stage-strip { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 20px; }
.stage-strip article { padding: 18px; border-radius: 22px; background: white; border: 1px solid var(--line); }
.stage-strip span { color: var(--accent); font-weight: 900; }
.stage-strip strong, .stage-strip small { display: block; margin-top: 8px; }
.stage-strip small { color: var(--muted); }
.fact-pool { display: grid; gap: 18px; }
.hint { color: var(--muted); line-height: 1.5; }
.fab { position: fixed; z-index: 15; right: max(18px, calc((100vw - 740px)/2)); bottom: 98px; width: 60px; height: 60px; border: 0; border-radius: 22px; color: white; background: var(--accent); font-size: 32px; box-shadow: 0 18px 35px color-mix(in srgb, var(--accent) 38%, transparent); }
.bottom-nav { position: fixed; z-index: 14; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%,780px); display: grid; grid-template-columns: repeat(5,1fr); padding: 8px 8px max(9px,env(safe-area-inset-bottom)); background: rgba(255,253,255,.95); backdrop-filter: blur(20px); border-top: 1px solid rgba(129,111,145,.14); }
.bottom-nav button { min-height: 62px; display: grid; place-items: center; align-content: center; gap: 4px; border: 0; border-radius: 18px; color: var(--muted); background: transparent; }
.bottom-nav button.active { color: var(--accent); background: var(--accent-soft); }
.bottom-nav span { font-size: 22px; }.bottom-nav small { font-size: 12px; }
.setup-dialog { width: min(calc(100% - 24px),520px); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 30px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 80px rgba(49,37,54,.28); }
.setup-dialog::backdrop { background: rgba(48,38,51,.56); backdrop-filter: blur(5px); }
.setup-dialog form { display: grid; gap: 18px; padding: 24px; }
.setup-progress { display: flex; justify-content: space-between; color: var(--accent); font-weight: 800; }
.setup-hero { text-align: center; }.setup-logo { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 22px; color: white; font-size: 30px; background: var(--accent); }
.setup-hero h2 { margin: 0; font-size: 27px; }.setup-hero p { color: var(--muted); }
fieldset { margin: 0; padding: 0; border: 0; } legend { margin-bottom: 10px; font-weight: 800; }
.color-options, .check-options { display: grid; gap: 9px; }
.color-options label, .check-options label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 14px; font-weight: 600; }
.color-options i { width: 22px; height: 22px; border-radius: 8px; background: var(--swatch); }
.skip-button { min-height: 44px; border: 0; color: var(--muted); background: transparent; }
.setup-safe { margin: -6px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 104px; transform: translate(-50%, 18px); max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 14px; color: white; background: #352e38; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 680px) {
  .page { padding: 38px 42px; }
  .goal-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .calendar-day { min-height: 88px; }
  .stage-strip { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 380px) {
  .page { padding-left: 16px; padding-right: 16px; }
  .hero h1, .page-title h1 { font-size: 31px; }
  .app-header { padding-left: 16px; padding-right: 16px; }
  .brand-copy small { letter-spacing: .09em; }
  .fab { right: 14px; }
}
