/*
 * หน้าลูกค้า — แนว Liquid Glass (iOS 26) โทนดำแดง ออกแบบสำหรับมือถือก่อน
 * หลักการ: พื้นดำสนิท มีแสงสีแดงและภาพโปสเตอร์เบลออยู่ด้านหลัง ให้แผ่นกระจกมีสิ่งที่ "หักเห"
 *          แผ่นกระจก = พื้นโปร่งแสง + เบลอฉากหลัง + ขอบสว่างด้านบน ; ปุ่มหลักสีแดงทึบ
 * สีเน้นมาจากธีมของงาน (/e/<slug>/theme.css) ถ้าไม่ได้ตั้งจะใช้สีแดงด้านล่าง
 */
:root {
  --ev-primary: #d1121b; --ev-on-primary: #ffffff;
  --black: #000000;
  --ember: #5c0a10;                         /* แสงสีแดงเข้มด้านหลัง */
  --label: #ffffff;
  --label-2: rgba(235, 235, 245, .66);      /* ข้อความรอง */
  --label-3: rgba(235, 235, 245, .38);
  --glass: rgba(255, 255, 255, .09);
  --glass-strong: rgba(28, 28, 30, .72);    /* แผ่นกระจกที่มีข้อความเยอะ ต้องทึบกว่าเพื่อให้อ่านง่าย */
  --glass-edge: rgba(255, 255, 255, .2);
  --hairline: rgba(255, 255, 255, .12);
  --r-card: 28px; --r-control: 16px;
  --bs-body-font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Sukhumvit Set", "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, sans-serif;
  --bs-body-bg: #000; --bs-body-color: #fff;
}
html { background: var(--black); }
body { background: transparent; color: var(--label); font-size: 1.0625rem; line-height: 1.55; min-height: 100vh; min-height: 100dvh; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: #fff; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 8px; }

/* ฉากหลัง: แสงแดง + โปสเตอร์เบลอ */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; background:
    radial-gradient(90vmax 60vmax at 85% -10%, var(--ev-primary), transparent 60%),
    radial-gradient(70vmax 50vmax at -10% 100%, var(--ember), transparent 65%), var(--black); }
.ambient::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.ambient img { position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; filter: blur(56px) saturate(150%); opacity: .5; }

.wrap { width: 100%; max-width: 520px; margin: 0 auto; padding: 0 1rem; }
.wrap-wide { max-width: 1240px; }
.site-main { padding: 1rem 0 7.5rem; }
.site-main.has-flow { padding-top: .5rem; }

/* แผ่นกระจก */
.glass { position: relative; background: linear-gradient(180deg, rgba(255,255,255,.16), var(--glass)); border: 1px solid var(--glass-edge); border-radius: var(--r-card);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 18px 48px rgba(0,0,0,.5); -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%); }
.glass-solid { background: var(--glass-strong); }
.card-pad { padding: 1.25rem; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background: rgba(30, 30, 32, .94); } }

.title-large { font-size: 2.125rem; font-weight: 700; line-height: 1.18; letter-spacing: -.01em; margin: .25rem 0 .75rem; }
.title { font-size: 1.375rem; font-weight: 700; line-height: 1.25; margin: 0 0 .5rem; }
.headline { font-size: 1.0625rem; font-weight: 600; margin: 0 0 .5rem; }
.secondary { color: var(--label-2); }
.footnote { color: var(--label-2); font-size: .875rem; }

