/* ============================================================
   BaanMart Design System v3 — "Soft UI Evolution"
   • เงาหลายชั้น (multi-layer) ให้มิติจริง แต่คอนทราสต์ผ่าน WCAG AA
   • Glassmorphism เฉพาะแถบนำทาง/ชีตลอย
   • Tactile press: กดแล้วยุบ + สปริงเด้งกลับ 200-300ms
   • ไอคอน SVG ทั้งหมด (ดู icons.js) — ไม่ใช้อีโมจิเป็นไอคอน
   • เคารพ prefers-reduced-motion, touch target ≥ 44px, focus ring ชัด
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* แบรนด์ */
  /* โทนส้มสด อิ่มตัว (ปรับตามภาพต้นแบบ — เดิม #FF7A45 ออกไปทางส้มอมชมพู) */
  --o-50:  #FFF3E6;
  --o-100: #FFE3C6;
  --o-200: #FFBE85;
  --o-400: #FF9A2E;
  --o-500: #FA7516;
  --o-600: #EE6002;
  --o-700: #C24E02;
  --orange: var(--o-500);
  --orange-dark: var(--o-600);
  --orange-soft: var(--o-50);

  --m-50:  #E9FBF3;
  --m-400: #34D399;
  --m-600: #0E9F6E;
  --m-700: #077A53;
  --mint: var(--m-400);
  --mint-dark: var(--m-600);
  --mint-soft: var(--m-50);

  --blue: #3B82F6;
  --blue-dark: #1D4ED8;
  --blue-soft: #EAF1FE;
  --danger: #E5484D;
  --danger-soft: #FEEDEE;
  --amber: #B45309;
  --amber-soft: #FFF6E5;

  /* กลาง — คอนทราสต์ผ่าน AA ทุกระดับที่ใช้กับข้อความ */
  --ink:    #241C18;   /* 14.9:1 บนขาว */
  --ink-2:  #6B615A;   /* 5.6:1  */
  --ink-3:  #918780;   /* 3.4:1 — ใช้กับข้อความรองขนาด ≥14px เท่านั้น */
  --line:   #F0E8DF;
  --line-2: #E4D9CD;
  --card:   #FFFFFF;
  --cream:  #FFF9F3;
  --cream-2:#FDF1E6;

  /* เงาแบบหลายชั้น = ความรู้สึกมีมิติ */
  --e1: 0 1px 2px rgba(36,28,24,.05), 0 2px 6px rgba(238,96,2,.045);
  --e2: 0 1px 2px rgba(36,28,24,.05), 0 6px 16px rgba(238,96,2,.075);
  --e3: 0 2px 4px rgba(36,28,24,.05), 0 14px 30px rgba(238,96,2,.11);
  --e4: 0 4px 8px rgba(36,28,24,.06), 0 24px 48px rgba(238,96,2,.16);
  --glow-o: 0 6px 18px rgba(238,96,2,.34), 0 2px 4px rgba(238,96,2,.2);
  --glow-m: 0 6px 18px rgba(14,159,110,.28);
  --glow-b: 0 6px 18px rgba(59,130,246,.3);
  --inset-top: inset 0 1px 0 rgba(255,255,255,.4);
  --hairline: inset 0 0 0 1px rgba(255,255,255,.75);

  /* รูปทรง */
  --r-xs: 10px; --r-sm: 14px; --r-md: 18px; --r-lg: 22px; --r-xl: 28px; --r-full: 999px;

  /* จังหวะเคลื่อนไหว */
  --t-fast: 140ms cubic-bezier(.4,0,.2,1);
  --t-base: 220ms cubic-bezier(.22,.8,.3,1);
  --spring: 380ms cubic-bezier(.34,1.4,.5,1);

  --nav-h: 68px;
  --z-nav: 50; --z-bar: 60; --z-sheet: 90; --z-toast: 200;
}

/* ---------- Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Prompt', 'Noto Sans Thai', -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px; line-height: 1.6; color: var(--ink);
  background: #E7DED4;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.35; letter-spacing: -.01em; }

/* โฟกัสมองเห็นชัดสำหรับคีย์บอร์ด (ไม่รบกวนการแตะ) */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid rgba(250,117,22,.5);
  outline-offset: 2px; border-radius: 6px;
}

/* ไอคอน SVG */
.ico { flex: none; display: block; }

/* ---------- เฟรมมือถือ ---------- */
#phone {
  max-width: 430px; margin: 0 auto; min-height: 100dvh; position: relative;
  overflow-x: hidden; isolation: isolate;
  /* พื้นหลังไล่เฉดอุ่น + แสงนวลมุมบน = มิติของฉากหลัง */
  background:
    radial-gradient(120% 55% at 12% -8%, #FFE9D2 0%, rgba(255,233,210,0) 62%),
    radial-gradient(90% 45% at 96% 4%, #FFF0DC 0%, rgba(255,240,220,0) 58%),
    var(--cream);
  box-shadow: 0 0 60px rgba(60,40,25,.14);
}
@media (min-width: 500px) {
  body { padding: 20px 0; }
  #phone { min-height: calc(100dvh - 40px); border-radius: 38px; overflow: hidden; }
}
#app { min-height: 100dvh; padding-bottom: calc(var(--nav-h) + 18px); animation: pageIn .28s cubic-bezier(.22,.8,.3,1); }
.no-nav #app { padding-bottom: 0; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============================================================
   ปุ่ม — ไล่เฉด + ไฮไลต์ขอบบน + เงาสี = ปุ่มดูนูนจับต้องได้
   ============================================================ */
.btn {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; min-height: 48px; padding: 14px 20px; border: none; cursor: pointer;
  border-radius: var(--r-full); font-size: 1rem; font-weight: 600; letter-spacing: .01em;
  transition: transform var(--spring), box-shadow var(--t-base), background-color var(--t-base), color var(--t-base);
}
.btn:active { transform: scale(.965); }
.btn:disabled { opacity: .45; pointer-events: none; }
/* ระลอกคลื่นเมื่อกด */
.btn::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle at var(--rx,50%) var(--ry,50%), rgba(255,255,255,.55), transparent 55%);
  opacity: 0; transition: opacity .45s ease;
}
.btn:active::after { opacity: 1; transition: none; }

.btn-primary {
  color: #fff;
  background-image: linear-gradient(180deg, rgba(255,255,255,.24), rgba(255,255,255,0) 52%),
                    linear-gradient(135deg, var(--o-400) 0%, var(--o-500) 48%, var(--o-600) 100%);
  box-shadow: var(--glow-o), var(--inset-top);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(238,96,2,.42), var(--inset-top); }
