:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg:#12181b;--surface:#1c2528;--surface-raised:#24302f;--text:#eef2f0;--text-muted:#9fb0ac;--accent:#4caf7d;--accent-text:#08130d;--border:#33403f;--warn:#f0b429;--warn-bg:#3a2f14;--danger:#ef6b63;--danger-bg:#3a1f1e;--nav-height:64px;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;line-height:1.5}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text)}button{font-family:inherit}.app-shell{flex-direction:column;min-height:100vh;display:flex}.app-loading{height:100vh;color:var(--text-muted);justify-content:center;align-items:center;display:flex}.app-main{padding-bottom:calc(var(--nav-height) + 16px);flex:1}.page{max-width:640px;margin:0 auto;padding:24px 20px}.page h1{margin-bottom:4px;font-size:1.6rem}.muted{color:var(--text-muted)}.card{background:var(--surface);border:1px solid var(--border);border-radius:12px;margin-top:16px;padding:16px}.coming-soon-badge{background:var(--surface-raised);color:var(--accent);border-radius:999px;margin-top:20px;padding:8px 16px;font-size:.9rem;font-weight:600;display:inline-block}.nav-bar{height:var(--nav-height);background:var(--surface);border-top:1px solid var(--border);padding-bottom:env(safe-area-inset-bottom);display:flex;position:fixed;bottom:0;left:0;right:0}.nav-item{text-align:center;min-width:0;color:var(--text-muted);overflow-wrap:anywhere;flex:1;justify-content:center;align-items:center;min-height:44px;padding:0 2px;font-size:.8rem;font-weight:500;line-height:1.15;text-decoration:none;display:flex}.nav-item.active{color:var(--accent)}.page-head{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;display:flex}.page-head h1{margin:0}.page-actions{flex-wrap:wrap;gap:8px;margin-top:12px;display:flex}.button{border:1px solid var(--border);background:var(--surface);min-height:48px;color:var(--text);cursor:pointer;border-radius:10px;justify-content:center;align-items:center;padding:0 18px;font-size:1rem;font-weight:600;text-decoration:none;display:inline-flex}.button.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-text)}.button.danger{border-color:var(--danger);color:var(--danger)}.button.active{border-color:var(--accent);color:var(--accent)}.button.big{min-height:56px;font-size:1.05rem}.button.full{width:100%;margin-top:16px}.button:disabled{opacity:.6;cursor:default}.link-button{color:var(--accent);text-align:left;cursor:pointer;background:0 0;border:none;padding:6px 0;font-size:.95rem;font-weight:600}.chip-row{-webkit-overflow-scrolling:touch;gap:8px;padding:4px 0 10px;display:flex;overflow-x:auto}.chip{border:1px solid var(--border);background:var(--surface);min-height:44px;color:var(--text-muted);white-space:nowrap;cursor:pointer;border-radius:999px;flex:none;padding:0 16px;font-size:.95rem;font-weight:600}.chip.active{background:var(--accent);border-color:var(--accent);color:var(--accent-text)}.search-input{margin-top:16px}.count-line{margin:0 0 8px;font-size:.9rem}.product-list{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.product-row,.supplier-row{background:var(--surface);border:1px solid var(--border);min-height:72px;color:var(--text);border-radius:12px;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;text-decoration:none;display:flex}.product-row-main,.supplier-row>div:first-child{flex-direction:column;gap:2px;min-width:0;display:flex}.product-name{font-size:1.05rem;font-weight:600}.product-sub{color:var(--text-muted);font-size:.9rem}.product-row-price{flex-direction:column;flex:none;align-items:flex-end;display:flex}.price{font-size:1.1rem;font-weight:700}.price-sub{color:var(--text-muted);font-size:.8rem}.badge-row{flex-wrap:wrap;gap:6px;margin-top:4px;display:flex}.badge-row:empty{display:none}.badge{background:var(--surface-raised);color:var(--text-muted);border-radius:999px;padding:3px 10px;font-size:.78rem;font-weight:600}.badge.warn{background:var(--warn-bg);color:var(--warn)}.supplier-actions{flex:none;gap:8px;display:flex}.form-section{background:var(--surface);border:1px solid var(--border);border-radius:12px;margin-top:24px;padding:16px}.form-section h2{margin:0 0 4px;font-size:1.1rem}.field{margin-top:16px}.field-label{margin-bottom:6px;font-size:.95rem;font-weight:600;display:block}.input{border:1px solid var(--border);background:var(--bg);width:100%;min-height:52px;color:var(--text);border-radius:10px;padding:0 14px;font-family:inherit;font-size:1rem}.input:focus{outline:2px solid var(--accent);outline-offset:1px}select.input{appearance:none;background-image:linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);background-position:calc(100% - 20px) 24px,calc(100% - 14px) 24px;background-repeat:no-repeat;background-size:6px 6px,6px 6px;padding-right:40px}.input-with-suffix{align-items:center;gap:8px;display:flex}.input-suffix,.input-prefix{color:var(--text-muted);white-space:nowrap;flex:none;font-size:.95rem}.input-prefix{color:var(--text);font-size:1.1rem;font-weight:600}.field-message{color:var(--text-muted);margin:6px 0 0;font-size:.85rem}.field-message.error{color:var(--danger)}.money-row{flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:8px;display:flex}.money-note{color:var(--text-muted);font-size:.85rem}.serve-card{border:1px solid var(--border);background:var(--surface-raised);border-radius:10px;margin-top:16px;padding:12px 14px}.serve-head{justify-content:space-between;align-items:center;gap:12px;display:flex}.serve-head h3{margin:0;font-size:1rem}.figures{grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px;margin:14px 0 0;display:grid}.figures div{min-width:0}.figures dt{color:var(--text-muted);font-size:.78rem}.figures dd{margin:2px 0 0;font-size:1.05rem;font-weight:700}.figures dd.good{color:var(--accent)}.figures dd.poor{color:var(--danger)}.add-serve-row{flex-wrap:wrap;gap:8px;margin-top:16px;display:flex}.notice{background:var(--surface-raised);border-radius:10px;margin:16px 0 0;padding:12px 14px;font-size:.95rem}.notice.warn{background:var(--warn-bg);color:var(--warn)}.notice.error{background:var(--danger-bg);color:var(--danger)}.form-actions{gap:10px;margin-top:24px;display:flex}.form-actions .button{flex:1}.danger-zone{border-top:1px solid var(--border);margin-top:32px;padding-top:20px}.danger-zone>.button{width:100%}.confirm-row{border:1px solid var(--danger);border-radius:10px;flex-direction:column;gap:10px;margin-top:8px;padding:14px;display:flex}.confirm-row p{margin:0}.count-bar{z-index:5;background:var(--bg);border-bottom:1px solid var(--border);margin:0 -20px 16px;padding:12px 20px 14px;position:sticky;top:0}.count-bar-top{justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;display:flex}.count-bar-text{color:var(--text-muted);font-size:15px}.count-bar-text strong{color:var(--text)}.progress{background:var(--surface-raised);border-radius:999px;height:10px;overflow:hidden}.progress-fill{background:var(--accent);border-radius:999px;height:100%;transition:width .15s ease-out}.resume-card h2{margin-top:0}.count-row .count-tick{color:var(--accent);font-size:22px;line-height:1}.count-footer{flex-direction:column;gap:10px;margin-top:24px;display:flex}.stepper{align-items:stretch;gap:10px;display:flex}.stepper-button{min-height:56px;color:var(--text);background:var(--surface-raised);border:1px solid var(--border);cursor:pointer;border-radius:10px;flex:0 0 64px;font-size:28px;line-height:1}.stepper-button:active{background:var(--accent);color:var(--accent-text)}.stepper-value{flex:1}.stepper-value .input{text-align:center;font-size:22px;font-weight:600}.fraction-row{grid-template-columns:repeat(5,1fr);gap:8px;display:grid}.fraction-button{min-height:64px;color:var(--text);background:var(--surface-raised);border:1px solid var(--border);cursor:pointer;border-radius:10px;font-size:18px;font-weight:600}.fraction-button.active{background:var(--accent);border-color:var(--accent);color:var(--accent-text)}.open-items{flex-direction:column;gap:12px;margin:16px 0;display:flex}.open-item{background:var(--surface-raised);border:1px solid var(--border);border-radius:10px;padding:14px}.open-item-head{justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px;display:flex}.open-item-head .field-label{margin:0}.open-item-figures{color:var(--accent);font-weight:600}.entry-panel .figures{margin-top:16px}.pick-row{text-align:left;cursor:pointer;width:100%;font:inherit}.pick-row.active{border-color:var(--accent)}.pick-tick{text-align:center;color:var(--accent);flex:0 0 32px;font-size:22px}.add-name-row{align-items:stretch;gap:10px;display:flex}.add-name-row .input{flex:1}.scan-sheet{flex-direction:column;gap:14px;display:flex}.scan-head{justify-content:space-between;align-items:center;gap:12px;display:flex}.scan-head h2{margin:0}.scan-video-wrap{aspect-ratio:3/4;background:#000;border-radius:12px;width:100%;max-height:60vh;position:relative;overflow:hidden}.scan-video{object-fit:cover;width:100%;height:100%}.scan-frame{border:3px solid var(--accent);pointer-events:none;border-radius:10px;position:absolute;inset:22% 10%}.scan-typed-row{align-items:stretch;gap:10px;display:flex}.scan-typed-row .input{flex:1}@media (prefers-color-scheme:light){:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--bg:#f4f6f5;--surface:#fff;--surface-raised:#eef2f0;--text:#14201d;--text-muted:#5b6b67;--border:#dfe5e2;--warn:#8a5a00;--warn-bg:#fdf0d5;--danger:#b3261e;--danger-bg:#fbe4e2}}.badge.ok{background:var(--accent);color:var(--accent-text)}.notice.ok{background:var(--accent);color:var(--accent-text);font-weight:600}.file-button{cursor:pointer;justify-content:center;align-items:center;width:100%;display:inline-flex}.file-input{opacity:0;pointer-events:none;width:1px;height:1px;position:absolute}.import-columns{flex-direction:column;gap:12px;margin:0;padding:0;list-style:none;display:flex}.import-column{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:12px 14px}.import-column .field{margin-bottom:0}.import-column-head{flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:8px;display:flex}.import-column-name{font-size:1.05rem;font-weight:600}.import-column-sample{color:var(--text-muted);text-overflow:ellipsis;white-space:nowrap;max-width:60%;font-size:.85rem;overflow:hidden}.import-row{align-items:flex-start;padding-top:14px;padding-bottom:14px}.import-changes{color:var(--text-muted);flex-direction:column;gap:4px;margin:8px 0 0;padding:0;font-size:.88rem;list-style:none;display:flex}.import-changes s{opacity:.65}.import-changes strong{color:var(--text)}.import-problem{color:var(--warn);margin-top:6px;font-size:.88rem}.margin-group{margin-top:24px}.margin-group h3{color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em;margin:0 0 10px;font-size:1.05rem}.table-scroll{-webkit-overflow-scrolling:touch;border:1px solid var(--border);background:var(--surface);border-radius:12px;overflow-x:auto}.margin-table{border-collapse:collapse;width:100%;font-size:.95rem}.margin-table th,.margin-table td{text-align:left;white-space:nowrap;border-bottom:1px solid var(--border);padding:12px 14px}.margin-table tr:last-child th,.margin-table tr:last-child td{border-bottom:0}.margin-table thead th{color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em;font-size:.8rem;font-weight:600}.margin-table tbody th{white-space:normal;min-width:11rem;font-weight:600}.margin-table tbody th a{color:var(--text);text-decoration:none}.margin-table .num{text-align:right;font-variant-numeric:tabular-nums}.margin-table .th-note{text-transform:none;letter-spacing:0;font-size:.72rem;font-weight:400;display:block}.fitment-row{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:14px 16px}.fitment-head{flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:10px;display:flex}.fitment-row .field{margin-bottom:0}.fitment-actions{flex-wrap:wrap;gap:8px;margin-top:10px;display:flex}.fitment-actions:empty{display:none}.tenths-row{grid-template-columns:repeat(3,1fr);gap:8px;display:grid}@media (width>=400px){.tenths-row{grid-template-columns:repeat(4,1fr)}}.tenths-button{min-height:60px;color:var(--text);background:var(--surface-raised);border:1px solid var(--border);cursor:pointer;border-radius:10px;font-size:18px;font-weight:600}.tenths-button.active{background:var(--accent);border-color:var(--accent);color:var(--accent-text)}.build-stamp{border-top:1px solid var(--border);margin-top:32px;padding-top:20px}.note-photo{object-fit:contain;border:1px solid var(--border);background:var(--surface-raised);border-radius:10px;width:100%;max-height:320px;display:block}.unit-cost{color:var(--text-muted);font-size:.85em;display:block}.lib-check{width:28px;min-width:28px;height:28px;accent-color:var(--accent);margin:10px}.sticky-actions{z-index:2;background:var(--bg);border-top:1px solid var(--border);padding:12px 0;position:sticky;bottom:0}.pref-pick{cursor:pointer;align-items:center;gap:12px;min-height:48px;padding:4px 0;display:flex}.pref-radio{width:24px;min-width:24px;height:24px;accent-color:var(--accent)}.supplier-card{border:1px solid var(--border);background:var(--surface-raised);border-radius:10px;margin-top:16px;padding:12px 14px}.supplier-options{background:var(--surface-raised);border-radius:10px;margin:4px 0 0;padding:8px 12px;list-style:none}.supplier-options li{justify-content:space-between;align-items:center;gap:12px;min-height:32px;font-size:.9em;display:flex}
