/* ================================================================
   ห้องพัก 9d — สไตล์ทั้งหมด
   ธีมสี: แก้ชุดสีใน [data-palette="..."] ด้านล่าง / โหมดมืด: [data-mode="dark"]
   ================================================================ */

/* ----- ธีมสี -----
   แต่ละธีมกำหนด --p1 (สีหลัก เข้ม) / --p2 (สีรอง อ่อน) / --accent และสีพื้นของโหมดสว่าง
   โหมดมืด ([data-mode="dark"] ด้านล่าง) คำนวณจาก --p1/--p2 ให้ทุกธีมเอง ไม่ต้องกำหนดแยก
   เพิ่มธีม: เพิ่มบล็อกที่นี่ + เพิ่มใน PALETTES ของ assets/js/prefs.js + ชื่อใน theme.* ของ i18n.js */
:root,
[data-palette="ocean"] {
  --p1: #0e7490;  /* สีหลัก (ปุ่ม ลิงก์) */
  --p2: #22d3ee;  /* สีรอง (ไล่สี) */
  --accent: #f59e0b;
  --bg: #f5fbfc;
  --bg-alt: #e8f6f8;
  --surface: #ffffff;
  --text: #0f2a33;
  --muted: #557079;
  --line: #d6e9ed;
  --shadow: 14 116 144;
}
[data-palette="gold"] {
  --p1: #8a5a14; --p2: #e2b65e; --accent: #1f2937;
  --bg: #fbf8f2; --bg-alt: #f4ecdd; --surface: #ffffff; --text: #2b2114; --muted: #75664f; --line: #eadfca; --shadow: 138 90 20;
}
[data-palette="sakura"] {
  --p1: #be185d; --p2: #f9a8d4; --accent: #7c3aed;
  --bg: #fff7fa; --bg-alt: #fde8f1; --surface: #ffffff; --text: #3b0d22; --muted: #85566a; --line: #f6d5e3; --shadow: 190 24 93;
}
[data-palette="forest"] {
  --p1: #166534; --p2: #4ade80; --accent: #ca8a04;
  --bg: #f5faf5; --bg-alt: #e6f3e8; --surface: #ffffff; --text: #10291a; --muted: #557062; --line: #d3e8d8; --shadow: 22 101 52;
}
[data-palette="lavender"] {
  --p1: #6d28d9; --p2: #c4b5fd; --accent: #ec4899;
  --bg: #f9f7ff; --bg-alt: #efeafe; --surface: #ffffff; --text: #22164a; --muted: #6b628c; --line: #e2dbfa; --shadow: 109 40 217;
}
/* ราตรี: น้ำเงินกรมท่า + ทอง (โหมดมืดได้สีทองบนพื้นกรมท่า) */
[data-palette="night"] {
  --p1: #1f2f5c; --p2: #e3b75f; --accent: #c99a3e;
  --bg: #f6f7fb; --bg-alt: #eaedf6; --surface: #ffffff; --text: #141b2e; --muted: #5d6680; --line: #dde2ee; --shadow: 31 47 92;
}
/* พาสเทล: พื้นและสีรองอ่อนหวาน สีหลักเข้มพอให้อ่านตัวหนังสือได้ */
[data-palette="mint"] {
  --p1: #2a8572; --p2: #b5ead7; --accent: #e98a7e;
  --bg: #f4fbf8; --bg-alt: #e3f5ee; --surface: #ffffff; --text: #173a33; --muted: #5a7a72; --line: #cfeadf; --shadow: 42 133 114;
}
[data-palette="peach"] {
  --p1: #b4553f; --p2: #ffd3b6; --accent: #6fa6cc;
  --bg: #fff8f3; --bg-alt: #ffeadb; --surface: #ffffff; --text: #3f2219; --muted: #8a6558; --line: #f6dccb; --shadow: 180 85 63;
}
[data-palette="lilac"] {
  --p1: #7a5bb5; --p2: #d9c8f5; --accent: #e88fb0;
  --bg: #faf7ff; --bg-alt: #efe8fc; --surface: #ffffff; --text: #2c2142; --muted: #6f6488; --line: #e4dbf6; --shadow: 122 91 181;
}
[data-palette="sky"] {
  --p1: #3b7bb0; --p2: #bfe0f7; --accent: #f0a050;
  --bg: #f5faff; --bg-alt: #e3f1fc; --surface: #ffffff; --text: #17304a; --muted: #5b7590; --line: #d3e6f5; --shadow: 59 123 176;
}
[data-palette="butter"] {
  --p1: #8a6a10; --p2: #fbe7a1; --accent: #6fae92;
  --bg: #fffcf0; --bg-alt: #fdf3cf; --surface: #ffffff; --text: #3a3010; --muted: #7d7150; --line: #f1e6bd; --shadow: 138 106 16;
}
[data-palette="rose"] {
  --p1: #b84a6b; --p2: #ffc8d6; --accent: #6db5a5;
  --bg: #fff7f9; --bg-alt: #ffe6ec; --surface: #ffffff; --text: #3d1a25; --muted: #87606b; --line: #f7d6df; --shadow: 184 74 107;
}

/* โหมดสว่าง (ค่าเริ่มต้น) */
:root {
  --c1: var(--p1);
  --c2: var(--p2);
  --on-c1: #ffffff;
  --glow: color-mix(in srgb, var(--p2) 42%, transparent);
  color-scheme: light;
}
/* โหมดมืด: พื้นเข้มอมสีธีม สีหลักใช้สีรองที่สว่างขึ้น ปุ่มตัวหนังสือเข้ม */
[data-mode="dark"] {
  --c1: color-mix(in srgb, var(--p2) 82%, #ffffff);
  --c2: var(--p2);
  --on-c1: #10141d;
  --bg: color-mix(in srgb, var(--p1) 16%, #0a0d14);
  --bg-alt: color-mix(in srgb, var(--p1) 22%, #0d1119);
  --surface: color-mix(in srgb, var(--p1) 20%, #141a25);
  --text: #e9edf5;
  --muted: #a4adbf;
  --line: color-mix(in srgb, var(--p2) 16%, #273042);
  --shadow: 0 0 0;
  --glow: color-mix(in srgb, var(--p2) 28%, transparent);
  color-scheme: dark;
}

:root {
  --radius: 20px;
  --radius-sm: 12px;
  --header-h: 72px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  --font-body: 'Sarabun', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Prompt', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --brand-line: #06c755;
  --brand-fb: #1877f2;
  --brand-tt: #111111;
}
html:lang(zh-CN) { --font-body: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif; --font-head: var(--font-body); }

/* ----- พื้นฐาน ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition: background-color .5s, color .5s;
}
body.no-scroll { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; vertical-align: middle; }
:focus-visible { outline: 3px solid var(--c2); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--c2); color: #000; }

/* ----- แถบเลื่อน: บาง มน สีตามธีม ----- */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--c1) 38%, var(--line)); background-clip: padding-box;
  border: 3px solid transparent; border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--c1); background-clip: padding-box; border: 3px solid transparent; }
::-webkit-scrollbar-corner { background: transparent; }
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--c1) 45%, var(--line)) transparent; }
  .is-preview, .is-preview body { scrollbar-width: none; }
}
.is-preview::-webkit-scrollbar, .is-preview body::-webkit-scrollbar { display: none; width: 0; height: 0; }
#logo-g stop:first-child { stop-color: var(--c2); }
#logo-g stop:last-child { stop-color: var(--c1); }

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 200;
  padding: 8px 16px; border-radius: 10px;
  background: var(--c1); color: var(--on-c1); text-decoration: none;
  transform: translateY(-160%); transition: transform .2s;
}
.skip-link:focus { transform: none; }

