:root{color-scheme:light;--ink:#202522;--muted:#6d736f;--paper:#f4f1e9;--panel:#fffefa;--line:#c9ccc8;--line-strong:#333a36;--accent:#163fce;--planned:#9ca2a0;--danger:#b32929;--band-a:#fffaf0;--band-b:#edf4ec;--food-width:238px;--cell:42px;--header-h:76px;--shadow:0 12px 38px #23322913}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--paper);color:var(--ink);font:14px/1.4 ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,input{font:inherit}button{cursor:pointer;color:inherit}.app-header{height:58px;position:sticky;top:0;z-index:50;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;padding:8px max(16px,calc((100vw - 1500px)/2));background:#f4f1e9f2;border-bottom:1px solid #d7d5cd;backdrop-filter:blur(14px)}.brand{display:flex;align-items:center;gap:9px;font:750 20px/1 ui-serif,Georgia,serif}.brand-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#235a3a;color:#fff;font-size:19px}.view-switch{display:flex;border:1px solid #c9ccc8;border-radius:10px;overflow:hidden;background:#fff}.view-switch button{border:0;background:transparent;padding:8px 13px}.view-switch button+button{border-left:1px solid #c9ccc8}.view-switch button.active{background:#294e37;color:#fff}#account{justify-self:end;display:flex;align-items:center;gap:8px;color:var(--muted)}.text-button,.icon-button,.secondary,.primary{border:1px solid #c3c8c4;border-radius:8px;background:#fff;padding:7px 10px}.primary{background:#294e37;border-color:#294e37;color:#fff;font-weight:700}.text-button{border:0;background:transparent;color:#41524a}.planner{height:calc(100vh - 58px);display:flex;flex-direction:column}.period-toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:10px max(12px,calc((100vw - 1500px)/2));border-bottom:1px solid #d4d3cc;background:#faf8f2}.date-title{min-width:190px;text-align:center;font:700 17px ui-serif,Georgia,serif}.spacer{flex:1}.setting{display:flex;align-items:center;gap:6px;color:var(--muted)}.setting input{width:58px;padding:7px;border:1px solid #c3c8c4;border-radius:7px}.lock-button.locked{background:#343a37;color:#fff}.save-hint{font-size:12px;color:var(--muted)}.sheet-wrap{position:relative;flex:1;min-height:0;overflow:auto;background:#fff;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.meal-sheet{border-collapse:separate;border-spacing:0;table-layout:fixed;width:max-content;min-width:100%;background:#fff}.meal-sheet th,.meal-sheet td{height:34px;padding:0;border-right:1px solid var(--line);border-bottom:1px solid var(--line);text-align:center}.meal-sheet thead th{position:sticky;top:0;z-index:20;background:#f6f3eb}.meal-sheet thead tr:first-child th{height:42px;border-bottom:0}.meal-sheet thead tr:last-child th{top:42px;height:30px;border-bottom:3px double var(--line-strong);font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}.food-head,.food-cell,.category-title{position:sticky!important;left:0;z-index:25!important;width:var(--food-width);min-width:var(--food-width);max-width:var(--food-width);text-align:left!important;padding:0 10px!important}.food-head{z-index:35!important;background:#f6f3eb!important;border-right:2px solid var(--line-strong)!important}.date-head{font:700 13px ui-serif,Georgia,serif}.date-head.today{background:#e8f0e9}.meal-col{width:var(--cell);min-width:var(--cell)}.day-end{border-right:2px solid var(--line-strong)!important}.category-row th{height:31px;background:#e2e5df;border-top:2px solid var(--line-strong);border-bottom:1px solid #aeb5b0;font:750 12px ui-sans-serif,system-ui;text-transform:uppercase;letter-spacing:.07em;color:#48514c}.category-title{background:#e2e5df!important;border-right:2px solid var(--line-strong)!important}.category-fill{background:#e2e5df}.food-row.band-0 td,.food-row.band-0 th{background:var(--band-a)}.food-row.band-1 td,.food-row.band-1 th{background:var(--band-b)}.food-cell{border-right:2px solid var(--line-strong)!important;font-weight:590}.food-main{height:100%;display:flex;align-items:center;gap:7px;min-width:0}.food-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.recency{flex:0 0 15px;width:15px;height:15px;border:1px solid #999;border-radius:50%;display:grid;place-items:center;font-size:7px;font-weight:800;color:#535755}.row-action{margin-left:auto;opacity:0;border:0;background:transparent;border-radius:5px;padding:3px 5px;color:#707773}.food-row:hover .row-action,.food-row:focus-within .row-action{opacity:1}.mark-cell{width:var(--cell);min-width:var(--cell);position:relative;user-select:none;touch-action:manipulation;cursor:pointer;font:800 23px/1 ui-rounded,"Arial Rounded MT Bold",sans-serif}.mark-cell:focus-visible,.row-action:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid #315ce74a;outline-offset:-3px}.mark-cell.planned{color:var(--planned);font-weight:500}.mark-cell.eaten{color:var(--accent);font-weight:950;text-shadow:.35px 0 currentColor,-.35px 0 currentColor}.mark-cell.saving:after{content:"";position:absolute;right:3px;bottom:3px;width:5px;height:5px;border-radius:50%;background:#d09927}.locked-sheet .mark-cell{cursor:default;background-image:linear-gradient(#ffffff25,#ffffff25)}.hidden-row td,.add-row td{height:28px;background:#f7f6f1}.hidden-handle{position:sticky;left:0;z-index:15;text-align:left!important;padding-left:10px!important;border-right:2px solid var(--line-strong)!important}.hidden-handle button,.add-toggle{border:0;background:transparent;color:#66726b;font-size:12px}.hidden-tray{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:5px 10px;background:#f7f6f1;border-bottom:1px solid var(--line)}.hidden-chip{border:1px solid #c8cec9;border-radius:999px;background:#fff;padding:5px 9px;font-size:12px}.add-cell{position:sticky;left:0;text-align:left!important;padding-left:8px!important;border-right:2px solid var(--line-strong)!important}.add-toggle{width:26px;height:25px;border:1px solid #c7cbc7;border-radius:6px;background:#fff;font-size:18px;line-height:1}.add-form{display:flex;gap:5px;padding:3px 0}.add-form input{width:180px;padding:4px 7px;border:1px solid #bfc5c0;border-radius:6px}.empty-row{padding:20px!important;text-align:left!important;color:var(--muted)}#toast{position:fixed;right:18px;bottom:18px;z-index:100;padding:10px 14px;border-radius:9px;background:#262b28;color:#fff;opacity:0;transform:translateY(8px);transition:.18s;pointer-events:none;max-width:360px}#toast.show{opacity:1;transform:none}#toast.error{background:#9e2e2e}#tooltip{position:fixed;z-index:110;max-width:240px;padding:6px 9px;border-radius:6px;background:#202522;color:#fff;font-size:12px;pointer-events:none;box-shadow:0 5px 18px #0003}.history-view{max-width:1400px;margin:auto;padding:24px 18px 70px}.history-head{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:18px}.history-head h1{margin:0;font:750 30px ui-serif,Georgia,serif}.history-head p{margin:4px 0 0;color:var(--muted)}.history-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(215px,1fr));gap:12px}.history-card{border:1px solid #cbd0cb;border-radius:12px;background:#fff;padding:14px;text-align:left;box-shadow:0 3px 13px #29352e0a}.history-card:hover{border-color:#819087;transform:translateY(-1px)}.history-card-top{display:flex;justify-content:space-between;gap:8px}.history-date{font:700 16px ui-serif,Georgia,serif}.lock-pill{font-size:10px;padding:3px 6px;border-radius:99px;background:#e5e8e5;color:#536059;text-transform:uppercase}.mini-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;margin:15px 0}.mini-grid span{height:12px;border-radius:2px;background:#eceeea}.mini-grid .has-plan{background:#b9bdbc}.mini-grid .has-eaten{background:#3157d5}.history-counts{display:flex;gap:12px;color:var(--muted);font-size:12px}.loading{padding:70px;text-align:center;color:var(--muted)}.auth-page{display:grid;place-items:center;min-height:100vh;padding:20px}.auth-card{width:min(420px,100%);padding:30px;border:1px solid #d1d0c9;border-radius:17px;background:#fff;box-shadow:var(--shadow)}.auth-brand{justify-content:center}.auth-intro{text-align:center;color:var(--muted);margin:10px 0 24px}.auth-card label{display:grid;gap:6px;margin:13px 0;font-weight:650}.auth-card input{width:100%;padding:10px 11px;border:1px solid #bfc4c0;border-radius:8px}.auth-actions{display:flex;gap:8px;margin-top:16px}.auth-actions button{flex:1;padding:10px;border:1px solid #bfc4c0;border-radius:8px;background:#fff}.auth-actions .primary{background:#294e37;color:#fff}.auth-note{font-size:12px;color:var(--muted);margin:20px 0 0;text-align:center}#auth-error{min-height:20px;color:var(--danger);font-size:13px}.hidden{display:none!important}@media(max-width:760px){:root{--food-width:156px;--cell:44px}.app-header{height:auto;min-height:58px;grid-template-columns:1fr auto;padding:8px 10px}.brand span:last-child{display:none}.view-switch{grid-column:1/-1;grid-row:2;width:100%}.view-switch button{flex:1}.planner{height:calc(100vh - 102px)}#account .username{display:none}.period-toolbar{gap:6px;padding:8px}.date-title{order:-1;width:100%;min-width:0}.spacer{display:none}.setting{margin-left:auto}.save-hint{display:none}.food-head,.food-cell,.category-title{padding-left:7px!important;padding-right:5px!important}.food-name{font-size:12px}.row-action{opacity:1}.history-view{padding:18px 12px}.history-head h1{font-size:25px}.history-grid{grid-template-columns:1fr 1fr}.history-card{padding:11px}}@media(max-width:430px){.history-grid{grid-template-columns:1fr}}@media print{@page{size:landscape;margin:8mm}.app-header,.period-toolbar button,.setting,.row-action,.hidden-row,.add-row,#toast,#tooltip{display:none!important}.planner{height:auto}.period-toolbar{display:block;padding:0 0 7px;border:0}.date-title{text-align:left}.sheet-wrap{overflow:visible}.meal-sheet{width:100%;transform-origin:top left}.meal-sheet thead th,.food-head,.food-cell,.category-title{position:static!important}.meal-sheet th,.meal-sheet td{height:20px}.mark-cell{font-size:14px;-webkit-print-color-adjust:exact;print-color-adjust:exact}.food-row td,.food-row th,.category-row th,.recency{-webkit-print-color-adjust:exact;print-color-adjust:exact}.history-view{padding:0}}
