/* ═══════════════════════════════════════════════════════════════════
   ส่งไว — UI ชุดใหม่ (ต.ค. 2026)
   ═══════════════════════════════════════════════════════════════════
   ต้นแบบ: Downloads/songwai-ui (design-system.md + styles.css)
   ไฟล์นี้วางทับ style.css — ถอยกลับหน้าตาเดิมได้ด้วยการลบ <link> บรรทัดเดียว
   ใน public/index.html ไม่ต้องแก้ JS กลับ

   หลักที่ใช้ทั้งไฟล์
   - ตัวเลือกทุกตัวขึ้นต้นด้วย body ให้ชนะกฎเดิมที่ความเจาะจงเท่ากันเสมอ
   - ข้อความหลัก #1C2430 · รอง #505B69 · ชื่อหมวด #253041 น้ำหนัก 600
   - ระยะขอบหน้า 16px · ฐานระยะ 8px · การ์ดมุม 24px · ปุ่ม 16px หรือแคปซูล
   - เงาอุ่นนุ่ม ใช้เฉพาะช่องค้นหา แบนเนอร์ และเมนูล่าง
   ═══════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Songwai';
  src: url('/fonts/NotoSansThai.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --yellow:      #FFD43B;
  --yellow-dk:   #F2B807;
  --yellow-lt:   #FFF4C0;
  --orange:      #F28A0A;
  --pale:        #FFF4C0;
  --teal:        #4C9697;
  --ink:         #1C2430;
  --muted:       #505B69;
  --cat-ink:     #253041;
  --line:        #EFF0F2;
  --bg:          #FFFFFF;
  --bg-mesh:     #FFFFFF;
  --text:        #1C2430;
  --text-muted:  #505B69;
  --border:      #EFF0F2;
  --card-shadow: 0 6px 22px rgba(177,123,20,.063);
  --radius:      24px;
  --dock-space:  122px;      /* เผื่อพื้นที่ใต้เนื้อหา ไม่ให้เมนูลอยบังของที่เลื่อนไม่ถึง */
}

