/* MiNa — customer pages */
.page-menu, .page-cart, .page-order { padding-bottom: 120px; }

/* ---------- Hero: an orange band whose bottom edge is a sip of milk tea ---------- */
.hero { position: relative; background: var(--orange); color: var(--cream); }
.hero-inner {
  position: relative; max-width: 920px; margin: 0 auto;
  padding: 28px 20px 18px; display: flex; align-items: flex-end; gap: 12px;
}
.hero-text { flex: 1; min-width: 0; }
.wordmark {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(4rem, 22vw, 6.5rem); line-height: .82; letter-spacing: -.02em;
  color: var(--cream);
  text-shadow: 0 4px 0 var(--red);
}
.hero-tagline { margin-top: 14px; font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--light); }
.hero-note { margin-top: 2px; font-weight: 600; color: rgb(255 245 230 / .85); }
.hero-cup {
  width: clamp(96px, 30vw, 150px); aspect-ratio: 1; flex-shrink: 0;
  transform: rotate(8deg) translateY(10px);
}
.hero-cup .cup-body, .hero-cup .cup-lid, .hero-cup .cup-straw { stroke: var(--cream); }
.hero-cup .cup-pearls { fill: var(--ink); }
.hero-wave { display: block; width: 100%; height: 22px; margin-top: -1px; fill: var(--cream); background: var(--orange); }
.my-order {
  position: absolute; top: 16px; right: 16px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--cream); color: var(--orange); font-weight: 800; font-size: .9rem; text-decoration: none;
}

