:root{--bg:#f6f4ee;--surface:#fff;--surface-sunken:#ece9e0;--text:#1c211e;--text-muted:#5d665f;--border:#d6d2c6;--primary:#1f2a24;--primary-text:#f6f4ee;--accent:#b9741a;--danger:#a5311f;--ok:#2f6b3c;--warn-bg:#fbeed2;--warn-text:#6a4708;--radius:12px;--gap:12px;--tap:48px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:16px;line-height:1.4}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial;--bg:#141815;--surface:#1e2420;--surface-sunken:#161b18;--text:#ecebe4;--text-muted:#a3aba4;--border:#353d37;--primary:#e6e2d4;--primary-text:#161b18;--accent:#e9a23b;--danger:#ef8a78;--ok:#7fc28c;--warn-bg:#3a2d10;--warn-text:#f3d48d}}*{box-sizing:border-box}html,body,#root{height:100%}body{background:var(--bg);color:var(--text);-webkit-tap-highlight-color:transparent;margin:0}h1,h2,h3,p{margin:0}h1{font-size:1.25rem}h2{font-size:1.05rem}button,input,select,textarea{font:inherit;color:inherit}.app{flex-direction:column;max-width:640px;height:100%;margin:0 auto;display:flex}.screen{flex-direction:column;flex:1;min-height:0;display:flex}.screen-header{align-items:center;gap:var(--gap);padding:12px 16px;padding-top:calc(12px + env(safe-area-inset-top));display:flex}.screen-header h1{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.screen-body{gap:var(--gap);flex-direction:column;flex:1;min-height:0;padding:4px 16px 16px;display:flex;overflow-y:auto}.screen-footer{gap:var(--gap);padding:12px 16px;padding-bottom:calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--border);background:var(--bg);display:flex}.screen-footer>*{flex:1}.nav{border-top:1px solid var(--border);background:var(--surface);padding-bottom:env(safe-area-inset-bottom);display:flex}.nav button{min-height:56px;color:var(--text-muted);background:0 0;border:0;flex:1;font-size:.85rem;font-weight:600}.nav button[aria-current=page]{color:var(--text);box-shadow:inset 0 3px 0 var(--accent)}.stack{gap:var(--gap);flex-direction:column;display:flex}.row{align-items:center;gap:var(--gap);display:flex}.row>.grow{flex:1;min-width:0}.muted{color:var(--text-muted)}.small{font-size:.85rem}.button{min-height:var(--tap);border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);cursor:pointer;justify-content:center;align-items:center;gap:8px;padding:0 18px;font-weight:600;display:inline-flex}.button:disabled{opacity:.5;cursor:default}.button.primary{border-color:var(--primary);background:var(--primary);color:var(--primary-text)}.button.danger{border-color:var(--danger);color:var(--danger)}.button.quiet{background:0 0;border-color:#0000}.button.block{width:100%}.field{flex-direction:column;gap:4px;display:flex}.field>label,.field>.label{color:var(--text-muted);font-size:.85rem;font-weight:600}.field input,.field select,.field textarea{width:100%;min-height:var(--tap);border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);padding:0 12px}.field textarea{min-height:88px;padding:10px 12px}.field .hint{color:var(--text-muted);font-size:.8rem}.field .hint.low{color:var(--warn-text)}.field-group{gap:var(--gap);grid-template-columns:minmax(0,1fr) minmax(0,1fr);display:grid}.segmented{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);min-width:0;margin:0;padding:0;display:flex;overflow:hidden}.segmented button{min-height:var(--tap);border:0;border-right:1px solid var(--border);background:0 0;flex:1;font-weight:600}.segmented button:last-child{border-right:0}.segmented button[aria-pressed=true]{background:var(--primary);color:var(--primary-text)}.card{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);padding:14px}.list{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);flex-direction:column;display:flex;overflow:hidden}.list-item{align-items:center;gap:var(--gap);border:0;border-bottom:1px solid var(--border);text-align:left;background:0 0;width:100%;min-height:60px;padding:10px 14px;display:flex}.list-item:last-child{border-bottom:0}button.list-item{cursor:pointer}.amount{font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:700}.banner{border-radius:var(--radius);background:var(--surface-sunken);padding:12px 14px}.banner.warn{background:var(--warn-bg);color:var(--warn-text)}.banner.error{border:1px solid var(--danger);color:var(--danger);background:var(--surface)}.banner.ok{border:1px solid var(--ok);color:var(--ok);background:var(--surface)}.empty{text-align:center;color:var(--text-muted);padding:32px 16px}.camera{background:#000;flex:1;min-height:0;position:relative;overflow:hidden}.camera video,.camera img{object-fit:cover;width:100%;height:100%}.camera .frame{pointer-events:none;border:3px solid #fff;border-radius:10px;position:absolute;box-shadow:0 0 0 100vmax #00000073}.camera .camera-hint{text-align:center;color:#fff;text-shadow:0 1px 3px #000c;padding:0 16px;font-weight:600;position:absolute;top:12px;left:0;right:0}.camera-controls{flex-direction:column}.camera-hint-text{font-weight:600}.button.capture{width:100%;min-height:64px;font-size:1.1rem}.visually-hidden{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.scan-strip{padding:0 16px 12px}.scan-photo{object-fit:contain;border-radius:var(--radius);background:var(--surface-sunken);width:100%;height:auto;max-height:38vh;display:block}.scan-busy{justify-content:center;align-items:center;gap:var(--gap);text-align:center;flex-direction:column;flex:1;min-height:0;padding:16px;display:flex}.scan-busy p{font-weight:600}.list-item.product-row{flex-direction:column;justify-content:center;align-items:flex-start;gap:2px}.product-name{overflow-wrap:anywhere;font-weight:700}.chips{flex-wrap:wrap;gap:8px;display:flex}.chip{min-height:var(--tap);border:1px solid var(--border);background:var(--surface);text-align:left;overflow-wrap:anywhere;cursor:pointer;border-radius:999px;max-width:100%;padding:0 14px}.chip[aria-pressed=true]{border-color:var(--primary);background:var(--primary);color:var(--primary-text)}.choice-group{border:0;min-width:0;margin:0;padding:0}.choice-group>legend{margin-bottom:4px;padding:0}.choice-grid{grid-template-columns:1fr 1fr;gap:8px;display:grid}.choice-list{flex-direction:column;gap:8px;display:flex}.choice{min-height:var(--tap);border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);text-align:left;overflow-wrap:anywhere;cursor:pointer;align-items:center;padding:8px 14px;font-weight:600;display:flex}.choice-grid .choice{text-align:center;justify-content:center}.choice[aria-pressed=true]{border-color:var(--primary);background:var(--primary);color:var(--primary-text)}.weight-actions{flex-direction:column;gap:8px;min-width:0;display:flex}.weight-actions .button{width:100%}.weight-caution{color:var(--warn-text);text-align:center;font-weight:600}.breakdown{flex-direction:column;margin:0;display:flex}.breakdown>div{justify-content:space-between;align-items:baseline;gap:var(--gap);border-bottom:1px solid var(--border);padding:8px 0;display:flex}.breakdown>div:last-child{border-bottom:0;padding-bottom:0}.breakdown>div:first-child{padding-top:0}.breakdown dt{color:var(--text-muted)}.breakdown dd{text-align:right;margin:0}.breakdown .net dt,.breakdown .net dd{color:var(--text);font-size:1.15rem;font-weight:700}.breakdown .source{color:var(--text-muted);font-size:.8rem;font-weight:400;display:block}.big-number .field input{font-variant-numeric:tabular-nums;min-height:64px;font-size:2rem;font-weight:700}.big-number.low .field input{border-color:var(--accent);border-width:2px}.scale-photo{object-fit:contain;border-radius:var(--radius);background:#000;width:100%;height:auto;max-height:30vh;display:block}.scale-capture .camera{min-height:220px}.screen-body .scale-capture{margin:0 -16px -16px}.brew-plain-list{margin:0;padding:0;list-style:none}.brew-plain-list>li>.list-item{border-bottom:0}.brew-plain-list>li+li{border-top:1px solid var(--border)}.brew-lines{gap:var(--gap);flex-direction:column;display:flex}.brew-line{flex-direction:column;gap:10px;display:flex}.brew-line-name{overflow-wrap:anywhere;font-weight:700}.brew-line-actions{gap:8px;display:flex}.brew-line-actions>*{flex:1}.brew-choice{flex-direction:column;gap:10px;display:flex}.brew-choice .button{white-space:normal;text-align:center;padding-top:8px;padding-bottom:8px}.brew-item-text{overflow-wrap:anywhere;flex-direction:column;flex:1;min-width:0;display:flex}.brew-footer{flex-direction:column}.brew-stock-group{flex-direction:column;gap:8px;display:flex}.brew-out-of-stock{color:var(--text-muted)}.inv-wrap.button,.inv-choices .button,.inv-pair .button,.inv-footer-action.button{text-align:center;padding-top:8px;padding-bottom:8px;line-height:1.2}.inv-group{flex-direction:column;gap:8px;display:flex}.inv-row-text{flex-direction:column;flex:1;min-width:0;display:flex}.inv-row-name{overflow-wrap:anywhere;font-weight:600}.inv-dim{opacity:.55}.inv-plain-list{margin:0;padding:0;list-style:none}.inv-notice{align-items:center;gap:8px;display:flex}.inv-notice-text{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.inv-close.button{min-width:44px;color:inherit;padding:0;font-size:1.25rem}.inv-stock{flex-direction:column;gap:4px;display:flex}.inv-stock-amount{font-variant-numeric:tabular-nums;font-size:2.5rem;font-weight:700;line-height:1.1}.inv-pair{gap:var(--gap);grid-template-columns:1fr 1fr;display:grid}.inv-footer-action.button{min-height:56px;padding-left:6px;padding-right:6px}.inv-fields{grid-template-columns:auto 1fr;align-items:baseline;gap:6px 16px;margin:0;display:grid}.inv-fields>div{display:contents}.inv-fields dt{color:var(--text-muted);font-size:.85rem;font-weight:600}.inv-fields dd{overflow-wrap:anywhere;margin:0}.inv-history-item{align-items:flex-start}.inv-history-amounts{text-align:right;flex-direction:column;align-items:flex-end;display:flex}.inv-warn-text{color:var(--warn-text)}.inv-amount-row{align-items:flex-end;gap:var(--gap);display:flex}.inv-amount-row>.field{flex:1;min-width:0}.inv-amount-row input{font-size:1.25rem;font-weight:600}.inv-preview{gap:var(--gap);grid-template-columns:1fr 1fr;margin:0;display:grid}.inv-preview dt{color:var(--text-muted);font-size:.85rem;font-weight:600}.inv-preview dd{margin:0;font-size:1.25rem}.inv-choices{gap:var(--gap);border:0;flex-direction:column;min-width:0;margin:0;padding:0;display:flex}.inv-line-link{justify-content:space-between;align-items:center;gap:var(--gap);width:100%;min-height:var(--tap);border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);text-align:left;cursor:pointer;padding:8px 14px;font-weight:600;display:flex}.inv-line-link-mark{color:var(--text-muted);font-size:1.25rem}.inv-choice{min-height:var(--tap);border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);text-align:left;overflow-wrap:anywhere;cursor:pointer;align-items:center;padding:8px 14px;font-weight:600;display:flex}.inv-choice[aria-pressed=true]{border-color:var(--primary);background:var(--primary);color:var(--primary-text)}.inv-breakdown{flex-direction:column;margin:0;display:flex}.inv-breakdown>div{justify-content:space-between;align-items:baseline;gap:var(--gap);border-bottom:1px solid var(--border);padding:8px 0;display:flex}.inv-breakdown>div:first-child{padding-top:0}.inv-breakdown>div:last-child{border-bottom:0;padding-bottom:0}.inv-breakdown dt{color:var(--text-muted)}.inv-breakdown dd{text-align:right;margin:0}.inv-breakdown-net dt,.inv-breakdown-net dd{color:var(--text);font-size:1.15rem;font-weight:700}.inv-breakdown-source{color:var(--text-muted);font-size:.8rem;font-weight:400;display:block}.review-head{align-items:center;gap:var(--gap);display:flex}.review-head>.grow{flex:1;min-width:0}.review-name{overflow-wrap:anywhere;font-size:1.15rem}.review-label{color:var(--text-muted);font-size:.85rem;font-weight:600}.review-amount{font-size:1.6rem;line-height:1.2}.review-breakdown{gap:4px var(--gap);border-top:1px solid var(--border);grid-template-columns:1fr auto;margin:12px 0 0;padding-top:10px;display:grid}.review-breakdown dt{color:var(--text-muted)}.review-breakdown dd{text-align:right;font-variant-numeric:tabular-nums;margin:0}.review-breakdown .total{color:var(--text);font-weight:700}.review-note{margin-top:8px}.review-section{gap:var(--gap);flex-direction:column;display:flex}.review-lots{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.review-lots li{justify-content:space-between;align-items:baseline;gap:var(--gap);border-bottom:1px solid var(--border);overflow-wrap:anywhere;padding:10px 14px;display:flex}.review-lots li:last-child{border-bottom:0}.review-choices{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);min-width:0;margin:0;padding:0;overflow:hidden}.review-choices legend{float:left;width:100%;color:var(--text-muted);padding:10px 14px 6px;font-size:.85rem;font-weight:600}.review-choice{clear:both;align-items:center;gap:var(--gap);border-top:1px solid var(--border);cursor:pointer;min-height:60px;padding:10px 14px;display:flex}.review-choice input{width:24px;height:24px;accent-color:var(--accent);flex:none;margin:0}.review-choice>span{overflow-wrap:anywhere;flex-direction:column;flex:1;min-width:0;display:flex}.review-choice-title{font-weight:600}.review-choice:has(input:checked){background:var(--surface-sunken)}.review-choice:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:-2px}.review-choices:disabled .review-choice{opacity:.6;cursor:default}.review-actions{flex-direction:column;gap:10px;min-width:0;display:flex}.review-actions .button{width:100%;padding-top:8px;padding-bottom:8px}.review-actions .button.review-check{background:var(--warn-bg);color:var(--warn-text);border-color:#0000}.done-summary{font-size:1.15rem}.settings-section{gap:var(--gap);flex-direction:column;scroll-margin-top:8px;display:flex}.settings-section+.settings-section{border-top:1px solid var(--border);margin-top:12px;padding-top:20px}.settings-section>h2{font-size:1.15rem}.settings-plain-list{margin:0;padding:0;list-style:none}.settings-plain-list>li>.list-item{border-bottom:0}.settings-plain-list>li+li{border-top:1px solid var(--border)}.settings-row-text{overflow-wrap:anywhere;flex-direction:column;flex:1;min-width:0;display:flex}.settings-chevron{color:var(--text-muted);font-size:1.25rem}.setting{flex-direction:column;gap:4px;display:flex}.setting-label{color:var(--text-muted);font-size:.85rem;font-weight:600}.setting-hint{color:var(--text-muted);font-size:.8rem}.setting-error{color:var(--danger);font-size:.8rem}.setting-saved{color:var(--ok);font-size:.8rem}.settings-choice-list{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);flex-direction:column;min-width:0;margin:0;padding:0;display:flex;overflow:hidden}.settings-choice{min-height:var(--tap);border-bottom:1px solid var(--border);cursor:pointer;align-items:center;gap:12px;padding:8px 14px;display:flex}.settings-choice:last-child{border-bottom:0}.settings-choice input{width:22px;height:22px;accent-color:var(--accent);flex:none;margin:0}.settings-choice-text{overflow-wrap:anywhere;flex-direction:column;min-width:0;display:flex}.settings-action{flex-direction:column;gap:8px;display:flex}.settings-removable{align-items:center;gap:var(--gap);min-height:var(--tap);padding:4px 4px 4px 14px;display:flex}.settings-removable>span{overflow-wrap:anywhere;flex:1;min-width:0}.settings-confirm{flex-direction:column;gap:10px;display:flex}.settings-weight{flex-direction:column;gap:8px;display:flex}
