:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;--bg:#f8fafc;--surface:#fff;--text:#0f172a;--muted:#64748b;--border:#e2e8f0;--accent:#0f766e;--accent-text:#fff;--user-bubble:#ccfbf1;--ok:#dcfce7;--warn:#fef3c7;--warn-strong:#d97706;--error:#fee2e2;--info:#e0f2fe;--danger-text:#b91c1c;font-family:system-ui,-apple-system,PingFang TC,Noto Sans TC,Microsoft JhengHei,sans-serif;line-height:1.6}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial;--bg:#0b1220;--surface:#131c2e;--text:#e2e8f0;--muted:#94a3b8;--border:#24304a;--accent:#2dd4bf;--accent-text:#042f2e;--user-bubble:#134e4a;--ok:#14532d;--warn:#57400a;--warn-strong:#fbbf24;--error:#5b1d1d;--info:#0c3a55;--danger-text:#fca5a5}}*{box-sizing:border-box}html,body,#root{height:100%}body{background:var(--bg);color:var(--text);margin:0}.shell{flex-direction:column;max-width:760px;height:100dvh;margin:0 auto;display:flex}.topbar{padding:12px 16px 8px;padding-top:calc(12px + env(safe-area-inset-top));align-items:baseline;gap:12px;display:flex}.topbar h1{color:var(--accent);white-space:nowrap;margin:0;font-size:1.15rem}@media (width<=420px){.topbar{gap:8px}.topbar .page-label{display:none}}.version{color:var(--muted);border:1px solid var(--border);white-space:nowrap;border-radius:999px;align-self:center;padding:1px 8px;font-size:.7rem;font-weight:600}.page{flex-direction:column;flex:1;gap:12px;padding:8px 16px 16px;display:flex;overflow-y:auto}.stack{flex-direction:column;gap:12px;display:flex}.chat-page{overflow:hidden}.tabbar{border-top:1px solid var(--border);background:var(--surface);padding-bottom:env(safe-area-inset-bottom);display:flex}.tabbar button{color:var(--muted);background:0 0;border:0;border-radius:0;flex-direction:column;flex:1;align-items:center;gap:2px;padding:8px 2px;font-size:.72rem;display:flex}.tabbar button span{font-size:1.15rem}.tabbar button.active{color:var(--accent);font-weight:600}.card{background:var(--surface);border:1px solid var(--border);border-radius:12px;flex-direction:column;gap:10px;padding:14px 16px;display:flex}h2{margin:0;font-size:1rem}p{margin:0}label{color:var(--muted);flex-direction:column;gap:4px;min-width:0;font-size:.85rem;display:flex}label.check{color:var(--text);flex-direction:row;align-items:center;gap:8px}input,select,textarea,button,.button{font:inherit;color:var(--text);border:1px solid var(--border);background:var(--surface);border-radius:8px;min-width:0;padding:8px 10px}input[type=checkbox],input[type=radio]{width:18px;height:18px;accent-color:var(--accent)}input[type=range]{accent-color:var(--accent);padding:0}textarea{resize:vertical;width:100%}button,.button{cursor:pointer;white-space:nowrap;flex-direction:row;font-size:.9rem}button:disabled{opacity:.5;cursor:not-allowed}button.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-text);font-weight:600}button.danger{color:var(--danger-text);border-color:var(--danger-text)}button.link{color:var(--accent);background:0 0;border:0;padding:0 6px;text-decoration:underline}a{color:var(--accent)}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;display:grid}.grid .wide{grid-column:1/-1}.row{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.row.between{justify-content:space-between}.row>input{flex:1}.list{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.list>li{border-top:1px solid var(--border);flex-direction:column;gap:6px;padding:10px 0;display:flex}.list>li:first-child{border-top:0}.dim{opacity:.55}.muted{color:var(--muted)}.small{font-size:.82rem}.center{text-align:center}.notice{border-radius:10px;flex-direction:column;align-items:flex-start;gap:6px;padding:10px 12px;font-size:.9rem;display:flex}.notice.ok{background:var(--ok)}.notice.warn{background:var(--warn)}.notice.error{background:var(--error)}.notice.info{background:var(--info)}.notice ul{margin:0;padding-left:1.2em}.notices{flex-direction:column;gap:6px;margin:0 16px 4px;display:flex}.notice.test-banner{background:var(--warn);flex-flow:wrap;justify-content:space-between;align-items:center}pre{white-space:pre-wrap;font:inherit;margin:0}.messages{flex-direction:column;flex:1;gap:10px;padding-top:12px;padding-bottom:8px;display:flex;overflow-y:auto;-webkit-mask-image:linear-gradient(#0000,#000 12px);mask-image:linear-gradient(#0000,#000 12px)}.empty{text-align:center;flex-direction:column;gap:6px;margin:auto;padding:24px;display:flex}.bubble{overflow-wrap:anywhere;border-radius:16px;max-width:88%;padding:10px 14px}.bubble.user{background:var(--user-bubble);white-space:pre-wrap;border-bottom-right-radius:4px;align-self:flex-end}.bubble.assistant{background:var(--surface);border:1px solid var(--border);border-bottom-left-radius:4px;align-self:flex-start}.msg{flex-direction:column;gap:2px;max-width:88%;display:flex}.msg.user{align-self:flex-end;align-items:flex-end}.msg.assistant{align-self:flex-start;align-items:flex-start}.msg>.bubble{max-width:100%}.msg-actions{opacity:0;gap:12px;padding:0 6px;transition:opacity .15s;display:flex}.msg:hover .msg-actions,.msg:focus-within .msg-actions{opacity:1}@media (hover:none){.msg-actions{opacity:.7}}.msg-actions .link{color:var(--muted);padding:2px 0}.quote{text-align:left;max-width:100%;font:inherit;color:var(--muted);border:none;border-left:3px solid var(--border);text-overflow:ellipsis;white-space:nowrap;cursor:pointer;background:0 0;margin:0;padding:2px 8px;font-size:.8rem;display:block;overflow:hidden}span.quote{cursor:default}.quote-who{margin-right:6px;font-weight:600}.remember-edit{flex-direction:column;gap:6px;width:min(420px,80vw);display:flex}.remember-edit textarea{width:100%}.msg.archived>.bubble,.msg.archived>.quote{opacity:.6;transition:opacity .15s}.msg.archived:hover>.bubble,.msg.archived:focus-within>.bubble,.msg.archived:hover>.quote{opacity:1}.archived-divider{color:var(--muted);align-self:stretch;align-items:center;gap:10px;margin:14px 0 6px;font-size:.8rem;display:flex}.archived-divider:before,.archived-divider:after{content:"";background:var(--border);flex:1;height:1px}.archived-divider>span{border:1px solid var(--border);background:var(--surface);color:var(--text);text-align:center;border-radius:999px;flex-direction:column;align-items:center;padding:4px 14px;font-weight:600;display:flex}.archived-sub{color:var(--muted);font-size:.75rem;font-weight:400}.composer.replying{flex-wrap:wrap}.reply-bar{flex-basis:100%;align-items:center;gap:8px;min-width:0;display:flex}.reply-bar .quote{flex:1;min-width:0}.footer{align-self:flex-start}.composer{align-items:flex-end;gap:8px;display:flex}.composer textarea{resize:none;flex:1}.markdown>:first-child{margin-top:0}.markdown>:last-child{margin-bottom:0}.markdown p,.markdown ul,.markdown ol{margin:.5em 0}.markdown ul,.markdown ol{padding-left:1.3em}.markdown h1,.markdown h2,.markdown h3{margin:.8em 0 .3em;font-size:1rem}.markdown table{border-collapse:collapse;font-size:.88rem;display:block;overflow-x:auto}.markdown th,.markdown td{border:1px solid var(--border);text-align:left;padding:4px 8px}.markdown code{background:var(--bg);border-radius:4px;padding:0 4px}.steps{flex-direction:column;gap:12px;margin:0;padding:0;list-style:none;display:flex}.step{flex-direction:column;gap:6px;display:flex}.step-head{align-items:center;gap:8px;display:flex}.step-mark{background:var(--accent);width:1.6em;height:1.6em;color:var(--accent-text);border-radius:50%;flex:none;justify-content:center;align-items:center;font-size:.85rem;font-weight:600;display:inline-flex}.step.done .step-mark{background:var(--ok);color:var(--text)}.step.done strong{color:var(--muted)}.step-body{flex-direction:column;align-items:flex-start;gap:6px;padding-left:calc(1.6em + 8px);display:flex}.guide{margin:0;padding-left:1.3em}.backfill{border:1px solid var(--border);border-radius:10px;flex-direction:column;gap:8px;padding:10px;display:flex}@media (width>=900px){.shell{grid-template-rows:auto auto minmax(0,1fr);grid-template-columns:180px minmax(0,1fr);column-gap:28px;max-width:1120px;padding:0 32px;display:grid}.topbar{grid-column:1/-1;padding:20px 0 16px}.topbar h1{font-size:1.3rem}.topbar .page-label{display:none}.notices{grid-area:2/2;margin:0 0 12px}.page{grid-area:3/2;padding:4px 4px 24px}.tabbar{background:0 0;border:0;flex-direction:column;grid-area:2/1/4;align-self:start;gap:4px;padding:0}.tabbar button{color:var(--text);border-radius:8px;flex-direction:row;flex:none;gap:10px;padding:9px 12px;font-size:.95rem}.tabbar button span{font-size:1.05rem}.tabbar button:hover{background:var(--surface)}.tabbar button.active{background:var(--surface);box-shadow:inset 3px 0 0 var(--accent)}.bubble{max-width:75%}}.unlock{justify-content:center;align-items:center;min-height:100dvh}.unlock .card{width:100%;max-width:400px}.unlock h1{color:var(--accent);margin:0;font-size:1.15rem}.import-group{flex-direction:column;gap:8px;display:flex}.import-item{align-items:flex-start;gap:8px;display:flex}.import-item>input[type=checkbox]{flex:none;margin-top:4px}.import-item>label{flex:1}.import-plan{border:1px solid var(--border);border-radius:10px;padding:8px 12px;font-size:.9rem}.card.test-mode{border-color:var(--warn)}.feed{border:1px solid var(--border);background:var(--surface);border-radius:12px;flex-direction:column;flex:none;padding:2px 14px 6px;display:flex}.feed.all{max-height:45%;overflow-y:auto}.feed-head{justify-content:space-between;align-items:center;padding:8px 0 2px;display:flex}.feed-head strong{color:var(--muted);font-size:.8rem;font-weight:600}.feed-list{margin:0;padding:0;list-style:none}.feed-list>li+li{border-top:1px solid var(--border)}.feed-item{gap:10px;padding:10px 0;display:flex}.feed-item.warn{border-left:3px solid var(--warn-strong);margin-left:-14px;padding-left:11px}.feed-icon{flex:none;font-size:1.05rem;line-height:1.4}.feed-body{flex-wrap:wrap;flex:1;align-items:center;gap:6px 12px;min-width:0;display:flex}.feed-text{flex-direction:column;flex:240px;gap:2px;min-width:0;display:flex}.feed-text strong{font-size:.95rem}.feed-text span{color:var(--muted)}.feed-actions{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.feed-actions button{padding:4px 10px;font-size:.8rem}.feed-actions button.link{padding:0 4px}.feed-body>.checkin{flex-basis:100%}.feed-more{align-self:flex-start;margin:0 0 6px;font-size:.85rem}@media (width<=599px){.feed-item{padding:8px 0}.feed-text strong{font-size:.9rem}.feed-text span{font-size:.8rem}}.feed.collapsed{padding:0}.feed-summary{text-align:left;background:0 0;border:0;align-items:center;gap:8px;width:100%;padding:8px 14px;display:flex;overflow:hidden}.feed-ticker{flex:1;align-items:center;gap:8px;min-width:0;display:flex}.feed-ticker.animate{animation:.35s ease-out feed-ticker-in}@keyframes feed-ticker-in{0%{opacity:0;transform:translateY(60%)}to{opacity:1;transform:none}}.feed-summary-text{text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}.checkin{flex-direction:column;gap:8px;margin-top:4px;display:flex}.choices{border:0;flex-direction:column;gap:6px;min-width:0;margin:0;padding:0;display:flex}.choice{border:1px solid var(--border);color:var(--text);cursor:pointer;border-radius:10px;flex-direction:row;align-items:flex-start;gap:10px;padding:8px 10px;font-size:.95rem}.choice.selected{border-color:var(--accent)}.choice>input{flex:none;margin-top:3px}.choice>span{flex-direction:column;min-width:0;display:flex}.phone-guide{margin-top:6px}.phone-guide>summary{cursor:pointer;color:var(--accent)}.phone-guide>p{margin:6px 0 4px}.training-values h3{margin:4px 0 0;font-size:.9rem}.values{grid-template-columns:max-content 1fr;gap:2px 12px;margin:0;font-size:.9rem;display:grid}.values dt{color:var(--muted)}.values dd{font-variant-numeric:tabular-nums;margin:0}.values dd.chips{flex-wrap:wrap;gap:0 12px;display:flex}.values dd.chips>span{white-space:nowrap}.split-bar{background:var(--border);border-radius:5px;height:10px;display:flex;overflow:hidden}.split-bar .low{background:var(--accent)}.split-bar .moderate{background:var(--warn-strong)}.split-bar .high{background:var(--danger-text)}.bubble .sources{border-top:1px solid var(--border);color:var(--muted);margin-top:6px;padding-top:4px;font-size:.8rem}.sessions{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.session{border-top:1px solid var(--border);flex-direction:column;gap:4px;padding:10px 0;display:flex}.session:first-child{border-top:none}.session-head{flex-wrap:wrap;align-items:baseline;gap:4px 10px;display:flex}.session-when{color:var(--muted);min-width:6.5em;font-size:.85rem}.session.skipped .session-head strong,.session.skipped p{opacity:.6}.session.skipped .session-head strong{text-decoration:line-through}.badge{background:var(--warn);border-radius:999px;padding:1px 8px;font-size:.75rem}.session-actions{flex-wrap:wrap;gap:6px}.session-actions button{font-size:.85rem}.session-result{color:var(--text)}.badge.achieved,.badge.rested{background:var(--ok)}.badge.partial,.badge.different,.badge.not_rested{background:var(--info)}.badge.missed,.badge.skipped{background:var(--border)}.settings-button{background:0 0;border:1px solid #0000;align-self:center;margin-left:auto;padding:2px 8px;font-size:1.1rem;line-height:1.4}.settings-button.active,.help-button.active{border-color:var(--accent)}.help-button{color:var(--accent);background:0 0;border:1px solid #0000;align-self:center;margin-left:auto;padding:2px 10px;font-size:1.1rem;font-weight:700;line-height:1.4}.help-button+.settings-button{margin-left:0}.help-toc{flex-wrap:wrap;gap:6px;margin:8px 0 0;padding:0;list-style:none;display:flex}.help-toc button{border-radius:999px;padding:4px 10px;font-size:.85rem}.help-section{scroll-margin-top:72px}.help-section.target{border-color:var(--accent)}.run-card{flex-direction:column;gap:8px;display:flex}.report-result{flex-direction:column;gap:8px;padding-top:4px;display:flex}.run-card-head{flex-wrap:wrap;align-items:baseline;gap:4px 10px;display:flex}.run-card p{margin:0}.stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0;display:grid}.stats>div{background:var(--bg);border-radius:8px;min-width:0;padding:6px 8px}.stats dt{color:var(--muted);font-size:.72rem}.stats dd{font-variant-numeric:tabular-nums;white-space:nowrap;margin:0;font-size:1.25rem;font-weight:600;line-height:1.3}.intensity .legend{flex-wrap:wrap;align-items:center;gap:0 4px;margin-top:4px;display:flex}.intensity .dot{border-radius:50%;width:8px;height:8px;margin-left:6px;display:inline-block}.intensity .dot:first-child{margin-left:0}.dot.low{background:var(--accent)}.dot.moderate{background:var(--warn-strong)}.dot.high{background:var(--danger-text)}.intensity.compact .split-bar{height:6px}.effort-scale{grid-template-columns:repeat(10,1fr);gap:3px;display:grid}.effort-scale span{background:var(--border);border-radius:3px;height:10px}.effort-scale span.expected{background:var(--info);outline:1px solid var(--accent);outline-offset:-1px}.effort-scale span.mark{background:var(--accent);outline:none}.effort p{margin-top:4px}.run-summary details summary{cursor:pointer;color:var(--accent);font-size:.85rem}.runs{margin:0;padding:0;list-style:none}.runs>li{border-top:1px solid var(--border);padding:4px 0}.runs>li:first-child{border-top:none}.runs>li.open{padding-bottom:12px}.run-row{text-align:left;width:100%;color:var(--text);font:inherit;background:0 0;border:0;grid-template-columns:3.2em minmax(0,1fr) auto;align-items:baseline;gap:2px 10px;padding:8px 0;display:grid}.run-row .run-date{color:var(--muted);font-size:.85rem}.run-row .run-main{align-items:baseline;gap:8px;min-width:0;display:flex}.run-row .run-tags{gap:4px;display:flex}.run-row .intensity{grid-column:2/-1}.run-summary{border-top:1px solid var(--border);flex-direction:column;gap:6px;padding-top:6px;display:flex}.run-summary details summary{width:fit-content;padding:4px 0}.run-summary details[open] summary{margin-bottom:6px}.totals{background:linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface) 70%);flex-direction:column;gap:12px;display:flex}.totals-hero{flex-direction:column;display:flex}.hero-value{color:var(--accent);font-variant-numeric:tabular-nums;font-size:2.6rem;font-weight:700;line-height:1.1}.hero-value small,.tile-value small{color:var(--muted);font-size:.45em;font-weight:500}.tile-label,.tile-sub{color:var(--muted);font-size:.78rem}.tiles{grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:8px;display:grid}.tile{background:var(--surface);border:1px solid var(--border);border-radius:10px;flex-direction:column;min-width:0;padding:8px 10px;display:flex}.tile.accent{border-color:var(--accent)}.tile-value{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:1.45rem;font-weight:700;line-height:1.25}.blocks{flex-wrap:wrap;align-items:flex-end;gap:3px;display:flex}.block{background:var(--accent);border-radius:2px}.block.s0{opacity:.45;width:7px;height:7px}.block.s1{opacity:.65;width:9px;height:9px}.block.s2{opacity:.85;width:11px;height:11px}.block.s3{width:13px;height:13px}.block.recent{background:var(--warn-strong);opacity:1}.blocks-more{color:var(--muted);margin-right:4px;font-size:.75rem}.journey{margin-top:10px}.journey-track{background:var(--border);border-radius:4px;height:8px;margin-top:18px;position:relative}.journey-fill{background:linear-gradient(90deg, color-mix(in srgb, var(--accent) 45%, transparent), var(--accent));border-radius:4px;height:100%;transition:width 1.2s cubic-bezier(.22,1,.36,1);position:relative}.journey-runner{font-size:1.25rem;line-height:1;animation:.5s ease-in-out infinite alternate bob;position:absolute;bottom:4px;right:-10px;transform:scaleX(-1)}.journey-ends{color:var(--muted);justify-content:space-between;margin-top:4px;display:flex}@keyframes bob{0%{translate:0}to{translate:0 -3px}}.showcases{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px;display:grid}.showcase{background:var(--surface);border:1px solid var(--border);border-radius:10px;flex-direction:column;gap:4px;padding:8px 10px;display:flex}.medals{flex-wrap:wrap;align-items:center;gap:2px;font-size:1.3rem;line-height:1.2;display:flex}.medal{animation:.45s cubic-bezier(.34,1.56,.64,1) both pop;animation-delay:calc(var(--i) * 60ms);display:inline-block}.medals .more,.towers .more{color:var(--muted);margin-left:4px;font-size:.85rem}.towers{align-items:flex-end;gap:4px;height:56px;display:flex}.tower{width:auto;height:52px;animation:.6s cubic-bezier(.22,1,.36,1) both rise;animation-delay:calc(var(--i) * 90ms);transform-origin:bottom}.tower-shape{fill:var(--border)}.tower-shape.filled{fill:var(--accent)}.tower-clip{transition:y 1s cubic-bezier(.22,1,.36,1)}.block{animation:.35s cubic-bezier(.34,1.56,.64,1) both pop}@keyframes pop{0%{opacity:0;transform:scale(.2)}}@keyframes rise{0%{opacity:0;transform:scaleY(.1)}}.import-history{border-top:1px solid var(--border);flex-direction:column;gap:6px;padding-top:10px;display:flex}.import-history ul,.weather-privacy{margin:4px 0 0;padding-left:1.2em}.weather-search{align-items:flex-end}.weather-search>label{flex:1;min-width:180px}.weather-results{flex-wrap:wrap;gap:8px;margin:0;padding:0;list-style:none;display:flex}a.credit{margin-top:2px;display:block}.first-sync{margin:4px 0 8px;padding-left:1.2em}.first-sync li+li{margin-top:4px}.import-progress{flex-direction:column;gap:4px;display:flex}.indeterminate{background:linear-gradient(90deg, transparent, var(--accent), transparent) var(--border);background-repeat:no-repeat;background-size:40% 100%;border-radius:2px;height:4px;animation:1.2s linear infinite slide}@keyframes slide{0%{background-position:-40% 0}to{background-position:140% 0}}.year-chips{flex-wrap:wrap;gap:4px;margin:6px 0 2px;display:flex}@media (prefers-reduced-motion:reduce){.journey-fill,.tower-clip{transition:none}.journey-runner,.medal,.tower,.block,.indeterminate{animation:none}}.import-history .notice p{margin:0}.pairing{flex-direction:column;gap:8px;display:flex}.pairing ol{margin:0;padding-left:1.2em}.pair-qr{background:#fff;border-radius:8px;width:200px;height:200px;padding:6px}.pair-code,.pair-confirm,.recovery-code{letter-spacing:.08em;font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}.pair-code,.pair-confirm{font-size:1.3rem}.recovery-code{background:var(--bg);border:1px solid var(--border);word-break:break-all;-webkit-user-select:all;user-select:all;border-radius:8px;padding:10px 12px;display:block}button.link.danger{color:var(--danger-text)}.memory-list{flex-direction:column;gap:8px;margin:8px 0;padding:0;list-style:none;display:flex}.memory-list li{border:1px solid var(--border);border-radius:10px;grid-template-columns:1fr auto;gap:2px 12px;padding:8px 10px;display:grid}.memory-text{overflow-wrap:anywhere;grid-column:1/-1}.memory-actions{justify-self:end;gap:12px;display:flex}.memory-edit{flex-direction:column;grid-column:1/-1;gap:6px;display:flex}.memory-edit textarea{width:100%}.memory-add{gap:8px;display:flex}.memory-add input{flex:1;min-width:0}.summary-text{overflow-wrap:anywhere;margin:8px 0}
