:root{color:#1d1d1f;background:#f2f2f4;font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,Hiragino Sans,Yu Gothic UI,Yu Gothic,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility;--orange: #ff5a0a;--orange-dark: #db4700;--ink: #1d1d1f;--muted: #737378;--line: #e5e5e7;--surface: #ffffff;--soft: #f7f7f8;--danger: #d92d20;--safe-top: env(safe-area-inset-top, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px)}*{box-sizing:border-box}html{min-height:100%;background:#f2f2f4;-webkit-text-size-adjust:100%}body{min-width:320px;min-height:100vh;margin:0;background:#f2f2f4}body.has-modal{overflow:hidden}button,input,select{font:inherit}button{color:inherit;-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid rgb(255 90 10 / 28%);outline-offset:2px}h1,h2,h3,p{margin-top:0}a{color:var(--orange-dark);text-underline-offset:3px}.app-shell{position:relative;width:min(100%,640px);min-height:100dvh;margin:0 auto;background:var(--surface);box-shadow:0 0 28px #00000012}.app-header{position:sticky;z-index:10;top:0;display:grid;grid-template-columns:44px 1fr 44px;align-items:center;height:calc(58px + var(--safe-top));padding:var(--safe-top) 14px 0;border-bottom:1px solid var(--line);background:#fffffff0;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}.app-header h1{grid-column:2;margin:0;font-size:17px;font-weight:750;letter-spacing:.01em;text-align:center}.header-settings{grid-column:3}.icon-button{display:inline-grid;width:44px;height:44px;padding:0;place-items:center;border:0;border-radius:50%;background:transparent;cursor:pointer}.icon-button:active{background:var(--soft)}.icon-button svg{width:22px;height:22px;stroke-width:1.9}.screen-container{min-height:calc(100dvh - 58px - 73px - var(--safe-top) - var(--safe-bottom));padding-bottom:calc(82px + var(--safe-bottom))}.screen{animation:screen-in .18s ease-out}@keyframes screen-in{0%{opacity:0;transform:translateY(3px)}}.bottom-navigation{position:fixed;z-index:15;right:0;bottom:0;left:0;display:grid;grid-template-columns:repeat(3,1fr);width:min(100%,640px);height:calc(73px + var(--safe-bottom));margin:auto;padding:5px 10px var(--safe-bottom);border-top:1px solid var(--line);background:#fffffff5;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.bottom-nav-item{display:flex;min-width:0;padding:5px 3px 3px;align-items:center;flex-direction:column;justify-content:center;gap:3px;border:0;background:transparent;color:#8a8a8f;cursor:pointer;font-size:10px;font-weight:650}.bottom-nav-item svg{width:24px;height:24px;stroke-width:1.9}.bottom-nav-item.is-active{color:var(--orange)}.today-summary{padding:30px 24px 34px;border-bottom:8px solid var(--soft);text-align:center}.today-date{margin-bottom:23px;color:var(--muted);font-size:14px;font-weight:650}.summary-label{margin-bottom:2px;color:var(--muted);font-size:13px}.calorie-total{display:flex;margin-bottom:22px;align-items:baseline;justify-content:center;gap:7px}.calorie-total strong{font-size:clamp(52px,16vw,74px);font-variant-numeric:tabular-nums;font-weight:770;letter-spacing:-.055em;line-height:1.1}.calorie-total span{color:var(--muted);font-size:17px;font-weight:650}.primary-button,.secondary-button,.danger-button{display:inline-flex;min-height:50px;padding:12px 20px;align-items:center;justify-content:center;gap:9px;border-radius:12px;cursor:pointer;font-weight:750}.primary-button{width:100%;border:1px solid var(--orange);background:var(--orange);color:#fff;box-shadow:0 5px 12px #ff5a0a2e}.primary-button:active{border-color:var(--orange-dark);background:var(--orange-dark);transform:translateY(1px)}.primary-button:disabled,.secondary-button:disabled,.danger-button:disabled,.settings-action:disabled,.picker-list button:disabled{cursor:default;opacity:.45}.primary-button svg,.secondary-button svg,.danger-button svg{width:20px;height:20px}.secondary-button{border:1px solid var(--orange);background:#fff;color:var(--orange-dark)}.danger-button{width:100%;border:0;background:transparent;color:var(--danger)}.record-button{max-width:330px;min-height:54px;margin:auto;border-radius:14px;font-size:17px}.entry-section{padding:22px 20px 10px}.entry-section h2,.menu-heading h2,.selected-day-section h2{margin-bottom:15px;font-size:20px;letter-spacing:-.02em}.entry-list,.product-list,.picker-list{border-top:1px solid var(--line)}.entry-row{display:grid;width:100%;min-height:69px;padding:13px 0;grid-template-columns:minmax(0,1fr) auto 18px;align-items:center;gap:10px;border:0;border-bottom:1px solid var(--line);background:#fff;cursor:pointer;text-align:left}.entry-row-main{display:flex;min-width:0;flex-direction:column;gap:3px}.entry-row-main strong,.product-edit-button strong,.picker-list strong{overflow:hidden;font-size:15px;text-overflow:ellipsis;white-space:nowrap}.entry-row-main small,.product-edit-button small,.picker-list small{color:var(--muted);font-size:12px}.entry-row-value{font-variant-numeric:tabular-nums;font-size:15px;font-weight:750}.entry-row>svg{width:18px;color:#b2b2b7}.empty-state{padding:42px 18px;color:var(--muted);text-align:center}.empty-state p{margin-bottom:7px;color:var(--ink);font-weight:750}.empty-state span{display:block;font-size:13px;line-height:1.7}.state-message,.form-notice{margin:14px 0;padding:11px 13px;border-radius:9px;background:#fff5ef;color:#7c3513;font-size:13px;line-height:1.6}.state-message.is-error{background:#fff0ef;color:#a32117}.calendar-panel{padding:18px 12px 24px;border-bottom:8px solid var(--soft)}.month-header{display:grid;margin-bottom:13px;grid-template-columns:44px 1fr 44px;align-items:center}.month-header h2{margin:0;font-size:18px;text-align:center}.weekday-row,.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr)}.weekday-row{padding:2px 0 5px;color:var(--muted);font-size:11px;font-weight:700;text-align:center}.weekday-row span:first-child{color:#c63b32}.weekday-row span:last-child{color:#3971a7}.calendar-cell{position:relative;display:flex;min-width:0;height:58px;padding:5px 2px;align-items:center;flex-direction:column;gap:3px;border:0;border-radius:9px;background:transparent;cursor:pointer}.calendar-day{display:grid;width:27px;height:27px;place-items:center;border-radius:50%;font-size:13px;font-weight:650}.calendar-cell small{max-width:100%;overflow:hidden;color:var(--orange-dark);font-size:9px;font-variant-numeric:tabular-nums;font-weight:750;text-overflow:ellipsis}.calendar-cell.is-outside{opacity:.24}.calendar-cell.is-today .calendar-day{box-shadow:inset 0 0 0 1px var(--orange);color:var(--orange-dark)}.calendar-cell.is-selected{background:#fff1e9}.calendar-cell.is-selected .calendar-day{background:var(--orange);box-shadow:none;color:#fff}.selected-day-section{padding:22px 20px 10px}.selected-day-section h2{margin-bottom:4px}.selected-day-label{margin-bottom:-3px;color:var(--muted);font-size:12px}.selected-day-total{display:flex;margin-bottom:18px;align-items:baseline;gap:6px}.selected-day-total strong{font-size:35px;font-variant-numeric:tabular-nums;letter-spacing:-.04em}.selected-day-total span{color:var(--muted);font-size:13px;font-weight:650}.calendar-empty{padding:24px 0;color:var(--muted);font-size:13px;text-align:center}.menu-heading{padding:26px 20px 24px;border-bottom:8px solid var(--soft)}.menu-heading h2{margin-bottom:5px;font-size:25px}.menu-heading p{margin-bottom:18px;color:var(--muted);font-size:13px}.new-product-button{width:auto;min-height:44px}.product-list{margin:0 20px}.product-row{display:grid;min-height:76px;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;border-bottom:1px solid var(--line)}.product-edit-button{display:flex;min-width:0;min-height:65px;padding:10px 0;align-items:center;justify-content:space-between;border:0;background:#fff;cursor:pointer;text-align:left}.product-edit-button>span:first-child{display:flex;min-width:0;flex-direction:column;gap:4px}.product-edit-button>svg{width:21px;color:#a5a5aa}.quick-add-button{display:inline-flex;min-height:40px;padding:8px 10px;align-items:center;gap:5px;border:0;border-radius:9px;background:#fff0e7;color:var(--orange-dark);cursor:pointer;font-size:13px;font-weight:750}.quick-add-button svg{width:17px;height:17px}.modal-backdrop{position:fixed;z-index:50;top:0;right:0;bottom:0;left:0;display:flex;padding-top:var(--safe-top);align-items:center;justify-content:center;background:#0000006b;animation:fade-in .16s ease-out}@keyframes fade-in{0%{opacity:0}}.modal{width:min(calc(100% - 32px),540px);max-height:calc(100dvh - 48px - var(--safe-top));overflow:hidden;border-radius:18px;background:#fff;box-shadow:0 24px 70px #00000042}.modal-fullscreen{width:min(100%,640px);height:calc(100dvh - var(--safe-top));max-height:none;align-self:flex-end;border-radius:18px 18px 0 0}.modal-header{display:grid;height:58px;padding:0 10px 0 18px;grid-template-columns:44px 1fr 44px;align-items:center;border-bottom:1px solid var(--line);background:#fff}.modal-header h2{grid-column:2;margin:0;font-size:17px;text-align:center}.modal-header .icon-button{grid-column:3}.modal-body{height:calc(100% - 58px);max-height:calc(100dvh - 106px - var(--safe-top));padding:20px;overflow-y:auto;overscroll-behavior:contain}.bottom-sheet{width:min(100%,640px);max-height:calc(100dvh - 52px);margin-top:auto;padding:8px 18px calc(12px + var(--safe-bottom));overflow-y:auto;border-radius:22px 22px 0 0;background:#fff;animation:sheet-in .2s ease-out}@keyframes sheet-in{0%{transform:translateY(24px)}}.sheet-handle{width:38px;height:5px;margin:0 auto 16px;border-radius:8px;background:#d4d4d7}.bottom-sheet h2{margin-bottom:12px;padding:0 4px;font-size:21px}.sheet-cancel{width:100%;min-height:46px;border:0;background:transparent;color:var(--muted);cursor:pointer;font-weight:700}.method-list{border-top:1px solid var(--line)}.method-row{display:grid;width:100%;min-height:72px;padding:12px 4px;grid-template-columns:36px minmax(0,1fr) 20px;align-items:center;gap:10px;border:0;border-bottom:1px solid var(--line);background:#fff;cursor:pointer;text-align:left}.method-row>svg:first-child{width:24px;color:var(--orange)}.method-row>svg:last-child{width:18px;color:#b2b2b7}.method-row span{display:flex;min-width:0;flex-direction:column;gap:3px}.method-row strong{font-size:15px}.method-row small{color:var(--muted);font-size:12px}.entry-form{display:flex;flex-direction:column;gap:18px}.field{display:flex;flex-direction:column;gap:7px}.field>span:first-child{color:#4e4e53;font-size:13px;font-weight:700}.field input,.field select,.quantity-control input{width:100%;min-height:48px;padding:10px 12px;border:1px solid #d6d6d9;border-radius:10px;background:#fff;color:var(--ink);font-size:16px}.field input::placeholder{color:#aaaab0}.input-with-suffix{position:relative}.input-with-suffix input{padding-right:58px}.input-with-suffix>span{position:absolute;top:50%;right:12px;color:var(--muted);font-size:13px;transform:translateY(-50%)}.quantity-control{display:grid;max-width:260px;grid-template-columns:48px minmax(70px,1fr) 48px;align-items:center}.quantity-control button{display:grid;height:48px;padding:0;place-items:center;border:1px solid #d6d6d9;background:var(--soft);cursor:pointer}.quantity-control button:first-child{border-radius:10px 0 0 10px}.quantity-control button:last-child{border-radius:0 10px 10px 0}.quantity-control button svg{width:18px}.quantity-control input{border-right:0;border-left:0;border-radius:0;text-align:center}.checkbox-field{display:flex;min-height:44px;align-items:center;gap:10px;font-size:14px;font-weight:650}.checkbox-field input{width:21px;height:21px;accent-color:var(--orange)}.form-helper{margin-bottom:-3px;color:var(--muted);font-size:13px}.photo-preview{display:grid;gap:8px}.photo-preview span{font-size:13px;font-weight:700}.photo-preview img{width:100%;max-height:230px;object-fit:contain;border:1px solid var(--line);border-radius:11px;background:var(--soft)}.source-note{margin:16px 0 0;color:var(--muted);font-size:12px}.text-button{display:inline-flex;min-height:44px;margin-top:8px;padding:8px 0;align-items:center;gap:7px;border:0;background:transparent;color:var(--orange-dark);cursor:pointer;font-size:13px;font-weight:700}.text-button svg{width:17px}.scanner-frame{position:relative;width:100%;overflow:hidden;aspect-ratio:4 / 3;border-radius:12px;background:#151515}.scanner-frame video{width:100%;height:100%;object-fit:cover}.scan-guide{position:absolute;top:50%;left:50%;width:78%;height:34%;border:2px solid var(--orange);border-radius:8px;box-shadow:0 0 0 999px #00000047;transform:translate(-50%,-50%)}.scanner>p{margin:12px 0 20px;color:var(--muted);font-size:13px;text-align:center}.barcode-manual{display:grid;gap:12px}.ocr-capture{display:flex;min-height:70vh;padding:30px 6px;align-items:center;flex-direction:column;text-align:center}.ocr-capture>svg{width:60px;height:60px;margin:25px 0 22px;padding:13px;border-radius:50%;background:#fff0e7;color:var(--orange)}.ocr-capture h3{margin-bottom:8px;font-size:21px}.ocr-capture>p{max-width:320px;margin-bottom:26px;color:var(--muted);font-size:13px;line-height:1.7}.file-button{max-width:330px}.file-button input{position:absolute;width:1px;height:1px;opacity:0}.ocr-progress{width:min(100%,330px);margin-top:25px;overflow:hidden;border-radius:8px;background:#ececee}.ocr-progress span{display:block;height:7px;border-radius:inherit;background:var(--orange);transition:width .16s ease}.ocr-progress p{margin:10px 0 0;background:#fff;color:var(--muted);font-size:12px}.picker-list button{display:grid;width:100%;min-height:68px;padding:12px 4px;grid-template-columns:minmax(0,1fr) 24px;align-items:center;border:0;border-bottom:1px solid var(--line);background:#fff;cursor:pointer;text-align:left}.picker-list button span{display:flex;min-width:0;flex-direction:column;gap:3px}.picker-list button>svg{color:var(--orange)}.settings-section{margin-bottom:25px;padding-bottom:24px;border-bottom:1px solid var(--line)}.settings-section h3{display:flex;margin-bottom:13px;align-items:center;gap:8px;font-size:17px}.settings-section h3 svg{width:20px;color:var(--orange)}.settings-section>p{margin:12px 0 0;color:var(--muted);font-size:12px;line-height:1.7}.storage-status{display:flex;min-height:40px;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);font-size:14px}.storage-status strong{font-variant-numeric:tabular-nums}.settings-action{display:grid;width:100%;min-height:65px;padding:10px 2px;grid-template-columns:30px minmax(0,1fr) 24px;align-items:center;gap:7px;border:0;border-bottom:1px solid var(--line);background:#fff;cursor:pointer;text-align:left}.settings-action>svg:first-child{color:var(--orange)}.settings-action>svg:last-child{width:18px;color:#9f9fa4}.settings-action span{display:flex;flex-direction:column;gap:2px}.settings-action small{color:var(--muted);font-size:11px}.data-source-note a{display:inline-block;margin-top:10px;font-size:13px}.toast{position:fixed;z-index:90;right:16px;bottom:calc(88px + var(--safe-bottom));left:16px;width:fit-content;max-width:calc(100% - 32px);margin:auto;padding:11px 16px;border-radius:999px;background:#272729;box-shadow:0 8px 24px #0000003d;color:#fff;font-size:13px;font-weight:650;text-align:center;animation:toast-in .2s ease-out}@keyframes toast-in{0%{opacity:0;transform:translateY(8px)}}.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}@media(min-width:641px){body{padding:24px 0}.app-shell{min-height:calc(100dvh - 48px);overflow:hidden;border-radius:22px}.app-header{top:24px}.bottom-navigation{bottom:24px;border-radius:0 0 22px 22px}.modal-backdrop{padding:24px}.modal-fullscreen{height:min(780px,calc(100dvh - 48px));align-self:center;border-radius:18px}.bottom-sheet{margin:auto;border-radius:22px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
