*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{font-family:system-ui,-apple-system,sans-serif;background:#f5f5f5;color:#1a1a1a;line-height:1.5;-webkit-text-size-adjust:100%}
.screen{max-width:480px;margin:0 auto;padding:16px 16px 120px}
.wa-banner{position:fixed;top:0;left:0;right:0;z-index:100;background:#dcf8c6;color:#222;text-align:center;padding:10px 16px;font-size:13px;line-height:1.4}
body.has-wa-banner .screen{padding-top:60px}
h1{font-size:22px;font-weight:700;margin-bottom:20px;text-align:center}
h2{font-size:18px;font-weight:600;margin:0}
h3{font-size:15px;font-weight:600;margin-bottom:8px}
label{display:block;font-size:14px;font-weight:500;margin-bottom:4px;margin-top:14px;color:#444}
p{font-size:14px;color:#555;margin-top:8px}
input[type="text"],input[type="tel"],input[type="password"],select{width:100%;height:48px;border:1.5px solid #ccc;border-radius:8px;padding:0 12px;font-size:16px;background:#fff;appearance:none}
input:focus{outline:0;border-color:#1a73e8;box-shadow:0 0 0 2px rgba(26,115,232,.2)}
.phone-row{display:flex;align-items:stretch}
.phone-prefix{display:flex;align-items:center;justify-content:center;width:64px;height:48px;background:#e8e8e8;border:1.5px solid #ccc;border-right:none;border-radius:8px 0 0 8px;font-size:16px;font-weight:600;color:#333}
.phone-row input{border-radius:0 8px 8px 0;flex:1}
.btn{display:block;width:100%;height:48px;border:0;border-radius:8px;font-size:16px;font-weight:600;cursor:pointer;transition:opacity .15s}
.btn:active{opacity:.7}
.btn:disabled{opacity:.4;cursor:not-allowed}
.btn-primary{background:#1a73e8;color:#fff;margin-top:16px}
.btn-submit{position:fixed;bottom:0;left:0;right:0;max-width:480px;margin:0 auto;height:56px;border-radius:0;background:#1a8f3c;color:#fff;font-size:18px;z-index:50;padding-bottom:env(safe-area-inset-bottom,0px)}
.btn-submit:disabled{background:#888}
.submit-spacer{height:calc(56px + env(safe-area-inset-bottom,0px))}
.link-forgot{display:inline-block;margin-top:12px;font-size:13px;color:#1a73e8}
.msg{margin-top:14px;padding:10px 12px;border-radius:8px;font-size:14px;line-height:1.4}
.msg-error{background:#fce8e6;color:#c5221f}
.msg-success{background:#e6f4ea;color:#137333}
.msg-info{background:#e8f0fe;color:#1a5276}
.msg-pending{background:#fef7e0;color:#7c6500}
.order-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;padding-bottom:10px;border-bottom:1px solid #ddd}
.header-left{flex:1}
.customer-identity{display:inline-block;margin-top:6px;padding:4px 10px;border-radius:999px;background:#e8f0fe;color:#174ea6;font-size:13px;font-weight:600}
.close-time{font-size:13px;color:#666;display:block;margin-top:2px}
.close-time.closed{color:#c5221f;font-weight:600}
.conn-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0;margin-left:10px}
.conn-dot.online{background:#34a853}
.conn-dot.offline{background:#ea4335}
.products-list{display:flex;flex-direction:column;gap:12px}
.product-card{background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.product-card.disabled{opacity:.5;pointer-events:none}
.product-img{width:100%;aspect-ratio:4/3;object-fit:cover;background:#eee}
.product-info{padding:10px 12px}
.product-sku{font-size:15px;font-weight:600;margin-bottom:8px}
.qty-row{display:flex;align-items:center;width:fit-content}
.qty-btn{width:44px;height:44px;border:1.5px solid #ccc;background:#fff;font-size:22px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#333;user-select:none}
.qty-btn:active{background:#e8e8e8}
.qty-btn.minus{border-radius:8px 0 0 8px}
.qty-btn.plus{border-radius:0 8px 8px 0}
.qty-val{width:52px;height:44px;border-top:1.5px solid #ccc;border-bottom:1.5px solid #ccc;border-left:0;border-right:0;text-align:center;font-size:17px;font-weight:600;background:#fff;appearance:none}
.qty-val:focus{outline:0;background:#f0f7ff}
.order-summary{background:#fff;border-radius:10px;padding:12px;margin-top:16px;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.order-summary ul{list-style:none;margin:0 0 8px;padding:0}
.order-summary li{display:flex;justify-content:space-between;font-size:14px;padding:3px 0;border-bottom:1px solid #f0f0f0}
.order-summary li:last-child{border-bottom:none}
.summary-total{font-size:15px;text-align:right;padding-top:6px;border-top:1px solid #ddd}
.empty-state{text-align:center;padding:60px 20px}
.empty-welcome{font-size:0.95rem;color:#333;margin:0 0 16px;font-weight:500}
.empty-state h2{font-size:20px;color:#555;margin-bottom:12px}
.empty-state p{color:#777;font-size:14px}
.confirm-overlay,.success-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;z-index:200;padding:16px}
.confirm-box,.success-box{background:#fff;border-radius:14px;padding:24px;max-width:340px;width:100%;text-align:center}
.confirm-box h3{font-size:17px;margin-bottom:12px}
.confirm-box p{font-size:14px;color:#555;margin-bottom:16px}
.confirm-summary{margin:0 0 16px;padding:12px;border-radius:12px;background:#f8faf8;text-align:left}
.confirm-summary h4{font-size:15px;margin-bottom:8px}
.confirm-summary ul{list-style:none;margin:0;padding:0}
.confirm-summary li{display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px solid #e7ece7;font-size:14px}
.confirm-summary li:last-child{border-bottom:none}
.confirm-actions{display:flex;gap:10px}
.confirm-actions .btn{flex:1;height:44px;font-size:15px;margin-top:0}
.btn-cancel{background:#e8e8e8;color:#333}
.btn-confirm{background:#1a8f3c;color:#fff}
.success-check{font-size:48px;color:#1a8f3c;line-height:1}
.success-box h3{font-size:24px;margin-top:10px}
.success-box p{margin-top:10px;font-size:15px;font-weight:500;color:#444}
.success-summary{margin-top:16px;padding:12px;border-radius:12px;background:#f8faf8;text-align:left}
.success-summary h4{font-size:15px;margin-bottom:8px}
.success-summary ul{list-style:none;margin:0;padding:0}
.success-summary li{display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px solid #e7ece7;font-size:14px}
.success-summary li:last-child{border-bottom:none}
.success-thanks{margin-top:14px;font-size:14px;color:#137333}
.note-section{padding:0 16px;margin-bottom:8px}
.note-section label{font-size:13px;color:#666;margin-bottom:4px;display:block}
.note-section textarea{width:100%;box-sizing:border-box;padding:8px;border:1px solid #ddd;border-radius:6px;font-size:14px;resize:vertical}
.note-count{text-align:right;font-size:12px;color:#999;margin-top:2px}
.results-container{padding:16px;max-width:480px;margin:0 auto}
.results-header{text-align:center;padding:16px 0 8px}
.results-welcome{font-size:0.95rem;color:#333;margin:0}
.results-welcome strong{color:#1a1a1a}
.results-pending{text-align:center;padding:24px 16px;background:#fff3cd;border-radius:8px;margin-bottom:16px}
.results-pending h2{font-size:16px;margin:0 0 8px}
.results-pending p{margin:0;color:#666}
.btn-history{display:block;width:100%;padding:10px;margin:12px 0;background:#fff;color:#1565c0;border:1px solid #90caf9;border-radius:8px;font-size:0.85rem;font-weight:500;cursor:pointer;text-align:center}
.result-card{background:#fff;border-radius:8px;padding:16px;margin-bottom:16px;box-shadow:0 1px 3px rgba(0,0,0,0.1);overflow-x:auto}
.result-card h3{margin:0 0 12px;font-size:15px;display:flex;justify-content:space-between;align-items:center}
.result-date{font-size:0.78rem;font-weight:400;color:#888}
.result-table{width:100%;border-collapse:collapse;font-size:14px}
.result-table th,.result-table td{padding:6px 8px;text-align:right;border-bottom:1px solid #eee}
.result-table th:first-child,.result-table td:first-child{text-align:left}
.result-table thead th{font-weight:600;border-bottom:2px solid #ddd}
.result-table tfoot th{font-weight:600;border-top:2px solid #ddd}
.result-less td{color:#dc3545}
.result-more td{color:#28a745}
.preorder-notice{background:#fff8e1;border:1px solid #ffe082;border-radius:8px;padding:10px 14px;margin-bottom:12px;font-size:0.82rem;color:#6d4c00;line-height:1.4}
.preorder-notice p{margin:0 0 4px}
.preorder-notice p:last-child{margin-bottom:0}
.submit-guidance{font-size:0.75rem;color:#888;margin-bottom:8px;line-height:1.3;padding:0 4px}
.submit-guidance p{margin:0 0 2px}
.store-badge{display:inline-block;background:#e3f2fd;color:#1565c0;font-size:0.7rem;padding:1px 6px;border-radius:4px;margin-top:2px}
.submitted-banner{text-align:center;padding:20px;margin-bottom:16px}
.submitted-check{width:48px;height:48px;border-radius:50%;background:#e8f5e9;color:#2e7d32;font-size:24px;line-height:48px;margin:0 auto 8px}
.submitted-banner h3{margin:0 0 4px;color:#2e7d32}
.submitted-banner p{margin:0;font-size:0.85rem;color:#666}
.submitted-checklist{background:#fff;border-radius:12px;padding:16px;margin-bottom:16px;box-shadow:0 1px 3px rgba(0,0,0,0.1)}
.submitted-checklist h4{margin:0 0 8px;font-size:0.9rem}
.submitted-checklist ul{list-style:none;padding:0;margin:0 0 8px}
.submitted-checklist li{display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px solid #f0f0f0;font-size:0.85rem}
.submitted-checklist li:last-child{border-bottom:none}
.btn-secondary{display:block;width:100%;padding:12px;background:#fff;color:#1a8f3c;border:2px solid #1a8f3c;border-radius:10px;font-size:1rem;font-weight:600;cursor:pointer;margin-bottom:12px}
.editing-notice{background:#e3f2fd;border:1px solid #90caf9;border-radius:8px;padding:8px 12px;margin-bottom:12px;font-size:0.82rem;color:#1565c0;text-align:center}
.confirm-store{font-size:0.75rem;color:#1565c0;background:#e3f2fd;padding:1px 4px;border-radius:3px;margin-left:4px}
.confirm-reminder{font-size:0.78rem;color:#888;text-align:center;margin:8px 0 4px}
.alloc-sorry{font-size:0.82rem;color:#b71c1c;background:#ffebee;border-radius:6px;padding:8px 10px;margin-bottom:10px;line-height:1.4}
.alloc-status-none{font-size:0.72rem;color:#b71c1c}
.alloc-status-partial{font-size:0.72rem;color:#e65100}
.reg-hint{font-size:12px;color:#888;margin:2px 0 6px;line-height:1.3}
.store-group-label{font-size:0.85rem;color:#333;margin:12px 0 4px;padding-left:4px}
.result-total{font-size:0.85rem;font-weight:600;text-align:right;margin-top:8px;padding-top:8px;border-top:1px solid #eee}
