:root {
  --bg: #eef3ea;
  --ink: #1c2a1f;
  --muted: #5d6b60;
  --card: #ffffff;
  --line: #d5e0d4;
  --ok: #2e7d32;
  --wait: #ef6c00;
  --busy: #6d757d;
  --accent: #1b5e20;
  --shadow: 0 10px 30px rgba(28, 42, 31, 0.08);
  --font: "Prompt", "Sarabun", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, #f7ffe9 0, transparent 40%),
    radial-gradient(circle at 90% 0%, #e7f5ff 0, transparent 35%),
    linear-gradient(180deg, #f4f7f1, #e8efe4);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1680px; margin: 0 auto; padding: 16px; }
.topbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.brand h1 { margin: 0; font-size: 1.35rem; font-weight: 700; }
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; }
.brand-hero {
  min-width: 0;
  flex: 1 1 auto;
}
.brand-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
}
.brand-title-line {
  display: block;
  animation: brandTitleIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.brand-title-main {
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(105deg, #1b5e20 0%, #2e7d32 35%, #c9a227 70%, #1b5e20 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation:
    brandTitleIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both,
    brandShine 5.5s ease-in-out infinite;
}
.brand-title-sub {
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  font-weight: 500;
  color: #4a5d4e;
  letter-spacing: 0.04em;
  animation-delay: 0.12s;
}
.brand-title-sub::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 3px;
  margin-right: 8px;
  margin-bottom: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #e2c275, #2e7d32);
  vertical-align: middle;
  animation: brandBarIn 0.6s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes brandTitleIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes brandBarIn {
  from { opacity: 0; transform: scaleX(0); transform-origin: left center; }
  to { opacity: 1; transform: scaleX(1); }
}
@keyframes brandShine {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* —— หัวหน้าลงชื่อร้าน (register.php) —— */
.register-topbar {
  margin-bottom: 18px;
}
.register-hero {
  width: 100%;
}
.register-hero-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.25;
}
.register-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: clamp(1.7rem, 6vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(110deg, #1b5e20 0%, #2e7d32 28%, #c9a227 55%, #1b5e20 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation:
    registerHeroIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) both,
    brandShine 5.5s ease-in-out infinite;
}
.register-hero-kicker .register-hero-ico {
  color: #2e7d32;
  -webkit-text-fill-color: #2e7d32;
  background: none;
  flex-shrink: 0;
}
.register-hero-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-left: clamp(1.25rem, 6vw, 2.75rem);
  padding-left: 4px;
  border-left: 3px solid rgba(46, 125, 50, 0.25);
}
.register-hero-line {
  display: flex;
  align-items: flex-start;
  gap: 0.45em;
  font-size: clamp(0.98rem, 2.8vw, 1.08rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
  animation: registerHeroIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.register-hero-line:nth-child(1) { animation-delay: 0.1s; }
.register-hero-line:nth-child(2) { animation-delay: 0.18s; }
.register-hero-ico {
  display: inline-flex;
  margin-top: 0.15em;
  color: #2e7d32;
  flex-shrink: 0;
}
.register-hero-ico svg {
  width: 1.15em;
  height: 1.15em;
  display: block;
}
.register-hero-date {
  color: #1565c0 !important;
  font-weight: 700;
}
.register-hero-date .register-hero-ico {
  color: #1565c0;
}
@keyframes registerHeroIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .register-hero-kicker,
  .register-hero-line {
    animation: none !important;
  }
  .register-hero-kicker {
    background: none;
    color: var(--accent);
    -webkit-background-clip: unset;
    background-clip: unset;
  }
}

/* —— ฟอร์มลงชื่อแบบการ์ดย่อย (สไตล์คู่มือ) —— */
.reg-form-shell {
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(46, 125, 50, 0.08), transparent 55%),
    radial-gradient(90% 70% at 100% 8%, rgba(249, 168, 37, 0.10), transparent 50%),
    linear-gradient(180deg, #f7fbf5 0%, #ffffff 60%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.reg-form-cards {
  display: grid;
  gap: 12px;
}
.reg-field-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 14px 14px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(213, 224, 212, 0.95);
  box-shadow: 0 4px 14px rgba(28, 42, 31, 0.05);
}
.reg-field-num {
  width: 36px;
  height: 36px;
  margin-top: 2px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 4px 10px rgba(27, 94, 32, 0.22);
}
.reg-field-body {
  min-width: 0;
}
.reg-field-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.reg-field-hint {
  margin: -4px 0 8px;
  font-size: 0.88rem;
  color: var(--muted);
}
.reg-stall-size-hint {
  color: #b71c1c;
  font-weight: 700;
}
.reg-photo-limit-hint {
  color: #b71c1c;
  font-weight: 700;
}
.reg-photo-first-hint {
  font-family: "Prompt", sans-serif;
  font-style: italic;
  font-weight: 500;
  color: #d32f2f;
}
.reg-field-note {
  display: block;
  margin-top: 6px;
  color: #666;
  font-size: 0.85rem;
}
.reg-price-hint {
  margin: 8px 0 0;
  color: #1565c0;
  font-weight: 700;
  font-size: 0.95rem;
}
.reg-field-card label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}
.reg-field-card input,
.reg-field-card select,
.reg-field-card textarea {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
  background: #fbfcfb;
}
.reg-field-card input:focus,
.reg-field-card select:focus,
.reg-field-card textarea:focus {
  outline: 2px solid rgba(46, 125, 50, 0.35);
  border-color: #81c784;
  background: #fff;
}
.reg-field-card .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.reg-name-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) 1.15fr 1.15fr;
  gap: 10px;
}
.reg-name-row select {
  width: 100%;
  min-height: 44px;
}
.reg-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
  padding-top: 4px;
}
.reg-form-actions .btn {
  min-width: 140px;
  min-height: 44px;
}