/* ปุ่ม */
.btn-x { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 52px; padding: .75rem 1.5rem; border-radius: 999px; border: 1px solid transparent; font-size: 1.0625rem; font-weight: 600; text-decoration: none; cursor: pointer; width: 100%; color: #fff; }
.btn-red { background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 55%), var(--ev-primary); color: var(--ev-on-primary); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 10px 28px rgba(0,0,0,.45); }
.btn-red:hover { filter: brightness(1.08); color: var(--ev-on-primary); }
.btn-glass { background: rgba(255,255,255,.12); border-color: var(--glass-edge); box-shadow: inset 0 1px 0 rgba(255,255,255,.28); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.btn-glass:hover { background: rgba(255,255,255,.18); color: #fff; }
.btn-x:disabled, .btn-x[aria-disabled="true"] { opacity: .5; cursor: default; }
.btn-plain { background: none; border: 0; color: var(--label-2); text-decoration: underline; padding: .75rem; min-height: 44px; }
.btn-plain:hover { color: #fff; }
.btn-x svg { width: 22px; height: 22px; flex-shrink: 0; }

.alert-x { border-radius: 18px; padding: .875rem 1rem; margin: 0 0 1rem; border: 1px solid var(--glass-edge); background: var(--glass-strong); }
.alert-x.is-danger { border-color: #ff6b6b; background: rgba(120, 12, 18, .78); }
.alert-x.is-ok { border-color: #5fd38d; background: rgba(12, 70, 38, .78); }
.preview-bar { background: #ffd60a; color: #1c1c1e; padding: .5rem 1rem; text-align: center; font-size: .9375rem; font-weight: 600; }

/* หน้างาน */
.poster-card { overflow: hidden; padding: 0; }
.poster-card img.poster { display: block; width: 100%; max-height: 62vh; object-fit: cover; }
.poster-card .poster-empty { height: 180px; background: linear-gradient(135deg, var(--ev-primary), var(--ember)); }
.event-info { padding: 1.25rem 1.25rem 1.375rem; }
.event-info h1 { font-size: 1.875rem; font-weight: 700; line-height: 1.2; margin: 0 0 .75rem; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .25rem .875rem; margin: 0; }
.facts dt { color: var(--label-2); font-weight: 400; }
.facts dd { margin: 0; font-weight: 600; }
.actions { display: grid; gap: .75rem; margin: 1rem 0; }
.actions-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.prose { white-space: normal; overflow-wrap: anywhere; color: rgba(255,255,255,.9); }

/* แถบเมนูลอยด้านล่าง (เฉพาะหน้าที่ไม่ได้อยู่ในขั้นตอนการจอง) */
.tabbar { position: fixed; left: 50%; bottom: calc(.875rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 40; display: flex; gap: .25rem; padding: .375rem; border-radius: 999px; width: min(92vw, 420px); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .125rem; padding: .5rem .25rem; border-radius: 999px; color: var(--label-2); text-decoration: none; font-size: .75rem; font-weight: 600; min-height: 52px; justify-content: center; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { background: rgba(255,255,255,.18); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }

/* แถบขั้นตอนการจอง */
.flow { margin: .75rem auto 1rem; padding: .625rem .875rem; border-radius: 22px; }
.flow-top { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.flow-back { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; text-decoration: none; font-size: 1.25rem; flex-shrink: 0; }
.flow-event { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-steps { list-style: none; display: flex; gap: .375rem; margin: 0; padding: 0; }
.flow-steps li { flex: 1; display: flex; flex-direction: column; gap: .25rem; font-size: .75rem; color: var(--label-3); min-width: 0; }
.flow-steps li::before { content: ""; height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); }
.flow-steps li.is-done::before { background: rgba(255,255,255,.75); }
.flow-steps li.is-current::before { background: var(--ev-primary); box-shadow: 0 0 12px var(--ev-primary); }
.flow-steps li.is-current { color: #fff; font-weight: 600; }
.flow-steps li.is-done { color: var(--label-2); }
.flow-steps span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* นับถอยหลัง */
.countdown { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .125rem .75rem; padding: .75rem 1.125rem; border-radius: 20px; margin-bottom: 1rem; }
.countdown-time { font-size: 1.625rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.countdown.is-low { border-color: #ff6b6b; background: rgba(120, 12, 18, .7); }
.countdown-note { flex-basis: 100%; font-size: .9375rem; }

/* ฟอร์ม (Bootstrap โหมดมืด + ปรับให้เข้ากับกระจก) */
.form-label { font-weight: 600; margin-bottom: .375rem; }
.form-control, .form-select { min-height: 52px; font-size: 1.0625rem; border-radius: var(--r-control); background-color: rgba(255,255,255,.08); border: 1px solid var(--glass-edge); color: #fff; }
.form-control:focus, .form-select:focus { background-color: rgba(255,255,255,.12); border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.22); color: #fff; }
.form-control::placeholder { color: var(--label-3); }
.form-select option { color: #000; }
.form-text { color: var(--label-2); }
.form-check-input { width: 1.5rem; height: 1.5rem; margin-top: .1rem; background-color: rgba(255,255,255,.1); border: 1.5px solid rgba(255,255,255,.5); }
.form-check-input:checked { background-color: var(--ev-primary); border-color: var(--ev-primary); }
.form-check { padding-left: 2.25rem; }
.form-check .form-check-input { margin-left: -2.25rem; }
.invalid-feedback { color: #ff9a9a; font-size: .9375rem; }
.form-control.is-invalid, .form-select.is-invalid { border-color: #ff6b6b; background-image: none; }
.req { color: #ff8080; }
.dynform fieldset { margin: 0; padding: 0; border: 0; }
.dynform legend { float: none; font-size: 1.0625rem; font-weight: 600; margin-bottom: .5rem; }
.repeat-row { display: flex; gap: .5rem; margin-bottom: .5rem; }
.repeat-remove, .repeat-add { border-radius: var(--r-control); border: 1px solid var(--glass-edge); background: rgba(255,255,255,.1); color: #fff; min-height: 48px; padding: 0 1rem; }
.repeat-remove { width: 52px; flex-shrink: 0; padding: 0; font-size: 1.25rem; }
.df-steps { list-style: none; display: flex; gap: .5rem; margin: 0 0 1rem; padding: 0; flex-wrap: wrap; }
.df-steps li { display: flex; align-items: center; gap: .375rem; color: var(--label-3); font-size: .875rem; }
.df-num { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 1.5px solid currentColor; font-weight: 600; }
.df-steps li.is-current { color: #fff; font-weight: 600; }
.df-steps li.is-current .df-num { background: #fff; border-color: #fff; color: #000; }
.df-steps li.is-done { color: var(--label-2); }
.df-steps li:not(.is-current) .df-name { display: none; }
.df-step-title { font-size: 1.25rem; font-weight: 700; margin-bottom: .75rem; }
.df-step-title span { display: block; font-size: .875rem; font-weight: 400; color: var(--label-2); }
.df-step-title:focus { outline: none; }
.df-nav { display: flex; gap: .75rem; margin-top: 1.5rem; }
.df-nav .btn, .df-final .btn-x { min-height: 52px; border-radius: 999px; font-weight: 600; font-size: 1.0625rem; }
.df-nav [data-step-prev] { flex: 0 0 auto; padding: 0 1.25rem; background: rgba(255,255,255,.12); border: 1px solid var(--glass-edge); color: #fff; }
.df-nav [data-step-next] { flex: 1; background: var(--ev-primary); border: 0; color: var(--ev-on-primary); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.df-final { margin-top: 1.5rem; }

/* สรุปรายการ / ใบจอง */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-top: 1px solid var(--hairline); }
.rows li:first-child { border-top: 0; }
.rows li > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid rgba(255,255,255,.4); padding-top: .875rem; margin-top: .25rem; }
.total-row strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.answers { margin: 0; }
.answers dt { font-weight: 400; color: var(--label-2); font-size: .9375rem; margin-top: .75rem; }
.answers dd { margin: 0; overflow-wrap: anywhere; }
.sticky-cta { position: sticky; bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); margin-top: 1.25rem; padding: .625rem; border-radius: 999px; display: flex; align-items: center; gap: .75rem; }
.sticky-cta .sum { padding-left: .875rem; line-height: 1.2; white-space: nowrap; }
.sticky-cta .sum strong { display: block; font-size: 1.1875rem; }
.sticky-cta .btn-x { width: auto; flex: 1; }

.pill { display: inline-flex; align-items: center; gap: .375rem; padding: .25rem .75rem; border-radius: 999px; font-size: .875rem; font-weight: 600; border: 1px solid currentColor; }
.pill-wait { color: #ffd60a; } .pill-ok { color: #5fd38d; } .pill-off { color: var(--label-2); } .pill-bad { color: #ff8a8a; }
.slip { overflow: hidden; padding: 0; }
.slip-head { padding: 1.25rem 1.25rem 1rem; background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,0)), var(--ev-primary); color: var(--ev-on-primary); }
.slip-head h1 { font-size: 1.375rem; font-weight: 700; margin: .5rem 0 .125rem; line-height: 1.25; }
.slip-no { font-size: 1.875rem; font-weight: 700; letter-spacing: .05em; font-variant-numeric: tabular-nums; margin: 0; }
.slip-body { padding: 1.25rem; }
.slip-cut { height: 0; border-top: 2px dashed rgba(255,255,255,.3); margin: 0 1.25rem; }
.list-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.list-cards a { display: block; padding: 1rem 1.125rem; text-decoration: none; border-radius: 22px; }
.list-cards .top { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .375rem; }
.event-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.event-cards a { display: flex; gap: 1rem; align-items: center; padding: .75rem; border-radius: 24px; text-decoration: none; }
.event-cards img, .event-cards .ph { width: 76px; height: 100px; object-fit: cover; border-radius: 16px; flex-shrink: 0; background: linear-gradient(135deg, var(--ev-primary), var(--ember)); }
.event-cards span { display: flex; flex-direction: column; color: var(--label-2); min-width: 0; }
.event-cards strong { color: #fff; font-size: 1.125rem; line-height: 1.3; }

/* ผังโซนและโต๊ะ */
.map-stage { position: relative; height: min(58vh, 560px); min-height: 320px; border-radius: var(--r-card); overflow: hidden; background: rgba(0,0,0,.55); border: 1px solid var(--glass-edge); }
.map-stage svg { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.map-stage text { pointer-events: none; font-family: inherit; }
.zone-shape { cursor: pointer; }
.zone-shape.is-dim { opacity: .28; }
.zone-shape.is-full .zone-fill { opacity: .45; }
.map-zoom { position: absolute; right: .75rem; top: .75rem; display: flex; flex-direction: column; gap: .5rem; }
.map-zoom button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--glass-edge); background: rgba(40,40,42,.7); color: #fff; font-size: 1.25rem; line-height: 1; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.map-toast { position: absolute; left: .75rem; right: 4.25rem; top: .75rem; background: rgba(20,20,22,.92); border: 1px solid var(--glass-edge); border-radius: 16px; padding: .625rem .875rem; font-size: .9375rem; }
.map-hint { text-align: center; margin: .75rem 0; }
.zone-chips { list-style: none; display: grid; gap: .5rem; margin: .75rem 0 0; padding: 0; }
.zone-chips button { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .125rem .75rem; text-align: left; padding: .75rem 1rem; border-radius: 20px; border: 1px solid var(--glass-edge); background: rgba(255,255,255,.08); color: #fff; }
.zone-chips button[aria-pressed="true"] { background: rgba(255,255,255,.2); border-color: #fff; }
.zone-chips .dot { width: 1.125rem; height: 1.125rem; border-radius: 6px; border: 1px solid rgba(255,255,255,.5); grid-row: span 2; }
.zone-chips .nm { font-weight: 600; }
.zone-chips .pr { font-weight: 600; text-align: right; white-space: nowrap; }
.zone-chips .fr { grid-column: 2 / 4; color: var(--label-2); font-size: .875rem; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: .375rem 1rem; margin: .75rem 0 0; padding: 0; font-size: .875rem; color: var(--label-2); }
.legend li { display: flex; align-items: center; gap: .375rem; }
.legend svg { width: 22px; height: 22px; }

.sheet { position: fixed; left: 50%; bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(94vw, 500px); z-index: 50; padding: 1.25rem; }
.sheet h2 { font-size: 1.5rem; font-weight: 700; margin: 0 2.75rem .125rem 0; line-height: 1.25; }
.sheet .sheet-price { font-size: 1.25rem; font-weight: 600; margin: .25rem 0; }
.sheet .sheet-free { margin: 0 0 1rem; }
.sheet-close { position: absolute; right: .875rem; top: .875rem; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.25rem; line-height: 1; }
.sheet .dot { display: inline-block; width: 1rem; height: 1rem; border-radius: 5px; border: 1px solid rgba(255,255,255,.5); margin-right: .5rem; vertical-align: -2px; }
.pickbar { position: fixed; left: 50%; bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(94vw, 500px); z-index: 45; padding: .625rem; border-radius: 30px; display: flex; align-items: center; gap: .75rem; }
.pickbar .info { flex: 1; min-width: 0; padding-left: .75rem; line-height: 1.3; }
.pickbar .info span { display: block; color: var(--label-2); font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pickbar .btn-x { width: auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.zone-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.zone-head h1 { margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .sheet, .pickbar { animation: rise .22s cubic-bezier(.2, .9, .3, 1.1); }
  @keyframes rise { from { transform: translate(-50%, 28px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
}
@media (min-width: 900px) {
  .title-large { font-size: 2.5rem; }
  .event-grid { display: grid; grid-template-columns: 400px 1fr; gap: 1.5rem; align-items: start; }
  .map-stage { height: min(64vh, 640px); }
}
.zone-head h1:focus { outline: none; }

/* ชำระเงิน และตั๋ว */
.pay-amount { display: flex; flex-direction: column; margin: 0 0 1rem; }
.pay-amount strong { font-size: 2.25rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.pay-qr { width: min(100%, 280px); margin: 0 auto .75rem; background: #fff; border-radius: 20px; padding: 10px; }
.pay-qr svg { display: block; width: 100%; height: auto; }
.pay-steps { padding-left: 1.25rem; margin: 1rem 0; color: rgba(255,255,255,.88); }
.pay-steps li { margin-bottom: .375rem; }
.tickets { display: grid; gap: 1rem; }
.ticket-card { padding: .75rem; }
.ticket-frame { border-radius: 20px; overflow: hidden; background: #fff; }
.ticket-frame svg { display: block; width: 100%; height: auto; }
.ticket-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem .5rem .25rem; }
.ticket-foot .btn-x { width: auto; min-height: 44px; padding: .5rem 1.25rem; font-size: 1rem; }

/* PDPA / ร้านค้า / ตะกร้า */
.consents { display: grid; gap: 1rem; margin-bottom: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--hairline); }
.consent details { margin: .375rem 0 0 2.25rem; }
.consent summary { color: var(--label-2); text-decoration: underline; cursor: pointer; min-height: 32px; }
.consent-text { margin-top: .5rem; max-height: 46vh; overflow-y: auto; padding: .875rem 1rem; border-radius: 16px; background: rgba(0,0,0,.35); border: 1px solid var(--hairline); font-size: .9375rem; }
.consent-text h3 { font-size: 1rem; font-weight: 700; margin: .75rem 0 .375rem; }
.consent-error { margin-left: 2.25rem; }
.shop-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.shop-grid a { display: block; text-decoration: none; border-radius: 24px; overflow: hidden; height: 100%; }
.shop-grid img, .shop-grid .ph { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: linear-gradient(135deg, var(--ev-primary), var(--ember)); }
.shop-grid .tx { padding: .75rem .875rem .875rem; display: flex; flex-direction: column; gap: .125rem; }
.shop-grid .nm { font-weight: 600; line-height: 1.3; }
.shop-grid .pr { font-weight: 700; }
.product-hero { overflow: hidden; padding: 0; }
.product-hero img, .product-hero .ph { display: block; width: 100%; max-height: 52vh; aspect-ratio: 1; object-fit: cover; background: linear-gradient(135deg, var(--ev-primary), var(--ember)); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label { min-height: 44px; min-width: 52px; display: inline-flex; align-items: center; justify-content: center; padding: .375rem 1rem; border-radius: 999px; border: 1px solid var(--glass-edge); background: rgba(255,255,255,.08); cursor: pointer; font-weight: 600; }
.chips input:checked + label { background: #fff; color: #000; border-color: #fff; }
.chips input:focus-visible + label { outline: 3px solid #fff; outline-offset: 3px; }
.chips input:disabled + label { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.qty { display: inline-flex; align-items: center; gap: .25rem; border: 1px solid var(--glass-edge); border-radius: 999px; padding: .25rem; background: rgba(255,255,255,.08); }
.qty button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.25rem; line-height: 1; }
.qty input { width: 3.25rem; text-align: center; background: transparent; border: 0; color: #fff; font-weight: 700; font-size: 1.125rem; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-lines li { display: grid; grid-template-columns: 64px 1fr; gap: .25rem .875rem; padding: .875rem 0; border-top: 1px solid var(--hairline); align-items: center; }
.cart-lines li:first-child { border-top: 0; }
.cart-lines img, .cart-lines .ph { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: linear-gradient(135deg, var(--ev-primary), var(--ember)); grid-row: span 2; }
.cart-lines .ctl { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.cart-link { position: fixed; right: 1rem; bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); z-index: 41; width: auto; min-height: 48px; padding: .5rem 1.125rem; }
.qty-input { width: 5rem; min-height: 44px; text-align: center; } .cart-note { grid-column: 2; }
.pickbar .info .rivals { color: #ffb340; white-space: normal; font-weight: 600; }

/* ขยายภาพ */
.zoomable { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; color: #fff; }
.zoomable img { display: block; width: 100%; }
.zoom-tag { position: absolute; right: .75rem; bottom: .75rem; display: inline-flex; align-items: center; gap: .375rem; min-height: 40px; padding: .375rem .875rem; border-radius: 999px;
  background: rgba(20, 20, 22, .72); border: 1px solid var(--glass-edge); font-size: .9375rem; font-weight: 600; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.zoom-tag svg { width: 18px; height: 18px; }
.zoomable:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
body.lb-open { overflow: hidden; }
dialog.lightbox { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(0, 0, 0, .94); color: #fff; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .94); }
dialog.lightbox:not([open]) { display: none; }
.lb-scroll { width: 100%; height: 100%; overflow: auto; display: flex; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.lb-scroll img { margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; flex-shrink: 0; }
.lightbox.is-zoomed .lb-scroll img { max-width: none; max-height: none; width: 250%; cursor: zoom-out; }
@media (min-width: 900px) { .lightbox.is-zoomed .lb-scroll img { width: auto; height: 220%; } }
.lb-close { position: fixed; right: calc(.875rem + env(safe-area-inset-right, 0px)); top: calc(.875rem + env(safe-area-inset-top, 0px)); z-index: 2; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--glass-edge); background: rgba(40, 40, 42, .8); color: #fff; font-size: 1.625rem; line-height: 1; }
.lb-hint { position: fixed; left: 50%; bottom: calc(.875rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); margin: 0; padding: .375rem 1rem; border-radius: 999px; background: rgba(40, 40, 42, .8); font-size: .875rem; white-space: nowrap; pointer-events: none; }

/* โอนด้วยเลขบัญชี */
.bank { display: grid; grid-template-columns: auto 1fr; gap: .625rem 1rem; margin: 0 0 .75rem; padding: 1rem; border-radius: 18px; background: rgba(0,0,0,.35); border: 1px solid var(--hairline); align-items: center; }
.bank dt { color: var(--label-2); font-weight: 400; font-size: .9375rem; }
.bank dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.bank-no { font-size: 1.25rem; font-weight: 700; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.copy-btn { min-height: 36px; padding: .25rem .875rem; border-radius: 999px; border: 1px solid var(--glass-edge); background: rgba(255,255,255,.12); color: #fff; font-size: .875rem; font-weight: 600; margin-left: auto; }

/* ---------- รูปภาพ : แสดงทั้งภาพตามสัดส่วนจริง ไม่ตัดและไม่ยืด ---------- */
.poster-card img.poster { width: 100%; height: auto; max-height: none; object-fit: contain; }
.zoomable img { height: auto; }
.event-cards img { object-fit: contain; background: rgba(0, 0, 0, .35); }
.shop-grid img { object-fit: contain; background: rgba(0, 0, 0, .35); }
.product-hero img { aspect-ratio: auto; height: auto; max-height: 70vh; object-fit: contain; background: rgba(0, 0, 0, .35); }
.cart-lines img { object-fit: contain; background: rgba(0, 0, 0, .35); }

/* ---------- หน้าชำระเงิน (กระชับ อยู่ในจอเดียว) ---------- */
.pay-card { padding: 1rem 1.125rem 1.125rem; }
.pay-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: .75rem; }
.pay-total { font-size: 2.25rem; font-weight: 700; line-height: 1.1; margin: 0; font-variant-numeric: tabular-nums; }
.pay-total small { font-size: 1rem; font-weight: 400; color: var(--label-2); }
.pay-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: .8125rem; color: var(--label-2); text-align: right; }
.seg-radio { position: absolute; opacity: 0; pointer-events: none; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; padding: .25rem; border-radius: 999px; background: rgba(255,255,255,.1); margin-bottom: .75rem; }
.seg label { text-align: center; padding: .5rem .5rem; border-radius: 999px; font-weight: 600; font-size: .9375rem; cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: center; }
#mode-qr:checked ~ .seg label[for="mode-qr"], #mode-bank:checked ~ .seg label[for="mode-bank"] { background: #fff; color: #000; }
#mode-qr:focus-visible ~ .seg label[for="mode-qr"], #mode-bank:focus-visible ~ .seg label[for="mode-bank"] { outline: 3px solid #fff; outline-offset: 2px; }
#mode-qr:checked ~ .pane-bank, #mode-bank:checked ~ .pane-qr { display: none; }
.pay-pane { margin-bottom: .875rem; }
.pay-card .pay-qr { width: min(62vw, 230px); margin: 0 auto .5rem; padding: 8px; border-radius: 16px; }
.pay-card .bank { margin-bottom: .5rem; padding: .75rem .875rem; gap: .5rem .875rem; }
.pay-upload { border-top: 1px solid var(--hairline); padding-top: .875rem; }
.pay-upload .form-control { min-height: 48px; }

/* ---------- เลือกวิธีรับสินค้า ---------- */
dialog.sheet-dialog { border: 1px solid var(--glass-edge); border-radius: 28px; background: rgba(28, 28, 30, .97); color: #fff; padding: 1.25rem; width: min(94vw, 480px); max-height: 90dvh; overflow-y: auto; }
dialog.sheet-dialog::backdrop { background: rgba(0, 0, 0, .7); }
.choice { position: relative; margin-bottom: .625rem; }
.choice input { position: absolute; opacity: 0; }
.choice label { display: flex; flex-direction: column; gap: .125rem; padding: .875rem 1rem .875rem 3rem; border-radius: 20px; border: 1.5px solid var(--glass-edge); background: rgba(255,255,255,.06); cursor: pointer; position: relative; }
.choice label::before { content: ""; position: absolute; left: 1rem; top: 1.05rem; width: 1.375rem; height: 1.375rem; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); }
.choice input:checked + label { border-color: #fff; background: rgba(255,255,255,.14); }
.choice input:checked + label::before { border-color: var(--ev-primary); background: radial-gradient(circle, #fff 0 38%, var(--ev-primary) 42%); }
.choice input:focus-visible + label { outline: 3px solid #fff; outline-offset: 2px; }
.choice label span { color: var(--label-2); font-size: .9375rem; }
.choice label .choice-total { color: #fff; font-weight: 600; margin-top: .25rem; }
.rows-extra li { border-top: 1px solid var(--hairline) !important; }
.ship-fields { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--hairline); }

/* ================= หน้าเลือกโซน/โต๊ะ : ทุกอย่างอยู่ในกรอบเดียว ไม่ต้องเลื่อนหน้า ================= */
.site-main.fit { padding-bottom: .75rem; }
.wrap-full { max-width: 1560px; }
.sp { position: relative; }
.sp .map-stage { height: calc(100vh - 9rem); height: calc(100dvh - 9rem); min-height: 380px; }
.sp-title { position: absolute; left: .75rem; top: .75rem; z-index: 3; display: flex; align-items: center; gap: .5rem; max-width: calc(100% - 5rem); padding: .375rem .875rem .375rem .5rem; border-radius: 999px; background: rgba(20, 20, 22, .82); border: 1px solid var(--glass-edge); }
.sp-title h1 { font-size: 1.0625rem; font-weight: 700; margin: 0 0 0 .375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-title h1:focus { outline: none; }
.sp-back { border: 0; border-radius: 999px; background: rgba(255,255,255,.16); color: #fff; font-weight: 600; font-size: .9375rem; padding: .375rem .875rem; min-height: 36px; white-space: nowrap; }
.sp .map-toast { top: 4rem; }
.sp-hint { color: var(--label-2); font-size: .875rem; margin: 0 0 .5rem; }

/* มือถือและแท็บเล็ต : รายการโซนเป็นแถบเลื่อนแนวนอน ซ้อนอยู่ด้านล่างของผัง */
@media (max-width: 991.98px) {
  .sp-side { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 2rem .625rem .625rem; border-radius: 0 0 var(--r-card) var(--r-card); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .82) 55%); pointer-events: none; }
  .sp-side > * { pointer-events: auto; }
  .sp-hint { display: none; }
  .sp .zone-chips, .sp .legend { display: flex; flex-wrap: nowrap; gap: .5rem; margin: 0; padding: 0 0 .125rem; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
  .sp .zone-chips::-webkit-scrollbar, .sp .legend::-webkit-scrollbar { display: none; }
  .sp .zone-chips li { flex: 0 0 auto; scroll-snap-align: center; }
  .sp .zone-chips button { grid-template-columns: auto auto; gap: 0 .5rem; padding: .5rem .875rem; border-radius: 16px; background: rgba(28, 28, 30, .92); min-height: 52px; }
  .sp .zone-chips .nm { max-width: 11rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .9375rem; }
  .sp .zone-chips .pr { display: none; }          /* ราคาแสดงในแผ่นรายละเอียดเมื่อแตะ */
  .sp .zone-chips .fr { grid-column: 2; font-size: .8125rem; white-space: nowrap; }
  .sp .legend li { flex: 0 0 auto; padding: .375rem .75rem; border-radius: 999px; background: rgba(28, 28, 30, .92); border: 1px solid var(--glass-edge); color: #fff; white-space: nowrap; }
}

/* คอมพิวเตอร์ : ผังอยู่ซ้าย แผงควบคุมอยู่ขวา สูงพอดีจอ (ใช้แผงทึบแบบเว็บ ไม่ใช้แผ่นลอยแบบมือถือ) */
@media (min-width: 992px) {
  .sp { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 1rem; height: calc(100vh - 8.5rem); height: calc(100dvh - 8.5rem); min-height: 520px; }
  .sp .map-stage { height: 100%; min-height: 0; }
  .sp-side { display: flex; flex-direction: column; min-height: 0; padding: 1rem; border-radius: var(--r-card); background: rgba(24, 24, 26, .9); border: 1px solid var(--glass-edge); }
  .sp-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .sp .zone-chips { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding-right: .25rem; align-content: start; gap: .375rem; }
  .sp .zone-chips button { padding: .5rem .75rem; border-radius: 14px; }
  .sp .zone-chips .nm { font-size: .9375rem; line-height: 1.3; }
  .sp .zone-chips .pr { font-size: .9375rem; }
  .sp .zone-chips .fr { font-size: .8125rem; }
  .sp .legend { display: grid; gap: .5rem; margin: 0 0 .75rem; color: #fff; }
  .sp .sheet, .sp .pickbar { position: static; transform: none; width: auto; animation: none; box-shadow: none; margin-top: .75rem; flex-shrink: 0; border-radius: 20px; -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255, 255, 255, .08); }
  .sp .pickbar { flex-direction: column; align-items: stretch; padding: .875rem; }
  .sp .pickbar .info { padding-left: 0; }
  .sp .pickbar .info span { white-space: normal; }
  .sp .pickbar .btn-x { width: 100%; }
  .sp .sheet h2 { font-size: 1.25rem; }
}

/* ================= ร้านค้า ================= */
@media (min-width: 560px) { .shop-grid { grid-template-columns: repeat(3, 1fr); } }
.shop-grid .tx { padding: .625rem .75rem .75rem; }
/* แว่นขยาย : เลื่อนเมาส์บนรูปเพื่อขยายเฉพาะจุด (จอสัมผัสใช้ปุ่ม "ขยายภาพ") */
.zoomable.is-lens { overflow: hidden; cursor: crosshair; }
.zoomable.is-lens img { transform: scale(2.4); transition: transform .08s linear; }
.zoomable img { transition: transform .15s ease-out; will-change: transform; }
@media (prefers-reduced-motion: reduce) { .zoomable img, .zoomable.is-lens img { transition: none; } }
/* หน้าสินค้าบนคอมพิวเตอร์ : รูปใหญ่ทางซ้าย (ราว 60% ของหน้า) กล่องสั่งซื้อทางขวาและตามจอเมื่อเลื่อน */
/* มือถือ : เรียงเป็น รูป → กล่องสั่งซื้อ → ตารางขนาด → รายละเอียด (ไม่ต้องเลื่อนผ่านรายละเอียดก่อนถึงปุ่มสั่งซื้อ) */
.product-layout { display: flex; flex-direction: column; gap: 1rem; }
.product-layout .mt-3, .product-layout .mb-3 { margin-top: 0 !important; margin-bottom: 0 !important; }
.product-media, .product-buy { display: contents; }
.product-hero { order: 1; } #product-form { order: 2; } #size-chart { order: 3; } .product-desc { order: 4; }
.product-hero img { width: 100%; height: auto; max-height: none; }
@media (min-width: 900px) {
  .product-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(340px, 1fr); gap: 1.5rem; align-items: start; }
  .product-media, .product-buy { display: grid; gap: 1rem; }
  .product-buy { position: sticky; top: 1rem; }
  .product-hero { margin-bottom: 0 !important; }
  .product-hero img { max-height: calc(100vh - 7rem); max-height: calc(100dvh - 7rem); object-fit: contain; }
}
.size-chart { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.size-chart th, .size-chart td { padding: .5rem .625rem; text-align: center; border-bottom: 1px solid var(--hairline); }
.size-chart th { font-weight: 600; color: var(--label-2); font-size: .9375rem; }
.size-chart td:first-child, .size-chart th:first-child { text-align: left; font-weight: 700; color: #fff; }
.size-chart-wrap { overflow-x: auto; }
