:root{--ink:#2e3f32;--muted:#798475;--green:#647e50;--line:#e3e8dc;--paper:#f5f7f1}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:14px -apple-system,BlinkMacSystemFont,"Helvetica Neue","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif}button,input,select,textarea{font:inherit}button,a,input,select,textarea,summary{touch-action:manipulation}button{cursor:pointer;transition:background .15s}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #97aa73;outline-offset:3px}input:focus,select:focus,textarea:focus{outline:2px solid #a4b584;outline-offset:1px}.app-shell{display:flex;min-height:100vh}.sidebar{width:218px;position:fixed;inset:0 auto 0 0;background:#fff;border-right:1px solid var(--line);padding:32px 18px 18px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:9px;text-decoration:none;color:var(--ink);font-size:21px;letter-spacing:-.7px;font-weight:700;margin:0 4px 54px}.brand-mark{width:35px;height:38px;background:#7c9363;border-radius:13px 13px 5px 13px;display:grid;place-items:center;color:white;font:italic bold 29px Georgia}.brand-light{font-weight:400;color:#7c9363}.brand small{display:block;font-size:9px;font-weight:400;letter-spacing:.4px;margin-top:4px;color:#8a9583}.nav-label,.section-kicker,.eyebrow{font-size:10px;letter-spacing:1.7px;font-weight:600;color:#8b9a7a}.nav-label{margin:0 12px 15px}.nav-item{display:flex;gap:12px;align-items:center;width:100%;padding:13px;margin-bottom:6px;background:transparent;border:0;text-align:left;border-radius:8px;color:#74816c;font-size:12px}.nav-item span{width:20px;text-align:center;font-size:18px}.nav-item.active{background:#edf2e6;color:#536b3e;font-weight:600}.nav-item:hover{background:#f3f6ef}.sidebar-note{margin:38px 10px;color:#8f9c81}.sidebar-note>span{font-family:serif;font-size:17px}.sidebar-note p{font-size:11px;line-height:1.9}.sidebar-note svg{width:100%;margin-top:8px}.sidebar-bottom{margin-top:auto}.privacy{display:flex;gap:9px;padding:12px 3px}.privacy>span{color:#91a17c}.privacy b{font-size:10px;font-weight:500}.privacy small{display:block;font-size:8px;margin-top:5px;color:#929c8a}.profile{width:100%;display:flex;align-items:center;gap:9px;border:0;border-top:1px solid var(--line);padding:16px 0 0;background:none;color:var(--ink);text-align:left}.profile b{font-size:11px}.profile small{display:block;color:#99a28f;font-size:9px;margin-top:4px}.profile>span:last-child{margin-left:auto;color:#849275}.avatar{background:#eef2e5;width:32px;height:32px;display:grid;place-items:center;border-radius:50%}.main{margin-left:218px;min-width:0;flex:1}.topbar{height:65px;border-bottom:1px solid var(--line);background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 38px;font-size:11px;color:#8c9684}.breadcrumbs span{padding:0 14px;color:#bac2b2}.mobile-brand,.mobile-settings{display:none}.content{max-width:1420px;margin:auto;padding:33px 38px 16px}.welcome-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px;gap:16px}h1{font-size:27px;letter-spacing:.7px;margin:8px 0 0;font-weight:600}.leaf{font-size:25px;color:#a1af70;margin-left:13px}.welcome-row p{font-size:12px;color:#89957f;margin:11px 0 0}.primary-btn{border:0;border-radius:7px;background:var(--green);color:#fff;padding:12px 18px;font-size:12px;font-weight:500;box-shadow:0 3px 8px #556c3620}.primary-btn:hover{background:#4c653c}.outline-btn{border:1px solid #dce3d2;border-radius:6px;background:#fff;color:#657653;padding:9px 12px;font-size:11px}.outline-btn:hover{background:#f1f5e9}.text-btn{border:0;background:transparent;color:#6b8155;font-size:11px;padding:5px}.icon-btn{width:30px;height:30px;border:1px solid var(--line);border-radius:5px;background:#fff;color:#70825c;font-size:22px;display:grid;place-items:center}.mode-banner{background:#eff2df;border:1px solid #e1e6c7;border-radius:7px;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 15px;margin-bottom:17px;color:#6b7550;font-size:11px;line-height:1.6}.mode-banner button{flex-shrink:0}.panel{background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 2px 5px #334b2303}.quick-entry{padding:19px 22px;margin-bottom:17px}.section-header{display:flex;justify-content:space-between;align-items:center}.section-header h2{font-size:16px;margin:5px 0 0;font-weight:600}.section-kicker{font-size:8px}.quick-date{font-size:10px;color:#8c9684;display:flex;align-items:center;gap:9px}.quick-date input{border:1px solid var(--line);border-radius:5px;padding:7px 8px;color:#5f7052;background:#fff;font-size:11px}.quick-weight-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:18px}.weight-control{min-width:0;border:1px solid var(--line);background:#fcfdf9;border-radius:8px;padding:10px 12px}.weight-control.wake{background:#fcfaea;border-color:#e8e2b9}.weight-control>label{font-size:11px;display:flex;align-items:center;gap:6px;color:#6f7c61}.weight-control>label>span{font-size:15px;color:#8d9d68}.weight-control small{display:block;font-size:8px;color:#9ca58f;margin-top:4px}.stepper{display:flex;align-items:center;justify-content:space-between;gap:3px;margin-top:12px}.stepper button{border:1px solid #e1e7d7;background:white;color:#7f916a;width:28px;height:28px;border-radius:50%;flex-shrink:0;font-size:19px;line-height:1;padding:0}.stepper button:hover{background:#edf2e4}.weight-number{display:flex;align-items:baseline;min-width:0;justify-content:center;gap:2px}.weight-number input{width:80px;max-width:100%;min-width:0;border:0;border-bottom:1px solid transparent;background:transparent;color:#3d4d31;text-align:center;font-size:27px;font-weight:500;appearance:textfield;-moz-appearance:textfield;padding:0;letter-spacing:-1px}.weight-number input::placeholder{color:#c1c8b3}.weight-number input::-webkit-inner-spin-button{appearance:none}.weight-number span{font-size:10px;color:#99a28a}.quick-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px}.quick-footer>span{font-size:9px;color:#98a28c}.quick-footer .primary-btn{font-size:11px;padding:10px 16px}.quick-footer .primary-btn span{margin-left:15px}.summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:23px}.summary-card{background:#fff;border:1px solid var(--line);border-radius:8px;padding:15px 18px;min-height:127px}.summary-label{display:flex;align-items:center;justify-content:space-between;color:#7f8b73;font-size:10px}.round-icon{width:26px;height:26px;display:grid;place-items:center;border-radius:8px;font-size:15px}.green{background:#edf3e6;color:#8ca46d}.yellow{background:#faf3d7;color:#b9a15d}.peach{background:#f8ece4;color:#bc9578}.metric{display:flex;align-items:baseline;gap:7px;margin:4px 0 3px}.metric strong{font-size:29px;font-weight:500;letter-spacing:-1px}.metric>span{font-size:10px;color:#a0a991}.summary-card>small{font-size:9px;color:#9aa58c}.progress{height:4px;background:#eef2e8;margin-top:13px;border-radius:4px;overflow:hidden}.progress i{height:100%;background:#a5b786;display:block}.paper-heading{display:flex;justify-content:space-between;align-items:center;padding:22px 22px 14px;gap:10px}.paper-heading h2{font-size:18px;margin:6px 0 0;letter-spacing:.4px}.paper-heading p{font-size:11px;color:#8c967e;margin:8px 0 0}.sheet-actions{display:flex;gap:7px}.week-toolbar{margin:0 22px 14px;display:flex;align-items:center;justify-content:space-between}.week-nav{display:flex;align-items:center;gap:10px}.week-nav h3{font-size:13px;font-weight:500;margin:0;min-width:180px;text-align:center}.sheet-hint{font-size:9px;color:#99a38d}.sheet-scroll{overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#c9d2bb #f7f9f3}.sheet-canvas{min-width:860px}.sheet-day-header,.comparison-strip,.week-log{display:grid;grid-template-columns:100px repeat(7,minmax(0,1fr))}.sheet-day-header{border-top:1px solid #aebc9b;border-bottom:1px solid #aebc9b}.sheet-day-header>div{display:flex;justify-content:center;align-items:center;padding:8px;background:#f5f7ef;font-size:10px;color:#7f8d70;border-right:1px solid #dce4d1}.day-header{border:0;border-right:1px solid #dce4d1;background:#f6f8f1;padding:9px 2px 8px;color:#536144;position:relative}.day-header:hover{background:#edf2df}.day-header b{font-size:12px;font-weight:500}.day-header small{display:block;color:#a0aa90;font-size:9px;margin-top:4px}.day-header.today:after{content:"";position:absolute;top:0;left:25%;width:50%;height:2px;background:#8ea265}.graph{line-height:0;background:white}.graph svg{width:100%;height:auto;display:block}.graph text{font-family:inherit}.graph .plot-point{cursor:pointer}.graph .plot-point:focus{outline:none;stroke:#849f50;stroke-width:4}.comparison-strip{border-top:1px solid #b1bda3;border-bottom:1px solid #cbd5bd}.comparison-label{display:flex;align-items:center;justify-content:center;flex-direction:column;background:#f4f6ee;color:#79876b;font-size:9px;line-height:1.6;border-right:1px solid #cbd5bd}.comparison-day{display:flex;align-items:center;justify-content:center;gap:7px;padding:7px 2px;border-right:1px solid #e0e6d6;font-size:9px;color:#9aa68a}.comparison-day b{font-size:18px;font-weight:500;color:#778a5d}.week-log>div,.week-log>button{border:0;border-right:1px solid #d8e0cd;border-bottom:1px solid #d8e0cd;min-height:39px;padding:7px 5px}.log-label{display:flex;align-items:center;background:#f5f7ef;color:#738262;font-size:10px;padding-left:12px!important}.log-cell{color:#667458;background:#fff;font-size:10px;text-align:center;line-height:1.6;overflow-wrap:anywhere}.log-cell:hover{background:#f2f6e8}.log-cell .sub{display:block;color:#9aa58b;font-size:9px}.log-cell.empty{color:#cad1c0}.log-cell.note{font-size:9px;text-align:left;white-space:pre-wrap}.sheet-foot{padding:13px 20px 5px;display:flex;justify-content:space-between;gap:10px;font-size:9px;color:#8a977b;line-height:1.8}.yellow-key{display:inline-block;width:7px;height:10px;background:#ede6a2;vertical-align:middle;margin-right:5px}.legend-line{width:15px;height:1px;background:#4d5a3c;display:inline-block;vertical-align:middle;margin:0 5px 0 13px}.measurement-hint{font-size:9px;color:#a0aa93;margin:0;padding:2px 20px 14px;line-height:1.7}.source-sheet{margin-top:18px;color:#96a188;font-size:10px}.source-sheet summary{cursor:pointer;padding:7px 2px}.source-sheet>div{display:grid;grid-template-columns:1fr 1fr;gap:15px;background:#fff;padding:15px;border-radius:8px}.source-sheet figure{margin:0}.source-sheet img{width:100%;height:auto}.source-sheet figcaption{padding:8px;text-align:center}footer{display:flex;justify-content:space-between;align-items:center;margin-top:23px;color:#9ba68c;font-size:11px}footer small{font-size:9px;margin-left:12px}dialog{border:1px solid var(--line);border-radius:14px;padding:24px;width:min(620px,calc(100% - 24px));max-height:92dvh;color:var(--ink);box-shadow:0 25px 100px #27311e33}dialog::backdrop{background:#2b372550;backdrop-filter:blur(3px)}dialog h2{font-size:20px;margin:6px 0 0}dialog h3{font-size:13px}dialog p{font-size:12px;line-height:1.8;color:#8b957e}.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.close-btn{width:30px;height:30px;border:0;border-radius:50%;background:#f0f4e9;color:#83916f;font-size:23px}.modal-scroll{max-height:66dvh;overflow-y:auto;padding:2px 3px 6px;scrollbar-width:thin}.record-date-row{display:flex;align-items:flex-end;justify-content:space-between;gap:15px}dialog label{display:flex;flex-direction:column;gap:6px;font-size:11px;color:#738263}dialog input,dialog textarea,dialog select{max-width:100%;min-width:0;border:1px solid #dfe6d5;border-radius:6px;padding:9px;color:#50643c;background:#fdfefb;font-size:13px}dialog textarea{resize:vertical;width:100%}.input-hint{font-size:10px!important;color:#9aa58a!important;line-height:1.7;margin:11px 0}.inline-choice{border:0;padding:0;display:flex;gap:5px;min-width:0}.inline-choice legend{font-size:10px;color:#94a080;margin-bottom:5px}.inline-choice label,.symbol-choices label{display:block}.inline-choice input,.symbol-choices input{position:absolute;opacity:0;width:1px;height:1px}.inline-choice span,.symbol-choices span{display:block;border:1px solid #dfe6d5;border-radius:6px;background:#fff;padding:8px 13px;font-size:11px;cursor:pointer}.inline-choice input:checked+span,.symbol-choices input:checked+span{background:#eef3e3;border-color:#92a572;color:#52712d;box-shadow:inset 0 0 0 1px #92a572}.inline-choice input:focus-visible+span,.symbol-choices input:focus-visible+span{outline:3px solid #97aa73}.form-section{font-size:10px;letter-spacing:1px;color:#9da98b;display:flex;align-items:center;gap:10px;margin:19px 0 10px}.form-section span{font-size:13px;color:#5a6f47;letter-spacing:0}.form-section small{margin-left:auto;font-size:10px;font-weight:400}.modal-weights{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.modal-weights .weight-number input{font-size:24px;padding:0;border:0;background:transparent}.form-details{border-top:1px solid #e9eddf;margin-top:17px;padding-top:14px}.form-details summary{font-size:12px;color:#677f4c;cursor:pointer;margin-bottom:12px;font-weight:500}.meal-row{display:grid;grid-template-columns:38px 90px 110px minmax(0,1fr);gap:7px;align-items:end;margin-bottom:10px}.meal-row>b{font-size:11px;color:#7b896a;font-weight:500;align-self:center}.meal-row label{font-size:9px}.meal-row input,.meal-row select{width:100%;font-size:11px;padding:9px 5px}.condition-inputs{display:grid;grid-template-columns:1fr 1fr;gap:15px}.choice-field{padding:0;border:0;margin:0;min-width:0}.choice-field legend{font-size:11px;margin-bottom:8px;color:#7a8869}.symbol-choices{display:flex;gap:5px;flex-wrap:wrap}.symbol-choices span{padding:7px 11px;font-size:15px;min-width:34px;text-align:center}.hunger-field{grid-column:1/-1}.hunger-field small{display:block;font-size:9px;color:#96a383;margin-top:8px}.unit-input{display:flex;align-items:center;gap:7px}.unit-input input{width:100%;min-width:0}.unit-input span{font-size:10px;white-space:nowrap}.supplement-row{display:grid;grid-template-columns:110px 1fr;gap:10px;padding:10px 0;align-items:center;border-bottom:1px solid #eef1e7}.supplement-row>b{font-size:11px;font-weight:500;color:#7c8b6b}.supplement-row .symbol-choices span{font-size:10px;padding:7px 10px}.supp-times{display:flex;gap:7px}.supp-times input{width:100%;min-width:0;font-size:10px;padding:7px}.modal-bottom{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #e5ebda;margin-top:14px;padding-top:16px;gap:10px}.danger{color:#ae8977}.backup-actions{display:flex;gap:8px;flex-wrap:wrap}#settingsDialog{width:min(480px,calc(100% - 24px))}#settingsDialog>.primary-btn{margin-top:12px}#settingsDialog hr{border:0;border-top:1px solid var(--line);margin:24px 0}.import-label{cursor:pointer;font-size:11px;display:block}.import-label input{display:block;width:100%;margin-top:8px;font-size:10px}.guide-list{padding-left:20px}.guide-list li{padding:8px 0 8px 8px;color:#647c48;font-size:13px}.guide-list p{margin:7px 0 0}.toast{position:fixed;z-index:10;bottom:26px;left:50%;transform:translate(-50%,12px);padding:12px 20px;background:#3e532e;color:#fff;border-radius:8px;font-size:12px;opacity:0;pointer-events:none;transition:.2s;max-width:90vw;text-align:center}.toast.show{opacity:1;transform:translate(-50%,0)}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:1100px){.sidebar{width:185px;padding-inline:13px}.main{margin-left:185px}.content{padding:25px 22px}.topbar{padding:0 22px}.weight-control{padding:9px 7px}.stepper{gap:0}.weight-number input{width:65px;font-size:25px}.quick-weight-grid{gap:7px}.weight-number span{font-size:9px}.brand{font-size:19px;gap:6px}.sheet-hint{display:none}}
@media(max-width:900px){.sidebar{display:none}.main{margin-left:0}.topbar{height:52px;padding:0 17px;font-size:9px}.breadcrumbs{display:none}.mobile-brand{display:block;font-size:17px;font-weight:600;color:#6e8554}.mobile-settings{display:inline-block}.content{padding:24px 14px 15px}.welcome-row{align-items:flex-start;margin-bottom:17px}.welcome-row h1{font-size:21px}.eyebrow{font-size:8px;letter-spacing:1.3px}.leaf{font-size:18px;margin-left:6px}.welcome-row p{font-size:10px}.welcome-actions{display:flex;gap:7px;align-items:center}.welcome-actions>.primary-btn{font-size:0;padding:8px;width:34px;height:34px}.welcome-actions>.primary-btn:after{content:"＋";font-size:19px}.welcome-actions>.outline-btn{padding:8px;font-size:10px}.mode-banner{font-size:10px;padding:10px}.mode-banner button{font-size:10px}.quick-entry{padding:16px 13px}.section-header{gap:8px}.section-header h2{font-size:15px}.quick-date{font-size:0}.quick-date input{font-size:10px;max-width:128px}.quick-weight-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:14px}.weight-control{padding:10px}.weight-control>label{font-size:11px}.stepper{margin-top:9px;gap:4px}.weight-number input{font-size:28px;width:78px}.stepper button{width:30px;height:30px}.quick-footer{flex-direction:column;align-items:stretch;gap:10px}.quick-footer>span{font-size:9px}.quick-footer .primary-btn{padding:12px}.summary-grid{gap:7px;margin-bottom:18px}.summary-card{padding:12px 9px;min-height:113px}.summary-label{font-size:8px;line-height:1.5}.round-icon{display:none}.metric{margin:9px 0 5px;gap:4px}.metric strong{font-size:24px}.metric>span{font-size:8px}.summary-card>small{font-size:8px;line-height:1.7;display:block}.paper-heading{padding:17px 13px 12px;align-items:flex-start}.paper-heading h2{font-size:16px}.sheet-actions{gap:4px}.sheet-actions button{font-size:9px;padding:7px}.week-toolbar{margin:0 13px 12px}.week-nav{gap:7px;width:100%}.week-nav h3{font-size:12px;min-width:0;flex:1}.week-nav .icon-btn{width:28px;height:28px}.week-nav .text-btn{margin-left:auto}.sheet-foot{flex-direction:column;gap:2px;padding:11px 12px 4px;font-size:8px}.measurement-hint{font-size:8px;padding:2px 12px 12px}.source-sheet{margin-top:15px}footer small{display:none}footer .text-btn{font-size:9px}dialog{padding:19px 15px}.modal-scroll{max-height:65dvh}.meal-row{grid-template-columns:32px 84px 100px minmax(0,1fr);gap:5px}.meal-row input,.meal-row select{font-size:10px}.condition-inputs{gap:12px}.symbol-choices span{padding:7px 9px;min-width:29px}.supplement-row{grid-template-columns:95px 1fr}.record-date-row{gap:7px}.record-date-row input[type=date]{max-width:145px}.inline-choice span{padding:9px 11px}.modal-bottom .text-btn{font-size:10px}.modal-bottom .primary-btn{font-size:11px;padding:12px}.source-sheet>div{gap:7px;padding:7px}}
@media(max-width:390px){.meal-row{grid-template-columns:30px 78px 1fr}.meal-row>label:last-child{grid-column:2/-1}.condition-inputs{grid-template-columns:1fr}.hunger-field{grid-column:auto}.quick-date input{max-width:119px}.welcome-row h1{font-size:19px}}
@page{size:A4 landscape;margin:8mm}
@media print{body{background:white;color:#222;font-size:10px;print-color-adjust:exact;-webkit-print-color-adjust:exact}.sidebar,.topbar,.welcome-row,.mode-banner,.quick-entry,.summary-grid,.source-sheet,footer,dialog,.toast,.sheet-actions,.week-nav>button{display:none!important}.main{margin:0}.content{padding:0;max-width:none}.sheet-panel{border:0;border-radius:0;box-shadow:none;break-inside:avoid}.paper-heading{padding:0 0 6px}.paper-heading h2{font-size:16px}.paper-heading .section-kicker{display:none}.paper-heading p{font-size:10px;margin:3px 0}.week-toolbar{margin:0 0 6px}.week-nav h3{font-size:12px;text-align:left}.sheet-hint{display:none}.sheet-scroll{overflow:visible}.sheet-canvas{width:100%;min-width:0}.sheet-day-header,.comparison-strip,.week-log{grid-template-columns:100px repeat(7,minmax(0,1fr))}.sheet-day-header button{padding:4px}.graph svg{height:69mm}.week-log>div,.week-log>button{min-height:0;padding:3px 4px;font-size:8px;line-height:1.4}.week-log .sub{font-size:7px}.comparison-day{padding:2px}.comparison-day b{font-size:13px}.sheet-foot{padding:6px 0 0;font-size:8px}.measurement-hint{padding:2px 0;font-size:7px}.log-cell.note{font-size:7px}}

/* Keep each native choice input inside its visible label so focus cannot scroll
   the dialog toward an invisible input elsewhere on the page. */
.symbol-choices label,.inline-choice label{position:relative}
.symbol-choices input,.inline-choice input{top:0;left:0;margin:0}
/* The snack row has time and free text only; content uses the former type column. */
.snack-row .meal-content{grid-column:3/-1}
@media(max-width:390px){.snack-row .meal-content{grid-column:2/-1}}

/* Sleep calculation and five tablet entries. */
.sleep-time-range{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:6px;align-items:end}
.sleep-time-range>span{padding-bottom:10px;color:#8b9a7a;font-size:12px}
.sleep-time-range input{width:100%;min-width:0;padding:9px 5px}
.sleep-time-range label{font-size:10px;min-width:0}
#sleepResult{display:block;margin-top:10px;color:#54723b;font-size:12px;font-weight:600;line-height:1.6}
.sleep-field>small{display:block;color:#95a085;font-size:9px;line-height:1.7;margin-top:5px}
#clearSleep{padding:4px 0;margin-top:4px;font-size:9px}
.supp-times{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.supp-times label{min-width:0}
@media(max-width:600px){.sleep-field{grid-column:1/-1}.supp-times{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Daily garment notes share the exact columns used by the graph and journal. */
.clothing-grid{display:grid;grid-template-columns:100px repeat(7,minmax(0,1fr));border-bottom:1px solid #b6c3a5}
.clothing-label{display:flex;flex-direction:column;justify-content:center;padding:10px 9px;color:#78886a;background:#f6f8f1;font-size:10px;border-right:1px solid #dce4d1;gap:5px}
.clothing-label small{font-size:8px;color:#a0aa92}
.clothing-day{min-width:0;border-right:1px solid #dce4d1;padding:4px;background:#fdfef9}
.clothing-day button{display:flex;justify-content:space-between;align-items:center;gap:3px;width:100%;border:1px solid transparent;border-radius:4px;background:transparent;color:#7a896a;font-size:9px;padding:7px 3px;white-space:nowrap}
.clothing-day button+button{border-top:1px dotted #e1e6d8;border-radius:0}
.clothing-day button:hover{background:#f2f5e8;border-color:#dce4ca;border-radius:4px}
.clothing-day button b{font-weight:500;color:#5f7550}
.clothing-fields{margin-top:17px;padding:13px;border:1px solid #e1e7d7;border-radius:8px;background:#fcfdf8}
.clothing-fields legend{font-size:11px;padding:0 5px}
.clothing-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.gram-control{min-width:0}
.gram-control>label{font-size:11px;color:#78886a}
.gram-stepper{display:flex;align-items:center;justify-content:space-between;gap:5px;margin-top:9px}
.gram-stepper>button{flex-shrink:0;border:1px solid #dce5ce;background:white;border-radius:50%;width:29px;height:29px;padding:0;color:#7d9166;font-size:19px;line-height:1}
.gram-stepper>button:hover{background:#edf3e2}
.gram-stepper>div{display:flex;align-items:baseline;justify-content:center;gap:4px;min-width:0}
.gram-stepper input{width:85px;min-width:0;padding:5px 0;text-align:center;font-size:23px;border:0;background:transparent;appearance:textfield;-moz-appearance:textfield}
.gram-stepper input::-webkit-inner-spin-button{appearance:none}
.gram-stepper span{font-size:11px;color:#9aa88a}
.clothing-fields>small{display:block;font-size:9px;color:#95a384;line-height:1.7;margin-top:13px}
@media(max-width:500px){.clothing-fields{padding:9px}.clothing-inputs{gap:10px}.gram-stepper{gap:2px}.gram-stepper input{width:62px;font-size:21px}.gram-stepper>button{width:25px;height:25px}}
@media print{.clothing-label{padding:4px;font-size:8px}.clothing-label small{display:none}.clothing-day{padding:0 3px}.clothing-day button{padding:3px 0;font-size:8px}}

/* Two levels in each meal cell: a clear time above the food description. */
.week-log .log-cell.meal-cell{display:grid;grid-template-rows:auto 1fr;padding:0;min-height:62px}
.meal-time{display:block;padding:6px 4px 5px;font-size:12px;font-weight:600;line-height:1.4;color:#61774d;font-variant-numeric:tabular-nums}
.meal-body{display:flex;justify-content:center;align-items:center;border-top:1px solid #dce4d1;padding:6px 5px;font-size:10px;line-height:1.6;min-height:29px;overflow-wrap:anywhere}
.meal-time.empty,.meal-body.empty{color:#b7c2a9;font-weight:400}
/* Room beyond the final wake line keeps the Saturday dot and label unclipped. */
.sheet-canvas{min-width:860px;padding-right:12px}
.graph svg{overflow:visible}
.next-wake-label{cursor:pointer}
.next-wake-label:hover{fill:#405c2d;text-decoration:underline}
@media print{.sheet-canvas{min-width:0;padding-right:12px}.week-log .log-cell.meal-cell{min-height:0}.meal-time{font-size:10px;padding:2px 3px}.meal-body{font-size:8px;min-height:0;padding:3px}.next-wake-label{font-size:8px}}

/* Annotations span the graph and journal; the toolbar stays above this layer. */
.graph-frame{position:relative}
.graph-ink{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.graph-frame.inking .graph-ink{pointer-events:auto;touch-action:none;cursor:crosshair}
.ink-toolbar{position:sticky;z-index:3;left:0;max-width:100%;display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:9px 12px;border-top:1px solid #e3e8dc;border-bottom:1px solid #d8dfcc;background:#fcfdf9;color:#7d896e}
.ink-actions{display:flex;gap:6px;flex-wrap:wrap}
.ink-toolbar button{font-size:11px;padding:8px 11px;border:1px solid #dce3d2;border-radius:5px;background:white;color:#647653;min-height:34px}
.ink-toolbar button[aria-pressed=true]{color:#b72a2a;background:#fff0ed;border-color:#e7aaa3}
#inkToggle::before{content:'✎';color:#d73535;margin-right:5px;font-size:14px}
.ink-toolbar button:disabled{opacity:.45;cursor:default}
.ink-toolbar small{font-size:9px;line-height:1.6;flex-basis:100%}
@media(max-width:900px){.ink-toolbar{padding:8px}.ink-toolbar button{padding:8px 10px}.ink-toolbar small{font-size:9px}}
@media print{.ink-toolbar{display:none!important}.graph-ink{height:100%}}

/* Text and stamp placement uses the same coordinates as the red pen. */
.graph-frame[data-tool=text] .graph-ink{cursor:text}
.graph-frame[data-tool=stamp] .graph-ink{cursor:copy}
.annotation-object{pointer-events:all;cursor:grab;touch-action:none;outline:none;user-select:none;-webkit-user-select:none}
.annotation-object:active{cursor:grabbing}
.annotation-object:focus-visible .annotation-hit{stroke:#8aa46d;stroke-width:2;stroke-dasharray:4 3}
.annotation-hit{pointer-events:all}
.ink-stamp-palette{display:flex;gap:7px;flex-wrap:wrap;flex-basis:100%;padding-top:2px}
.ink-stamp-palette button{display:flex;flex-direction:column;align-items:center;width:100px;padding:5px;background:#fffdf8}
.ink-stamp-palette svg{width:78px;height:78px}
.ink-stamp-palette span{font-size:10px;font-weight:600;color:#584a3c;margin-top:4px;white-space:nowrap}
.ink-object-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:10px;color:#7b886d}
.ink-object-controls label{display:flex;align-items:center;gap:6px;white-space:nowrap;font-size:10px}
.ink-object-controls select{padding:6px 8px;margin:0;background:white;border:1px solid #dce3d2;border-radius:5px;color:#647653;font-size:11px}
#inkSelectionControls{display:flex;gap:6px;flex-wrap:wrap}
#inkDeleteObject{color:#ae6657}
.ink-text-editor{position:absolute;z-index:4;padding:12px;background:#fffdf8;border:1px solid #d9c9ba;border-radius:9px;box-shadow:0 5px 24px #40311d26;color:#725d4d}
.ink-text-editor label{display:block;font-size:11px;margin-bottom:6px}
.ink-text-editor textarea{display:block;width:100%;margin:0 0 9px;padding:8px;font-size:16px;line-height:1.5;border:1px solid #e2dbcc;border-radius:5px;resize:vertical;max-height:160px;background:white;color:#b53e49}
.ink-text-editor>div{display:flex;gap:7px}
.ink-text-editor button{border:1px solid #dce3d2;border-radius:5px;background:white;color:#6a7759;padding:8px 11px;font-size:11px;min-height:34px}
#inkTextSave{background:#647e50;color:white;border-color:#647e50}
.ink-stamp-palette[hidden],.ink-object-controls[hidden],.ink-text-editor[hidden],#inkSelectionControls[hidden],#inkEditText[hidden]{display:none}
@media(max-width:900px){.ink-actions{gap:5px}.ink-stamp-palette{gap:5px}.ink-stamp-palette button{width:calc((100% - 10px)/3);padding:3px}.ink-stamp-palette svg{width:68px;height:68px}.ink-object-controls{flex-basis:100%}}
@media print{.ink-text-editor,.annotation-selection{display:none!important}.annotation-object:focus-visible .annotation-hit{stroke:none}}

.tablet-time{display:inline-block;white-space:nowrap;font-variant-numeric:tabular-nums}

.legend-line.overnight-key{background:#d73535;height:3px;border-radius:2px}

.ink-stamp-palette button[aria-pressed=true]{border-color:#d5352a;box-shadow:0 0 0 1px #d5352a;background:#fff6ce}

#latestCaption{font-weight:700;color:#77866b}

.ink-quick-controls{position:fixed;z-index:8;right:20px;bottom:18px;display:flex;align-items:center;gap:8px;padding:8px 10px;background:#fffdf5;box-shadow:0 3px 20px #3e492230;border:1px solid #d7dfcb;border-radius:9px;color:#6c795d;font-size:11px}
.ink-quick-controls button{padding:9px 12px;border:1px solid #d6ddca;border-radius:5px;background:white;color:#657653;font-size:12px}
#inkDone{background:#647e50;color:white;border-color:#647e50}
.ink-quick-controls button:disabled{opacity:.4}
.ink-quick-controls[hidden]{display:none}
@media(max-width:600px){.ink-quick-controls{right:10px;bottom:10px;gap:6px}.ink-quick-controls>span{display:none}}
@media print{.ink-quick-controls{display:none!important}}

/* A seven-day drive with a small smiling car. */
.week-journey-card{padding:14px 16px 11px;background:linear-gradient(150deg,#fffefa,#f9fbf2);overflow:hidden}
.journey-badge{font-size:8px;letter-spacing:1px;font-weight:700;color:#aa9264;background:#f7efd9;padding:5px 7px;border-radius:20px;white-space:nowrap}
.journey-counter-row{display:flex;align-items:center;justify-content:space-between;gap:5px}
.journey-counter-row .metric{margin:3px 0 0}
.journey-replay{background:transparent;border:0;padding:6px 0 6px 7px;color:#899574;font-size:9px;white-space:nowrap}
.journey-replay:hover{color:#52713d}
.journey-replay[hidden]{display:none}
.journey-track{position:relative;height:106px;margin:0 -5px;isolation:isolate}
.journey-landscape{position:absolute;inset:0;width:100%;height:100%;border-radius:9px;z-index:-1}
.journey-lane{position:absolute;inset:0 20px}
.journey-road.progress{position:absolute;left:0;right:0;bottom:23px;margin:0;height:5px;background:#c7d6b4;border-radius:8px}
.journey-road.progress i{height:100%;border-radius:8px;background:#96af68;transition:none}
.journey-road.progress i::after{display:none}
.journey-stop{position:absolute;bottom:21px;transform:translateX(-50%);text-align:center;color:#9caa8c;line-height:1}
.journey-stop>i{display:block;width:9px;height:9px;border:2px solid #c7d6b4;border-radius:50%;background:#fbfcf4;transition:background .2s,border-color .2s}
.journey-stop>b{position:absolute;top:15px;left:50%;transform:translateX(-50%);font-size:8px;font-weight:500;white-space:nowrap}
.journey-stop.is-passed{color:#66804a}
.journey-stop.is-passed>i{background:#edce80;border-color:#9bab6b}
.journey-stop.is-passed>b{font-weight:700}
.journey-goal{position:absolute;left:100%;width:25px;height:39px;bottom:26px;transform:translateX(-3px);transform-origin:bottom left}
.journey-goal svg{display:block;width:100%;height:100%}
.journey-runner{position:absolute;left:0;bottom:24px;width:66px;height:45px;transform:translateX(-50%);z-index:2;will-change:left}
.car-facing{display:block;width:100%;height:100%}
.journey-car{display:block;width:100%;height:100%;overflow:visible}
.car-body,.car-chassis,.car-wheel,.car-eyes{transform-box:fill-box;transform-origin:center}
.week-journey-card.in-view .car-body{animation:car-idle 2.8s ease-in-out infinite}
.week-journey-card.in-view .car-eyes{animation:car-blink 5.2s linear infinite}
.week-journey-card.in-view.is-moving .car-body{animation:car-cruise .3s ease-in-out infinite alternate}
.week-journey-card.in-view.is-moving .car-wheel{animation:car-wheel-turn .48s linear infinite}
.week-journey-card.is-backtracking .car-facing{transform:scaleX(-1)}
.week-journey-card.is-counting #weekCount{animation:journey-count-pop .55s ease-out}
.journey-status{font-size:9px;font-weight:600;color:#87976b;line-height:1.6;margin:7px 0 0;min-height:15px}
.week-journey-card.is-complete .journey-goal{bottom:60px}
.week-journey-card.is-complete .journey-status{color:#7f8a40}
.week-journey-card.is-complete .journey-badge{background:#f7e9b8;color:#a37e30}
.week-journey-card.is-complete .journey-road.progress i{background:linear-gradient(90deg,#a6b972,#d5b563)}
.week-journey-card.in-view.is-celebrating .car-chassis{animation:car-cheer .65s ease-in-out 3}
.week-journey-card.in-view.is-celebrating .car-wheel{animation:car-wheel-turn .48s linear 3}
.week-journey-card.is-celebrating.is-complete .journey-goal{animation:journey-flag .45s ease-in-out 4 alternate}
.journey-sparkles{position:absolute;left:0;right:0;top:0;bottom:0;pointer-events:none}
.journey-sparkles>i{position:absolute;left:var(--spark-x,90%);top:var(--spark-y,14px);font-size:15px;font-style:normal;color:#dbb85f;opacity:0}
.journey-sparkles>i:nth-child(2){--spark-x:78%;--spark-y:35px;color:#e9ac94;font-size:12px}
.journey-sparkles>i:nth-child(3){--spark-x:100%;--spark-y:41px;color:#a4bd76;font-size:12px}
.journey-sparkles>i:nth-child(4){--spark-x:70%;--spark-y:11px;font-size:10px}
.week-journey-card.is-celebrating.is-complete .journey-sparkles>i{animation:journey-spark 1s .15s 2 both}
.week-journey-card.is-celebrating.is-complete .journey-sparkles>i:nth-child(even){animation-delay:.3s}
@keyframes car-idle{50%{transform:translateY(-.6px)}}
@keyframes car-blink{0%,43%,47%,100%{transform:scaleY(1)}45%{transform:scaleY(.12)}}
@keyframes car-cruise{from{transform:translateY(0) rotate(-1deg)}to{transform:translateY(-1.5px) rotate(1deg)}}
@keyframes car-wheel-turn{to{transform:rotate(360deg)}}
@keyframes car-cheer{0%,100%{transform:translateY(0) rotate(0)}45%{transform:translateY(-6px) rotate(-4deg)}70%{transform:translateY(-2px) rotate(3deg)}}
@keyframes journey-count-pop{50%{transform:scale(1.12);color:#8da75d}}
@keyframes journey-flag{to{transform:translateX(-3px) rotate(7deg)}}
@keyframes journey-spark{0%,100%{opacity:0;transform:scale(.5) translateY(5px)}45%{opacity:1;transform:scale(1.15) translateY(-3px)}}
@media(max-width:640px){.summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.week-journey-card{grid-column:1/-1;padding:13px 16px 12px}.week-journey-card .summary-label{font-size:10px}.journey-counter-row .metric{margin:0}.journey-track{height:112px}.journey-status{font-size:10px}.journey-replay{font-size:10px}.journey-lane{inset-inline:23px}}
@media(prefers-reduced-motion:reduce){.week-journey-card *{animation:none!important;transition:none!important}.journey-replay{display:none}.journey-sparkles{display:none}}
@media print{.journey-replay{display:none}.week-journey-card *{animation:none!important;transition:none!important}}

.deru-picker{min-width:0;display:flex;flex-direction:column;gap:9px}
.deru-custom{display:flex;flex-direction:row;align-items:center;gap:12px;color:#879574;font-size:10px}
.deru-number{display:flex;align-items:center;gap:7px}
.deru-number input{width:92px;padding:8px 10px;font-size:15px;font-variant-numeric:tabular-nums}
.deru-number>span{font-size:11px;color:#8b987c}
@media(max-width:600px){.deru-custom{gap:8px}.deru-number input{width:85px}}

/* Product colors make supplement row headings easy to find. */
.week-log .log-label--deru,.week-log .log-label--lap,.week-log .log-label--tablet,.week-log .log-label--green{font-weight:700}
.week-log .log-label--deru{background:#f7d8c2;color:#603b28}
.week-log .log-label--lap{background:#ffe693;color:#59440d}
.week-log .log-label--tablet{background:#bcdcf5;color:#173e64}
.week-log .log-label--green{background:#c2e2b7;color:#244c25}

@media screen{
  .week-log .log-cell[data-section="supplements"]:not(.empty){font-size:12px;font-weight:600;color:#435439;line-height:1.7;font-variant-numeric:tabular-nums}
}

/* Pinch and drag resize controls, with a continuous keyboard-accessible fallback. */
.annotation-resize-handle{cursor:nwse-resize;touch-action:none;pointer-events:all}
.ink-object-controls input[type=range]{width:130px;max-width:38vw;accent-color:#647e50;touch-action:pan-y}
.ink-object-controls output{min-width:42px;font-variant-numeric:tabular-nums;color:#51663d;font-weight:600}
@media print{.annotation-resize-handle{display:none!important}}

.graph-frame.annotation-transforming .graph-ink{pointer-events:auto;touch-action:none}

/* Two snack entries share the same journal row and annotation band. */
.snack-row>b{white-space:nowrap;font-size:10px}
.week-log .log-cell.snack-cell{display:flex;flex-direction:column}
.snack-cell>.meal-body{flex:1}
.snack-entry{display:block;flex:1}
.snack-entry+.snack-entry{border-top:2px solid #cbd5bd}

/* Keep additional snack fields compact until explicitly opened. */
.snack-extra{margin:4px 0 10px}
.snack-extra>summary{display:flex;align-items:center;gap:8px;list-style:none;margin:0;padding:9px 10px;border:1px solid #dfe6d5;border-radius:6px;background:#f6f8f1;color:#647b4c;font-size:11px;font-weight:500;cursor:pointer}
.snack-extra>summary::-webkit-details-marker{display:none}
.snack-extra>summary::before{content:'＋';flex:none;font-size:15px;line-height:1}
.snack-extra[open]>summary::before{content:'−'}
.snack-extra>summary>span{flex:none}
.snack-extra>summary>small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#81916e;font-size:10px;font-weight:400}
.snack-extra>.meal-row{margin:10px 0 0}
