:root{font-family:Arial,Helvetica,sans-serif;color:#111;background:#ebebe9;font-synthesis:none;--ink:#101010;--sub:#707070;--rule:#dadad8;--paper:#fff;--wash:#f4f4f2;--danger:#a6362a;--safe:env(safe-area-inset-bottom,0px);-webkit-tap-highlight-color:transparent}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;height:100%}
body{display:flex;align-items:center;justify-content:center;overflow:hidden}
button,input,select,textarea{font:inherit}
button{cursor:pointer;color:inherit}
button:disabled{opacity:.42;cursor:not-allowed}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #111;outline-offset:3px}
.app{width:min(100%,490px);height:min(945px,calc(100dvh - 32px));background:var(--paper);border:1px solid #ddd;position:relative;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 16px 70px #00000010}
.site-header{height:144px;position:relative;flex:0 0 auto;padding:39px 15px 22px;border-bottom:1px solid #dededc;background:white;z-index:2}
.brand-block{text-align:center}
.mini-label{font-size:9px;letter-spacing:.17em;font-weight:700;color:#888;margin-bottom:14px}
.site-header h1{font-size:clamp(34px,8.5vw,42px);letter-spacing:-.072em;white-space:nowrap;line-height:1.05;font-weight:900;margin:0;transform:scaleX(.98)}
.head-corner{width:35px;height:35px;position:absolute;top:33px;display:grid;place-items:center;border:0;background:none}
.head-left{left:18px}.head-right{right:18px}.brand-dot{height:7px;width:7px;background:#151515;border-radius:50%}
.main-scroll{overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;flex:1;padding:30px 25px 174px;outline:none}
.main-scroll::-webkit-scrollbar{width:4px}.main-scroll::-webkit-scrollbar-thumb{background:#ddd;border-radius:4px}
.kicker{font-size:10px;letter-spacing:.15em;font-weight:800;color:#898989;margin:0 0 8px}
.screen-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:22px}
.screen-title{font-weight:800;font-size:30px;letter-spacing:-.06em;margin:0;line-height:1.05}
.count-badge{font-size:11px;background:#111;color:#fff;border-radius:100px;min-width:31px;height:30px;padding:0 9px;display:grid;place-items:center;font-weight:700}
.compact-sub{font-size:12px;color:var(--sub);margin:7px 0 0;line-height:1.5}
.entry-form{display:flex;border:1px solid #171717;border-radius:16px;align-items:center;padding:5px 5px 5px 17px;height:60px;gap:8px;transition:box-shadow .15s;margin-bottom:22px}
.entry-form:focus-within{box-shadow:0 0 0 2px #1111}
.entry-form input{border:0;outline:0;min-width:0;flex:1;font-size:17px;background:transparent}
.entry-form input::placeholder{color:#999}
.plus-button{border:none;background:#111;color:white;width:46px;height:46px;border-radius:12px;font-size:29px;font-weight:300;display:grid;place-items:center;line-height:1}
.suggest-block{margin:0 0 27px}
.suggest-title{font-size:11px;letter-spacing:.02em;color:#7e7e7e;margin-bottom:11px;display:flex;justify-content:space-between}
.chips{display:flex;gap:7px;flex-wrap:wrap}
.chip{border:1px solid #d1d1d1;border-radius:20px;padding:9px 12px;background:#fff;font-size:12px;max-width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:inline-flex;align-items:center;gap:6px}
.chip::before{content:'+';font-size:15px;font-weight:600}
.section-separator{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:17px;margin-bottom:6px}
.section-separator span{font-size:11px;font-weight:750;letter-spacing:.09em;color:#555}
.text-button{border:0;background:transparent;text-decoration:underline;text-decoration-color:#aaa;text-underline-offset:4px;font-size:12px;color:#555;padding:10px 0;white-space:nowrap}
.shopping-list{list-style:none;margin:0;padding:0}
.shopping-row{border-bottom:1px solid #b7b7b7;display:flex;align-items:center;min-height:76px;gap:4px}
.shopping-row:first-child{border-top:1px solid #b7b7b7}
.shopping-pick{display:flex;align-items:center;gap:17px;flex:1;min-width:0;background:transparent;border:0;padding:15px 5px;text-align:left;font-size:20px;font-weight:300;letter-spacing:-.035em;line-height:1.2}
.pick-dot{width:33px;height:33px;border:1.6px solid #141414;display:inline-grid;place-items:center;flex:0 0 33px;border-radius:50%}
.pick-dot::after{content:'';width:15px;height:15px;border-radius:50%;background:#111}
.product-word{overflow-wrap:anywhere}
.row-edit{background:transparent;border:0;color:#898989;padding:12px;font-size:16px;line-height:1}
.empty-lines{height:260px;background:repeating-linear-gradient(to bottom,transparent 0px,transparent 76px,#d6d6d6 77px,transparent 78px);pointer-events:none;opacity:.9}
.empty-copy{font-size:14px;color:#888;line-height:1.6;margin:18px 0 0;text-align:center}
.done-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:18px 0 2px}
.done-bar h3{font-size:12px;color:#555;margin:0}
.done-item{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #eee;gap:12px;padding:12px 0;font-size:14px;color:#777;text-decoration:line-through}
.done-item button{text-decoration:none;border:1px solid #ddd;padding:8px 10px;background:white;border-radius:8px;font-size:12px;color:black}
.subtle-note{font-size:12px;color:#929292;line-height:1.6}
.bottom-nav{position:absolute;bottom:0;left:0;right:0;z-index:3;background:#fff;border-top:1px solid #d5d5d4;display:grid;grid-template-columns:repeat(3,1fr);height:calc(78px + var(--safe));padding-bottom:var(--safe)}
.nav-button{border:0;background:transparent;color:#a4a4a4;font-size:11px;letter-spacing:.01em;display:flex;flex-direction:column;gap:3px;align-items:center;justify-content:center;padding:10px 0 14px}
.nav-button.active{color:#111;font-weight:800}.nav-glyph{font-size:25px;line-height:1;font-weight:400}
.camera-fab{position:absolute;z-index:4;bottom:calc(94px + var(--safe));left:50%;transform:translateX(-50%);background:#111;border:5px solid #fff;color:#fff;box-shadow:0 8px 28px #0002;border-radius:50%;height:82px;width:82px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0}
.fab-hint{font-size:8px;letter-spacing:.1em;font-weight:700;line-height:1;margin-top:2px}
.pair-row{display:flex;gap:9px;align-items:center;justify-content:space-between}
.icon-button{width:36px;height:36px;border:1px solid #e2e2e2;border-radius:10px;display:grid;place-items:center;background:white;flex:0 0 auto}
.tool-row{display:flex;gap:9px;align-items:center;margin-bottom:18px}
.search-input{width:100%;height:45px;padding:0 13px;border:1px solid #d6d6d6;border-radius:12px;background:white;font-size:13px;min-width:0}
.filter-select{height:45px;padding:0 7px;border:1px solid #d6d6d6;border-radius:12px;background:white;font-size:12px;max-width:145px;min-width:100px}
.stat-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 20px}
.stat-box{border:1px solid #eee;border-radius:14px;padding:13px 13px 12px;background:#fafaf9}
.stat-box .stat-num{font-size:24px;letter-spacing:-.05em;font-weight:750;margin:4px 0}
.stat-box .stat-label{font-size:10px;color:#888;letter-spacing:.08em;text-transform:uppercase}
.history-list{display:flex;flex-direction:column;gap:9px}
.history-row{display:flex;gap:13px;align-items:center;text-align:left;width:100%;background:white;border:1px solid #c9c9c9;border-radius:14px;padding:16px 14px;min-height:77px}
.history-mark{height:34px;width:34px;border:1px solid #444;border-radius:50%;display:grid;place-items:center;flex:0 0 auto}
.history-mark::after{content:'';width:14px;height:14px;border-radius:50%;background:black}
.history-meta{flex:1;min-width:0}.history-store{font-weight:700;font-size:15px;letter-spacing:-.02em}.history-date{margin-top:5px;font-size:11px;color:#858585}.history-total{font-weight:750;font-size:18px;letter-spacing:-.04em;white-space:nowrap}
.empty-state{text-align:center;border:1px dashed #d2d2d2;border-radius:16px;padding:36px 20px;margin-top:20px;color:#777}
.empty-state .outline-icon{width:55px;height:55px;border:1px solid #aaa;border-radius:50%;display:grid;place-items:center;font-size:30px;margin:0 auto 17px;color:#333}
.empty-state strong{display:block;font-size:18px;color:#222;margin-bottom:8px;letter-spacing:-.035em}
.empty-state p{font-size:13px;line-height:1.6;margin:0 0 18px}
.action-primary{border:1px solid #111;border-radius:12px;background:#111;color:white;padding:13px 17px;font-weight:700;font-size:13px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:9px}
.action-secondary{border:1px solid #bfbfbf;border-radius:12px;background:white;color:#111;padding:12px 15px;font-weight:600;font-size:13px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.action-danger{border-color:#b95b54;color:#ab352c}
.stack-buttons{display:flex;gap:10px;flex-wrap:wrap}
.product-list{margin:18px 0;display:flex;flex-direction:column;gap:7px}
.product-option{width:100%;text-align:left;border:1px solid #dfdfdf;background:white;border-radius:10px;padding:13px 14px;display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:14px}
.product-option.selected{border-color:#171717;background:#f6f6f4}
.product-option small{color:#999;font-size:10px}
.comparison-detail{border-top:1px solid #d0d0d0;padding-top:21px;margin-top:18px}
.compare-title{font-size:22px;font-weight:800;letter-spacing:-.045em;margin:0 0 5px;line-height:1.2}
.compare-sub{font-size:12px;color:#808080;line-height:1.5}
.compare-change{font-size:12px;font-weight:700}.compare-change.up{color:#a3372c}.compare-change.down{color:#27694e}
.bars{display:grid;gap:16px;margin:25px 0 14px}
.bar-label{display:flex;justify-content:space-between;align-items:baseline;gap:14px;font-size:13px;margin-bottom:7px}
.bar-track{height:7px;border-radius:10px;background:#ebebea;overflow:hidden}
.bar-fill{height:100%;background:#111;border-radius:10px}
.graph-box{border:1px solid #e7e7e7;border-radius:14px;padding:13px 10px 8px;margin:19px 0;background:#fafafa}
.graph-box svg{width:100%;height:auto;display:block}
.graph-label{font-size:9px;fill:#999;font-family:Arial,Helvetica,sans-serif}
.price-meta{font-size:10px;color:#868686;line-height:1.5;margin:8px 0}
.detail-list{display:flex;flex-direction:column;gap:0;margin-top:17px}
.detail-line{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;border-bottom:1px solid #e3e3e3;padding:13px 0;font-size:14px;line-height:1.4}
.detail-line span:first-child{max-width:72%}.detail-line span:last-child{white-space:nowrap;font-weight:700}
.detail-line small{display:block;font-size:11px;color:#8a8a8a;margin-top:4px}
.receipt-image{width:100%;max-height:360px;object-fit:contain;background:#f4f4f4;border:1px solid #eee;border-radius:10px;margin:12px 0}
.toast{position:absolute;z-index:20;bottom:calc(174px + var(--safe));left:15px;right:15px;background:#191919;color:white;border-radius:12px;padding:13px 16px;display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:12px;line-height:1.4;box-shadow:0 6px 25px #0002}
.toast[hidden]{display:none}.toast button{background:transparent;border:0;color:white;text-decoration:underline;font-weight:700;white-space:nowrap}
.modal-root{position:absolute;z-index:10;inset:0;display:flex;align-items:flex-end;justify-content:center;background:rgba(0,0,0,.38)}
.modal-root[hidden]{display:none}.modal-backdrop{position:absolute;inset:0}.modal-sheet{position:relative;z-index:1;background:white;border-radius:23px 23px 0 0;width:100%;max-height:calc(100% - 35px);overflow-y:auto;padding:22px 24px calc(26px + var(--safe));box-shadow:0 -7px 35px #0002;overscroll-behavior:contain}
.modal-header{display:flex;align-items:center;gap:12px;justify-content:space-between;margin-bottom:16px}
.modal-title{font-size:25px;letter-spacing:-.05em;line-height:1.1;font-weight:800;margin:0}.modal-sub{font-size:12px;color:#777;margin:5px 0 0;line-height:1.55}
.close-button{background:#f5f5f4;border:0;border-radius:50%;width:33px;height:33px;font-size:21px;flex:0 0 auto;line-height:1;display:grid;place-items:center}
.modal-actions{display:flex;gap:9px;margin-top:22px;align-items:center;flex-wrap:wrap}.modal-actions>*{flex:1}
.form-label{display:block;font-size:11px;font-weight:700;letter-spacing:.02em;color:#666;margin:13px 0 6px}
.form-control{border:1px solid #cfcfcf;border-radius:10px;padding:11px 12px;font-size:15px;min-width:0;width:100%;height:44px;background:#fff;color:#111}
textarea.form-control{min-height:90px;resize:vertical;height:auto}
.form-columns{display:grid;grid-template-columns:1.1fr 1fr;gap:9px}
.form-fields3{display:grid;grid-template-columns:1.1fr .8fr .95fr;gap:7px}
.form-fields2{display:grid;grid-template-columns:1.2fr 1fr;gap:7px}
.item-card{border:1px solid #e1e1e1;border-radius:13px;padding:13px;margin:10px 0;background:#fafafa}
.item-card-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;color:#888;font-size:10px;text-transform:uppercase;letter-spacing:.06em}
.item-card .form-control{height:39px;font-size:13px;background:#fff;padding:7px 9px}
.item-card .form-label{margin:10px 0 5px;font-size:10px}
.item-card .mini-remove{border:0;background:transparent;color:#ab423a;font-size:11px;text-decoration:underline;padding:5px}
.field-note{color:#8e8e8e;font-size:11px;line-height:1.5;margin-top:5px}
.status-line{background:#f2f2f0;border:1px solid #dededc;border-radius:10px;padding:11px 12px;line-height:1.5;color:#575757;font-size:12px;margin:12px 0}
.status-line.error{background:#fff5f4;color:#9c3e37;border-color:#ecc8c5}
.status-line.success{background:#f4f7f4;color:#365b39;border-color:#c9dac9}
.status-line.progress{display:flex;align-items:center;gap:11px}
.spinner{height:17px;width:17px;border:2px solid #ccc;border-top-color:#111;border-radius:50%;animation:spin .8s linear infinite;flex:0 0 auto}@keyframes spin{to{transform:rotate(360deg)}}
.hr{border:0;border-top:1px solid #e1e1e1;margin:19px 0}
.text-preview{border:1px solid #ddd;border-radius:10px;background:#f8f8f8;color:#555;font:11px/1.6 monospace;padding:14px;max-height:220px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
.pill-note{display:inline-block;border:1px solid #d3d3d3;border-radius:999px;padding:6px 8px;font-size:10px;color:#666}
@media (max-width:550px){body{display:block;background:#fff}.app{height:100dvh;max-height:none;width:100%;border:0;box-shadow:none}.site-header{height:137px;padding-top:39px}.site-header h1{font-size:clamp(30px,8.5vw,42px)}.main-scroll{padding:26px 22px 180px}.modal-sheet{padding-left:20px;padding-right:20px}}
@media (max-width:350px){.site-header h1{font-size:30px}.main-scroll{padding-left:17px;padding-right:17px}.shopping-pick{font-size:18px}.modal-sheet{padding-left:16px;padding-right:16px}}
@media (prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