/* ----- ปุ่ม ----- */
.btn {
  --tx: 0px; --ty: 0px;
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 24px;
  border: 0; border-radius: 999px; white-space: nowrap;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem; text-decoration: none;
  cursor: pointer;
  translate: var(--tx) var(--ty);
  transition: translate .35s var(--ease), box-shadow .3s, background-color .3s, color .3s;
}
.btn::after {
  /* แสงวิ่งผ่านตอนชี้ */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  translate: -110% 0; transition: translate .7s var(--ease);
  pointer-events: none;
}
.btn:hover::after { translate: 110% 0; }
.btn-primary {
  background: linear-gradient(135deg, var(--c1), color-mix(in srgb, var(--c1) 70%, var(--c2)));
  color: var(--on-c1);
  box-shadow: 0 10px 24px -10px rgb(var(--shadow) / .7);
}
.btn-primary:hover { box-shadow: 0 16px 32px -12px rgb(var(--shadow) / .8), 0 0 0 4px var(--glow); }
.btn-glass {
  --line-ink: rgba(10, 15, 25, .65);
  background: rgba(255, 255, 255, .14); color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn-glass:hover { background: rgba(255, 255, 255, .26); }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: .95rem; }
.btn-lg { min-height: 56px; padding: 14px 30px; font-size: 1.05rem; }
.btn-primary .icon { transition: translate .3s var(--ease); }
.btn-primary:hover .icon { translate: 4px 0; }

.icon-btn, .round-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
  cursor: pointer; text-decoration: none;
  transition: transform .3s var(--ease-back), background-color .3s, color .3s, border-color .3s;
}
.icon-btn:hover, .round-btn:hover { transform: translateY(-2px) rotate(-6deg); border-color: var(--c1); color: var(--c1); }
.icon-btn:active, .round-btn:active { transform: scale(.9); }

.chip {
  flex: none;
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-weight: 600; cursor: pointer;
  transition: background-color .3s, color .3s, border-color .3s, transform .3s var(--ease-back);
}
.chip:hover { border-color: var(--c1); color: var(--c1); }
.chip:active { transform: scale(.94); }
.chip.is-active { background: var(--c1); border-color: var(--c1); color: var(--on-c1); }

/* ----- หน้าโหลด ----- */
.preloader {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-content: center; justify-items: center; gap: 22px;
  background: var(--bg);
  transition: opacity .6s var(--ease), visibility .6s;
}
.no-js .preloader, .is-loaded .preloader { opacity: 0; visibility: hidden; }
.preloader-mark { width: 76px; height: 76px; animation: pop 1.2s var(--ease-back) infinite alternate; }
.preloader-mark svg { width: 100%; height: 100%; }
.preloader-bar { width: 140px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.preloader-bar span { display: block; height: 100%; width: 40%; border-radius: inherit; background: linear-gradient(90deg, var(--c2), var(--c1)); animation: load 1s ease-in-out infinite; }
@keyframes pop { from { transform: scale(.9) rotate(-4deg); } to { transform: scale(1.05) rotate(4deg); } }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--c2), var(--c1), var(--accent)); transform-origin: 0 50%; transform: scaleX(0); }

/* ----- Header ----- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--header-h);
  transition: background-color .4s, box-shadow .4s, color .4s, height .4s var(--ease);
}
.site-header.is-scrolled {
  --header-h: 64px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  box-shadow: 0 1px 0 var(--line), 0 10px 30px -20px rgb(var(--shadow) / .5);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; white-space: nowrap; }
.logo-svg { width: 40px; height: 40px; flex: none; transition: transform .6s var(--ease-back); }
.logo:hover .logo-svg { transform: rotate(-12deg) scale(1.08); }
.logo-text b { background: linear-gradient(135deg, var(--c2), var(--c1)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.main-nav { display: flex; gap: 4px; margin-inline: auto; }
.main-nav a {
  position: relative; padding: 8px 14px; border-radius: 999px;
  text-decoration: none; font-weight: 600; white-space: nowrap;
  transition: color .3s;
}
.main-nav a::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px;
  background: var(--c2); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.main-nav a:hover::after, .main-nav a.is-current::after { transform: scaleX(1); transform-origin: left; }
.header-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.main-nav + .header-tools { margin-left: 0; }

/* header โปร่งบนสไลด์: ตัวหนังสือขาว */
.site-header.on-hero:not(.is-scrolled) { color: #fff; }
.site-header.on-hero:not(.is-scrolled) .icon-btn { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: #fff; }
.site-header.on-hero:not(.is-scrolled) .lang-switch { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }

.lang-switch { display: flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.lang-switch button {
  min-width: 40px; height: 34px; padding: 0 10px; white-space: nowrap;
  border: 0; border-radius: 999px; background: none;
  font-size: .85rem; font-weight: 700; cursor: pointer;
  transition: background-color .3s, color .3s;
}
.lang-switch button[aria-pressed="true"] { background: var(--c1); color: var(--on-c1); }

.burger { position: relative; width: 18px; height: 14px; }
.burger span { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .35s var(--ease), opacity .2s; }
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 6px; }
.burger span:nth-child(3) { top: 12px; }
.menu-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.menu-toggle { display: none; }

/* ปุ่มสลับโหมดมืด/สว่าง: แสดงพระจันทร์ตอนสว่าง ดวงอาทิตย์ตอนมืด */
.mode-toggle { position: relative; overflow: hidden; }
.mode-toggle .icon { position: absolute; transition: transform .5s var(--ease-back), opacity .3s; }
.mode-toggle .i-sun { opacity: 0; transform: rotate(-90deg) scale(.4); }
[data-mode="dark"] .mode-toggle .i-moon { opacity: 0; transform: rotate(90deg) scale(.4); }
[data-mode="dark"] .mode-toggle .i-sun { opacity: 1; transform: none; }
/* ปุ่มภาษาในเมนู ใช้เฉพาะจอเล็กมาก (ซ่อนปุ่มภาษาที่แถบบนแทน) */
.nav-lang { display: none; }
@media (max-width: 440px) {
  .top-lang { display: none; }
  .nav-lang { display: flex; align-self: flex-start; margin: 10px 16px 0; }
}

/* ปุ่มตั้งค่า (เลือกธีมสีอยู่ในหน้าตั้งค่า settings.html) */
.settings-link .icon, .footer-settings .icon { transition: rotate .6s var(--ease); }
.settings-link:hover .icon, .footer-settings:hover .icon { rotate: 90deg; }
.footer-settings {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: .92rem; text-decoration: none;
  transition: color .3s, border-color .3s;
}
.footer-settings:hover { color: var(--c1); border-color: var(--c1); }
@keyframes panelIn { from { opacity: 0; transform: translateY(-8px) scale(.92); } }
/* วงสีตัวอย่างธีม (ใช้ในหน้าตั้งค่า) */
.swatch-dot {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: conic-gradient(from 210deg, var(--s1), var(--s2), var(--s1));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6);
  color: #fff;
}
.swatch-dot .icon { opacity: 0; transform: scale(.4); transition: .3s var(--ease-back); filter: drop-shadow(0 1px 2px rgb(0 0 0 / .5)); }

/* เปลี่ยนธีมแบบวงกลมขยายจากปุ่มที่กด */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; }
.vt-circle::view-transition-old(root) { animation: none; }
.vt-circle::view-transition-new(root) { animation: vtCircle .8s var(--ease); }
@keyframes vtCircle {
  from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0)); }
  to { clip-path: circle(150vmax at var(--vt-x, 50%) var(--vt-y, 0)); }
}