/* ── พื้นฐาน ──────────────────────────────────────────────────────── */
html, body {
  font-family: 'Songwai', 'Leelawadee UI', Tahoma, sans-serif;
  color: var(--ink);
  background: #fff;
}
body { background: #fff !important; }
body button, body input, body textarea, body select { font-family: inherit; }
body :focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
body input::placeholder, body textarea::placeholder { color: #505B69; opacity: 1; }
/* จอกว้าง (แท็บเล็ต/คอม): ตรึงแอปไว้กลางจอกว้าง 480 เหมือนต้นแบบ */
@media (min-width: 700px) {
  body { background: #F1F3F5 !important; }
  body .app-main, body .app-header { max-width: 480px; margin-left: auto; margin-right: auto; background: #fff; }
}

/* ── หัวแอป ───────────────────────────────────────────────────────── */
body .app-header,
body .app-header.scrolled {
  position: static;
  height: auto;
  background: #fff;
  padding: 14px 16px 8px;
  gap: 12px;
  box-shadow: none;
  border: 0;
}
body .header-logo-wrap { display: flex; align-items: center; gap: 9px; min-width: 0; cursor: pointer; }
body .header-logo-box {
  width: 56px; height: 56px; border-radius: 16px;
  object-fit: cover; box-shadow: 0 3px 10px rgba(177,123,20,.14); flex: none;
}
body .brand-text { display: flex; flex-direction: column; min-width: 0; }
body .app-header .header-brand,
body .app-header.scrolled .header-brand {
  font-size: 31px; line-height: 1.1; font-weight: 900; color: var(--ink);
  text-shadow: none; letter-spacing: -.3px;
}
body .brand-sub {
  font-size: 11px; font-weight: 600; color: #3A4452; margin-top: 3px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
body .header-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
body .btn-lang {
  height: 40px; padding: 0 13px; border-radius: 18px;
  background: #fff; color: var(--ink); font-weight: 700; font-size: 14px;
  border: 1px solid var(--line); box-shadow: 0 3px 10px rgba(0,0,0,.043);
}
body .btn-menu {
  width: 40px; height: 40px; min-width: 40px; border-radius: 50%;
  background: #F6F6F7; color: var(--ink); border: 0; box-shadow: none;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
body .btn-menu svg { width: 20px; height: 20px; }

/* ── เมนูล่างลอยตัว ──────────────────────────────────────────────── */
body .bottom-nav {
  position: fixed;
  left: 50%; right: auto; bottom: 12px;
  transform: translateX(-50%);
  width: calc(100% - 24px); max-width: 456px; height: auto;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255,255,255,.93);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid #FFF1D4; border-radius: 28px;
  box-shadow: 0 6px 28px rgba(189,133,25,.137), 0 -2px 10px rgba(215,159,16,.035);
  padding: 7px 6px max(8px, env(safe-area-inset-bottom));
  z-index: 300;
}
body .nav-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 1px; padding: 0; border-radius: 20px; min-width: 0;
  font-size: 11px; font-weight: 500; color: #414B58;
  background: none;
}
body .nav-btn:active { transform: scale(.96); }
body .nav-icon.icon-well {
  width: 64px; max-width: 100%; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 24px; position: relative; filter: none;
  transition: background .2s;
}
body .nav-icon.icon-well img {
  width: 48px; height: 48px; object-fit: contain;
  filter: saturate(.7);
  transform: scale(.9);
  transition: transform .2s, filter .2s;
}
body .nav-btn.active { color: #875000; font-weight: 700; }
body .nav-btn.active .icon-well { background: linear-gradient(135deg, #FFF8DF, #FFF0B9); }
body .nav-btn.active .icon-well::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--orange);
}
body .nav-btn.active .icon-well img { filter: none; transform: translateY(-4px) scale(1.06); }
/* ป้ายเลขแชทค้าง ต้องเกาะมุมหลุมไอคอน ไม่ใช่มุมปุ่ม */
body #nav-chat-badge { top: 0 !important; right: calc(50% - 26px) !important; z-index: 2; }

/* เนื้อหาต้องเลื่อนพ้นเมนูลอยเสมอ */
body .app-main { padding-bottom: var(--dock-space); }
body { padding-bottom: 0 !important; }
/* มีแถบตะกร้าลอยอยู่ด้วย → เผื่อที่ใต้เนื้อหาเพิ่มอีกชั้น */
body:has(.cart-bar:not(.hidden)) .app-main { padding-bottom: 188px; }

/* ── หน้าแรก: แถวจุดส่ง ───────────────────────────────────────────── */
body .loc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px; margin-bottom: 8px; font-size: 13px;
}
body .loc-btn {
  display: flex; align-items: center; gap: 6px; min-height: 32px; min-width: 0;
  background: none; border: 0; padding: 0; color: var(--ink); font-weight: 600; cursor: pointer;
}
body .loc-btn svg { width: 18px; height: 18px; color: var(--orange); flex: none; }
body .loc-btn .loc-caret { width: 16px; height: 16px; color: var(--orange); }
body .loc-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body .loc-label b { font-weight: 700; }
body .loc-hours {
  display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
  font-size: 12px; font-weight: 700; color: var(--ink); flex: none;
  background: none; padding: 0; box-shadow: none; margin: 0;
  font-variant-numeric: tabular-nums;
}
body .loc-hours svg { width: 15px; height: 15px; color: var(--ink); stroke-width: 2.4; }
body .loc-hours.is-closed { color: #A93746; }
body .loc-hours.is-closed svg { color: #A93746; }

/* ── ช่องค้นหา ───────────────────────────────────────────────────── */
body .search-wrap { padding: 0 16px; margin: 0; position: static; }
body .search-inner {
  height: 46px; display: flex; align-items: center;
  border: 1.5px solid #FFDA60; border-radius: 22px; background: #fff;
  box-shadow: 0 5px 16px rgba(234,176,39,.098);
  padding: 3px 7px 3px 17px; position: relative;
}
body .search-inner:focus-within { box-shadow: 0 0 0 3px rgba(255,220,89,.25); }
body .search-inner input,
body #search-input {
  border: 0; outline: 0; background: transparent; width: 100%; min-width: 0;
  height: 100%; padding: 0; font-size: 13px; color: var(--ink); box-shadow: none;
}
body .search-inner .search-icon {
  position: static; width: 40px; height: 40px; flex: none; transform: none;
  object-fit: contain;
}

/* ── แบนเนอร์โปรโมชั่น (ข้อมูลจริงจากแอดมิน) ─────────────────────── */
body .promo-carousel {
  margin: 0 16px 12px; border-radius: 22px; overflow: hidden;
  box-shadow: 0 6px 22px rgba(177,123,20,.10);
  background: linear-gradient(115deg, #FFF8D6, #FFEDA1);
}
body .promo-slide img { border-radius: 0; }

/* ── ปุ่มสลับ ร้านค้า / อาหาร ────────────────────────────────────── */
body .home-tabs {
  position: static; top: auto;
  display: flex; gap: 4px; padding: 3px; margin: 8px 16px 0;
  border: 1px solid #F6E8B8; border-radius: 20px; background: #fff;
  box-shadow: 0 3px 12px rgba(167,115,19,.035);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
body .home-tab {
  flex: 1; min-height: 38px; border-radius: 15px; border: 0;
  background: transparent; color: #44505E; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  box-shadow: none; padding: 0 8px;
}
body .home-tab .seg-ico { width: 25px; height: 25px; object-fit: contain; flex: none; }
body .home-tab.active {
  background: linear-gradient(115deg, #FFE76B, #FFC51D);
  box-shadow: 0 3px 9px rgba(219,178,42,.118);
  color: #332809;
}

/* ── หัวข้อส่วน ───────────────────────────────────────────────────── */
body .sec-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 12px 0 4px;
}
body .sec-head h2 { font-size: 19px; font-weight: 800; letter-spacing: -.3px; color: var(--ink); margin: 0; }
body .text-link {
  font-size: 12px; font-weight: 600; color: #8A4A00; background: none; border: 0;
  padding: 7px 0; white-space: nowrap; cursor: pointer;
  display: inline-flex; align-items: center; gap: 2px;
}
body .text-link svg { width: 14px; height: 14px; }

/* ── หมวดหมู่: กริด 4 คอลัมน์ ไอคอน 3D ลอยบนพื้นขาว ─────────────── */
/* ⚠️ กล่องเดิมเป็นแถบด้านข้าง (sidebar) — รีเซ็ตให้เป็นบล็อกเต็มความกว้าง */
body #home-cat-sidebar-shops,
body #home-cat-sidebar {
  width: 100%; position: static; max-height: none; overflow: visible;
  display: block; padding: 0 16px; background: transparent; border: 0;
}
body .cat-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 6px;
}
body .cat-tile {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 0; padding: 2px 0 4px; border: 0; border-radius: 16px;
  background: transparent; cursor: pointer;
}
body .cat-tile .cat-icon {
  width: 54px; height: 54px; margin: 0; display: flex; align-items: center; justify-content: center;
  filter: none; font-size: 34px;
}
body .cat-tile .cat-icon-img {
  width: 54px; height: 54px; object-fit: contain;
  background: transparent; box-shadow: none; border-radius: 0;
  transition: transform .2s;
}
body .cat-tile:hover .cat-icon-img { transform: translateY(-4px) rotate(-3deg); }
body .cat-tile .cat-name {
  font-size: 11px; font-weight: 600; color: var(--cat-ink);
  white-space: nowrap; letter-spacing: -.1px; line-height: 1.3;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
body .cat-tile.selected { background: #FFF7D7; }
body .cat-tile.selected .cat-name { color: #875000; font-weight: 700; }

/* ── รายการร้าน ──────────────────────────────────────────────────── */
body #home-shops-section,
body #home-menus-section { display: block; padding: 0; }
body #home-shops-section.hidden,
body #home-menus-section.hidden { display: none; }
body #shops-head { padding: 0 16px; }
body .shops-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px;
}
body .shops-list .shop-card,
body .shop-card {
  display: flex; flex-direction: column; align-items: stretch;
  padding: 0; overflow: hidden; border-radius: 21px;
  background: #fff; border: 1px solid #F0EDE7; box-shadow: var(--card-shadow);
  text-align: left; min-width: 0; gap: 0; cursor: pointer;
}
body .shops-list .shop-card .sh-photo,
body .shop-card .sh-photo {
  width: 100%; height: 112px; aspect-ratio: auto; border-radius: 0; margin: 0; font-size: 44px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: #FFF3B7; flex: none;
}
body .shop-card .sh-photo.tint-0 { background: #FFF3B7; }
body .shop-card .sh-photo.tint-1 { background: #FFF0D8; }
body .shop-card .sh-photo.tint-2 { background: #EAF5F0; }
body .shop-card .sh-photo .ph-box { width: 100%; height: 100%; border-radius: 0; }
/* ไอคอน 3D แทนรูปร้านในกล่องอื่น ๆ (หน้ารายละเอียดร้าน การ์ดบริการ) */
body .sh-art { width: 82%; height: 82%; object-fit: contain; }
body .shop-photo-lg:has(.sh-art) { background: #FFF3B7; display: flex; align-items: center; justify-content: center; }
body .shop-card .sh-art {
  width: 104px; height: 104px; object-fit: contain; transform: rotate(-7deg);
  transition: transform .2s;
}
body .shop-card:hover .sh-art { transform: rotate(0) scale(1.06); }
body .shop-card .sh-info { padding: 12px; min-width: 0; }
body .shops-list .shop-card .sh-name,
body .shop-card .sh-name {
  font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.35; min-height: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
body .shops-list .shop-card .sh-sub,
body .shop-card .sh-sub { font-size: 10px; color: var(--muted); margin-top: 3px; min-height: 0; }
body .shop-card .sh-status {
  font-size: 11px; color: var(--muted); margin-top: 6px;
  display: flex; align-items: center; gap: 5px;
}
body .sh-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; display: inline-block; }
body .sh-dot.open   { background: #2F9E5B; }
body .sh-dot.closed { background: #C9474F; }
body .shop-card .sh-meta { font-size: 10px; color: var(--muted); margin-top: 3px; }
body .shop-card .sh-arrow { display: none; }
body .shop-card.shop-closed-dim { opacity: .62; }

/* ── ตะกร้าและข้อความเด้ง: อยู่เหนือเมนูลอย ─────────────────────── */
body .cart-bar,
body .cart-bar:not(.hidden) {
  position: fixed; left: 50%; right: auto; bottom: 105px; transform: translateX(-50%);
  width: calc(100% - 36px); max-width: 444px; margin: 0;
  border-radius: 20px; background: #292C33; color: #fff;
  padding: 14px 19px; box-shadow: 0 5px 20px rgba(0,0,0,.13); z-index: 290;
}
/* ⚠️ กฎเดิมตั้ง top ไว้ — ต้องคืน top เป็น auto ไม่งั้นมี top+bottom แล้วกล่องยืดเต็มจอ */
/* ต้นแบบไม่มีไอคอนรถเข็นอีโมจิ — ซ่อน แล้วใช้ที่ให้ชื่อร้าน/ปุ่มดูตะกร้า */
body .cart-bar .cart-left > span:first-child { display: none; }
body .cart-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
body .cart-bar .cart-label { font-size: 14px; color: #FFDF62; }
body .cart-bar .cart-count-badge { font-size: 12px; min-width: 0; }
body .toast {
  top: auto; bottom: 110px; height: auto;
  width: max-content; max-width: calc(100% - 50px);
  background: #2A2E35; color: #fff; border-radius: 16px;
  padding: 13px 20px; font-size: 12px; font-weight: 600; line-height: 1.5; text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,.13);
  transform: translateX(-50%) translateY(16px);
}
body .toast.show { transform: translateX(-50%) translateY(0); }

/* ── ปุ่มเขียนรีวิวลอย ────────────────────────────────────────────── */
body .fab-review {
  bottom: 112px; right: max(24px, calc((100vw - 480px) / 2 + 24px));
  background: linear-gradient(120deg, #FFE670, #FFC51B); color: var(--ink);
  border-radius: 20px; padding: 13px 20px; font-weight: 700; font-size: 14px;
  box-shadow: 0 5px 20px rgba(183,133,35,.19); border: 0;
  display: none; align-items: center; gap: 7px;
}
body .fab-review.show { display: flex; }
body .fab-review svg { width: 20px; height: 20px; }

/* ── หัวหน้าแบบต้นแบบ (ชุมชน / ออเดอร์ / แชท) ────────────────────── */
body .page-title {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 7px 0 20px;
}
body .page-title > div { min-width: 0; }
body .page-title h1 {
  font-size: 26px; line-height: 1.35; font-weight: 800; letter-spacing: -.4px;
  color: var(--ink); margin: 0;
}
body .page-title p { font-size: 12px; color: var(--muted); margin: 6px 0 0; line-height: 1.5; }
body .page-title img { width: 73px; height: 73px; object-fit: contain; flex: none; }
body .screen-ui { padding: 12px 16px 0; }

/* ชิปกรอง — แถวเดียว เลื่อนข้างได้ ไม่ตัดขึ้นบรรทัดใหม่บนจอแคบ */
body .chips {
  display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto;
  padding: 2px 0 9px; margin: 0; scrollbar-width: none;
}
body .chips::-webkit-scrollbar { display: none; }
body .chips .chip,
body .rv-filters .rv-filter {
  flex: none; min-height: 40px; padding: 10px 17px; border-radius: 16px;
  border: 1px solid #EEEEF1; background: #fff; color: var(--ink);
  font-size: 12px; font-weight: 500; white-space: nowrap; cursor: pointer; box-shadow: none;
}
body .chips .chip.active,
body .rv-filters .rv-filter.active {
  background: var(--yellow); border-color: var(--yellow); font-weight: 700;
  box-shadow: 0 3px 10px rgba(231,185,46,.13);
}

/* ── ชุมชน ───────────────────────────────────────────────────────── */
body .community-header { background: #fff; padding: 12px 16px 0; border: 0; }
body .sort-tabs { display: flex; gap: 18px; margin: 10px 0 6px; }
body .sort-tabs .sort-tab {
  min-height: 34px; padding: 7px 0; border: 0; border-radius: 0; background: none;
  font-size: 12px; font-weight: 500; color: var(--muted); position: relative;
}
body .sort-tabs .sort-tab.active { color: var(--ink); font-weight: 700; background: none; }
body .sort-tabs .sort-tab.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  border-radius: 4px; background: var(--yellow);
}
body .reviews-grid { padding: 14px 16px 0; gap: 14px; max-width: none; }
body .reviews-grid .review-card {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--card-shadow); overflow: hidden;
}
body .reviews-grid .review-img { aspect-ratio: 16 / 10; background: linear-gradient(130deg, #E7F2E4, #FFF5C5); }
body .reviews-grid .review-body { padding: 18px; }
body .reviews-grid .review-author { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 12px; }
body .reviews-grid .review-avatar {
  width: 36px; height: 36px; border-radius: 14px; background: var(--pale); color: var(--ink);
  font-size: 14px; font-weight: 800; flex: none;
}
body .ra-who { min-width: 0; display: flex; flex-direction: column; }
body .reviews-grid .review-name { font-size: 12px; font-weight: 700; color: var(--ink); }
body .ra-sub { font-size: 10px; color: var(--muted); margin-top: 3px; }
body .ra-sub .rv-verified { background: none; padding: 0; color: #226551; font-weight: 600; border: 0; }
body .reviews-grid .review-stars { margin-left: auto; color: #D78A00; font-size: 12px; letter-spacing: 1px; white-space: nowrap; }
body .reviews-grid .review-menu-name { font-size: 16px; font-weight: 700; color: var(--ink); margin: 15px 0 6px; }
body .reviews-grid .review-content { font-size: 13px; color: #44505E; line-height: 1.65; }
body .reviews-grid .review-actions {
  display: flex; align-items: center; gap: 18px;
  margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line);
}
body .reviews-grid .rev-like,
body .reviews-grid .rev-comment-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0;
  font-size: 12px; font-weight: 500; color: var(--muted); background: none; border: 0;
}
body .reviews-grid .review-actions svg { width: 20px; height: 20px; flex: none; }
body .lk-heart { display: inline-flex; }
body .reviews-grid .rev-like.liked { color: #E57554; }
body .reviews-grid .rev-like.liked svg { fill: currentColor; }
body .reviews-grid .rev-del-txt {
  margin-left: auto; min-height: 40px; min-width: 40px; padding: 0; color: #B03345;
  display: inline-flex; align-items: center; justify-content: center; background: none; border: 0;
}
body .reviews-grid .review-del-badge {
  position: absolute; top: 10px; right: 10px; bottom: auto;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 12px;
  background: rgba(255,255,255,.92); color: #B03345; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
body .reviews-grid .review-del-badge svg { width: 18px; height: 18px; }

/* ── ออเดอร์ ─────────────────────────────────────────────────────── */
body #orders-tab-list .chips { margin-bottom: 8px; }
body .oc-group { font-size: 13px; font-weight: 700; color: var(--muted); margin: 10px 2px 10px; }
body .order-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  box-shadow: var(--card-shadow); padding: 20px; margin-bottom: 14px; cursor: pointer;
}
body .order-card:active { transform: scale(.99); }
body .oc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
body .oc-art {
  width: 52px; height: 52px; border-radius: 17px; background: #FFF8DC;
  object-fit: contain; flex: none; padding: 2px;
}
body .oc-art.photo { object-fit: cover; padding: 0; }
body .oc-info { flex: 1; min-width: 0; }
body .oc-info h3 {
  font-size: 15px; font-weight: 700; color: var(--ink); margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body .oc-info small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
body .oc-no { font-size: 12px; font-weight: 700; color: #AA6800; flex: none; }
body .oc-items {
  font-size: 12px; color: var(--muted); line-height: 1.65; margin: 0;
  padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line);
}
body .oc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body .oc-row .st-chip { font-size: 10px; padding: 5px 10px; border-radius: 9px; font-weight: 600; }
body .oc-price { font-size: 18px; font-weight: 800; color: var(--ink); white-space: nowrap; }
body .oc-price small { font-size: 12px; font-weight: 600; }
body .oc-price.cancel { color: #66717E; text-decoration: line-through; }
body .oc-foot { margin-top: 12px; }
body .oc-pay { font-size: 12px; color: var(--muted); }
body .empty-ui { text-align: center; padding: 30px 14px; color: var(--muted); font-size: 13px; }
body .empty-ui img { width: 90px; height: 90px; display: block; margin: 0 auto 10px; object-fit: contain; }
body .empty-ui p { margin: 0 0 16px; line-height: 1.65; }
body .btn-primary-ui {
  border: 0; border-radius: 16px; min-height: 46px; padding: 12px 22px;
  background: linear-gradient(110deg, #FFE679, #FFCA25); color: var(--ink);
  font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 4px 10px rgba(206,157,23,.1);
}

/* ── แชท ─────────────────────────────────────────────────────────── */
/* รายการแชทเลื่อนไปกับหน้า (ไม่ล็อกความสูง) — เมนูลอยจะได้ไม่บังแถวล่างสุด */
body #tab-chat .cc-tab { height: auto; min-height: 0; background: #fff; }
body #tab-chat .cc-body { overflow: visible; padding: 0 16px; }
body .cc-top { padding: 12px 16px 0; }
body .chat-banner {
  display: flex; align-items: center; gap: 12px;
  background: #FFF7D7; border-radius: 22px; padding: 18px; margin: 8px 0 18px;
}
body .chat-banner img { width: 62px; height: 62px; object-fit: contain; flex: none; }
body .chat-banner h3 { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0; }
body .chat-banner p { font-size: 11px; color: #655622; margin: 5px 0 0; }
body #tab-chat .cc-seg { background: none; border: 0; padding: 0 16px 6px; gap: 8px; }
body #tab-chat .cc-seg button {
  flex: none; min-height: 40px; padding: 10px 17px; border-radius: 16px;
  border: 1px solid #EEEEF1; background: #fff; color: var(--ink);
  font-size: 12px; font-weight: 500;
}
body #tab-chat .cc-seg button.on { background: var(--yellow); border-color: var(--yellow); font-weight: 700; color: var(--ink); }
body #tab-chat .cc-row {
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: none; padding: 16px 2px; margin: 0; gap: 13px; min-height: 88px;
}
body #tab-chat .cc-row:active { background: #FFFBEA; }
body #tab-chat .cc-av { width: 60px; height: 60px; border-radius: 21px; font-size: 22px; }
body #tab-chat .cc-av.art { background: #FFF4CE; }
body #tab-chat .cc-av.art img { width: 54px; height: 54px; object-fit: contain; }
body #tab-chat .cc-name { font-size: 15px; color: var(--ink); }
body #tab-chat .cc-last { font-size: 12px; color: var(--muted); margin-top: 5px; }
body #tab-chat .cc-when { font-size: 10px; color: #606B79; }
body #tab-chat .cc-unread {
  min-width: 19px; height: 19px; line-height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--yellow); color: var(--ink); font-size: 10px;
}
body #tab-chat .cc-kind.shop { background: #FFF1D6; color: #8A4A00; }
body #tab-chat .cc-sechd { font-size: 11px; font-weight: 700; color: var(--muted); margin: 14px 2px 4px; }
body #tab-chat .cc-search input { border-color: #FFDA60; border-radius: 16px; min-height: 44px; }
body #tab-chat .cc-btn.primary { background: var(--yellow); color: var(--ink); }
body #tab-chat .cc-empty { color: var(--muted); font-size: 13px; padding: 30px 14px; }
body #tab-chat .cc-empty-art { width: 90px; height: 90px; object-fit: contain; display: block; margin: 0 auto 10px; }
/* ห้องแชท: เต็มจอ ซ่อนเมนูลอย ช่องพิมพ์จะไม่โดนบัง (แบบ LINE) */
body #tab-chat .cc-tab:has(.cc-room) {
  position: fixed; inset: 0; z-index: 320; height: 100dvh;
  max-width: 480px; margin: 0 auto;
}
body #tab-chat .cc-tab:has(.cc-room) .cc-body { overflow: hidden; padding: 0; }
body:has(#tab-chat.active .cc-room) .bottom-nav { display: none; }
/* ฟองข้อความตามต้นแบบ: ของเราเหลืองอ่อน อีกฝ่ายเทาอ่อน ตัวหนังสือเข้ม */
body #tab-chat .cc-roomhd { padding: 12px 10px; border-bottom: 1px solid var(--line); }
body #tab-chat .cc-roomhd button { color: var(--ink); }
body #tab-chat .cc-msgs { background: #fff; }
body #tab-chat .cc-bub { font-size: 14px; line-height: 1.55; border-radius: 18px 18px 18px 4px; padding: 10px 14px; }
body #tab-chat .cc-rrow.them .cc-bub { background: #F1F3F5; color: var(--ink); border: 0; }
body #tab-chat .cc-rrow.me .cc-bub { background: #FFF1B2; color: var(--ink); border-radius: 18px 18px 4px 18px; }
body #tab-chat .cc-inbar .snd,
body #tab-chat .cc-vplay,
body #tab-chat .cc-emotabs button.on { background: var(--yellow); color: var(--ink); }
body #tab-chat .cc-vfill { background: var(--orange); }
body #tab-chat .cc-inwrap:focus-within { border-color: #FFC936; }

/* ── โปรไฟล์ ─────────────────────────────────────────────────────── */
body #tab-profile { padding: 12px 16px 0; }
body .profile-header.profile-banner {
  background: linear-gradient(115deg, #FFED8B, #FFD43B);
  border-radius: 28px; padding: 22px; margin-bottom: 18px;
}
body .profile-banner .profile-user { display: flex; align-items: center; gap: 13px; }
body .profile-banner .profile-avatar {
  width: 72px; height: 72px; border-radius: 24px; padding: 4px; flex: none;
  background: #FFF8D5; border: 3px solid rgba(255,255,255,.65);
  font-size: 28px; color: var(--ink); filter: none; overflow: visible; position: relative;
  display: flex; align-items: center; justify-content: center;
}
body .profile-avatar .av-art { width: 100%; height: 100%; object-fit: contain; }
body .profile-avatar .av-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
body .profile-avatar .av-cam {
  position: absolute; right: -6px; bottom: -6px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.15);
  display: flex; align-items: center; justify-content: center;
}
body .profile-avatar .av-cam svg { width: 14px; height: 14px; }
body .profile-who { min-width: 0; }
body .profile-banner .profile-name {
  font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
body .profile-banner .profile-id { font-size: 12px; color: #5A4A12; margin-top: 3px; }
body .profile-banner .profile-points-pill {
  margin-left: auto; padding: 9px 12px; border-radius: 16px; flex: none;
  background: rgba(255,255,255,.44); box-shadow: none;
  font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap;
}
body .profile-level .progress-head {
  display: flex; justify-content: space-between; font-size: 11px; font-weight: 700;
  margin: 20px 0 7px; color: var(--ink);
}
body .profile-level .progress { height: 7px; border-radius: 10px; overflow: hidden; background: rgba(169,137,24,.13); }
body .profile-level .progress > div { height: 100%; border-radius: 10px; background: #D79508; transition: width .4s ease; }

body .register-cta {
  margin: 0 0 14px; padding: 20px; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--card-shadow);
}
body .register-cta h3 { font-size: 16px; font-weight: 800; color: var(--ink); }
body .register-cta p { font-size: 12px; color: var(--muted); line-height: 1.6; }
body .register-cta .btn-register {
  width: 100%; min-height: 46px; border-radius: 16px; font-size: 14px;
  background: linear-gradient(110deg, #FFE679, #FFCA25) !important; color: var(--ink);
  box-shadow: 0 4px 10px rgba(206,157,23,.1); letter-spacing: 0;
}
body .reg-cta-login {
  display: block; text-align: center; margin-top: 12px; padding: 6px;
  font-size: 13px; font-weight: 600; color: #8A4A00; text-decoration: none;
}

body #profile-cards.profile-cards { padding: 0; margin: 0; gap: 14px; }
body .profile-cards .pcard {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  box-shadow: var(--card-shadow); padding: 8px 18px;
}
body .profile-cards .checkin-card { padding: 12px 2px 12px; }
body .checkin-card .checkin-row1 { margin: 0; }
body .checkin-card .checkin-title { font-size: 16px; font-weight: 700; color: var(--ink); }
body .checkin-card .checkin-title .ci-ico { display: none; }
body .checkin-card .checkin-streak { font-size: 12px; color: var(--muted); }
body .checkin-card .checkin-days { display: flex; justify-content: space-between; gap: 7px; margin: 20px 0; }
body .checkin-card .checkin-day {
  flex: none; height: auto; background: none; border-radius: 0;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  font-size: 9px; color: var(--muted);
}
body .checkin-day i {
  width: 32px; height: 32px; border-radius: 50%; background: #F4F5F6; font-style: normal;
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted);
}
body .checkin-day.done i { background: #FFF1AC; color: #9D7200; }
body .checkin-day.today i { background: var(--yellow); color: #5D4300; font-weight: 700; box-shadow: 0 3px 9px rgba(212,160,22,.13); }
body .checkin-card .btn-checkin {
  width: 100%; min-height: 46px; padding: 12px 20px; border-radius: 16px;
  background: linear-gradient(110deg, #FFE679, #FFCA25) !important; color: var(--ink);
  font-size: 14px; font-weight: 700; letter-spacing: 0;
  box-shadow: 0 4px 10px rgba(206,157,23,.1);
}
body .checkin-card .btn-checkin:disabled {
  background: #F3F4F6 !important; color: #606B79; box-shadow: none;
}
body .redeem-row { margin-top: 0; padding: 0; border: 0; }
body .redeem-info { text-align: center; font-size: 12px; color: var(--muted); margin: 12px 0; line-height: 1.6; }
body .btn-redeem {
  width: 100%; min-height: 42px; border: 0; border-radius: 14px; cursor: pointer;
  background: #F3F4F6; color: #606B79; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px; opacity: 1 !important;
}
body .btn-redeem:not(:disabled) { background: var(--pale); color: #8A4A00; }
body .btn-redeem .btn-ico { margin: 0; }

body .profile-cards .vip-card {
  background: none; color: var(--ink); padding: 10px 0; gap: 12px;
}
body .profile-cards .vip-icon { width: 46px; height: 46px; object-fit: contain; flex: none; }
body .profile-cards .vip-title { font-size: 15px; font-weight: 700; color: var(--ink); }
body .profile-cards .vip-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }
body .profile-cards .btn-vip {
  border-radius: 14px; min-height: 40px; padding: 8px 16px; flex: none;
  background: var(--yellow); color: var(--ink); font-size: 12px; box-shadow: none;
}

body .profile-cards .pcard-sechd {
  font-size: 11px; font-weight: 600; color: var(--muted); margin: 12px 0 6px; padding: 0;
  background: none; text-transform: none; letter-spacing: 0;
}
body .profile-cards .pcard-menu-item {
  min-height: 56px; padding: 10px 0; gap: 13px; border-bottom: 1px solid var(--line);
}
body .profile-cards .pcard-menu-item:last-child { border-bottom: 0; }
body .profile-cards .pcard-menu-item:active { background: #FFFBEA; }
body .profile-cards .pmi-icon { width: 20px; height: 20px; color: #606B79; filter: none; }
body .profile-cards .pmi-icon svg { width: 19px; height: 19px; }
body .profile-cards .pmi-label { font-size: 13px; font-weight: 600; color: var(--ink); }
body .profile-cards .pmi-arrow { color: #6B7582; display: inline-flex; }
body .profile-cards .pmi-arrow svg { width: 16px; height: 16px; }
body .pcard-danger .pmi-label,
body .pcard-danger .pmi-icon { color: #B03345; }

/* ── เมนู ••• : แผ่นเลื่อนขึ้นจากล่าง ─────────────────────────────── */
body .menu-dropdown {
  position: fixed; inset: 0; top: 0; right: 0; z-index: 600;
  min-width: 0; border-radius: 0; box-shadow: none; overflow: hidden;
  background: rgba(27,35,59,.31);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: mdFade .2s ease-out;
}
body .menu-dropdown.hidden { display: none; }
body .menu-sheet {
  width: 100%; max-width: 480px; max-height: 88dvh; overflow-y: auto;
  background: #fff; border-radius: 30px 30px 0 0;
  padding: 10px 22px max(24px, env(safe-area-inset-bottom));
  box-shadow: 0 -5px 35px rgba(0,0,0,.07);
  animation: mdUp .25s ease-out;
}
body .menu-sheet-top { height: 36px; position: relative; display: flex; justify-content: center; }
body .menu-handle { width: 38px; height: 4px; border-radius: 8px; background: #E7E9ED; margin-top: 3px; }
body .menu-close {
  position: absolute; right: -6px; top: 0; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: #F6F6F7; color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
body .menu-close svg { width: 18px; height: 18px; }
body .menu-sheet-title { font-size: 22px; font-weight: 800; color: var(--ink); margin: 8px 0 16px; }
body .menu-sheet .menu-dd-item {
  width: 100%; min-height: 56px; padding: 10px 18px; margin: 0;
  display: flex; align-items: center; gap: 13px; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; filter: none;
}
body .menu-sheet .menu-dd-item:last-child { border-bottom: 0; }
body .menu-sheet .menu-dd-item:active { background: #FFFBEA; }
body .menu-sheet .menu-dd-item > svg { width: 19px; height: 19px; color: #606B79; flex: none; }
body .menu-sheet .dd-txt { min-width: 0; }
body .menu-sheet .dd-note { font-size: 10px; font-weight: 500; color: var(--muted); }
body .menu-sheet .dd-chev { margin-left: auto; color: #6B7582; display: inline-flex; }
body .menu-sheet .dd-chev svg { width: 16px; height: 16px; }
body .menu-sheet .menu-dd-danger,
body .menu-sheet .menu-dd-danger > svg { color: #B03345; }
@keyframes mdFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mdUp { from { transform: translateY(40px); } to { transform: none; } }
@media (min-width: 700px) {
  body .menu-dropdown { align-items: center; }
  body .menu-sheet { border-radius: 28px; max-height: 85dvh; }
}

/* ── แบนเนอร์โปรโมชั่น: กล่อง 16:9 ตายตัว รูปเต็มไม่ครอป ฉากเบลอเติมขอบ ── */
body .promo-carousel { position: relative; background: #FFF4C0; }
body .promo-slide {
  /* เจ้าของบอกว่า 16:9 หนาเกินไป → 2.2:1 (สูง ~165px บนจอ 390) รูป 16:9 ยังเห็นครบ ขอบข้างเติมฉากเบลอ */
  position: relative; min-width: 100%; aspect-ratio: 2.2 / 1; overflow: hidden; cursor: pointer;
}
body .promo-slide .promo-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: blur(16px) saturate(1.15); transform: scale(1.2); opacity: .85; pointer-events: none;
}
body .promo-slide .promo-fg {
  position: relative; width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 0;
}
body .promo-dots { bottom: 7px; gap: 5px; }
body .promo-dot { width: 6px; height: 6px; background: rgba(255,255,255,.75); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
body .promo-dot.active { width: 18px; background: var(--yellow); }

/* ── แผ่นเลื่อนขึ้นจากล่าง (ทุกหน้าต่างย่อย) ตามต้นแบบ dialog ───────── */
body .modal-overlay {
  background: rgba(27,35,59,.31);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  justify-content: center;
}
body .modal-overlay .modal-sheet {
  width: 100%; max-width: 480px;
  background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none;
  border-radius: 30px 30px 0 0; box-shadow: 0 -5px 35px rgba(0,0,0,.07);
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  color: var(--ink);
}
body .modal-overlay .modal-handle { width: 38px; height: 4px; border-radius: 8px; background: #E7E9ED; margin: 10px auto 14px; }
body .modal-overlay .modal-title {
  font-size: 22px; font-weight: 800; letter-spacing: -.3px; color: var(--ink);
  padding: 0 52px 14px 16px; border: 0;
}
body .modal-overlay .modal-x { background: #F6F6F7; color: var(--ink); }
/* หน้าต้อนรับมีปุ่มภาษามุมขวาอยู่แล้ว ปุ่มปิดที่ JS เติมให้ทับกันพอดี → ย้ายปุ่มภาษาไปซ้าย */
body .welcome-sheet .btn-welcome-lang { left: 16px; right: auto; }
body .modal-body-scroll { max-height: 70vh; overflow-y: auto; padding: 0 16px 8px; }
body .modal-close-link {
  display: block; text-align: center; margin-top: 10px; padding: 10px;
  font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none;
}
body .btn-soft {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 16px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--pale); color: #8A4A00; font-size: 13px; font-weight: 700;
}
body .btn-soft svg { width: 18px; height: 18px; }

/* ── สรุปออเดอร์ / ตะกร้า ─────────────────────────────────────────── */
body #modal-checkout .checkout-house {
  margin: 0 16px 14px; padding: 14px; gap: 12px;
  background: #FFF7D7; border-radius: 18px; border: 0;
}
body #modal-checkout .checkout-house .icon {
  width: 40px; height: 40px; border-radius: 14px; background: #fff; color: var(--orange);
  display: flex; align-items: center; justify-content: center; flex: none; font-size: 0;
}
body #modal-checkout .checkout-house .icon svg { width: 22px; height: 22px; }
body #modal-checkout .checkout-house .label { color: #655622 !important; font-size: 11px !important; }
body #modal-checkout .checkout-house .name { color: var(--ink); font-size: 15px !important; }

body #modal-checkout .cart-items { padding: 0 16px; }
/* กฎเก่า align-items:center + flex-direction:column → ทุกแถวหดแล้วไปกองกลาง ต้อง stretch */
body #modal-checkout .cart-item { padding: 14px 0; border-bottom: 1px solid var(--line); gap: 6px; align-items: stretch; }
body #modal-checkout .ci-main { gap: 10px; }
body #modal-checkout .cart-item:last-child { border-bottom: 0; }
body #modal-checkout .ci-emoji { display: none; }
body #modal-checkout .ci-name { font-size: 14px; font-weight: 700; color: var(--ink); }
body #modal-checkout .ci-price { font-size: 14px; font-weight: 800; color: var(--ink); white-space: nowrap; }
body #modal-checkout .ci-opts { margin: 0; color: var(--muted); }
body #modal-checkout .ci-sbtn {
  width: 32px; height: 32px; border-radius: 11px; border: 0; font-size: 19px;
  background: #F3F4F6; color: var(--ink);
}
body #modal-checkout .ci-stepper .ci-sbtn:last-child { background: var(--pale); color: #9D6B00; }
body #modal-checkout .ci-snum { min-width: 36px; font-size: 13px; }
body #modal-checkout .ci-edit { color: #8A4A00; font-size: 12px; }
body #modal-checkout .ci-remove { color: #B03345; font-size: 12px; }
body #modal-checkout .co-clear-cart {
  background: none; border: 0; color: var(--muted); font-size: 12px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
}

body #modal-checkout .checkout-total {
  margin: 14px 16px !important; padding: 14px 16px;
  background: #F7F8FA; border-radius: 18px; box-shadow: none;
}
body #modal-checkout .ct-row { font-size: 13px; color: var(--muted); }
body #modal-checkout .ct-row span:last-child { color: var(--ink); font-weight: 600; }
body #modal-checkout .ct-row.grand {
  border-top: 1px solid #E8EAF0 !important; padding-top: 10px !important; margin-top: 2px;
  font-size: 17px !important; color: var(--ink);
}
body #modal-checkout .ct-row.grand span { font-weight: 800; color: var(--ink); }

body #modal-checkout .promo-area { margin: 0 16px 12px; }
body #modal-checkout .promo-row input,
body #modal-checkout .note-area textarea,
body #modal-checkout .contact-area input[type="tel"],
body #modal-checkout .gift-input,
body #modal-checkout .rb-input,
body #modal-checkout .geo-note {
  border: 1px solid #E8EAF0; border-radius: 14px; background: #FCFCFD;
  padding: 12px 14px; font-size: 13px; color: var(--ink); min-height: 46px; box-shadow: none;
}
body #modal-checkout .promo-row input:focus,
body #modal-checkout .note-area textarea:focus,
body #modal-checkout .contact-area input[type="tel"]:focus,
body #modal-checkout .gift-input:focus { outline: 2px solid #FFC936; border-color: #FFC936; }
body #modal-checkout .promo-btn {
  border: 0; border-radius: 14px; min-height: 46px; padding: 0 16px;
  background: var(--yellow); color: var(--ink); font-weight: 700; font-size: 13px;
}

body #modal-checkout .note-area { margin: 12px 16px 0; padding: 0; background: none; }
body #modal-checkout .note-area label,
body #modal-checkout .contact-area label,
body #modal-checkout .payment-methods h4,
body #modal-checkout .co-sm-title,
body #modal-checkout .co-sched-title {
  display: block; font-size: 12px; font-weight: 600; color: var(--ink); margin: 0 0 7px;
}
body #modal-checkout .note-area textarea { width: 100%; resize: vertical; }

body #modal-checkout .gift-toggle {
  border: 1px solid #EEEEF1; border-radius: 16px; background: #fff; padding: 14px;
}
body #modal-checkout .gift-toggle.on { border-color: var(--yellow); background: #FFFBEA; }
body #modal-checkout .gift-toggle.on .gift-tog-box { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
body #modal-checkout .gift-tog-sub { color: var(--muted); }

body #modal-checkout .geo-area { padding: 12px 16px 0; }
body #modal-checkout .btn-geo {
  width: 100%; min-height: 46px; border-radius: 14px; padding: 11px 14px;
  border: 1px solid #E8EAF0; background: #fff; color: var(--ink);
  font-size: 13px; font-weight: 600; box-shadow: none;
}
body #modal-checkout .btn-geo-pin { margin-top: 8px; background: #FFFBEA; border-color: #FFE7A0; color: #6A4300; }
body #modal-checkout .geo-tip { font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.55; }

body #modal-checkout .payment-methods { margin: 16px 16px 0 !important; }
body #modal-checkout .pm-option {
  gap: 12px; padding: 13px 14px; margin-bottom: 8px;
  border: 1.5px solid #EEEEF1; border-radius: 16px; background: #fff;
}
body #modal-checkout .pm-option.selected { border-color: var(--yellow); background: #FFFBEA; }
body #modal-checkout .pm-icon {
  width: 40px; height: 40px; border-radius: 14px; background: #F3F4F6; color: #606B79;
  display: flex; align-items: center; justify-content: center; flex: none; font-size: 0;
}
body #modal-checkout .pm-option.selected .pm-icon { background: var(--pale); color: #8A4A00; }
body #modal-checkout .pm-icon svg { width: 22px; height: 22px; }
body #modal-checkout .pm-option > div { flex: 1; min-width: 0; }
body #modal-checkout .pm-label { font-size: 14px; color: var(--ink); }
body #modal-checkout .pm-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
body #modal-checkout .pm-check {
  width: 22px; height: 22px; border-radius: 50%; background: var(--yellow); color: var(--ink);
  font-size: 12px; font-weight: 800; align-items: center; justify-content: center;
}
body #modal-checkout .pm-option.selected .pm-check { display: flex; }
body #modal-checkout .promptpay-qr { border-radius: 18px; background: #F7F8FA; }

body #modal-checkout .co-cancel-line {
  padding: 0 16px; margin-top: 12px; text-align: center; font-size: 12px; color: var(--muted);
}
body #modal-checkout #co-cancel-link { color: #B03345; font-weight: 600; }
body #modal-checkout .btn-confirm-order {
  width: calc(100% - 32px); margin: 14px 16px 0; min-height: 52px; padding: 14px 18px;
  border-radius: 18px; font-size: 15px; font-weight: 800; letter-spacing: 0; color: var(--ink);
  background: linear-gradient(110deg, #FFE679, #FFCA25) !important;
  box-shadow: 0 4px 12px rgba(206,157,23,.16);
}
body #modal-checkout .btn-confirm-order:disabled {
  background: #F3F4F6 !important; color: #606B79; box-shadow: none !important;
}

/* หน้าต่างเลือกตัวเลือกเมนู */
body #modal-options .btn-add-cart {
  border-radius: 18px; min-height: 52px; color: var(--ink);
  background: linear-gradient(110deg, #FFE679, #FFCA25); box-shadow: 0 4px 12px rgba(206,157,23,.16);
}
body #modal-options .opt-pick-group { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
body #modal-options .opt-pick-name { font-size: 14px; color: var(--ink); }
body #modal-options .opt-pick-row { border-radius: 14px; border-color: #EEEEF1; }
body #modal-options .opt-pick-row input { accent-color: #E8A600; }
body .shops-list .soon-ui { grid-column: 1 / -1; }
body .soon-ui p b { color: var(--ink); font-size: 15px; }
body .shop-mini-closed { display: inline-flex; align-items: center; gap: 4px; }
body #modal-options .opt-pick-row.selected { border-color: var(--yellow); background: #FFFBEA; }
body #modal-options .opt-pick-price { color: #8A4A00; }

/* ── ติดตามออเดอร์ ───────────────────────────────────────────────── */
body .od-head { margin: 2px 0 16px; }
body .od-eta {
  display: flex; align-items: center; gap: 12px;
  background: #FFF7D7; border-radius: 20px; padding: 14px 16px; margin-bottom: 16px;
}
body .od-eta img { width: 56px; height: 56px; object-fit: contain; flex: none; }
body .od-eta-k { font-size: 11px; font-weight: 600; color: #655622; }
body .od-eta-v { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.3; }
body .od-eta-line { font-size: 12px; color: var(--ink); }
body .od-eta-note { font-size: 10px; color: #7A6A33; margin-top: 3px; }
body .od-steps { list-style: none; margin: 0 0 14px; padding: 0 2px; }
body .od-steps li { position: relative; display: flex; gap: 12px; padding: 0 0 18px; }
body .od-steps li:not(:last-child)::before {
  content: ''; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px;
  border-radius: 2px; background: #ECEDF0;
}
body .od-steps li.done:not(:last-child)::before { background: #FFD43B; }
body .od-steps i {
  width: 24px; height: 24px; border-radius: 50%; flex: none; font-style: normal;
  display: flex; align-items: center; justify-content: center;
  background: #F1F2F4; color: #8A93A0; font-size: 12px; font-weight: 800;
}
body .od-steps li.done i { background: #FFF1AC; color: #9D7200; }
body .od-steps li.active i { background: var(--yellow); box-shadow: 0 0 0 5px rgba(255,212,59,.28); }
body .od-steps b { display: block; font-size: 14px; font-weight: 600; color: #8A93A0; line-height: 24px; }
body .od-steps li.done b { color: var(--ink); }
body .od-steps li.active b { color: var(--ink); font-weight: 800; }
body .od-steps small { display: block; font-size: 11px; color: var(--muted); }
body .od-cancel {
  background: #FFF0F1; border-radius: 18px; padding: 16px; text-align: center; margin-bottom: 14px; color: #A93746;
}
body .od-cancel b { font-size: 16px; font-weight: 800; }
body .od-cancel p { font-size: 13px; margin: 6px 0 0; }
body .od-cancel small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
body .od-post { background: #F7F8FA; border-radius: 18px; padding: 14px 16px; margin-bottom: 14px; }
body .od-post-no { font-size: 19px; font-weight: 800; letter-spacing: .5px; word-break: break-all; margin-top: 2px; }
body .od-post small { display: block; font-size: 11px; color: var(--muted); margin: 4px 0 10px; }
body .od-post-wait { font-size: 13px; color: #655622; background: #FFF7D7; }
body .od-items { border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; }
body .od-item { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink); padding: 4px 0; }
body .od-qty, body .od-none { color: var(--muted); }
body .od-total {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
body .od-total b { font-size: 18px; font-weight: 800; color: var(--ink); }
body .od-total b small { font-size: 12px; font-weight: 600; }
body .od-refresh { width: 100%; margin-top: 14px; }
body .od-chat { margin-top: 16px; }
/* กล่องแชทออเดอร์ (orderChat.js ใช้ร่วมกับแอปไรเดอร์/ร้าน → ปรับเฉพาะ CSS ฝั่งลูกค้า ไม่แตะ JS) */
body #modal-order-detail .ocw { border: 1px solid var(--line); border-radius: 20px; background: #fff; }
body #modal-order-detail .ocw-hd { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--ink); }
body #modal-order-detail .ocw-msgs { background: #FCFCFD; }
body #modal-order-detail .ocw-row.me .ocw-bub { background: #FFF1B2; color: var(--ink); }
body #modal-order-detail .ocw-in { border-top: 1px solid var(--line); }
body #modal-order-detail .ocw-in input.ocw-text { border-radius: 14px; }
body #modal-order-detail .ocw-in input.ocw-text:focus { border-color: #FFC936; }
body #modal-order-detail .ocw-send,
body #modal-order-detail .ocw-vplay { background: var(--yellow); color: var(--ink); }
body #modal-order-detail .ocw-vfill { background: var(--orange); }

/* ── หน้ารายละเอียดร้าน ───────────────────────────────────────────── */
/* หัวแอปไม่ตรึงแล้ว → แถบหัวร้านตรึงที่ขอบบนสุด ไม่ใช่ใต้หัวแอป */
body #view-shop-detail .shop-detail-bar {
  top: 0; height: 58px; padding: 0 16px; gap: 10px; z-index: 6;
  background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
body #view-shop-detail .btn-back-shop {
  min-height: 40px; padding: 0 14px; border-radius: 16px; flex: none;
  background: #F6F6F7; color: var(--ink); font-size: 13px; font-weight: 700;
  box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
}
body #view-shop-detail .sd-title { font-size: 16px; font-weight: 800; color: var(--ink); text-align: right; }

body #view-shop-detail .shop-detail-info { padding: 14px 16px 0; }
body #view-shop-detail .shop-detail-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--card-shadow); padding: 18px; gap: 14px;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
body #view-shop-detail .shop-info-top { display: flex; gap: 14px; align-items: flex-start; }
body #view-shop-detail .shop-photo-lg {
  width: 80px; height: 80px; border-radius: 22px; background: #FFF3B7; flex: none;
}
body #view-shop-detail .shop-photo-lg .sh-art { width: 70px; height: 70px; transform: rotate(-6deg); }
body #view-shop-detail .shop-info-text { min-width: 0; flex: 1; }
body #view-shop-detail .shop-name-lg { font-size: 19px; font-weight: 800; color: var(--ink); line-height: 1.35; }
body #view-shop-detail .shop-sub-lg { font-size: 11px; color: var(--muted); }
body #view-shop-detail .shop-meta,
body #view-shop-detail .shop-meta-row { font-size: 12px; color: var(--muted); margin-top: 5px; }
body #view-shop-detail .shop-meta b { color: var(--ink); }
body #view-shop-detail .shop-hours-section.side {
  border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; margin: 0; min-width: 0;
}
body #view-shop-detail .hours-fold > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 36px; }
body #view-shop-detail .hours-sum-main { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); }
body #view-shop-detail .hours-sum-main svg { width: 16px; height: 16px; color: var(--muted); }
body #view-shop-detail .hours-more { color: #8A4A00; }
body #view-shop-detail .hours-time { color: #226551; }
body #view-shop-detail .hours-closed-text { color: #A93746; }
body #view-shop-detail .shop-hours-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
body #view-shop-detail .hours-allday { background: #EAF7EF; color: #226551; border: 0; border-radius: 12px; padding: 10px 12px; font-size: 12px; font-weight: 600; }
body #view-shop-detail .sdr-btn {
  border: 0; border-radius: 14px; min-height: 44px; padding: 10px 16px; width: 100%;
  background: var(--pale); color: #8A4A00; font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
body #view-shop-detail .sdr-btn svg { width: 17px; height: 17px; }
body #view-shop-detail .shop-detail-card:has(.sdr-head) { display: block; }
body #view-shop-detail .sdr-head { font-size: 16px; font-weight: 800; color: var(--ink); }
body #view-shop-detail .sdr-score b { color: #D78A00; }
body #view-shop-detail .sdr-item { border-top: 1px solid var(--line); padding-top: 10px; }

/* หมวดในร้าน: เดิมเป็นแถบตั้งด้านซ้าย กินที่ 82px บนจอมือถือ ราคาโดนบีบขึ้นสองบรรทัด
   → เป็นชิปแถวเดียวเลื่อนข้างได้ ตรึงใต้แถบหัวร้าน (ฟังก์ชัน selectCat เดิมทุกอย่าง) */
body #view-shop-detail .food-section { display: block; }
body #view-shop-detail #cat-sidebar {
  position: sticky; top: 58px; z-index: 5; width: auto; max-height: none;
  display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  padding: 12px 16px 10px; margin: 0; background: rgba(255,255,255,.96);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 0; box-shadow: none;
}
body #view-shop-detail #cat-sidebar::-webkit-scrollbar { display: none; }
body #view-shop-detail #cat-sidebar.hidden { display: none; }
body #view-shop-detail #cat-sidebar .cat-item {
  flex: none; margin: 0; padding: 10px 17px; min-height: 40px; border-radius: 16px;
  border: 1px solid #EEEEF1; background: #fff; color: var(--ink);
  font-size: 12px; font-weight: 500; line-height: 1.4; white-space: nowrap;
  transform: none; box-shadow: none; display: flex; align-items: center;
}
body #view-shop-detail #cat-sidebar .cat-item .cat-icon { display: none; }
body #view-shop-detail #cat-sidebar .cat-item.active {
  background: var(--yellow); border-color: var(--yellow); font-weight: 700;
  box-shadow: 0 3px 10px rgba(231,185,46,.13);
}
body #view-shop-detail .food-list { padding: 4px 16px 0; background: none; }
body #view-shop-detail .menu-cat-header {
  position: static; margin: 18px 0 10px; padding: 0; background: none; border: 0; box-shadow: none;
  font-size: 16px; font-weight: 800; color: var(--ink);
}
body #view-shop-detail .menu-cat-header:first-child { margin-top: 6px; }
body #view-shop-detail .food-item {
  display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 12px;
  background: #fff; border: 1px solid #F0EDE7; border-radius: 20px; box-shadow: var(--card-shadow);
}
body #view-shop-detail .food-emoji-wrap {
  width: 76px; height: 76px; border-radius: 18px; flex: none;
  background: #FFF8DC; box-shadow: none; font-size: 36px;
}
body #view-shop-detail .food-emoji-wrap > * { filter: none; }
body #view-shop-detail .food-art { width: 62px; height: 62px; object-fit: contain; }
body #view-shop-detail .food-name {
  font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.4; white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
body #view-shop-detail .food-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; margin-top: 4px; }
body #view-shop-detail .food-price { font-size: 16px; font-weight: 800; color: var(--ink); white-space: nowrap; }
body #view-shop-detail .food-orders { font-size: 10px; color: var(--muted); background: none; padding: 0; }
body #view-shop-detail .qty-ctrl { gap: 6px; }
body #view-shop-detail .qty-btn {
  width: 34px; height: 34px; border-radius: 12px; border: 0; box-shadow: none;
  font-size: 20px; font-weight: 700; line-height: 1;
}
body #view-shop-detail .qty-btn.plus { background: var(--pale); color: #9D6B00; }
body #view-shop-detail .qty-btn.minus { background: #F3F4F6; color: var(--ink); }
body #view-shop-detail .qty-num { font-size: 14px; min-width: 18px; }

/* ── จอเล็ก ≤360px ────────────────────────────────────────────────── */
@media (max-width: 360px) {
  body .app-header { padding-left: 14px; padding-right: 14px; }
  body .header-logo-box { width: 46px; height: 46px; border-radius: 13px; }
  body .header-brand { font-size: 26px; }
  body .brand-sub { font-size: 10px; }
  body .header-right { gap: 4px; }
  body .cat-tile .cat-icon, body .cat-tile .cat-icon-img { width: 50px; height: 50px; }
  body .cat-tile .cat-name { font-size: 10px; }
  body .nav-icon.icon-well { width: 54px; }
  body .shop-card .sh-name { font-size: 14px; }
  body .checkin-card .checkin-days { gap: 3px; }
  body .checkin-day i { width: 28px; height: 28px; font-size: 11px; }
  body .profile-header.profile-banner { padding: 17px; }
  body .profile-banner .profile-avatar { width: 60px; height: 60px; border-radius: 20px; }
  body .profile-banner .profile-name { font-size: 19px; }
  body .profile-banner .profile-points-pill { font-size: 10px; padding: 8px; }
  body .page-title h1 { font-size: 23px; }
  body .page-title img { width: 60px; height: 60px; }
  body .order-card { padding: 16px; }
  body .cart-bar, body .cart-bar:not(.hidden) { padding: 12px 14px; width: calc(100% - 24px); }
  body .cart-bar .cart-label { display: none; }
  body .cart-bar .ct-grand { font-size: 16px; }
  body #view-shop-detail .food-emoji-wrap { width: 64px; height: 64px; }
  body #view-shop-detail .food-art { width: 52px; height: 52px; }
  body #view-shop-detail .shop-photo-lg { width: 66px; height: 66px; border-radius: 18px; }
  body #view-shop-detail .btn-back-shop { padding: 0 10px; font-size: 12px; }
  body .modal-overlay .modal-title { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  body *, body *::before, body *::after { animation: none !important; transition: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   รอบปรับความเข้ม (2 ต.ค. 69) — เจ้าของส่งภาพอ้างอิงที่สีสดและตัวหนังสือเข้มกว่าต้นแบบ
   วางท้ายไฟล์ ตัวเลือกความเจาะจงเท่ากฎด้านบน → กฎชุดนี้ชนะ ลบทั้งก้อนเพื่อถอยกลับได้
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --ink:   #141B24;
  --muted: #3F4956;   /* ข้อความรอง: เดิม #505B69 จางไปบนจอมือถือกลางแดด */
  --yellow: #FFC928;
}
/* หัวแอป */
body .brand-sub { font-size: 12px; font-weight: 600; color: #3A4350; }
body .loc-btn { font-weight: 700; color: var(--ink); }
body .loc-btn .loc-caret { color: var(--ink); stroke-width: 2.4; }
body .loc-hours { font-size: 13px; font-weight: 600; color: #2B3440; }
body .loc-hours svg { color: #2B3440; }

/* ช่องค้นหา: ขอบเหลืองเข้ม หนาขึ้น มีแสงเรือง */
body .search-inner {
  border: 2px solid #FFC928;
  box-shadow: 0 4px 14px rgba(255,190,0,.22);
}
body .search-inner input::placeholder,
body #search-input::placeholder { color: #4D5765; }

/* ปุ่มสลับร้านค้า/อาหาร: ปุ่มที่เลือกเหลืองทึบ ตัวหนังสือเข้ม */
body .home-tabs { border: 2px solid #FFE38A; box-shadow: 0 4px 12px rgba(255,190,0,.14); }
body .home-tab { color: #2F3946; font-weight: 600; font-size: 15px; }
body .home-tab.active {
  background: linear-gradient(115deg, #FFD43B, #FFC21A);
  color: var(--ink); font-weight: 800;
  box-shadow: 0 3px 10px rgba(240,170,0,.28);
}

/* หัวข้อส่วน + ลิงก์ */
body .sec-head h2 { font-size: 20px; font-weight: 800; color: var(--ink); }
body .text-link { color: #E07800; font-weight: 700; font-size: 13px; }

/* หมวดหมู่: ป้ายชื่อเข้มและใหญ่ขึ้น ไอคอนมีเงานุ่มให้ดูนูน */
body .cat-tile .cat-name { font-size: 12px; font-weight: 600; color: var(--ink); }
body .cat-tile .cat-icon-img { filter: drop-shadow(0 4px 5px rgba(150,100,0,.18)); }
body .cat-tile.selected { background: #FFF1BF; }
body .cat-tile.selected .cat-name { color: #9A5200; font-weight: 800; }

/* การ์ดร้าน */
body .shops-list .shop-card .sh-name,
body .shop-card .sh-name { font-weight: 800; color: var(--ink); }
body .shop-card .sh-status { color: #2F3946; font-weight: 600; }

/* เมนูล่าง: ไอคอนสีเต็ม (เดิมลดความสด .7 + ย่อ .9 ทำให้ดูซีดและเบลอ) ป้ายเข้มขึ้น */
body .nav-icon.icon-well img { filter: drop-shadow(0 3px 4px rgba(150,100,0,.16)); transform: none; }
body .nav-btn { color: #2B3440; font-weight: 600; font-size: 11px; }
body .nav-btn.active { color: #E07800; font-weight: 800; }
body .nav-btn.active .icon-well { background: linear-gradient(135deg, #FFF3C4, #FFE48A); }
body .nav-btn.active .icon-well img { filter: drop-shadow(0 4px 5px rgba(150,100,0,.22)); }
body .nav-btn.active .icon-well::after { background: #E07800; }

/* ตะกร้า: ป้ายจำนวนเหลืองเข้มเท่ากัน */
body .cart-bar .cart-count-badge { background: #FFC928; color: var(--ink); }
/* ⚠️ style.css มี #hero-badge.is-closed (ใช้ id) ทาพื้นดำ — ต้องใช้ id ด้วยถึงจะชนะ
   ตอนปิดรับให้เป็นตัวหนังสือแดงเฉย ๆ เหมือนตอนเปิด ไม่ใช่กล่องดำทึบ */
body #hero-badge.is-closed { background: none; color: #B03345; padding: 0; box-shadow: none; }
body #hero-badge.is-closed svg { color: #B03345; }

/* ── หน้าต้อนรับ (ผู้เข้าชมครั้งแรก) ─────────────────────────────── */
body .welcome-sheet { padding: 10px 22px max(24px, env(safe-area-inset-bottom)); text-align: center; }
body .welcome-logo { margin: 18px 0 10px; }
body .welcome-logo img {
  width: 96px; height: 96px; border-radius: 28px; object-fit: cover;
  box-shadow: 0 8px 22px rgba(200,140,0,.22);
}
body .welcome-title { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -.3px; }
body .welcome-sub { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 4px; }
body .welcome-benefits {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  background: #FFF7D7; border: 0; border-radius: 22px; padding: 10px 14px; margin: 18px 0;
}
body .wb-item {
  display: flex; align-items: center; gap: 12px; padding: 6px 0;
  font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.45;
}
body .wb-item img {
  width: 40px; height: 40px; object-fit: contain; flex: none;
  filter: drop-shadow(0 3px 4px rgba(150,100,0,.18));
}
body .welcome-sheet .btn-welcome-register,
body .welcome-sheet .btn-welcome-guest {
  width: 100%; min-height: 52px; border-radius: 18px; margin: 0 0 10px;
  font-size: 15px; font-weight: 800; letter-spacing: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
body .welcome-sheet .btn-welcome-register {
  background: linear-gradient(110deg, #FFD43B, #FFC21A) !important; color: var(--ink); border: 0;
  box-shadow: 0 4px 12px rgba(240,170,0,.28);
}
body .welcome-sheet .btn-welcome-login {
  background: #FFF7D7; color: #8A4A00; border: 2px solid #FFC928; box-shadow: none;
}
body .welcome-sheet #welcome-btn-guest {
  background: #fff; color: var(--ink); border: 1.5px solid #E6E8EC; box-shadow: none; font-weight: 700;
}
body .welcome-foot { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 6px; }
body .welcome-sheet .btn-welcome-lang {
  top: 14px; height: 36px; padding: 0 14px; border-radius: 16px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 700; font-size: 13px;
  box-shadow: 0 3px 10px rgba(0,0,0,.05);
}

/* ── แชทตอนยังไม่ล็อกอิน ─────────────────────────────────────────── */
body #tab-chat .cc-login { padding: 48px 24px 24px; text-align: center; }
body #tab-chat .cc-login-art {
  width: 110px; height: 110px; object-fit: contain; display: block; margin: 0 auto 14px;
  filter: drop-shadow(0 6px 8px rgba(150,100,0,.18));
}
body #tab-chat .cc-login h2 { font-size: 22px; font-weight: 800; color: var(--ink); margin: 0 0 6px; }
body #tab-chat .cc-login p {
  font-size: 13px; font-weight: 500; color: var(--muted); line-height: 1.6;
  margin: 0 auto 18px; max-width: 290px; white-space: normal;
}
body #tab-chat .cc-login-btn {
  min-height: 50px; padding: 12px 28px; border-radius: 18px; font-size: 15px; font-weight: 800;
  background: linear-gradient(110deg, #FFD43B, #FFC21A); color: var(--ink);
  box-shadow: 0 4px 12px rgba(240,170,0,.28);
}

/* ── เข้าสู่ระบบด้วย Google / Facebook / Apple ───────────────────── */
body .social-login[hidden] { display: none; }
body .social-login { margin: 4px 0 14px; }
body .sl-btns { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
body .sl-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 16px; border-radius: 999px; cursor: pointer;
  font-size: 14px; font-weight: 700; line-height: 1.2;
}
body .sl-btn:disabled { opacity: .55; cursor: default; }
body .sl-ic { width: 22px; height: 22px; display: inline-flex; flex: none; }
body .sl-ic svg { width: 22px; height: 22px; }
/* สีตามแนวทางแบรนด์ของแต่ละเจ้า */
body .sl-btn.sl-facebook { background: #1877F2; color: #fff; border: 0; }
body .sl-btn.sl-facebook .sl-ic svg circle { fill: #fff; }
body .sl-btn.sl-facebook .sl-ic svg path { fill: #1877F2; }
body .sl-btn.sl-apple { background: #000; color: #fff; border: 0; }
body .sl-btn.sl-google { background: #fff; color: #1F1F1F; border: 1px solid #747775; }
body .sl-gslot { display: flex; justify-content: center; min-height: 44px; }
body .sl-or {
  display: flex; align-items: center; gap: 10px; margin: 14px 0 4px;
  font-size: 12px; font-weight: 600; color: var(--muted);
}
body .sl-or::before, body .sl-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
/* หน้าต้อนรับ: ปุ่มกลมแถวเดียว */
body .sl-btns.compact { flex-direction: row; justify-content: center; gap: 14px; margin: 6px 0 2px; }
body .sl-btns.compact .sl-btn { width: 48px; min-height: 48px; height: 48px; padding: 0; }
body .sl-btns.compact .sl-btn.sl-facebook { background: #fff; border: 1px solid #DADCE0; }
body .sl-btns.compact .sl-btn.sl-facebook .sl-ic svg circle { fill: #1877F2; }
body .sl-btns.compact .sl-btn.sl-facebook .sl-ic svg path { fill: #fff; }
body .sl-btns.compact .sl-gslot { min-height: 48px; align-items: center; }
body .welcome-sheet .social-login { margin: 0 0 6px; }
/* หน้าสมัคร/เข้าสู่ระบบ: ปุ่มหลักเหลืองแบบเดียวกับทั้งแอป */
body #modal-register .btn-submit-reg {
  min-height: 52px; border-radius: 18px; font-size: 15px; font-weight: 800; letter-spacing: 0; color: var(--ink);
  background: linear-gradient(110deg, #FFD43B, #FFC21A) !important; box-shadow: 0 4px 12px rgba(240,170,0,.28);
}
body #modal-register .btn-otp-help { color: #8A4A00; font-weight: 600; }
body #modal-register .sl-btn { min-height: 44px; font-size: 14px; }
/* ปุ่มเข้าสู่ระบบทุกเจ้ากว้าง/สูงเท่าปุ่มทางการของ Google (large = สูง 40px) */
body .sl-btns:not(.compact) { align-items: center; }
body .sl-btns:not(.compact) > .sl-btn,
body .sl-btns:not(.compact) > .sl-gslot { width: var(--sl-w, 100%); max-width: 100%; }
body .sl-btns:not(.compact) > .sl-btn { min-height: 40px; height: 40px; padding: 0 14px; font-size: 14px; }
body #modal-register .sl-btn { min-height: 40px; }
body .sl-gslot { min-height: 40px; }

/* ═══════════════════════════════════════════════════════════════════
   เรียกรถแบบ Grab (js/trip.js) — 2 ต.ค. 69
   หน้าเต็มจอ: แผนที่เต็มจอ + แผ่นล่าง (จองรถ / ติดตามทริป) + ปุ่มลอย "ทริปของคุณ"
   z-index 295: อยู่เหนือเมนูล่าง/แถบตะกร้า (ซ่อนด้วย body.sw-trip-open อยู่แล้ว)
   แต่ต่ำกว่าหน้าต่าง modal (300) — หน้าเข้าสู่ระบบต้องเด้งทับหน้าเรียกรถได้
   ═══════════════════════════════════════════════════════════════════ */
body.sw-trip-open { overflow: hidden; }
body.sw-trip-open .bottom-nav,
body.sw-trip-open .cart-bar,
body.sw-trip-open .trip-pill { display: none !important; }

body .tv {
  position: fixed; inset: 0; z-index: 295; isolation: isolate;
  background: #E9ECEF; color: var(--ink); overflow: hidden;
  height: 100vh; height: 100dvh;
}
body .tv[hidden] { display: none; }
@media (min-width: 700px) {
  body .tv { left: calc(50% - 240px); right: auto; width: 480px; box-shadow: 0 0 40px rgba(0,0,0,.12); }
}
body .tv-map { position: absolute; inset: 0; z-index: 0; background: #E9ECEF; }
body .tv .leaflet-top { top: 68px; }
body .tv .leaflet-control-attribution { font-size: 9px; background: rgba(255,255,255,.75); }

/* แถบบน: ปุ่มกลับ / ชื่อ / สลับชั้นแผนที่ ลอยบนแผนที่ */
body .tv-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: max(12px, env(safe-area-inset-top)) 16px 0;
  pointer-events: none;
}
body .tv-top > * { pointer-events: auto; }
body .tv-fab {
  width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; color: var(--ink); box-shadow: 0 3px 12px rgba(20,27,36,.18);
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
body .tv-fab svg { width: 22px; height: 22px; }
body .tv-title {
  margin: 0 auto; padding: 9px 16px; border-radius: 999px; background: #fff;
  font-size: 15px; font-weight: 800; color: var(--ink); line-height: 1.3;
  box-shadow: 0 3px 12px rgba(20,27,36,.14); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
}
body .tv-maphint {
  position: absolute; z-index: 2; left: 16px; right: 16px; top: calc(max(12px, env(safe-area-inset-top)) + 56px);
  margin: 0 auto; max-width: 340px; padding: 9px 14px; border-radius: 14px; text-align: center;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.45;
  box-shadow: 0 4px 14px rgba(20,27,36,.25); pointer-events: none;
}
body .tv-maphint[hidden] { display: none; }

/* แผ่นล่าง */
body .tv-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  max-height: 64vh; max-height: 64dvh; overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border-radius: 28px 28px 0 0;
  box-shadow: 0 -6px 30px rgba(20,27,36,.14);
  padding: 0 16px max(16px, env(safe-area-inset-bottom));
}
body .tv-sheet.track { max-height: 60vh; max-height: 60dvh; }   /* เหลือแผนที่ให้เห็นหมุดคนขับ ~40% */
body .tv-handle { width: 38px; height: 4px; border-radius: 8px; background: #E1E4E8; margin: 10px auto 12px; }

/* จุดรับ/จุดหมาย */
body .tv-route { border: 1px solid var(--line); border-radius: 20px; padding: 6px 12px 12px; }
body .tv-stop { display: flex; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--line); }
body .tv-route > .tv-stop:nth-of-type(2) { border-bottom: 0; }   /* nth-of-type: ข้ามคำเตือนจุดรับ (p) ที่แทรกระหว่างสองแถว */
/* ยังไม่รู้จุดรับ (ไม่มี GPS/ไม่มีบ้าน) — คำเตือนใต้แถวจุดรับ + ช่องป้ายชื่อสีเตือน */
body .tv-pickhint {
  margin: 8px 0 4px; padding: 9px 12px; border-radius: 12px;
  background: #FFF6DB; color: #7A4B00; font-size: 13px; font-weight: 700; line-height: 1.45;
}
body .tv-pickhint[hidden] { display: none; }
body .tv-stop-body input.warn::placeholder { color: #B26A00; opacity: 1; }
body .tv-dot { width: 14px; height: 14px; flex: none; border-radius: 50%; }
body .tv-dot.pickup { background: #12A150; box-shadow: 0 0 0 4px #DDF4E6; }
body .tv-dot.drop { background: var(--ink); box-shadow: 0 0 0 4px #FFF1BF; border-radius: 4px; }
body .tv-stop-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
body .tv-stop-body label { font-size: 11px; font-weight: 700; color: var(--muted); margin-top: 6px; }
body .tv-stop-body input {
  width: 100%; border: 0; padding: 2px 0 6px; background: none; outline: none;
  font-size: 16px; font-weight: 700; color: var(--ink); min-height: 36px;   /* รวมป้ายชื่อด้านบน (label for) แตะได้สูง > 44px */
}
body .tv-stop-body input:focus { box-shadow: inset 0 -2px 0 #FFC928; }
body .tv-mini {
  width: 44px; height: 44px; flex: none; border: 0; border-radius: 14px; cursor: pointer;
  background: #F1F8F4; color: #0E7A3D; display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
body .tv-mini svg { width: 22px; height: 22px; }
body .tv-mini.busy svg { animation: tvSpin 1s linear infinite; }
@keyframes tvSpin { to { transform: rotate(360deg); } }
body .tv-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 2px 24px; }
body .tv-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border: 1.5px solid #FFE38A; border-radius: 999px; background: #FFFBEA; cursor: pointer;
  font-size: 13px; font-weight: 700; color: #6A4300;
}
body .tv-chip svg { width: 18px; height: 18px; }

body .tv-field { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
body .tv-field label { font-size: 12px; font-weight: 700; color: var(--ink); }
body .tv-input {
  width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid #E3E6EB; border-radius: 14px;
  background: #FCFCFD; font-size: 16px; color: var(--ink); box-shadow: none;
}
body textarea.tv-input { resize: vertical; min-height: 64px; line-height: 1.5; }
body .tv-input:focus { outline: 2px solid #FFC928; border-color: #FFC928; }
body .tv-field[hidden], body .tv-send[hidden] { display: none; }

/* เลือกบริการ */
body .tv-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 18px 2px 10px; }
body .tv-sec h2 { font-size: 17px; font-weight: 800; color: var(--ink); margin: 0; }
/* "ระยะทาง ~X กม. · ~Y นาที (ประมาณ)" ยาวขึ้น (รอบ 3 ต.ค. 69) — ให้ขึ้นบรรทัดใหม่ได้ ไม่ดันจอกว้างเกินมือถือ */
body .tv-dist { font-size: 12px; font-weight: 600; color: var(--muted); text-align: right; min-width: 0; line-height: 1.35; }
body .tv-services { display: flex; flex-direction: column; gap: 8px; }
body .tv-services.loading .tv-svc-fare { opacity: .45; }
body .tv-svc {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 14px;
  border: 1.5px solid #ECEEF1; border-radius: 18px; background: #fff; cursor: pointer; text-align: left;
  color: var(--ink); transition: border-color .15s, background .15s;
}
body .tv-svc.on:not(.off) { border-color: #FFC928; background: #FFFBEA; box-shadow: 0 3px 12px rgba(240,170,0,.14); }
body .tv-svc.off { cursor: default; background: #FAFAFB; }
body .tv-svc.off .tv-svc-ic { background: #F1F2F4; color: #7A8390; }
body .tv-svc.off .tv-svc-txt b, body .tv-svc.off .tv-svc-fare { color: #5E6875; }
body .tv-svc-ic {
  width: 44px; height: 44px; flex: none; border-radius: 14px; background: #FFF4C0; color: #6A4300;
  display: inline-flex; align-items: center; justify-content: center;
}
body .tv-svc-ic svg { width: 26px; height: 26px; }
body .tv-svc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
body .tv-svc-txt b { font-size: 15px; font-weight: 800; }
body .tv-svc-txt small { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 2px; }
body .tv-svc-fare { font-size: 18px; font-weight: 900; color: var(--ink); white-space: nowrap; }
body .tv-qerr {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px;
  background: #FFF0F1; color: #A93746; font-size: 13px; font-weight: 600; line-height: 1.45;
}
body .tv-qerr span { flex: 1; }
body .tv-qerr button {
  min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; cursor: pointer;
  background: #fff; color: #A93746; font-weight: 700; font-size: 13px;
}

body .tv-pay {
  display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px;
  background: #F7F8FA; border-radius: 16px; font-size: 14px; font-weight: 700; color: var(--ink);
}
body .tv-pay svg { width: 22px; height: 22px; color: #1E7A4C; flex: none; }
body .tv-pay small { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }

/* ปุ่มหลักเหลือง (ติดขอบล่างของแผ่นตอนเลื่อน) */
body .tv-sheet.book { padding-bottom: 0; }   /* แถบปุ่มด้านล่างเผื่อขอบจอเอง */
body .tv-gobar {
  position: sticky; bottom: 0; z-index: 1;
  margin: 0 -16px; padding: 12px 16px max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(rgba(255,255,255,0), #fff 14px);
}
body .tv-go {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px;
  padding: 12px 18px; border: 0; border-radius: 18px; cursor: pointer;
  background: linear-gradient(110deg, #FFD43B, #FFC21A); color: var(--ink);
  font-size: 17px; font-weight: 900; letter-spacing: 0; box-shadow: 0 4px 12px rgba(240,170,0,.28);
  margin-top: 12px;
}
body .tv-gobar .tv-go { margin-top: 0; }
body .tv-go:disabled { background: #EEF0F3; color: #5E6875; box-shadow: none; cursor: default; }
/* ตกลงราคา (มอไซค์/ส่งของเกิน 15 กม. · 3 ต.ค. 69) — ต้องเห็นชัดก่อนกดเรียก ไม่ใช่ตัวเล็กซ่อนท้ายแถว */
body .tv-svc-txt small.tv-svc-nego { color: #8A4B00; font-weight: 700; }
body .tv-nego {
  display: flex; flex-direction: column; gap: 3px; margin-top: 10px; padding: 12px 14px;
  background: #FFF4D6; border: 1px solid #F2C14E; border-radius: 16px; color: #5C3B00; line-height: 1.5;
}
body .tv-nego[hidden] { display: none; }
body .tv-nego b { font-size: 14px; font-weight: 800; }
body .tv-nego span { font-size: 13px; font-weight: 600; }
body .tv-fare-nego { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
body .tv-payline b.tv-fare-nego { font-size: 15px; font-weight: 800; color: #8A4B00; }
body .tv-fare-nego small, body .tv-fare-agreed { display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
body .tv-sum b.tv-fare-nego { align-items: center; text-align: center; white-space: normal; font-size: 13px; line-height: 1.3; color: #8A4B00; }
body .tv-nodrv { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 8px; }
body .tv-nodrv[hidden] { display: none; }
body .tv-nodrv a { color: #B05A00; font-weight: 800; }
body .tv-btn2 {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px;
  margin-top: 10px; border-radius: 18px; border: 2px solid #FFC928; background: #FFF7D7;
  color: #6A4300; font-size: 15px; font-weight: 800; text-decoration: none;
}
body .tv-btn2 svg { width: 20px; height: 20px; }
body .tv-link {
  display: block; width: 100%; min-height: 46px; margin-top: 6px; border: 0; background: none; cursor: pointer;
  font-size: 14px; font-weight: 700; color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
}
body .tv-cancel {
  display: block; width: 100%; min-height: 48px; margin-top: 12px; border: 1.5px solid #F3D3D8;
  border-radius: 16px; background: #fff; color: #B03345; font-size: 14px; font-weight: 800; cursor: pointer;
}
body .tv-cancel:disabled { opacity: .6; cursor: default; }

/* หน้าติดตาม */
body .tv-status { margin-bottom: 12px; }
/* คนขับรับงาน / ถึงจุดรับ → หัวสถานะเด้งเบา ๆ ครั้งเดียว (เสียง+สั่นอยู่ใน trip.js) */
body .tv-status.pop .tv-status-h { animation: tvStatusPop .6s ease-out; }
@keyframes tvStatusPop {
  0%   { transform: scale(.94); color: #0B7A3E; }
  45%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}
body .tv-status-k { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
body .tv-status-k svg { width: 18px; height: 18px; }
body .tv-status-h { font-size: 22px; font-weight: 900; color: var(--ink); margin: 2px 0 0; line-height: 1.3; letter-spacing: -.2px; }
body .tv-search {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; background: #FFF7D7;
  position: relative; overflow: hidden;   /* วงกระเพื่อมของไอคอนต้องไม่ล้นออกนอกกล่อง */
}
body .tv-search b { display: block; font-size: 16px; font-weight: 800; }
body .tv-search small { display: block; font-size: 13px; font-weight: 600; color: #655622; margin-top: 2px; font-variant-numeric: tabular-nums; }
body .tv-radar {
  position: relative; width: 52px; height: 52px; flex: none; border-radius: 50%;
  background: var(--yellow); color: var(--ink); display: inline-flex; align-items: center; justify-content: center;
}
body .tv-radar svg { width: 28px; height: 28px; position: relative; }
body .tv-radar::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%; border: 3px solid #FFC928;
  animation: tvPulse 1.8s ease-out infinite;
}
body .tv-barwrap { height: 6px; border-radius: 6px; background: #F1F2F4; overflow: hidden; margin: 12px 0 4px; }
body .tv-barwrap i { display: block; height: 100%; width: 100%; background: #F2A900; border-radius: 6px; transition: width 1s linear; }
body .tv-eta {
  padding: 12px 16px; border-radius: 18px; background: #FFF7D7; color: var(--ink);
  font-size: 16px; font-weight: 800; line-height: 1.4; margin-bottom: 12px;
}
body .tv-driver {
  display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line);
  border-radius: 22px; background: #fff; box-shadow: var(--card-shadow); margin-bottom: 16px;
}
body .tv-av {
  position: relative; width: 56px; height: 56px; flex: none; border-radius: 18px; overflow: hidden;
  background: #FFE38A; display: inline-flex; align-items: center; justify-content: center;
}
body .tv-av b { font-size: 24px; font-weight: 900; color: #6A4300; }
body .tv-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
body .tv-dinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
body .tv-dinfo > b { font-size: 17px; font-weight: 800; color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body .tv-dinfo small { font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1.4; }
/* ป้ายทะเบียนแบบป้ายรถไทย: พื้นขาว ขอบดำ ตัวหนา */
body .tv-plate {
  display: inline-block; padding: 2px 10px; border: 2px solid var(--ink); border-radius: 7px;
  background: #fff; color: var(--ink); font-size: 15px; font-weight: 900; letter-spacing: .5px; line-height: 1.35;
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #C9CDD3;
}
body .tv-call {
  width: 52px; height: 52px; flex: none; border-radius: 50%; background: #12A150; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(18,161,80,.3);
}
body .tv-call svg { width: 24px; height: 24px; }
body .tv-steps { margin-bottom: 4px; }
body .tv-steps li { padding-bottom: 12px; }
body .tv-steps li:not(:last-child)::before { top: 25px; }

body .tv-rsum { border: 1px solid var(--line); border-radius: 20px; padding: 6px 14px; margin-top: 12px; }
body .tv-rsum-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; }
body .tv-rsum-row + .tv-rsum-row { border-top: 1px solid var(--line); }
body .tv-rsum-row .tv-dot { margin-top: 5px; }
body .tv-rsum-row div { min-width: 0; display: flex; flex-direction: column; }
body .tv-rsum-row small { font-size: 11px; font-weight: 700; color: var(--muted); }
body .tv-rsum-row b { font-size: 15px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
body .tv-rsum-row em { font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
body .tv-rsum-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere;
}
body .tv-rsum-item svg { width: 18px; height: 18px; flex: none; color: #6A4300; margin-top: 1px; }
body .tv-payline {
  display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px 14px;
  background: #F7F8FA; border-radius: 16px; font-size: 13px; font-weight: 700; color: var(--ink);
}
body .tv-payline svg { width: 22px; height: 22px; flex: none; color: #1E7A4C; }
body .tv-payline span { flex: 1; min-width: 0; }
body .tv-payline b { font-size: 20px; font-weight: 900; }

body .tv-empty { text-align: center; padding: 8px 8px 4px; }
body .tv-empty-ic {
  width: 72px; height: 72px; border-radius: 24px; margin: 0 auto 10px; background: #FFF4C0; color: #6A4300;
  display: flex; align-items: center; justify-content: center;
}
body .tv-empty-ic svg { width: 38px; height: 38px; }
body .tv-empty.cancelled .tv-empty-ic { background: #FFF0F1; color: #B03345; }
body .tv-empty h3 { font-size: 18px; font-weight: 800; color: var(--ink); margin: 0 0 6px; }
body .tv-empty p { font-size: 14px; font-weight: 500; color: var(--muted); line-height: 1.6; margin: 0; }

body .tv-done { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: #EAF7EF; }
body .tv-done-ic {
  width: 40px; height: 40px; flex: none; border-radius: 50%; background: #12A150; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
body .tv-done-ic svg { width: 22px; height: 22px; }
body .tv-done p { margin: 0; font-size: 14px; font-weight: 700; color: #1C5A38; line-height: 1.5; }
body .tv-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
body .tv-sum div { background: #F7F8FA; border-radius: 16px; padding: 12px 8px; text-align: center; min-width: 0; }
body .tv-sum span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
body .tv-sum b { display: block; font-size: 18px; font-weight: 900; color: var(--ink); margin-top: 2px; white-space: nowrap; }
body .tv-rate { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 20px; text-align: center; }
body .tv-rate > b { display: block; font-size: 16px; font-weight: 800; color: var(--ink); }
body .tv-stars { display: flex; justify-content: center; gap: 4px; margin: 8px 0 10px; }
body .tv-star {
  width: 48px; height: 48px; border: 0; border-radius: 12px; background: none; cursor: pointer; padding: 4px;
  color: #D5D9DF;
}
body .tv-star svg { width: 100%; height: 100%; fill: currentColor; }
body .tv-star.on { color: #F2A900; }
body .tv-rated { margin-top: 14px; padding: 12px; border-radius: 16px; background: #FFF7D7; text-align: center; font-size: 14px; font-weight: 700; color: #6A4300; }
body .tv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

body .tv-maperr { text-align: center; padding: 6px 4px; }
body .tv-maperr b { display: block; font-size: 17px; font-weight: 800; }
body .tv-maperr p { font-size: 13px; color: var(--muted); margin: 6px 0 0; line-height: 1.6; }

/* หมุดบนแผนที่ (divIcon — ไม่ใช้รูปหมุดของ Leaflet) */
body .tv-mk { background: none; border: 0; }
body .tv-pin-pick {
  position: relative; display: block; width: 22px; height: 22px; margin: 3px; border-radius: 50%;
  background: #12A150; border: 4px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); cursor: grab;
}
body .tv-pin-pick.pulse::before,
body .tv-pin-pick.pulse::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid #12A150;
  animation: tvPulse 2s ease-out infinite;
}
body .tv-pin-pick.pulse::after { animation-delay: 1s; }
body .tv-pin-drop { display: block; width: 34px; height: 44px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.3)); cursor: grab; }
body .tv-pin-drop svg { width: 34px; height: 44px; display: block; }
body .tv-pin-driver {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--yellow); color: var(--ink); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.35);
}
body .tv-pin-driver svg { width: 26px; height: 26px; }
/* ตำแหน่งคนขับเก่า (> 1 นาที) → หมุดจางลง บอกว่าเป็นตำแหน่งล่าสุดที่เคยเห็น ไม่ใช่ตอนนี้ */
body .tv-pin-driver.stale { opacity: .55; filter: grayscale(.6); }
body .tv-locage { color: #8A5A00 !important; font-weight: 700 !important; }
body .tv-note { margin: 10px 2px 0; padding: 9px 12px; border-radius: 12px; font-size: 13px; font-weight: 700; line-height: 1.45; }
body .tv-note.warn { background: #FFF6DB; color: #7A4B00; }
@keyframes tvPulse { from { transform: scale(1); opacity: .85; } to { transform: scale(3); opacity: 0; } }

/* ── เรียกรถ: วิธีจ่าย 3 ทาง + นัดล่วงหน้า + จ่ายโอน (4 ต.ค. 69 · js/trip.js) ── */
/* เวลารับ: ไปตอนนี้ / นัดล่วงหน้า */
body .tv-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 16px; background: #F1F2F4; }
body .tv-seg-b {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 10px;
  border: 0; border-radius: 12px; background: none; cursor: pointer; font-size: 14px; font-weight: 800; color: #5E6875;
}
body .tv-seg-b svg { width: 18px; height: 18px; }
body .tv-seg-b.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(20,27,36,.1); }
body .tv-sched[hidden] { display: none; }
body .tv-sched-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
body .tv-sched-row .tv-field { min-width: 0; }
body select.tv-input { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #5E6875 50%), linear-gradient(135deg, #5E6875 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
body .tv-sched-hint { margin: 8px 2px 0; font-size: 13px; font-weight: 600; color: #1C5A38; line-height: 1.5; }
body .tv-sched-hint.warn { color: #A93746; }
body .tv-nodrv button {
  border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-weight: 800; color: #B05A00;
  text-decoration: underline; text-underline-offset: 2px;
}

/* วิธีจ่ายเงิน */
body .tv-pays { display: flex; flex-direction: column; gap: 8px; }
body .tv-paym {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 9px 14px;
  border: 1.5px solid #ECEEF1; border-radius: 16px; background: #fff; cursor: pointer; text-align: left; color: var(--ink);
  transition: border-color .15s, background .15s;
}
body .tv-paym.on { border-color: #FFC928; background: #FFFBEA; }
body .tv-paym-ic {
  width: 38px; height: 38px; flex: none; border-radius: 12px; background: #EAF7EF; color: #1E7A4C;
  display: inline-flex; align-items: center; justify-content: center;
}
body .tv-paym-ic svg { width: 22px; height: 22px; }
body .tv-paym-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
body .tv-paym-txt b { font-size: 15px; font-weight: 800; }
body .tv-paym-txt small { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 1px; }
body .tv-paym-dot { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid #D5D9DF; background: #fff; }
body .tv-paym.on .tv-paym-dot { border: 7px solid #F2A900; }

/* ใบนัดของฉัน (หัวแผ่นจองรถ) */
body .tv-mysched { margin-bottom: 12px; padding: 10px 12px; border-radius: 20px; background: #FFF7D7; }
body .tv-mysched[hidden] { display: none; }
body .tv-ms-h { display: flex; align-items: center; gap: 6px; color: #6A4300; margin-bottom: 6px; }
body .tv-ms-h svg { width: 18px; height: 18px; }
body .tv-ms-h b { font-size: 14px; font-weight: 800; }
body .tv-ms-h small { margin-left: auto; font-size: 12px; font-weight: 700; color: #8A6A1F; }
body .tv-ms-row { display: flex; align-items: center; gap: 8px; }
body .tv-ms-row + .tv-ms-row { border-top: 1px solid #F2DE9B; }
body .tv-ms-open {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 0;
  border: 0; background: none; cursor: pointer; text-align: left; color: var(--ink);
}
body .tv-ms-ic {
  width: 36px; height: 36px; flex: none; border-radius: 12px; background: #fff; color: #6A4300;
  display: inline-flex; align-items: center; justify-content: center;
}
body .tv-ms-ic svg { width: 22px; height: 22px; }
body .tv-ms-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
body .tv-ms-txt b { font-size: 14px; font-weight: 800; }
body .tv-ms-txt small { font-size: 12px; font-weight: 600; color: #655622; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body .tv-ms-chev svg { width: 18px; height: 18px; color: #8A6A1F; }
body .tv-ms-x {
  flex: none; min-height: 40px; padding: 0 12px; border: 1.5px solid #F3D3D8; border-radius: 12px;
  background: #fff; color: #B03345; font-size: 13px; font-weight: 800; cursor: pointer;
}
body .tv-ms-x:disabled { opacity: .6; cursor: default; }

/* หน้าใบนัด */
body .tv-schedcard {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; background: #FFF7D7;
}
body .tv-schedcard-ic {
  width: 52px; height: 52px; flex: none; border-radius: 50%; background: var(--yellow); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
body .tv-schedcard-ic svg { width: 28px; height: 28px; }
body .tv-schedcard div { min-width: 0; display: flex; flex-direction: column; }
body .tv-schedcard small { font-size: 12px; font-weight: 700; color: #655622; }
body .tv-schedcard b { font-size: 20px; font-weight: 900; color: var(--ink); line-height: 1.3; }
body .tv-schedcard span { font-size: 13px; font-weight: 600; color: #655622; }
body .tv-note:not(.warn) { background: #F7F8FA; color: #3D4652; font-weight: 600; }

/* จ่ายโอน: QR + แนบสลิป */
body .tv-paybox { margin-bottom: 16px; padding: 14px; border: 1.5px solid #FFE38A; border-radius: 22px; background: #FFFDF4; }
body .tv-paybox:empty { display: none; }
body .tv-done + .tv-paybox { margin: 12px 0 0; }
body .tv-payh { display: flex; align-items: center; gap: 8px; color: var(--ink); }
body .tv-payh svg { width: 20px; height: 20px; color: #1E7A4C; flex: none; }
body .tv-payh b { flex: 1; min-width: 0; font-size: 15px; font-weight: 800; }
body .tv-payh span { font-size: 20px; font-weight: 900; white-space: nowrap; }
body .tv-qr { display: flex; justify-content: center; margin: 12px 0 8px; }
body .tv-qr img { width: 220px; height: 220px; max-width: 100%; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
body .tv-qrinfo { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
body .tv-qrinfo b { font-size: 22px; font-weight: 900; color: var(--ink); }
body .tv-qrinfo span { font-size: 13px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
body .tv-qrinfo small { font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.45; }
body .tv-pay-loading { margin: 12px 0 4px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); }
body .tv-paybox .tv-qerr { margin-top: 10px; }
body .tv-askdrv { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: #FFF4D6; color: #5C3B00; }
body .tv-askdrv b { font-size: 15px; font-weight: 800; }
body .tv-askdrv small { font-size: 13px; font-weight: 600; line-height: 1.5; }
body .tv-slip-btn { cursor: pointer; }
body .tv-slip-btn.busy, body .tv-slip-re.busy { pointer-events: none; opacity: .7; }
body .tv-paybox-note { margin: 8px 2px 0; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; line-height: 1.5; }
body .tv-paybox > .tv-paybox-note:only-child { margin: 0; }
body .tv-slipok { display: flex; align-items: center; gap: 10px; }
body .tv-slipok-ic {
  width: 36px; height: 36px; flex: none; border-radius: 50%; background: #12A150; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
body .tv-slipok-ic svg { width: 20px; height: 20px; }
body .tv-slipok div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
body .tv-slipok b { font-size: 15px; font-weight: 800; color: #1C5A38; }
body .tv-slipok small { font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.45; }
body .tv-slip-re {
  flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 12px;
  border: 1.5px solid #FFC928; background: #fff; color: #6A4300; font-size: 13px; font-weight: 800; cursor: pointer;
}
body .tv-paid { display: flex; flex-direction: column; gap: 2px; text-align: center; }
body .tv-paybox:has(.tv-paid) { background: #EAF7EF; border-color: #BFE5CD; }
body .tv-paid b { font-size: 17px; font-weight: 900; color: #1C5A38; }
body .tv-paid small { font-size: 12px; font-weight: 600; color: #3E6B50; }
body .tv-sum b.tv-sum-pay { font-size: 14px; white-space: normal; line-height: 1.3; padding-top: 3px; }

/* ปุ่มลอย "ทริปของคุณ" บนหน้าแรก (เหนือเมนูล่าง) */
body .trip-pill {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 108px; z-index: 289;
  width: calc(100% - 32px); max-width: 448px; min-height: 60px;
  display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px;
  border: 0; border-radius: 22px; cursor: pointer; text-align: left;
  background: var(--ink); color: #fff; box-shadow: 0 8px 24px rgba(20,27,36,.3);
}
body .trip-pill[hidden] { display: none; }
body:has(.cart-bar:not(.hidden)) .trip-pill { bottom: 180px; }
body .tp-ic {
  width: 44px; height: 44px; flex: none; border-radius: 16px; background: var(--yellow); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
body .tp-ic svg { width: 26px; height: 26px; }
body .tp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
body .tp-txt b { font-size: 15px; font-weight: 800; }
body .tp-txt small { font-size: 12px; font-weight: 600; color: #FFE38A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body .tp-chev svg { width: 20px; height: 20px; color: #fff; }

@media (max-width: 360px) {
  body .tv-sheet { padding-left: 14px; padding-right: 14px; }
  body .tv-gobar { margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
  body .tv-svc { padding: 10px 12px; gap: 10px; }
  body .tv-svc-fare { font-size: 16px; }
  body .tv-sum b { font-size: 16px; }
  body .tv-star { width: 44px; height: 44px; }
}
/* ลดการเคลื่อนไหว: วงกระเพื่อมกลายเป็นวงนิ่ง ไม่กะพริบ */
@media (prefers-reduced-motion: reduce) {
  body .tv-pin-pick.pulse::before { animation: none; transform: scale(1.6); opacity: .45; }
  body .tv-pin-pick.pulse::after { display: none; }
  body .tv-radar::before { animation: none; transform: scale(1.15); opacity: .6; }
  body .tv-mini.busy svg { animation: none; }
  body .tv-barwrap i { transition: none; }
  body .tv-status.pop .tv-status-h { animation: none; }
}

/* ── แถบเตือน "งานพัสดุยังไม่แนบสลิป" บนหน้าแรก (3 ต.ค. 69) ──
   ลูกค้าเลือกพร้อมเพย์แต่สลิปไม่ติดงาน → แนบทีหลังได้จากตรงนี้ (app.js renderParcelSlipReminder) */
#parcel-slip-reminder { margin: 10px 16px 4px; display: grid; gap: 8px; }
.psr-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--yellow-lt); border: 1px solid var(--yellow-dk);
  border-radius: 16px; padding: 10px 10px 10px 14px; color: var(--ink);
}
.psr-txt { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 13.5px; line-height: 1.4; }
.psr-txt b { font-weight: 800; }
.psr-txt span { color: var(--muted); font-size: 12.5px; }
.psr-btn {
  flex: 0 0 auto; background: var(--orange); color: #fff; font-weight: 800; font-size: 14px;
  border-radius: 12px; padding: 10px 14px; cursor: pointer; white-space: nowrap;
}
.psr-x {
  flex: 0 0 auto; border: 0; background: transparent; color: var(--muted);
  font-size: 16px; width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
}

/* ══ รอบ 3 ต.ค. → 4 ต.ค. 69: ส่วนที่ยังเป็นหน้าตาเดิม ══════════════════
   แท็บ "อาหาร" หน้าแรก · แผ่นสมัคร/เข้าสู่ระบบ · แผ่นปักหมุดจุดส่ง */

/* แท็บอาหาร — การ์ดเมนู 2 คอลัมน์: ราคา/ยอดสั่งเคยตัดเป็น 2 บรรทัด ("30 / บาท") */
body #home-food-list.food-grid { gap: 12px; }
body #home-food-list .food-item { border-radius: 20px; box-shadow: 0 4px 14px rgba(28,36,48,.07); }
body #home-food-list .food-info { padding: 10px 12px 12px; gap: 3px; }
body #home-food-list .food-name { font-size: 14.5px; font-weight: 800; color: var(--ink); }
/* อีโมจิหน้าชื่อร้าน → ไอคอนร้าน 3D ชุดเดียวกับหมวดหมู่ (อีโมจิแต่ละเครื่องหน้าตาไม่เหมือนกัน) */
body #home-food-list .food-rest > span:first-child:not(.food-rest-name) { display: none; }
body #home-food-list .food-rest::before {
  content: ''; flex: 0 0 16px; width: 16px; height: 16px;
  background: url('/img/ui/category/14-store.png') center / contain no-repeat;
}
body #home-food-list .food-rest-name { font-size: 12px; color: var(--muted); font-weight: 600; }
body #home-food-list .food-meta {
  display: flex; flex-wrap: nowrap; align-items: baseline; justify-content: space-between;
  gap: 6px; margin-top: auto; padding-top: 4px; min-width: 0;
}
body #home-food-list .food-price { font-size: 16px; font-weight: 800; color: var(--orange); white-space: nowrap; flex: 0 0 auto; }
body #home-food-list .food-orders {
  font-size: 11px; color: var(--muted); background: none; padding: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}

/* แผ่นสมัคร / เข้าสู่ระบบ — สีตามระบบใหม่แทนสีเทา/ส้มแดงที่ฝังในบรรทัด */
body #modal-register .reg-sub { font-size: 13.5px; color: var(--muted); margin: -2px 0 14px; line-height: 1.5; }
body #modal-register .reg-muted { color: var(--muted); }
body #modal-register .reg-forgot {
  display: block; text-align: right; color: var(--orange); font-weight: 700;
  font-size: 13px; margin: 2px 0 6px; text-decoration: none;
}
body #modal-register .otp-code-input {
  text-align: center; letter-spacing: 8px; font-size: 24px; font-weight: 800; color: var(--ink);
}

/* แผ่นปักหมุดจุดส่ง — เดิมปุ่มค้นหาสีน้ำเงิน ปุ่มยืนยันสีแดงอิฐ + อีโมจิ */
body #modal-map-pick .mp-zh { color: var(--muted); font-weight: 600; font-size: .85em; }
body #modal-map-pick .mp-sub { font-size: 13px; color: var(--muted); margin: -4px 0 10px; line-height: 1.55; }
body #modal-map-pick .mp-search { display: flex; gap: 8px; margin-bottom: 8px; }
body #modal-map-pick .mp-search input {
  flex: 1; min-width: 0; border: 1.5px solid var(--yellow-dk); border-radius: 14px;
  padding: 11px 14px; font-size: 14px; outline: none; background: #fff; color: var(--ink);
}
body #modal-map-pick .mp-search input:focus { border-color: var(--orange); }
body #modal-map-pick .mp-search button {
  flex: 0 0 auto; border: none; border-radius: 14px; padding: 0 18px;
  background: var(--yellow); color: var(--ink); font-weight: 800; font-size: 15px; cursor: pointer;
}
body #modal-map-pick .mp-results {
  max-height: 150px; overflow-y: auto; border: 1px solid var(--line, #eee);
  border-radius: 14px; margin-bottom: 8px; background: #fff;
}
body #modal-map-pick .mp-canvas { width: 100%; height: 46vh; border-radius: 18px; overflow: hidden; background: #EEF1F4; }
body #modal-map-pick .mp-hint { font-size: 12px; color: var(--muted); margin-top: 6px; text-align: center; }
body #modal-map-pick .mp-confirm {
  display: block; width: 100%; margin-top: 12px; padding: 14px; border: none; border-radius: 16px;
  background: var(--orange); color: #fff; font-weight: 800; font-size: 16px; cursor: pointer;
}
body #modal-map-pick .mp-confirm .mp-zh { color: rgba(255,255,255,.85); }
body #modal-map-pick .mp-confirm:disabled { background: #E4E7EB; color: #8A94A1; cursor: not-allowed; }
body #modal-map-pick .mp-confirm:disabled .mp-zh { color: inherit; }
body #modal-map-pick .mp-cancel { display: block; text-align: center; color: var(--muted); margin-top: 10px; font-size: 14px; font-weight: 600; }
body #modal-map-pick .mp-r-msg { padding: 10px 12px; color: var(--muted); font-size: 13px; }
body #modal-map-pick .mp-r-msg.err { color: #C92A2A; }
body #modal-map-pick .mp-r-item {
  display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-bottom: 1px solid var(--line);
  cursor: pointer; font-size: 13px; line-height: 1.45; color: var(--ink);
}
body #modal-map-pick .mp-r-item::before {
  content: ''; flex: 0 0 8px; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--orange);
}
body #modal-map-pick .mp-r-item:last-child { border-bottom: 0; }
/* แผ่นนี้ไม่มีกล่องห่อเนื้อหา (แผ่นอื่นมี .register-form ฯลฯ ที่ให้ระยะขอบ) — ui-v2 ตั้ง .modal-sheet padding 0 */
body #modal-map-pick .modal-sheet { padding: 0 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
body #modal-map-pick .modal-title { padding-left: 2px; padding-right: 2px; }

/* ลิงก์สลับ สมัคร ⇄ เข้าสู่ระบบ ในแผ่นสมัคร (4 ต.ค. 69) */
body #modal-register .reg-switch-mode {
  display: block; width: 100%; margin: 10px 0 0; padding: 8px; background: none; border: 0;
  color: var(--orange); font-weight: 800; font-size: 14px; cursor: pointer; text-align: center;
}
