@charset "UTF-8";

/* V0.6: one state system, three visual materials. Calendar states use theme tokens. */
body[data-theme="air"] {
  --outer:#e5edf0; --paper:#f7faf9; --panel:#fcfefd; --ink:#1c3139; --muted:#5d7378;
  --accent:#3c7d8e; --accent-deep:#286677; --soft:#e4f0f2; --track:#d9e5e7;
  --calendar-base:#e7f0f2; --calendar-done:#bdd9e1; --calendar-key:#3c7d8e; --calendar-achieved:#82b2c0;
  --gain:#2e6c58; --gain-bg:#e0f0e7; --negative:#a35d52; --negative-pale:#f9ebe6;
  --sage:#3c7d8e; --sage-deep:#286677; --sage-pale:#e4f0f2; --line:#d9e5e7;
}
body[data-theme="ceramic"] {
  --outer:#e8ded1; --paper:#f7f4ed; --panel:#fffbf5; --ink:#39332e; --muted:#776c62;
  --accent:#9a6148; --accent-deep:#804a34; --soft:#efe4d7; --track:#e8dcd0;
  --calendar-base:#f0e6da; --calendar-done:#e1c9b4; --calendar-key:#9a6148; --calendar-achieved:#bd9073;
  --gain:#476b4a; --gain-bg:#e7eee1; --negative:#9f594f; --negative-pale:#f5e5df;
  --sage:#9a6148; --sage-deep:#804a34; --sage-pale:#efe4d7; --line:#e8dcd0;
}
body[data-theme="glass"] {
  --outer:#dce2ef; --paper:#edf2f8; --panel:rgba(252,253,255,.78); --ink:#28364d; --muted:#62718a;
  --accent:#626fa4; --accent-deep:#4b5c94; --soft:#e3e9f7; --track:#d2daec;
  --calendar-base:#e5ebf8; --calendar-done:#cad3f0; --calendar-key:#626fa4; --calendar-achieved:#8898c9;
  --gain:#386b66; --gain-bg:#e0f1ed; --negative:#a35d68; --negative-pale:#f8e9eb;
  --sage:#626fa4; --sage-deep:#4b5c94; --sage-pale:#e3e9f7; --line:#d2daec;
}
:root { font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; }
body { color:var(--ink); background:var(--outer); transition:background .25s ease,color .25s ease; }
.page-wrap { min-height:100dvh; padding:0; background:var(--outer); }
body[data-theme="glass"] .page-wrap { background:radial-gradient(circle at 90% 3%,#c8d6fa 0,transparent 23%),radial-gradient(circle at 5% 27%,#d2efe5 0,transparent 23%),var(--outer); }
.app-shell { width:min(100%,520px); min-height:100dvh; padding:0 20px 34px; background:var(--paper); box-shadow:0 20px 60px -25px #22333b30; }
body[data-theme="glass"] .app-shell { background:rgba(237,242,248,.76); backdrop-filter:blur(20px); }
.topbar { padding:30px 0 18px; }
.brand { font-size:15px; letter-spacing:0; font-weight:720; }
.brand-mark { display:inline-grid; place-items:center; width:29px; height:29px; border-radius:8px; color:#fff; background:var(--accent); font:750 13px/1 system-ui; }
.topbar-actions { display:flex; align-items:center; gap:7px; }
.topbar .icon-button { min-height:42px; padding:8px 10px; border-radius:12px; background:var(--panel); box-shadow:0 2px 8px #22333b0d; color:var(--ink); font-size:11px; }
.topbar .icon-button:hover { background:var(--soft); }
.mini-label { color:var(--muted); letter-spacing:0; font-size:12px; }
.sprint-card { padding:25px 0 26px; border-bottom:1px solid var(--line); }
.sprint-card .mini-label { display:flex; justify-content:space-between; align-items:center; gap:6px; margin:0 0 20px; color:var(--accent-deep); font-weight:720; }
#current-third { border-radius:99px; padding:6px 9px; background:var(--soft); font-size:11px; white-space:nowrap; }
.sprint-card h1 { color:var(--ink); font-size:24px; font-weight:720; letter-spacing:-.05em; }
.sprint-timer { margin:9px 0 4px; color:var(--ink); font:730 clamp(48px,14.6vw,72px)/1.03 "Segoe UI",system-ui,sans-serif; letter-spacing:-.075em; font-variant-numeric:tabular-nums; }
.sprint-context { min-height:0; max-width:none; margin:0 0 24px; font-size:12px; color:var(--muted); }
.day-thirds { gap:9px; }
.third { font-size:11px; }
.third i { background:var(--track); height:5px; }
.third i::before { background:var(--accent); }
.third.active { color:var(--accent-deep); }
.progress-metrics { display:grid; gap:0; margin-top:23px; }
.progress-metric { padding:15px 0; border-top:1px solid var(--line); }
.progress-metric > div { display:flex; justify-content:space-between; gap:12px; align-items:baseline; }
.progress-metric span { font-size:13px; font-weight:680; }
.progress-metric strong { font:750 20px/1 "Segoe UI",system-ui,sans-serif; letter-spacing:-.04em; font-variant-numeric:tabular-nums; }
.progress-metric small { display:block; margin-top:6px; color:var(--muted); font-size:11px; line-height:1.5; }
.progress-metric > i { display:block; height:4px; margin-top:11px; background:var(--track); border-radius:99px; overflow:hidden; }
.progress-metric > i b { display:block; height:100%; width:0; background:var(--accent); border-radius:inherit; transition:width .3s ease; }
body[data-theme="ceramic"] .sprint-card { margin-top:2px; padding:22px 15px 0; border:0; border-radius:22px; background:var(--soft); box-shadow:inset 0 1px 8px #ffffffb7,0 15px 30px -25px #65473566; text-align:center; }
body[data-theme="ceramic"] .sprint-card .mini-label,body[data-theme="glass"] .sprint-card .mini-label { text-align:left; }
body[data-theme="ceramic"] .sprint-timer { font-size:clamp(45px,13vw,62px); }
body[data-theme="ceramic"] .day-thirds { text-align:left; }
body[data-theme="ceramic"] .progress-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; margin:22px -15px 0; padding:9px 0 0; background:var(--paper); }
body[data-theme="ceramic"] .progress-metric { display:flex; flex-direction:column; align-items:stretch; min-height:112px; padding:12px 8px; border:0; border-radius:16px; background:var(--panel); text-align:left; }
body[data-theme="ceramic"] .progress-metric > div { display:block; }
body[data-theme="ceramic"] .progress-metric span { display:block; min-height:35px; font-size:10px; }
body[data-theme="ceramic"] .progress-metric strong { font-size:17px; }
body[data-theme="ceramic"] .progress-metric small { display:none; }
body[data-theme="ceramic"] .progress-metric > i { margin-top:auto; }
body[data-theme="glass"] .sprint-card { padding:22px 16px 0; border:1px solid #ffffffc9; border-radius:22px; background:rgba(251,253,255,.56); box-shadow:0 20px 40px -30px #4a5c9c66,inset 0 1px #fff; backdrop-filter:blur(18px); }
body[data-theme="glass"] .progress-metrics { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin:20px -16px 0; padding:10px 0 0; background:var(--paper); }
body[data-theme="glass"] .progress-metric { min-height:84px; padding:10px 12px; border:1px solid #ffffffbe; border-radius:15px; background:rgba(253,254,255,.65); }
body[data-theme="glass"] .progress-metric:first-child { grid-column:1/-1; min-height:72px; }
body[data-theme="glass"] .progress-metric:not(:first-child) > div { display:block; }
body[data-theme="glass"] .progress-metric:not(:first-child) small { display:none; }

.timeline-card { padding:34px 0 28px; border-color:var(--line); }
.timeline-heading { align-items:baseline; }
.timeline-heading h2 { font-size:25px; font-weight:740; letter-spacing:-.06em; }
.journey-count { font:740 20px/1 "Segoe UI",system-ui,sans-serif; color:var(--ink); }
.timeline-summary { margin:10px 0 0; color:var(--accent-deep); font-size:12px; line-height:1.5; }
.timeline-viewport { margin-top:15px; padding:16px 0 0; scrollbar-width:none; }
.timeline-track { width:300%; min-width:870px; height:113px; }
.timeline-progress-base { top:41px; height:5px; background:var(--track); }
.timeline-progress-fill { background:var(--accent); }
.timeline-marker { top:-4px; width:12px; height:12px; border:2px solid var(--paper); background:var(--accent); box-shadow:none; }
.timeline-current-day-marker { position:absolute; top:0; transform:translateX(-19px); min-width:86px; height:25px; padding:5px 7px; border-radius:8px; background:var(--soft); color:var(--accent-deep); font-size:11px; line-height:15px; font-weight:730; white-space:nowrap; text-align:center; }
.timeline-current-day-marker::after { content:""; position:absolute; top:100%; left:19px; height:16px; border-left:1px solid var(--accent); }
.timeline-ruler { inset:53px 0 0; }
.timeline-ruler span,.timeline-ruler span:last-child { width:24px; margin-left:-12px; transform:none; font-size:10px; color:var(--muted); }
.timeline-ruler span::before { background:var(--muted); }
.timeline-ruler span:first-child { margin-left:0; text-align:left; }
.timeline-ruler .major-tick { color:var(--accent-deep); }
.timeline-ruler .major-tick::before { background:var(--accent); }
.timeline-hint { margin-top:-17px; font-size:11px; color:var(--muted); }
.timeline-current { gap:10px; margin-top:20px; }
.daily-experience { background:var(--soft); border:0; border-radius:17px; padding:15px 13px; }
.daily-experience.is-next { background:var(--panel); }
.daily-experience h3 { color:var(--ink); }
.daily-experience-phase,.daily-experience-eyebrow { color:var(--muted); }
.effect-chip { border:0; background:var(--gain-bg); color:var(--gain); border-radius:9px; }
.effect-chip.negative { border:0; background:var(--negative-pale); color:var(--negative); }
.effect-chip:hover { filter:brightness(.97); }
.effect-symbol { display:inline-block; width:13px; height:13px; border-radius:50%; background:currentColor; position:relative; opacity:.8; }
.effect-symbol::after { content:""; position:absolute; left:5px; top:4px; width:3px; height:5px; border-left:1.5px solid #fff; border-top:1.5px solid #fff; transform:rotate(45deg); }
.effect-chip.negative .effect-symbol::after { top:3px; transform:rotate(225deg); }

.calendar-card { padding:30px 0 28px; border-color:var(--line); }
.calendar-top h2 { font-size:23px; letter-spacing:-.05em; }
.month-controls button { color:var(--accent-deep); }
.cycle-summary { background:var(--soft); color:var(--ink); }
.calendar-instruction { color:var(--muted); }
.calendar-day-cell.in-cycle,.calendar-day-cell { background:var(--calendar-base); }
.calendar-day-cell.history-cycle { background:var(--soft); }
.calendar-day-cell.success { background:var(--calendar-done); }
.calendar-day-cell.event { background:var(--negative-pale); }
.calendar-day-cell.today { border:2px solid var(--accent); }
.calendar-day-cell.key-day-cell { box-shadow:none; }
.calendar-date-button { color:var(--ink); }
.calendar-date-button.success { color:var(--accent-deep); }
.calendar-date-button:disabled { color:var(--muted); }
.calendar-target-button { border:0; background:var(--soft); color:var(--accent-deep); box-shadow:none; }
.calendar-target-button.key { border:0; background:var(--calendar-key); color:#fff; box-shadow:none; }
.calendar-target-button.achieved { background:var(--calendar-achieved); color:var(--ink); }
.calendar-target-button.key.achieved { background:var(--calendar-key); color:#fff; }
.calendar-target-button:hover { background:var(--calendar-achieved); }
.calendar-target-button.key:hover { background:var(--accent-deep); }
.status-tag.success { color:var(--accent-deep); }
.success-choice { border-color:var(--line); background:var(--panel); }
.success-choice.active { border-color:var(--accent); background:var(--soft); }
.choice-check,.stepper button { background:var(--soft); color:var(--accent-deep); }
.today-card { border-color:var(--line); }
.today-actions .primary-button,.primary-button { border-color:var(--accent); background:var(--accent); }
.primary-button:hover { background:var(--accent-deep); }
.outline-button { border-color:var(--accent); color:var(--accent-deep); }
.urge-button { background:var(--soft); border-color:var(--line); }
.urge-button .arrow { color:var(--accent); }
.modal { background:var(--paper); color:var(--ink); border-color:var(--line); }
.modal-close { background:var(--soft); }
.urge-progress { background:var(--soft); }
.theme-options { display:grid; gap:8px; }
.theme-options button { display:flex; align-items:center; gap:12px; min-height:64px; padding:10px 12px; border:1px solid var(--line); border-radius:13px; background:var(--panel); color:var(--ink); text-align:left; }
.theme-options button[aria-pressed="true"] { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.theme-options strong,.theme-options small { display:block; }
.theme-options strong { font-size:13px; }
.theme-options small { margin-top:4px; color:var(--muted); font-size:11px; }
.theme-swatch { flex:none; width:30px; height:30px; border-radius:50%; border:1px solid #0002; }
.theme-swatch.air { background:linear-gradient(135deg,#f7faf9 50%,#3c7d8e 50%); }
.theme-swatch.ceramic { background:linear-gradient(135deg,#f7f4ed 50%,#9a6148 50%); }
.theme-swatch.glass { background:linear-gradient(135deg,#edf2f8 50%,#626fa4 50%); }
@media(max-width:360px) { .app-shell { padding:0 16px 28px; } .topbar .icon-button { padding:7px; } .sprint-timer { font-size:47px; } .calendar-day-cell { min-height:72px; } .calendar-target-button { font-size:10px; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms!important; transition-duration:.01ms!important; } }
