:root{
  --ink:#2A1208;--choc:#502010;--accent:#F0285F;--accent-soft:#FFE4EC;--accent-ink:#B8123F;--gold:#F5B800;
  --bg:#FFFFFF;--line:#F0DFD6;--light:#FBF3ED;--light2:#FFF6EE;
  --muted:#7A5A4C;--muted2:#A08476;--green:#1E7F4F;--green-soft:#E4F3EA;--red:#B23A2E;--red-soft:#FBE9E7;
  --r:16px;--r-lg:20px;
  --display:'Bricolage Grotesque',system-ui,sans-serif;--body:'DM Sans',system-ui,sans-serif;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--light2);color:var(--ink);font-family:var(--body);font-size:15px;line-height:1.4;-webkit-font-smoothing:antialiased}
.app{max-width:480px;margin:0 auto;min-height:100dvh;background:var(--bg);position:relative;padding-bottom:110px}
@media(min-width:520px){.app{box-shadow:0 0 0 1px var(--line)}}
a{color:inherit;text-decoration:none}
button{font:inherit;cursor:pointer}
input,select{font:inherit;color:var(--ink)}
.hidden{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.muted{color:var(--muted)}.green{color:var(--green)}
.hp{position:absolute;left:-9999px;opacity:0;height:0;width:0}

/* header */
.hdr{position:relative;display:flex;align-items:center;justify-content:center;padding:18px 20px 10px}
.hdr-page{justify-content:flex-start;gap:12px}
.hdr h1{margin:0;font-family:var(--display);font-weight:600;font-size:24px}
.hdr-page .muted{margin-left:auto;font-size:13px;font-weight:600}
.brand{display:flex;align-items:center}.brand img{height:76px;width:auto;display:block}
.brand em{font-style:normal;color:var(--accent)}
.icon-btn{width:44px;height:44px;border-radius:14px;background:var(--light);display:flex;align-items:center;justify-content:center;color:var(--ink);border:0;flex-shrink:0}
.hdr-right{position:absolute;right:20px;top:14px}

/* search & chips */
.search{padding:6px 20px 0}
.search-box{display:flex;align-items:center;gap:10px;height:50px;padding:0 14px 0 16px;background:#fff;border:1.5px solid var(--line);border-radius:var(--r);color:var(--muted2)}
.search-box:focus-within{border-color:var(--ink)}
.search-box input{flex:1;border:0;outline:0;background:transparent;font-size:15px;min-width:0}
.search-box input::placeholder{color:var(--muted2)}
.search-box input::-webkit-search-cancel-button{display:none}
.q-clear{border:0;background:var(--light);color:var(--ink);width:28px;height:28px;border-radius:14px;font-size:18px;line-height:1}
.chips{display:flex;gap:8px;padding:14px 20px 0;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.chips::-webkit-scrollbar{display:none}
.chip{flex-shrink:0;height:40px;padding:0 16px;border-radius:20px;background:#fff;border:1.5px solid var(--line);color:var(--ink);font-size:14px;font-weight:500;display:flex;align-items:center;white-space:nowrap}
.chip.on{background:var(--ink);border-color:var(--ink);color:#fff;font-weight:600}

/* grid */
main{padding:0 20px}
.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding-top:16px}
.card{background:#fff;border:1.5px solid var(--line);border-radius:var(--r-lg);padding:10px;display:flex;flex-direction:column;gap:8px;position:relative}
.card.out{opacity:.55}
.card-img{display:block;width:100%;aspect-ratio:1;border-radius:14px;background:var(--accent-soft) center/cover no-repeat;border:1px solid var(--line);border:0;padding:0;position:relative;overflow:hidden}
.card-img.noimg{border:0}.card-img.noimg::after{content:'';position:absolute;inset:0;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 24 24' fill='none' stroke='%231E3A8A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='16' rx='3'/><circle cx='9' cy='10' r='1.8'/><path d='M21 16l-5-5-8 8'/></svg>") center/30px no-repeat}
.badge{position:absolute;top:8px;left:8px;padding:4px 8px;border-radius:8px;background:var(--gold);color:var(--ink);font-size:11px;font-weight:700}
.badge.out{background:var(--choc);color:#fff}
.card-body{padding:0 4px;display:flex;flex-direction:column;gap:2px}
.card-name{font-size:15px;font-weight:600;line-height:1.2}
.card-weight{font-size:12px;color:var(--muted)}
.card-foot{display:flex;align-items:center;justify-content:space-between;gap:6px;padding-left:4px;min-height:44px}
.price{display:flex;flex-direction:column;line-height:1.1}
.price-now{font-family:var(--display);font-weight:600;font-size:16px;color:var(--accent);white-space:nowrap}
.price-old{font-size:12px;color:var(--muted2);text-decoration:line-through}
.add{width:44px;height:44px;border-radius:14px;border:0;background:var(--ink);color:#fff;font-size:24px;line-height:1}
.add:disabled{background:var(--line);color:var(--muted2);cursor:not-allowed}
.stepper{display:flex;align-items:center;background:var(--ink);border-radius:14px;padding:2px}
.stepper button{width:34px;height:40px;border-radius:12px;border:0;background:transparent;color:#fff;font-size:22px;line-height:1}
.stepper .qty{color:#fff;font-weight:700;font-size:14px;min-width:16px;text-align:center}
.empty{text-align:center;color:var(--muted);padding:40px 0}
.closed{margin:12px 20px 0;padding:14px 16px;border-radius:var(--r);background:var(--red-soft);color:var(--red);font-weight:600;font-size:14px}
.cart-page .closed{margin:0 0 12px}

/* floating bag */
.bag{position:fixed;right:max(20px,calc(50% - 220px));bottom:24px;height:60px;padding:0 20px 0 8px;border-radius:30px;background:var(--ink);color:#fff;display:flex;align-items:center;gap:10px;box-shadow:0 12px 28px rgba(42,18,8,.3);z-index:20;transition:transform .15s}
.bag:active{transform:scale(.97)}
.bag-ico{position:relative;width:44px;height:44px;border-radius:22px;background:var(--accent);display:flex;align-items:center;justify-content:center}
.bag-ico b{position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#fff;color:var(--ink);font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center}
.bag-total{font-family:var(--display);font-weight:600;font-size:17px}
.bag.pulse .bag-ico{animation:pulse .35s}
@keyframes pulse{50%{transform:scale(1.15)}}

/* cart */
.cart-page{padding-top:10px}
.cart-items{display:flex;flex-direction:column;gap:8px}
.ci{display:flex;align-items:center;gap:12px;padding:10px;background:#fff;border:1.5px solid var(--line);border-radius:18px}
.ci-img{width:56px;height:56px;border-radius:12px;background:var(--accent-soft) center/cover no-repeat;flex-shrink:0}
.ci-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.ci-name{font-size:14px;font-weight:600}
.ci-meta{font-size:12px;color:var(--muted)}
.ci-price{font-family:var(--display);font-weight:600;font-size:15px;color:var(--accent)}
.ci .stepper{background:var(--light)}.ci .stepper button{width:40px}
.ci .stepper button,.ci .stepper .qty{color:var(--ink)}
.minspend{margin-top:18px;padding:14px 16px;border-radius:var(--r);background:var(--light)}
.minspend.ok{background:var(--green-soft)}
.minspend-row{display:flex;justify-content:space-between;align-items:center;font-size:13px;font-weight:600;margin-bottom:8px}
.bar{height:8px;border-radius:4px;background:#E2E5EA;overflow:hidden}
.bar-fill{height:8px;border-radius:4px;background:var(--accent);width:0;transition:width .25s}
.minspend.ok .bar-fill{background:var(--green)}
.notice{display:flex;gap:10px;align-items:flex-start;margin-top:12px;padding:12px 14px;border-radius:var(--r);background:var(--accent-soft);color:var(--accent-ink);font-size:13px;line-height:1.45}
.notice svg{flex-shrink:0;margin-top:1px}.notice>span{flex:1}
.alert{margin-bottom:12px;padding:12px 14px;border-radius:var(--r);background:var(--red-soft);color:var(--red);font-size:13px;font-weight:600}
form h2{font-size:15px;font-weight:700;margin:24px 0 10px}
.lbl{display:block;font-size:12px;font-weight:600;color:var(--muted);margin:12px 0 6px}
form input[type=text],form input[type=tel],form input[type=number],form select{width:100%;height:48px;padding:0 14px;border-radius:14px;border:1.5px solid var(--line);background:#fff;outline:0;font-size:15px;appearance:none}
form input:focus,form select:focus{border-color:var(--ink)}
form select{background:#fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232A1208' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") right 14px center no-repeat;padding-right:40px}
.seg{display:flex;gap:8px}
.seg label{flex:1}
.seg input{position:absolute;opacity:0;width:0;height:0}
.seg span{display:flex;align-items:center;justify-content:center;height:46px;border-radius:14px;border:1.5px solid var(--line);background:#fff;font-size:14px;font-weight:500;cursor:pointer}
.seg input:checked+span{background:var(--ink);border-color:var(--ink);color:#fff;font-weight:600}
.paylist{display:flex;flex-direction:column;gap:8px}
.pay{display:flex;align-items:center;gap:12px;min-height:60px;padding:0 14px;background:#fff;border:1.5px solid var(--line);border-radius:var(--r);cursor:pointer}
.pay:has(input:checked){border:2px solid var(--ink)}
.pay input{position:absolute;opacity:0;width:0;height:0}
.pay{position:relative}
.pay .check{margin-left:auto;width:24px;height:24px;border-radius:50%;border:1.5px solid var(--line);background:#fff;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.pay .check svg{opacity:0}
.pay:has(input:checked) .check{background:var(--accent);border-color:var(--accent)}
.pay:has(input:checked) .check svg{opacity:1}
.zonelist{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pay.zone{flex-direction:column;align-items:flex-start;justify-content:center;gap:0;min-height:72px;padding:12px 44px 12px 14px}
.pay.zone .check{position:absolute;top:10px;right:10px;margin:0;width:22px;height:22px}
.pay.zone .check svg{width:12px;height:12px}
.pay>span:not(.pok-mark){display:flex;flex-direction:column;gap:1px}
.pay b{font-size:14px;font-weight:600}.pay small{font-size:12px;color:var(--muted)}
.pok-mark{width:26px;height:26px;border-radius:8px;background:var(--ink);color:#fff;display:flex;align-items:center;justify-content:center;font-family:var(--display);font-weight:700;font-size:11px;flex-shrink:0}
.minspend.over{background:#FDECEC;color:#B42318}.minspend.over .bar-fill{background:#B42318}
.tag-green{margin-left:0;padding:4px 8px;border-radius:8px;background:var(--green-soft);color:var(--green);font-size:11px;font-weight:700;font-style:normal}
.promo{margin-top:12px}
.totals{margin-top:20px;padding:14px 16px;background:#fff;border:1.5px solid var(--line);border-radius:var(--r);font-size:14px;display:flex;flex-direction:column;gap:6px}
.totals div{display:flex;justify-content:space-between}
.totals span{color:var(--muted)}
.totals .total{border-top:1px solid var(--line);margin-top:4px;padding-top:10px;align-items:baseline}
.totals .total span{color:var(--ink);font-weight:700}
.totals .total b{font-family:var(--display);font-weight:600;font-size:20px}
.err{margin:12px 0 0;padding:12px 14px;border-radius:var(--r);background:var(--red-soft);color:var(--red);font-size:13px;font-weight:600}
.cta{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:58px;margin-top:16px;border-radius:18px;border:0;background:var(--accent);color:#fff;font-weight:700;font-size:16px;box-shadow:0 10px 24px rgba(240,40,95,.28)}
.cta:disabled{opacity:.6;box-shadow:none;cursor:wait}

/* track */
.track{padding-top:16px}
.track-hero{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;padding:6px 0 10px}
.track-hero p{margin:0;font-size:14px;line-height:1.5;color:var(--muted)}
.track-ico{width:76px;height:76px;border-radius:24px;background:var(--accent-soft);color:var(--accent);display:flex;align-items:center;justify-content:center}
.code-input{font-family:var(--display)!important;font-weight:600;font-size:20px!important;letter-spacing:1px;text-transform:uppercase;height:56px!important}
.track form small{display:block;margin-top:6px;font-size:12px}
.how{margin-top:22px;padding:16px;border-radius:var(--r);background:var(--light2);display:flex;flex-direction:column;gap:10px;font-size:13px;color:var(--muted);line-height:1.5}
.how b{color:var(--ink)}
.how div{display:flex;gap:10px}.how div span{font-weight:700;color:var(--ink)}

/* status */
.status{padding-top:28px}
.status-hero{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
.status-hero h1{margin:0;font-family:var(--display);font-weight:600;font-size:26px}
.status-hero p{margin:0;font-size:14px;line-height:1.5}
.status-ico{width:84px;height:84px;border-radius:28px;background:var(--choc);display:flex;align-items:center;justify-content:center}
.status-ico.is-cancel{background:var(--red)}
.code-box{margin-top:4px;display:flex;flex-direction:column;align-items:center;gap:2px;padding:12px 22px;border-radius:var(--r);background:var(--accent-soft);color:var(--accent-ink)}
.code-box small{font-size:11px;font-weight:700;letter-spacing:1px;text-transform:uppercase}
.code-box b{font-family:var(--display);font-weight:700;font-size:28px;letter-spacing:2px}
.code-box span{font-size:12px;font-weight:600}
.timeline{margin-top:26px;padding:18px 16px 6px;background:#fff;border:1.5px solid var(--line);border-radius:var(--r-lg)}
.tl{display:flex;gap:14px;align-items:flex-start}
.tl-rail{display:flex;flex-direction:column;align-items:center}
.dot{width:28px;height:28px;border-radius:14px;display:flex;align-items:center;justify-content:center;border:3px solid var(--line);background:#fff}
.line{width:3px;height:36px;background:var(--line)}
.tl.done .dot{background:var(--green);border-color:var(--green)}
.tl.done .line{background:var(--green)}
.tl.active .dot{background:var(--accent);border-color:var(--accent);box-shadow:0 0 0 6px rgba(240,40,95,.16)}
.tl.active .dot i{width:10px;height:10px;border-radius:5px;background:#fff}
.tl-body{display:flex;flex-direction:column;gap:2px;padding-top:4px;padding-bottom:8px}
.tl-body b{font-size:15px;font-weight:700}
.tl-body small{font-size:12px;color:var(--muted)}
.tl.todo .tl-body b,.tl.todo .tl-body small{color:var(--muted2);font-weight:600}
.tl.active .tl-body b{color:var(--accent)}
.summary{margin-top:14px;padding:14px 16px;background:#fff;border:1.5px solid var(--line);border-radius:var(--r-lg);display:flex;flex-direction:column;gap:8px;font-size:14px}
.summary div{display:flex;justify-content:space-between}
.summary .total{border-top:1px solid var(--line);padding-top:10px;align-items:baseline}
.summary .total b{font-family:var(--display);font-weight:600;font-size:18px}
.summary small{font-size:12px}
.actions{display:flex;gap:10px;margin-top:16px}
.btn-green,.btn-dark{flex:1;height:54px;border-radius:var(--r);display:flex;align-items:center;justify-content:center;gap:8px;font-weight:700;font-size:14px}
.btn-green{background:var(--green-soft);color:var(--green)}
.btn-dark{background:var(--ink);color:#fff}

/* toast */
.toast{position:fixed;left:50%;bottom:100px;transform:translateX(-50%);background:var(--ink);color:#fff;padding:10px 16px;border-radius:12px;font-size:13px;font-weight:600;z-index:30;opacity:0;transition:opacity .2s;pointer-events:none}
.toast.show{opacity:1}
