/* TAWA – màu lấy từ logo chính thức (Tawa1.svg): xanh rêu #164f37, vàng #f8c647, nền kem */
:root {
  --green: #164f37; --green-2: #1f6a4b; --green-soft: #e6efe9;
  --yellow: #f8c647; --yellow-soft: #fdf1cf;
  --cream: #fbf7ee; --card: #ffffff; --line: #ece5d6;
  --ink: #1d2420; --muted: #6b726d; --danger: #c0392b; --ok: #1f7a4d;
  --radius: 14px; --shadow: 0 2px 10px rgba(22, 79, 55, .08);
  font-family: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: #efe9dc; color: var(--ink); }
body { font-size: 15px; line-height: 1.4; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
img { display: block; }
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--cream); position: relative; padding-bottom: 96px; }

/* ---------- Header ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--green); color: #fff; display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.topbar .logo { height: 30px; }
.topbar .title { font-weight: 700; font-size: 16px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { background: rgba(255,255,255,.14); border: 0; color: #fff; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; }
.icon-btn.dark { background: #fff; color: var(--green); box-shadow: var(--shadow); }

/* ---------- Home ---------- */
.hero { background: var(--green); color: #fff; padding: 6px 16px 20px; border-radius: 0 0 22px 22px; }
.hero h1 { font-size: 20px; margin: 6px 0 12px; font-weight: 800; }
.hero h1 em { color: var(--yellow); font-style: normal; }
.seg { display: flex; background: rgba(255,255,255,.14); border-radius: 999px; padding: 4px; }
.seg button { flex: 1; border: 0; background: transparent; color: #fff; padding: 9px 6px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.seg button.on { background: var(--yellow); color: var(--green); }
.seg.light { background: var(--green-soft); }
.seg.light button { color: var(--green); }
.addr-box { margin-top: 12px; background: #fff; color: var(--ink); border-radius: 12px; padding: 10px 12px; display: flex; gap: 8px; align-items: center; }
.addr-box input { border: 0; outline: 0; flex: 1; font-size: 15px; background: transparent; }
.section { padding: 16px; }
.section h2 { font-size: 17px; margin: 0 0 10px; }
.banner { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.reorder { background: var(--yellow-soft); border: 1px solid #f3dc97; border-radius: var(--radius); padding: 12px; display: flex; gap: 12px; align-items: center; }
.reorder img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.reorder .grow { flex: 1; min-width: 0; }
.reorder .small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; display: flex; gap: 12px; align-items: center; margin-bottom: 10px; border: 0; width: 100%; text-align: left; color: inherit; }
.store-card .pin { width: 44px; height: 44px; border-radius: 12px; background: var(--green-soft); display: grid; place-items: center; font-size: 20px; flex: none; }
.store-card.off { opacity: .55; }
.store-card .name { font-weight: 700; }
.store-card .addr { font-size: 13px; color: var(--muted); }

/* ---------- Badges / tags ---------- */
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); }
.badge.y { background: var(--yellow); color: var(--green); }
.badge.grey { background: #eee; color: #777; }
.assume { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .2px; color: #8a5a00; background: #fff4d6; border: 1px dashed #e0b44a; padding: 1px 6px; border-radius: 6px; vertical-align: middle; }
.note-box { font-size: 12.5px; color: #6d5a2a; background: #fff8e4; border: 1px dashed #e7c66d; border-radius: 10px; padding: 8px 10px; margin-top: 8px; }

/* ---------- Store / menu ---------- */
.store-hero { position: relative; }
.store-hero img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: contain; background: var(--cream); } /* banner 1200x400: hiện đủ, không cắt */
/* Nút "Đơn của tôi" trên banner: chữ rõ + icon nét, nền trắng đặc để đọc được trên ảnh; vùng chạm 44px (khung ngoài), viên thuốc 36px bên trong; nằm góc phải, không che chữ TAWA bên trái */
/* Dòng Hotline ở ô thông tin quán (trang đơn): cả dòng là liên kết gọi, cao tối thiểu 44px (QA-010) */
.kv.tel-row { min-height: 44px; align-items: center; margin-top: 6px; color: inherit; text-decoration: none; }
.kv.tel-row b { color: var(--green); }
.mode-one { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--green); background: var(--green-soft); border-radius: 999px; padding: 6px 12px; display: inline-block; }
/* Món / tuỳ chọn quán đang tắt (hết món) */
.item.off .pic img { filter: grayscale(1); opacity: .55; }
.item.off .name, .item.off .price { color: var(--muted); }
.soldout { font-size: 12.5px; font-weight: 700; color: #8a6d1c; background: #f4eee0; border-radius: 999px; padding: 6px 12px; margin-right: 7px; white-space: nowrap; }
.opt.off { opacity: .5; }
.opt.off b { color: #8a6d1c; }
.store-info { background: var(--card); margin: 10px 14px 0; position: relative; border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 12px 12px; }
.store-info h1 { font-size: 18px; margin: 0 0 2px; line-height: 1.25; }
.store-info .meta { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 10px; }
.store-info .addr1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.store-info #mode { margin-top: 8px; }
.search { margin: 10px 14px 0; background: #fff; border-radius: 12px; border: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding: 9px 12px; }
.search input { border: 0; outline: 0; flex: 1; background: transparent; }
.menu-head { position: sticky; top: 0; z-index: 20; background: var(--cream); margin-top: 6px; border-bottom: 1px solid var(--line); transition: box-shadow .15s; }
.menu-head.stuck { box-shadow: 0 4px 10px rgba(22, 79, 55, .10); }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 6px 14px; scrollbar-width: none; overscroll-behavior-x: contain; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; min-height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 0 14px; font-weight: 600; color: var(--muted); }
.tabs button.on { background: var(--green); border-color: var(--green); color: #fff; }
.cat { padding: 2px 14px 4px; scroll-margin-top: 60px; }
.cat h3 { font-size: 17px; margin: 14px 0 2px; }
.cat .sub { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
/* Dòng món kiểu food app: ảnh vuông bên trái, chữ bên phải, giá + nút ở cuối cột chữ */
.item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; align-items: stretch; }
.item .pic { flex: none; width: 100px; }
.item .pic img { width: 100px; height: 100px; object-fit: contain; border-radius: 12px; background: var(--cream); } /* thấy trọn món kể cả ảnh không vuông */
.item .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item .name { font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .zh { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .badge { align-self: flex-start; margin-top: 3px; }
.item .desc { font-size: 12.5px; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; }
.item .save { font-size: 12px; color: var(--ok); font-weight: 600; margin-top: 3px; }
.item .buy { margin-top: auto; padding-top: 4px; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.item .price { font-weight: 800; color: var(--green); font-size: 15.5px; white-space: nowrap; }
.item .ctl { flex: none; display: flex; margin-right: -7px; } /* bù khoảng đệm của vùng bấm 44px để vòng tròn thẳng mép phải */
/* Vùng bấm 44×44px, vòng tròn nhìn thấy 30px */
.add, .ictl button { width: 44px; height: 44px; border: 0; padding: 0; background: transparent; display: grid; place-items: center; }
.add i, .ictl button i { font-style: normal; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; line-height: 1; font-weight: 700; }
.add i, .ictl [data-plus] i { background: var(--green); color: #fff; }
.ictl [data-minus] i { background: #fff; color: var(--green); border: 1.5px solid var(--green); }
.ictl { display: flex; align-items: center; }
.ictl b { min-width: 22px; text-align: center; font-size: 15px; }
.add:focus-visible i, .ictl button:focus-visible i { outline: 2px solid var(--yellow); outline-offset: 2px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* ---------- Bottom sheet ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: var(--cream); width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; border-radius: 20px 20px 0 0; animation: up .2s ease-out; padding-bottom: 90px; }
.sheet .pic { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; max-height: 55vh; object-fit: contain; background: var(--cream) center / contain no-repeat; } /* popup: hiện ĐỦ ảnh; giữ sẵn khung vuông + ảnh nhỏ làm nền trong lúc ảnh lớn đang tải */
.sheet .body { padding: 14px 16px; }
.sheet h2 { margin: 0; font-size: 20px; }
.sheet { position: relative; overscroll-behavior: contain; }
/* Thanh trên cùng dính đỉnh khung cuộn, cao 0: nút X và thanh kéo luôn nằm trên ảnh dù cuộn tới đâu */
.sheet .sheet-top { position: sticky; top: 0; height: 0; z-index: 5; }
.sheet .grab { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 120px; height: 28px; display: grid; place-items: center; touch-action: none; }
.sheet .grab::before { content: ""; width: 44px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.95); box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.sheet .close { position: absolute; top: 10px; right: 10px; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.96); color: var(--ink, #222); font-size: 22px; font-weight: 700; box-shadow: 0 2px 10px rgba(0,0,0,.28); border: 1px solid rgba(0,0,0,.06); display: grid; place-items: center; }
.sheet .close::after { content: ""; position: absolute; inset: -6px; } /* vùng chạm rộng thêm */
.sheet.dragging { transition: none; }
.sheet.snap { transition: transform .18s ease-out; }
.group { background: #fff; border-radius: var(--radius); padding: 12px 14px; margin-top: 12px; }
.group .gh { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; margin-bottom: 6px; }
.group .gh small { font-weight: 500; color: var(--muted); }
.opt { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.opt:first-of-type { border-top: 0; }
.opt input { width: 20px; height: 20px; accent-color: var(--green); }
.opt span { flex: 1; }
textarea, .field input, .field select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; outline-color: var(--green); }
textarea { resize: vertical; min-height: 60px; }
.sheet-foot { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; border-top: 1px solid var(--line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 12px; align-items: center; z-index: 60; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--green); background: #fff; color: var(--green); font-size: 18px; line-height: 1; }
.stepper b { min-width: 18px; text-align: center; }
.btn { border: 0; border-radius: 12px; padding: 13px 16px; font-weight: 700; background: var(--green); color: #fff; }
.btn.block { width: 100%; }
.btn.y { background: var(--yellow); color: var(--green); }
.btn.ghost { background: #fff; color: var(--green); border: 1px solid var(--green); }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid #e8b4ad; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.grow { flex: 1; }

/* ---------- Cart bar ---------- */
.cartbar { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); width: calc(100% - 24px); max-width: 456px; z-index: 40; background: var(--green); color: #fff; border: 0; border-radius: 14px; padding: 12px 16px; display: flex; align-items: center; gap: 10px; box-shadow: 0 6px 18px rgba(22,79,55,.35); }
.cartbar .count { background: var(--yellow); color: var(--green); font-weight: 800; border-radius: 8px; padding: 2px 8px; }
.cartbar .lbl { flex: 1; text-align: left; font-weight: 700; }
.cartbar .sum { font-weight: 800; }

/* ---------- Checkout ---------- */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin: 12px 14px; }
.card h3 { margin: 0 0 10px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.err { color: var(--danger); font-size: 13px; margin-top: 4px; }
.line { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.line:first-of-type { border-top: 0; }
.line img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; }
.line .opts { font-size: 12.5px; color: var(--muted); }
.line .edit { font-size: 12.5px; color: var(--green-2); font-weight: 600; background: none; border: 0; padding: 0; }
.radio-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.radio-row:first-of-type { border-top: 0; }
.radio-row input { width: 20px; height: 20px; accent-color: var(--green); }
.radio-row .grow small { display: block; color: var(--muted); font-size: 12.5px; }
.sumrow { display: flex; justify-content: space-between; padding: 4px 0; }
.sumrow.total { font-weight: 800; font-size: 17px; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.upsell { display: flex; gap: 10px; align-items: center; background: var(--green-soft); border-radius: 12px; padding: 10px; }
.upsell img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.switch input { width: 44px; height: 24px; accent-color: var(--green); }

/* ---------- Tracking ---------- */
.track-head { background: var(--green); color: #fff; padding: 18px 16px 26px; border-radius: 0 0 22px 22px; }
.track-head .code { opacity: .8; font-size: 13px; }
.track-head h1 { margin: 4px 0 2px; font-size: 22px; }
.track-head .eta { color: var(--yellow); font-weight: 700; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 32px; color: var(--muted); }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: -2px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li .dot { position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.timeline li.done { color: var(--ink); }
.timeline li.done .dot { background: var(--green); border-color: var(--green); }
.timeline li.done::before { background: var(--green); }
.timeline li.cur .dot { background: var(--yellow); border-color: var(--green); box-shadow: 0 0 0 4px rgba(248,198,71,.35); }
.timeline li.cur b { color: var(--green); }
.timeline time { font-size: 12px; color: var(--muted); margin-left: 6px; }

/* ---------- QR ---------- */
.qr { width: 220px; height: 220px; margin: 8px auto; border: 2px dashed #c9bfa6; border-radius: 12px; display: grid; place-items: center; text-align: center; color: #8a7a55; background: repeating-linear-gradient(45deg, #faf6ea, #faf6ea 10px, #f3ecda 10px, #f3ecda 20px); font-weight: 700; padding: 12px; }
.kv { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--line); }
.kv:first-of-type { border-top: 0; }
.copy { background: var(--green-soft); color: var(--green); border: 0; border-radius: 8px; padding: 3px 8px; font-size: 12px; font-weight: 700; margin-left: 6px; }

/* ---------- Rating ---------- */
.stars { display: flex; justify-content: center; gap: 8px; font-size: 38px; margin: 8px 0; }
.stars button { background: none; border: 0; color: #d9d2c0; padding: 0; font-size: 38px; line-height: 1; }
.stars button.on { color: var(--yellow); text-shadow: 0 1px 0 #c99a1a; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px; color: var(--ink); }
.chips button.on { background: var(--green-soft); border-color: var(--green); color: var(--green); font-weight: 600; }

/* ---------- Misc ---------- */
.toast { pointer-events: none;  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #222; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; font-size: 14px; max-width: 90%; animation: fade .15s; }
.demo-ribbon { background: var(--yellow); color: var(--green); font-size: 11.5px; font-weight: 700; text-align: center; padding: 4px 8px; }
.foot { text-align: center; font-size: 12px; color: var(--muted); padding: 18px 14px 8px; }
.foot a { color: var(--green-2); }
@keyframes up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Chuẩn chạm trên điện thoại (bổ sung 14/11): mọi vùng bấm ≥ 44px, không cuộn ngang ---------- */
/* Lỗi bắt được trên Redmi thật 14/11: overflow-x:hidden trên cả html+body biến body thành khung cuộn riêng,
   cộng overscroll-behavior:none thì vuốt ngón tay KHÔNG cuộn được trang. Dùng clip (không tạo khung cuộn), bỏ overscroll. */
html, body { overflow-x: clip; max-width: 100%; }
@supports not (overflow-x: clip) { html { overflow-x: hidden; } body { overflow-x: visible; } }
body { -webkit-text-size-adjust: 100%; }
.icon-btn { width: 44px; height: 44px; font-size: 22px; }
.seg button, .tabs button, .chips button { min-height: 44px; }
.stepper button { width: 44px; height: 44px; font-size: 20px; }
.btn { min-height: 48px; }
.copy { min-height: 36px; padding: 6px 12px; position: relative; }
.copy::after { content: ""; position: absolute; inset: -4px; }
.line .edit { min-height: 44px; padding: 0 12px 0 0; }
.opt, .radio-row { min-height: 48px; }
.store-card { min-height: 72px; }
.stars button { min-width: 48px; min-height: 48px; }
input, select, textarea { font-size: 16px !important; } /* tránh Chrome/Safari tự phóng to khi gõ */
.cartbar { min-height: 56px; bottom: calc(12px + env(safe-area-inset-bottom)); }
.app { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.sheet { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
@media (max-width: 360px) { .item .pic { width: 88px; } .item .pic img { width: 88px; height: 88px; } .item { gap: 10px; } .hero h1 { font-size: 18px; } }
@media (min-width: 720px) { body { padding: 16px 0; } .app { border-radius: 20px; box-shadow: 0 8px 30px rgba(0,0,0,.12); } }
.line .edit { min-width: 44px; text-align: left; }
.copy { min-height: 44px; min-width: 56px; }
label.switch { cursor: pointer; min-height: 48px; gap: 12px; }

/* ---------- Bổ sung sau bóc tách hành trình (14/11) ---------- */
.group .req { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #fdecea; color: var(--danger); }
.group .req.ok { background: var(--green-soft); color: var(--ok); }
.group .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.cart-store { font-size: 13px; color: var(--muted); margin: -4px 0 6px; }
.overlay.center { align-items: center; padding: 20px; z-index: 90; } /* phải nằm trên thanh nút cố định (z 60) */
.ask { background: #fff; border-radius: 16px; padding: 18px 16px 14px; width: 100%; max-width: 340px; box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: fade .15s; }
.ask .msg { font-weight: 700; font-size: 16px; text-align: center; margin-bottom: 14px; }
.ask .row { display: flex; gap: 10px; }
.ask .row .btn { flex: 1; }

/* QA-006: bàn phím ảo đang mở → ẩn hẳn thanh cố định đáy (không để bị che nửa chừng) */
html.kb-open .sheet-foot, html.kb-open .cartbar { display: none; }

/* Chuyển khoản VietQR thật: ảnh mã từ vietqr.app, giữ nguyên tỉ lệ, nền trắng để app ngân hàng quét được */
.qr-img { display: block; width: 260px; max-width: 100%; height: auto; aspect-ratio: 1; margin: 8px auto; border-radius: 12px; background: #fff; border: 1px solid #e6dcc2; object-fit: contain; }
.pay-wait { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin: 2px 0 8px; }
.pay-wait .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #d9cfb3; border-top-color: #8a5a00; animation: payspin 0.9s linear infinite; }
@keyframes payspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pay-wait .spin { animation: none; } }
/* Nhóm bắt buộc chưa chọn: bấm nút thì nhóm nổi lên (viền đỏ + rung nhẹ) */
.btn.need { opacity: .62; }
.group.attn { box-shadow: 0 0 0 2px var(--danger) inset; background: #fff6f5; animation: tw-shake .42s ease; }
.group.attn .req { background: var(--danger); color: #fff; }
@keyframes tw-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { .group.attn { animation: none; } }
.opt input[type=radio] { border-radius: 50%; }
/* Nút dạng liên kết (gọi quán, chỉ đường): ra khối, căn giữa, không gạch chân, không tràn ở khổ 360 */
a.btn { display: flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; box-sizing: border-box; max-width: 100%; }

/* Phí giao theo khoảng cách: chọn vị trí, bản đồ kéo ghim */
.loc-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; background: #fff; }
.loc-box.need { border-color: #e7c66d; background: #fffaf0; }
.loc-now { font-size: 14px; line-height: 1.35; margin-bottom: 8px; overflow-wrap: anywhere; }
.loc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.loc-btns .btn { min-height: 44px; padding: 8px 6px; font-size: 14px; white-space: normal; line-height: 1.2; }
.loc-fee { margin-top: 8px; font-size: 14px; }
.loc-fee b { color: var(--green); }
.out-box { border: 1px solid #f0b4a8; background: #fff0ec; color: #8f2318; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; font-size: 14px; line-height: 1.4; }
.sumrow .free { color: var(--green); font-weight: 700; }
.free-hint { font-size: 12.5px; color: #8a5a00; margin: -2px 0 4px; text-align: right; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--green); font-weight: 700; text-decoration: underline; font-size: inherit; min-height: 0; }
.overlay.mapo { align-items: stretch; z-index: 95; }
.mapsheet { background: var(--cream); width: 100%; max-width: 480px; height: 100%; display: flex; flex-direction: column; animation: up .2s ease-out; }
.map-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; padding-top: calc(8px + env(safe-area-inset-top)); }
.map-top b { font-size: 17px; }
.map-x { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 20px; font-weight: 700; }
.map-search { display: flex; gap: 8px; padding: 0 12px 8px; }
.map-search input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font-size: 16px; background: #fff; }
.map-search .btn { min-height: 44px; padding: 0 16px; }
.map-res { max-height: 38vh; overflow-y: auto; margin: 0 12px 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.map-r { display: block; width: 100%; text-align: left; padding: 11px 12px; border: 0; border-top: 1px solid var(--line); background: none; font-size: 14px; line-height: 1.35; min-height: 44px; }
.map-r:first-child { border-top: 0; }
.map-r.muted { color: var(--muted); }
.map-box { position: relative; flex: 1; min-height: 200px; }
#lmap { position: absolute; inset: 0; }
.map-load { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.map-foot { background: #fff; border-top: 1px solid var(--line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
.map-label { font-size: 13.5px; line-height: 1.35; margin-bottom: 8px; overflow-wrap: anywhere; }
.pin-me span { display: block; width: 30px; height: 30px; margin: 0 auto; background: var(--green); border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.pin-store span { display: block; background: var(--yellow); color: var(--green); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; border-radius: 11px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }

/* ---- 15/11 đợt 2: gọi quán ở trang chủ, ô "Giao tới đâu?", mã đơn, Tìm đơn của bạn ---- */
.addr-field { position: relative; }
.addr-sug { margin-top: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.sug-r { display: flex; gap: 6px; align-items: flex-start; width: 100%; min-height: 48px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; font: inherit; font-size: 14.5px; line-height: 1.35; color: inherit; cursor: pointer; }
.sug-r:last-child { border-bottom: 0; }
.sug-r:active, .sug-r:hover { background: var(--green-soft); }
.sug-r.muted { color: var(--muted); cursor: default; }
.sug-r.map { color: var(--green); font-weight: 600; align-items: center; }
.loc-box .loc-btns { margin-top: 8px; }
.code-card { text-align: center; }
.code-card .code-lbl { font-size: 13px; color: var(--muted); }
.big-code { font-size: 26px; font-weight: 800; letter-spacing: .5px; margin: 2px 0 6px; user-select: all; -webkit-user-select: all; }
.code-hint { font-size: 13px; color: var(--muted); line-height: 1.4; margin-bottom: 10px; }
.code-card .btn { min-height: 48px; }
.copy-box { margin-top: 8px; }
.copy-box input { width: 100%; border: 1px dashed var(--line); border-radius: 10px; padding: 10px; font-size: 13px; background: #fafafa; }
.lk-toggle { display: block; width: calc(100% - 28px); margin: 12px 14px 0; min-height: 48px; border: 1px dashed var(--line); border-radius: 12px; background: #fff; font: inherit; font-size: 15px; font-weight: 600; color: var(--green); cursor: pointer; }
.lookup .lk-hint { font-size: 13.5px; color: var(--muted); line-height: 1.45; margin-bottom: 10px; }
.lookup .btn { min-height: 48px; margin-top: 4px; }
.lookup .err { margin: 0 0 8px; }
.lk-top { margin: 12px 14px 0; }
.order-card .who { font-size: 13px; color: var(--muted); }

/* ---- 15/11: hàng nút dưới thông tin quán (Đặt đơn nhóm · Hẹn giờ giao · Chia sẻ) ---- */
.store-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.store-acts a { text-decoration: none; -webkit-tap-highlight-color: transparent; }
.store-acts button, .store-acts a { min-height: 58px; border: 1px solid var(--line); background: #fff; border-radius: 12px; color: var(--green); font-weight: 700; font-size: 12.5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 2px; line-height: 1.2; text-align: center; }
.store-acts > * > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-size: 13px; }
.store-acts .ic { position: relative; display: inline-flex; }
.store-acts .dot { position: absolute; top: -2px; right: -4px; width: 9px; height: 9px; border-radius: 50%; background: #d93025; box-shadow: 0 0 0 2px #fff; }
.store-acts .dot[hidden] { display: none; }
.store-acts a:focus-visible, .store-acts button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 1px; }
.store-acts button.on { background: var(--green-soft); border-color: var(--green); }
.store-acts button:active, .store-acts a:active { background: var(--green-soft); }
@media (max-width: 340px) { .store-acts { gap: 4px; } .store-acts button, .store-acts a { padding: 6px 1px; } .store-acts > * > span:last-child { font-size: 11px; letter-spacing: -0.1px; } }
.grp-banner { margin: 10px 14px 0; background: var(--yellow-soft); border: 1px solid #f3dc97; border-radius: 12px; padding: 10px 12px; font-size: 13.5px; color: var(--ink); }
.gb-acts { display: flex; gap: 18px; margin-top: 6px; align-items: center; }
.gb-acts a { color: var(--green); font-weight: 700; }
.gb-acts a, .gb-acts .linkbtn { min-height: 32px; display: inline-flex; align-items: center; }

/* ---- Ưu đãi hôm nay ---- */
.promos { margin: 14px 14px 0; }
.promos h3, .foryou h3 { margin: 0; font-size: 16px; }
.pr-row { display: flex; gap: 10px; overflow-x: auto; padding: 8px 0 4px; scrollbar-width: none; }
.pr-row::-webkit-scrollbar, .fy-row::-webkit-scrollbar { display: none; }
.pchip { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 700; color: #9a3b12; background: #fde9dc; border-radius: 6px; padding: 2px 6px; margin-top: 4px; }
.pchip.flash { color: #fff; background: #c2410c; }
.pchip .cd, .pr-until .cd { font-variant-numeric: tabular-nums; }
.price.promo { display: inline-flex; align-items: baseline; gap: 6px; }
.price.promo s { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.cartbar .sum s { font-weight: 500; opacity: .7; margin-right: 6px; font-size: 13px; }

/* ---- Dành cho bạn ---- */
.foryou { margin: 14px 0 0; }
.fy-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 0 14px; }
.fy-head .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.fy-again { flex: none; padding: 8px 12px; font-size: 13px; min-height: 40px; }
.fy-row { display: flex; gap: 10px; overflow-x: auto; padding: 8px 14px 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
.item.tile { flex: none; width: 140px; flex-direction: column; gap: 0; padding: 8px; border: 0; border-radius: 12px; background: #fff; box-shadow: var(--shadow); scroll-snap-align: start; }
.item.tile img { width: 124px; height: 124px; object-fit: contain; border-radius: 10px; background: var(--cream); }
.item.tile .name { font-size: 13.5px; margin-top: 6px; }
.item.tile .buy { margin-top: auto; }
.item.tile .price { font-size: 14px; }
.item.tile .price.promo { flex-direction: column; gap: 0; }

/* ---- Nhắc ưu đãi trên nút giỏ hàng ---- */
.promo-bar, .nprog { position: fixed; left: 50%; transform: translateX(-50%); width: calc(100% - 24px); max-width: 456px; z-index: 39; bottom: calc(76px + env(safe-area-inset-bottom)); border-radius: 12px; }
.promo-bar { background: var(--yellow-soft); border: 1px solid #f3dc97; color: var(--ink); font-size: 13px; padding: 8px 12px; text-align: center; }
.promo-bar.done { background: var(--green-soft); border-color: #bcd6c7; color: var(--green); }
.nprog { background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.18); padding: 10px 12px; z-index: 41; animation: fade .15s; }
.np-top { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.np-x { border: 0; background: none; font-size: 16px; color: var(--muted); min-width: 36px; min-height: 36px; }
.np-slots { display: flex; gap: 6px; margin: 4px 0 6px; flex-wrap: wrap; }
.np-slots span { width: 28px; height: 28px; border-radius: 50%; border: 1.5px dashed #c9c2b2; color: var(--muted); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.np-slots span.on { border: 0; background: var(--green); color: #fff; }
.np-txt { font-size: 13px; }
.nprog.done .np-txt { color: var(--green); }
html.kb-open .promo-bar, html.kb-open .nprog { display: none; }
.sumrow.disc span:last-child, .kv.disc span:last-child { color: var(--ok); font-weight: 700; }
.promo-hint { font-size: 13px; background: var(--yellow-soft); border-radius: 10px; padding: 8px 10px; margin: 6px 0; display: grid; gap: 4px; }

/* ---- Bảng nhỏ trượt từ đáy ---- */
.psheet { background: #fff; width: 100%; max-width: 480px; max-height: 86vh; display: flex; flex-direction: column; border-radius: 20px 20px 0 0; animation: up .2s ease-out; padding: 6px 16px calc(16px + env(safe-area-inset-bottom)); }
.ps-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; font-size: 16px; }
.ps-x { border: 0; background: none; font-size: 18px; min-width: 44px; min-height: 44px; color: var(--muted); }
.ps-body { overflow-y: auto; }
.ps-list { max-height: 46vh; overflow-y: auto; border-top: 1px solid var(--line); }
.ps-hint { font-size: 12.5px; color: var(--muted); margin: 8px 0; line-height: 1.4; }

/* ---- Trang đơn nhóm ---- */
.grp-head h3 { margin-bottom: 4px; }
.grp-st { font-size: 14px; }
.grp-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.grp-qr { width: 190px; height: 190px; margin: 4px auto 6px; background: #fff; }
.grp-qr svg { width: 100%; height: 100%; display: block; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.grp-unsaved { margin: 12px 14px; }
.gm { border-top: 1px solid var(--line); padding: 10px 0; }
.gm:first-of-type { border-top: 0; }
.gm.me { background: #fbfdfb; }
.gm-h { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.gm-l { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 3px 0 0 2px; }
.gm-l small { color: var(--muted); }
.gm-l.bad { color: var(--muted); text-decoration: line-through; }
.gm-l.bad small.err { text-decoration: none; display: inline; }
.gm-l.muted { color: var(--muted); }

/* ---------- Ưu đãi tự lấy (nhãn cạnh nút Tự đến lấy) & mã giảm giá ở giỏ hàng ---------- */
.mode-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 18px; vertical-align: 1px; white-space: nowrap; }
.seg button.on .mode-tag { background: var(--green); color: var(--yellow); }
.cp-row { display: flex; gap: 8px; }
.cp-row input { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; text-transform: uppercase; letter-spacing: .5px; background: #fff; }
.cp-row .btn { flex: none; }
.cp-on { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cp-code { font-weight: 800; letter-spacing: .5px; border: 1.5px dashed var(--green); color: var(--green); border-radius: 8px; padding: 4px 10px; background: var(--green-soft); }
.cp-st { font-size: 13px; color: #8a5a00; }
.cp-st.ok { color: var(--ok); font-weight: 700; }
.cp-on .linkbtn { min-height: 44px; }

/* Thẻ món ưu đãi: ảnh thật bên trái, chữ Hán rõ, điều khiển nằm dưới cột chữ. */
.deal-count { color: var(--muted); font-size: 13px; font-weight: 500; }
.pr-row { scroll-snap-type: x proximity; }
.item.deal-card { flex: 0 0 315px; max-width: calc(100vw - 48px); padding: 10px; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; scroll-snap-align: start; align-items: flex-start; }
.item.deal-card .pic, .item.deal-card .pic img { width: 104px; height: 104px; }
.item.deal-card .pic { flex: 0 0 104px; }
.item.deal-card .pic img { object-fit: contain; border-radius: 10px; }
.item.deal-card .txt { min-width: 0; flex: 1; }
.item.deal-card .name { font-size: 14px; line-height: 1.35; margin-top: 4px; }
.item.deal-card .zh { font-size: 14px; color: var(--ink); line-height: 1.4; white-space: normal; overflow: visible; }
.item.deal-card .pchip { margin-top: 0; }
.item.deal-card .price { font-size: 15px; flex-wrap: wrap; margin-top: 6px; }
.deal-controls { display: flex; justify-content: flex-end; margin-top: 6px; }
#store-hotline, #call-store { min-height: 44px; }

#receive-scheduled label { display: block; line-height: 1.5; }
#receive-scheduled select { display: block; width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: white; color: var(--ink); font: inherit; }
.schedule-confirm { margin-top: 8px; font-weight: 700; color: var(--green); }
/* Tự đến lấy trong giờ: Lấy ngay / Hẹn giờ đến lấy (15/11) — mỗi lựa chọn và ô chọn giờ cao ≥ 44px */
#receive-pick .radio-row { min-height: 48px; cursor: pointer; }
#receive-pick #receive-scheduled { margin: 2px 0 4px 30px; }
#receive-pick #receive-scheduled select { min-height: 48px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Nhãn trên góc ảnh món (15/11) ---------- */
/* Viên bo tròn nhỏ, chữ trắng đậm trên nền đặc, nằm góc trên-trái ảnh. Màu theo bảng TAWA (cam đậm đạt tương phản 4,5:1 với chữ trắng). */
.item .pic, .sheet-pic { position: relative; }
.item.tile .pic { width: 124px; flex: none; }
.ibadge { position: absolute; top: 4px; left: 4px; z-index: 2; max-width: calc(100% - 8px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 10px; line-height: 14px; font-weight: 800; letter-spacing: .1px; padding: 1px 6px; border-radius: 999px; color: #fff; background: #c9501a;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .92), 0 1px 3px rgba(0, 0, 0, .25); pointer-events: none; }
.ibadge.c-red { background: #b3261e; }
.ibadge.c-green { background: var(--green); }
.ibadge.c-yellow { background: var(--yellow); color: var(--green); }
.sheet-pic .ibadge { top: 12px; left: 12px; font-size: 12px; line-height: 16px; padding: 3px 10px; max-width: calc(100% - 90px); }
.item.off .ibadge, .sheet-pic.off .ibadge { filter: grayscale(1); opacity: .55; }
/* Hotline chân trang (15/11): chữ nhỏ như .foot, chỉ nới vùng bấm. */
.foot #foot-hotline { display: inline-block; padding: 6px 4px; font-weight: 600; text-decoration: none; }
