/* ═══════════════════════════ ImTip · อิ่มทิพย์ ═══════════════════════════ */

:root {
  --orange:      #F58220;
  --orange-deep: #E06A0E;
  --orange-soft: #FFB35C;
  --cream:       #FFF6E9;
  --cream-2:     #FFEFD8;
  --peach:       #FFE3BC;
  --card:        #FFFDF8;
  --ink:         #5C3318;
  --ink-soft:    #9A6B42;
  --line:        #F2DBB8;
  --green:       #5FA053;
  --red:         #F0716B;
  --night-1:     #2C2347;
  --night-2:     #4A3A6B;
  --shadow:      0 6px 18px rgba(180, 110, 40, .14);
  --shadow-big:  0 14px 34px rgba(180, 110, 40, .22);
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  --nav-h: 68px;
  --ride-dur: 24s;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: 'Mitr', sans-serif;
  font-weight: 300;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 20%, #FFE9CB 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, #FFDDB5 0%, transparent 45%),
    linear-gradient(160deg, #F8E3C2, #F2CFA0);
  display: flex; justify-content: center; align-items: center;
  overflow: hidden;
}

button { font-family: inherit; color: inherit; border: none; background: none; cursor: pointer; }
input  { font-family: inherit; color: inherit; }

/* ── phone frame ─────────────────────────────────────────── */
.phone {
  position: relative;
  width: 100%; max-width: 430px;
  height: 100dvh; max-height: 100dvh;
  background: var(--cream);
  overflow: hidden;
  box-shadow: var(--shadow-big);
}
@media (min-width: 480px) and (min-height: 760px) {
  .phone {
    height: min(92dvh, 900px);
    border-radius: 38px;
    border: 10px solid #3D2417;
  }
}

/* ── screens & transitions ───────────────────────────────── */
.screen {
  position: absolute; inset: 0;
  display: none;
  background: var(--cream);
}
.screen.is-active { display: block; animation: screenIn .42s cubic-bezier(.22,.9,.3,1) both; }
@keyframes screenIn {
  from { opacity: 0; transform: translateX(26px); }
  to   { opacity: 1; transform: none; }
}
.scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 18px calc(var(--nav-h) + 26px);
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }

/* staggered reveal */
.reveal { animation: rise .5s cubic-bezier(.22,.9,.3,1) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

/* ── shared bits ─────────────────────────────────────────── */
.page-head {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 4px 2px 18px;
}
.page-head > div { flex: 1; }
.page-title {
  font-family: 'Mali', cursive; font-weight: 700;
  font-size: 1.45rem; line-height: 1.25; color: var(--ink);
}
.title-ic { font-size: 1.1rem; }
.page-sub { font-size: .85rem; color: var(--ink-soft); margin-top: 2px; }

.icon-btn {
  width: 40px; height: 40px; flex: none;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 1.25rem; line-height: 1;
  display: grid; place-items: center;
  color: var(--ink-soft);
  transition: transform .15s;
}
.icon-btn:active { transform: scale(.88); }
.icon-btn.is-off { opacity: .42; }
.icon-btn.back { font-size: 1.6rem; padding-bottom: 4px; }

.text-btn { color: var(--ink-soft); font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; }
.text-btn--center { display: block; margin: 14px auto 0; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Mali', cursive; font-weight: 700;
  border-radius: 999px;
  transition: transform .15s, box-shadow .15s;
}
.btn:active { transform: scale(.95); }
.btn--primary {
  background: linear-gradient(135deg, var(--orange-soft), var(--orange) 55%, var(--orange-deep));
  color: #fff;
  box-shadow: 0 8px 20px rgba(245, 130, 32, .4), inset 0 2px 0 rgba(255,255,255,.35);
  text-shadow: 0 1px 0 rgba(0,0,0,.12);
}
.btn--big { width: 100%; padding: 16px; font-size: 1.2rem; }
.btn--ghost {
  background: var(--card); color: var(--orange-deep);
  border: 2px solid var(--peach);
  padding: 13px 20px; font-size: 1rem;
  box-shadow: var(--shadow);
}
.btn__arrow { transition: transform .2s; }
.btn--primary:hover .btn__arrow { transform: translateX(5px); }

.section-title {
  font-family: 'Mali', cursive; font-weight: 600;
  font-size: 1.05rem; margin: 22px 4px 12px;
}

.price-zero { font-family: 'Mali', cursive; font-weight: 700; color: var(--orange-deep); }
.price-real { font-family: 'Mali', cursive; font-weight: 700; color: var(--ink); }
.free-tag {
  display: inline-block;
  background: #EFF7E4; color: var(--green);
  font-size: .64rem; border-radius: 999px;
  padding: 1px 8px; margin-left: 7px;
  vertical-align: 1px;
}

/* ══════════ HOME ══════════ */
.screen--home .scroll { padding-top: 0; }

.hero {
  margin: 0 -18px;
  padding: 26px 24px 18px;
  background: linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 58%, #8A5A8C 84%, var(--cream) 100%);
  position: relative;
  text-align: center;
  overflow: hidden;
}
.hero__sky { position: absolute; inset: 0; pointer-events: none; }
.stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 78% 12%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 88% 32%, #FFE9A8 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 30% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.8px 1.8px at 56% 22%, #FFE9A8 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 8% 42%, #fff 50%, transparent 51%);
  animation: twinkle 3.4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .45; } to { opacity: 1; } }
.moon {
  position: absolute; top: 26px; right: 30px;
  width: 46px; height: 46px; border-radius: 50%;
  background: #FFEDB8;
  box-shadow: 0 0 24px 6px rgba(255, 237, 184, .5);
}
.moon::after {
  content: ''; position: absolute; top: 8px; left: 6px;
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(220, 180, 110, .4);
  box-shadow: 14px 10px 0 -2px rgba(220, 180, 110, .35);
}
.cloud {
  position: absolute;
  width: 70px; height: 20px; border-radius: 999px;
  background: rgba(255,255,255,.16);
}
.cloud::before {
  content: ''; position: absolute; top: -10px; left: 16px;
  width: 30px; height: 22px; border-radius: 999px;
  background: inherit;
}
.cloud--1 { top: 58px; left: 8%; animation: drift 16s linear infinite; }
.cloud--2 { top: 24px; left: 48%; scale: .7; animation: drift 22s linear infinite reverse; }
@keyframes drift { from { transform: translateX(-30px); } to { transform: translateX(60px); } }

.hero__brand { position: relative; }
.brand-th {
  font-family: 'Mali', cursive; font-weight: 700;
  font-size: 2.1rem; color: var(--orange-soft);
  text-shadow: 0 2px 0 rgba(0,0,0,.25);
}
.brand-en {
  font-family: 'Mali', cursive; font-weight: 600;
  font-size: .9rem; color: #E8C9A0; letter-spacing: .2em;
}
.hero__headline {
  font-family: 'Mali', cursive; font-weight: 700;
  font-size: 2.5rem; line-height: 1.2;
  color: #FFF3DC;
  margin-top: 14px;
  position: relative;
  text-shadow: 0 3px 0 rgba(0,0,0,.18);
}
.hero__sub {
  position: relative;
  margin-top: 10px;
  font-size: .9rem; line-height: 1.65;
  color: #E2CDEA;
}
.hero__cat {
  position: relative;
  width: 200px; margin: 8px auto 0;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.28));
  animation: catBob 3.6s ease-in-out infinite;
}
@keyframes catBob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-7px) rotate(-1.2deg); }
}
.hero__cat svg { width: 100%; height: auto; }

