/* Bếp Chị Loan · Cơm Tấm Đêm Quy Nhơn. Màu theo tấm menu của quán: vàng nắng, đỏ son.
   Font thương hiệu DT Phudu (chủ quán gửi 2026-11-12) cho tiêu đề, giá, nút; chữ thường dùng Be Vietnam Pro. */
@font-face { font-family: "DT Phudu"; src: url("/brand/DTPhudu-Black.woff") format("woff"); font-weight: 800 900; font-display: swap; }
@font-face { font-family: "DT Phudu"; src: url("/brand/DTPhudu-Regular.woff") format("woff"); font-weight: 400 700; font-display: swap; }
:root {
  --display: "DT Phudu", "Be Vietnam Pro", system-ui, sans-serif;
  --red: #c8102e;
  --red-dark: #9b0c22;
  --yellow: #ffd23f;
  --yellow-soft: #fff1b8;
  --cream: #fffaf0;
  --card: #ffffff;
  --ink: #3a1a10;
  --muted: #7a5a48;
  --line: #f0dcc0;
  --ok: #1f8a4c;
  --radius: 18px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 16px/1.5 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { max-width: 100%; display: block; }
a { color: var(--red); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
/* biểu tượng vẽ tay trong icons.svg */
.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }
/* logo trắng của quán, tô màu bằng mask khi đặt trên nền sáng */
.mark { display: block; background: var(--red); -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
.mark.logo { --src: url("/brand/logo.png"); aspect-ratio: 468 / 600; }
.mark.wordmark { --src: url("/brand/wordmark.png"); aspect-ratio: 1000 / 358; }
/* DT Phudu là font chữ in hoa: dùng cho tiêu đề, nút, tên món; giá tiền giữ Be Vietnam Pro để "đ" không thành "Đ" */
h1, h2, h3, .btn, .memo, .cat-title, .status-big, .top .where strong, .add, .how li, .method b {
  font-family: var(--display);
}
h1, h2, .cat-title, .status-big, .top .where strong { font-weight: 900; }
.price, .amount, .bar .sum b { font-weight: 800; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* ---------- Intro ---------- */
.intro {
  min-height: 100svh;
  background:
    radial-gradient(120% 70% at 50% 0%, #fff6c9 0%, transparent 60%),
    linear-gradient(180deg, #ffe680 0%, var(--yellow) 45%, #ffc21a 100%);
  display: flex;
  flex-direction: column;
}
.intro .wrap { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 28px; padding-bottom: 28px; }
.intro .mark.logo { width: 118px; }
.title { margin: 18px 0 0; width: min(100%, 420px); }
.title .mark.wordmark { width: 100%; }
.tagline { margin: 18px 0 0; font: 800 19px/1.3 var(--display); color: var(--red-dark); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .7); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600;
  border: 1px solid rgba(155, 12, 34, .15);
}
.how { list-style: none; padding: 0; margin: 8px 0 26px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; max-width: 520px; }
.how li { background: rgba(255, 255, 255, .55); border-radius: 14px; padding: 10px 6px; font-size: 13px; font-weight: 600; }
.how .ic { display: block; width: 26px; height: 26px; margin: 2px auto 4px; color: var(--red); }
.chip .ic { color: var(--red); }
.how b { display: grid; place-items: center; width: 28px; height: 28px; margin: 0 auto 4px; border-radius: 50%; background: var(--red); color: #fff; font-size: 14px; }
.intro .cta { margin-top: auto; width: 100%; max-width: 420px; display: grid; gap: 10px; }
.last-order { background: rgba(255, 255, 255, .8); border-radius: 14px; padding: 10px 14px; font-size: 14px; margin-bottom: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 52px; padding: 12px 24px; border: 0; border-radius: 999px;
  background: var(--red); color: #fff; font-weight: 800; font-size: 17px; text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 16px rgba(155, 12, 34, .25);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { background: #d9b9b0; box-shadow: none; cursor: default; }
.btn.light { background: #fff; color: var(--red); box-shadow: none; border: 2px solid var(--red); }
.btn.small { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.linkish { background: none; border: 0; padding: 6px 0; color: var(--muted); text-decoration: underline; font-size: 14px; cursor: pointer; }

/* ---------- Step header ---------- */
.top {
  position: sticky; top: 0; z-index: 20; background: var(--red); color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
}
.top .wrap { display: flex; align-items: center; gap: 10px; min-height: 60px; }
.back {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15);
  color: #fff; cursor: pointer; flex: none; display: grid; place-items: center; text-decoration: none;
}
.back .ic { width: 22px; height: 22px; }
.top .brand { height: 40px; width: auto; flex: none; }
.top .where { flex: 1; min-width: 0; line-height: 1.2; }
/* logo + "Bước 1/4 · Chọn món" to gần gấp đôi (chủ quán đánh dấu khung, 2026-11-12) */
.top > .wrap:not(.progress) { min-height: 96px; gap: 12px; }
.top .wrap.progress { display: grid; min-height: 0; gap: 5px; }
.top .where small { display: block; opacity: .9; font-size: 20px; font-weight: 700; line-height: 1.1; }
/* line-height đủ cao để dấu chồng trên chữ hoa (Ể, Ấ…) không bị overflow:hidden cắt mất */
.top .where strong { display: block; font-size: 36px; line-height: 1.3; margin: -.12em 0 -.1em; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .brand { height: 72px; }
/* chữ "Cơm Tấm Đêm Quy Nhơn" bên phải thanh đỏ (chủ quán đánh dấu, 2026-11-12), hiện cả trên điện thoại:
   màn hẹp thì logo, chữ bước và logo chữ cùng thu nhỏ theo bề ngang để vừa một hàng */
/* cao bằng logo Bếp Chị Loan (chủ quán đánh dấu khung, 2026-11-12) */
.top .wordmark-top { height: 72px; width: auto; flex: none; margin-left: auto; }
.total-note { display: block; font-size: 12px; font-weight: 600; color: var(--muted); font-family: "Be Vietnam Pro", system-ui, sans-serif; }
@media (max-width: 559px) {
  .top > .wrap:not(.progress) { gap: 8px; min-height: 84px; padding: 0 12px; }
  .top .back { width: 34px; height: 34px; }
  .top .brand { height: clamp(40px, 12vw, 62px); }
  .top .where small { font-size: clamp(12px, 3.5vw, 18px); }
  .top .where strong { font-size: clamp(17px, 5.3vw, 30px); }
  .top .wordmark-top { height: clamp(40px, 12vw, 62px); }
}
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding-bottom: 10px; }
.progress span { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .3); }
.progress span.on { background: var(--yellow); }

/* ---------- Steps ---------- */
/* chỉ đặt lề trên/dưới: "padding: 18px 0 …" từng xóa lề 16px hai bên của .wrap, chữ dính sát mép điện thoại */
.step { padding-top: 18px; padding-bottom: 140px; }
.step h1 { font-size: 24px; margin: 0 0 4px; }
.step h2 { font-size: 19px; margin: 26px 0 10px; }
.lead { margin: 0 0 14px; color: var(--muted); }

.cats {
  position: sticky; top: var(--top-h, 111px); z-index: 10; /* --top-h: chiều cao thanh đỏ, đo bằng JS */ display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 16px; margin: 0 -16px; background: var(--cream); scrollbar-width: none;
}
.cats a {
  flex: none; padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px;
}
.cats a.on { background: var(--yellow); border-color: var(--yellow); }
.cat-title { display: inline-block; margin: 22px 0 12px; padding: 4px 16px; border-radius: 0 14px 14px 0; background: var(--yellow); color: var(--red); font-size: 20px; font-weight: 900; border-left: 5px solid var(--red); scroll-margin-top: calc(var(--top-h, 111px) + 64px); }

.dishes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 560px) { .dishes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dish {
  position: relative; background: var(--card); border-radius: var(--radius); padding: 12px; text-align: center;
  border: 2px solid transparent; box-shadow: 0 2px 10px rgba(58, 26, 16, .06); display: flex; flex-direction: column;
}
.dish.picked { border-color: var(--red); }
.dish .pic { width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: var(--yellow-soft); }
/* ảnh đĩa đã tách nền (webp trong suốt): đĩa "nằm" trên thẻ, bóng mờ tối nhẹ phía dưới */
.dish .pic.plate {
  background: none; border-radius: 0; width: 92%; margin: 2px auto 6px;
  filter: drop-shadow(0 6px 6px rgba(40, 10, 5, .30)) drop-shadow(0 1px 2px rgba(40, 10, 5, .18)); /* bóng gọn, ít mờ (chủ quán 2026-11-13) */
}
.dish .nopic { display: grid; place-items: center; color: var(--red); }
.dish .nopic .ic { width: 42%; height: 42%; stroke-width: 1.4; }
.dish h3 { margin: 10px 0 2px; font-size: 15px; line-height: 1.3; }
.dish .price { color: var(--red); font-weight: 800; }
.dish .desc { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.dish .act { margin-top: auto; padding-top: 10px; }
.dish .badge {
  position: absolute; top: 8px; right: 8px; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px;
  background: var(--red); color: #fff; font-weight: 800; font-size: 14px; display: grid; place-items: center;
}
.add { width: 100%; min-height: 40px; border-radius: 999px; border: 2px solid var(--red); background: #fff; color: var(--red); font-weight: 800; cursor: pointer; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.stepper button {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--yellow); color: var(--red-dark);
  cursor: pointer; display: grid; place-items: center;
}
.stepper button .ic { width: 20px; height: 20px; stroke-width: 2.6; }
.stepper button:disabled { opacity: .4; }
.stepper output { font-weight: 800; font-size: 17px; min-width: 24px; }
/* ghi chú riêng từng món */
.note-btn {
  display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 8px; padding: 7px 10px;
  border: 1.5px dashed var(--line); border-radius: 12px; background: #fff; color: var(--muted);
  font-size: 13px; font-weight: 600; text-align: left; cursor: pointer;
}
.note-btn .ic { width: 16px; height: 16px; flex: none; }
.note-btn span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.note-btn.has { border-style: solid; border-color: var(--yellow); background: var(--yellow-soft); color: var(--ink); }
.note-line { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0 0; font-size: 12px; color: var(--muted); text-align: left; }
.note-line .ic, .line-note .ic { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.line-note { display: flex; gap: 5px; margin-top: 3px; font-size: 13px; color: var(--muted); }
.opt-note { padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.opt-note .note-btn { margin-top: 0; }
#noteSheet textarea { margin-bottom: 4px; }
.soldout { opacity: .5; }

/* bottom bar */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff;
  border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(58, 26, 16, .08);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
}
.bar .wrap { display: flex; align-items: center; gap: 12px; }
.bar .sum { flex: 1; min-width: 0; line-height: 1.25; }
.bar .sum small { color: var(--muted); font-size: 13px; }
.bar .sum b { display: block; font-size: 20px; color: var(--red); }

/* forms */
label.f { display: block; margin: 14px 0 6px; font-weight: 700; font-size: 15px; }
input.f, textarea.f {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 14px;
  font: inherit; background: #fff; color: var(--ink);
}
input.f:focus, textarea.f:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(200, 16, 46, .12); }
textarea.f { min-height: 80px; resize: vertical; }
.methods { display: grid; gap: 10px; }
.method {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius);
  background: #fff; border: 2px solid var(--line); cursor: pointer;
}
.method input { position: absolute; opacity: 0; pointer-events: none; }
.method { position: relative; align-items: center; }
.method .mi { width: 46px; height: 46px; border-radius: 14px; background: var(--yellow-soft); color: var(--red); display: grid; place-items: center; flex: none; }
.method .mi .ic { width: 26px; height: 26px; }
.method .tick { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: #fff; flex: none; }
.method .tick .ic { width: 15px; height: 15px; stroke-width: 3; }
.method:has(input:checked) .tick { background: var(--red); border-color: var(--red); }
.method:has(input:checked) .mi { background: var(--red); color: #fff; }
.method:has(input:focus-visible) { outline: 3px solid rgba(200, 16, 46, .35); outline-offset: 2px; }
.method b { display: block; }
.method span { font-size: 14px; color: var(--muted); }
.method:has(input:checked) { border-color: var(--red); background: #fff7f2; }
.card { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: 0 2px 10px rgba(58, 26, 16, .06); }
.locate { margin-top: 12px; }
.hint { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
#map { height: 280px; border-radius: 14px; margin-top: 10px; overflow: hidden; border: 1px solid var(--line); }
.ship { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--yellow-soft); font-weight: 700; }
.error { color: #b3001b; font-weight: 700; min-height: 1.4em; margin: 10px 0 0; }
.hp { position: absolute; left: -9999px; }

/* review */
.lines { width: 100%; border-collapse: collapse; }
.lines td { padding: 8px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.lines td:last-child { text-align: right; white-space: nowrap; font-weight: 700; }
.lines tr.total td { border: 0; font-size: 19px; font-weight: 900; color: var(--red); padding-top: 12px; }
.note { font-size: 14px; color: var(--muted); }

/* option sheet */
dialog.sheet {
  width: 100%; max-width: 520px; margin: auto auto 0; border: 0; border-radius: 22px 22px 0 0;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); background: #fff; color: var(--ink);
}
@media (min-width: 560px) { dialog.sheet { margin: auto; border-radius: 22px; } }
dialog.sheet::backdrop { background: rgba(30, 10, 5, .45); }
.sheet h3 { margin: 0 0 12px; font-size: 19px; }
/* popup quán đang đóng cửa */
dialog.closed-sheet { text-align: center; margin: auto; border-radius: 22px; max-width: min(420px, calc(100% - 32px)); padding: 24px 18px 18px; }
dialog.closed-sheet::backdrop { background: rgba(60, 0, 10, .72); }
.closed-ic { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; background: var(--yellow); color: var(--red); display: grid; place-items: center; }
.closed-ic .ic { width: 34px; height: 34px; }
.closed-sheet h3 { color: var(--red); font-size: 24px; margin-bottom: 6px; }
.closed-when { margin: 0 0 6px; font-weight: 800; font-size: 17px; }
.closed-sheet .note { margin: 4px 0; }
.closed-sheet .copy-row { margin-top: 16px; }
.btn.off { background: #8a8a8a; box-shadow: none; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.opt:last-of-type { border: 0; }
.opt b { color: var(--red); }

/* order page */
.status-big { font-size: 22px; font-weight: 900; margin: 0 0 12px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: center; color: var(--muted); }
.steps li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--ok); border-color: var(--ok); }
.steps li.now { color: var(--ink); font-weight: 800; }
.steps li.now::before { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 4px rgba(200, 16, 46, .15); }
.pay { text-align: center; }
.pay .qr { width: 100%; max-width: 280px; margin: 8px auto; border-radius: 16px; border: 1px solid var(--line); overflow: hidden; background: #fff; }
.pay .qr svg { display: block; width: 100%; height: auto; }
#orderQr { aspect-ratio: 1; }
.amount { font-size: 30px; font-weight: 900; color: var(--red); margin: 4px 0; }
.memo { display: inline-block; font-size: 24px; font-weight: 900; letter-spacing: .06em; color: var(--red); background: var(--yellow-soft); padding: 4px 14px; border-radius: 10px; }
.pay ol { text-align: left; padding-left: 20px; margin: 12px 0; }
.pay ol li { margin: 6px 0; }
.cancelled { color: #b3001b; }
.copy-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }

/* ===== Màu chủ đạo: đỏ (chủ quán chọn 2026-11-12, giống thanh đỏ các bước) =====
   Nền trang đỏ; thẻ món, ô nhập, thẻ thông tin giữ nền trắng để dễ đọc; điểm nhấn vàng. */
body { background: var(--red); }
.intro {
  background:
    radial-gradient(90% 55% at 50% 0%, rgba(255, 210, 63, .28) 0%, transparent 65%),
    linear-gradient(180deg, #d31634 0%, var(--red) 55%, var(--red-dark) 100%);
  color: #fff;
}
.intro .mark { background: #fff; }
.intro .tagline { color: var(--yellow); }
.intro .chip { background: #fff; border-color: transparent; color: var(--ink); }
.intro .how li { background: rgba(255, 255, 255, .12); color: #fff; }
.intro .how .ic { color: var(--yellow); }
.intro .btn { background: var(--yellow); color: var(--red-dark); box-shadow: 0 8px 20px rgba(0, 0, 0, .22); }
.intro .btn.light { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .85); box-shadow: none; }
.intro .last-order { background: rgba(255, 255, 255, .14); color: #fff; }
.intro .last-order a { color: var(--yellow); }

.top { box-shadow: 0 1px 0 rgba(255, 255, 255, .14), 0 6px 18px rgba(0, 0, 0, .18); }
.step, .step h1, .step > h2, .step .lead, label.f, .hint { color: #fff; }
.step .lead { opacity: .92; }
.step .lead b { color: var(--yellow); }
.hint { opacity: .92; }
.error { color: var(--yellow); }
.linkish { color: rgba(255, 255, 255, .85); }
.card .linkish { color: var(--muted); }
.cats { background: var(--red); }
.cats a { background: rgba(255, 255, 255, .14); border-color: transparent; color: #fff; }
.cats a.on { background: var(--yellow); color: var(--red-dark); }
.cat-title { border-left-color: #fff; }
.dish { box-shadow: 0 6px 18px rgba(0, 0, 0, .14); }
.dish.picked { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow), 0 6px 18px rgba(0, 0, 0, .14); }
.dish .badge { background: var(--yellow); color: var(--red-dark); }
.card, .method, .dish, .sheet { color: var(--ink); }
.method { border-color: transparent; }
.method:has(input:checked) { border-color: var(--yellow); background: #fff; box-shadow: 0 0 0 2px var(--yellow); }
.card .note { color: var(--muted); }
.step .btn.light { border-color: #fff; }
.step .card .btn.light { border-color: var(--red); }
#addressBox h2, #v-xac-nhan > h2 { color: #fff; }