/* ----- Hero ----- */
.hero {
  --hero-y: 0px;
  position: relative; isolation: isolate;
  min-height: max(600px, 100svh);
  display: grid; align-content: end;
  padding-block: calc(var(--header-h) + 40px) 96px;
  color: #fff; overflow: hidden;
  background: linear-gradient(135deg, var(--c1), #0b1020);
}
.hero-slides { position: absolute; inset: 0; z-index: -2; translate: 0 var(--hero-y); }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); }
.slide.is-active { opacity: 1; z-index: 1; }
.slide.is-active img { animation: kenburns calc(var(--delay, 6500ms) + 1.5s) linear forwards; }
.slide.is-leaving { opacity: 0; z-index: 0; }
.slide.is-leaving img { transform: scale(1); }
.slide:nth-child(even).is-active img { animation-name: kenburns2; }
@keyframes kenburns { from { transform: scale(1.15) translate(1.5%, 1%); } to { transform: scale(1.02) translate(0, 0); } }
@keyframes kenburns2 { from { transform: scale(1.02) translate(-1%, 0); } to { transform: scale(1.14) translate(1%, -1.5%); } }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 20% 100%, color-mix(in srgb, var(--c1) 60%, transparent), transparent 60%),
    linear-gradient(180deg, rgba(5, 10, 20, .55) 0%, rgba(5, 10, 20, .15) 35%, rgba(5, 10, 20, .75) 100%);
}
.hero-content { max-width: var(--container); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--c1);
}
.hero .eyebrow { color: #fff; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c2); box-shadow: 0 0 0 0 var(--c2); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero-title {
  margin-top: 18px;
  font-size: clamp(3rem, 11vw, 7.5rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.05;
  text-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}
.hero-title .w { display: inline-block; }
.hero-text { margin-top: 18px; max-width: 640px; min-height: 5.5em; }
.hero-text strong { display: block; font-family: var(--font-head); font-size: clamp(1.3rem, 3.2vw, 2rem); font-weight: 600; line-height: 1.35; }
.hero-text strong .w { display: inline-block; }
.hero-text .sub { display: block; margin-top: 6px; font-size: 1.1rem; opacity: .9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; }
.hero-dots { display: flex; gap: 8px; }
.hero-dot { position: relative; width: 44px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.hero-dot::before, .hero-dot span { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; }
.hero-dot::before { background: rgba(255, 255, 255, .3); }
.hero-dot span { background: #fff; transform: scaleX(0); transform-origin: left; }
.hero-dot.is-active span { animation: dotFill var(--delay, 6500ms) linear forwards; }
.hero.is-paused .hero-dot.is-active span { animation-play-state: paused; }
@keyframes dotFill { to { transform: scaleX(1); } }
.hero-arrows { display: flex; align-items: center; gap: 12px; }
.hero .round-btn { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero .round-btn:hover { background: #fff; color: var(--c1); }
.hero-count { font-family: var(--font-head); font-variant-numeric: tabular-nums; opacity: .85; }
.hero-count b { font-size: 1.3rem; }
.scroll-cue { position: absolute; left: 50%; bottom: 64px; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(255, 255, 255, .6); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ข้อความขึ้นทีละคำ */
.js .hero-title .w { opacity: 0; transform: translateY(60%) rotate(4deg); filter: blur(6px); }
.is-loaded .hero-title .w { animation: wordIn .9s var(--ease) forwards; animation-delay: calc(.15s + var(--i) * 70ms); }
.hero-text.is-in strong .w { animation: wordIn .8s var(--ease) both; animation-delay: calc(var(--i) * 45ms); }
.hero-text.is-in .sub { animation: fadeUp .8s .25s var(--ease) both; }
@keyframes wordIn { from { opacity: 0; transform: translateY(60%) rotate(4deg); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.js .hero-eyebrow, .js .hero-actions, .js .hero-controls { opacity: 0; }
.is-loaded .hero-eyebrow { animation: fadeUp .8s .1s var(--ease) forwards; }
.is-loaded .hero-actions { animation: fadeUp .8s .6s var(--ease) forwards; }
.is-loaded .hero-controls { animation: fadeUp .8s .8s var(--ease) forwards; }

/* ----- ตัวเลข ----- */
.stats-band { position: relative; z-index: 2; margin-top: -48px; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  padding: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--line);
  box-shadow: 0 30px 60px -30px rgb(var(--shadow) / .45);
  max-width: calc(var(--container) - 2 * var(--gutter));
}
.stats-band .container { padding-inline: 0; width: calc(100% - 2 * var(--gutter)); }
.stat { display: grid; gap: 2px; padding: 26px 20px; text-align: center; background: var(--surface); }
.stat b { font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; background: linear-gradient(135deg, var(--c1), var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: .95rem; }

/* ----- section ----- */
.section { position: relative; padding-block: clamp(72px, 10vw, 120px); }
.section-head { max-width: 680px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.section-head .eyebrow { justify-content: center; }
.section-title { margin-top: 10px; font-size: clamp(1.8rem, 4.2vw, 2.8rem); font-weight: 700; }
.lead { margin-top: 14px; color: var(--muted); font-size: 1.08rem; }
.blob { position: absolute; z-index: -1; width: 520px; height: 520px; border-radius: 50%; filter: blur(60px); opacity: .5; pointer-events: none; translate: 0 var(--py, 0); }
.blob-a { top: 10%; right: -200px; background: radial-gradient(circle, var(--glow), transparent 70%); }
.blob-b { top: -120px; left: -220px; background: radial-gradient(circle, var(--glow), transparent 70%); }
.section { isolation: isolate; overflow-x: clip; }

/* แสดงเมื่อเลื่อนถึง */
.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.from-left { transform: translateX(-48px); }
.js .reveal.from-right { transform: translateX(48px); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ----- เกี่ยวกับ ----- */
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-media { position: relative; aspect-ratio: 1 / 1.02; }
.about-img { position: absolute; overflow: hidden; border-radius: var(--radius); box-shadow: 0 30px 60px -30px rgb(var(--shadow) / .6); }
.about-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.about-img:hover img { transform: scale(1.06); }
.about-img-1 { inset: 0 22% 18% 0; }
.about-img-2 { inset: 46% 0 0 40%; border: 6px solid var(--bg); }
.about-badge {
  position: absolute; left: 6%; bottom: 4%;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 16px;
  background: var(--surface); color: var(--text); font-family: var(--font-head); font-weight: 600;
  box-shadow: 0 20px 40px -20px rgb(var(--shadow) / .6);
}
.about-badge .icon { color: var(--accent); }
.float { animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.about-copy .eyebrow, .about-copy .section-title { text-align: left; }
.points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.points li { display: flex; gap: 16px; align-items: flex-start; }
.points p { color: var(--muted); }
.point-icon {
  display: grid; place-items: center; flex: none;
  width: 48px; height: 48px; border-radius: 14px;
  background: color-mix(in srgb, var(--c2) 22%, var(--surface)); color: var(--c1);
  transition: transform .4s var(--ease-back);
}
.points li:hover .point-icon { transform: rotate(-10deg) scale(1.1); }

/* การ์ดเอียงตามเมาส์ + แสงตามเมาส์ */
.tilt { --rx: 0deg; --ry: 0deg; transform-style: preserve-3d; transition: transform .5s var(--ease), box-shadow .4s; }
.tilt:hover { transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-4px); }
.spot { position: relative; }
.spot::before {
  content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.spot:hover::before { opacity: 1; }
/* .reveal ใช้ transform แล้ว: การ์ดที่เป็น reveal + tilt เอียงหลังขึ้นมาแล้วเท่านั้น */
.js .reveal.tilt.is-visible:hover { transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-6px); transition-delay: 0ms; }

/* ----- ห้องพัก ----- */
.rooms { background: var(--bg-alt); }
.room-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.room {
  display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 20px 40px -30px rgb(var(--shadow) / .6);
}
.room:hover { box-shadow: 0 40px 60px -30px rgb(var(--shadow) / .7); }
.room-media { position: relative; display: block; aspect-ratio: 4 / 3; padding: 0; border: 0; overflow: hidden; cursor: zoom-in; background: var(--line); }
.room-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.room:hover .room-media img { transform: scale(1.08); }
.room-tag, .room-photos {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600;
}
.room-tag { top: 14px; left: 14px; background: var(--accent); color: #fff; box-shadow: 0 6px 16px -6px var(--accent); animation: float 4s ease-in-out infinite; }
.room-photos { right: 14px; bottom: 14px; background: rgba(0, 0, 0, .55); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background-color .3s; }
.room-media:hover .room-photos { background: var(--c1); color: var(--on-c1); }
.room-body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 22px; position: relative; z-index: 2; }
.room-body h3 { font-size: 1.4rem; }
.room-body > p { color: var(--muted); }
.room-meta, .room-features { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.room-meta li { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .95rem; }
.room-meta .icon { color: var(--c1); }
.room-features li { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--bg-alt); font-size: .88rem; }
.room-features .icon { color: var(--c1); width: 1em; height: 1em; }
.room-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); }
.price { display: flex; align-items: baseline; gap: 4px; }
.price b { font-family: var(--font-head); font-size: 1.7rem; color: var(--c1); }
.price small { color: var(--muted); }

/* ปุ่มดู 360° ในการ์ดห้อง */
.room-360 {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  padding: 6px 14px 6px 8px; border-radius: 999px; border: 1px dashed color-mix(in srgb, var(--c1) 50%, var(--line));
  background: color-mix(in srgb, var(--c2) 12%, var(--surface)); color: var(--c1);
  font-weight: 600; font-size: .92rem; cursor: pointer;
  transition: background-color .3s, color .3s, border-color .3s, transform .3s var(--ease-back);
}
.room-360 > .icon:first-child { animation: spin360 6s linear infinite; }
.room-360-arrow { width: 1em; height: 1em; transition: translate .3s var(--ease); }
.room-360:hover { background: var(--c1); border-color: var(--c1); border-style: solid; color: var(--on-c1); }
.room-360:hover .room-360-arrow { translate: 3px 0; }
.room-360:active { transform: scale(.95); }
@keyframes spin360 { 0%, 70% { transform: rotateY(0); } 100% { transform: rotateY(360deg); } }

/* ----- ทัวร์ 360° ----- */
.tour-scenes { display: flex; gap: 12px; justify-content: center; margin-bottom: 20px; padding: 4px; overflow-x: auto; scrollbar-width: none; }
.tour-scenes::-webkit-scrollbar { display: none; }
.tour-scene {
  flex: none; display: grid; gap: 6px; width: 132px; padding: 6px 6px 8px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
  font-weight: 600; font-size: .92rem; line-height: 1.3; cursor: pointer;
  transition: border-color .3s, box-shadow .3s, transform .3s var(--ease-back);
}
.tour-scene img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 11px; background: var(--line); transition: transform .5s var(--ease); }
.tour-scene:hover { transform: translateY(-3px); border-color: var(--c1); }
.tour-scene:hover img { transform: scale(1.04); }
.tour-scene.is-active { border-color: var(--c1); box-shadow: 0 0 0 3px var(--glow); color: var(--c1); }

.pano {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 16 / 8; max-height: 78svh; width: 100%;
  border-radius: calc(var(--radius) + 6px);
  background: #0b0f19; color: #fff;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  box-shadow: 0 40px 70px -40px rgb(var(--shadow) / .8), 0 0 0 1px var(--line);
}
.pano.is-dragging { cursor: grabbing; }
.pano:focus-visible { outline-offset: 4px; }
.pano:fullscreen { aspect-ratio: auto; max-height: none; border-radius: 0; }
.pano-cube { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; transition: opacity .45s; }
/* แต่ละด้านกว้าง 1024px + ขอบ 1px รอบด้าน (ตรงกับ tools/make-cube.py) ห่างจากกล้อง 512px */
.pano-face { position: absolute; left: -513px; top: -513px; width: 1026px; height: 1026px; max-width: none; backface-visibility: hidden; -webkit-backface-visibility: hidden; pointer-events: none; }
.f-front { transform: translateZ(-512px); }
.f-right { transform: rotateY(-90deg) translateZ(-512px); }
.f-back { transform: rotateY(180deg) translateZ(-512px); }
.f-left { transform: rotateY(90deg) translateZ(-512px); }
.f-top { transform: rotateX(-90deg) translateZ(-512px); }
.f-bottom { transform: rotateX(90deg) translateZ(-512px); }
.pano.is-loading .pano-cube { opacity: 0; }
.pano-loading { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; pointer-events: none; }
.pano.is-loading .pano-loading { opacity: 1; visibility: visible; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--c2); animation: spin .8s linear infinite; }
.pano-hint {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 999px;
  background: rgba(0, 0, 0, .5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-weight: 600; pointer-events: none; transition: opacity .4s, scale .4s;
}
.pano-hint .icon { width: 28px; height: 28px; animation: swipeHint 2s ease-in-out infinite; }
@keyframes swipeHint { 0%, 100% { transform: translateX(-6px) rotate(-8deg); } 50% { transform: translateX(6px) rotate(8deg); } }
.pano.is-touched .pano-hint, .pano.is-loading .pano-hint { opacity: 0; scale: .9; }
.pano-badge, .pano-title {
  position: absolute; top: 14px; z-index: 2; margin: 0;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(0, 0, 0, .5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-weight: 600; pointer-events: none;
}
.pano-badge { left: 14px; font-family: var(--font-head); background: linear-gradient(135deg, var(--c2), var(--c1)); color: var(--on-c1); }
.pano-title { left: 84px; max-width: calc(100% - 100px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pano-tools { position: absolute; right: 14px; bottom: 14px; z-index: 2; display: flex; gap: 8px; }
.pano .round-btn { background: rgba(0, 0, 0, .5); border-color: rgba(255, 255, 255, .25); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pano .round-btn:hover { background: #fff; color: #000; border-color: #fff; }
.pano .round-btn[aria-pressed="true"] { background: var(--c1); border-color: var(--c1); color: var(--on-c1); }
.pano .round-btn[aria-pressed="true"] .icon { animation: spin 3s linear infinite; }
.pano-note { margin-top: 12px; text-align: center; color: var(--muted); font-size: .9rem; }

/* ----- สิ่งอำนวยความสะดวก ----- */
.amen-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.amen {
  padding: 26px 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .3s, box-shadow .4s, translate .4s var(--ease);
}
.amen:hover { border-color: color-mix(in srgb, var(--c1) 40%, var(--line)); box-shadow: 0 24px 40px -28px rgb(var(--shadow) / .7); translate: 0 -6px; }
.amen > * { position: relative; z-index: 2; }
.amen b { display: block; margin-top: 14px; font-family: var(--font-head); font-size: 1.1rem; }
.amen p { margin-top: 4px; color: var(--muted); font-size: .95rem; }
.amen-icon {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--c2), var(--c1)); color: var(--on-c1);
  box-shadow: 0 12px 24px -12px rgb(var(--shadow) / .8);
  transition: transform .5s var(--ease-back);
}
.amen-icon .icon { width: 26px; height: 26px; }
.amen:hover .amen-icon { transform: rotate(-8deg) scale(1.1); }

.marquee { margin-top: clamp(48px, 7vw, 80px); overflow: hidden; padding-block: 18px; background: linear-gradient(90deg, var(--c1), color-mix(in srgb, var(--c1) 60%, var(--c2))); color: var(--on-c1); rotate: -1.5deg; scale: 1.04; }
.marquee-track { display: flex; width: max-content; gap: 40px; animation: marquee 40s linear infinite; }
.marquee-track span { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-head); font-size: clamp(1.1rem, 2.4vw, 1.6rem); font-weight: 600; white-space: nowrap; }
.marquee-track .icon { color: var(--c2); }
[data-mode="dark"] .marquee-track .icon { color: var(--on-c1); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 20px)); } }

/* ----- อัลบั้มรูป ----- */
.filters { display: flex; justify-content: center; gap: 10px; margin-bottom: 32px; overflow-x: auto; scrollbar-width: none; padding: 4px; }
.filters::-webkit-scrollbar { display: none; }
.masonry { columns: 4 240px; column-gap: 16px; transition: opacity .25s, transform .25s; }
.masonry.is-leaving { opacity: 0; transform: translateY(12px); }
.shot {
  position: relative; display: block; width: 100%; margin: 0 0 16px; padding: 0;
  border: 0; border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in;
  background: var(--line);
  break-inside: avoid;
}
.shot:nth-child(3n+1) img { aspect-ratio: 4 / 5; }
.shot:nth-child(3n+2) img { aspect-ratio: 4 / 3; }
.shot:nth-child(3n) img { aspect-ratio: 1 / 1; }
.shot img { width: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .6s; }
.shot:hover img { transform: scale(1.08); filter: saturate(1.15); }
.shot-cap {
  position: absolute; inset: auto 0 0; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 40px 14px 12px; text-align: left; color: #fff; font-weight: 600;
  background: linear-gradient(transparent, rgba(0, 0, 0, .7));
  opacity: 0; translate: 0 10px; transition: opacity .4s, translate .4s var(--ease);
}
.shot:hover .shot-cap, .shot:focus-visible .shot-cap { opacity: 1; translate: 0 0; }
.masonry.is-entering .shot { animation: shotIn .7s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
@keyframes shotIn { from { opacity: 0; transform: translateY(24px) scale(.96); } }
@media (hover: none) { .shot-cap { opacity: 1; translate: 0 0; } }

/* ----- รีวิว ----- */
.reviews { background: var(--bg-alt); }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review {
  margin: 0; padding: 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 18px;
}
.review > * { position: relative; z-index: 2; }
.review::after { content: '“'; position: absolute; top: -6px; right: 22px; font-family: Georgia, serif; font-size: 7rem; line-height: 1; color: var(--c2); opacity: .25; }
.stars { display: flex; gap: 2px; color: var(--accent); }
.review blockquote { margin: 0; font-size: 1.05rem; flex: 1; }
.review figcaption { display: flex; align-items: center; gap: 12px; }
.review figcaption b { display: block; }
.review figcaption small { color: var(--muted); }
.avatar { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--c2), var(--c1)); color: var(--on-c1); font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }

/* ----- แผนที่ ----- */
.loc-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.loc-copy .eyebrow, .loc-copy .section-title { text-align: left; }
.address { display: flex; gap: 10px; margin-top: 20px; font-weight: 600; }
.address .icon { color: var(--c1); margin-top: 3px; }
.nearby-title { margin-top: 26px; font-size: 1.1rem; }
.nearby { list-style: none; padding: 0; margin: 12px 0 28px; display: grid; gap: 8px; }
.nearby li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); transition: border-color .3s, translate .3s var(--ease); }
.nearby li:hover { border-color: var(--c1); translate: 6px 0; }
.nearby span { display: flex; align-items: center; gap: 8px; }
.nearby .icon { color: var(--c1); }
.nearby b { color: var(--c1); white-space: nowrap; font-variant-numeric: tabular-nums; }
.map-wrap { position: relative; border-radius: calc(var(--radius) + 6px); padding: 6px; background: linear-gradient(135deg, var(--c2), var(--c1)); box-shadow: 0 40px 70px -40px rgb(var(--shadow) / .8); }
.map, .map-fallback { height: clamp(360px, 50vw, 520px); border-radius: var(--radius); overflow: hidden; background: var(--bg-alt); }
.map-fallback { display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 24px; }
.map-fallback > .icon { width: 48px; height: 48px; color: var(--c1); }
.leaflet-container { font-family: var(--font-body); }
[data-mode="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9); }
.map-pin { background: none; border: 0; }
.pin-body {
  position: absolute; left: 4px; top: 0; width: 44px; height: 44px; padding: 3px;
  border-radius: 50% 50% 50% 0; rotate: -45deg; background: var(--surface);
  box-shadow: 0 10px 20px -6px rgb(0 0 0 / .5);
  animation: pinDrop .9s var(--ease-back) both;
}
.pin-body svg { width: 100%; height: 100%; rotate: 45deg; }
.pin-pulse { position: absolute; left: 16px; bottom: 0; width: 20px; height: 8px; border-radius: 50%; background: var(--c1); animation: pinPulse 2s ease-out infinite; }
@keyframes pinDrop { from { opacity: 0; translate: 0 -60px; } }
@keyframes pinPulse { from { box-shadow: 0 0 0 0 var(--c1); opacity: .8; } to { box-shadow: 0 0 0 26px transparent; opacity: 0; } }
.map-popup { display: grid; gap: 4px; min-width: 180px; font-family: var(--font-body); }
.map-popup b { font-family: var(--font-head); font-size: 1rem; }
.map-popup a { color: var(--c1); font-weight: 600; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--text); }

/* ----- ติดต่อ ----- */
.contact-card {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(32px, 6vw, 64px);
  border-radius: calc(var(--radius) + 12px);
  background: linear-gradient(135deg, var(--c1), color-mix(in srgb, var(--c1) 55%, #000));
  color: #fff;
}
.contact-card .section-head { margin-bottom: 36px; }
.contact-card .eyebrow { color: var(--c2); }
.contact-card .lead { color: rgba(255, 255, 255, .85); }
/* โหมดมืด: สีหลักเป็นสีอ่อน จึงใช้พื้นเข้มอมสีธีมแทน ตัวหนังสือขาวเหมือนโหมดสว่าง */
[data-mode="dark"] .contact-card { background: linear-gradient(135deg, color-mix(in srgb, var(--p1) 70%, #0a0d14), color-mix(in srgb, var(--p1) 30%, #0a0d14)); }
.contact-glow { position: absolute; inset: -40%; z-index: -1; background: conic-gradient(from 0deg, transparent, var(--c2), transparent 30%, var(--accent), transparent 60%); opacity: .35; filter: blur(60px); animation: spin 18s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 880px; margin-inline: auto; }
.contact-btn {
  --brand: var(--c1);
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; border-radius: 18px;
  background: var(--surface); color: var(--text); text-decoration: none;
  box-shadow: 0 16px 30px -20px rgb(0 0 0 / .6);
  transition: transform .4s var(--ease-back), box-shadow .4s;
}
.contact-btn:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 26px 40px -20px rgb(0 0 0 / .6), 0 0 0 3px color-mix(in srgb, var(--brand) 50%, transparent); }
.js .contact-btn.reveal.is-visible:hover { transform: translateY(-5px) scale(1.02); transition-delay: 0ms; }
.c-icon { --line-ink: var(--brand); display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 16px; background: var(--brand); color: #fff; transition: transform .5s var(--ease-back); }
.c-icon .icon { width: 28px; height: 28px; }
.contact-btn:hover .c-icon { transform: rotate(-10deg) scale(1.08); }
.c-text { display: grid; flex: 1; min-width: 0; line-height: 1.4; }
.c-text b { font-family: var(--font-head); font-size: 1.1rem; }
.c-text small { color: var(--muted); overflow-wrap: anywhere; }
.c-arrow { color: var(--muted); transition: translate .3s var(--ease), color .3s; }
.contact-btn:hover .c-arrow { translate: 4px 0; color: var(--brand); }
.c-facebook { --brand: var(--brand-fb); }
.c-line { --brand: var(--brand-line); }
.c-tiktok { --brand: var(--brand-tt); }
.c-tiktok .c-icon { background: linear-gradient(135deg, #25f4ee, #111 45%, #111 55%, #fe2c55); }
[data-mode="dark"] .c-tiktok { --brand: #fe2c55; }
.c-phone { --brand: var(--c1); }
.c-phone .c-icon { color: var(--on-c1); }

/* ----- Footer ----- */
.site-footer { padding-block: 48px 110px; border-top: 1px solid var(--line); }
.footer-inner { display: grid; justify-items: center; gap: 20px; text-align: center; }
.footer-social { display: flex; gap: 10px; }
.footer-social .round-btn { --line-ink: var(--surface); }
.footer-copy { color: var(--muted); font-size: .95rem; }

/* ----- ปุ่มลอย ----- */
/* กล่องเมนูที่ซ่อนอยู่ทับปุ่มอื่นในหน้า (เช่น ลูกศรสไลด์) จึงให้กดทะลุได้ ยกเว้นตัวปุ่มและเมนูตอนเปิด */
.fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 90; display: grid; justify-items: end; gap: 10px; pointer-events: none; }
.fab-main, .fab.is-open .fab-item { pointer-events: auto; }
.fab-main {
  position: relative; display: grid; place-items: center; width: 60px; height: 60px; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background: linear-gradient(135deg, var(--c2), var(--c1)); color: var(--on-c1);
  box-shadow: 0 14px 30px -10px rgb(var(--shadow) / .8);
  transition: transform .4s var(--ease-back);
}
.fab-main::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; border: 2px solid var(--c2); animation: ring 2.4s ease-out infinite; }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }
.fab-main:hover { transform: scale(1.08); }
.fab-main .icon { position: absolute; width: 26px; height: 26px; transition: transform .4s var(--ease-back), opacity .3s; }
.fab-close { opacity: 0; transform: rotate(-90deg) scale(.5); }
.fab.is-open .fab-open { opacity: 0; transform: rotate(90deg) scale(.5); }
.fab.is-open .fab-close { opacity: 1; transform: none; }
.fab.is-open .fab-main::before { animation: none; opacity: 0; }
.fab-items { display: grid; justify-items: end; gap: 10px; }
.fab-item {
  --brand: var(--c1);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 6px; border-radius: 999px;
  background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600;
  box-shadow: 0 10px 24px -12px rgb(0 0 0 / .5);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.8); transform-origin: right center;
  transition: opacity .3s, visibility .3s, transform .45s var(--ease-back);
  transition-delay: calc(var(--i) * 40ms);
}
.fab-item .icon { --line-ink: var(--brand); width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--brand); color: #fff; order: 2; }
.fab-item span { order: 1; padding-left: 10px; }
.fab-item.c-phone .icon { color: var(--on-c1); }
.fab.is-open .fab-item { opacity: 1; visibility: visible; transform: none; }
.fab-item:hover { transform: translateX(-4px) !important; }
.to-top {
  position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 90;
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface); color: var(--c1); border: 1px solid var(--line);
  box-shadow: 0 10px 24px -14px rgb(0 0 0 / .5);
  opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: opacity .3s, visibility .3s, transform .4s var(--ease-back);
}
.to-top.is-shown { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-4px); }

/* ----- ดูรูปขนาดใหญ่ ----- */
.lightbox {
  position: fixed; inset: 0; z-index: 250;
  display: grid; grid-template-rows: auto 1fr auto; gap: 10px;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  background: rgba(5, 8, 15, .94); color: #fff;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .3s;
}
.lightbox.is-open { opacity: 1; }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding-inline: 4px; }
.lb-count { font-family: var(--font-head); font-variant-numeric: tabular-nums; opacity: .8; }
.lightbox .round-btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #fff; }
.lightbox .round-btn:hover { background: #fff; color: #000; }
.lb-stage { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 0; }
.lb-figure { margin: 0; display: grid; justify-items: center; gap: 12px; min-height: 0; height: 100%; align-content: center; }
.lb-img { max-width: 100%; max-height: calc(100svh - 230px); border-radius: 12px; object-fit: contain; box-shadow: 0 30px 60px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .5s, transform .6s var(--ease); }
.lb-img.from-r { transform: translateX(40px) scale(.97); }
.lb-img.from-l { transform: translateX(-40px) scale(.97); }
.lb-img.is-in { opacity: 1; transform: none; }
.lb-caption { text-align: center; font-weight: 600; }
.lb-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px; justify-content: safe center; }
.lb-thumbs::-webkit-scrollbar { display: none; }
.lb-thumb { flex: none; width: 72px; height: 52px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; opacity: .5; background: #222; transition: opacity .3s, border-color .3s, transform .3s; }
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumb:hover { opacity: .85; }
.lb-thumb.is-active { opacity: 1; border-color: var(--c2); transform: translateY(-3px); }

/* ----- จอกลาง ----- */
@media (max-width: 1100px) {
  .room-grid, .review-grid { grid-template-columns: repeat(2, 1fr); }
  .amen-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ----- เมนูมือถือ ----- */
/* เมนูแบบพับ (เมนู 6 รายการ + ปุ่มภาษา/โหมด/ตั้งค่า ไม่พอที่จอกลาง) */
@media (max-width: 1180px) {
  .menu-toggle { display: inline-grid; }
  .main-nav {
    position: fixed; inset: 0 0 auto; z-index: -1;
    flex-direction: column; gap: 4px;
    padding: calc(var(--header-h) + 12px) var(--gutter) 24px;
    background: var(--surface); color: var(--text);
    box-shadow: 0 30px 60px -20px rgb(0 0 0 / .4);
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path .5s var(--ease), visibility .5s;
  }
  .main-nav a { padding: 14px 16px; font-size: 1.1rem; border-radius: 14px; opacity: 0; transform: translateY(-10px); transition: opacity .4s, transform .4s var(--ease), background-color .3s; }
  .main-nav a::after { display: none; }
  .main-nav a.is-current, .main-nav a:hover { background: var(--bg-alt); color: var(--c1); }
  .menu-open .main-nav { clip-path: inset(0 0 0 0); visibility: visible; }
  .menu-open .main-nav a { opacity: 1; transform: none; }
  .menu-open .main-nav a:nth-child(2) { transition-delay: 40ms; }
  .menu-open .main-nav a:nth-child(3) { transition-delay: 80ms; }
  .menu-open .main-nav a:nth-child(4) { transition-delay: 120ms; }
  .menu-open .main-nav a:nth-child(5) { transition-delay: 160ms; }
  .menu-open .main-nav a:nth-child(6) { transition-delay: 200ms; }
  .menu-open .site-header { color: var(--text) !important; }
  .menu-open .site-header .icon-btn, .menu-open .site-header .lang-switch { background: var(--surface) !important; border-color: var(--line) !important; color: var(--text) !important; }
}

@media (max-width: 960px) {
  .about-grid, .loc-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 560px; width: 100%; margin-inline: auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ----- จอเล็ก ----- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .pano { aspect-ratio: 4 / 4.2; max-height: 70svh; }
  .tour-scenes { justify-content: flex-start; }
  .tour-scene { width: 112px; font-size: .85rem; }
  /* ปุ่มลอยมุมขวาล่างจะทับเครื่องมือ จึงย้ายเครื่องมือขึ้นด้านบน */
  .pano-title { left: 14px; top: auto; bottom: 14px; max-width: calc(100% - 28px); }
  .pano-tools { gap: 6px; top: 14px; bottom: auto; }
  .pano-tools .round-btn { width: 40px; height: 40px; }
  .room-grid, .review-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-controls { margin-top: 28px; }
  .hero-count { display: none; }
  .hero-actions .btn { flex: 1 1 200px; }
  .scroll-cue { display: none; }
  .masonry { columns: 2; column-gap: 10px; }
  .shot { margin-bottom: 10px; }
  .lb-stage { grid-template-columns: 1fr; }
  .lb-prev, .lb-next { position: absolute; z-index: 2; top: 50%; translate: 0 -50%; background: rgba(0, 0, 0, .55) !important; }
  .lb-prev { left: 0; }
  .lb-next { right: 0; }
  .filters { justify-content: flex-start; }
}
@media (max-width: 480px) {
  :root { --header-h: 64px; }
  .header-inner { gap: 8px; }
  .header-tools { gap: 6px; }
  .logo { font-size: 1.1rem; gap: 8px; }
  .logo-svg { width: 34px; height: 34px; }
  .lang-switch button { min-width: 32px; padding: 0 6px; font-size: .78rem; }
  .icon-btn { width: 40px; height: 40px; }
  .amen-grid { gap: 10px; }
  .amen { padding: 18px 14px; }
  .amen-icon { width: 46px; height: 46px; }
  .stat { padding: 18px 10px; }
  .hero-dot { width: 30px; }
  .contact-btn { padding: 14px; gap: 12px; }
  .c-icon { width: 46px; height: 46px; }
}
@media (max-width: 370px) {
  .logo-text { display: none; }
  .amen-grid { grid-template-columns: 1fr; }
}

/* ----- ปิดเอฟเฟกต์เมื่อผู้ใช้ตั้งลดการเคลื่อนไหว ----- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .js .reveal, .js .hero-title .w, .js .hero-eyebrow, .js .hero-actions, .js .hero-controls { opacity: 1 !important; transform: none !important; filter: none !important; }
  .slide.is-active img { animation: none; transform: none; }
  .marquee-track { animation: none; }
  .hero-slides { translate: none; }
}

/* ================================================================
   เอฟเฟกต์ที่ผู้เข้าชมปิดในหน้าตั้งค่า (prefs.js ใส่ class fx-off-<ชื่อ> ที่ <html>)
   ================================================================ */
.fx-off-preloader .preloader, .is-preview .preloader { display: none; }
.is-preview .fab, .is-preview .to-top { display: none; }
.fx-off-autoplay .hero-dot.is-active span { animation: none; transform: scaleX(1); }
.fx-off-kenburns .slide img, .fx-off-kenburns .slide.is-active img { animation: none; transform: none; }
.fx-off-text .hero-title .w, .fx-off-text .hero-text strong .w, .fx-off-text .hero-text .sub,
.fx-off-text .hero-eyebrow, .fx-off-text .hero-actions, .fx-off-text .hero-controls {
  opacity: 1 !important; transform: none !important; filter: none !important; animation: none !important;
}
.fx-off-reveal .reveal { transition-duration: 0s; transition-delay: 0s; }
.fx-off-reveal .masonry.is-entering .shot { animation: none; }
.fx-off-pointer .spot::before { display: none; }
.fx-off-parallax .hero-slides, .fx-off-parallax .blob { translate: none; }
.fx-off-marquee .marquee-track { animation: none; }
.fx-off-float .float, .fx-off-float .room-tag, .fx-off-float .dot, .fx-off-float .fab-main::before,
.fx-off-float .room-360 > .icon:first-child, .fx-off-float .pano-hint .icon, .fx-off-float .scroll-cue span,
.fx-off-float .contact-glow, .fx-off-float .preloader-mark { animation: none; }
.fx-off-float .fab-main::before { opacity: 0; }

/* ================================================================
   รูปแบบหน้าเว็บ (เลือกในหน้าตั้งค่า) ค่าเริ่มต้น "grand" คือสไตล์ด้านบนทั้งหมด
   ================================================================ */

/* ----- มินิมอล: หัวเว็บแบ่งครึ่ง โทนเรียบ ห้องเรียงเป็นรายการ ----- */
[data-layout="minimal"] .hero {
  color: var(--text); background: var(--bg);
  align-content: center; min-height: max(560px, 92svh);
  padding-block: calc(var(--header-h) + 32px) 72px;
}
[data-layout="minimal"] .hero-slides {
  inset: calc(var(--header-h) + 24px) max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter))) 72px calc(50% + 16px);
  border-radius: 28px; overflow: hidden; translate: none;
  box-shadow: 0 40px 70px -40px rgb(var(--shadow) / .8);
}
[data-layout="minimal"] .hero-shade { display: none; }
[data-layout="minimal"] .hero-content, [data-layout="minimal"] .hero-controls { padding-right: calc(50% + 24px); }
[data-layout="minimal"] .hero-title { font-size: clamp(2.6rem, 6vw, 5rem); text-shadow: none; }
[data-layout="minimal"] .hero .eyebrow { color: var(--c1); background: var(--bg-alt); border-color: var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
[data-layout="minimal"] .hero .btn-glass { --line-ink: var(--surface); background: var(--surface); color: var(--text); border-color: var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
[data-layout="minimal"] .hero .btn-glass:hover { border-color: var(--c1); color: var(--c1); }
[data-layout="minimal"] .hero-dot::before { background: var(--line); }
[data-layout="minimal"] .hero-dot span { background: var(--c1); }
[data-layout="minimal"] .hero .round-btn { background: var(--surface); color: var(--text); border-color: var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
[data-layout="minimal"] .hero .round-btn:hover { background: var(--c1); color: var(--on-c1); border-color: var(--c1); }
[data-layout="minimal"] .scroll-cue { display: none; }
[data-layout="minimal"] .site-header.on-hero:not(.is-scrolled) { color: var(--text); }
[data-layout="minimal"] .site-header.on-hero:not(.is-scrolled) .icon-btn,
[data-layout="minimal"] .site-header.on-hero:not(.is-scrolled) .lang-switch { background: var(--surface); border-color: var(--line); color: var(--text); }
[data-layout="minimal"] .stats-band { margin-top: 0; }
[data-layout="minimal"] .stats-grid { box-shadow: none; border: 1px solid var(--line); }
[data-layout="minimal"] .section-title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
[data-layout="minimal"] .about-img-1 { inset: 0; }
[data-layout="minimal"] .about-img-2 { display: none; }
[data-layout="minimal"] .about-media { aspect-ratio: 4 / 3.4; }
[data-layout="minimal"] .room-grid { grid-template-columns: 1fr; gap: 16px; }
[data-layout="minimal"] .room { flex-direction: row; box-shadow: none; }
[data-layout="minimal"] .room-media { flex: 0 0 38%; aspect-ratio: auto; min-height: 280px; }
/* รูปเต็มกรอบเสมอ ไม่ให้รูปแนวตั้งยืดการ์ด */
[data-layout="minimal"] .room-media img { position: absolute; inset: 0; }
[data-layout="minimal"] .amen { background: transparent; border-color: transparent; }
[data-layout="minimal"] .amen-icon { background: color-mix(in srgb, var(--c2) 20%, var(--surface)); color: var(--c1); box-shadow: none; }
[data-layout="minimal"] .marquee { display: none; }
[data-layout="minimal"] .masonry { columns: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
[data-layout="minimal"] .shot { margin: 0; }
[data-layout="minimal"] .shot img { aspect-ratio: 1 / 1; height: 100%; }
[data-layout="minimal"] .review { background: var(--surface); border-color: transparent; }
[data-layout="minimal"] .contact-card { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
[data-layout="minimal"] .contact-card .eyebrow { color: var(--c1); }
[data-layout="minimal"] .contact-card .lead { color: var(--muted); }
[data-layout="minimal"] .contact-glow { display: none; }
[data-layout="minimal"] .contact-btn { background: var(--bg-alt); box-shadow: none; }

/* ----- แมกกาซีน: ตัวอักษรใหญ่แบบนิตยสาร หัวข้อมีเลขลำดับ ห้องเรียงสลับซ้ายขวา ----- */
[data-layout="magazine"] { --font-head: 'Noto Serif Thai', 'Songti SC', Georgia, serif; }
[data-layout="magazine"]:lang(zh-CN) { --font-head: 'Songti SC', 'STSong', 'SimSun', serif; }
[data-layout="magazine"] .hero { align-content: center; text-align: center; }
[data-layout="magazine"] .hero-content { display: grid; justify-items: center; }
[data-layout="magazine"] .hero-shade { background: radial-gradient(ellipse at center, rgba(5, 8, 15, .25), rgba(5, 8, 15, .7) 75%); }
[data-layout="magazine"] .hero .eyebrow { background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; letter-spacing: .32em; }
[data-layout="magazine"] .hero-title { font-weight: 500; font-size: clamp(3.2rem, 12vw, 9rem); letter-spacing: -.01em; }
[data-layout="magazine"] .hero-text { margin-inline: auto; }
[data-layout="magazine"] .hero-text strong { font-weight: 500; font-style: italic; }
[data-layout="magazine"] .hero-actions { justify-content: center; }
[data-layout="magazine"] .hero-controls { justify-content: center; gap: 28px; }
[data-layout="magazine"] .stats-band { margin-top: 0; padding-block: 44px; border-bottom: 1px solid var(--line); }
[data-layout="magazine"] .stats-grid { background: none; box-shadow: none; border-radius: 0; gap: 0; }
[data-layout="magazine"] .stat { background: none; border-left: 1px solid var(--line); }
[data-layout="magazine"] .stat:first-child { border-left: 0; }
[data-layout="magazine"] .stat b { font-weight: 500; }
[data-layout="magazine"] main { counter-reset: sec; }
[data-layout="magazine"] .section-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(16px, 3vw, 32px);
  max-width: none; margin-inline: 0; padding-top: 18px; text-align: left;
  border-top: 1px solid var(--text);
}
[data-layout="magazine"] .section-head::before {
  counter-increment: sec; content: counter(sec, decimal-leading-zero);
  grid-row: span 3; font-family: var(--font-head); font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1; color: var(--c1);
}
[data-layout="magazine"] .section-head .eyebrow { justify-content: flex-start; }
[data-layout="magazine"] .section-title { font-weight: 500; font-size: clamp(2rem, 5vw, 3.6rem); }
[data-layout="magazine"] .contact-card .section-head { border-top-color: rgba(255, 255, 255, .35); }
[data-layout="magazine"] .contact-card .section-head::before { color: var(--c2); }
[data-layout="magazine"] .room-grid { grid-template-columns: 1fr; gap: clamp(40px, 6vw, 80px); }
[data-layout="magazine"] .room {
  flex-direction: row; align-items: center; gap: clamp(24px, 4vw, 56px);
  background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible;
}
[data-layout="magazine"] .room:nth-child(even) { flex-direction: row-reverse; }
[data-layout="magazine"] .room:hover, [data-layout="magazine"].js .reveal.room.is-visible:hover { box-shadow: none; transform: none; }
[data-layout="magazine"] .room.spot::before { display: none; }
[data-layout="magazine"] .room-media { flex: 0 0 58%; aspect-ratio: 4 / 3; border-radius: var(--radius); box-shadow: 0 40px 70px -40px rgb(var(--shadow) / .8); }
[data-layout="magazine"] .room-body { padding: 0; }
[data-layout="magazine"] .room-body h3 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 500; }
[data-layout="magazine"] .room-foot { border-top: 1px solid var(--text); }
[data-layout="magazine"] .amen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
[data-layout="magazine"] .amen {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; align-items: center;
  padding: 20px 0; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
}
[data-layout="magazine"] .amen:hover { box-shadow: none; translate: none; }
[data-layout="magazine"] .amen-icon { grid-row: span 2; }
[data-layout="magazine"] .amen b { margin-top: 0; }
[data-layout="magazine"] .amen p { margin-top: 0; }
[data-layout="magazine"] .masonry { columns: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 200px; grid-auto-flow: dense; gap: 14px; }
[data-layout="magazine"] .shot { margin: 0; height: 100%; }
[data-layout="magazine"] .shot img { height: 100%; aspect-ratio: auto; }
[data-layout="magazine"] .shot:nth-child(6n+1) { grid-column: span 2; grid-row: span 2; }
[data-layout="magazine"] .shot:nth-child(6n+4) { grid-column: span 2; }
[data-layout="magazine"] .review { background: none; border: 0; border-top: 2px solid var(--c1); border-radius: 0; padding: 24px 0 0; }
[data-layout="magazine"] .review blockquote { font-family: var(--font-head); font-size: 1.2rem; }
[data-layout="magazine"] .contact-card { border-radius: 0; }

/* รูปแบบบนจอกลาง/เล็ก */
@media (max-width: 960px) {
  [data-layout="minimal"] .hero { align-content: start; min-height: 0; padding-top: calc(var(--header-h) + 40svh + 32px); }
  [data-layout="minimal"] .hero-slides { inset: calc(var(--header-h) + 12px) var(--gutter) auto; height: 40svh; border-radius: 22px; }
  [data-layout="minimal"] .hero-content, [data-layout="minimal"] .hero-controls { padding-right: var(--gutter); }
}
@media (max-width: 720px) {
  [data-layout="minimal"] .room, [data-layout="magazine"] .room, [data-layout="magazine"] .room:nth-child(even) { flex-direction: column; align-items: stretch; }
  [data-layout="minimal"] .room-media { flex: none; aspect-ratio: 4 / 3; min-height: 0; }
  [data-layout="magazine"] .room-media { flex: none; }
  [data-layout="minimal"] .masonry { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  [data-layout="magazine"] .amen-grid { grid-template-columns: 1fr; }
  [data-layout="magazine"] .masonry { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 130px; gap: 8px; }
  [data-layout="magazine"] .stat { border-left: 0; }
}

/* ================================================================
   ร้านอาหาร: ป้ายเปิด/ปิด, เวลาเปิด, แท็บเมนู, ความเผ็ด/มังสวิรัติ
   ================================================================ */
[data-open-badge] .dot { background: #22c55e; box-shadow: 0 0 0 0 #22c55e; }
[data-open-badge].is-closed .dot { background: #ef4444; animation: none; }
.hours {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px;
  margin-top: 28px; text-align: center; font-weight: 600;
}
.hours .icon { opacity: .85; }
.hours-sep { opacity: .5; }
.menu-tabs { margin-bottom: 28px; }
.menu-tabs .chip { display: inline-flex; align-items: center; gap: 6px; }
.menu-tabs .chip .icon { width: 1em; height: 1em; color: var(--accent); }
.menu-tabs .chip.is-active .icon { color: inherit; }
.room-grid { transition: opacity .22s, transform .22s; }
.room-grid.is-switching { opacity: 0; transform: translateY(10px); }
.dish .room-meta li { font-weight: 600; }
.dish .spicy .icon { color: #dc2626; width: 1.05em; height: 1.05em; margin-right: -4px; }
.dish .spicy .icon:last-of-type { margin-right: 2px; }
.dish .spicy-0 .icon, .dish .veg .icon { color: #16a34a; margin-right: 2px; }
[data-mode="dark"] .dish .spicy .icon { color: #f87171; }
[data-mode="dark"] .dish .spicy-0 .icon, [data-mode="dark"] .dish .veg .icon { color: #4ade80; }
.dish .btn .icon { --line-ink: var(--c1); }
.dish .room-foot .price b { font-size: 1.6rem; }
[data-layout="minimal"] .dish .room-media { flex-basis: 32%; min-height: 220px; }
@media (max-width: 720px) {
  [data-layout="minimal"] .dish .room-media { min-height: 0; }
}