.live-pill {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 6px; padding: 8px 16px;
  background: rgba(255, 253, 248, .92);
  border-radius: 999px;
  font-size: .78rem; color: var(--ink-soft);
  box-shadow: var(--shadow);
}
.live-pill b { color: var(--orange-deep); font-weight: 600; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(95, 160, 83, .5); }
  50%      { box-shadow: 0 0 0 6px rgba(95, 160, 83, 0); }
}

.hero__chips {
  display: flex; gap: 8px; justify-content: center;
  margin: 16px 0 18px;
}
.chip {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1; padding: 12px 6px;
  background: var(--card);
  border-radius: var(--r-md);
  border: 1.5px dashed var(--line);
  font-family: 'Mali', cursive; font-weight: 600;
  font-size: .78rem; text-align: center;
  box-shadow: var(--shadow);
}
.chip__ic { font-size: 1.3rem; }

.whisper-wrap { text-align: center; margin-top: 16px; min-height: 28px; }
.whisper {
  display: inline-block;
  font-family: 'Mali', cursive;
  font-size: .85rem; color: var(--ink-soft);
  opacity: .9;
  transition: opacity .6s;
}
.whisper.fade { opacity: 0; }

/* ══════════ MOOD ══════════ */
.mood-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.mood-card {
  background: var(--card);
  border-radius: var(--r-lg);
  border: 2px solid transparent;
  box-shadow: var(--shadow);
  padding: 14px 10px 14px;
  text-align: center;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.mood-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-big); }
.mood-card:active { transform: scale(.94); }
.mood-card svg { width: 86px; height: 86px; }
.mood-card__label {
  display: block;
  font-family: 'Mali', cursive; font-weight: 700;
  font-size: 1.02rem; margin-top: 4px;
}
.mood-card__sub { font-size: .76rem; color: var(--ink-soft); }

.banner-soft {
  margin-top: 18px;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, var(--peach), var(--cream-2));
  border-radius: var(--r-lg);
  padding: 12px 18px;
  font-family: 'Mali', cursive; font-size: .92rem; line-height: 1.5;
  border: 1.5px dashed #EFC892;
}
.banner-soft__cat { width: 72px; flex: none; }
.banner-soft__cat svg { width: 100%; height: auto; }

/* ══════════ SEARCH ══════════ */
.search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  border-radius: 999px;
  padding: 12px 18px;
  box-shadow: var(--shadow);
  border: 1.5px solid var(--line);
  margin-bottom: 18px;
}
.search-box__ic { opacity: .6; }
.search-box input {
  flex: 1; border: none; outline: none; background: none;
  font-size: .95rem;
}
.search-box input::placeholder { color: #C9A87E; }

.resto-list { display: flex; flex-direction: column; gap: 14px; }
.resto-item {
  display: flex; gap: 14px; align-items: center;
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 12px;
  box-shadow: var(--shadow);
  transition: transform .18s;
  text-align: left; width: 100%;
}
.resto-item:active { transform: scale(.97); }
.resto-item__art {
  width: 88px; height: 74px; flex: none;
  border-radius: var(--r-md);
  overflow: hidden;
}
.resto-item__art svg { width: 100%; height: 100%; }
.resto-item__body { flex: 1; min-width: 0; }
.resto-item__name { font-family: 'Mali', cursive; font-weight: 700; font-size: 1.02rem; }
.resto-item__tag  { font-size: .76rem; color: var(--ink-soft); margin: 2px 0 6px; }
.resto-item__meta {
  display: flex; gap: 8px; font-size: .72rem;
}
.resto-item__meta span {
  background: var(--cream-2); border-radius: 999px; padding: 3px 9px;
}
.resto-item__meta .star { color: #E8A020; font-weight: 500; }
.resto-item__go { font-size: 1.3rem; color: var(--orange); }
.search-none {
  text-align: center; padding: 30px 10px; color: var(--ink-soft);
  font-family: 'Mali', cursive;
}

/* ══════════ MENU ══════════ */
.screen--menu .scroll { padding: 0 0 calc(var(--nav-h) + 90px); }
.menu-hero {
  position: relative;
  height: 230px;
  overflow: hidden;
}
.menu-hero svg { width: 100%; height: 100%; }
.menu-hero__back, .menu-hero__fav {
  position: absolute; top: 16px; z-index: 2;
}
.menu-hero__back { left: 16px; }
.menu-hero__fav  { right: 16px; color: var(--red); }
.menu-hero__fav.is-fav { animation: favPop .35s cubic-bezier(.2,1.6,.4,1); }
@keyframes favPop { 50% { transform: scale(1.35); } }

.resto-card {
  position: relative;
  margin: -44px 18px 0;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-big);
  padding: 16px 20px;
  z-index: 1;
}
.resto-card__cat {
  position: absolute;
  top: -46px; right: 14px;
  width: 66px;
  filter: drop-shadow(0 4px 8px rgba(120, 70, 20, .25));
  animation: catBob 3.6s ease-in-out infinite;
}
.resto-card__cat svg { width: 100%; height: auto; }

.page-cat { width: 64px; flex: none; align-self: center; }
.page-cat svg { width: 100%; height: auto; }
.resto-card__name { font-family: 'Mali', cursive; font-weight: 700; font-size: 1.3rem; }
.resto-card__meta {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
  font-size: .76rem; color: var(--ink-soft);
}
.resto-card__meta span {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--cream-2); padding: 4px 10px; border-radius: 999px;
}
.resto-card__meta .star { color: #E8A020; font-weight: 500; }
.resto-card__free { color: var(--green); font-weight: 400; }

.cat-tabs {
  display: flex; gap: 8px;
  padding: 18px 18px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky; top: 0;
  background: linear-gradient(180deg, var(--cream) 82%, transparent);
  z-index: 3;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex: none;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--card);
  border: 1.5px solid var(--line);
  font-family: 'Mali', cursive; font-weight: 600; font-size: .85rem;
  color: var(--ink-soft);
  transition: all .2s;
}
.cat-tab.is-active {
  background: var(--orange); border-color: var(--orange);
  color: #fff;
  box-shadow: 0 5px 14px rgba(245, 130, 32, .4);
}

