@charset "UTF-8";
:root{font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-synthesis:none;color-scheme:light;--bg:#FAF8F5;--surface:#EFEAE5;--text:#302923;--muted:#887B73;--line:#EFEAE5;--accent:#C36D4D;--accent-hover:#AD593D;--tint:#F6E6DD;--trend:#80A18A;--gold:#D9A441;--green:var(--trend);--green-tint:var(--tint);--card:var(--bg);color:var(--text);background:var(--bg)}
*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit;color:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{border:0;background:none;cursor:pointer}button:disabled{opacity:.35;cursor:default}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:3px solid #377c5580;outline-offset:4px}svg{display:block}.icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.hidden,[hidden]{display:none!important}.app-shell{max-width:728px;margin:auto;padding-bottom:calc(84px + env(safe-area-inset-bottom))}.app-header{height:110px;padding:34px 24px 18px;display:flex;align-items:center;justify-content:space-between;gap:16px}.app-header h1{font-size:30px;letter-spacing:-.5px;line-height:1.2;margin:0;font-weight:650}.icon-button{height:44px;width:44px;display:inline-grid;place-items:center;border-radius:50%;color:var(--text);font-size:26px;font-weight:300}.icon-button:hover{background:var(--surface)}#settings-button{color:var(--muted)}main{padding:12px 24px 0;outline:none}.tab-bar{display:flex;position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,728px);height:calc(76px + env(safe-area-inset-bottom));padding:8px 24px calc(8px + env(safe-area-inset-bottom));background:var(--bg);border-top:1px solid var(--line);z-index:10;justify-content:space-around;gap:18px}.nav-link{display:flex;flex:1;flex-direction:column;justify-content:center;align-items:center;gap:5px;font-size:10px;color:var(--muted);border-radius:12px;min-height:52px}.nav-link .icon{width:23px;height:23px;stroke-width:1.7}.nav-link.active{color:var(--accent)}.nav-link.active .icon{stroke-width:2}.mode-banner{margin:0 24px 10px;display:flex;justify-content:space-between;font-size:10px;color:var(--muted);line-height:1.8}.mode-banner a{color:var(--accent)}.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 20px;border-radius:13px;font-size:14px;font-weight:550;white-space:nowrap}.primary{background:var(--accent);color:#fff}.primary:hover{background:var(--accent-hover)}.secondary{background:var(--surface);color:var(--text)}.text-button{min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:6px;font-size:13px;color:var(--accent)}.text-button .icon{height:17px;width:17px}.small{min-height:38px;font-size:12px;padding:0 13px}.danger{color:#c24f49!important}.skip{position:fixed;top:-100px;left:20px;padding:15px;background:var(--bg);z-index:100}.skip:focus{top:12px}.loading,.empty-state{padding:64px 15px;text-align:center;color:var(--muted);font-size:14px}
/* One chart, one action, one target. */
.segments{display:flex;background:var(--surface);padding:3px;border-radius:10px;gap:3px}.segment{flex:1;padding:8px 6px;min-height:36px;font-size:13px;color:var(--muted);border-radius:7px}.segment.active{background:var(--bg);color:var(--text);box-shadow:0 1px 4px #00000010;font-weight:600}.date-range{display:flex;justify-content:center;align-items:center;gap:18px;font-size:12px;color:var(--muted);margin:15px 0 8px;font-variant-numeric:tabular-nums}.date-range button{width:44px;height:40px;display:grid;place-items:center}.date-range .icon{height:16px;width:16px}.trend-focus{padding-top:7px}.chart-wrap{position:relative;height:clamp(330px,44svh,460px);touch-action:pan-y}.chart-wrap>svg{width:100%;height:100%;overflow:visible}.chart-grid{stroke:var(--line);stroke-width:1;stroke-dasharray:2 6}.axis-label{font-family:inherit;font-size:11px;fill:var(--muted)}.weight-line{fill:none;stroke:var(--accent);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.average-line{fill:none;stroke:#b7bcb8;stroke-width:1.6;stroke-dasharray:5 5;stroke-linecap:round}.gap-line{stroke-dasharray:2 6;opacity:.5}.chart-dot{fill:var(--bg);stroke:var(--accent);stroke-width:1.8}.chart-hit{fill:transparent;cursor:pointer}.chart-hit:focus{stroke:var(--accent);stroke-width:1}.chart-empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;color:var(--muted)}.chart-empty .icon{width:29px;height:29px;stroke-width:1.3;opacity:.6}.chart-empty p{font-size:13px;margin:0}.chart-tooltip{position:absolute;max-width:220px;padding:12px 15px;border-radius:11px;background:var(--text);color:var(--bg);font-size:11px;line-height:1.8;pointer-events:none;box-shadow:0 5px 25px #0002;z-index:2}.chart-legend{display:flex;justify-content:center;align-items:center;gap:22px;font-size:10px;color:var(--muted);margin-top:8px;min-height:28px}.legend-line{display:inline-block;width:15px;border-top:2px solid var(--accent);margin-right:6px;vertical-align:middle}.legend-line.dashed{border-top:2px dashed #b7bcb8}.legend-toggle{font:inherit;color:inherit;min-height:30px;padding:0}.weight-context{display:flex;justify-content:space-between;align-items:center;padding:19px 4px 24px;gap:24px}.weight-context>div{display:flex;align-items:baseline;gap:11px}.weight-context span{font-size:12px;color:var(--muted)}.weight-context strong{font-size:24px;font-weight:550;letter-spacing:-.5px;font-variant-numeric:tabular-nums}.weight-context .weight-change{font-size:19px;font-weight:450}.weight-context small{font-size:10px;letter-spacing:0;font-weight:400;color:var(--muted);margin-left:5px}.record-button{width:100%;min-height:54px;font-size:15px;font-weight:550}.record-button .icon{width:20px;height:20px}.target-row{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;min-height:76px;margin-top:10px;padding:0 3px;font-size:13px;color:var(--muted)}.target-row strong{display:flex;align-items:baseline;gap:5px;font-size:17px;font-weight:500;color:var(--text)}.target-row small{font-size:11px;color:var(--muted);font-weight:400}.target-row .icon{width:15px;height:15px;align-self:center;margin-left:4px;color:var(--muted)}
/* Completion colours are independent of selection. Rest days are not failures. */
.week-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:9px}.day-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;min-height:91px;border:1.5px solid transparent;border-radius:14px;position:relative;padding:10px 2px;transition:background .2s;color:var(--text)}.day-tile>span{font-size:10px;line-height:1;opacity:.7}.day-tile>strong{font-size:21px;font-weight:500;line-height:1;font-variant-numeric:tabular-nums}.day-tile.level-0{background:var(--surface);color:var(--muted)}.day-tile.level-1{background:#e4f0e7;color:#51755c}.day-tile.level-2{background:#bbd8c4;color:#315b3f}.day-tile.level-3{background:#80b394;color:#153f25}.day-tile.level-4{background:#397c54;color:#fff}.day-tile.active{border-color:var(--text);box-shadow:0 0 0 3px var(--bg),0 0 0 4px var(--line)}.training-dot{width:4px;height:4px;border-radius:50%;background:transparent}.training-dot.trained{background:currentColor}.habit-overview{display:flex;justify-content:center;align-items:center;gap:15px;font-size:13px;color:var(--muted);margin:14px 0 17px;min-height:44px;font-variant-numeric:tabular-nums}.habit-overview button,.habit-overview a{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:44px;padding:0;font-size:inherit;color:inherit;white-space:nowrap}.habit-overview strong{font-weight:500;color:var(--text)}.habit-overview>span{color:#c7c9ca}.habit-overview .icon{width:12px;height:12px;margin-left:1px}.task-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:54px;margin:8px 0 1px}.task-heading>button{display:flex;align-items:center;gap:6px;min-height:44px;font-size:16px;font-weight:550;padding:0}.task-heading .icon{height:14px;width:14px;opacity:.5}.task-heading>span{font-size:11px;color:var(--muted)}.habit-list{border:0;background:none}.habit-row{display:flex;align-items:center;gap:15px;border-bottom:1px solid var(--line);min-height:88px;padding:17px 0}.habit-row:last-child{border-bottom:0}.habit-symbol{width:27px;color:var(--muted);flex-shrink:0;display:grid;place-items:center}.habit-symbol .icon{width:23px;height:23px;stroke-width:1.6}.habit-symbol.done{color:var(--accent)}.habit-detail{min-width:0;flex:1;display:flex;align-items:center;justify-content:space-between;gap:13px}.habit-detail h2,.habit-detail h3{font-size:15px;line-height:1.5;font-weight:450;letter-spacing:-.2px;margin:0}.habit-status{font-size:12px;white-space:nowrap;color:var(--muted);font-variant-numeric:tabular-nums}.habit-reward{font-size:11px;width:25px;text-align:right;color:var(--muted);font-variant-numeric:tabular-nums;flex-shrink:0}.habit-check{display:grid;place-items:center;width:42px;height:42px;flex-shrink:0;border-radius:50%;background:var(--surface);color:#969a99}.habit-check.done{background:var(--accent);color:#fff}.habit-check .icon{height:19px;width:19px}.habit-row:has(.habit-check.done) .habit-reward{color:var(--accent)}
/* The only main-page card is this photograph with its words. */
.motivation-page{padding-top:1px}.focus-poster{position:relative;width:min(100%,calc((100svh - var(--app-top) - var(--nav-height) - var(--mode-height,0px) - 110px)*.5625));aspect-ratio:9/16;background:var(--surface);margin:0 auto;overflow:hidden;border-radius:20px;isolation:isolate}.focus-poster canvas{display:block;width:100%;height:100%;object-fit:cover}.focus-poster blockquote{font-size:23px;font-weight:450;line-height:1.8;margin:0;position:absolute;left:10%;right:10%;top:51%;text-align:center;overflow-wrap:anywhere;max-height:40%;overflow:hidden}.poster-placeholder{position:absolute;inset:20% 10% 45%;display:flex;align-items:center;justify-content:center;gap:14px;flex-direction:column;color:var(--muted);font-size:12px}.poster-placeholder .icon{width:34px;height:34px;stroke-width:1.2;opacity:.5}.poster-empty-caption{position:absolute;top:59%;left:10%;right:10%;text-align:center;font-size:17px;font-weight:450;line-height:1.8}.poster-empty-caption span{display:block;color:var(--muted);font-size:11px;margin-top:9px}.has-photo .poster-empty-caption{color:#fff;text-shadow:0 1px 4px #0005}.has-photo .poster-empty-caption span{color:#ffffffb3}.motivation-actions{display:flex;justify-content:center;gap:42px;margin:24px auto 0}.motivation-actions button{min-height:53px;min-width:68px;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:9px;font-size:12px;color:var(--text)}.motivation-actions .icon{width:21px;height:21px;stroke-width:1.5}.motivation-actions button:last-child{color:var(--accent)}
/* Secondary management lives in settings, outside the three daily surfaces. */
dialog{width:min(520px,calc(100% - 28px));max-height:88dvh;border:1px solid var(--line);border-radius:24px;padding:25px;background:var(--bg);color:var(--text);box-shadow:0 20px 100px #0002;overflow-y:auto}dialog.wide{width:min(800px,calc(100% - 28px))}dialog::backdrop{background:#111a143d;backdrop-filter:blur(5px)}.modal-top{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:24px}.modal-top h2{font-size:21px;font-weight:600;letter-spacing:-.3px;line-height:1.5;margin:0}.modal-top .icon-button{color:var(--muted);background:var(--surface);width:32px;height:32px;min-width:32px;line-height:1}.settings-menu section{margin-bottom:28px}.settings-menu h3{font-size:11px;font-weight:500;color:var(--muted);margin:0 0 7px;padding:0 1px}.settings-row{display:flex;align-items:center;text-align:left;gap:12px;padding:15px 1px;width:100%;font-size:14px;min-height:54px;border-bottom:1px solid var(--line)}.settings-row span{flex:1}.settings-row small{font-size:11px;color:var(--muted);margin-left:auto;white-space:nowrap}.settings-row .icon{width:16px;height:16px;color:var(--muted)}.settings-row:last-child{border-bottom:0}.settings-footnote{font-size:11px;color:var(--muted);text-align:center;margin:26px 0 8px}.settings-menu>.text-button{width:100%}.field{display:flex;flex-direction:column;gap:9px;font-size:12px;color:var(--muted);margin-bottom:18px;min-width:0}.field input,.field textarea,.field select{background:var(--surface);border:1px solid transparent;border-radius:11px;min-height:46px;padding:12px 13px;font-size:15px;width:100%;color:var(--text)}.field textarea{min-height:96px;line-height:1.7;resize:vertical}.field>span{font-size:10px;line-height:1.8}.field input[type=color]{padding:5px}.field input[type=range]{padding:0;accent-color:var(--accent);min-height:35px}.field.full{grid-column:1/-1}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px;flex-wrap:wrap}.form-actions.sticky{position:sticky;bottom:-25px;padding-top:15px;background:var(--bg);z-index:2}.form-section{display:block;border-bottom:1px solid var(--line);font-size:13px;font-weight:550;padding-bottom:13px;margin:27px 0 17px}.settings-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 16px}.toggle-row{display:flex;align-items:center;justify-content:space-between;gap:15px;min-height:50px;font-size:13px}.toggle-row input{appearance:none;width:43px;height:26px;border-radius:20px;position:relative;background:#dcdfe0;cursor:pointer;flex-shrink:0}.toggle-row input::after{content:'';position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;transition:transform .15s}.toggle-row input:checked{background:var(--accent)}.toggle-row input:checked::after{transform:translateX(17px)}.help-box{background:var(--surface);padding:15px;border-radius:12px;font-size:11px;line-height:1.95;color:var(--muted);margin:16px 0}.help-box strong{color:var(--text);font-weight:500}.info-note{font-size:12px;line-height:1.9;color:var(--muted);margin:15px 0}.data-actions,.inline-buttons{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:12px 0}.inline-buttons button{border-radius:8px;padding:8px 13px;min-height:40px;font-size:12px;background:var(--surface);color:var(--muted)}.water-quick button{color:var(--accent);background:var(--tint)}.row-actions{display:flex;gap:4px;align-items:center;justify-content:flex-end}.row-actions button{width:40px;height:44px;display:grid;place-items:center;color:var(--muted);border-radius:8px}.row-actions button[aria-pressed=true]{color:var(--accent)}.row-actions .icon{width:17px;height:17px}.manager-toolbar{display:flex;align-items:center;gap:14px;margin-bottom:13px}.manager-toolbar>span{font-size:12px;color:var(--muted);margin-right:auto}.quote-library-item{padding:18px 0;border-bottom:1px solid var(--line);font-size:14px;line-height:1.9;overflow-wrap:anywhere}.quote-library-item p{margin:0}.quote-library-item small{display:block;color:var(--muted);font-size:11px;margin-top:7px}.quote-library-item .row-actions{margin-top:4px}.poster-history{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 14px}.poster-thumbnail{padding:0;display:block;width:100%;border-radius:10px;overflow:hidden}.poster-history img{display:block;width:100%;max-height:300px;object-fit:cover}.poster-history .inline-buttons{justify-content:center;margin:7px 0 0;gap:5px}.poster-history .inline-buttons button{background:none;min-height:36px;font-size:11px;padding:5px 8px}.history-row{display:flex;gap:12px;align-items:center;justify-content:space-between;min-height:83px;border-bottom:1px solid var(--line);padding:15px 0}.history-row>div:first-child{min-width:0}.history-row strong{font-size:18px;font-weight:500}.history-row strong small{font-size:11px;color:var(--muted);font-weight:400}.history-row span{display:block;font-size:11px;color:var(--muted);margin-top:7px;line-height:1.7;overflow-wrap:anywhere}.history-row .row-actions{flex-shrink:0}.detail-total{font-size:42px;font-weight:500;letter-spacing:-1px;margin:20px 0 5px}.detail-total small{font-size:15px;font-weight:400;letter-spacing:0;color:var(--muted)}.ledger-row{display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line);padding:18px 0;font-size:13px}.ledger-row small{display:block;font-size:10px;color:var(--muted);margin-top:7px;line-height:1.6}.ledger-delta{font-size:19px;font-weight:500;color:var(--accent);white-space:nowrap}.ledger-delta.negative{color:#b56b48}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.section-heading h2{font-size:15px;font-weight:550;margin:0}.section-heading p,.stat-note{font-size:10px;color:var(--muted);line-height:1.8}.pill{display:inline-block;font-size:10px;padding:5px 8px;border-radius:20px;background:var(--surface);font-weight:400;color:var(--muted);white-space:nowrap}.pill.green,.pill.warm{background:var(--tint);color:var(--accent)}.restore-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:20px 0}.restore-summary>div{background:var(--surface);border-radius:11px;padding:15px;font-size:12px;color:var(--muted)}.restore-summary strong{display:block;font-size:25px;font-weight:500;color:var(--text);margin-top:7px}.message-error{background:#c24f4910;color:#b34742;font-size:12px;line-height:1.8;padding:13px 15px;border-radius:10px;margin-top:16px}.poster-editor{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:24px}.poster-canvas-wrap{background:var(--surface);padding:13px;border-radius:11px;display:flex;align-items:center;justify-content:center;min-height:250px}.poster-canvas-wrap canvas{max-width:100%;max-height:490px;display:block;touch-action:none;cursor:move}.poster-controls .field{margin-bottom:13px}.poster-controls .primary{width:100%;font-size:12px;padding:0 9px}.history-empty{font-size:12px;color:var(--muted);padding:40px 8px;text-align:center;line-height:2}
/* Reward shop is a secondary flow, with a single balance and a plain list. */
.page-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 0 25px}.page-heading h1{font-size:23px;font-weight:550;margin:0}.page-heading p,.eyebrow{display:none}.page-actions{display:flex;gap:6px}.page-actions .secondary{min-height:38px;font-size:11px;padding:0 12px}.page-actions .icon{width:16px;height:16px}.shop-banner{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;padding:12px 0 23px;border-bottom:1px solid var(--line)}.shop-banner .stat-note{color:var(--muted)!important}.shop-balance{font-size:39px;font-weight:500;letter-spacing:-1px;margin-top:7px}.shop-balance span{font-size:12px;color:var(--muted);margin-left:8px;letter-spacing:0}.shop-banner .secondary{font-size:12px;padding:0 14px}.shop-grid{display:block}.reward-card{display:grid;grid-template-columns:42px minmax(0,1fr) 108px;gap:3px 15px;align-items:center;padding:24px 0;border-bottom:1px solid var(--line)}.reward-icon{width:42px;height:42px;display:grid;place-items:center;background:var(--tint);color:var(--accent);border-radius:12px;grid-row:1/3}.reward-card h2{font-size:16px;font-weight:500;margin:0;grid-row:1;grid-column:2}.reward-card>p{font-size:11px;color:var(--muted);margin:5px 0 0;line-height:1.8;grid-row:2;grid-column:2}.reward-price{font-size:21px;font-weight:500;grid-row:1;grid-column:3;text-align:center}.reward-price small{font-size:10px;font-weight:400;color:var(--muted);margin-left:4px}.reward-card>.primary{grid-row:2;grid-column:3;padding:0 10px;min-height:38px;font-size:11px}.voucher-counts{grid-column:2/-1;display:flex;justify-content:space-between;gap:8px;margin-top:13px;color:var(--muted);font-size:10px}.voucher-counts strong{font-size:11px;font-weight:500;color:var(--text);margin-left:7px}.history-card{padding:27px 0 0}.voucher-item{display:flex;align-items:center;gap:14px;padding:19px 0;border-bottom:1px solid var(--line)}.voucher-item>.habit-detail{display:block}.voucher-item h3{font-size:14px}.voucher-item p{font-size:10px;line-height:1.8;color:var(--muted);margin:6px 0 0}.voucher-item>.text-button{font-size:11px}.voucher-item>.secondary{font-size:11px}.voucher-item>.reward-icon{width:35px;height:35px;flex-shrink:0;border-radius:10px}.voucher-item .reward-icon .icon{width:18px;height:18px}
#toast{position:fixed;z-index:100;left:50%;bottom:calc(94px + env(safe-area-inset-bottom));transform:translate(-50%,15px);max-width:min(90vw,480px);width:max-content;padding:13px 19px;font-size:12px;line-height:1.8;border-radius:13px;background:var(--text);color:var(--bg);box-shadow:0 6px 30px #0001;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s}#toast.visible{opacity:1;transform:translate(-50%,0)}.score-pop{position:fixed;top:30%;left:50%;z-index:90;font-size:38px;color:var(--accent);font-weight:600;pointer-events:none;animation:score-pop .9s ease-out forwards}@keyframes score-pop{0%{opacity:0;transform:translate(-50%,20px)scale(.8)}20%{opacity:1;transform:translate(-50%,0)scale(1)}75%{opacity:1}100%{opacity:0;transform:translate(-50%,-50px)}}
@media(max-width:620px){.app-header{height:calc(68px + env(safe-area-inset-top));padding:calc(16px + env(safe-area-inset-top)) 24px 10px}.app-header h1{font-size:28px}main{padding-top:6px}.tab-bar{height:calc(72px + env(safe-area-inset-bottom));padding-top:5px;padding-bottom:calc(5px + env(safe-area-inset-bottom))}.chart-wrap{height:clamp(210px,calc(33svh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - var(--mode-height,0px)),340px)}.date-range{margin-top:11px;margin-bottom:4px;font-size:11px;gap:14px}.weight-context{padding:20px 1px 24px;gap:15px}.weight-context>div{display:block}.weight-context span{display:block;font-size:11px;margin-bottom:8px}.weight-context strong{font-size:27px}.weight-context .weight-change{font-size:22px}.weight-context>div:last-child{text-align:right}.target-row{min-height:69px}.week-strip{gap:6px}.day-tile{min-height:80px;border-radius:11px;gap:8px}.day-tile>span{font-size:9px}.day-tile>strong{font-size:19px}.habit-overview{gap:11px;font-size:12px;margin:12px 0 13px}.habit-row{gap:12px;min-height:79px;padding:14px 0}.habit-symbol{width:23px}.habit-symbol .icon{width:21px;height:21px}.habit-detail{gap:7px}.habit-detail h2{font-size:14px}.habit-status{font-size:11px;letter-spacing:-.2px}.habit-reward{font-size:10px;width:22px}.habit-check{width:39px;height:39px}.habit-check .icon{width:18px;height:18px}.task-heading{min-height:48px}.task-heading>button{font-size:15px}.task-heading>span{font-size:10px}.motivation-actions{gap:32px;margin-top:21px}.focus-poster{width:min(100%,calc((100svh - var(--app-top) - var(--nav-height) - var(--mode-height,0px) - 110px)*.5625));border-radius:17px}.motivation-actions button{font-size:11px}.poster-editor{grid-template-columns:minmax(0,1fr);gap:20px}.poster-canvas-wrap canvas{max-height:350px}.poster-controls{display:grid;grid-template-columns:1fr 1fr;gap:0 13px}.poster-controls .field:first-child{grid-column:1/-1}.poster-controls .primary{grid-column:1/-1}.field input,.field textarea,.field select{font-size:16px}.settings-grid{gap:0 12px}dialog{padding:22px;border-radius:22px}.modal-top h2{font-size:20px}.form-actions.sticky{bottom:-22px}.primary,.secondary{font-size:13px}.shop-banner{margin-bottom:0}.page-heading h1{font-size:19px}.reward-card{grid-template-columns:34px minmax(0,1fr) 90px;gap:3px 11px}.reward-icon{width:34px;height:36px;border-radius:10px}.reward-icon .icon{width:19px;height:19px}.reward-card h2{font-size:14px}.reward-card>p{font-size:10px}.reward-card>.primary{font-size:10px}.voucher-counts{font-size:9px}.voucher-counts strong{margin-left:4px}.voucher-item{gap:10px}.voucher-item>.reward-icon{display:none}.voucher-item .text-button{font-size:10px}.page-heading .page-actions .secondary{font-size:10px;padding:0 9px}.shop-balance{font-size:35px}.poster-history .inline-buttons button{min-height:40px}}
@media(max-width:350px){main{padding-left:20px;padding-right:20px}.app-header{padding-left:20px;padding-right:20px}.week-strip{gap:5px}.day-tile{min-height:74px;border-radius:9px}.day-tile>span{font-size:8px}.day-tile>strong{font-size:17px}.habit-overview{font-size:11px;gap:8px}.habit-detail{display:block}.habit-status{display:block;margin-top:5px;font-size:11px}.habit-detail h2{font-size:14px}.habit-row{min-height:82px}.habit-check{width:40px;height:40px}.habit-symbol{width:22px}.motivation-actions{gap:20px}.focus-poster{width:min(100%,calc((100svh - var(--app-top) - var(--nav-height) - var(--mode-height,0px) - 110px)*.5625))}.reward-card{grid-template-columns:29px minmax(0,1fr) 79px;gap:3px 8px}.reward-card h2{font-size:12px}.reward-card>p{font-size:9px}.reward-icon{width:29px;height:33px}.voucher-counts{grid-column:1/-1}}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]){color-scheme:dark;--bg:#1D1916;--surface:#2B2520;--text:#F4EAE3;--muted:#B9A89D;--line:#3B322B;--accent:#E2A183;--accent-hover:#ECB79A;--tint:#3C2B23;--trend:#99BAA3;--gold:#E0B65A}:root:not([data-theme=light]) .primary{color:#122218}:root:not([data-theme=light]) .day-tile.level-1{background:#263f30;color:#aec2b3}:root:not([data-theme=light]) .day-tile.level-2{background:#385c43;color:#dce9df}:root:not([data-theme=light]) .day-tile.level-3{background:#518263;color:#f1faf3}:root:not([data-theme=light]) .day-tile.level-4{background:#7cb88f;color:#152a1c}}
:root[data-theme=dark]{color-scheme:dark;--bg:#1D1916;--surface:#2B2520;--text:#F4EAE3;--muted:#B9A89D;--line:#3B322B;--accent:#E2A183;--accent-hover:#ECB79A;--tint:#3C2B23;--trend:#99BAA3;--gold:#E0B65A}[data-theme=dark] .primary{color:#122218}[data-theme=dark] .day-tile.level-1{background:#263f30;color:#aec2b3}[data-theme=dark] .day-tile.level-2{background:#385c43;color:#dce9df}[data-theme=dark] .day-tile.level-3{background:#518263;color:#f1faf3}[data-theme=dark] .day-tile.level-4{background:#7cb88f;color:#152a1c}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

:root{--app-top:110px;--nav-height:76px}.app-shell:has(.mode-banner){--mode-height:28px}@media(max-width:620px){:root{--app-top:calc(83px + env(safe-area-inset-top));--nav-height:calc(72px + env(safe-area-inset-bottom))}}


/* V1.2: warm cream, terracotta action, quiet health milestones. */
.record-control{display:flex;justify-content:center;padding:20px 0 13px}.record-button{width:116px;height:116px;min-height:116px;padding:0;border-radius:50%;display:flex;flex-direction:column;gap:8px;outline:6px solid var(--tint);box-shadow:0 0 0 11px #C36D4D08;color:#fff!important;transition:transform .18s,background .25s;animation:record-breathe 3.4s ease-in-out infinite}.record-button:active{transform:scale(.95)}.record-label{font-size:14px;line-height:1.3;font-weight:600;white-space:nowrap}.record-subtitle{font-size:9px;line-height:1.3;font-weight:400;white-space:nowrap;letter-spacing:-.1px;opacity:.9}.record-button.is-recorded{background:var(--gold);outline-color:#D9A44120;animation:none;color:#302923!important}.target-row{margin-top:0}.weight-line{stroke:var(--trend)}.chart-dot{stroke:var(--trend)}.legend-line{border-top-color:var(--trend)}.habit-check.done{background:var(--trend)}.habit-symbol.done,.habit-row:has(.habit-check.done) .habit-reward{color:var(--trend)}.ledger-delta{color:var(--gold)}[data-theme=dark] .primary:not(.record-button){color:#302923}.health-details details{margin-top:23px;font-size:12px}.health-details summary{cursor:pointer;padding:12px 0}.health-thresholds{display:flex;gap:10px;border-block:1px solid var(--line);padding:20px 0;margin:24px 0}.health-thresholds>div{flex:1;display:flex;flex-direction:column;gap:10px;font-size:11px;color:var(--muted)}.health-thresholds strong{font-size:15px;font-weight:550;color:var(--text)}.health-thresholds small{font-size:10px}.exam-record{margin:14px 0 24px;padding:10px 0;border-bottom:1px solid var(--line)}.exam-record h3{font-size:13px;font-weight:500}.exam-record p{font-size:11px;line-height:1.8;color:var(--muted)}.exam-record>div{display:flex;justify-content:space-between;font-size:11px;padding:8px 0;color:var(--muted)}
dialog.health-celebration{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:24px;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:hidden;place-items:center;overscroll-behavior:contain;touch-action:none}dialog.health-celebration[open]{display:grid}.health-celebration::backdrop{background:#30292344;backdrop-filter:blur(3px)}.health-card{position:relative;width:min(328px,calc(100vw - 48px));padding:35px 25px 23px;background:var(--bg);border:1px solid #C36D4D14;border-radius:23px;text-align:center;box-shadow:0 12px 60px #30292315}.health-close{position:absolute;right:10px;top:9px;width:35px;height:35px;display:grid;place-items:center;color:var(--muted);font-size:23px;font-weight:300;border-radius:50%}.health-card h2{font-size:15px;font-weight:550;color:var(--accent);margin:9px 0 23px;line-height:1.6}.health-number{font-size:58px;font-weight:500;letter-spacing:-2px;color:var(--accent);line-height:1.2;min-height:24px}.health-number small{font-size:15px;font-weight:400;letter-spacing:0;margin-left:7px}.health-card p{font-size:15px;line-height:1.9;margin:19px 0 26px;overflow-wrap:anywhere}.health-tap-hint{font-size:10px;color:var(--muted)}.health-shards{position:fixed;inset:0;overflow:hidden;pointer-events:none}.health-fragment{position:fixed;pointer-events:none;will-change:transform,opacity}.health-fragment>.health-card{width:100%;height:100%;max-width:none;box-shadow:none;margin:0}.health-fading{animation:health-fade .17s ease-out forwards}.health-shattering::backdrop{animation:health-fade .62s ease-out forwards}@keyframes health-fade{to{opacity:0}}@keyframes record-breathe{0%,100%{box-shadow:0 0 0 11px #C36D4D06}50%{box-shadow:0 0 0 15px #C36D4D0e}}[data-motion=off] .record-button{animation:none}@media(prefers-reduced-motion:reduce){.record-button{animation:none;transition:background .15s}.health-fragment{display:none}}

/* Real photo silhouettes, intentionally independent of the weight chart. */
.avatar-compact{border-top:1px solid var(--line);padding:17px 0 12px;min-height:240px;max-height:300px;margin-bottom:18px}.avatar-compact>header{display:flex;align-items:center;gap:12px;min-height:35px}.avatar-compact h2{font-size:14px;font-weight:550;margin:0 auto 0 0}.avatar-compact>header>.text-button{font-size:11px;min-height:35px}.avatar-view-switch,.avatar-editor-tabs{display:flex;gap:3px;background:var(--surface);border-radius:9px;padding:3px}.avatar-view-switch button{font-size:10px;min-height:28px;padding:0 10px;border-radius:6px;color:var(--muted)}.avatar-view-switch button[aria-pressed=true],.avatar-editor-tabs button[aria-pressed=true]{background:var(--bg);color:var(--text)}.avatar-placeholder{display:flex;align-items:center;justify-content:center;gap:33px;min-height:184px;width:100%;padding:10px 0;color:var(--muted);font-size:13px}.neutral-avatar{width:75px;height:157px;fill:var(--surface);stroke:var(--muted);stroke-width:.8;opacity:.65}.avatar-placeholder span{text-align:left}.avatar-placeholder small{display:block;font-size:10px;margin-top:11px;color:var(--muted)}.avatar-pair{width:100%;display:flex;align-items:center;justify-content:center;gap:40px;padding:5px 0 0}.avatar-pair figure{margin:0;min-width:70px;max-width:130px}.avatar-pair .real-avatar{width:105px;height:144px;fill:var(--accent);opacity:.68}.avatar-pair figure:first-child:not(:last-child) .real-avatar{fill:var(--trend);opacity:.65}.avatar-pair figcaption{font-size:10px;color:var(--text);line-height:1.8}.avatar-pair figcaption small{display:block;font-size:9px;color:var(--muted)}.avatar-footnote{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:9px;font-size:9px;color:var(--muted);line-height:1.8}.avatar-footnote button{color:var(--accent);font-size:11px;min-height:32px}.avatar-editor-tabs{width:fit-content;margin:0 auto 17px}.avatar-editor-tabs button{min-height:34px;padding:0 24px;border-radius:6px;color:var(--muted);font-size:12px}.trace-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:13px}.trace-count{font-size:11px;color:var(--muted)}.trace-stage{height:350px;border-radius:13px;background:var(--surface);overflow:hidden;display:flex;align-items:center;justify-content:center}.trace-stage svg#avatar-trace{width:100%;height:100%;display:block;touch-action:none;cursor:crosshair;user-select:none}.trace-empty{display:flex;align-items:center;flex-direction:column;gap:16px;font-size:12px;color:var(--muted)}.trace-empty .neutral-avatar{width:95px;height:180px}.trace-controls{display:flex;justify-content:space-between;gap:8px;margin:10px 0}.trace-controls button{min-height:40px;font-size:11px;color:var(--muted);padding:0 8px}.crop-field{margin-top:13px;margin-bottom:5px}.crop-field input{min-height:32px}.avatar-editor-note{font-size:11px;line-height:1.85;color:var(--muted);margin:15px 0 23px}.avatar-compare{max-width:640px;margin:auto}.comparison-selects{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin-top:20px}.comparison-figures{display:flex;justify-content:center;gap:30px;min-height:285px;padding:10px 0}.comparison-figures figure{margin:0;flex:1;min-width:0;text-align:center}.comparison-figures .real-avatar,.comparison-figures .neutral-avatar{width:100%;height:215px;fill:var(--accent);opacity:.75}.comparison-figures figure:first-child .real-avatar{fill:var(--trend)}.comparison-figures figcaption{font-size:13px;margin-top:13px;line-height:1.8}.comparison-figures small{display:block;font-size:10px;color:var(--muted)}.comparison-figures p{font-size:11px;line-height:1.8;margin-bottom:0;color:var(--muted)}.avatar-compare>.primary{width:100%}.avatar-records{margin-top:20px}.avatar-records article{display:flex;align-items:center;gap:13px;border-bottom:1px solid var(--line);padding:15px 0}.avatar-records article>div{flex:1;min-width:0}.avatar-records strong{font-size:13px;font-weight:500}.avatar-records small{display:block;font-size:10px;line-height:1.8;color:var(--muted);margin-top:6px}.avatar-records .text-button{font-size:11px}body:has(.health-celebration[open]) #toast{visibility:hidden}@media(max-width:620px){.trace-stage{height:min(350px,44dvh)}.avatar-compact{min-height:240px}.comparison-figures{gap:22px}.comparison-figures .real-avatar{height:205px}.avatar-editor-note{font-size:10px}}
