/* =====================================================
   ซักหน่อย — Design tokens (ตาม handoff ของ designer)
   ===================================================== */
:root {
  --brand: #0284c7;
  --brand-2: #0ea5e9;
  --brand-light: #38bdf8;
  --brand-soft: #e0f2fe;
  --brand-line: #bae6fd;
  --bg: #f0f9ff;
  --card: #ffffff;
  --text: #1c2434;
  --muted: #6b7486;
  --faint: #94a3b8;
  --line: #e2eaf1;
  --green: #16a34a;
  --green-bg: #f0fdf4;
  --green-text: #15803d;
  --green-line: #bbf7d0;
  --error: #e11d48;
  --error-bg: #fff1f2;
  --error-text: #be123c;
  --warn-bg: #fff4d6;
  --warn-text: #7a4a00;
  --disabled: #cfd4dc;
  --grad: linear-gradient(130deg, #0284c7 0%, #0ea5e9 100%);
  --grad-bar: linear-gradient(120deg, #0284c7, #0ea5e9);
  --shadow: 0 6px 20px rgba(2, 132, 199, .10);
  --shadow-sm: 0 4px 14px rgba(2, 132, 199, .08);
  --shadow-btn: 0 6px 16px rgba(2, 132, 199, .30);
  --r-card: 16px;
  --r-hero: 20px;
  --r-sheet: 22px;
  --r-input: 12px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Prompt", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
  max-width: 560px; margin: 0 auto;
}
a { color: var(--brand); text-decoration: none; }
input, textarea, button, select { font-family: inherit; }
h1, h2, h3 { margin: 0; }
h2 { font-size: 19px; font-weight: 700; line-height: 1.35; }
h3 { font-size: 18px; font-weight: 700; }
small { display: block; font-size: 12.5px; color: var(--muted); }
.muted { color: var(--muted); font-size: 13.5px; margin: 0; }
.center { text-align: center; }
.req { color: var(--error); font-style: normal; }
[class^="icon-"], [class*=" icon-"] { line-height: 1; }

/* ---------- loading ---------- */
.loading { position: fixed; inset: 0; background: #fff; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); }
.loading.hide { display: none; }
.spinner { width: 38px; height: 38px; border: 4px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 500;
  display: flex; align-items: center; gap: 10px;
  min-height: 58px; padding: 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: var(--grad-bar); color: #fff;
}
.topbar-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.topbar-title.center { align-items: center; text-align: center; padding-left: 38px; }
.topbar-title strong { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title small { font-size: 12px; color: #fff; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .18); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.avatar-btn { width: 38px; height: 38px; font-size: 19px; background: rgba(255, 255, 255, .22); overflow: hidden; padding: 0; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- stepper ---------- */
.stepper {
  position: sticky; top: 58px; z-index: 499;
  display: flex; align-items: flex-start;
  padding: 10px 12px 8px; background: #fff; border-bottom: 1px solid var(--line);
}
.stepper.hide { display: none; }
.step { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.step::before { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.step:first-child::before { display: none; }
.step b {
  position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%;
  background: #cbd5e1; color: #fff; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.step span { font-size: 11px; color: var(--faint); white-space: nowrap; }
.step.done b, .step.active b { background: var(--brand); }
.step.done::before, .step.active::before { background: var(--brand); }
.step.done span { color: var(--text); }
.step.active span { color: var(--brand); font-weight: 700; }

/* ---------- layout ---------- */
main { flex: 1; display: flex; flex-direction: column; }
.view { display: none; }
.view.active { display: flex; flex-direction: column; animation: fade .2s ease; }
.page { padding: 16px 16px 24px; gap: 14px; }
#view-home.page { gap: 22px; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }
.section { display: flex; flex-direction: column; gap: 12px; }
.sec-head { display: flex; flex-direction: column; gap: 2px; }
.sec-head p { margin: 0; font-size: 13px; color: var(--muted); }
.card { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.card-head { display: flex; flex-direction: column; gap: 2px; }
.card-head b { font-weight: 600; font-size: 15px; }
.card-title { font-weight: 700; font-size: 16px; color: var(--brand); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 999px; border: 0;
  font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn i { font-size: 19px; }
.btn.primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-btn); }
.btn.primary:disabled, .btn.primary.disabled { background: var(--disabled); box-shadow: none; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--brand); border: 1.5px solid var(--line); }
.btn.white { background: #fff; color: var(--brand); box-shadow: 0 6px 16px rgba(3, 60, 100, .2); min-height: 48px; }
.btn.small { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn.block { width: 100%; }
.link-btn { background: none; border: 0; color: var(--muted); font-size: 14px; min-height: 44px; cursor: pointer; padding: 0 4px; }
.link-btn.danger { color: var(--error); font-size: 13px; min-height: 32px; align-self: flex-start; }
.center-link { align-self: center; }

/* ---------- home ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-hero);
  background: var(--grad); color: #fff; padding: 20px 18px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 10px 24px rgba(2, 132, 199, .25);
}
.hero > * { position: relative; }
.hero .hero-bubble { position: absolute; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .10); top: -50px; right: -40px; }
.hero .hero-art {
  position: absolute; right: 14px; bottom: 16px; width: 92px; height: 92px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); display: flex; align-items: center; justify-content: center; font-size: 50px;
}
.hero small { color: #fff; font-size: 13.5px; opacity: .95; }
.hero h1 { font-size: 23px; font-weight: 700; line-height: 1.3; }
.hero p { margin: 0; font-size: 13.5px; opacity: .95; }
.hero .btn { align-self: flex-start; margin-top: 6px; }

.latest {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px;
  border: 0; border-radius: var(--r-card); background: #fff; box-shadow: var(--shadow);
  text-align: left; color: var(--text); cursor: pointer;
}
.latest .ic { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.latest .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.latest .txt b { font-weight: 600; font-size: 14.5px; }
.badge { flex: none; align-self: flex-start; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.warn { background: var(--warn-bg); color: var(--warn-text); }
.badge.pink { background: #fdf2f8; color: #db2777; }
.latest .badge { align-self: center; }

.home-pkgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.home-pkg {
  position: relative; padding: 16px 6px 14px; border-radius: var(--r-card);
  border: 2px solid transparent; background: #fff; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; color: var(--text);
}
.home-pkg.picked { border-color: var(--brand); }
.home-pkg .picked-tag {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  padding: 1px 8px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.pkg-badge {
  flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: #fff;
  font-weight: 700; font-size: 21px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 5px var(--ring, #93c5fd);
}
.home-pkg .price { margin-top: 4px; font-size: 18px; font-weight: 700; white-space: nowrap; }
.home-pkg .price small { display: inline; font-size: 13px; color: inherit; }
.home-pkg small { font-size: 12px; }

.how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.how div {
  padding: 12px 4px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 11.5px; line-height: 1.35;
}
.how span { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.how span.green { background: #dcfce7; color: var(--green); }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick button {
  display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 14px;
  border-radius: var(--r-card); border: 0; background: #fff; box-shadow: var(--shadow-sm);
  color: var(--text); font-size: 14.5px; font-weight: 600; cursor: pointer; text-align: left;
}
.quick i { font-size: 20px; color: var(--brand); }

/* ---------- ① map ---------- */
.view-map.active { flex: 1; position: relative; min-height: calc(100vh - 116px); min-height: calc(100dvh - 116px); }
.map-area { flex: 1; position: relative; display: flex; min-height: 300px; background: #e8eef2; }
#map { flex: 1; z-index: 1; }
.map-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); z-index: 400; pointer-events: none; display: flex; flex-direction: column; align-items: center; }
.pin-head {
  width: 46px; height: 46px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--brand); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(3, 40, 80, .3); transition: transform .15s, background .2s;
}
.pin-head i { font-size: 20px; color: #fff; transform: rotate(45deg); }
.pin-shadow { width: 14px; height: 5px; border-radius: 50%; background: rgba(0, 0, 0, .2); margin-top: 6px; }
.map-pin.lift .pin-head { transform: rotate(-45deg) translate(6px, -6px); }
.map-pin.out .pin-head { background: var(--error); }
.locate-btn {
  position: absolute; top: 14px; right: 14px; z-index: 400;
  display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border-radius: 999px; border: 0; background: #fff; color: var(--brand);
  font-size: 14px; font-weight: 600; box-shadow: 0 6px 20px rgba(2, 132, 199, .18); cursor: pointer;
}
.locate-btn i { font-size: 18px; }
.map-card {
  position: relative; z-index: 400; margin-top: -22px;
  background: #fff; border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: 0 -8px 24px rgba(2, 132, 199, .12);
  padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px;
}
.map-card .hint { margin: 0; font-size: 13px; color: var(--muted); }
.addr-line { display: flex; gap: 10px; align-items: flex-start; }
.addr-line i { font-size: 19px; color: var(--brand); margin-top: 2px; }
.addr-line p { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.45; }
.zone { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; font-weight: 500; line-height: 1.5; background: var(--green-bg); color: var(--green-text); }
.zone i { font-size: 17px; margin-top: 2px; }
.zone.out { background: var(--error-bg); color: var(--error-text); }

/* ---------- bottom sheet (② ข้อมูล) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, .45); display: none; align-items: flex-end; justify-content: center; }
.sheet-wrap.open { display: flex; }
.sheet {
  width: 100%; max-width: 560px; max-height: 94vh; overflow-y: auto;
  background: #fff; border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  padding: 10px 18px calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 14px; animation: up .28s ease;
}
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
.sheet-handle { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: #d4dde6; }
.addr-hint { display: flex; gap: 4px; align-items: flex-start; }
.addr-hint i { font-size: 13px; margin-top: 3px; }
#infoForm { display: flex; flex-direction: column; gap: 14px; }

.saved-card { border: 1.5px solid var(--green-line); border-radius: var(--r-card); overflow: hidden; background: #fff; }
.saved-head { display: flex; align-items: center; gap: 6px; padding: 9px 14px; background: var(--green-bg); color: var(--green); font-size: 13px; font-weight: 600; }
.saved-head i { font-size: 16px; }
.saved-body { padding: 6px 14px 10px; display: flex; flex-direction: column; font-size: 14px; }
.info-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.info-row i { flex: none; font-size: 16px; color: var(--muted); margin-top: 2px; }
.info-row .lbl { flex: none; width: 70px; color: var(--muted); }
.info-row .val { font-weight: 500; word-break: break-word; }
.saved-foot { padding: 0 14px 12px; font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; }

.form { display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.input {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: var(--r-input);
  font-size: 15px; color: var(--text); background: #fff; resize: none;
}
.input:focus { outline: none; border-color: var(--brand); }
.input.invalid { border-color: var(--error); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two-dorm { grid-template-columns: 1.4fr 1fr; }
.two > * { min-width: 0; }
.error { color: var(--error); font-size: 13px; min-height: 0; margin: 0; }
.error:empty { display: none; }

.pick-block { display: flex; flex-direction: column; gap: 8px; }
.pick-title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.pick-title i { font-size: 16px; color: var(--brand); }
.date-grid + .pick-title { margin-top: 4px; }
.date-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.date-btn {
  min-height: 52px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; color: var(--text); padding: 4px 2px;
}
.date-btn small { font-size: 11.5px; }
.date-btn b { font-size: 14px; font-weight: 600; }
.slot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.slot-btn { min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; }
.date-btn.sel, .slot-btn.sel { border-color: var(--brand); background: var(--brand-soft); }
.slot-btn:disabled { background: #f5f7fa; color: #a0a8b5; cursor: not-allowed; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; margin-top: 4px; }
.sheet-actions .btn { min-height: 50px; font-size: 15px; }

/* ---------- ③ services ---------- */
.svc-list { display: flex; flex-direction: column; gap: 12px; }
.svc { background: #fff; border-radius: var(--r-card); border: 1.5px solid var(--line); box-shadow: 0 6px 20px rgba(2, 132, 199, .08); overflow: hidden; transition: border-color .15s; }
.svc.on { border-color: var(--brand); }
.svc-main { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--faint); }
.svc.on .svc-main { color: var(--text); }
.svc-check { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid #cbd5e1; background: #fff; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.svc.on .svc-check { background: var(--brand); border-color: var(--brand); }
.svc-ic { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 21px; }
.svc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.svc-txt b { font-weight: 600; font-size: 16px; }
.svc-price { flex: none; font-size: 13px; color: var(--muted); text-align: right; line-height: 1.45; }
.svc-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 14px 14px; }
.svc-opt { padding: 10px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; cursor: pointer; color: var(--text); text-align: left; }
.svc-opt.sel { border-color: var(--brand); background: var(--brand-soft); }
.svc-opt b { display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; }
.svc-opt b i { font-size: 15px; color: var(--brand); }
.svc-opt b i.icon-flame { color: #f97316; }
.svc-opt small { font-size: 12px; }

/* ---------- ④ package ---------- */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 999px; background: var(--brand-soft); }
.seg button {
  min-height: 48px; border-radius: 999px; border: 0; background: transparent; color: #475569;
  font-size: 15px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
.seg button.sel { background: #fff; color: var(--text); box-shadow: 0 4px 12px rgba(2, 132, 199, .18); }
.seg .dot { width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.pkg-detail { padding: 18px; gap: 14px; }
.pkg-top { display: flex; align-items: center; gap: 14px; }
.pkg-top .pkg-badge { width: 60px; height: 60px; font-size: 28px; }
.pkg-top .txt { flex: 1; display: flex; flex-direction: column; }
.pkg-top .txt b { font-weight: 700; font-size: 18px; }
.pkg-top .txt small { font-size: 13.5px; }
.meter { height: 10px; border-radius: 5px; background: #eef2f6; overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 5px; transition: width .25s; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--bg); font-size: 13.5px; }
.chip i { font-size: 15px; color: var(--brand); }
.divider { height: 1px; background: var(--line); }
.pkg-price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.pkg-price-row .big { font-size: 28px; font-weight: 700; white-space: nowrap; line-height: 1.1; }

/* ---------- ⑤ add-ons ---------- */
.pkg-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-card); background: linear-gradient(120deg, var(--brand-2), var(--brand-light)); color: #fff; }
.pkg-banner .k { flex: none; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .25); font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.pkg-banner .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pkg-banner .txt b { font-weight: 600; font-size: 15px; }
.pkg-banner .txt small { color: #fff; opacity: .95; }
.pkg-banner button { flex: none; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .7); background: none; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.list-card { padding: 4px 14px; gap: 0; }
.opt-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.opt-row:last-child { border-bottom: 0; }
.opt-ic { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--brand-line); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.opt-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.opt-txt b { font-weight: 600; font-size: 14.5px; }
.opt-txt small { font-size: 12px; line-height: 1.4; }
.qty { flex: none; display: flex; align-items: center; gap: 6px; }
.qty button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--brand-soft); color: var(--brand); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.qty button:disabled { opacity: .4; cursor: not-allowed; }
.qty span { width: 20px; text-align: center; font-weight: 600; }
.switch { position: relative; flex: none; width: 50px; height: 30px; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; cursor: pointer; transition: background .15s; }
.switch span::before { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: left .15s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::before { left: 23px; }

.photo-add {
  min-height: 110px; border-radius: 14px; border: 2px dashed #7dd3fc; background: var(--bg); color: var(--brand);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.photo-add i { font-size: 28px; }
.photo-add.small { min-height: 64px; flex-direction: row; font-size: 14px; }
.photo-add.small i { font-size: 20px; }
.photo-done { display: flex; align-items: center; gap: 12px; }
.photo-done img { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; background: #cbd5e1; }
.photo-done > div { display: flex; flex-direction: column; gap: 4px; }
.ok { display: flex; align-items: center; gap: 4px; color: var(--green); font-weight: 600; font-size: 14px; }
.ok i { font-size: 16px; }

.check-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 2px; cursor: pointer; font-size: 14px; }
.check-row input { position: absolute; opacity: 0; pointer-events: none; }
.check-row .box { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid #cbd5e1; background: #fff; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.check-row input:checked + .box { background: var(--brand); border-color: var(--brand); }
.check-row a { text-decoration: underline; }

/* ---------- summary bar ---------- */
.summary {
  position: sticky; bottom: 0; z-index: 600; display: none;
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(2, 132, 199, .10);
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  flex-direction: column; gap: 10px;
}
.summary.show { display: flex; }
.sum-lines { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.sum-line { display: flex; justify-content: space-between; gap: 10px; }
.sum-line span:first-child { color: var(--muted); }
.sum-line span:last-child { font-weight: 500; white-space: nowrap; }
.sum-line.disc span:last-child { color: var(--green); }
.sum-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sum-toggle { display: flex; flex-direction: column; align-items: flex-start; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; color: var(--text); min-width: 0; }
.sum-label { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.sum-label b { font-weight: 500; }
.sum-label i { font-size: 14px; color: var(--brand); transition: transform .2s; }
.summary.open .sum-label i { transform: rotate(180deg); }
.sum-toggle strong { font-size: 26px; font-weight: 700; color: var(--brand); line-height: 1.15; white-space: nowrap; }
#btnNext { flex: none; min-width: 150px; }
.assure { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 12px; color: #0369a1; }
.assure i { font-size: 14px; }

/* ---------- done ---------- */
.send-card {
  display: flex; flex-direction: column; gap: 14px; padding: 18px;
  border-radius: var(--r-hero); background: #fff; border: 2px solid var(--brand);
  box-shadow: 0 12px 30px rgba(2, 132, 199, .18);
}
.send-card h2 { font-size: 21px; line-height: 1.3; margin-bottom: 4px; }
.send-card .muted { font-size: 14px; line-height: 1.55; }
.send-card .muted b { color: var(--text); font-weight: 600; }
.btn.send {
  min-height: 60px; background: var(--grad-bar); color: #fff; font-size: 18px; font-weight: 700;
  box-shadow: 0 10px 24px rgba(2, 132, 199, .4); width: 100%;
}
.btn.send i { font-size: 21px; }
.mini-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.mini-steps li { display: flex; align-items: center; gap: 8px; }
.mini-steps span { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.mini-steps b { font-weight: 600; }
.sent-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 18px; border-radius: var(--r-hero); background: #fff; box-shadow: var(--shadow); text-align: center; }
.sent-card h2 { font-size: 20px; }
.sent-card .muted { font-size: 14px; line-height: 1.55; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 34px; }
.ticket { padding: 0; gap: 0; overflow: hidden; box-shadow: 0 6px 20px rgba(2, 132, 199, .08); }
.ticket-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--bg); border-bottom: 1px dashed var(--brand-line); }
.ticket-head b { font-weight: 700; font-size: 17px; color: var(--brand); letter-spacing: .02em; }
.ticket-body { padding: 10px 16px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.t-row { display: flex; gap: 10px; }
.t-row span:first-child { flex: none; width: 76px; color: var(--muted); }
.t-total { display: flex; justify-content: space-between; align-items: baseline; }
.t-total span { color: var(--muted); }
.t-total b { font-weight: 700; font-size: 20px; }

/* ---------- price / orders / contact ---------- */
.p-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.p-row .pkg-badge { width: 40px; height: 40px; font-size: 17px; box-shadow: 0 0 0 4px var(--ring); }
.p-row .txt { flex: 1; display: flex; flex-direction: column; }
.p-row .txt b { font-weight: 600; font-size: 14.5px; }
.p-row .amt { font-weight: 700; font-size: 19px; white-space: nowrap; }
.p-grid { display: grid; grid-template-columns: 1.6fr repeat(var(--cols, 3), 1fr); font-size: 13.5px; }
.p-grid span { padding: 9px 0; border-top: 1px solid var(--line); text-align: center; }
.p-grid span.l { text-align: left; }
.p-grid span.h { border-top: 0; font-weight: 700; padding: 8px 0; }
.p-grid span.sub { color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.kv b { font-weight: 600; white-space: nowrap; }

.order-card { gap: 8px; }
.order-card .top { display: flex; justify-content: space-between; align-items: center; }
.order-card .top b { font-weight: 700; font-size: 16px; }
.order-card .mid { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.order-card .mid > div { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; }
.order-card .amt { flex: none; font-weight: 700; font-size: 18px; color: var(--brand); white-space: nowrap; }
.order-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.order-actions .btn { min-height: 44px; font-size: 13.5px; padding: 0 10px; }
.order-actions .btn i { font-size: 15px; }
.empty { padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.empty .ic { width: 72px; height: 72px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 32px; }
.empty b { font-weight: 700; font-size: 17px; }
.empty .btn { min-height: 48px; margin-top: 6px; font-size: 15px; }

.c-row { display: flex; align-items: center; gap: 12px; min-height: 52px; color: var(--text); border-bottom: 1px solid var(--line); font-size: 14.5px; }
.c-row:last-child { border-bottom: 0; align-items: flex-start; padding: 14px 0; line-height: 1.5; }
.c-row i { flex: none; font-size: 18px; color: var(--brand); }
.c-row:last-child i { margin-top: 2px; }
.terms { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.6; display: flex; flex-direction: column; gap: 2px; }

/* ---------- profile ---------- */
.profile-head { flex-direction: row; align-items: center; gap: 14px; }
.profile-head b { font-size: 17px; font-weight: 600; }
.avatar-lg { flex: none; width: 60px; height: 60px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 28px; overflow: hidden; }
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- payment (ปิดไว้) ---------- */
.review dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.review dt { color: var(--muted); }
.review dd { margin: 0; text-align: right; }
.review hr { grid-column: 1 / -1; width: 100%; border: 0; border-top: 1px dashed var(--line); margin: 6px 0; }
.pay-methods { display: flex; flex-direction: column; gap: 8px; }
.pay-opt { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; }
.pay-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.pay-opt input { accent-color: var(--brand); width: 18px; height: 18px; }
.qr-card { align-items: stretch; text-align: center; }
.pp-head { background: #0e3a6e; color: #fff; font-weight: 700; letter-spacing: 1px; border-radius: 10px; padding: 8px; }
#qrcode { display: flex; justify-content: center; }
#qrcode img, #qrcode canvas { width: 210px; height: 210px; }
.pp-name { margin: 0; font-weight: 600; }
.pp-amount { margin: 0; font-size: 24px; font-weight: 700; color: var(--brand); }
.slip-preview { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; align-self: center; }

/* ---------- tab bar ---------- */
.tabbar {
  position: sticky; bottom: 0; z-index: 600; display: none;
  grid-template-columns: repeat(5, 1fr);
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(2, 132, 199, .06);
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
}
.tabbar.show { display: grid; }
.tabbar button {
  min-height: 52px; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: #8a93a3; font-size: 11.5px; font-weight: 400;
}
.tabbar button i { font-size: 22px; }
.tabbar button.active { color: var(--brand); font-weight: 700; }
.tabbar .tab-main { justify-content: flex-end; color: var(--brand); font-weight: 600; }
.tabbar .tab-main span {
  width: 58px; height: 58px; margin-top: -30px; border-radius: 50%;
  background: var(--grad); border: 4px solid #fff; box-shadow: 0 6px 16px rgba(2, 132, 199, .4);
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.tabbar .tab-main span i { font-size: 24px; }

/* ---------- modal / toast ---------- */
.modal { position: fixed; inset: 0; z-index: 1100; background: rgba(15, 23, 42, .45); display: none; align-items: center; justify-content: center; padding: 24px; }
.modal.open { display: flex; }
.modal-box { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 10px; animation: fade .2s; }
.modal-box .muted { font-size: 14px; line-height: 1.55; }
.modal-box .muted b { color: var(--text); font-weight: 600; }
.modal-box .two { margin-top: 6px; }
.modal-box .btn { min-height: 48px; font-size: 15px; }
.toast {
  position: fixed; left: 50%; bottom: 140px; transform: translateX(-50%); z-index: 2000;
  max-width: 88%; padding: 10px 18px; border-radius: 999px; background: rgba(28, 36, 52, .9); color: #fff;
  font-size: 13.5px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.toast.show { opacity: 1; }

/* ---------- แผนที่แบบมินิมอล (ตามดีไซน์) ---------- */
.zone-legend {
  position: absolute; left: 14px; top: 22px; z-index: 400; pointer-events: none;
  display: flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .9); color: var(--muted); font-size: 11px; box-shadow: 0 1px 4px rgba(2, 132, 199, .12);
}
.zone-legend .sw { width: 14px; height: 10px; border-radius: 3px; border: 1.5px dashed var(--brand-light); background: rgba(56, 189, 248, .2); }
.leaflet-control-attribution { font-size: 9px !important; background: rgba(255, 255, 255, .6) !important; }
#map { background: #f2f4f5; }

/* ---------- สถานะออเดอร์ / ติดตามงาน ---------- */
.badge.blue { background: var(--brand-soft); color: var(--brand); }
.badge.green { background: #dcfce7; color: var(--green-text); }
.badge.grey { background: #eef2f6; color: var(--muted); }
.dots { display: flex; gap: 4px; margin-top: 4px; }
.dots i { width: 18px; height: 5px; border-radius: 3px; background: var(--line); }
.dots i.done { background: var(--brand-light); }
.dots i.now { background: var(--brand); }
.sync-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sync-btn { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--brand); font-size: 13px; font-weight: 600; cursor: pointer; }
.sync-btn.spin i { animation: spin .8s linear infinite; }
#orderList .assure { margin-bottom: 12px; }
.order-card { margin-bottom: 12px; }
.order-card.closed { box-shadow: var(--shadow-sm); }
.order-actions .btn:disabled { color: var(--faint); background: #f5f7fa; cursor: not-allowed; }
.tracker { list-style: none; margin: 4px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--bg); display: flex; flex-direction: column; }
.tracker li { position: relative; display: flex; gap: 12px; padding: 6px 0; color: var(--faint); }
.tracker li::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: -6px; width: 2px; background: var(--line); }
.tracker li:last-child::before { display: none; }
.tracker li.done::before { background: var(--brand); }
.tracker .dot { flex: none; position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 1.5px solid var(--line); color: var(--faint); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.tracker li.done { color: var(--text); }
.tracker li.done .dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.tracker li.now { color: var(--text); }
.tracker li.now .dot { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 5px rgba(2, 132, 199, .18); animation: pulse 1.6s ease-in-out infinite; }
.tracker li > div { display: flex; flex-direction: column; padding-top: 3px; }
.tracker li b { font-size: 14px; font-weight: 500; }
.tracker li.now b { font-weight: 700; color: var(--brand); }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(2, 132, 199, .06); } }

/* ===== ราคาใหม่: คอร์ส (เลือก 1) + ช่วงจำนวนผ้า ===== */
.svc.radio { position: relative; overflow: visible; }
.radio-dot { border-radius: 50%; }
.svc.on .radio-dot { background: #fff; border: 7px solid var(--brand); }
.svc-price b { display: block; font-size: 17px; color: var(--brand); font-weight: 700; }
.svc:not(.on) .svc-price b { color: var(--muted); }
.pop-tag { position: absolute; top: -10px; right: 14px; z-index: 1; padding: 1px 10px; border-radius: 999px; background: #ec4899; color: #fff; font-size: 11px; font-weight: 600; }
.temp-card { gap: 8px; }
.temp-card .svc-opts { padding: 0; }
.svc-opt b i.icon-droplet { color: var(--brand); }
.tier-list { display: flex; flex-direction: column; gap: 8px; }
.tier { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; color: var(--text); cursor: pointer; text-align: left; box-shadow: var(--shadow-sm); }
.tier .txt { flex: 1; }
.tier .txt b { font-weight: 600; font-size: 15.5px; }
.tier .amt { font-weight: 700; font-size: 18px; color: var(--muted); }
.tier.sel { border-color: var(--brand); background: var(--brand-soft); }
.tier.sel .amt { color: var(--brand); }
.tier.sel .radio-dot { background: #fff; border: 7px solid var(--brand); }
.svc-ic.big { width: 52px; height: 52px; font-size: 26px; }
.hint-box { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--brand-soft); font-size: 13px; line-height: 1.5; }
.hint-box i { color: var(--brand); font-size: 16px; margin-top: 2px; }
.pkg-banner .k i { font-size: 20px; }
.qty input { width: 40px; height: 34px; border: 1.5px solid var(--line); border-radius: 10px; text-align: center; font: 600 15px "Prompt", sans-serif; color: var(--text); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.home-pkg .c-name { font-size: 13.5px; font-weight: 600; text-align: center; line-height: 1.3; }
.home-pkg .price { color: var(--brand); margin-top: 0; }
.picked-tag.pop { background: #ec4899; }
.p-grid .pr { font-weight: 600; }
.p-grid span.h { font-size: 12.5px; line-height: 1.3; color: var(--brand); }
.course-keys { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.course-keys span { display: flex; align-items: center; gap: 6px; }
.course-keys i { color: var(--brand); }
.course-keys b { color: var(--text); font-weight: 600; }
.kv span i { color: var(--brand); margin-right: 4px; }
.kv.free b { color: var(--green); }
.hero p { max-width: 64%; }

/* ===== แถบประกาศ (ตั้งค่าจากชีต) ===== */
.announce { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--warn-bg); color: var(--warn-text); font-size: 14px; line-height: 1.5; margin-top: -8px; }
.announce i { font-size: 18px; margin-top: 2px; flex: none; }
.announce.closed { background: var(--error-bg); color: var(--error-text); }
.order-card .badges { display: flex; gap: 6px; align-items: center; }
.badge i { font-size: 11px; margin-right: 2px; }