.menu-list { padding: 12px 18px 0; display: flex; flex-direction: column; gap: 12px; }
.menu-item {
  display: flex; gap: 12px; align-items: center;
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  padding: 10px;
}
.menu-item__art {
  width: 78px; height: 66px; flex: none;
  border-radius: var(--r-sm);
  overflow: hidden;
}
.menu-item__art svg { width: 100%; height: 100%; }
.menu-item__body { flex: 1; min-width: 0; }
.menu-item__name { font-family: 'Mali', cursive; font-weight: 600; font-size: .95rem; line-height: 1.3; }
.menu-item__desc {
  font-size: .73rem; color: var(--ink-soft); margin: 3px 0 5px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.menu-item__price { font-size: .85rem; }
.menu-item__real {
  font-size: .72rem; color: #C9A87E;
  text-decoration: line-through; margin-left: 6px; font-weight: 300;
}
.menu-item__rec {
  display: inline-block; font-size: .62rem;
  background: var(--red); color: #fff;
  border-radius: 999px; padding: 1px 8px; margin-left: 6px;
  vertical-align: 2px;
}
.add-btn {
  width: 38px; height: 38px; flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-soft), var(--orange));
  color: #fff; font-size: 1.45rem; line-height: 1;
  box-shadow: 0 5px 12px rgba(245, 130, 32, .4);
  display: grid; place-items: center;
  padding-bottom: 3px;
  transition: transform .14s;
}
.add-btn:active { transform: scale(.8); }
.menu-spacer { height: 20px; }

.cart-fab {
  position: absolute;
  left: 18px; right: 18px;
  bottom: calc(var(--nav-h) + 14px);
  padding: 15px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange-soft), var(--orange) 55%, var(--orange-deep));
  color: #fff;
  font-family: 'Mali', cursive; font-weight: 700; font-size: 1.05rem;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 10px 24px rgba(245, 130, 32, .45);
  transform: translateY(140%);
  transition: transform .35s cubic-bezier(.2,1.2,.4,1);
  z-index: 5;
}
.cart-fab.is-show { transform: none; }
.cart-fab.bump { animation: bump .3s; }
@keyframes bump { 50% { transform: scale(1.06); } }
.cart-fab__count {
  background: #fff; color: var(--orange-deep);
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .9rem;
}
.cart-fab__total {
  background: rgba(255,255,255,.22);
  border: 1.5px dashed rgba(255,255,255,.55);
  border-radius: 999px;
  padding: 2px 12px;
  font-size: .85rem;
}

/* ── language toggle ── */
.lang-toggle {
  flex: none;
  height: 40px; padding: 0 14px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-family: 'Mali', cursive; font-weight: 700;
  font-size: .85rem; color: var(--orange-deep);
  border: 1.5px solid var(--line);
  transition: transform .15s;
}
.lang-toggle:active { transform: scale(.88); }
.hero__lang {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  background: rgba(255, 253, 248, .92);
}

.profile-foot { text-align: center; margin-top: 22px; }
.profile-foot .text-btn { font-size: .76rem; opacity: .8; }

/* fly-to-cart dot */
.fly-dot {
  position: fixed; z-index: 99;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(245, 130, 32, .25);
  pointer-events: none;
}

/* ══════════ CART ══════════ */
.cart-list { display: flex; flex-direction: column; gap: 12px; }
.cart-item {
  display: flex; gap: 12px; align-items: center;
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  padding: 10px;
  animation: rise .35s both;
}
.cart-item__art { width: 64px; height: 56px; flex: none; border-radius: var(--r-sm); overflow: hidden; }
.cart-item__art svg { width: 100%; height: 100%; }
.cart-item__body { flex: 1; min-width: 0; }
.cart-item__name { font-family: 'Mali', cursive; font-weight: 600; font-size: .9rem; }
.cart-item__price { font-size: .78rem; margin-top: 2px; }
.qty {
  display: flex; align-items: center; gap: 10px;
}
.qty button {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--cream-2);
  color: var(--orange-deep);
  font-size: 1.15rem; line-height: 1;
  display: grid; place-items: center;
  transition: transform .14s, background .14s;
}
.qty button:active { transform: scale(.8); background: var(--peach); }
.qty b { min-width: 18px; text-align: center; font-weight: 500; }

.cart-summary {
  margin-top: 18px;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 18px;
}
.cart-summary__row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .95rem;
  padding: 4px 2px;
}
.cart-summary__row .price-zero { font-size: 1.2rem; }
.cart-summary__row .price-real { font-size: 1.02rem; }
.cart-summary__row--discount { font-size: .82rem; color: var(--green); }
.cart-summary__row--discount span:last-child { font-family: 'Mali', cursive; font-weight: 700; }
.cart-summary__row--pay {
  border-top: 2px dashed var(--line);
  margin-top: 8px; padding-top: 10px;
}
.cart-summary__note {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #EFF7E4, #E2F0D2);
  border-radius: var(--r-md);
  padding: 10px 14px;
  margin: 12px 0 16px;
  font-size: .8rem; line-height: 1.5;
}
.cart-summary__note b { color: var(--green); font-size: 1.05rem; font-family: 'Mali', cursive; }
.cart-summary__cat { width: 56px; flex: none; }
.cart-summary__cat svg { width: 100%; height: auto; }
.tiny-note { text-align: center; font-size: .72rem; color: var(--ink-soft); margin-top: 10px; }

.speed-title {
  font-family: 'Mali', cursive; font-weight: 600;
  font-size: .82rem; color: var(--ink-soft);
  margin: 2px 2px 8px;
}
.speed-row { display: flex; gap: 10px; margin-bottom: 14px; }
.speed-opt {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: var(--cream-2);
  border: 2px solid transparent;
  border-radius: var(--r-md);
  padding: 10px 6px;
  transition: all .18s;
}
.speed-opt:active { transform: scale(.95); }
.speed-opt.is-active {
  background: #FFF3DC;
  border-color: var(--orange);
  box-shadow: 0 5px 14px rgba(245, 130, 32, .25);
}
.speed-opt__ic { font-size: 1.3rem; }
.speed-opt__name { font-family: 'Mali', cursive; font-weight: 700; font-size: .85rem; }
.speed-opt__sub { font-size: .66rem; color: var(--ink-soft); }
.speed-opt.is-active .speed-opt__name { color: var(--orange-deep); }

.cart-empty {
  display: none;
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-soft);
  font-family: 'Mali', cursive; line-height: 1.7;
}
.cart-empty__cat { width: 140px; margin: 0 auto 8px; }
.cart-empty__cat svg { width: 100%; height: auto; }
.cart-empty .btn { margin: 16px auto 0; }
.screen--cart.is-empty .cart-list,
.screen--cart.is-empty .cart-summary,
.screen--cart.is-empty #btn-clear-cart { display: none; }
.screen--cart.is-empty .cart-empty { display: block; }

/* ══════════ TRACK ══════════ */
.rider-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 12px 16px;
}
.rider-card__avatar { width: 62px; flex: none; }
.rider-card__avatar svg { width: 100%; height: auto; }
.rider-card__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rider-card__info b { font-family: 'Mali', cursive; font-size: .95rem; }
.rider-card__msg { font-size: .76rem; color: var(--ink-soft); }
.rider-card__star {
  background: #FFF3D2; color: #E8A020;
  font-size: .78rem; font-weight: 500;
  border-radius: 999px; padding: 4px 10px;
}

