:root { --brown:#4a2c17; --cream:#faf6f0; --accent:#b5651d; --ok:#2e7d32; --warn:#b26a00; --bad:#b3261e; --line:#e4dccf; --muted:#6f6a63; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin:0; font:16px/1.4 -apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif; color:#222; background:var(--cream); padding-bottom:calc(72px + env(safe-area-inset-bottom)); }
#env-banner { background:#fff3cd; color:#664d03; text-align:center; font-size:13px; padding:4px 8px; border-bottom:1px solid #ffe69c; }
header { background:var(--brown); color:#fff; padding:10px 14px; display:flex; justify-content:space-between; align-items:center; gap:10px; position:sticky; top:0; z-index:5; }
.brand { font-weight:700; font-size:18px; } .brand span { font-weight:400; opacity:.85; }
#store-line { font-size:13px; text-align:right; opacity:.95; line-height:1.2; }
main { max-width:720px; margin:0 auto; padding:14px; }
nav#tabs { position:fixed; bottom:0; left:0; right:0; background:#fff; border-top:1px solid var(--line); display:flex; padding-bottom:env(safe-area-inset-bottom); z-index:6; }
nav#tabs a { flex:1; text-align:center; padding:14px 4px; color:var(--muted); text-decoration:none; font-weight:600; font-size:14px; }
nav#tabs a.on { color:var(--brown); border-top:3px solid var(--accent); padding-top:11px; }
h1 { font-size:22px; margin:6px 0 10px; } h2 { font-size:17px; margin:18px 0 8px; }
.card { background:#fff; border:1px solid var(--line); border-radius:10px; padding:12px 14px; margin:10px 0; }
.muted { color:var(--muted); font-size:14px; }
label { display:block; font-weight:600; margin:12px 0 4px; }
input[type=email], input[type=text], input[type=tel], input[type=search], input[type=password], textarea { width:100%; font-size:18px; padding:12px; border:1px solid #b9ae9d; border-radius:8px; background:#fff; }
input.code { font-size:28px; letter-spacing:8px; text-align:center; }
button { font:inherit; font-weight:600; border-radius:8px; border:1px solid var(--brown); background:var(--brown); color:#fff; padding:12px 16px; cursor:pointer; }
button.secondary { background:#fff; color:var(--brown); } button.danger { background:#fff; color:var(--bad); border-color:var(--bad); }
button.link { background:none; border:none; color:var(--accent); padding:6px 0; text-decoration:underline; font-weight:500; }
button.big { width:100%; font-size:18px; padding:14px; margin-top:14px; } button[disabled] { opacity:.5; cursor:default; }
.err { color:var(--bad); margin:8px 0; font-weight:600; } .okmsg { color:var(--ok); font-weight:600; }
.banner { border-radius:10px; padding:10px 12px; margin:10px 0; font-size:15px; background:#eaf3ea; border:1px solid #cfe3cf; }
.banner.warn { background:#fff4e0; border-color:#f0d9a8; } .banner.info { background:#eef3fa; border-color:#cddaee; }
.store-pick { display:block; width:100%; text-align:left; background:#fff; color:#222; border:1px solid var(--line); margin:8px 0; padding:12px 14px; }
.store-pick small { display:block; color:var(--muted); font-weight:400; }
.cat { position:sticky; top:48px; background:var(--cream); padding:8px 0 4px; font-weight:700; color:var(--brown); border-bottom:1px solid var(--line); z-index:2; text-transform:uppercase; font-size:13px; letter-spacing:.5px; }
.item { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); }
.item .d { flex:1; min-width:0; } .item .d b { display:block; font-weight:600; } .item .d span { color:var(--muted); font-size:13px; }
.qty { display:flex; align-items:center; gap:4px; } .qty button { width:40px; height:40px; padding:0; font-size:22px; line-height:1; }
.qty input { width:52px; text-align:center; font-size:18px; padding:8px 2px; border:1px solid #b9ae9d; border-radius:8px; }
.item.has { background:#fffaf1; }
#cartbar { position:fixed; left:0; right:0; bottom:calc(52px + env(safe-area-inset-bottom)); background:var(--accent); color:#fff; padding:10px 14px; display:flex; justify-content:space-between; align-items:center; z-index:7; }
#cartbar button { background:#fff; color:var(--brown); border-color:#fff; }
.sheet { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:20; display:flex; align-items:flex-end; justify-content:center; }
.sheet .panel { background:#fff; width:100%; max-width:720px; max-height:92vh; overflow:auto; border-radius:14px 14px 0 0; padding:16px; }
.row { display:flex; justify-content:space-between; gap:8px; padding:6px 0; } .row.t { border-top:2px solid #222; font-weight:700; margin-top:6px; padding-top:8px; }
.chip { display:inline-block; padding:2px 9px; border-radius:99px; font-size:12px; font-weight:700; background:#eee; }
.chip.submitted,.chip.reviewed { background:#e3f1e3; color:var(--ok); } .chip.flagged { background:#fff0d6; color:var(--warn); }
.chip.cancelled { background:#f3e0de; color:var(--bad); } .chip.delivered { background:#dfeaf8; color:#1d4f91; }
.pin { font-size:26px; letter-spacing:10px; text-align:center; }
#toast { position:fixed; left:50%; transform:translateX(-50%); bottom:130px; background:#222; color:#fff; padding:10px 16px; border-radius:99px; opacity:0; transition:opacity .2s; z-index:40; pointer-events:none; }
#toast.on { opacity:1; }
.sp { display:inline-block; width:18px; height:18px; border:3px solid #ccc; border-top-color:var(--brown); border-radius:50%; animation:s 0.8s linear infinite; vertical-align:middle; } @keyframes s { to { transform:rotate(360deg); } }
table.inv { width:100%; border-collapse:collapse; font-size:14px; } table.inv td, table.inv th { padding:6px 4px; border-bottom:1px solid var(--line); text-align:left; } table.inv td.n, table.inv th.n { text-align:right; }