/* —— หน้ารายละเอียดหลังลงชื่อ —— */
.reg-detail-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
}
.reg-detail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.reg-detail-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--zone, #2e7d32) 18%, #fff);
  color: #1b4332;
  font-size: 0.86rem;
  font-weight: 700;
}
.reg-detail-status {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(226, 194, 117, 0.35);
  color: #6b5314;
  font-size: 0.78rem;
  font-weight: 700;
}
.reg-detail-shop {
  margin: 0 0 14px;
  color: #0d5f5a;
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  line-height: 1.25;
}
.reg-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.reg-detail-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: start;
}
.reg-detail-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(13, 95, 90, 0.08);
  color: #0d5f5a;
  flex: 0 0 auto;
}
.reg-detail-ico svg {
  width: 22px;
  height: 22px;
}
.reg-detail-list strong {
  display: block;
  color: #0d5f5a;
  font-size: 0.88rem;
  margin-bottom: 2px;
}
.reg-detail-list p {
  margin: 0;
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.reg-detail-list a {
  color: #0d5f5a;
  font-weight: 600;
  text-decoration: underline;
}
.reg-detail-photos {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.reg-detail-photos-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: #0d5f5a;
}
.reg-detail-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.reg-detail-photo {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(226, 194, 117, 0.85);
  background: #f8faf8;
  aspect-ratio: 1;
}
.reg-detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.reg-detail-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

/* Custom dropdown — สไตล์ตัวอย่าง (ทอง / ไอคอน / ติ๊ก) */
.fancy-dd {
  position: relative;
  --dd-gold: #d4a84b;
  --dd-gold-soft: #f3e2b0;
  --dd-ink: #1c2a4a;
  --dd-muted: #7b879c;
  --dd-ico-bg: #e8eef5;
}
.fancy-dd-trigger {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1.5px solid var(--dd-gold);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-shadow: 0 2px 8px rgba(212, 168, 75, 0.12);
}
.fancy-dd.is-open .fancy-dd-trigger {
  border-color: #c9962f;
  box-shadow: 0 4px 14px rgba(212, 168, 75, 0.2);
}
.fancy-dd-lead-ico,
.fancy-dd-chev,
.fancy-dd-opt-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--dd-ico-bg);
  color: #35507a;
}
.fancy-dd-chev {
  background: color-mix(in srgb, var(--dd-gold) 28%, #fff);
  color: #8a6a1f;
}
.fancy-dd.is-open .fancy-dd-chev {
  transform: rotate(180deg);
}
.fancy-dd-lead-ico svg,
.fancy-dd-chev svg,
.fancy-dd-opt-ico svg,
.fancy-dd-check svg {
  width: 20px;
  height: 20px;
  display: block;
}
.fancy-dd-label {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--dd-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fancy-dd-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  max-height: min(340px, 55vh);
  overflow: auto;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(212, 168, 75, 0.35);
  box-shadow: 0 14px 34px rgba(28, 42, 31, 0.14);
}
.fancy-dd-option {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.fancy-dd-option:last-child { margin-bottom: 0; }
.fancy-dd-option:hover,
.fancy-dd-option:focus {
  background: #f7fafc;
  outline: none;
}
.fancy-dd-option.is-selected {
  background: color-mix(in srgb, var(--dd-gold) 12%, #fff);
}
.fancy-dd-opt-ico {
  color: var(--zone, #35507a);
  background: color-mix(in srgb, var(--zone, #35507a) 12%, #fff);
}
.fancy-dd-opt-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.fancy-dd-opt-text strong {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--dd-ink);
  line-height: 1.25;
}
.fancy-dd-opt-text em {
  font-style: normal;
  font-size: 0.82rem;
  color: var(--dd-muted);
}
.fancy-dd-check {
  width: 26px;
  height: 26px;
  color: var(--dd-gold);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity .15s ease, transform .15s ease;
}
.fancy-dd-option.is-selected .fancy-dd-check,
.fancy-dd-option:hover .fancy-dd-check {
  opacity: 1;
  transform: scale(1);
}
.fancy-dd-option:hover .fancy-dd-check {
  opacity: 0.55;
}
.fancy-dd-option.is-selected:hover .fancy-dd-check {
  opacity: 1;
}

@media (max-width: 560px) {
  .reg-field-card .row-2 {
    grid-template-columns: 1fr;
  }
  .reg-name-row {
    grid-template-columns: 1fr;
  }
  .reg-form-actions .btn {
    width: 100%;
  }
}
.nav-links { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.nav-map-label-short { display: none; }
.desktop-zoom-group {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.desktop-zoom-btn {
  width: 42px;
  height: 42px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.desktop-zoom-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.desktop-zoom-btn .map-zoom-icon {
  width: 22px;
  height: 22px;
  display: block;
}
.desktop-zoom-layer {
  position: relative;
  transform-origin: top left;
}
.nav-links a, .btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 12px; padding: 10px 14px; font: inherit; cursor: pointer;
}
.nav-links a.b07 {
  border: 1px solid var(--b07-bg);
  border-radius: var(--b07-radius);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--b07-shadow);
}
.nav-links a.b07:hover,
.nav-links a.b07:focus {
  color: var(--b07-fg);
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.05); text-decoration: none; }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn-danger { background: #c62828; color: #fff; }
.btn-warn { background: var(--wait); color: #fff; }

/* หน้าแผนผังคอม — แถบซ้ายชิดขอบจอ เพื่อขยายแผนที่ */
.wrap-map {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 12px 20px 16px 0;
}
.wrap-map .topbar {
  padding-left: 16px;
  margin-bottom: 10px;
}
.booking-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.booking-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 10px 12px 12px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 14px 14px 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  max-height: 100vh;
  overflow: auto;
}
.sidebar-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #374151;
  letter-spacing: 0.02em;
}
.booking-main { min-width: 0; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.stat .n { font-size: 1.4rem; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 0.85rem; }
.stat.ok .n { color: var(--ok); }
.stat.wait .n { color: var(--wait); }
.stat.busy .n { color: var(--busy); }

.legend {
  display: flex; flex-direction: column; flex-wrap: nowrap; gap: 8px;
  margin: 0; font-size: 0.82rem;
}
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.swatch {
  width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0,0,0,.15);
}
.swatch.available { background: #1b5e20; border-color: #0d3d12; }
.swatch.pending { background: #e65100; border-color: #bf360c; }
.swatch.occupied { background: #455a64; border-color: #263238; }

.zone-price-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}
.zone-price-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.zone-price-swatch {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  flex: 0 0 auto;
  border: 1px solid rgba(0,0,0,.12);
}
.zone-price-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 0.75rem;
  line-height: 1.25;
  min-width: 0;
}
.zone-price-meta strong { font-size: 0.8rem; }
.zone-price-meta span { color: var(--muted); }

.market-zone-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 10px 0 0;
  padding: 8px 2px 2px;
  justify-content: center;
}
.market-zone-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}
.market-zone-swatch {
  width: 14px;
  height: 14px;
  border-radius: 0;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.22);
  box-sizing: border-box;
}

.swatch-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
  background-size: cover;
  background-position: center;
}
.swatch-available-hint {
  background: linear-gradient(135deg, #c62828 0 33%, #f9a825 33% 66%, #0288d1 66%);
  border-radius: 5px;
  border: 1px solid rgba(0,0,0,.12);
}
.person-pending,
.person-paid {
  border-radius: 999px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 70%;
}
.person-pending {
  background-color: #ef6c00;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='3.5' fill='%23fff'/%3E%3Cpath d='M5 19c1.5-3.2 3.8-4.8 7-4.8s5.5 1.6 7 4.8' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
}
.person-paid {
  background-color: #2e7d32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='3.5' fill='%23fff'/%3E%3Cpath d='M5 19c1.5-3.2 3.8-4.8 7-4.8s5.5 1.6 7 4.8' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
}
.mark-selected {
  background: #f9a825;
  position: relative;
}
.mark-selected::after {
  content: '✓';
  color: #111;
  font-weight: 800;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.selection-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 0;
  /* สำคัญ: ปล่อยคลิกทะลุรอบการ์ด เพื่อเลือกหลายล็อคบนแผนผังได้ */
  pointer-events: none;
  transform: translateY(-110%);
  opacity: 0;
  transition:
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
}
.selection-bar.is-open {
  transform: translateY(0);
  opacity: 1;
}
.selection-bar.is-anchored {
  inset: 0;
  padding: 0;
  transform: none;
  justify-content: stretch;
  align-items: stretch;
}
.selection-bar.is-anchored.is-open {
  transform: none;
}
.selection-bar-inner {
  pointer-events: auto;
  width: min(400px, calc(100vw - 24px));
  max-height: min(70vh, 520px);
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 16px 14px;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: rgba(252, 252, 252, 0.94);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow:
    0 14px 40px rgba(15, 23, 42, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transition: top 0.28s cubic-bezier(0.22, 1, 0.36, 1), left 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.selection-bar.is-anchored .selection-bar-inner {
  position: fixed;
  margin: 0;
  animation: selectionCardIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes selectionCardIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.selection-bar-title {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 500;
  color: #6b6b6b;
  letter-spacing: 0.01em;
}
.selection-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.selection-section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1c1c1e;
}
.selection-hint {
  margin: 0;
  font-size: 0.78rem;
  color: #8e8e93;
}
.selection-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.selection-detail-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.sel-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}
.sel-chip-zone { background: #4a5c2e; }
.sel-chip-no,
.sel-chip-type { background: #c4a35a; }
.sel-chip-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1c1c1e;
}
.selection-pay-zones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}
.selection-pay-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 8px;
  border: 1px solid #d0d0d0;
  border-radius: 12px;
  background: #fff;
  font-size: 0.72rem;
  color: #636366;
  line-height: 1.25;
  min-height: 88px;
}
.selection-pay-card strong {
  color: #1c1c1e;
  font-size: 0.8rem;
}
.pay-card-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  margin-bottom: 2px;
}
.pay-card-price {
  margin-top: auto;
  color: #1c1c1e;
  font-weight: 600;
}
.pay-card-qty { color: #8e8e93; }
.selection-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
  font-size: 0.9rem;
  color: #3a3a3c;
}
.selection-total-amount {
  font-size: 1.15rem;
  color: #1c1c1e;
}
.selection-total-amount strong { font-size: 1.25rem; }
.selection-bar-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 6px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(252,252,252,0), rgba(252,252,252,0.96) 28%, rgba(252,252,252,0.98));
  padding-bottom: 2px;
}
.selection-btn-clear {
  appearance: none;
  border: 0;
  background: transparent;
  color: #007aff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px;
  cursor: pointer;
}
.selection-btn-clear:active { opacity: 0.55; }
.selection-btn-book {
  appearance: none;
  border: 0;
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  background: #007aff;
  color: #fff;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.28);
}
.selection-btn-book:hover { filter: brightness(1.05); }
.selection-btn-book:active {
  transform: scale(0.98);
  filter: brightness(0.96);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .selection-bar {
    transition: none;
  }
}

.toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px;
}
.toolbar select, .toolbar input, .form-grid input, .form-grid select, .form-grid textarea {
  font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
  background: #fff;
}
.toolbar label { font-size: 0.85rem; color: var(--muted); }

.map-shell {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #f7faf5;
  max-height: none;
  min-height: 0;
}

.zone-focus-hint {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(226, 194, 117, 0.28);
  border: 1px solid rgba(226, 194, 117, 0.75);
  color: #0d5f5a;
  font-size: 0.86rem;
  line-height: 1.4;
  font-weight: 600;
}

.zone-strip-other {
  opacity: 0.38;
  filter: grayscale(0.25);
  transition: opacity 0.25s ease, filter 0.25s ease;
}
.zone-strip-mine {
  position: relative;
  z-index: 2;
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(226, 194, 117, 0.95), 0 12px 28px -12px rgba(13, 95, 90, 0.45);
  border-radius: 12px;
}
.zone-strip-mine.zone-strip-pulse {
  animation: zone-mine-pulse 1.2s ease-out 2;
}
.zone-mine-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2c275;
  color: #0d5f5a;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
}
@keyframes zone-mine-pulse {
  0% { box-shadow: 0 0 0 3px rgba(226, 194, 117, 0.95), 0 0 0 0 rgba(13, 95, 90, 0.35); }
  70% { box-shadow: 0 0 0 3px rgba(226, 194, 117, 0.95), 0 0 0 14px rgba(13, 95, 90, 0); }
  100% { box-shadow: 0 0 0 3px rgba(226, 194, 117, 0.95), 0 12px 28px -12px rgba(13, 95, 90, 0.45); }
}
@media (prefers-reduced-motion: reduce) {
  .zone-strip-mine.zone-strip-pulse { animation: none; }
}

.campus {
  --side-card-width: 72px;
  --stall-size: 36px;
  min-width: 0;
  width: 100%;
  min-height: 640px;
  display: grid;
  grid-template-columns:
    var(--side-card-width)
    minmax(0, 1fr)
    var(--side-card-width);
  grid-template-rows:
    minmax(600px, 1fr)
    auto;
  gap: 12px;
  padding: 14px;
  align-items: stretch;
  box-sizing: border-box;
}