.track-steps {
  display: flex; align-items: center;
  margin: 18px 4px 14px;
}
.tstep {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: none; width: 76px;
}
.tstep__ic {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--cream-2);
  border: 2px solid var(--line);
  display: grid; place-items: center;
  font-size: 1.15rem;
  filter: grayscale(.9); opacity: .55;
  transition: all .4s;
}
.tstep__lb { font-size: .68rem; color: var(--ink-soft); }
.tstep.is-done .tstep__ic, .tstep.is-now .tstep__ic {
  filter: none; opacity: 1;
  background: #FFF3DC; border-color: var(--orange);
}
.tstep.is-now .tstep__ic {
  animation: stepPulse 1.4s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(245, 130, 32, .35);
}
@keyframes stepPulse {
  50% { box-shadow: 0 0 0 9px rgba(245, 130, 32, 0); transform: scale(1.07); }
}
.tstep.is-now .tstep__lb, .tstep.is-done .tstep__lb { color: var(--orange-deep); font-weight: 400; }
.tstep__bar {
  flex: 1; height: 5px; border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin: 0 -8px 18px;
}
.tstep__bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--orange-soft), var(--orange));
  border-radius: 999px;
  transition: width 1s ease;
}

.track-map {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  line-height: 0;
}
.route-dash { animation: routeFlow 1.2s linear infinite; }
@keyframes routeFlow { to { stroke-dashoffset: -22; } }
.rider-on-map {
  offset-path: path('M44 38 L120 38 L120 96 L196 96 L196 160 L286 160');
  offset-rotate: 0deg;
  animation: ride var(--ride-dur) linear forwards;
}
@keyframes ride { from { offset-distance: 0%; } to { offset-distance: 100%; } }

.eta-card {
  margin-top: 14px;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 14px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-align: center;
}
.eta-card__label { font-size: .74rem; color: var(--ink-soft); }
.eta-card__time {
  font-family: 'Mali', cursive; font-weight: 700;
  font-size: 1.7rem; color: var(--orange-deep);
}
.eta-card__hint { font-size: .72rem; color: var(--ink-soft); }