/* ---------- Category pills ---------- */
.cat-nav { position: sticky; top: 0; z-index: 20; padding: 8px 0; background: rgb(255 245 230 / .94); backdrop-filter: blur(8px); }
.cat-track {
  max-width: 880px; margin: 0 16px; display: flex; gap: 6px; padding: 6px;
  overflow-x: auto; scrollbar-width: none; border-radius: 18px; background: var(--yellow);
}
@media (min-width: 912px) { .cat-track { margin: 0 auto; } }
.cat-track::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0; padding: 9px 16px; border-radius: 13px;
  font-family: var(--display); font-weight: 700; font-size: 1.02rem; text-decoration: none; white-space: nowrap;
  color: var(--ink); transition: background-color .2s, color .2s;
}
.cat-pill.is-active { background: #fff; color: var(--orange); box-shadow: 0 2px 6px rgb(58 38 23 / .12); }

/* ---------- Product list ---------- */
.menu { max-width: 920px; margin: 0 auto; padding: 0 16px; }
.menu-section { padding-top: 22px; scroll-margin-top: 76px; }
.section-title { margin: 0 4px 12px; font-size: 1.45rem; color: var(--red); }
.product-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 720px) { .product-list { grid-template-columns: 1fr 1fr; gap: 14px; } }
.product {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 10px;
  border: 0; border-radius: 20px; background: #fff; text-align: left;
  box-shadow: 0 1px 0 var(--line), 0 0 0 1px var(--line);
  transition: transform .1s, box-shadow .15s;
}
.product:hover { box-shadow: 0 0 0 2px var(--light); }
.product:active { transform: scale(.985); }
.product-art { width: 84px; height: 84px; flex-shrink: 0; }
.product-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.product-name { font-weight: 800; line-height: 1.3; }
.product-desc { font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { margin-top: 2px; font-family: var(--display); font-weight: 800; font-size: 1.35rem; line-height: 1.1; color: var(--orange); }
.product-add {
  width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 50%; background: var(--orange); color: #fff; font-size: 1.7rem; font-weight: 800; line-height: 1;
  box-shadow: 0 4px 10px -3px rgb(255 106 0 / .6);
}
.menu-foot { margin: 36px 8px 0; text-align: center; color: var(--muted); font-size: .92rem; }

/* ---------- Floating cart bar ---------- */
.cart-bar {
  position: fixed; z-index: 30; left: 50%; bottom: var(--safe-bottom); transform: translateX(-50%);
  width: min(calc(100% - 32px), 528px); min-height: 62px;
  display: flex; align-items: center; gap: 12px; padding: 0 20px 0 12px;
  border-radius: 22px; background: var(--red); color: #fff; text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 1.15rem;
  box-shadow: 0 10px 24px -8px rgb(230 57 70 / .7);
}
.cart-bar-count {
  min-width: 38px; height: 38px; padding: 0 8px; display: grid; place-items: center;
  border-radius: 12px; background: var(--yellow); color: var(--ink); font-weight: 800;
}
.cart-bar-label { flex: 1; }
.cart-bar.is-bumped .cart-bar-count { animation: bump .35s ease-out; }
@keyframes bump { 40% { transform: scale(1.3) rotate(-6deg); } }

/* ---------- Product sheet ---------- */
.sheet {
  width: 100%; max-width: 520px; max-height: 92dvh; margin: auto auto 0; padding: 0;
  border: 0; border-radius: 28px 28px 0 0; background: #fff; color: var(--ink);
  overflow: hidden;
}
.sheet[open] { animation: sheet-up .24s cubic-bezier(.2, .9, .3, 1); }
.sheet::backdrop { background: rgb(58 38 23 / .45); }
@media (min-width: 640px) { .sheet { margin: auto; border-radius: 28px; } }
@keyframes sheet-up { from { transform: translateY(40%); opacity: .4; } }
.sheet-inner { display: flex; flex-direction: column; max-height: 92dvh; }
.sheet-scroll { overflow-y: auto; overscroll-behavior: contain; }
.sheet-close {
  position: absolute; z-index: 2; top: 12px; right: 12px; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: rgb(255 255 255 / .92); font-size: 1.6rem; line-height: 1;
  box-shadow: 0 1px 4px rgb(58 38 23 / .2);
}
.sheet-art .drink-art { width: 100%; height: 210px; border-radius: 0; }
.sheet-art .drink-art > .cup { width: 150px; height: 150px; }
.sheet-body { padding: 18px 20px 8px; display: grid; gap: 14px; }
.sheet-title { font-size: 1.6rem; }
.sheet-price { margin-top: -10px; font-family: var(--display); font-weight: 800; font-size: 1.5rem; color: var(--orange); }
.sheet-desc:empty { display: none; }
.toppings { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.toppings legend { padding: 0; margin-bottom: 8px; font-weight: 800; }
.topping {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px;
  border: 2px solid var(--cream); border-radius: var(--r-md); cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.topping:has(input:checked) { border-color: var(--orange); background: var(--cream); }
.topping input { width: 20px; height: 20px; accent-color: var(--orange); }
.topping-name { flex: 1; font-weight: 600; }
.topping-price { font-weight: 800; color: var(--orange); }
.sheet-foot {
  display: flex; gap: 12px; align-items: center; padding: 14px 20px var(--safe-bottom);
  border-top: 1px solid var(--cream); background: #fff;
}
.sheet-add { flex: 1; min-width: 0; white-space: normal; line-height: 1.15; padding: 6px 14px; }
.page-menu .toasts, .page-cart .toasts { top: auto; bottom: calc(var(--safe-bottom) + 76px); }

/* ---------- Shared card / topbar / empty ---------- */
.card { background: #fff; border-radius: var(--r-lg); box-shadow: 0 0 0 1px var(--line); }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  max-width: 560px; margin: 0 auto; padding: 14px 16px;
  background: rgb(255 245 230 / .94); backdrop-filter: blur(8px);
}
.topbar h1 { font-size: 1.6rem; }
.back {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: #fff; text-decoration: none; font-size: 1.8rem; line-height: 1; box-shadow: 0 0 0 1px var(--line);
}
.topbar-badge { margin-left: auto; padding: 4px 12px; border-radius: 999px; background: var(--yellow); font-weight: 800; }
.topbar-badge:empty { display: none; }
.empty { max-width: 420px; margin: 0 auto; padding: 80px 24px; display: grid; gap: 10px; justify-items: center; text-align: center; }
.empty-title { font-family: var(--display); font-weight: 700; font-size: 1.5rem; }
.empty .btn { margin-top: 12px; }

/* ---------- Cart ---------- */
.checkout { max-width: 560px; margin: 0 auto; padding: 0 16px; display: grid; gap: 14px; }
.notice { padding: 10px 14px; border-radius: var(--r-md); background: var(--light); font-weight: 700; }
.lines { list-style: none; margin: 0; padding: 4px 16px; }
.line { display: flex; gap: 12px; padding: 14px 0; }
.line + .line { border-top: 1px solid var(--cream); }
.line-art .drink-art { width: 64px; height: 64px; }
.line-main { flex: 1; min-width: 0; }
.line-head { display: flex; justify-content: space-between; gap: 10px; }
.line-name { font-weight: 800; line-height: 1.3; }
.line-total { font-weight: 800; white-space: nowrap; }
.line-extra { font-size: .9rem; }
.line-extra:empty { display: none; }
.line-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.cart-sum { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px; }
.cart-sum .sum { font-family: var(--display); font-size: 1.6rem; color: var(--orange); }
.link-strong { color: var(--orange); font-weight: 800; text-decoration: none; }
.form-card { padding: 20px; display: grid; gap: 16px; }
.form-card h2 { font-size: 1.3rem; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; border-radius: 18px; background: var(--cream); }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; }
.segmented span {
  display: grid; place-items: center; min-height: 46px; border-radius: 13px;
  font-weight: 800; cursor: pointer; transition: background-color .15s, color .15s;
}
.segmented input:checked + span { background: var(--orange); color: #fff; box-shadow: 0 3px 8px -3px rgb(255 106 0 / .6); }
.segmented input:focus-visible + span { box-shadow: var(--focus); }
.fineprint { text-align: center; color: var(--muted); font-size: .9rem; padding: 0 12px; }
.submit-bar {
  position: sticky; bottom: 0; margin: 0 -16px; padding: 16px 16px var(--safe-bottom);
  background: linear-gradient(to top, var(--cream) 70%, rgb(255 245 230 / 0));
}
.form-error { margin-bottom: 8px; padding: 8px 12px; border-radius: var(--r-sm); background: rgb(230 57 70 / .1); color: var(--red); font-weight: 700; text-align: center; }

/* ---------- Order: a queue ticket ---------- */
.order-top { max-width: 560px; margin: 0 auto; padding: 18px 20px 0; display: flex; align-items: center; justify-content: space-between; }
.mini-mark { font-family: var(--display); font-weight: 800; font-size: 1.8rem; color: var(--orange); text-decoration: none; text-shadow: 0 2px 0 var(--light); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 700; color: var(--muted); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.live.is-on { color: var(--green); }
.order-page { max-width: 560px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; }
[data-tracking] { display: grid; gap: 16px; }
.ticket {
  padding: 26px 22px 22px; text-align: center; border-radius: var(--r-lg);
  background: #fff; box-shadow: var(--shadow);
}
/* The tear-off stub: a dashed line with a notch cut on each side. */
.ticket-stub { position: relative; margin: 0 -22px; padding: 18px 22px 0; border-top: 2px dashed var(--line); }
.ticket-stub::before, .ticket-stub::after {
  content: ""; position: absolute; top: -14px; width: 26px; height: 26px; border-radius: 50%; background: var(--cream);
}
.ticket-stub::before { left: -13px; }
.ticket-stub::after { right: -13px; }
.placed-banner {
  padding: 12px 16px; border-radius: var(--r-md); background: var(--green); color: #fff;
  font-weight: 800; text-align: center; animation: toast-in .3s ease-out;
}
.ticket-label { color: var(--muted); font-weight: 600; }
.ticket-number {
  font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 13vw, 3.6rem); line-height: 1.05;
  color: var(--orange); letter-spacing: .01em;
}
.status-chip {
  display: inline-block; margin: 10px 0 22px; padding: 6px 18px; border-radius: 999px;
  font-family: var(--display); font-weight: 700; font-size: 1.1rem;
}
.ticket-hint { color: var(--ink-soft); font-weight: 600; }
.ticket.is-cancelled .ticket-number { color: var(--muted); text-decoration: line-through; }
.tone-new { background: var(--yellow); color: var(--ink); }
.tone-accepted { background: var(--light); color: var(--ink); }
.tone-preparing { background: var(--orange); color: #fff; }
.tone-ready { background: var(--green); color: #fff; }
.tone-delivering { background: var(--sky); color: #fff; }
.tone-done { background: var(--cream); color: var(--ink-soft); }
.tone-cancelled { background: var(--red); color: #fff; }
.is-updated .status-chip { animation: bump .45s ease-out; }

.steps { list-style: none; margin: 0; padding: 20px; display: grid; }
.step { position: relative; display: flex; align-items: center; gap: 14px; padding-bottom: 18px; }
.step:last-child { padding-bottom: 0; }
.step:not(:last-child)::after {
  content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--cream);
}
.step.is-done:not(.is-current)::after { background: var(--orange); }
.step-dot {
  position: relative; z-index: 1; width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 50%; background: var(--cream); color: var(--muted); font-weight: 800;
}
.step.is-done .step-dot { background: var(--orange); color: #fff; }
.step.is-current .step-dot { box-shadow: 0 0 0 5px rgb(255 106 0 / .2); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgb(255 106 0 / .08); } }
.step-label { flex: 1; color: var(--muted); }
.step.is-done .step-label { color: var(--ink); font-weight: 800; }
.step-time { color: var(--muted); font-size: .9rem; }

.receipt { padding: 20px; }
.receipt h2 { font-size: 1.25rem; margin-bottom: 6px; }
.receipt-lines { list-style: none; margin: 0; padding: 0; }
.receipt-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--cream); }
.receipt-lines li > p { font-weight: 700; white-space: nowrap; }
.receipt-name { font-weight: 800; }
.small { font-size: .9rem; }
.receipt-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; font-size: 1.05rem; }
.receipt-total strong { font-family: var(--display); font-size: 1.6rem; color: var(--orange); }
.receipt-meta { margin: 14px 0 0; display: grid; gap: 4px; font-size: .92rem; }
.receipt-meta div { display: flex; gap: 8px; }
.receipt-meta dt { min-width: 84px; color: var(--muted); }
.receipt-meta dd { margin: 0; font-weight: 700; }
