:root{--bg: #f8f6f1;--surface: #ffffff;--ink: #25302a;--muted: #555d57;--line: #ddd8cd;--line-soft: #ebe7de;--primary: #2f5d4a;--primary-dark: #234738;--soft: #eef2ea;--danger: #a23b2a;--warn-bg: #fdf4de;--warn-line: #e7d3a0;--bottom-nav: 66px;font-family:Noto Sans KR,Apple SD Gothic Neo,Hiragino Sans,Yu Gothic,Malgun Gothic,system-ui,sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none;line-height:1.6;font-size:17px;font-weight:400;-webkit-text-size-adjust:100%}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea,label{-webkit-tap-highlight-color:transparent}button{cursor:pointer;min-height:48px;border:1px solid var(--line);border-radius:10px;padding:10px 16px;color:var(--primary-dark);background:var(--surface);font-size:1rem;font-weight:600;line-height:1.35}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,label:has(>input.visually-hidden:focus-visible){outline:3px solid #b07a3c;outline-offset:2px}input,select,textarea{width:100%;min-height:50px;border:1px solid #c4c9c0;background:var(--surface);border-radius:10px;padding:10px 12px;color:var(--ink);font-size:1rem}input[type=checkbox],input[type=radio]{accent-color:var(--primary)}textarea{min-height:96px;resize:vertical}label{display:block;font-size:1rem;font-weight:600;margin-bottom:16px}label input,label select,label textarea{display:block;margin-top:6px;font-weight:400}fieldset{border:0;margin:0;padding:0;min-width:0}h1,h2,h3,p{margin-top:0}h1{font-size:1.6rem;line-height:1.35;letter-spacing:-.02em;margin-bottom:0}h2{font-size:1.25rem;line-height:1.4;margin-bottom:12px}h3{font-size:1.1rem;margin-bottom:6px}small{font-size:.88rem}p{margin-bottom:12px}a{color:var(--primary-dark)}code{overflow-wrap:anywhere}details{margin:12px 0}summary{cursor:pointer;min-height:48px;display:flex;align-items:center;gap:8px;padding:8px 0;font-size:1rem;font-weight:600;color:var(--primary-dark);list-style:none}summary::-webkit-details-marker{display:none}summary:before{content:"›";display:inline-block;width:1em;font-size:1.3rem;line-height:1;transition:transform .15s}details[open]>summary:before{transform:rotate(90deg)}details p{overflow-wrap:anywhere}form{margin:0}.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.hint,.field-help{font-size:.92rem;color:var(--muted);font-weight:400}.field-help{margin:-8px 0 14px}.print-only{display:none}.app-shell{display:flex;min-height:100vh}.sidebar{width:220px;flex-shrink:0;border-right:1px solid var(--line-soft);background:#fbfaf7;padding:28px 16px;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column;gap:28px}.brand{display:flex;gap:10px;text-decoration:none;align-items:center;font-size:1.1rem;font-weight:700;padding:0 8px;color:var(--ink)}.brand img{width:40px;height:40px}.sidebar nav{display:flex;flex-direction:column;gap:6px}.sidebar nav button{text-align:left;border:0;background:transparent;padding:12px 16px;min-height:52px;font-size:1.05rem;font-weight:500;color:var(--ink)}.sidebar nav button.active{background:var(--soft);color:var(--primary-dark);font-weight:700;box-shadow:inset 4px 0 0 var(--primary)}.main-column{margin-left:220px;width:calc(100% - 220px)}.topbar{min-height:56px;border-bottom:1px solid var(--line-soft);display:flex;align-items:center;justify-content:flex-end;padding:8px 32px;gap:12px}.topbar small{color:var(--muted);font-size:.9rem;text-align:right}.topbar small.warn{color:var(--danger);font-weight:700}main{max-width:860px;padding:28px 32px 40px;margin:0 auto}.page-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 20px;margin-bottom:18px}.back-button{flex-basis:100%;justify-content:flex-start;align-self:flex-start;border:0;background:transparent;padding:8px 4px;font-size:1rem;width:fit-content;flex-grow:0}.primary{background:var(--primary);color:#fff;border-color:var(--primary)}.primary.big,.full{width:100%}.primary.big{min-height:56px;font-size:1.1rem}.danger{color:var(--danger);border-color:#dfb4aa}.add-meal{min-height:56px;padding:12px 24px;font-size:1.1rem;white-space:nowrap}.text-button{border:0;background:transparent;font-weight:500;text-decoration:underline;text-underline-offset:4px;color:var(--muted)}.notice-line{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;background:var(--warn-bg);border:1px solid var(--warn-line);border-radius:10px;padding:10px 14px;margin:0 0 18px}.notice-line button{background:var(--surface)}.date-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:18px}.date-toolbar input{width:auto;flex:1;max-width:230px;min-height:50px;margin:0;font-size:1.05rem;text-align:center}.date-step{width:50px;padding:0;font-size:1.6rem;font-weight:400;flex-shrink:0}.today-button{flex-shrink:0}.day-summary{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:18px 20px 6px}.kcal-row{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap}.summary-label{font-size:1rem;font-weight:600;margin:0}.summary-label span{font-weight:400;color:var(--muted)}.big-number{font-size:2.6rem;font-weight:700;line-height:1.15;letter-spacing:-.02em}.big-number small{font-size:1.1rem;font-weight:500;letter-spacing:0;color:var(--muted)}.goal-link{border:0;background:transparent;padding:8px 0;font-weight:500;color:var(--muted);text-decoration:underline;text-underline-offset:4px}.goal-link b{color:var(--ink)}.kcal-bar{appearance:none;display:block;width:100%;height:12px;margin:14px 0 8px;border:0;border-radius:6px;background:#e8e4da;overflow:hidden}.kcal-bar::-webkit-progress-bar{background:#e8e4da;border-radius:6px}.kcal-bar::-webkit-progress-value{background:var(--primary);border-radius:6px}.kcal-bar::-moz-progress-bar{background:var(--primary)}.energy-remaining{font-size:1.05rem;margin-bottom:4px}.nutrients-detail{border-top:1px solid var(--line-soft);margin:8px 0 0}.nutrient-row{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line-soft)}.nutrient-row strong{white-space:nowrap}.nutrient-row strong small{font-weight:400;color:var(--muted)}.nutrients-detail .hint{margin-top:10px}.meals-heading{margin:28px 0 12px}.count{color:var(--muted);font-weight:500;font-size:1rem}.empty-state{font-size:1.05rem;color:var(--muted);padding:20px;border:1px dashed var(--line);border-radius:12px;background:#fbfaf7}.meal-grid{display:grid;grid-template-columns:1fr;gap:14px}.meal-card{border:1px solid var(--line);border-radius:12px;padding:16px 18px 12px;background:var(--surface);break-inside:avoid;min-width:0}.meal-card-top{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:6px}.meal-card-top h3{font-size:1.2rem;margin:0}.meal-card-top h3 small{font-size:1rem;font-weight:400;color:var(--muted);margin-left:4px}.meal-calories{font-size:1.15rem;white-space:nowrap}.meal-calories small{font-weight:400;color:var(--muted)}.food-lines{padding:0;list-style:none;margin:0}.food-lines li{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line-soft);padding:9px 0;font-size:1.02rem}.food-lines li>span:last-child{color:var(--muted);white-space:nowrap}.card-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:10px}.edit-button{min-width:110px}.delete-button{border:0;background:transparent;color:var(--danger);font-weight:500;text-decoration:underline;text-underline-offset:4px;padding-left:4px;padding-right:4px}.photo-row{display:flex;gap:10px;overflow-x:auto;margin:12px 0}.photo-row img{object-fit:cover;width:150px;height:112px;border-radius:8px;flex-shrink:0}.photo-row figure{margin:0;flex-shrink:0;text-align:center}.meal-note{background:#f6f4ee;border-radius:8px;padding:10px 12px;white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0 0}.draft-discard{margin-top:14px}footer{border-top:1px solid var(--line-soft);margin-top:36px;padding:16px 0 0;color:var(--muted)}footer small{display:block;font-size:.85rem;line-height:1.7}dialog{width:min(640px,calc(100% - 24px));max-height:94vh;padding:0;border:1px solid var(--line);border-radius:14px;color:var(--ink);background:var(--surface)}dialog::backdrop{background:#1d2a2355}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;position:sticky;top:0;background:var(--surface);padding:10px 20px;border-bottom:1px solid var(--line-soft);z-index:2}.modal-head h2{margin:0}.close-button{min-width:76px}.modal-body{padding:16px 20px 0}.modal-footer{position:sticky;bottom:0;background:var(--surface);margin:20px -20px 0;padding:12px 20px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px;z-index:2}.modal-footer span{color:var(--muted)}.modal-footer span b{display:block;font-size:1.25rem;color:var(--ink)}.save-button{min-height:56px;min-width:160px;font-size:1.1rem}.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:0 12px}.form-grid.two{grid-template-columns:repeat(2,1fr)}.kind-picker{margin:8px 0 16px}.kind-picker legend,.choice-group legend{font-weight:600;margin-bottom:6px;padding:0}.kind-picker{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.kind-picker label,.choice-group label{display:flex;align-items:center;justify-content:center;text-align:center;min-height:50px;margin:0;padding:4px;border:1px solid var(--line);border-radius:10px;background:var(--surface);cursor:pointer;font-size:.98rem;line-height:1.3}.kind-picker label input,.choice-group label input{position:absolute;opacity:0;width:1px;height:1px;margin:0}.kind-picker label.on,.choice-group label.on{background:var(--primary);border-color:var(--primary);color:#fff}.kind-picker label:has(input:focus-visible),.choice-group label:has(input:focus-visible){outline:3px solid #b07a3c;outline-offset:2px}.choice-group{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:6px;max-width:520px;margin-bottom:18px}.editor-search{margin-top:4px}.editor-search>label input{font-size:1.1rem;min-height:54px}.sub-label{font-weight:600;margin-bottom:8px}.quick-block{margin-bottom:16px}.quick-foods{display:flex;gap:8px;flex-wrap:wrap}.quick-foods button{background:var(--soft);border-color:transparent;font-weight:500}.search-results{border:1px solid var(--line);border-radius:10px;margin:0 0 18px;overflow:hidden}.search-results button{width:100%;border:0;border-bottom:1px solid var(--line-soft);border-radius:0;text-align:left;display:block;min-height:60px;padding:10px 14px;font-weight:400;color:var(--ink)}.search-results button:last-child{border-bottom:0}.search-results button[aria-selected=true]{background:var(--soft)}.search-results button span{display:block;font-size:1.05rem;font-weight:600}.search-results button small{display:block;color:var(--muted)}.search-results>p{padding:14px;margin:0}.estimated-badge{display:inline-block;margin-inline-start:.45em;padding:.05em .4em;border:1px solid var(--line);border-radius:4px;color:var(--muted);font-size:.8rem;font-style:normal;font-weight:400;white-space:nowrap}.selected-food{background:#f3f6ef;border:1px solid #d9e2d2;border-radius:12px;padding:14px 16px 4px;margin:0 0 18px}.selected-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.selected-head h3{margin:0;font-size:1.2rem}.fav-button{flex-shrink:0;font-weight:500}.fav-button[aria-pressed=true]{color:#8a5a12;border-color:#e0c48c;background:#fdf6e6}.amount-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;margin-bottom:10px}.stepper{display:flex;align-items:stretch;gap:6px}.stepper button{width:52px;flex-shrink:0;padding:0;font-size:1.5rem;font-weight:500}.stepper label{flex:1;margin:0;min-width:0}.stepper input{margin:0;height:100%;min-height:52px;text-align:center;font-size:1.2rem;padding:6px}.unit-select{margin:0}.unit-select select{margin:0;min-height:52px}.inline-nutrients{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px 10px;font-size:.88rem;color:var(--muted);margin-bottom:12px}.inline-nutrients b{color:var(--ink)}.inline-nutrients span:first-child{grid-column:1 / -1;font-size:1.05rem;color:var(--ink)}.draft-items{margin-bottom:8px}.draft-items article{border-top:1px solid var(--line-soft);padding:10px 0 0}.draft-item-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.draft-item-head strong{font-size:1.05rem}.draft-item-head p{color:var(--muted);margin:0}.draft-items details{margin:4px 0 8px}.photo-section{margin:18px 0}.photo-button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:56px;margin:0;border:1.5px dashed #b4bdaa;border-radius:12px;background:#fbfaf6;color:var(--primary-dark);font-size:1.05rem;cursor:pointer;position:relative}.photo-button small{color:var(--muted);font-weight:400}.photo-button:has(input:disabled){opacity:.5;cursor:not-allowed}.error{background:#fdf0ea;border:1px solid #e6c3af;color:#7c3a1f;padding:14px 16px;border-radius:10px;margin-bottom:18px;overflow-wrap:anywhere}.button-row{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:8px}.stack{display:flex;flex-direction:column;gap:18px}.plain-section{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:18px 20px;margin-bottom:18px}.stack>.plain-section{margin-bottom:0}.section-title{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px 15px;margin-bottom:12px}.section-title h2,.section-title h3,.section-title p{margin-bottom:0}.file-label input{font-size:.95rem}.preview,.confirm-box{background:#f5f7f1;border:1px solid #d9e2d2;padding:14px 16px;border-radius:10px;margin:14px 0}.danger-zone{border-top:1px solid var(--line-soft);margin-top:18px}.danger-zone>summary{color:var(--danger)}.archive-facts{margin:0 0 14px}.archive-facts>div{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line-soft)}.archive-facts dt{color:var(--muted)}.archive-facts dd{margin:0;font-weight:700;text-align:right}.history-row{border-top:1px solid var(--line-soft);padding-top:8px}.library-list{max-height:460px;overflow:auto;border-top:1px solid var(--line-soft)}.library-list>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--line-soft)}.library-list small{display:block;color:var(--muted)}.library-list .button-row{margin:0;flex-wrap:nowrap}.code-input{font-family:monospace;font-size:.85rem;min-height:220px}.settings{max-width:720px}.settings>section{margin-bottom:28px}.settings select,.goal-kcal input{max-width:320px}.settings-menu{display:flex;flex-direction:column;gap:10px}.settings-menu button{display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;min-height:72px;padding:12px 16px;color:var(--ink)}.settings-menu button b{display:block;font-size:1.1rem}.settings-menu button small{display:block;font-weight:400;color:var(--muted)}.settings-menu button>span:last-child{font-size:1.6rem;color:var(--muted)}.check-label{display:flex;gap:12px;align-items:center;min-height:48px}.check-label input{width:26px;min-height:26px;height:26px;margin:0;flex-shrink:0}.range-label{font-size:1.05rem;font-weight:600}.nutrition-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.nutrition-grid small{color:var(--muted)}.nutrition-grid strong{display:block;font-size:1.4rem}.report-day{margin-top:26px}.report-day>.section-title{border-bottom:1px solid var(--line);padding-bottom:10px}.report-disclaimer{font-size:.9rem;color:var(--muted);margin-top:24px}.empty-small{color:var(--muted);padding:16px;background:#f3f1ea;border-radius:10px}.segmented{display:flex;gap:4px;padding:4px;border-radius:12px;background:#efece4}.segmented button{border:0;background:transparent;font-weight:500}.segmented button.active{background:var(--surface);color:var(--primary-dark);font-weight:700;box-shadow:0 0 0 1px var(--line)}.metric-select{max-width:320px}.chart{display:flex;gap:6px;height:250px;align-items:stretch;overflow-x:auto;padding-top:10px;margin:20px 0}.chart-column{flex:1;min-width:18px;display:flex;flex-direction:column;text-align:center}.bar-area{height:205px;position:relative;border-bottom:1px solid #cfd3c8;display:flex;align-items:flex-end;justify-content:center}.bar{background:#6f8e5d;border-radius:4px 4px 0 0;width:75%;max-width:60px;min-height:2px}.goal-mark{position:absolute;left:0;right:0;border-top:2px dashed #a8844a;z-index:1}.chart-column>small{font-size:.75rem;padding-top:6px;white-space:nowrap;color:var(--muted)}.missing{color:#9aa392}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:10px;border-bottom:1px solid var(--line-soft)}.large-text{font-size:20px}@media(hover:hover){button:hover{background:var(--soft)}.sidebar nav button:hover{background:var(--soft)}.primary:hover{background:var(--primary-dark)}.danger:hover,.delete-button:hover{background:#fbefec}}@media(max-width:850px){.sidebar{width:100%;height:calc(var(--bottom-nav) + env(safe-area-inset-bottom));inset:auto 0 0;z-index:10;padding:0 4px env(safe-area-inset-bottom);border-right:0;border-top:1px solid var(--line);background:#fbfaf7}.brand{display:none}.sidebar nav{display:grid;grid-template-columns:repeat(4,1fr);gap:2px;height:var(--bottom-nav)}.sidebar nav button{text-align:center;justify-content:center;padding:4px 2px;min-height:0;height:100%;font-size:.95rem;line-height:1.25;border-radius:0}.sidebar nav button.active{box-shadow:inset 0 3px 0 var(--primary)}.main-column{margin-left:0;width:100%;padding-bottom:calc(var(--bottom-nav) + env(safe-area-inset-bottom))}.topbar{min-height:40px;padding:4px 16px}.topbar small{font-size:.85rem}main{padding:20px 16px 28px}main.has-add-bar{padding-bottom:100px}.add-meal{position:fixed;left:16px;right:16px;bottom:calc(var(--bottom-nav) + env(safe-area-inset-bottom) + 10px);z-index:9;width:auto;white-space:normal;box-shadow:0 0 0 6px var(--bg)}}@media(max-width:570px){h1{font-size:1.4rem}.page-heading{margin-bottom:14px}.date-toolbar input{max-width:none}.big-number{font-size:2.3rem}.day-summary,.plain-section{padding:16px}.photo-row img{width:128px;height:96px}.nutrition-grid,.form-grid{grid-template-columns:repeat(2,1fr)}.kind-picker{grid-template-columns:repeat(3,1fr)}.amount-row{grid-template-columns:1fr}.inline-nutrients{grid-template-columns:repeat(2,minmax(0,1fr))}dialog{width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}.modal-head{padding:8px 16px}.modal-body{padding:14px 16px 0}.modal-footer{margin:20px -16px 0;padding:10px 16px calc(10px + env(safe-area-inset-bottom))}.save-button{min-width:0;flex:1;max-width:220px}.library-list>div{align-items:flex-start;flex-direction:column}.library-list .button-row{align-self:flex-end}.chart{gap:3px}.chart-column>small{font-size:.68rem}.large-text .sidebar nav button{font-size:.85rem}}@media print{@page{size:A4;margin:14mm}.no-print,.sidebar,.topbar,.page-heading,.date-toolbar,footer,dialog{display:none!important}.print-only{display:block}:root{background:#fff;font-size:11px;color:#222}.main-column{margin:0;width:100%;padding:0}main{padding:0;max-width:none}.report .plain-section{padding:12px;margin-bottom:16px}.meal-grid{grid-template-columns:1fr 1fr}.meal-card{padding:12px;break-inside:avoid}.photo-row{flex-wrap:wrap;overflow:visible}.photo-row img{width:110px;height:90px}.report-day{break-inside:auto}.report-day>.section-title{break-after:avoid}.nutrition-grid{grid-template-columns:repeat(6,1fr)}.nutrition-grid strong{font-size:1.2rem}}