.btn-outline {
  background: #fff; color: var(--orange-dark);
  box-shadow: inset 0 0 0 1.6px var(--o-200), var(--e1);
}
.btn-outline:hover { background: var(--o-50); }
.btn-fb {
  background: #fff; color: #1877F2;
  box-shadow: inset 0 0 0 1.6px rgba(24,119,242,.55), var(--e1);
}
.btn-fb:hover { background: #F2F7FF; }
.btn-line {
  color: #fff;
  background-image: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,0) 55%), linear-gradient(135deg, #16D66B, #06C755);
  box-shadow: 0 6px 18px rgba(6,199,85,.32), var(--inset-top);
}
.btn-email {
  background: #fff; color: var(--orange-dark);
  box-shadow: inset 0 0 0 1.6px var(--o-200), var(--e1);
}
.btn-email:hover { background: var(--o-50); }
.btn-google {
  background: #fff; color: #3C4043;
  box-shadow: inset 0 0 0 1.6px rgba(60,64,67,.22), var(--e1);
}
.btn-google:hover { background: #F5F6F7; }
.btn-apple {
  background: #111; color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.26), var(--inset-top);
}
.btn-apple:hover { background: #222; }
.btn-ghost { background: #F2ECE5; color: var(--ink-2); box-shadow: var(--e1); }
.btn-ghost:hover { background: #EAE2D9; }
.btn-mint {
  color: #fff;
  background-image: linear-gradient(180deg, rgba(255,255,255,.24), rgba(255,255,255,0) 55%), linear-gradient(135deg, #4BE0AC, var(--m-400) 55%, var(--m-600));
  box-shadow: var(--glow-m), var(--inset-top);
}
.btn-sm { width: auto; min-height: 44px; padding: 10px 16px; font-size: .86rem; gap: 6px; }

/* ปุ่มไอคอนกลม — touch target 44px */
.icon-btn {
  width: 44px; height: 44px; flex: none; border: none; cursor: pointer;
  border-radius: 50%; background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: var(--e2), var(--hairline);
  display: flex; align-items: center; justify-content: center; color: var(--ink);
  transition: transform var(--spring), box-shadow var(--t-base), background var(--t-base);
}
.icon-btn:active { transform: scale(.9); }
.icon-btn:hover { box-shadow: var(--e3), var(--hairline); }

/* ---------- การ์ด ---------- */
.card {
  background: linear-gradient(180deg, #fff 0%, #FFFCF8 100%);
  border-radius: var(--r-lg); box-shadow: var(--e2), var(--hairline);
}

/* ---------- ป้าย ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: var(--r-full); font-size: .76rem; font-weight: 600; letter-spacing: .01em;
}
.tag-free {
  color: #fff;
  background-image: linear-gradient(180deg, rgba(255,255,255,.22), transparent 60%), linear-gradient(135deg, #4BE0AC, var(--m-600));
  box-shadow: 0 3px 10px rgba(14,159,110,.3);
}
.tag-price { background: var(--o-50); color: var(--orange-dark); }
.tag-soft { background: #F5F0EA; color: var(--ink-2); font-weight: 500; }
.tag-pending { background: var(--amber-soft); color: var(--amber); }
.tag-sold { background: #EDE9E4; color: #57504A; }
.tag-mint-soft { background: var(--mint-soft); color: var(--mint-dark); }

/* ---------- แถบหัว ---------- */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px; position: sticky; top: 0; z-index: 30;
  background: linear-gradient(180deg, var(--cream) 72%, rgba(255,249,243,0));
}
.topbar .title { flex: 1; text-align: center; font-weight: 700; font-size: 1.08rem; }

/* ============================================================
   แถบนำทางล่าง — กระจกฝ้า + เม็ดยาไฮไลต์ตัวที่เลือก
   ============================================================ */
#bottomNav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; height: var(--nav-h); z-index: var(--z-nav);
  display: flex; align-items: stretch;
  background: rgba(255,252,248,.82);
  -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
  border-top: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 -6px 24px rgba(60,40,25,.07);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 500px) { #bottomNav { border-radius: 0 0 38px 38px; } }
#bottomNav .nav-item {
  position: relative; flex: 1; min-height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: none; background: none; cursor: pointer;
  font-size: .7rem; color: var(--ink-3); font-weight: 500;
  transition: color var(--t-base);
}
#bottomNav .nav-item .ic { display: flex; align-items: center; justify-content: center; transition: transform var(--spring); }
#bottomNav .nav-item:active .ic { transform: scale(.86); }
#bottomNav .nav-item.active { color: var(--orange-dark); font-weight: 700; }
/* จุดไฮไลต์ใต้ไอคอนของแท็บที่เลือก */
#bottomNav .nav-item.active::before {
  content: ''; position: absolute; top: 8px;
  width: 42px; height: 30px; border-radius: var(--r-full);
  background: linear-gradient(135deg, rgba(255,154,92,.2), rgba(238,96,2,.14));
  animation: navPop var(--spring);
}
@keyframes navPop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#bottomNav .badge {
  position: absolute; top: 6px; right: calc(50% - 22px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-full);
  background: linear-gradient(135deg, #FF6B6B, var(--danger)); color: #fff;
  font-size: .62rem; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 2px 6px rgba(229,72,77,.45); z-index: 2;
}

/* ============================================================
   1) หน้าเข้าสู่ระบบ
   ============================================================ */
.login-wrap { min-height: 100dvh; display: flex; flex-direction: column; padding: 56px 0 0; position: relative; }
.login-lang { position: absolute; top: 16px; right: 16px; z-index: 5; }
.login-logo { text-align: center; padding: 0 26px; }
/* โลโก้จริง — กว้างตามจอแต่ไม่เกิน 320px กันภาพแตกบนจอใหญ่ */
.login-logo img {
  display: block; height: 148px; width: auto; margin: 0 auto;
  filter: drop-shadow(0 8px 16px rgba(238,96,2,.18));
}
.login-logo h1 {
  font-size: 2.6rem; font-weight: 800; letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--o-400), var(--o-600) 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 14px rgba(238,96,2,.22));
}
.login-logo p { color: var(--ink-2); margin-top: 6px; font-size: 1rem; }
/* ภาพโฆษณาสินค้ามือสอง — พื้นรูปเป็นสีครีมเหมือนพื้นหน้า จึงกลืนกับหน้าจอ */
.login-illus { margin: 20px 20px 14px; }
.login-illus img {
  display: block; width: 100%; height: auto;
  border-radius: 20px;
  box-shadow: 0 12px 26px rgba(206,84,12,.14);
}
.login-sheet {
  /* 40dvh — ให้ภาพโฆษณา + การ์ดปุ่ม พอดีจอมือถือโดยไม่ต้องเลื่อน */
  margin-top: auto; min-height: 40dvh;
  background: linear-gradient(180deg, #fff, #FFFCF9);
  border-radius: 34px 34px 0 0; padding: 38px 24px 30px;
  display: flex; flex-direction: column; gap: 13px;
  box-shadow: 0 -10px 40px rgba(196,104,34,.13);
}
.login-sheet .btn { font-size: 1.06rem; min-height: 54px; }
/* เส้นคั่น "หรือเข้าสู่ระบบด้วย" + แถวปุ่มโซเชียล 2 คอลัมน์ */
.login-or { display: flex; align-items: center; gap: 12px; margin: 4px 0 2px; color: var(--ink-3); font-size: .8rem; }
.login-or::before, .login-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.login-socials { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.login-socials .btn { font-size: .92rem; min-height: 50px; padding: 12px 10px; gap: 7px; }
@media (max-width: 340px) { .login-socials { grid-template-columns: 1fr; } }
/* ช่องทางที่ยังไม่ได้ใส่คีย์ที่เซิร์ฟเวอร์ — โชว์ไว้ให้เห็นว่ามี แต่บอกด้วยสายตาว่ายังใช้ไม่ได้ */
.login-socials .btn-soon { opacity: .48; }

/* สลับ เข้าสู่ระบบ / สมัครสมาชิก */
.seg { display: flex; gap: 6px; background: var(--o-50); padding: 5px; border-radius: var(--r-full); }
.seg-btn {
  flex: 1; min-height: 44px; border: none; border-radius: var(--r-full); cursor: pointer;
  background: transparent; color: var(--ink-2); font-family: inherit; font-size: .92rem; font-weight: 600;
  transition: background var(--t-base), color var(--t-base), box-shadow var(--t-base);
}
.seg-btn.active { background: #fff; color: var(--orange-dark); font-weight: 800; box-shadow: var(--e1); }
.hint { font-size: .78rem; color: var(--ink-3); margin-top: 6px; }

.login-terms { text-align: center; font-size: .78rem; color: var(--ink-3); margin-top: 6px; line-height: 1.6; }
.login-signup { text-align: center; margin-top: auto; padding-top: 26px; font-size: .88rem; color: var(--ink-2); }

/* ============================================================
   2) หน้าแรก
   ============================================================ */
.loc-line { display: flex; align-items: center; gap: 7px; padding: 14px 18px 8px; font-size: .94rem; font-weight: 600; }
.loc-line .ico { color: var(--orange); }
.loc-line .more {
  margin-left: auto; min-width: 44px; min-height: 44px; margin-right: -10px;
  border: none; background: none; cursor: pointer; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; border-radius: var(--r-full);
  transition: background var(--t-base);
}
.loc-line .more:hover { background: rgba(0,0,0,.04); }

.search-row { display: flex; align-items: center; gap: 10px; padding: 0 16px 12px; }
.searchbar {
  flex: 1; display: flex; align-items: center; gap: 9px; min-height: 48px;
  background: #fff; border-radius: var(--r-full); padding: 0 18px;
  box-shadow: var(--e2), var(--hairline); color: var(--ink-3);
  transition: box-shadow var(--t-base);
}
.searchbar:focus-within { box-shadow: var(--e3), inset 0 0 0 1.6px var(--o-200); }
/* padding อยู่ที่ input เอง เพื่อให้พื้นที่แตะสูงเต็ม 48px */
.searchbar input {
  flex: 1; align-self: stretch; min-height: 48px; padding: 12px 0;
  border: none; outline: none; font-size: .95rem; background: none; color: var(--ink); min-width: 0;
}
.pin-btn {
  width: 48px; height: 48px; flex: none; border: none; cursor: pointer; border-radius: 50%;
  color: #fff; display: flex; align-items: center; justify-content: center;
  background-image: linear-gradient(180deg, rgba(255,255,255,.22), transparent 55%), linear-gradient(135deg, var(--o-400), var(--o-600));
  box-shadow: var(--glow-o), var(--inset-top);
  transition: transform var(--spring);
}
.pin-btn:active { transform: scale(.9); }

.zone-btns { display: flex; gap: 11px; padding: 2px 16px 12px; }
.zone-btn {
  flex: 1.3; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; border: none; cursor: pointer; font-weight: 700; font-size: .95rem; color: #fff;
  padding: 13px 12px; border-radius: var(--r-full);
  background-image: linear-gradient(180deg, rgba(255,255,255,.24), transparent 55%), linear-gradient(135deg, var(--o-400), var(--o-600));
  box-shadow: var(--glow-o), var(--inset-top);
  transition: transform var(--spring), box-shadow var(--t-base);
}
.zone-btn:active { transform: scale(.96); }
.zone-btn.cheap {
  flex: 1;
  background-image: linear-gradient(180deg, rgba(255,255,255,.24), transparent 55%), linear-gradient(135deg, #60A5FA, #2563EB);
  box-shadow: var(--glow-b), var(--inset-top);
}

/* แผนที่ย่อบนหน้าแรก */
.home-map { position: relative; height: 232px; overflow: hidden; cursor: pointer; }
.map-canvas {
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(255,255,255,.9) 2px, transparent 2px) 0 0/58px 58px,
    linear-gradient(90deg, rgba(255,255,255,.9) 2px, transparent 2px) 0 0/58px 58px,
    linear-gradient(rgba(255,255,255,.55) 1px, transparent 1px) 0 0/19px 19px,
    linear-gradient(150deg, #DFEAF3 0%, #E9F1E9 45%, #F4EEE3 100%);
}
.home-map::after {   /* ไล่เฉดจางขอบล่างให้กลืนกับการ์ดขาว */
  content: ''; position: absolute; inset: auto 0 0 0; height: 60px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.55));
  pointer-events: none;
}
.map-pin {
  position: absolute; transform: translate(-50%,-100%); border: none; background: none; padding: 0; cursor: pointer;
  color: var(--o-600); filter: drop-shadow(0 4px 4px rgba(80,40,15,.3));
  transition: transform var(--spring);
}
.map-pin.me { color: var(--blue); filter: drop-shadow(0 4px 5px rgba(29,78,216,.4)); }
.map-pin.active { transform: translate(-50%,-100%) scale(1.3); }

/* แถวหมวดหมู่ — การ์ดขาวโค้งซ้อนขึ้นมาทับแผนที่ */
.cat-row6 {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px;
  background: linear-gradient(180deg, #fff, #FFFDFB); border-radius: 30px 30px 0 0;
  margin-top: -22px; position: relative; z-index: 3; padding: 20px 10px 10px;
  box-shadow: 0 -8px 24px rgba(196,104,34,.09);
}
.cat-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  min-height: 44px; border: none; background: none; cursor: pointer;
  font-size: .7rem; color: var(--ink-2); font-weight: 500;
  transition: color var(--t-base);
}
.cat-item .ic {
  width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #FCF7F1, #F4EDE4);
  box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(120,80,50,.07);
  color: var(--ink-2);
  transition: transform var(--spring), box-shadow var(--t-base), background var(--t-base), color var(--t-base);
}
.cat-item:active .ic { transform: scale(.9); }
.cat-item.active { color: var(--orange-dark); font-weight: 700; }
.cat-item.active .ic {
  color: #fff;
  background-image: linear-gradient(180deg, rgba(255,255,255,.25), transparent 55%), linear-gradient(140deg, var(--o-400), var(--o-600));
  box-shadow: var(--glow-o), var(--inset-top);
}

.home-white { background: linear-gradient(180deg, #FFFDFB, #fff); padding-bottom: 14px; min-height: 320px; }
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 10px; }
.section-head h3 { font-size: 1.06rem; font-weight: 800; }
.section-head .more {
  display: flex; align-items: center; justify-content: center; gap: 3px;
  min-height: 44px; min-width: 44px; padding: 4px 10px; margin-right: -10px;
  font-size: .82rem; color: var(--ink-2); border: none; background: none; cursor: pointer; border-radius: var(--r-full);
  transition: background var(--t-base), color var(--t-base);
}
.section-head .more:hover { background: #F5F0EA; color: var(--ink-2); }

/* การ์ดสินค้า — สปอตไลต์ + เงาใต้วัตถุ = ภาพดูลอยมีมิติ */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 0 16px 20px; }
.pcard {
  background: #fff; border-radius: var(--r-lg); overflow: hidden; cursor: pointer;
  box-shadow: var(--e1), var(--hairline);
  transition: transform var(--spring), box-shadow var(--t-base);
}
.pcard:hover { box-shadow: var(--e3), var(--hairline); }
.pcard:active { transform: scale(.97); }
.pcard .ph {
  position: relative; height: 142px; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background-image: radial-gradient(70% 60% at 50% 38%, rgba(255,255,255,.95), rgba(255,255,255,0) 70%);
}
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.pcard .ph .em {
  position: relative; z-index: 2; font-size: 3.9rem; line-height: 1;
  filter: drop-shadow(0 14px 10px rgba(120,60,20,.26));
  transition: transform var(--spring);
}
.pcard:hover .ph .em { transform: translateY(-3px) scale(1.04); }
.pcard .ph::after {   /* เงาวงรีใต้วัตถุ */
  content: ''; position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: 58%; height: 12px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(120,70,30,.22), transparent 72%);
  filter: blur(3px);
}
.pcard .body { padding: 11px 13px 13px; }
.pcard .t1 { font-size: .86rem; font-weight: 700; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .tagrow { display: flex; align-items: center; gap: 5px; margin-top: 9px; flex-wrap: nowrap; overflow: hidden; }
.pcard .tagrow .tg {
  flex: none; background: linear-gradient(135deg, var(--o-50), var(--o-100)); color: var(--orange-dark);
  font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 8px; white-space: nowrap;
}
.pcard .tagrow .mid {
  flex: 0 1 auto; min-width: 0; font-size: .66rem; color: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: 8px; padding: 2px 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pcard .tagrow .dist { flex: none; margin-left: auto; display: flex; align-items: center; gap: 2px; font-size: .72rem; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.pcard .tagrow .dist .ico { margin-left: -1px; }

/* ============================================================
   3) แผนที่เต็มหน้า
   ============================================================ */
.m2-top {
  display: flex; align-items: center; padding: 14px 14px; position: sticky; top: 0; z-index: 20;
  background: rgba(255,244,236,.9);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
}
.m2-top .bk {
  width: 44px; height: 44px; border: none; background: none; cursor: pointer;
  display: flex; align-items: center; color: var(--ink);
}
.m2-top .title { flex: 1; text-align: center; font-weight: 700; font-size: 1.1rem; }
.m2-top .flt {
  min-width: 44px; min-height: 44px; border: none; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: flex-end; gap: 5px;
  font-size: .94rem; font-weight: 600; color: var(--orange-dark);
}
.m2-map {
  position: relative; height: calc(100dvh - 72px); overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,.92) 3px, transparent 3px) 0 0/86px 86px,
    linear-gradient(90deg, rgba(255,255,255,.92) 3px, transparent 3px) 0 0/86px 86px,
    linear-gradient(rgba(255,255,255,.6) 1.5px, transparent 1.5px) 0 0/28px 28px,
    linear-gradient(158deg, #DCE8F4 0%, #E7EFF7 48%, #DFE9F2 100%);
}
/* วงรัศมี 2 ชั้นรอบตำแหน่งเรา + ระลอกจางๆ */
.m2-ring {
  position: absolute; left: 50%; top: 33%; transform: translate(-50%,-50%);
  width: 250px; height: 250px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,.14), rgba(59,130,246,.06) 70%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.9);
}
.m2-ring.in { width: 152px; height: 152px; background: radial-gradient(circle, rgba(59,130,246,.22), rgba(59,130,246,.1)); }
.m2-ring::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(59,130,246,.35); animation: ripple 3.2s ease-out infinite;
}
@keyframes ripple { 0% { transform: scale(.55); opacity: .85; } 100% { transform: scale(1.12); opacity: 0; } }
.m2-me {
  position: absolute; left: 50%; top: 33%; transform: translate(-50%,-100%);
  color: var(--blue); filter: drop-shadow(0 6px 7px rgba(29,78,216,.42)); z-index: 3;
}
.m2-pin {
  position: absolute; transform: translate(-50%,-100%); border: none; background: none; padding: 0; cursor: pointer;
  color: var(--o-600); filter: drop-shadow(0 6px 6px rgba(80,40,15,.32)); z-index: 2;
  transition: transform var(--spring);
}
/* ขยายพื้นที่แตะหมุดเป็น ≥44px โดยไม่เปลี่ยนขนาดที่มองเห็น */
.m2-pin::before, .map-pin::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
.m2-pin:active { transform: translate(-50%,-100%) scale(.88); }
.m2-pin.active { transform: translate(-50%,-100%) scale(1.28); }
/* ชีตกระจกลอยล่างแผนที่ */
.m2-sheet {
  position: absolute; left: 12px; right: 12px; bottom: 16px; z-index: 5;
  background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  border-radius: var(--r-xl); padding: 18px; box-shadow: var(--e4), var(--hairline);
  animation: sheetUp .3s cubic-bezier(.22,.8,.3,1);
}
.m2-sheet .hd { display: flex; align-items: center; font-weight: 800; font-size: 1.08rem; margin-bottom: 4px; }
.m2-sheet .hd .chev { margin-left: auto; color: var(--ink-3); display: flex; }
.m2-row {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 0;
  font-size: .95rem; cursor: pointer; border-radius: var(--r-sm);
  transition: background var(--t-base);
}
.m2-row:hover { background: rgba(255,244,236,.75); }
.m2-row .o { width: 20px; height: 20px; border: 2px solid var(--o-200); border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; color: var(--orange); }
.m2-row .p { font-weight: 700; color: var(--ink); }
.m2-row .sep { color: var(--o-200); }
.m2-row .d { margin-left: auto; font-weight: 600; color: var(--ink-2); }
.m2-btns { display: flex; gap: 11px; margin-top: 14px; }
.m2-btns .btn { font-size: .9rem; padding: 13px 8px; gap: 7px; white-space: nowrap; }

/* การ์ดสรุปสินค้าเมื่อจิ้มหมุด */
.map-popcard {
  position: absolute; left: 12px; right: 12px; z-index: 6;
  background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border-radius: var(--r-xl); box-shadow: var(--e4), var(--hairline);
  padding: 14px; display: flex; gap: 13px; align-items: center; cursor: pointer;
  animation: sheetUp .26s cubic-bezier(.22,.8,.3,1);
}
.map-popcard .ph { width: 66px; height: 66px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 2.1rem; flex: none; overflow: hidden; }
.map-popcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.map-popcard .t { font-size: .9rem; font-weight: 700; line-height: 1.4; }
.map-popcard .meta { display: flex; gap: 9px; align-items: center; margin-top: 6px; font-size: .74rem; color: var(--ink-2); flex-wrap: wrap; }

/* ============================================================
   4) รายละเอียดสินค้า
   ============================================================ */
.d2-hero {
  position: relative; height: 336px; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(65% 55% at 50% 42%, #FFF9EF 0%, rgba(255,249,239,0) 72%),
    linear-gradient(180deg, #FFEBD2, #FFF6EA);
}
.d2-hero .em {
  position: relative; z-index: 2; font-size: 9.6rem; line-height: 1;
  filter: drop-shadow(0 26px 20px rgba(150,80,25,.28));
  animation: heroIn .5s cubic-bezier(.22,.9,.3,1);
}
@keyframes heroIn { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }
.d2-hero::after {   /* เงาใต้สินค้า */
  content: ''; position: absolute; left: 50%; bottom: 54px; transform: translateX(-50%);
  width: 44%; height: 20px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(140,70,25,.24), transparent 72%); filter: blur(5px);
}
.d2-hero .slider { position: absolute; inset: 0; }
.detail-float { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; z-index: 4; }
.detail-float .float-right { display: flex; gap: 10px; }
/* แถวในแผ่นแชร์ */
.share-row { width: 100%; text-align: left; border: none; background: #fff; cursor: pointer; margin-bottom: 8px; }
.share-row .ic { width: 42px; height: 42px; flex: none; border-radius: 13px; background: var(--o-50);
  display: flex; align-items: center; justify-content: center; color: var(--o-600); overflow: hidden; font-size: 1.2rem; }
.share-row .ic img { width: 100%; height: 100%; object-fit: cover; }
.share-row .f1 { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.share-row .f1 .muted { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-h { margin: 14px 0 8px; font-size: .88rem; color: var(--ink-2); }
.slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slider::-webkit-scrollbar { display: none; }
.slide { flex: none; width: 100%; height: 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; font-size: 6rem; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 4; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.8); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: width var(--t-base); }
.dots span.on { background: var(--orange); width: 20px; border-radius: var(--r-full); }

.d2-free {
  display: inline-flex; align-items: center; gap: 7px; color: #fff; font-weight: 700; font-size: 1.1rem;
  padding: 10px 24px; border-radius: 16px; margin-left: 16px; position: relative; top: 16px; z-index: 5;
  background-image: linear-gradient(180deg, rgba(255,255,255,.24), transparent 55%), linear-gradient(135deg, var(--o-400), var(--o-600));
  box-shadow: var(--glow-o), var(--inset-top);
}
.d2-stack { padding: 6px 14px 100px; display: flex; flex-direction: column; gap: 13px; }
.d2-card {
  background: linear-gradient(180deg, #fff, #FFFCF8); border-radius: var(--r-lg);
  box-shadow: var(--e2), var(--hairline); padding: 18px;
}
.d2-card.tint { background: linear-gradient(160deg, #FFF6E7, #FFF1DC); box-shadow: var(--e1), inset 0 0 0 1px rgba(255,255,255,.7); }
.d2-title-row { display: flex; align-items: flex-start; gap: 10px; }
.d2-title-row h2 { flex: 1; font-size: 1.18rem; line-height: 1.5; }
.d2-title-row .hb {
  width: 44px; height: 44px; margin: -8px -6px 0 0; border: none; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--ink-3);
  transition: transform var(--spring), color var(--t-base);
}
.d2-title-row .hb.on { color: var(--danger); }
.d2-title-row .hb:active { transform: scale(.82); }
.d2-sub { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: .92rem; margin-top: 8px; }
.d2-line { display: flex; align-items: center; gap: 8px; font-size: .98rem; padding: 8px 0; }
.d2-line .ico { color: var(--orange); }
.d2-line .k { color: var(--ink-2); }
.d2-line .v { font-weight: 600; }
.d2-cred { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; font-weight: 700; padding-bottom: 13px; border-bottom: 1px solid var(--line); margin-bottom: 13px; flex-wrap: wrap; }
.d2-cred .ico { color: #F59E0B; }
.d2-desc { color: var(--ink-2); font-size: .94rem; line-height: 1.8; }
.loc-note { font-size: .76rem; color: var(--ink-3); margin-top: 8px; }

/* แถบปุ่มล่างแบบกระจก */
.d2-actionbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; z-index: var(--z-bar);
  background: rgba(255,252,248,.9);
  -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
  border-radius: 28px 28px 0 0; box-shadow: 0 -6px 26px rgba(60,40,25,.1);
  display: flex; gap: 12px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
}
@media (min-width: 500px) { .d2-actionbar { border-radius: 28px 28px 38px 38px; } }
.d2-actionbar .btn { font-size: 1.04rem; min-height: 52px; }

/* ============================================================
   5) ลงประกาศสินค้า
   ============================================================ */
.post-section {
  margin: 0 16px 14px; padding: 18px;
  background: linear-gradient(180deg, #fff, #FFFCF8); border-radius: var(--r-lg);
  box-shadow: var(--e2), var(--hairline);
}
.post-step-label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .94rem; color: var(--orange-dark); margin-bottom: 12px; }
.p2-upload {
  height: 198px; border-radius: var(--r-md); cursor: pointer; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: #7C8CA0; font-size: 1rem;
  background: linear-gradient(160deg, #EEF3F9, #E4EBF3);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.9), inset 0 2px 10px rgba(90,110,140,.1);
  transition: box-shadow var(--t-base), transform var(--spring);
}
.p2-upload:hover { box-shadow: inset 0 0 0 2px var(--o-200), inset 0 2px 10px rgba(238,96,2,.08); color: var(--orange-dark); }
.p2-upload:active { transform: scale(.99); }
.p2-upload img { width: 100%; height: 100%; object-fit: cover; }
.p2-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 15px; }
.photo-thumb {
  position: relative; aspect-ratio: 1; border-radius: 14px; cursor: pointer; overflow: hidden;
  display: flex; align-items: center; justify-content: center; color: #9DAABB;
  background: #F6F9FC; box-shadow: inset 0 0 0 1.6px #DDE5EE;
  transition: box-shadow var(--t-base), color var(--t-base);
}
.photo-thumb:hover { box-shadow: inset 0 0 0 1.6px var(--o-200); color: var(--orange); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb .rm {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(20,14,10,.62); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.p2-label { font-size: 1.02rem; font-weight: 700; margin-bottom: 8px; }
.p2-value-row {
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: #FBF8F4; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1.5px var(--line);
  transition: box-shadow var(--t-base);
}
.p2-value-row:focus-within { box-shadow: inset 0 0 0 1.8px var(--o-200); background: #fff; }
.p2-value-row input, .p2-value-row textarea {
  flex: 1; min-height: 48px; padding: 12px 0;
  border: none; outline: none; font-size: 1rem; background: none; resize: none; min-width: 0;
}
.p2-value-row .chev { color: var(--ink-3); display: flex; }
.p2-row { display: flex; align-items: center; gap: 12px; }
.p2-row + .p2-row { margin-top: 14px; }
.p2-row .lbl { font-size: 1rem; font-weight: 600; flex: none; white-space: nowrap; }
.p2-pills { display: flex; gap: 9px; flex: 1; }
.p2-pill {
  flex: 1; min-height: 44px; text-align: center; padding: 11px 4px; border-radius: var(--r-full);
  border: none; background: #fff; box-shadow: inset 0 0 0 1.6px var(--line-2);
  font-size: .92rem; color: var(--ink-2); cursor: pointer;
  transition: transform var(--spring), box-shadow var(--t-base), color var(--t-base), background var(--t-base);
}
.p2-pill:active { transform: scale(.95); }
.p2-pill.active {
  color: #fff; font-weight: 700; box-shadow: var(--glow-o), var(--inset-top);
  background-image: linear-gradient(180deg, rgba(255,255,255,.24), transparent 55%), linear-gradient(135deg, var(--o-400), var(--o-600));
}
.p2-price-input {
  flex: 1; min-height: 48px; background: #F4F0EA; border: none; border-radius: var(--r-sm);
  padding: 13px 16px; font-size: 1.02rem; font-weight: 700; outline: none;
  box-shadow: inset 0 1px 3px rgba(120,90,60,.09);
}
.p2-price-input:focus { background: #fff; box-shadow: inset 0 0 0 1.8px var(--o-200); }
.p2-select { flex: 1; min-width: 0; min-height: 44px; border: none; background: none; font-size: 1rem; outline: none; cursor: pointer; }
.p2-select.right { text-align: right; color: var(--ink-2); }
.p2-loc-input {
  flex: 1; min-height: 44px; display: flex; align-items: center; min-width: 0;
  font-size: 1rem; font-weight: 600; color: var(--orange-dark);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left;
}
.p2-loc-input.empty { color: var(--ink-3); font-weight: 500; }
/* ทั้งแถวเป็นปุ่ม — ล้างสไตล์ปุ่มมาตรฐานทิ้งให้เหมือนแถวธรรมดา */
.p2-row.as-btn { width: 100%; background: none; border: none; padding: 0; font: inherit; text-align: left; cursor: pointer; }
.p2-row.as-btn:active { opacity: .72; }

/* ---------- แผนที่ปักหมุดจุดนัดรับ ---------- */
.pick-map { position: relative; margin-top: 14px; border-radius: var(--r-md); overflow: hidden; height: 46dvh; min-height: 240px; background: var(--o-50); }
.pick-map #pickMap { position: absolute; inset: 0; }
/* หมุดตรึงกลาง — ปลายหมุดชี้จุดกึ่งกลางแผนที่พอดี */
.pick-cross {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%);
  color: var(--orange); pointer-events: none; z-index: 500;
  filter: drop-shadow(0 6px 8px rgba(120,60,20,.4));
}
.pick-here {
  position: absolute; right: 10px; bottom: 10px; z-index: 500;
  display: flex; align-items: center; gap: 6px; padding: 9px 14px; min-height: 40px;
  border: none; border-radius: var(--r-full); background: #fff; color: var(--orange-dark);
  font-size: .88rem; font-weight: 700; box-shadow: 0 4px 14px rgba(90,50,20,.22); cursor: pointer;
}
.pick-here:disabled { opacity: .6; }
.pick-nomap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: .9rem; padding: 20px; text-align: center; }
.p2-publish, .post-publish { margin: 10px 16px 30px; }
.p2-publish .btn { font-size: 1.14rem; min-height: 58px; }
/* วงกลมไอคอนตำแหน่ง */
.p2-loc-ic {
  width: 38px; height: 38px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff;
  background-image: linear-gradient(180deg, rgba(255,255,255,.24), transparent 55%), linear-gradient(135deg, var(--o-400), var(--o-600));
  box-shadow: var(--glow-o), var(--inset-top);
}

/* ============================================================
   6) ข้อความ & แชท
   ============================================================ */
.noti-item {
  display: flex; gap: 11px; align-items: flex-start; margin: 0 16px 10px; padding: 13px 15px;
  background: linear-gradient(140deg, var(--m-50), #F2FDF8); border-radius: var(--r-md);
  font-size: .84rem; color: var(--ink-2); cursor: pointer;
  box-shadow: var(--e1), inset 0 0 0 1px rgba(52,211,153,.16);
}
.noti-item .ico { color: var(--mint-dark); margin-top: 2px; }
.chatlist-item {
  display: flex; gap: 13px; align-items: center; padding: 13px 16px; cursor: pointer;
  background: #fff; border-bottom: 1px solid #FBF6EF;
  transition: background var(--t-base);
}
.chatlist-item:hover { background: #FFFBF6; }
.chatlist-item .mid { flex: 1; min-width: 0; }
.chatlist-item .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.chatlist-item .nm { font-weight: 700; font-size: .94rem; }
.chatlist-item .tm { font-size: .7rem; color: var(--ink-3); flex: none; }
.chatlist-item .last { font-size: .82rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.chatlist-item .pth, .list-item .pth {
  width: 46px; height: 46px; border-radius: 13px; flex: none; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
  box-shadow: var(--e1);
}
.chatlist-item .pth img, .list-item .pth img { width: 100%; height: 100%; object-fit: cover; }

/* อวตาร */
.avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
  background: linear-gradient(150deg, var(--o-50), var(--o-100));
  box-shadow: var(--e1), inset 0 0 0 1px rgba(255,255,255,.8);
}
.avatar.lg { width: 76px; height: 76px; font-size: 2.5rem; }

/* หน้าต่างแชท */
.c2-page {
  min-height: 100dvh; display: flex; flex-direction: column;
  background:
    radial-gradient(90% 40% at 80% 2%, rgba(255,255,255,.28), transparent 60%),
    linear-gradient(180deg, var(--o-500) 0%, #FF9235 20%, #FFDDB8 48%, var(--cream) 72%);
}
.c2-title { text-align: center; color: #fff; font-weight: 700; font-size: 1.14rem; padding: 16px 0 8px; text-shadow: 0 1px 6px rgba(160,60,10,.28); }
.c2-head { display: flex; align-items: center; gap: 12px; padding: 4px 14px 18px; color: #fff; }
.c2-head .back { width: 44px; height: 44px; border: none; background: none; color: #fff; cursor: pointer; display: flex; align-items: center; }
.c2-head .avatar { width: 48px; height: 48px; background: rgba(255,255,255,.95); box-shadow: 0 4px 14px rgba(155,58,4,.25), inset 0 0 0 2px rgba(255,255,255,.7); }
.c2-head .nm { font-weight: 700; font-size: 1.06rem; text-shadow: 0 1px 5px rgba(160,60,10,.25); }
.c2-head .call {
  margin-left: auto; width: 44px; height: 44px; border: none; cursor: pointer; border-radius: 50%;
  background: rgba(255,255,255,.22); color: #fff; display: flex; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
  transition: transform var(--spring), background var(--t-base);
}
.c2-head .call:active { transform: scale(.9); }
.c2-msgs { flex: 1; padding: 10px 18px 8px; display: flex; flex-direction: column; gap: 16px; }
.bubble {
  max-width: 78%; width: fit-content; font-size: 1rem; line-height: 1.55;
  padding: 14px 19px; border-radius: 22px;
  animation: bubbleIn .3s cubic-bezier(.22,.9,.3,1);
}
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.bubble.left {
  background: linear-gradient(180deg, #fff, #F7FAFF); align-self: flex-start;
  border-bottom-left-radius: 7px; box-shadow: var(--e2), var(--hairline);
}
.bubble.right {
  color: #fff; align-self: flex-end; border-bottom-right-radius: 7px;
  background-image: linear-gradient(180deg, rgba(255,255,255,.18), transparent 55%), linear-gradient(135deg, var(--o-400), var(--o-600));
  box-shadow: var(--glow-o), var(--inset-top);
}
.bubble img { max-width: 100%; border-radius: 13px; display: block; }
.bubble .bt { font-size: .64rem; opacity: .6; margin-top: 4px; text-align: right; }
.bubble.sys {
  align-self: center; background: rgba(255,255,255,.75); color: var(--ink-2); font-size: .76rem;
  padding: 7px 16px; border-radius: var(--r-full); max-width: 92%; text-align: center;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: var(--e1);
}
/* การ์ดนัดเวลาในแชท */
.c2-appt {
  background: linear-gradient(180deg, #fff, #FFFCF8); border-radius: var(--r-lg);
  box-shadow: var(--e3), var(--hairline); padding: 18px; margin-top: 6px;
}
.c2-appt .h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.04rem; }
.c2-appt .h .ico { color: var(--orange); }
.c2-appt .h .chev { margin-left: auto; color: var(--ink-3); display: flex; }
.c2-appt .slots { display: flex; flex-wrap: wrap; gap: 11px 14px; margin-top: 14px; align-items: center; }
.c2-slot {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 20px;
  border-radius: var(--r-full); border: none; background: #fff;
  box-shadow: inset 0 0 0 1.6px var(--o-200), var(--e1);
  font-size: 1rem; font-weight: 600; color: var(--ink); cursor: pointer;
  transition: transform var(--spring), box-shadow var(--t-base), background var(--t-base);
}
.c2-slot:hover { background: var(--o-50); }
.c2-slot:active { transform: scale(.95); }
.c2-slot .dn { color: var(--orange-dark); display: flex; }
.c2-slot.ghost { box-shadow: none; color: var(--ink-2); font-weight: 500; padding: 10px 8px; }
.c2-safety { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--orange-dark); font-size: .9rem; padding: 8px 16px 12px; }
.c2-inputbar { display: flex; gap: 11px; align-items: center; padding: 6px 16px calc(16px + env(safe-area-inset-bottom)); }
.c2-inputbar input {
  flex: 1; min-height: 50px; padding: 14px 22px; border-radius: var(--r-full); border: none;
  font-size: 1rem; outline: none; background: #fff; box-shadow: var(--e2), var(--hairline); min-width: 0;
}
.c2-inputbar input:focus { box-shadow: var(--e3), inset 0 0 0 1.6px var(--o-200); }
.c2-inputbar .send {
  width: 52px; height: 52px; flex: none; border: none; cursor: pointer; border-radius: 50%; color: #fff;
  display: flex; align-items: center; justify-content: center;
  background-image: linear-gradient(180deg, rgba(255,255,255,.24), transparent 55%), linear-gradient(135deg, var(--o-400), var(--o-600));
  box-shadow: var(--glow-o), var(--inset-top);
  transition: transform var(--spring);
}
.c2-inputbar .send:active { transform: scale(.9); }
/* ปุ่มแนบรูปในแชท — วงกลมขาวขนาดเท่าปุ่มส่ง แต่โทนอ่อนกว่าเพื่อไม่แย่งความสำคัญ */
.c2-inputbar .attach {
  width: 46px; height: 46px; flex: none; cursor: pointer; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--o-600); border: 1.6px solid var(--line);
  box-shadow: var(--e1); transition: transform var(--spring);
}
.c2-inputbar .attach:active { transform: scale(.9); }
.c2-inputbar .attach:disabled { opacity: .5; cursor: default; }

/* ============================================================
   7) โปรไฟล์
   ============================================================ */
.pf2-hero {
  position: relative; overflow: hidden; padding: 34px 24px 66px; border-radius: 0 0 34px 34px;
  background-image: linear-gradient(180deg, rgba(255,255,255,.16), transparent 45%), linear-gradient(140deg, #FF9028 0%, var(--o-500) 45%, var(--o-600) 100%);
  box-shadow: 0 12px 30px rgba(238,96,2,.24);
}
.pf2-hero::before { content: ''; position: absolute; right: -48px; top: -60px; width: 210px; height: 210px; border-radius: 50%; background: rgba(255,255,255,.16); }
.pf2-hero::after { content: ''; position: absolute; right: 22px; bottom: -86px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,140,80,.4); }
.pf2-hero .row { display: flex; align-items: center; gap: 20px; position: relative; z-index: 2; cursor: pointer; }
.pf2-hero .avatar {
  width: 100px; height: 100px; font-size: 3.4rem; background: #fff;
  box-shadow: 0 10px 26px rgba(155,58,4,.28), inset 0 0 0 4px rgba(255,255,255,.55);
}
.pf2-hero h2 { color: #fff; font-size: 1.55rem; font-weight: 800; text-shadow: 0 2px 10px rgba(155,58,4,.25); }
.pf2-hero .cr { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,.97); font-size: .98rem; margin-top: 6px; }
.pf2-hero .top-ics { position: absolute; right: 18px; top: 18px; display: flex; flex-direction: column; gap: 12px; z-index: 3; }
.pf2-hero .top-ics button {
  width: 44px; height: 44px; border: none; cursor: pointer; border-radius: 50%;
  background: rgba(255,255,255,.2); color: #fff; display: flex; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.32);
  transition: transform var(--spring), background var(--t-base);
}
.pf2-hero .top-ics button:active { transform: scale(.88); }
.pf2-stats {
  margin: -46px 16px 0; position: relative; z-index: 3;
  background: linear-gradient(160deg, #FFF9EE, #FFF3E2); border-radius: var(--r-lg);
  box-shadow: var(--e3), var(--hairline); padding: 20px 12px; display: flex; align-items: center;
}
.pf2-stats .lock {
  width: 46px; height: 46px; flex: none; margin: 0 8px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; color: var(--orange-dark);
  background: linear-gradient(160deg, #fff, var(--o-50)); box-shadow: var(--e1);
}
.pf2-stats .cell { flex: 1; text-align: center; }
.pf2-stats .cell + .cell { border-left: 1px solid rgba(240,200,160,.55); }
.pf2-stats .n { font-size: 1.42rem; font-weight: 800; letter-spacing: -.02em; }
.pf2-stats .l { font-size: .82rem; color: var(--ink-2); margin-top: 2px; }
.pf2-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 18px 16px; }
.pf2-cell {
  background: linear-gradient(180deg, #fff, #FFFCF8); border-radius: 19px; border: none; cursor: pointer;
  box-shadow: var(--e2), var(--hairline); padding: 18px 4px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: .78rem; color: var(--ink); font-weight: 500; min-height: 44px;
  transition: transform var(--spring), box-shadow var(--t-base);
}
.pf2-cell:hover { box-shadow: var(--e3), var(--hairline); }
.pf2-cell:active { transform: scale(.94); }
.pf2-cell .ic {
  width: 50px; height: 50px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  color: var(--orange-dark);
  background: linear-gradient(160deg, #FFF4E9, #FFE7D2);
  box-shadow: inset 0 1px 0 #fff, 0 3px 8px rgba(238,96,2,.13);
}
.pf2-cell.blue .ic {
  color: var(--blue-dark);
  background: linear-gradient(160deg, #EFF5FE, #DDE9FC);
  box-shadow: inset 0 1px 0 #fff, 0 3px 8px rgba(59,130,246,.14);
}
.pf2-safe {
  margin: 4px 16px 24px; padding: 17px; border-radius: var(--r-lg); cursor: pointer;
  background: linear-gradient(150deg, #F3F7FC, #EAF1FA);
  box-shadow: var(--e1), inset 0 0 0 1px rgba(255,255,255,.85);
  display: flex; align-items: center; gap: 14px;
  transition: transform var(--spring), box-shadow var(--t-base);
}
.pf2-safe:active { transform: scale(.98); }
.pf2-safe .ic {
  width: 46px; height: 46px; flex: none; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff;
  background-image: linear-gradient(180deg, rgba(255,255,255,.24), transparent 55%), linear-gradient(135deg, var(--o-400), var(--o-600));
  box-shadow: var(--glow-o), var(--inset-top);
}
.pf2-safe .t { font-weight: 700; font-size: 1.02rem; }
.pf2-safe .d { font-size: .84rem; color: var(--ink-2); margin-top: 3px; line-height: 1.5; }

/* ============================================================
   8) นัดรับสำเร็จ
   ============================================================ */
.b2-title { text-align: center; font-weight: 700; font-size: 1.16rem; padding: 20px 0 4px; }
.success-wrap { padding: 24px 22px 30px; text-align: center; }
.success-check {
  width: 108px; height: 108px; margin: 0 auto 4px; border-radius: 50%; color: #fff;
  display: flex; align-items: center; justify-content: center;
  background-image: linear-gradient(180deg, rgba(255,255,255,.3), transparent 52%), linear-gradient(140deg, var(--o-400), var(--o-600));
  box-shadow: 0 16px 34px rgba(238,96,2,.4), var(--inset-top);
  animation: popCheck .55s cubic-bezier(.34,1.5,.5,1);
}
.success-check .ico { animation: drawCheck .4s .2s both ease-out; }
@keyframes popCheck { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes drawCheck { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } }
.b2-line { font-size: 1.32rem; font-weight: 800; margin-top: 20px; line-height: 1.5; }
.b2-warn { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--orange-dark); font-size: .95rem; margin-top: 12px; }
.success-info { margin: 22px 0 0; padding: 0; text-align: left; }
.b2-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 14px; padding: 22px 20px; font-size: .95rem; }
.b2-grid .k { color: var(--ink-2); }
.b2-grid b { font-weight: 600; }
.b2-actions, .success-actions { display: flex; gap: 13px; margin-top: 26px; }
.b2-actions .btn, .success-actions .btn { font-size: 1.04rem; min-height: 52px; }
.success-safety { display: flex; align-items: flex-start; justify-content: center; gap: 7px; font-size: .8rem; color: var(--ink-3); margin-top: 20px; line-height: 1.6; text-align: left; }
.qr-box { margin: 16px auto 0; width: 140px; padding: 12px; background: #fff; border-radius: var(--r-md); box-shadow: var(--e2), var(--hairline); }
.qr-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; }
.qr-grid i { aspect-ratio: 1; background: var(--ink); border-radius: 1.5px; }
.qr-grid i.w { background: transparent; }

/* ============================================================
   ชีต / โมดัล / ฟอร์ม
   ============================================================ */
.sheet-mask {
  position: fixed; inset: 0; z-index: var(--z-sheet);
  background: rgba(40,26,16,.42);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: 430px; background: linear-gradient(180deg, #fff, #FFFCF8);
  border-radius: 30px 30px 0 0; padding: 16px 22px 30px; max-height: 88dvh; overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(60,40,25,.2);
  animation: sheetUp .3s cubic-bezier(.22,.9,.3,1);
}
@keyframes sheetUp { from { transform: translateY(44px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h3 { display: flex; align-items: center; gap: 9px; font-size: 1.1rem; margin-bottom: 12px; }
.grab { width: 46px; height: 5px; border-radius: var(--r-full); background: var(--line-2); margin: 0 auto 14px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 9px; margin: 10px 0 16px; }
.chip {
  min-height: 44px; padding: 10px 17px; border-radius: var(--r-full); cursor: pointer;
  border: none; background: #fff; box-shadow: inset 0 0 0 1.6px var(--line-2);
  font-size: .86rem; color: var(--ink-2);
  transition: transform var(--spring), box-shadow var(--t-base), background var(--t-base), color var(--t-base);
}
.chip:active { transform: scale(.94); }
.chip.active {
  color: var(--orange-dark); font-weight: 700;
  background: linear-gradient(150deg, var(--o-50), var(--o-100));
  box-shadow: inset 0 0 0 1.8px var(--orange), 0 3px 10px rgba(238,96,2,.14);
}

/* แถวเลือกรูปประจำตัว: ปุ่มอัปโหลด + รูปของเราเอง + อีโมจิสำเร็จรูป */
.av-row .av { display: flex; align-items: center; justify-content: center; }
.av-row .av-upload {
  gap: 7px; padding: 10px 15px; color: var(--orange-dark); font-weight: 700;
  background: linear-gradient(150deg, var(--o-50), #fff);
  box-shadow: inset 0 0 0 1.8px var(--o-200);
}
.av-row .av-upload svg { flex: none; }
.av-row .av-photo {
  width: 46px; height: 46px; min-height: 46px; padding: 0; overflow: hidden;
  border-radius: 50%;
}
.av-row .av-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-row .av-photo.active { box-shadow: inset 0 0 0 3px var(--orange), 0 4px 12px rgba(238,96,2,.22); }

/* รูปจริงในกรอบอวตารทุกขนาด */
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar.sm { width: 26px; height: 26px; font-size: 1rem; box-shadow: none; }

.field { margin-bottom: 15px; }
.field label { display: block; font-size: .84rem; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
/* ครอบทุก type ที่พิมพ์ได้ (text/tel/number/email/password/search/date...) —
   เดิมไล่ทีละ type ทำให้ช่องอีเมลกับรหัสผ่านหลุดสไตล์ กลายเป็นกรอบสี่เหลี่ยมของเบราว์เซอร์ */
.field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),
.field textarea, .field select {
  width: 100%; min-height: 48px; padding: 13px 16px; border-radius: var(--r-sm); border: none;
  box-shadow: inset 0 0 0 1.6px var(--line-2); background: #FDFBF8;
  font-size: .96rem; outline: none; transition: box-shadow var(--t-base), background var(--t-base);
}
.field input:focus, .field textarea:focus { box-shadow: inset 0 0 0 1.8px var(--orange); background: #fff; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.6; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .94rem; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .sl { position: absolute; inset: 0; border-radius: var(--r-full); background: #E2DAD1; cursor: pointer; transition: background var(--t-base); box-shadow: inset 0 1px 3px rgba(90,70,50,.16); }
.switch .sl::before { content: ''; position: absolute; width: 24px; height: 24px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform var(--spring); box-shadow: 0 2px 5px rgba(60,40,25,.25); }
.switch input:checked + .sl { background: linear-gradient(135deg, #4BE0AC, var(--m-600)); }
.switch input:checked + .sl::before { transform: translateX(20px); }

/* ============================================================
   รายการ / แท็บ / รีวิว / สถานะว่าง
   ============================================================ */
.tabs { display: flex; gap: 8px; padding: 4px 16px 14px; }
.tabs .tab {
  flex: 1; min-height: 44px; text-align: center; padding: 10px 6px; border-radius: var(--r-full);
  border: none; background: #fff; box-shadow: var(--e1), var(--hairline);
  font-size: .84rem; color: var(--ink-2); cursor: pointer;
  transition: transform var(--spring), box-shadow var(--t-base), color var(--t-base);
}
.tabs .tab:active { transform: scale(.95); }
.tabs .tab.active {
  color: #fff; font-weight: 700; box-shadow: var(--glow-o), var(--inset-top);
  background-image: linear-gradient(180deg, rgba(255,255,255,.24), transparent 55%), linear-gradient(135deg, var(--o-400), var(--o-600));
}
.list-item {
  margin: 0 16px 11px; padding: 13px 15px; display: flex; gap: 13px; align-items: center; cursor: pointer;
  background: linear-gradient(180deg, #fff, #FFFCF8); border-radius: var(--r-lg);
  box-shadow: var(--e1), var(--hairline);
  transition: transform var(--spring), box-shadow var(--t-base);
}
.list-item:hover { box-shadow: var(--e3), var(--hairline); }
.list-item:active { transform: scale(.985); }
.list-item .pth { width: 56px; height: 56px; border-radius: var(--r-sm); font-size: 1.9rem; }
.list-item .mid { flex: 1; min-width: 0; }
.list-item .t { font-size: .88rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .sub { font-size: .76rem; color: var(--ink-2); margin-top: 4px; }
.list-item .acts { display: flex; flex-direction: column; gap: 7px; align-items: flex-end; flex: none; }
.empty-state { text-align: center; color: var(--ink-3); padding: 54px 20px; font-size: .9rem; }
.empty-state .ic { display: flex; justify-content: center; margin-bottom: 12px; color: var(--line-2); }

.review-item { margin: 0 16px 11px; padding: 15px 16px; background: linear-gradient(180deg, #fff, #FFFCF8); border-radius: var(--r-lg); box-shadow: var(--e1), var(--hairline); }
.review-item .top { display: flex; align-items: center; gap: 9px; font-size: .88rem; font-weight: 700; }
.review-item .st { display: flex; gap: 2px; color: #F59E0B; margin-left: auto; }
.review-item .cm { font-size: .86rem; color: var(--ink-2); margin-top: 7px; line-height: 1.6; }
.review-item .tm { font-size: .7rem; color: var(--ink-3); margin-top: 5px; }
.stars { display: flex; gap: 10px; justify-content: center; }
.stars span {
  cursor: pointer; color: var(--line-2); display: flex;
  transition: transform var(--spring), color var(--t-base);
}
.stars span.on { color: #F59E0B; transform: scale(1.1); }
.stars span:active { transform: scale(.85); }

/* ============================================================
   แผนที่จริง (Leaflet) — ดู config.js
   ============================================================ */
.leaf-map { position: absolute; inset: 0; z-index: 0; background: #E8EEF4; }
/* เมื่อใช้แผนที่จริง ปิดลายถนน/พื้นหลังของแผนที่จำลอง */
.m2-map.has-real-map { background: #E8EEF4; }
.m2-map.has-real-map::before, .m2-map.has-real-map::after { display: none; }
.home-map.has-real-map::after { z-index: 2; }

/* หมุดสินค้าแบบ HTML บนแผนที่จริง */
.leaf-pin { position: relative; display: flex; flex-direction: column; align-items: center; color: var(--o-600); filter: drop-shadow(0 4px 4px rgba(80,40,15,.32)); transition: transform var(--spring); }
.leaf-pin .lbl {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--o-600); color: #fff; font-family: 'Prompt', sans-serif;
  font-size: .6rem; font-weight: 700; padding: 1px 7px; border-radius: var(--r-full); white-space: nowrap;
  box-shadow: 0 2px 5px rgba(80,40,15,.3);
}
.leaf-pin.free .lbl { background: var(--m-600); }
.leaf-pin.active { transform: scale(1.25); z-index: 5; }
.leaf-pin.me { color: var(--blue); filter: drop-shadow(0 5px 6px rgba(29,78,216,.45)); }
.leaflet-marker-icon { background: none; border: none; }

/* ปุ่มสลับชั้นแผนที่ ถนน / ดาวเทียม / ผสม */
.map-layers {
  position: absolute; top: 12px; left: 12px; z-index: 5; display: flex; gap: 3px; padding: 4px;
  background: rgba(255,255,255,.9); border-radius: var(--r-full);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  box-shadow: var(--e2), var(--hairline);
}
.ml-btn {
  min-height: 44px; min-width: 44px; padding: 10px 15px; border: none; cursor: pointer; border-radius: var(--r-full);
  background: none; font-size: .8rem; font-weight: 600; color: var(--ink-2);
  transition: background var(--t-base), color var(--t-base), box-shadow var(--t-base);
}
.ml-btn:hover { background: rgba(250,117,22,.1); }
.ml-btn.active {
  color: #fff;
  background-image: linear-gradient(180deg, rgba(255,255,255,.24), transparent 55%), linear-gradient(135deg, var(--o-400), var(--o-600));
  box-shadow: 0 3px 9px rgba(238,96,2,.32), var(--inset-top);
}
.map-tools { position: absolute; right: 12px; top: 12px; z-index: 5; display: flex; flex-direction: column; gap: 9px; }

/* หมายเหตุความเป็นส่วนตัวบนแผนที่ย่อหน้าแรก */
.home-map .map-hint {
  /* ยกขึ้นเหนือการ์ดหมวดหมู่ที่ซ้อนทับขอบล่างแผนที่ 22px */
  position: absolute; left: 12px; bottom: 30px; z-index: 3;
  display: flex; align-items: center; gap: 5px; max-width: calc(100% - 24px);
  padding: 5px 11px; border-radius: var(--r-full);
  background: rgba(255,255,255,.9); color: var(--ink-2); font-size: .68rem;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--e1);
}
.home-map .map-hint .ico { color: var(--orange); flex: none; }

/* เครดิตผู้ให้บริการแผ่นภาพ — ต้องแสดงตามเงื่อนไขการใช้งาน */
.leaflet-container .leaflet-control-attribution {
  font-family: 'Prompt', sans-serif; font-size: .58rem;
  background: rgba(255,255,255,.82); padding: 1px 6px; border-radius: 6px 0 0 0;
}
.leaflet-container a { color: var(--orange-dark); }

/* ---------- แผงเลือกภาษา ---------- */
.lang-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.lang-opt {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px;
  padding: 13px 16px; border: none; cursor: pointer; border-radius: var(--r-md);
  background: #fff; box-shadow: inset 0 0 0 1.6px var(--line), var(--e1);
  font-size: 1rem; color: var(--ink); text-align: left;
  transition: transform var(--spring), box-shadow var(--t-base), background var(--t-base);
}
.lang-opt:active { transform: scale(.97); }
.lang-opt:hover { background: var(--o-50); }
.lang-opt .sh {
  width: 40px; height: 40px; flex: none; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: .88rem; font-weight: 700; color: var(--ink-2);
  background: linear-gradient(160deg, #FCF7F1, #F2EBE2);
}
.lang-opt.active {
  color: var(--orange-dark); font-weight: 700;
  background: linear-gradient(150deg, var(--o-50), var(--o-100));
  box-shadow: inset 0 0 0 1.8px var(--orange), 0 4px 12px rgba(238,96,2,.16);
}
.lang-opt.active .sh {
  color: #fff;
  background-image: linear-gradient(180deg, rgba(255,255,255,.24), transparent 55%), linear-gradient(140deg, var(--o-400), var(--o-600));
  box-shadow: var(--glow-o), var(--inset-top);
}

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 26px); transform: translateX(-50%) translateY(16px);
  background: rgba(30,20,13,.94); color: #fff; padding: 13px 22px; border-radius: var(--r-full);
  font-size: .86rem; z-index: var(--z-toast); opacity: 0; pointer-events: none;
  transition: opacity var(--t-base), transform var(--spring);
  max-width: 86%; text-align: center; box-shadow: 0 10px 28px rgba(0,0,0,.28);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Utilities ---------- */
.px { padding-left: 16px; padding-right: 16px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.muted { color: var(--ink-2); font-size: .82rem; }
.flex { display: flex; } .aic { align-items: center; } .g8 { gap: 8px; } .g10 { gap: 10px; } .f1 { flex: 1; min-width: 0; }
.hidden { display: none !important; }

/* ---------- เคารพการตั้งค่าลดการเคลื่อนไหว ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