/* แผนผังรูปจริง 2569 — วางล็อคทับตามพิกัดเปอร์เซ็นต์ */
.campus.campus-photo {
  display: block;
  position: relative;
  width: 100%;
  max-width: none;
  min-height: 0;
  padding: 0;
  gap: 0;
  --side-card-width: 0px;
}
.campus-map-bg {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  pointer-events: none;
  user-select: none;
}
.map-pin-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.map-pin {
  position: absolute;
  pointer-events: none;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.map-pin .stall {
  pointer-events: auto;
}
.campus-photo .map-pin-strip,
.campus-photo .zone-strip {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: 100%;
  height: 100%;
  gap: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.campus-photo .zone-title {
  display: none !important;
}
.campus-photo .stall-grid {
  max-width: none !important;
  gap: 1px;
}
.campus-photo .stall-grid.is-vertical,
.campus-photo .stall-grid.is-horizontal {
  width: max-content;
  height: max-content;
}
.campus-photo .stall {
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none;
  max-height: none;
  font-size: 0.55rem;
  border-radius: 2px;
  opacity: 0.82;
  aspect-ratio: 1 / 1;
}
.campus-photo .stall.stall-staff {
  opacity: 0.9;
  outline: 1px solid rgba(255,255,255,0.65);
}
.campus-photo .stall .no {
  font-size: 0.42rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}
.campus-photo .stall.stall-staff .no,
.stall.stall-staff .no {
  color: #111;
}

.campus-photo .map-pin-fill {
  align-items: stretch;
  justify-content: stretch;
}
.campus-photo .map-pin-fill .zone-strip,
.campus-photo .map-pin-fill .stall-grid,
.campus-photo .map-pin-fill .stall-grid.is-vertical,
.campus-photo .map-pin-fill .stall-grid.is-horizontal {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  align-items: stretch;
  justify-content: stretch;
}
.campus-photo .map-pin-fill .zone-strip {
  display: flex;
}
.campus-photo .map-pin-fill .stall-grid {
  display: grid;
  grid-template-columns: 1fr !important;
  grid-template-rows: 1fr !important;
}
.campus-photo .map-pin-fill .stall,
.campus-photo .map-pin-fill .stall-grid.is-vertical .stall,
.campus-photo .map-pin-fill .stall-grid.is-horizontal .stall,
.campus-photo .stall.stall-dept {
  aspect-ratio: unset !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  flex: 1 1 auto !important;
  justify-self: stretch !important;
  align-self: stretch !important;
}
.campus-photo .stall.stall-dept .no {
  font-family: "Prompt", sans-serif;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.68rem;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: visible;
  max-width: none;
  max-height: none;
  font-weight: 700;
}
.campus-photo .stall.stall-dept_wk .no,
.campus-photo .stall.stall-dept_ok .no,
.campus-photo .stall.stall-dept_ts .no,
.campus-photo .stall.stall-flag_blue .no {
  transform: rotate(180deg);
  color: #111;
}
.campus-photo .stall.stall-cp .no,
.campus-photo .stall.stall-fish .no,
.campus-photo .stall.stall-foodtruck .no {
  writing-mode: horizontal-tb;
  font-size: 0.42rem;
  white-space: normal;
  word-break: break-word;
  line-height: 1.05;
  text-align: center;
  color: #111;
  transform: none;
}
.campus-photo .stall.stall-cp {
  outline-color: rgba(255, 138, 0, 0.55);
}
.campus-photo .stall.stall-dept_fish .no {
  writing-mode: horizontal-tb;
  font-size: 0.52rem;
  white-space: nowrap;
  word-break: normal;
  line-height: 1.05;
  text-align: center;
  color: #111;
}
.campus-photo .stall.stall-dept_wk,
.campus-photo .stall.stall-dept_ok,
.campus-photo .stall.stall-dept_ts,
.campus-photo .stall.stall-dept_fish,
.campus-photo .stall.stall-flag_blue {
  border-radius: 0;
  outline-color: rgba(0, 0, 0, 0.28);
  overflow: visible;
}

.stall.stall-staff {
  cursor: pointer;
  outline: 1px solid rgba(255,255,255,0.7);
}
.stall.stall-staff:hover {
  filter: brightness(1.08);
}

.stall.stall-reservation-hold {
  cursor: not-allowed;
  color: #f3f4f6;
  outline: 1px solid rgba(255, 255, 255, 0.45);
}
.stall.stall-reservation-hold .no {
  color: #f9fafb;
  opacity: 0.95;
}
.stall.stall-reservation-hold:hover {
  filter: none;
}

.map-pin-west_out_north { left: 4.74%; top: 25.86%; width: 1.61%; height: 8.66%; z-index: 3; }
.map-pin-flag_blue { left: 4.74%; top: 6.19%; width: 1.61%; height: 7.40%; z-index: 2; }
.map-pin-west_out { left: 4.74%; top: 34.52%; width: 1.61%; height: 58.56%; }
.map-pin-north_out {
  left: 6.60%;
  top: 4.34%;
  width: 48.43%;
  height: 2.20%;
  align-items: flex-end;
  justify-content: center;
}
.map-pin-north_in {
  left: 66.81%;
  top: 8.08%;
  width: 22.61%;
  height: 2.20%;
  align-items: flex-start;
  justify-content: center;
}
.map-pin-east_in_north { left: 89.50%; top: 10.29%; width: 1.61%; height: 10.96%; }
.map-pin-east_in_mid { left: 89.50%; top: 23.17%; width: 1.61%; height: 21.92%; }
.map-pin-east_out_north { left: 92.63%; top: 27.31%; width: 1.61%; height: 29.23%; z-index: 3; }
.map-pin-east_out_south { left: 92.63%; top: 56.63%; width: 1.61%; height: 36.44%; z-index: 3; }
.map-pin-south_west {
  left: 7.87%;
  top: 91.07%;
  width: 32.26%;
  height: 2.20%;
  align-items: flex-end;
  justify-content: center;
}
.map-pin-south_east_in {
  left: 45.30%;
  top: 91.07%;
  width: 12.96%;
  height: 2.20%;
  align-items: flex-end;
  justify-content: center;
}
.map-pin-south_east {
  left: 65.28%;
  top: 91.07%;
  width: 25.83%;
  height: 2.20%;
  align-items: flex-end;
  justify-content: center;
}
.map-pin-stage_green { left: 83.23%; top: 63.65%; width: 1.61%; height: 16.35%; z-index: 2; }
.map-pin-g_table_east { left: 89.50%; top: 46.73%; width: 1.61%; height: 31.73%; z-index: 3; }
.map-pin-dept_wk { left: 82.99%; top: 48.94%; width: 2.09% !important; height: 4.33% !important; z-index: 2; overflow: visible; }
.map-pin-dept_ok { left: 82.99%; top: 54.81%; width: 2.09% !important; height: 4.33% !important; z-index: 2; overflow: visible; }
.map-pin-dept_ts { left: 82.99%; top: 59.23%; width: 2.09% !important; height: 4.33% !important; z-index: 2; overflow: visible; }
.map-pin-dept_fish { left: 84.84%; top: 78.46%; width: 4.66% !important; height: 2.12% !important; z-index: 2; overflow: visible; }
.map-pin-vip_east { left: 89.50%; top: 80.19%; width: 1.61%; height: 10.96%; z-index: 3; }

.cell-west-out {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
}
.cell-west-out .zone-strip {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  align-items: flex-start;
  padding-left: 6px;
  padding-right: 6px;
}
.cell-west-out .stall-grid {
  flex: 1 1 auto;
  justify-content: start !important;
  justify-items: start;
  margin-right: auto;
  width: max-content;
  max-width: 100%;
}

.cell-east-out {
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  justify-content: flex-start;
  box-sizing: border-box;
}
.cell-east-out .zone-strip {
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  align-items: flex-end;
  padding-left: 6px;
  padding-right: 6px;
}
.cell-east-out .zone-strip:not(.tone-green) {
  flex: 1 1 auto;
}
.cell-east-out .zone-strip.tone-green {
  flex: 0 0 auto;
}
.cell-east-out .stall-grid {
  flex: 1 1 auto;
  justify-content: end !important;
  justify-items: end;
  margin-left: auto;
  width: max-content;
  max-width: 100%;
}

/* พื้นที่กลาง: ล็อคบนนอก/บนใน (ไม่แสดงรูปถนน) */
.u-stage {
  --east-in-width: var(--side-card-width, 72px);
  grid-column: 2;
  grid-row: 1;
  position: relative;
  min-width: 0;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 22fr) minmax(0, 14fr) var(--east-in-width);
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
}

.u-road-layer,
.u-road-svg,
.road-h-bottom {
  display: none !important;
}

.u-stage > .zone-slot,
.u-stage > .slot-plaza,
.u-stage > .slot-north-in,
.u-stage > .slot-east-in {
  position: relative;
  z-index: 1;
}

.slot-north-out {
  grid-column: 1 / span 2;
  grid-row: 1;
  min-width: 0;
  padding: 0;
  align-self: end;
}
.slot-north-spacer { display: none; }
.slot-north-in {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  align-self: end;
}
.slot-plaza {
  grid-column: 1 / span 2;
  grid-row: 3;
  min-width: 0;
  min-height: 0;
  padding: 0;
}
.slot-east-in {
  grid-column: 3;
  grid-row: 1 / span 3;
  min-width: 0;
  min-height: 0;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  justify-content: space-between;
  box-sizing: border-box;
  align-self: stretch;
}
.slot-east-in .zone-strip {
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  align-items: flex-end;
  padding-left: 6px;
  padding-right: 6px;
}
.slot-east-in .zone-strip.tone-frame {
  flex: 0 0 auto;
  align-self: stretch;
}
.slot-east-in .zone-strip.tone-pink {
  margin-top: auto;
  margin-bottom: 0;
  align-self: stretch;
  align-items: flex-end;
}
.slot-east-in .stall-grid {
  flex: 0 0 auto;
  justify-content: end !important;
  justify-items: end;
  margin-left: auto;
  width: max-content;
  max-width: 100%;
}
.slot-east-in .zone-strip:not(.tone-frame) .stall-grid {
  flex: 1 1 auto;
}

.center-plaza {
  height: 100%;
  min-height: 380px;
  border-radius: 14px;
  border: 2px solid #7c3aed;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 0;
  position: relative;
}
.center-plaza .plaza-faculty {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  user-select: none;
  background: #e5e7eb;
}
.center-plaza .plaza-label {
  margin: 0;
  font-weight: 700;
  font-size: 40px;
  color: #374151;
  line-height: 1.4;
}
.center-plaza .plaza-caption {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.2;
}

.cell-south {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 10px;
  min-width: 0;
  align-items: start;
}
.cell-south-east {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  align-items: stretch;
}
.cell-west-out .zone-strip.west-short {
  flex: 0 0 auto;
}
.cell-west-out .zone-strip.west-long {
  flex: 1 1 auto;
}

.zone-strip.tone-pink .zone-dot { background: #ec4899 !important; }
.zone-strip.tone-green .zone-dot { background: #16a34a !important; }

.slot-north-out .zone-strip,
.slot-north-in .zone-strip {
  margin: 0;
}

.zone-strip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
}
.zone-title {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.92rem; margin: 0 0 8px;
}
.zone-dot {
  width: 10px; height: 10px; border-radius: 50%;
}

/* กรอบเทา + แถบสี + ชื่ออยู่นอกแถบ (ทุกโซน) */
.zone-strip.tone-frame {
  display: flex;
  background: #f3f4f6 !important;
  border-radius: 14px;
  padding: 6px 4px;
  gap: 6px;
  box-sizing: border-box;
  align-self: stretch;
}
.zone-strip.tone-frame .zone-dot,
.zone-strip.tone-frame .zone-title small {
  display: none;
}
.zone-strip.tone-frame .zone-title {
  margin: 0;
  gap: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.15;
  color: #1f2937;
  white-space: nowrap;
  word-break: normal;
  overflow: visible;
  max-width: none;
}
.zone-strip.tone-frame[data-orient="vertical"] {
  flex-direction: row;
  align-items: center;
}
.zone-strip.tone-frame[data-orient="vertical"].align-start {
  justify-content: flex-start;
}
.zone-strip.tone-frame[data-orient="vertical"].align-end {
  justify-content: flex-end;
}
/* โซน B แนวตั้งชิดขวา — ล็อคชิดด้านล่างของแถบ */
.slot-east-in .zone-strip.tone-frame.tone-pink[data-orient="vertical"],
.cell-east-out .zone-strip.tone-frame.tone-pink[data-orient="vertical"] {
  align-items: flex-end;
}
.slot-east-in .zone-strip.tone-frame.tone-pink[data-orient="vertical"] .zone-title,
.cell-east-out .zone-strip.tone-frame.tone-pink[data-orient="vertical"] .zone-title {
  align-self: flex-end;
}
.zone-strip.tone-frame[data-orient="vertical"] .zone-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  align-self: center;
  text-align: center;
  padding: 2px 0;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  line-height: 1.25;
  white-space: normal;
}
.zone-strip.tone-frame[data-orient="vertical"] .stall-grid {
  flex: 0 0 auto !important;
  width: max-content !important;
  max-width: 100%;
  height: auto !important;
  min-height: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  border-radius: 10px;
  padding: 4px;
  justify-content: center !important;
  justify-items: center;
  align-content: start !important;
  align-items: start;
  box-sizing: border-box;
}
/* โซนแนวนอน — บนเต็มความกว้างคอลัมน์, ล่างพอดีล็อค */
.zone-strip.tone-frame[data-orient="horizontal"] {
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
}
.zone-strip.tone-frame[data-orient="horizontal"] .zone-title {
  writing-mode: horizontal-tb;
  transform: none;
  align-self: center;
  text-align: center;
  justify-content: center;
  width: 100%;
  padding: 2px 4px 0;
  font-size: 0.72rem;
  white-space: normal;
  line-height: 1.25;
}
.zone-strip.tone-frame[data-orient="horizontal"] .stall-grid {
  border-radius: 10px;
  padding: 4px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.cell-south .zone-strip.tone-frame[data-orient="horizontal"] {
  width: max-content;
  max-width: 100%;
  align-items: center;
}
.cell-south .zone-strip.tone-frame.tone-lime[data-orient="horizontal"],
.cell-south .zone-strip.tone-frame.tone-blue[data-orient="horizontal"] {
  margin-left: auto;
}
.cell-south .zone-strip.tone-frame[data-orient="horizontal"] .stall-grid {
  width: max-content !important;
}
.zone-strip.tone-frame.tone-lime[data-orient="horizontal"] .zone-title,
.zone-strip.tone-frame.align-end[data-orient="horizontal"] .zone-title,
.zone-strip.tone-frame.tone-blue[data-orient="horizontal"] .zone-title {
  align-self: center;
  text-align: center;
  width: 100%;
}

.zone-strip.tone-amber { border: 1px solid #fcd34d; }
.zone-strip.tone-amber .stall-grid { background: #fde68a; border: 1px solid #fbbf24; }

.zone-strip.tone-red { border: 1px solid #fca5a5; }
.zone-strip.tone-red .stall-grid { background: #fecaca; border: 1px solid #f87171; }

.zone-strip.tone-pink { border: 1px solid #f9a8d4; }
.zone-strip.tone-pink .stall-grid { background: #fbcfe8; border: 1px solid #f9a8d4; }

.zone-strip.tone-green { border: 1px solid #86efac; }
.zone-strip.tone-green .stall-grid { background: #bbf7d0; border: 1px solid #4ade80; }

.zone-strip.tone-blue { border: 1px solid #93c5fd; }
.zone-strip.tone-blue .stall-grid { background: #bfdbfe; border: 1px solid #60a5fa; }

.zone-strip.tone-lime { border: 1px solid #bef264; }
.zone-strip.tone-lime .stall-grid { background: #d9f99d; border: 1px solid #a3e635; }

/* แผนผังรูป — ไม่แสดงกรอบ/พื้นโซน เหลือแค่กล่องล็อค */
.campus-photo .zone-strip,
.campus-photo .zone-strip.tone-frame,
.campus-photo .map-pin-strip,
.campus-photo .stall-grid {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  border-radius: 0 !important;
}

.stall-grid {
  display: grid;
  gap: 4px;
  justify-content: start;
  align-content: start;
}
.stall-grid.is-horizontal {
  grid-template-columns: repeat(var(--stall-cols, 1), var(--stall-size, 36px));
  grid-auto-rows: var(--stall-size, 36px);
  grid-auto-flow: row;
}
.stall-grid.is-vertical {
  grid-template-columns: repeat(var(--stall-cols, 1), var(--stall-size, 36px));
  grid-template-rows: repeat(var(--stall-rows, 1), var(--stall-size, 36px));
  height: auto;
  min-height: 0;
}

.stall {
  position: relative;
  aspect-ratio: 1 / 1;
  width: var(--stall-size, 36px);
  height: var(--stall-size, 36px);
  min-width: var(--stall-size, 36px);
  min-height: var(--stall-size, 36px);
  max-width: var(--stall-size, 36px);
  max-height: var(--stall-size, 36px);
  border-radius: 6px;
  border: 1.5px solid transparent;
  padding: 2px;
  text-align: center;
  font-size: 0.68rem;
  line-height: 1.05;
  cursor: default;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  flex: 0 0 auto;
  transition: filter .12s ease, outline-color .12s ease;
}
.stall-grid.is-vertical .stall,
.stall-grid.is-horizontal .stall {
  width: var(--stall-size, 36px);
  height: var(--stall-size, 36px);
  max-width: var(--stall-size, 36px);
  max-height: var(--stall-size, 36px);
  justify-self: center;
  align-self: center;
}
.stall .sym { display: none; }
.stall .no { font-weight: 700; font-size: 0.5rem; color: #fff; line-height: 1.05; }
.stall .st { display: none; }
.stall .stall-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.stall .stall-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72%;
  height: 72%;
  max-width: 26px;
  max-height: 26px;
  flex: 0 0 auto;
  pointer-events: none;
}
.stall .person-svg,
.stall .check-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.stall .selected-only {
  display: none;
  position: absolute;
  right: 1px;
  top: 1px;
  width: 55%;
  height: 55%;
  max-width: 18px;
  max-height: 18px;
  z-index: 2;
}
.stall.available {
  color: #fff;
  cursor: pointer;
}
.stall.available:hover {
  filter: brightness(1.08);
}
.stall.available.selected {
  outline: 2px solid #f9a825;
  outline-offset: -2px;
  filter: none;
  z-index: 2;
}
.stall.available.selected:hover {
  filter: none;
}
.stall.available.selected .selected-only { display: flex; }
.stall.pending,
.stall.occupied {
  background: #eceff1 !important;
  border-color: #cfd8dc !important;
  color: #455a64;
  cursor: pointer;
  opacity: 1;
}
.stall.dim { opacity: .28; pointer-events: none; }
.stall.highlight-zone { outline: 2px solid #1565c0; outline-offset: 1px; }

.stall-tip {
  --stall-tip-bg: #1f2933;
  --stall-tip-arrow-top: 50%;
  --stall-tip-arrow-left: 50%;
  --stall-tip-arrow-len: 16px;
  --stall-tip-arrow-half: 9px;
  position: fixed;
  z-index: 80;
  min-width: 188px;
  max-width: min(260px, calc(100vw - 16px));
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--stall-tip-bg);
  color: #f5f7fa;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
  font-size: 0.82rem;
  line-height: 1.35;
  pointer-events: auto;
}
.stall-tip[hidden] {
  display: none !important;
}
.stall-tip-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  pointer-events: none;
  z-index: 1;
}
/* tip อยู่ขวาของล็อค → ลูกศรชี้ซ้ายไปที่ล็อค */
.stall-tip--right .stall-tip-arrow {
  top: var(--stall-tip-arrow-top);
  left: calc(var(--stall-tip-arrow-len) * -1);
  transform: translateY(-50%);
  border-width: var(--stall-tip-arrow-half) var(--stall-tip-arrow-len) var(--stall-tip-arrow-half) 0;
  border-color: transparent var(--stall-tip-bg) transparent transparent;
  filter: drop-shadow(-2px 0 2px rgba(15, 23, 42, 0.16));
}
/* tip อยู่ซ้ายของล็อค → ลูกศรชี้ขวาไปที่ล็อค */
.stall-tip--left .stall-tip-arrow {
  top: var(--stall-tip-arrow-top);
  right: calc(var(--stall-tip-arrow-len) * -1);
  left: auto;
  transform: translateY(-50%);
  border-width: var(--stall-tip-arrow-half) 0 var(--stall-tip-arrow-half) var(--stall-tip-arrow-len);
  border-color: transparent transparent transparent var(--stall-tip-bg);
  filter: drop-shadow(2px 0 2px rgba(15, 23, 42, 0.16));
}
/* tip อยู่เหนือล็อค → ลูกศรชี้ลงไปที่ล็อค */
.stall-tip--above .stall-tip-arrow {
  left: var(--stall-tip-arrow-left);
  top: auto;
  bottom: calc(var(--stall-tip-arrow-len) * -1);
  transform: translateX(-50%);
  border-width: var(--stall-tip-arrow-len) var(--stall-tip-arrow-half) 0 var(--stall-tip-arrow-half);
  border-color: var(--stall-tip-bg) transparent transparent transparent;
  filter: drop-shadow(0 2px 2px rgba(15, 23, 42, 0.16));
}
/* tip อยู่ใต้ล็อค → ลูกศรชี้ขึ้นไปที่ล็อค */
.stall-tip--below .stall-tip-arrow {
  left: var(--stall-tip-arrow-left);
  top: calc(var(--stall-tip-arrow-len) * -1);
  bottom: auto;
  transform: translateX(-50%);
  border-width: 0 var(--stall-tip-arrow-half) var(--stall-tip-arrow-len) var(--stall-tip-arrow-half);
  border-color: transparent transparent var(--stall-tip-bg) transparent;
  filter: drop-shadow(0 -2px 2px rgba(15, 23, 42, 0.16));
}
.stall-tip-close {
  display: none;
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.stall-tip-close:active {
  background: rgba(255, 255, 255, 0.22);
}
.stall-tip-body {
  position: relative;
  z-index: 0;
}
.stall-tip-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: start;
}
.stall-tip-row + .stall-tip-row {
  margin-top: 4px;
}
.stall-tip-k {
  color: #9aa5b1;
  white-space: nowrap;
}
.stall-tip-k::after {
  content: '';
}
.stall-tip-v {
  color: #fff;
  font-weight: 600;
  word-break: break-word;
}
.stall-tip-photo {
  margin-top: 8px;
  border-radius: 8px;
  overflow: hidden;
  background: #323f4b;
}
.stall-tip-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 140px;
  object-fit: cover;
}

@media (max-width: 900px) {
  .stall-tip,
  .stall-tip--mobile {
    min-width: 0;
    width: min(220px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: min(42vh, 280px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 7px 30px 7px 9px;
    font-size: 0.74rem;
    line-height: 1.28;
    z-index: 120;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.32);
  }
  .stall-tip-close {
    display: flex;
  }
  .stall-tip-row {
    gap: 2px 6px;
  }
  .stall-tip-row + .stall-tip-row {
    margin-top: 2px;
  }
  .stall-tip-photo {
    margin-top: 5px;
    border-radius: 6px;
  }
  .stall-tip-photo img {
    max-height: 110px;
  }
}

.line-notify-box {
  margin: 14px 0 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f0faf3;
  border: 1px solid #9fd9b5;
}
.line-notify-title {
  font-weight: 700;
  color: #0d5f5a;
  margin: 0 0 6px;
}
.line-notify-desc {
  margin: 0 0 8px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #1f2937;
}
.line-notify-steps {
  margin: 0 0 12px;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #374151;
}
.line-notify-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  background: #06c755 !important;
  border-color: #06c755 !important;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}
.line-notify-btn:hover {
  filter: brightness(1.05);
}
.line-notify-btn--soft {
  background: #7dcea0 !important;
  border-color: #7dcea0 !important;
  color: #0d3d2e !important;
  min-height: 48px;
  width: 100%;
  font-size: 1.02rem;
}
.line-notify-btn--soft:hover {
  filter: brightness(1.04);
}

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(16, 24, 18, .45);
  display: none; align-items: flex-end; justify-content: center; z-index: 50; padding: 12px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-backdrop.open { display: flex; }
.merchant-done-backdrop.open {
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.open.flow-modal-center {
  align-items: flex-start;
  padding-top: max(12px, env(safe-area-inset-top, 0px));
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
}
.modal {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 18px 18px 14px 14px;
  max-height: min(92dvh, 92vh);
  overflow: auto;
  padding: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.modal h2 { margin: 0 0 6px; font-size: 1.2rem; }
.modal .meta { color: var(--muted); margin-bottom: 14px; font-size: 0.92rem; }
.form-grid { display: grid; gap: 10px; }
.form-grid .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.pay-box {
  background: #f4f8f2; border: 1px dashed #9ccc65; border-radius: 12px; padding: 10px 12px; font-size: 0.9rem;
}
.alert {
  border-radius: 12px; padding: 10px 12px; margin: 10px 0; font-size: 0.92rem;
}
.alert-ok { background: #e8f5e9; color: #1b5e20; }
.alert-err { background: #ffebee; color: #b71c1c; }
.hidden { display: none !important; }

.file-preview {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faf8;
  padding: 8px;
  overflow: hidden;
}
.file-preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}
.file-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.file-preview-grid img {
  max-height: 120px;
  aspect-ratio: 1;
  object-fit: cover;
}
.file-preview-item {
  position: relative;
}
.file-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}
.file-preview-pdf,
.file-preview-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  font-size: 0.9rem;
  color: #374151;
}
.file-preview-badge {
  flex: 0 0 auto;
  min-width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #e5e7eb;
  color: #111827;
  font-weight: 700;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.file-preview-name {
  word-break: break-all;
  line-height: 1.35;
}

.book-progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.book-progress-card {
  width: min(360px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 20px 18px 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  text-align: center;
}
.book-progress-title {
  margin: 0 0 14px;
  font-weight: 700;
  color: #111827;
}
.book-progress-track {
  height: 12px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}
.book-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #43a047, #2e7d32);
  transition: width 0.15s ease-out;
}
.book-progress-pct {
  margin: 10px 0 0;
  font-weight: 700;
  color: #374151;
}

.book-confirm-backdrop {
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
}
.book-confirm-backdrop.open {
  display: flex;
}
.book-confirm-backdrop[hidden] {
  display: none !important;
}
.book-confirm-modal {
  max-width: 420px;
  width: min(420px, 100%);
}
.book-confirm-note {
  margin: 0 0 12px;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.55;
  color: #c62828;
}
.book-confirm-lead {
  margin: 0 0 16px;
  line-height: 1.5;
}

.book-success-popup {
  text-align: center;
  padding: 8px 4px 4px;
}
.book-success-icon {
  width: 64px;
  height: 64px;
  margin: 4px auto 12px;
  border-radius: 999px;
  background: #2e7d32;
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.book-success-title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1b5e20;
  line-height: 1.45;
}
.book-success-summary {
  margin: 0 auto 8px;
  max-width: 22rem;
  text-align: left;
  color: #1f2937;
  font-size: 0.95rem;
  line-height: 1.55;
}
.book-success-summary p {
  margin: 6px 0;
}
.book-success-popup .btn {
  margin-top: 18px;
  min-width: 160px;
  width: 100%;
  max-width: 280px;
}
body.map-view-only .selection-bar,
body.map-view-only #clearSelectionBtn,
body.map-view-only #bookSelectionBtn {
  display: none !important;
}

.table-wrap { overflow: auto; }
table.data {
  width: 100%; border-collapse: collapse; font-size: 0.9rem;
}
table.data th, table.data td {
  border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top;
}
table.data th { color: var(--muted); font-weight: 600; background: #f7faf5; }

.badge {
  display: inline-block; border-radius: 999px; padding: 3px 8px; font-size: 0.75rem; font-weight: 600;
}
.badge.pending { background: #fff3e0; color: #e65100; }
.badge.approved, .badge.selected { background: #e8f5e9; color: #2e7d32; }
.badge.rejected, .badge.cancelled { background: #eceff1; color: #546e7a; }

.flow-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 6px !important;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  box-shadow: 0 10px 22px -14px rgba(0, 0, 0, 0.35);
  animation: status-pill-in 0.45s ease both, status-pill-glow 1.8s ease-in-out 0.45s infinite;
}
.status-pill-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: status-pill-pulse 1.5s ease-out infinite;
}
.status-pill--pending {
  background: linear-gradient(135deg, #ffe7b8 0%, #f6c96a 55%, #e2c275 100%);
  color: #7a4f00;
  border: 1px solid #e2c275;
}
.status-pill--selected {
  background: linear-gradient(135deg, #d8f3e4 0%, #9fd9b5 55%, #6fca9a 100%);
  color: #0d5f5a;
  border: 1px solid #7cbc9a;
}
.status-pill--rejected {
  background: linear-gradient(135deg, #fde8e4 0%, #f5b7ad 100%);
  color: #9a3b2c;
  border: 1px solid #e7a99e;
}
@keyframes status-pill-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes status-pill-glow {
  0%, 100% { filter: brightness(1); transform: translateY(0); }
  50% { filter: brightness(1.06); transform: translateY(-1px); }
}
@keyframes status-pill-pulse {
  0% { box-shadow: 0 0 0 0 rgba(122, 79, 0, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(122, 79, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(122, 79, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .status-pill,
  .status-pill-dot {
    animation: none;
  }
}

.mobile-hint {
  display: none;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
}
.mobile-hint-swatch {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin: 0 0.28em;
  border-radius: 3px;
  vertical-align: -0.12em;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.mobile-book { display: none; }

@media (max-width: 900px) {
  .desktop-zoom-group { display: none !important; }
  .wrap-map {
    padding: 16px;
  }
  .wrap-map .topbar {
    padding-left: 0;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
  }
  .wrap-map .brand-hero {
    flex: 1 1 auto;
    min-width: 0;
  }
  .wrap-map .nav-links {
    width: auto;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
  }
  .wrap-map .nav-leave-btn {
    display: none !important;
  }
  .wrap-map .nav-map-label-full { display: none; }
  .wrap-map .nav-map-label-short { display: inline; }
  .wrap-map .nav-links .nav-map-btn,
  .wrap-map .nav-links a.b07.nav-map-btn,
  .wrap-map .nav-links .nav-done-btn,
  .wrap-map .nav-links button.b07.nav-done-btn {
    width: auto;
    min-height: 36px;
    padding: 6px 12px;
    font-size: 0.9rem;
    font-weight: 700;
    justify-content: center;
    white-space: nowrap;
  }
  .booking-sidebar {
    display: none !important;
  }
  .brand-title-main {
    font-size: clamp(1.45rem, 6.5vw, 1.85rem);
  }
  .brand-title-sub {
    font-size: clamp(1rem, 4.2vw, 1.15rem);
  }
  .booking-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .booking-sidebar {
    position: static;
    max-height: none;
    padding: 10px;
    border-left: 1px solid var(--line);
    border-radius: 14px;
  }
  .zone-price-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .legend {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desktop-map { display: none !important; }
  .mobile-hint { display: block; }
  .mobile-book {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 280px;
  }
  .mobile-map-stage {
    position: relative;
  }
  .map-zoom-controls {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
  }
  .map-zoom-btn {
    pointer-events: auto;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .map-zoom-btn:active { background: #f3f4f6; }
  .map-zoom-btn:disabled {
    opacity: 0.45;
    cursor: default;
  }
  .map-zoom-icon {
    width: 26px;
    height: 26px;
    display: block;
  }
  .mobile-overview-map {
    position: relative;
    border-radius: 14px;
    border: 1px solid var(--line);
    overflow: auto;
    background: #f7faf5;
    min-height: 280px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-x pan-y;
    scroll-behavior: auto;
  }
  .mobile-overview-map.is-zoomed {
    overflow: auto;
    touch-action: pan-x pan-y;
  }
  .mobile-live-campus {
    position: relative;
    width: 100%;
    min-height: 280px;
    overflow: visible;
    box-sizing: content-box;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
  .mobile-overview-map .stall {
    touch-action: pan-x pan-y;
  }
  .mobile-live-campus .campus {
    max-width: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
  /* ซ่อนรายละเอียดโซนยาวบนมือถือ — คอมยังแสดงตามปกติ */
  .mobile-live-campus .zone-title {
    display: none !important;
  }
  .mobile-overview-prompt {
    margin: 12px 0 8px;
    text-align: center;
    font-weight: 700;
    font-size: 1.05rem;
    color: #1f2937;
  }
  .market-zone-legend--page {
    display: none;
  }
  .mobile-overview .market-zone-legend {
    margin: 8px 0 0;
    padding: 0 4px;
  }

  /* การ์ดเลือกล็อค: แถบล่างกะทัดรัด ไม่บังแผนผัง */
  .selection-bar {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    align-items: flex-end;
    padding: 0 10px calc(10px + env(safe-area-inset-bottom, 0px));
    transform: translateY(120%);
  }
  .selection-bar.is-open {
    transform: translateY(0);
  }
  .selection-bar.is-anchored {
    inset: auto;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 10px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .selection-bar.is-anchored .selection-bar-inner {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: 100%;
    max-width: none;
    animation: none;
  }
  .selection-bar-inner {
    width: 100%;
    max-height: none;
    gap: 8px;
    padding: 10px 12px 12px;
    border-radius: 16px;
    box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.18);
  }
  .selection-bar-title {
    display: none;
  }
  .selection-section {
    gap: 4px;
  }
  .selection-section-title {
    font-size: 0.92rem;
  }
  .selection-hint {
    font-size: 0.72rem;
    margin: 0;
  }
  /* ซ่อนการ์ดราคาซ้ำ — เหลือแถวรวมพอ */
  .selection-section:nth-of-type(2) > .selection-section-title,
  .selection-pay-zones {
    display: none !important;
  }
  .selection-detail {
    gap: 4px;
  }
  .selection-detail-type {
    display: none;
  }
  .selection-detail-row {
    gap: 4px 6px;
  }
  .sel-chip {
    padding: 2px 8px;
    font-size: 0.72rem;
  }
  .sel-chip-value {
    font-size: 0.88rem;
  }
  .selection-total-row {
    margin: 0;
    font-size: 0.88rem;
    padding: 4px 0 0;
  }
  .selection-total-amount {
    font-size: 1.05rem;
  }
  .selection-total-amount strong {
    font-size: 1.1rem;
  }
  .selection-bar-actions {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
    padding-top: 4px;
    position: static;
    background: transparent;
  }
  .selection-btn-clear {
    flex: 0 0 auto;
    padding: 8px 4px;
    font-size: 0.86rem;
    white-space: nowrap;
  }
  .selection-btn-book {
    flex: 1 1 auto;
    min-height: 44px;
    font-size: 0.98rem;
    border-radius: 12px;
  }
  .brand p { font-size: 0.88rem; }
  .center-plaza .plaza-label { font-size: 22px; }
}

/* —— Infographic: ขั้นตอนพ่อค้าแม่ค้า —— */
.guest-landing {
  max-width: 920px;
  margin: 8px auto 28px;
}
.flow-info {
  position: relative;
  padding: 22px 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(46, 125, 50, 0.10), transparent 55%),
    radial-gradient(90% 70% at 100% 10%, rgba(249, 168, 37, 0.12), transparent 50%),
    linear-gradient(180deg, #f7fbf5 0%, #ffffff 55%);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.flow-info::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #1b5e20, #f9a825);
}
.flow-info-head {
  text-align: center;
  margin-bottom: 18px;
}
.flow-info-eyebrow {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2e7d32;
}
.flow-info-head h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 700;
  color: var(--ink);
}
.flow-info-lead {
  margin: 8px auto 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}
.flow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  counter-reset: none;
}
.flow-step {
  position: relative;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(213, 224, 212, 0.9);
  box-shadow: 0 6px 18px rgba(28, 42, 31, 0.06);
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "num body"
    "num actions";
  column-gap: 14px;
  row-gap: 10px;
  align-items: start;
  animation: flowStepIn 0.55s ease both;
  animation-delay: calc(var(--i, 0) * 0.12s);
}
.flow-step:not(:last-child)::before {
  display: none;
}
.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -28px;
  width: 28px;
  height: 24px;
  transform: translateX(-50%);
  z-index: 1;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 3v13' stroke='%232e7d32' stroke-width='2.8' stroke-linecap='round'/%3E%3Cpath d='M6.5 12.5 12 18l5.5-5.5' stroke='%232e7d32' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.flow-step-num {
  grid-area: num;
  width: 36px;
  height: 36px;
  margin: 2px 0 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 4px 10px rgba(27, 94, 32, 0.25);
}
.flow-step-icon {
  display: none;
}
.flow-step-body {
  grid-area: body;
  min-width: 0;
}
.flow-step h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}
.flow-step p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}
.flow-step-highlight {
  color: #1565c0;
  font-weight: 700;
}
.flow-step-text-red {
  color: #c62828;
  font-weight: 700;
}
.flow-step-actions {
  grid-area: actions;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
}
.flow-step-btn {
  display: inline-flex;
  margin: 0;
  font-size: 0.9rem !important;
  min-height: 40px;
  padding: 8px 16px;
  white-space: nowrap;
  line-height: 1.25;
  text-align: center;
}
.flow-step-note {
  margin: 8px 0 0;
  font-size: 0.8rem;
  font-style: italic;
  color: #c62828;
  line-height: 1.35;
}
.flow-price-list {
  margin-top: 10px;
  text-align: left;
  display: grid;
  gap: 4px;
  max-height: 140px;
  overflow: auto;
  padding: 8px;
  border-radius: 10px;
  background: rgba(238, 243, 234, 0.85);
  border: 1px solid var(--line);
}
.flow-price-item {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 6px;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted);
}
.flow-price-item strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.flow-price-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.flow-price-zone {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flow-check-modal {
  max-width: 520px;
  align-self: center;
  border-radius: 18px;
  max-height: min(88dvh, 88vh);
  width: min(520px, 100%);
  margin-top: 8px;
  margin-bottom: 8px;
}
.access-booked-box {
  margin-top: 4px;
}
.access-booked-lead {
  margin: 0 0 6px;
  font-weight: 700;
  color: #0d5f5a;
  font-size: 1rem;
}
.access-booked-shop {
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 0.92rem;
}
/* approved booking uses selected pill style */
.status-pill--approved {
  background: linear-gradient(135deg, #d8f3e4 0%, #9fd9b5 55%, #6fca9a 100%);
  color: #0d5f5a;
  border: 1px solid #7cbc9a;
}
.flow-book-cta {
  margin-top: 12px;
  padding: 12px 0 2px;
  border-top: 1px dashed rgba(46, 125, 50, 0.35);
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(232, 245, 233, 0) 0%, #e8f5e9 18%, #e8f5e9 100%);
  z-index: 3;
}
.flow-book-cta p {
  margin: 0 0 10px;
}
.flow-book-cta .btn {
  min-height: 48px;
  width: 100%;
  font-weight: 700;
}

@media (max-width: 900px) {
  .modal-backdrop.open.flow-modal-center {
    align-items: flex-start;
    padding-bottom: calc(12px + var(--kb-inset, 0px));
  }
  .flow-check-modal {
    max-height: min(78dvh, 78vh);
  }
}
.shop-desc-side {
  margin: 0 0 14px;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
  white-space: pre-wrap;
}
.shop-detail-card .zone-price-meta span {
  display: block;
}
.flow-info-cta {
  margin-top: 18px;
  text-align: center;
}
.flow-info-cta .btn {
  min-width: min(280px, 100%);
  min-height: 46px;
  font-size: 1.02rem;
}
.flow-info-cta-note {
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.flow-info--compact {
  padding: 14px 14px 12px;
  margin-bottom: 14px;
}
.flow-info--compact .flow-info-head {
  margin-bottom: 12px;
}
.flow-info--compact .flow-steps {
  grid-template-columns: 1fr;
  gap: 8px;
}
.flow-info--compact .flow-step {
  padding: 12px 12px;
  grid-template-areas:
    "num body"
    "num body";
  animation: none;
}
.flow-info--compact .flow-step:not(:last-child)::before,
.flow-info--compact .flow-step:not(:last-child)::after {
  display: none;
}
.flow-info--compact .flow-step-num {
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
}
.flow-info--compact .flow-step-actions { display: none; }
.flow-info--compact .flow-step h3 { font-size: 0.95rem; }
.flow-info--compact .flow-step p { font-size: 0.8rem; }
.guest-book-panel {
  max-width: 520px;
  margin: 20px auto 0;
}
@keyframes flowStepIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes flowIconBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@media (max-width: 640px) {
  .flow-step {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "num body"
      "actions actions";
  }
  .flow-step-btn {
    white-space: normal;
    width: 100%;
    justify-content: center;
  }
}
@media (max-width: 560px) {
  .flow-info {
    padding: 18px 14px 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .brand-title-line,
  .brand-title-main,
  .brand-title-sub,
  .brand-title-sub::before {
    animation: none !important;
  }
  .brand-title-main {
    background: none;
    color: var(--accent);
    -webkit-background-clip: unset;
    background-clip: unset;
  }
}

/* ===== Schedule gate popup ===== */
body.schedule-gate-open { overflow: hidden; }
.schedule-gate-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 12000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(12, 28, 32, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .28s ease;
}
.schedule-gate-backdrop.open {
  display: flex;
  opacity: 1;
}
.schedule-gate-card {
  position: relative;
  width: min(420px, 100%);
  padding: 28px 24px 22px;
  border-radius: 22px;
  background: linear-gradient(165deg, #ffffff 0%, #f3faf8 55%, #eef6f4 100%);
  border: 1px solid rgba(13, 95, 90, 0.14);
  box-shadow:
    0 24px 60px rgba(8, 40, 38, 0.28),
    0 0 0 1px rgba(255,255,255,.6) inset;
  text-align: center;
  overflow: hidden;
  transform: translateY(18px) scale(.94);
  opacity: 0;
}
.schedule-gate-card.schedule-gate-pop {
  animation: scheduleGateIn .55s cubic-bezier(.22,1.2,.36,1) forwards;
}
@keyframes scheduleGateIn {
  0% { transform: translateY(22px) scale(.92); opacity: 0; }
  60% { transform: translateY(-4px) scale(1.02); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.schedule-gate-glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 140px;
  background: radial-gradient(ellipse at center, rgba(226,194,117,.45), transparent 70%);
  pointer-events: none;
  animation: scheduleGlow 2.8s ease-in-out infinite alternate;
}
@keyframes scheduleGlow {
  from { opacity: .55; transform: translateY(0); }
  to { opacity: 1; transform: translateY(8px); }
}
.schedule-gate-icon {
  width: 64px;
  height: 64px;
  margin: 4px auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #0d5f5a;
  background: linear-gradient(145deg, #fff8e8, #e7f5f3);
  border: 1px solid rgba(13,95,90,.12);
  box-shadow: 0 8px 20px rgba(13,95,90,.12);
  animation: scheduleIconPulse 1.8s ease-in-out infinite;
}
.schedule-gate-icon svg { width: 34px; height: 34px; }
@keyframes scheduleIconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.schedule-gate-title {
  margin: 0 0 10px;
  font-size: 1.22rem;
  font-weight: 700;
  color: #0d5f5a;
  letter-spacing: -.01em;
}
.schedule-gate-msg {
  margin: 0 0 18px;
  font-size: .98rem;
  line-height: 1.65;
  color: #334155;
  white-space: pre-line;
}
.schedule-gate-ok {
  min-width: 140px;
  border-radius: 999px !important;
  transition: transform .2s ease, box-shadow .2s ease;
}
.schedule-gate-ok:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(13,95,90,.25);
}
.schedule-gate-ok:active { transform: scale(.97); }