.track-tip {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px;
  background: linear-gradient(135deg, #E2F0F8, #D2E6F2);
  border-radius: var(--r-md);
  padding: 8px 16px;
  font-size: .82rem; font-family: 'Mali', cursive;
}
.track-tip__cat { width: 52px; flex: none; }
.track-tip__cat svg { width: 100%; height: auto; }

#btn-skip { margin-top: 16px; animation: rise .4s both; }

.track-empty {
  display: none;
  text-align: center; padding: 30px 20px;
  color: var(--ink-soft); font-family: 'Mali', cursive; line-height: 1.7;
}
.track-empty__cat { width: 140px; margin: 0 auto 8px; }
.track-empty__cat svg { width: 100%; height: auto; }
.track-empty .btn { margin: 16px auto 0; }
.screen--track.is-empty .rider-card,
.screen--track.is-empty .track-steps,
.screen--track.is-empty .track-map,
.screen--track.is-empty .eta-card,
.screen--track.is-empty .track-tip,
.screen--track.is-empty #btn-skip { display: none; }
.screen--track.is-empty .track-empty { display: block; }

/* ══════════ SUCCESS ══════════ */
.screen--success { background: linear-gradient(180deg, #FFF0D8, var(--cream) 40%); }
#confetti {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 4;
}
.success-head { text-align: center; padding-top: 6px; }
.success-head__cat {
  width: 150px; margin: 0 auto;
  animation: catParty .9s cubic-bezier(.2,1.4,.4,1) both;
}
.success-head__cat svg { width: 100%; height: auto; }
@keyframes catParty {
  from { transform: scale(.3) rotate(-14deg); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.success-title {
  font-family: 'Mali', cursive; font-weight: 700;
  font-size: 1.7rem; color: var(--orange-deep);
}
.success-sub { color: var(--ink-soft); font-size: .9rem; margin-top: 2px; }

.receipt {
  position: relative;
  margin: 18px 6px 0;
  background: #fff;
  padding: 26px 22px 30px;
  box-shadow: var(--shadow-big);
  animation: rise .5s .15s both;
}
.receipt__zigzag {
  position: absolute; left: 0; right: 0; height: 12px;
  background: linear-gradient(-45deg, transparent 8px, #fff 0) 0 0 / 16px 100%,
              linear-gradient(45deg, transparent 8px, #fff 0) 8px 0 / 16px 100%;
  background-repeat: repeat-x;
}
.receipt__zigzag--top    { top: -11px; transform: scaleY(-1); }
.receipt__zigzag--bottom { bottom: -11px; }
.receipt__title {
  font-family: 'Mali', cursive; font-weight: 700;
  text-align: center; font-size: 1.15rem;
}
.receipt__meta {
  text-align: center; font-size: .7rem; color: var(--ink-soft);
  border-bottom: 2px dashed var(--line);
  padding: 6px 0 12px; margin-bottom: 12px;
}
.receipt__items { display: flex; flex-direction: column; gap: 8px; }
.receipt__row {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: .85rem;
}
.receipt__row .qty-x { color: var(--ink-soft); font-size: .76rem; }
.receipt__row .price-zero { font-size: .85rem; }
.receipt__total {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 2px dashed var(--line);
  margin-top: 12px; padding-top: 12px;
  font-size: .9rem;
}
.receipt__total .price-zero { font-size: 1.15rem; }
.receipt__total .price-real { font-size: 1rem; }
.receipt__discount {
  color: var(--green); font-size: .8rem;
  margin-top: 8px;
}
.receipt__discount span:last-child { font-family: 'Mali', cursive; font-weight: 700; }
.receipt__pay { margin-top: 8px; }
.receipt__saved {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin-top: 14px;
  background: linear-gradient(135deg, #EFF7E4, #DFF0CC);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: .78rem; line-height: 1.4;
}
.receipt__saved-num {
  font-family: 'Mali', cursive; font-weight: 700;
  font-size: 1.5rem; color: var(--green);
  white-space: nowrap;
}
.receipt__saved-ic { font-size: 1.5rem; }

.success-note {
  text-align: center; font-size: .8rem; color: var(--ink-soft);
  margin: 20px 0 14px;
}
.success-btns { display: flex; gap: 10px; }
.success-btns .btn { flex: 1; padding: 13px 8px; font-size: .95rem; }

.btn-save { margin-top: 12px; }

.share-title {
  text-align: center; font-family: 'Mali', cursive;
  font-size: .82rem; color: var(--ink-soft);
  margin: 18px 0 10px;
}
.share-row {
  display: flex; justify-content: center; gap: 10px;
  flex-wrap: wrap;
}
.share-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'Mali', cursive; font-weight: 700;
  font-size: .82rem; color: #fff;
  box-shadow: var(--shadow);
  transition: transform .15s;
}
.share-btn:active { transform: scale(.85); }
.share-btn--native { background: var(--orange); font-size: 1.1rem; }
.share-btn--fb   { background: #1877F2; font-size: 1.25rem; }
.share-btn--x    { background: #1A1A1A; font-size: 1.05rem; }
.share-btn--line { background: #06C755; font-size: .62rem; }
.share-btn--wa   { background: #25D366; }
.share-btn--tg   { background: #229ED9; }
.share-btn--copy { background: var(--card); font-size: 1.05rem; }

.home-foot { text-align: center; margin-top: 14px; padding-bottom: 6px; }
.home-foot a { font-size: .7rem; color: var(--ink-soft); opacity: .75; text-decoration: underline; text-underline-offset: 3px; }

/* ══════════ PROFILE ══════════ */
.profile-card {
  display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(160deg, #FFEDD2, var(--card));
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 18px;
  text-align: center;
}
.profile-card__cat { width: 120px; }
.profile-card__cat svg { width: 100%; height: auto; }
.profile-card__name { font-family: 'Mali', cursive; font-weight: 700; font-size: 1.1rem; }
.profile-card__rank {
  margin-top: 4px;
  background: var(--peach); color: var(--orange-deep);
  font-size: .74rem; border-radius: 999px; padding: 4px 14px;
  font-family: 'Mali', cursive; font-weight: 600;
}
.stat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-top: 14px;
}
.stat {
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  padding: 14px 6px;
  text-align: center;
  display: flex; flex-direction: column; gap: 2px;
}
.stat b {
  font-family: 'Mali', cursive; font-weight: 700;
  font-size: 1.25rem; color: var(--orange-deep);
}
.stat span { font-size: .68rem; color: var(--ink-soft); }

.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-item {
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: .82rem;
}
.history-item__date { color: var(--ink-soft); font-size: .7rem; }
.history-item__saved { color: var(--green); font-family: 'Mali', cursive; font-weight: 700; white-space: nowrap; }
.history-empty {
  text-align: center; color: var(--ink-soft);
  font-family: 'Mali', cursive; padding: 24px;
}

/* ══════════ BOTTOM NAV ══════════ */
.bottom-nav {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--nav-h);
  background: rgba(255, 253, 248, .96);
  backdrop-filter: blur(8px);
  border-top: 1.5px solid var(--line);
  display: flex;
  z-index: 10;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: .62rem; color: #BBA083;
  font-family: 'Mitr', sans-serif;
  transition: color .2s;
}
.nav-item__ic { font-size: 1.25rem; filter: grayscale(1) opacity(.55); transition: all .2s; }
.nav-item.is-active { color: var(--orange-deep); font-weight: 400; }
.nav-item.is-active .nav-item__ic { filter: none; transform: translateY(-2px) scale(1.12); }
.nav-badge {
  position: absolute; top: 8px; right: calc(50% - 22px);
  background: var(--red); color: #fff;
  min-width: 17px; height: 17px;
  border-radius: 999px;
  font-size: .62rem;
  display: grid; place-items: center;
  padding: 0 4px;
}

/* ══════════ TOAST ══════════ */
.toast {
  position: absolute;
  left: 50%; bottom: calc(var(--nav-h) + 20px);
  transform: translate(-50%, 24px);
  background: rgba(61, 36, 23, .94);
  color: #FFE9C9;
  font-family: 'Mali', cursive; font-size: .85rem;
  border-radius: 999px;
  padding: 10px 22px;
  opacity: 0;
  pointer-events: none;
  transition: all .3s cubic-bezier(.2,1.2,.4,1);
  z-index: 20;
  max-width: 86%;
  text-align: center;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ══════════ SVG anims ══════════ */
.steam   { animation: steamUp 2.2s ease-in-out infinite; transform-origin: center bottom; }
.steam--2 { animation-delay: .55s; }
.steam--3 { animation-delay: 1.1s; }
@keyframes steamUp {
  0%   { opacity: 0; transform: translateY(4px); }
  35%  { opacity: .9; }
  100% { opacity: 0; transform: translateY(-9px); }
}
.float-soft { animation: floatSoft 2.6s ease-in-out infinite; }
@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ═══════════════════════════════════════════════════════════════════════
   v1.2 — readability, daytime hero, ticker, payoff, tip rider,
   viral receipt, tip jar, tab-overflow fix, food-forward cards
   ═══════════════════════════════════════════════════════════════════════ */

/* ── readability: sharper, heavier body text, less fuzzy shadow ── */
body { font-weight: 400; }
.page-sub      { font-size: .95rem; color: #8A5E38; }
.menu-item__desc { font-size: .82rem; -webkit-line-clamp: 2; }
.resto-item__tag { font-size: .86rem; }
.mood-card__sub  { font-size: .84rem; }
.mood-card__label{ font-size: 1.05rem; }
.cat-tab         { font-size: .9rem; }
.eta-card__hint, .tstep__lb { font-size: .8rem; }
.nav-item        { font-size: .66rem; }
.tiny-note, .speed-opt__sub { font-size: .75rem; }
.whisper         { font-size: .92rem; }

/* ══════════ DAYTIME HERO (bright · minimal · all-day) ══════════ */
.hero {
  background: linear-gradient(180deg, #FFE3AE 0%, #FFD49B 42%, #FFE9CC 78%, var(--cream) 100%);
}
.stars { opacity: .35 !important; mix-blend-mode: overlay; }
.moon {
  background: radial-gradient(circle at 38% 35%, #FFF4C2, #FFD25A 70%);
  box-shadow: 0 0 30px 10px rgba(255, 206, 90, .55);
}
.moon::after { display: none; }
.moon::before {
  content: ''; position: absolute; inset: -10px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,210,90,.35), transparent 65%);
}
.cloud { background: rgba(255, 255, 255, .7); }
.hero__brand .brand-th { color: var(--orange-deep); text-shadow: 0 2px 0 rgba(255,255,255,.5); }
.hero__brand .brand-en { color: #B5763C; }
.hero__headline {
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255,255,255,.55);
}
.hero__sub { color: #7A5230; font-weight: 400; }
.live-pill { background: #fff; color: #6E4A28; font-size: .82rem; font-weight: 500; max-width: 96%; }
.live-pill b { font-weight: 700; font-size: 1rem; }
.live-text { white-space: nowrap; }
@media (max-width: 360px) { .live-pill { font-size: .75rem; } }

/* ══════════ ANONYMOUS MESSAGE TICKER ══════════ */
.ticker {
  margin: 14px -18px 4px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track {
  display: inline-flex; gap: 10px; white-space: nowrap;
  padding-left: 100%;
  animation: tickerMove 76s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes tickerMove { to { transform: translateX(-100%); } }
.ticker__item {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1.5px solid var(--line);
  border-radius: 999px; padding: 6px 14px;
  font-size: .82rem; color: #7A5230; font-weight: 400;
}
.ticker__item::before { content: '💬'; font-size: .85rem; }

/* ══════════ CART PAYOFF (big number) ══════════ */
.payoff {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #EFF7E4, #DCEFC8);
  border: 2px solid #CDE6A8;
  border-radius: var(--r-md);
  padding: 14px 16px; margin: 14px 0 16px;
}
.payoff__cat { width: 58px; flex: none; }
.payoff__cat svg { width: 100%; height: auto; }
.payoff__txt { display: flex; flex-direction: column; line-height: 1.2; }
.payoff__txt > span { font-size: .85rem; color: #4A7A40; }
.payoff__num {
  font-family: 'Mali', cursive; font-weight: 700;
  font-size: 2.2rem; color: var(--green);
}

/* ══════════ TRACK — order line, tip rider, floating hearts ══════════ */
.rider-card__order { font-size: .72rem; color: var(--orange-deep); font-weight: 500; }
.track-mapwrap { position: relative; }
.heart-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.float-heart {
  position: absolute; bottom: 28%;
  font-size: 1.5rem;
  animation: heartFloat 1.4s ease-out forwards;
  will-change: transform, opacity;
}
@keyframes heartFloat {
  0%   { opacity: 0; transform: translateY(0) scale(.5); }
  20%  { opacity: 1; transform: translateY(-18px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-120px) scale(.9) rotate(12deg); }
}
.tiprider {
  margin-top: 14px;
  background: linear-gradient(135deg, #FFF3DC, var(--card));
  border: 1.5px dashed #F0C892;
  border-radius: var(--r-lg);
  padding: 14px 16px;
}
.tiprider__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tiprider__head b { font-family: 'Mali', cursive; font-size: 1rem; }
.tiprider__total { font-size: .76rem; color: var(--ink-soft); }
.tiprider__total b { color: var(--orange-deep); font-family: 'Mali', cursive; font-size: .95rem; }
.tiprider__sub { font-size: .78rem; color: var(--ink-soft); margin: 4px 0 12px; }
.tiprider__btns { display: flex; gap: 10px; }
.tip-btn {
  flex: 1; padding: 12px 6px;
  border-radius: var(--r-md);
  background: #fff; border: 2px solid var(--peach);
  font-family: 'Mali', cursive; font-weight: 700; font-size: 1rem;
  color: var(--orange-deep);
  box-shadow: var(--shadow);
  transition: transform .12s, background .15s;
}
.tip-btn:active { transform: scale(.9); background: #FFE9C9; }

/* ══════════ VIRAL RECEIPT (share card) ══════════ */
.success-head__cat { display: none; }
.receipt {
  position: relative;
  margin: 16px auto 0; max-width: 360px;
  background: linear-gradient(180deg, #FFFFFF, #FFF8EC);
  border: 2px solid #F3DDB6;
  border-radius: 24px;
  padding: 20px 22px 24px;
  box-shadow: var(--shadow-big);
  text-align: center;
  overflow: hidden;
}
.receipt::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 7px;
  background: linear-gradient(90deg, var(--orange-soft), var(--orange), #F0716B);
}
.receipt__brandbar {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Mali', cursive; font-weight: 700; font-size: .8rem;
  color: var(--orange-deep); margin-top: 4px;
}
.receipt__sponsor {
  background: var(--peach); color: var(--orange-deep);
  border-radius: 999px; padding: 2px 10px; font-size: .68rem;
}
.receipt__shop {
  font-family: 'Mali', cursive; font-weight: 700;
  font-size: 1.45rem; color: var(--ink); line-height: 1.15;
  margin: 8px 0 2px;
}
.receipt__cat { width: 116px; margin: 4px auto 0; animation: catBob 3.4s ease-in-out infinite; }
.receipt__cat svg { width: 100%; height: auto; }
.receipt__hi {
  font-family: 'Mali', cursive; font-weight: 700;
  font-size: 1.15rem; color: var(--orange-deep); margin-top: 2px;
}
.receipt__bigsave { margin: 12px 0 2px; }
.receipt__bigsave-lb { display: block; font-size: .9rem; color: #4A7A40; }
.receipt__bignum {
  font-family: 'Mali', cursive; font-weight: 700;
  font-size: 3.2rem; line-height: 1; color: var(--green);
  display: inline-block; margin-top: 2px;
}
.receipt__kcal {
  display: inline-block;
  background: #FFEFE0; color: #C2561E;
  border-radius: 999px; padding: 5px 14px;
  font-size: .85rem; font-weight: 500; margin: 8px 0 2px;
}
.receipt__kcal b { font-family: 'Mali', cursive; font-weight: 700; }
.receipt__meta {
  font-size: .72rem; color: var(--ink-soft);
  border-bottom: 2px dashed var(--line);
  padding: 10px 0; margin: 12px 0;
}
.receipt__items { display: flex; flex-direction: column; gap: 7px; text-align: left; }
.receipt__items .receipt__row { font-size: .82rem; }
.receipt__row { display: flex; justify-content: space-between; gap: 10px; }
.receipt__row .qty-x { color: var(--ink-soft); font-size: .74rem; }
.receipt__total {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 2px dashed var(--line); margin-top: 10px; padding-top: 10px;
  font-size: .85rem; text-align: left;
}
.receipt__total .price-real { font-size: .95rem; }
.receipt__discount { color: var(--green); font-size: .8rem; margin-top: 6px; text-align: left; }
.receipt__discount span:last-child { font-family: 'Mali', cursive; font-weight: 700; }
.receipt__tiprow { color: var(--orange-deep); font-size: .8rem; margin-top: 6px; text-align: left; }
.receipt__tiprow span:last-child { font-family: 'Mali', cursive; font-weight: 700; }
.receipt__paid {
  margin-top: 12px;
  font-family: 'Mali', cursive; font-weight: 700;
  font-size: 1.05rem; color: var(--orange-deep);
}
.receipt__tagline {
  margin-top: 4px; font-family: 'Mali', cursive;
  font-size: .92rem; color: var(--ink-soft);
}
.receipt__hashtags {
  margin-top: 10px; padding-top: 10px;
  border-top: 1.5px dashed var(--line);
  font-size: .72rem; color: var(--orange); font-weight: 500;
  word-spacing: 2px; line-height: 1.5;
}
.success-share { display: flex; gap: 10px; margin-top: 12px; }
.success-share .btn { flex: 1; margin: 0; padding: 13px 6px; font-size: .95rem; }

/* ══════════ STATS (profile) extras ══════════ */
.profile-card__cat { transition: transform .3s; }
.profile-card__cat.pose-pop { animation: catParty .5s cubic-bezier(.2,1.4,.4,1); }
.profile-card__caption {
  font-family: 'Mali', cursive; font-size: .9rem; color: var(--orange-deep);
  margin: 2px 0 4px; min-height: 1.2em;
}
.profile-actions { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.profile-action { width: 100%; padding: 13px; font-size: .92rem; text-decoration: none; }

/* ══════════ TIP JAR ══════════ */
.tipjar-card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 14px;
  text-align: center;
}
.tipjar-card__head {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Mali', cursive; font-weight: 700; font-size: 1rem; color: var(--ink);
  margin-bottom: 12px;
}
.tipjar-card__badge {
  background: #1A3A6B; color: #fff; font-size: .68rem; font-weight: 600;
  border-radius: 999px; padding: 3px 10px; letter-spacing: .03em;
}
.tipjar-card__badge--evm { background: #5B47B5; }
.tipjar-qr {
  width: 220px; max-width: 80%; height: auto;
  border-radius: var(--r-md); background: #fff;
  box-shadow: var(--shadow);
}
.tipjar-card__scan { font-family: 'Mali', cursive; color: var(--green); font-size: .9rem; margin-top: 10px; }
.tipjar-card__name { font-weight: 500; font-size: .95rem; margin: 4px 0 10px; }
.tipjar-card__addr {
  display: block; font-family: monospace; font-size: .72rem;
  color: var(--ink-soft); word-break: break-all;
  background: var(--cream-2); border-radius: var(--r-sm);
  padding: 8px 10px; margin: 6px 0 10px;
}
.tipjar-copy { width: 100%; padding: 11px; font-size: .9rem; }
.tipjar-note {
  text-align: center; font-family: 'Mali', cursive;
  font-size: .82rem; color: var(--ink-soft); line-height: 1.6;
  margin-top: 6px;
}

/* ══════════ MENU CATEGORY TABS — fix overflow (หลุดจอ) ══════════ */
.screen--menu .scroll { overflow-x: hidden; }
.cat-tabs-wrap {
  position: sticky; top: 0; z-index: 3;
  background: linear-gradient(180deg, var(--cream) 88%, transparent);
}
.cat-tabs {
  position: static;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding: 16px 18px 6px;
}
.cat-tab { scroll-snap-align: start; flex: 0 0 auto; }

/* ══════════ FOOD-FORWARD CARDS ══════════ */
.resto-item__art { width: 104px; height: 86px; }
.resto-item__name { font-size: 1.06rem; }
.resto-item__almost {
  display: inline-block; margin-top: 6px;
  background: #FFEFE0; color: #C2561E;
  border-radius: 999px; padding: 2px 9px; font-size: .7rem; font-weight: 500;
}
.menu-item__art { width: 92px; height: 78px; }
.page-cat--sm { width: 50px; }

/* daytime nav + safe contrast */
.bottom-nav { background: rgba(255, 253, 248, .98); }

/* ══════════ DYNAMIC SKY (dawn → night + weather/seasons) ══════════ */
.hero__sky::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 120%, rgba(255,245,225,.35), transparent 60%);
  opacity: .6;
}
/* two cross-fading gradient layers → buttery-smooth scene transitions */
.sky-grad { position: absolute; inset: 0; opacity: 0; transition: opacity 3s ease-in-out; will-change: opacity; }
.sky-grad.is-on { opacity: 1; }
.aurora, .moon, .stars { transition: opacity 2.6s ease-in-out, background 2.6s ease-in-out, box-shadow 2.6s ease-in-out; }
.sky-grad[data-sky="dawn"]    { background: linear-gradient(180deg,#FFC9A8 0%,#FFD9A8 40%,#FFE9CC 78%,var(--cream) 100%); }
.sky-grad[data-sky="morning"] { background: linear-gradient(180deg,#BFE3F2 0%,#FFE3AE 55%,#FFE9CC 82%,var(--cream) 100%); }
.sky-grad[data-sky="noon"]    { background: linear-gradient(180deg,#9CD8F0 0%,#CFECF6 45%,#FFEFCF 82%,var(--cream) 100%); }
.sky-grad[data-sky="rain"]    { background: linear-gradient(180deg,#8EA3B0 0%,#AEC0CB 45%,#D8DCD2 82%,var(--cream) 100%); }
.sky-grad[data-sky="sunset"]  { background: linear-gradient(180deg,#6A4A8C 0%,#E0708A 42%,#FFB266 76%,var(--cream) 100%); }
.sky-grad[data-sky="night"]   { background: linear-gradient(180deg,#1E2347 0%,#3A3A6B 55%,#7A5A8C 84%,var(--cream) 100%); }
.sky-grad[data-sky="aurora"]  { background: linear-gradient(180deg,#0E1A33 0%,#1E2A52 50%,#43356B 82%,var(--cream) 100%); }
.sky-grad[data-sky="snow"]    { background: linear-gradient(180deg,#A8C3D6 0%,#CFE0EA 45%,#EAEFF2 82%,var(--cream) 100%); }

/* text contrast on dark scenes */
.hero[data-sky="night"] .hero__headline,
.hero[data-sky="aurora"] .hero__headline,
.hero[data-sky="sunset"] .hero__headline { color:#FFF3DC; text-shadow:0 2px 0 rgba(0,0,0,.28); }
.hero[data-sky="night"] .hero__sub,
.hero[data-sky="aurora"] .hero__sub,
.hero[data-sky="sunset"] .hero__sub { color:#ECDCF2; }
.hero[data-sky="night"] .brand-th,
.hero[data-sky="aurora"] .brand-th { color:var(--orange-soft); text-shadow:0 2px 0 rgba(0,0,0,.3); }
.hero[data-sky="night"] .brand-en,
.hero[data-sky="aurora"] .brand-en { color:#E8C9A0; }

/* stars only at night / aurora */
.stars { opacity:0 !important; transition:opacity 1.5s; }
.hero[data-sky="night"] .stars,
.hero[data-sky="aurora"] .stars { opacity:.9 !important; }

/* sun by day → moon by night */
.moon { transition: background 1.5s, box-shadow 1.5s, opacity 1.5s; }
.hero[data-sky="night"] .moon,
.hero[data-sky="aurora"] .moon,
.hero[data-sky="sunset"] .moon {
  background: radial-gradient(circle at 38% 35%, #FFF6E0, #EFE3C0 70%);
  box-shadow: 0 0 22px 6px rgba(255,246,224,.4);
}
.hero[data-sky="rain"] .moon,
.hero[data-sky="snow"] .moon { opacity:.35; }

/* aurora band */
.aurora {
  position:absolute; top:-12%; left:-20%; right:-20%; height:62%;
  background: linear-gradient(100deg, rgba(95,210,170,0) 0%, rgba(95,210,170,.55) 25%, rgba(120,160,230,.5) 50%, rgba(180,120,220,.5) 72%, rgba(95,210,170,0) 100%);
  filter: blur(24px); opacity:0; transform: skewY(-6deg);
  transition: opacity 1.8s; pointer-events:none;
  animation: auroraWave 8s ease-in-out infinite alternate;
}
.hero[data-sky="aurora"] .aurora { opacity:.8; }
@keyframes auroraWave {
  from { transform: skewY(-6deg) translateX(-20px) scaleY(1); }
  to   { transform: skewY(-10deg) translateX(20px) scaleY(1.15); }
}

/* weather particles */
.hero__fx { position:absolute; inset:0; pointer-events:none; overflow:hidden; }
.fx-p { position:absolute; top:-8%; opacity:0; }
.hero[data-fx="none"] .fx-p, .hero[data-fx="hot"] .fx-p { display:none; }
.hero[data-fx="rain"] .fx-p {
  width:2px; height:16px; border-radius:2px;
  background:linear-gradient(#BFD2DE, rgba(190,210,222,.15));
  animation-name: fxRain; animation-iteration-count:infinite; animation-timing-function:linear;
}
.hero[data-fx="snow"] .fx-p { font-size:14px; color:#fff; animation-name: fxSnow; animation-iteration-count:infinite; animation-timing-function:linear; }
.hero[data-fx="snow"] .fx-p::before { content:'❄'; }
.hero[data-fx="petal"] .fx-p { font-size:14px; animation-name: fxPetal; animation-iteration-count:infinite; animation-timing-function:linear; }
.hero[data-fx="petal"] .fx-p::before { content:'🌸'; }
@keyframes fxRain  { 0%{opacity:0; transform:translateY(0)} 12%{opacity:.7} 100%{opacity:.15; transform:translateY(280px)} }
@keyframes fxSnow  { 0%{opacity:0; transform:translateY(0) translateX(0)} 12%{opacity:.95} 100%{opacity:.3; transform:translateY(280px) translateX(var(--dx,0))} }
@keyframes fxPetal { 0%{opacity:0; transform:translateY(0) rotate(0)} 12%{opacity:.95} 100%{opacity:.2; transform:translateY(280px) translateX(var(--dx,0)) rotate(220deg)} }

/* hot: sun rays */
.hero[data-fx="hot"] .moon::after {
  display:block; content:''; position:absolute; inset:-16px; border-radius:50%;
  background: conic-gradient(from 0deg, rgba(255,210,90,.5), transparent 11%, rgba(255,210,90,.5) 22%, transparent 33%, rgba(255,210,90,.5) 44%, transparent 55%, rgba(255,210,90,.5) 66%, transparent 77%, rgba(255,210,90,.5) 88%, transparent 99%);
  animation: spin 20s linear infinite; opacity:.55; z-index:-1;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* tip button bump */
.tip-btn.bump { animation: bump .3s; }

/* ══════════ v1.2 fixes: modal, overlap, perf, toast ══════════ */

/* contact modal (instant popup) */
.modal { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(60,36,20,.45); animation: fadeIn .2s; }
.modal__card {
  position: relative; width: 100%; max-width: 340px;
  background: linear-gradient(170deg, #FFF6E9, var(--card));
  border-radius: 24px; box-shadow: var(--shadow-big);
  padding: 22px 22px 24px; text-align: center;
  animation: modalPop .3s cubic-bezier(.2,1.3,.4,1) both;
}
@keyframes modalPop { from { opacity: 0; transform: scale(.85) translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal__x { position: absolute; top: 8px; right: 12px; font-size: 1.7rem; line-height: 1; color: var(--ink-soft); width: 36px; height: 36px; }
.modal__cat { width: 96px; margin: 0 auto 2px; }
.modal__cat svg { width: 100%; height: auto; }
.modal__title { font-family: 'Mali', cursive; font-weight: 700; font-size: 1.2rem; color: var(--orange-deep); }
.modal__p { font-size: .92rem; color: var(--ink); line-height: 1.6; margin: 8px 0 14px; }
.modal__mail {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--peach); color: var(--orange-deep);
  border-radius: 999px; padding: 11px 20px;
  font-family: 'Mali', cursive; font-weight: 700; font-size: .95rem; text-decoration: none;
}
.modal__copy { display: block; margin: 12px auto 0; }

/* long profile action buttons: allow wrapping, no overlap */
.profile-action { white-space: normal; line-height: 1.3; font-size: .88rem; text-align: center; }

/* small privacy / contact links (side by side) */
.profile-links { display: flex; gap: 10px; margin-top: 4px; }
.small-link {
  flex: 1; padding: 9px 8px;
  border-radius: 999px;
  background: var(--card); border: 1.5px solid var(--line);
  color: var(--ink-soft); box-shadow: var(--shadow);
  font-family: 'Mali', cursive; font-weight: 600; font-size: .8rem;
  text-align: center; text-decoration: none;
  transition: transform .14s;
}
.small-link:active { transform: scale(.93); }

/* tip-jar header: keep title from overlapping the cat */
.screen--tipjar .page-title { font-size: 1.12rem; line-height: 1.2; }
.screen--tipjar .page-cat { width: 52px; }

/* receipt grand total */
.receipt__grand {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; padding-top: 8px; border-top: 1.5px dashed var(--line);
  font-size: .92rem; text-align: left;
}
.receipt__grand span:last-child { font-family: 'Mali', cursive; font-weight: 700; color: var(--ink); }

/* perf: drop expensive backdrop blur */
.bottom-nav { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* move arrival toast up so it doesn't overlap the open-box button */
.toast { bottom: calc(var(--nav-h) + 78px); }

/* category tabs: horizontally scrollable, last tab never trapped off-screen */
.cat-tabs { gap: 7px; padding: 14px 16px 8px; flex-wrap: nowrap; scroll-padding-left: 16px; }
.cat-tabs::after { content: ''; flex: 0 0 8px; }   /* trailing space so last tab clears the edge */
.cat-tab { padding: 7px 14px; font-size: .84rem; }

/* receipt overflow guards (no text หลุดจอ) */
.receipt__shop, .receipt__paid, .receipt__tagline, .receipt__hashtags { overflow-wrap: anywhere; }
.receipt__items .receipt__row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.receipt__site { margin-top: 8px; font-size: .8rem; color: var(--ink-soft); font-family: 'Mali', cursive; }
.receipt__site b { color: var(--orange-deep); }

/* ── meme receipt: quote, broke meter, badge, mood result, challenge ── */
.receipt__meme {
  font-family: 'Mali', cursive; font-size: 1rem; color: var(--ink);
  margin: 12px 4px 0; line-height: 1.45;
}
.receipt__meme:empty { display: none; }
.broke { margin: 14px 2px 2px; text-align: left; }
.broke__top { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--ink-soft); }
.broke__top b { font-family: 'Mali', cursive; font-size: 1.1rem; color: var(--orange-deep); }
.broke__bar { height: 14px; border-radius: 999px; background: #F2E6D2; overflow: hidden; margin: 6px 0 4px; }
.broke__bar i {
  display: block; height: 100%; width: 0; border-radius: 999px;
  transition: width 1.1s cubic-bezier(.2,.9,.3,1);
  background: linear-gradient(90deg, #7FBF5A, #E8A93E);
}
.broke__bar i[data-band="1"] { background: linear-gradient(90deg, #7FBF5A, #A9CF6A); }
.broke__bar i[data-band="2"] { background: linear-gradient(90deg, #E8C24B, #F0A23E); }
.broke__bar i[data-band="3"] { background: linear-gradient(90deg, #F08A3E, #EE6B5A); }
.broke__bar i[data-band="4"] { background: linear-gradient(90deg, #EE6B5A, #E0463F); }
.broke__status { font-family: 'Mali', cursive; font-size: .9rem; color: var(--orange-deep); text-align: right; }
.receipt__badge {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 12px auto 0; padding: 7px 16px;
  background: linear-gradient(135deg, #FFEFD6, #FFE0B8);
  border: 1.5px solid #F0C892; border-radius: 999px;
  font-family: 'Mali', cursive; font-weight: 700; font-size: .92rem; color: var(--orange-deep);
}
.receipt__badge .badge-ic { font-size: 1.15rem; }
.receipt__badge:empty { display: none; }
.receipt__mood {
  margin: 10px 6px 0; font-size: .9rem; color: #4A7A40; line-height: 1.4;
  background: #EFF7E4; border-radius: 12px; padding: 8px 12px;
}
.receipt__mood:empty { display: none; }
.receipt__challenge {
  margin-top: 10px; font-size: .82rem; color: #8A5E38;
  background: #FFF3DC; border: 1.5px dashed #F0C892; border-radius: 12px; padding: 8px 12px;
}
