/* =========================================================================
   Jingjai Booking — หน้าตาแบบเว็บจองที่พักออนไลน์
   ฟ้าเข้ม #2067da (ลิงก์/คะแนน) · ปุ่ม #5392f9 · ราคาแดง · ป้ายเขียว · พื้นเทาอ่อน การ์ดขาวมุมเล็ก
   ========================================================================= */
:root {
  --blue: #2067da; --blue-d: #1a55b8; --btn: #5392f9; --btn-h: #3f80ec; --blue-l: #eef4ff; --navy: #2a2a2e;
  --ink: #2a2a2e; --muted: #737373; --line: #dddfe2; --bg: #f8f7f9; --card: #fff;
  --red: #e12d2d; --green: #32a923; --green-d: #1f7a15; --green-l: #ebf7e9; --amber: #b95f00; --amber-l: #fff4e5; --star: #ffa726;
  --r: 4px; --r-lg: 8px; --shadow: 0 1px 2px rgba(0, 0, 0, .08); --shadow-h: 0 4px 16px rgba(0, 0, 0, .16);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: "Noto Sans Thai", Thonburi, Tahoma, system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.5; overflow-x: hidden; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.3; color: var(--ink); }
p { margin: 0; }
.i { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.i.lg { width: 30px; height: 30px; }
.wrap { max-width: 1124px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.mt { margin-top: 16px; }
.mt-s { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.red { color: var(--red); }
.green { color: var(--green-d); }

/* ---------- หัวเว็บ (ขาว สูง 60) */
.top { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); position: sticky; top: 0; z-index: 40; }
.top-in { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none !important; min-width: 0; }
.brand b { display: block; font-size: 16px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { display: block; font-size: 11px; color: var(--muted); }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: var(--blue); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.brand-mark .i { width: 19px; height: 19px; }
.top-nav { display: flex; gap: 2px; flex: 1; }
.top-nav a { color: var(--ink); font-size: 14px; padding: 8px 10px; border-radius: var(--r); }
.top-nav a:hover { background: var(--bg); text-decoration: none; color: var(--blue); }
.top-right { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.top-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--blue); border-radius: 999px; padding: 6px 14px; font-weight: 600; color: var(--blue); background: #fff; font-size: 13.5px; white-space: nowrap; }
.top-btn:hover { background: var(--blue-l); text-decoration: none; }
.top-link { color: var(--blue); font-weight: 600; font-size: 13.5px; padding: 6px 4px; white-space: nowrap; }

/* ---------- ปุ่ม / ฟอร์ม */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: var(--r); padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; background: var(--btn); color: #fff; text-decoration: none !important; transition: background .15s; line-height: 1.3; }
.btn:hover { background: var(--btn-h); }
.btn-lg { padding: 13px 26px; font-size: 16px; }
.btn-pill { border-radius: 999px; }
.btn-block { width: 100%; }
.btn-line { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn-line:hover { background: var(--blue-l); }
.btn-gray { background: #f0f0f0; color: var(--ink); }
.btn-gray:hover { background: #e4e4e4; }
.btn-red { background: #fff; color: var(--red); border: 1px solid #f3b8b8; }
.btn-red:hover { background: #fff2f2; }
.btn-green { background: var(--green); }
.btn-green:hover { background: var(--green-d); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label.f { display: block; }
.f > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.inp, select.inp, textarea.inp { width: 100%; font: inherit; font-size: 15px; border: 1px solid #b8bcc3; border-radius: var(--r); padding: 9px 11px; background: #fff; color: var(--ink); }
.inp:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(32, 103, 218, .2); }
textarea.inp { min-height: 84px; resize: vertical; }
.hint { font-size: 12px; color: var(--muted); margin-top: 3px; display: block; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack > * + * { margin-top: 12px; }
.note { border-radius: var(--r); padding: 10px 14px; margin: 12px 0; font-weight: 500; border: 1px solid transparent; }
.note-ok { background: var(--green-l); color: var(--green-d); border-color: #cfe9ca; }
.note-err { background: #fff2f2; color: #b01c1c; border-color: #f5c6c6; }
.note-info { background: var(--blue-l); color: var(--blue-d); border-color: #d3e2fb; }
.note-warn { background: var(--amber-l); color: var(--amber); border-color: #f6dcb6; }

/* ---------- Hero + แถบค้นหาแบบช่องต่อกัน */
.hero { position: relative; color: #fff; background: #1d3f7a linear-gradient(120deg, #173a77, #2067da); background-size: cover; background-position: center; padding: 64px 0 74px; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .2) 60%, rgba(0, 0, 0, .35)); }
.hero .wrap { position: relative; text-align: center; }
.hero h1 { color: #fff; font-size: clamp(22px, 3.4vw, 32px); font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.hero p { font-size: 15px; margin-top: 4px; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.search-bar { display: flex; margin: 22px auto 0; max-width: 980px; background: #fff; border-radius: var(--r-lg); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); padding: 6px; gap: 6px; text-align: left; }
.sfield { flex: 1; border: 1px solid #dddfe2; border-radius: var(--r); padding: 6px 12px; display: flex; gap: 10px; align-items: center; background: #fff; min-width: 0; color: var(--ink); cursor: text; }
.sfield:hover { border-color: #a9b2c0; }
.sfield:focus-within { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(32, 103, 218, .2); }
.sfield .i { color: var(--muted); width: 22px; height: 22px; }
.sfield small { display: block; font-size: 11.5px; color: var(--muted); }
.sfield input, .sfield select { border: 0; padding: 0; font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); width: 100%; background: transparent; outline: none; }
.search-bar .btn { border-radius: var(--r); padding: 0 34px; font-size: 16px; }
.trust { display: flex; gap: 8px 20px; flex-wrap: wrap; justify-content: center; margin-top: 14px; font-size: 13px; }
.trust span { display: inline-flex; align-items: center; gap: 5px; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }

/* ---------- คะแนนรีวิว */
.score-badge { display: inline-grid; place-items: center; min-width: 40px; height: 36px; padding: 0 6px; border-radius: 8px 8px 8px 0; background: var(--blue); color: #fff; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.score-badge.big { min-width: 60px; height: 54px; font-size: 24px; border-radius: 12px 12px 12px 0; }
.score-line { display: flex; align-items: center; gap: 8px; justify-content: flex-end; text-align: right; }
.score-line b { color: var(--blue); font-size: 16px; display: block; line-height: 1.2; }
.score-line span { color: var(--muted); font-size: 12px; }
.score-line .score-badge { color: #fff; font-size: 16px; }
.score-text { color: var(--blue); font-weight: 700; }
.bars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 28px; }
.bar { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 13px; }
.bar i { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: #e6e8eb; overflow: hidden; display: block; }
.bar i::before { content: ""; display: block; height: 100%; width: var(--w); background: var(--blue); border-radius: 3px; }
.bar b { color: var(--blue); }

/* ---------- หน้าผลค้นหา */
.section { padding: 22px 0; }
.crumbs { font-size: 13px; color: var(--muted); padding: 14px 0 6px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sec-head h2 { font-size: 20px; font-weight: 700; }
.results { display: grid; grid-template-columns: 250px 1fr; gap: 16px; align-items: start; }
.filters-d > summary { display: none; list-style: none; }
.filters-d > summary::-webkit-details-marker { display: none; }
.side { position: sticky; top: 76px; }
.map-thumb { display: grid; place-items: center; height: 92px; border-radius: var(--r); margin-bottom: 12px; background: #dfe8f5 repeating-linear-gradient(45deg, #e8eef8 0 10px, #dfe8f5 10px 20px); border: 1px solid var(--line); color: var(--blue); font-weight: 700; text-decoration: none !important; }
.map-thumb span { background: #fff; border: 1px solid var(--blue); border-radius: 999px; padding: 5px 14px; display: inline-flex; gap: 6px; align-items: center; }
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.filters h3 { font-size: 14px; font-weight: 700; padding: 12px 14px 4px; border-top: 1px solid var(--line); }
.filters h3:first-of-type { border-top: 0; }
.filters .grp { padding: 0 14px 10px; }
.chk { display: flex; align-items: center; gap: 9px; padding: 4px 0; cursor: pointer; font-size: 14px; }
.chk input { width: 17px; height: 17px; accent-color: var(--blue); flex-shrink: 0; }
.chk .c { margin-left: auto; color: var(--muted); font-size: 12px; }
.sortbar { display: flex; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; overflow: hidden; }
.sortbar > span { padding: 0 14px; font-weight: 700; white-space: nowrap; }
.sortbar a { flex: 1; text-align: center; padding: 11px 8px; color: var(--ink); border-left: 1px solid var(--line); font-size: 14px; }
.sortbar a.on { background: var(--blue); color: #fff; font-weight: 600; }
.sortbar a:hover { text-decoration: none; }
.sortbar a:not(.on):hover { background: var(--blue-l); }
.result-count { font-size: 13px; color: var(--muted); margin-bottom: 8px; }

.hcard { display: grid; grid-template-columns: 236px 1fr 200px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; transition: box-shadow .2s; color: inherit; position: relative; }
.hcard:hover { box-shadow: var(--shadow-h); text-decoration: none; }
.hcard-media { padding: 8px; display: grid; gap: 4px; align-content: start; }
.hcard-img { position: relative; background: #e9edf2; aspect-ratio: 4/3; border-radius: 2px; overflow: hidden; }
.hcard-img img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.thumbs span { position: relative; aspect-ratio: 1; background: #e9edf2; border-radius: 2px; overflow: hidden; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .all { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 600; text-align: center; line-height: 1.2; }
.promo { position: absolute; left: 0; top: 10px; background: var(--red); color: #fff; font-weight: 700; font-size: 12px; padding: 2px 9px 2px 7px; border-radius: 0 3px 3px 0; }
.noimg { position: absolute; inset: 0; display: grid; place-items: center; color: #a3adbd; }
.noimg .i { width: 44px; height: 44px; }
.hcard-body { padding: 12px 14px; min-width: 0; }
.hcard-body h3 { font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.hcard:hover h3 { color: var(--blue); }
.type-tag { display: inline-block; font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 0 6px; margin: 4px 0 2px; }
.loc { display: flex; align-items: center; gap: 4px; color: var(--blue); font-size: 13px; margin: 3px 0 8px; }
.loc .i { width: 15px; height: 15px; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; margin-bottom: 8px; }
.facts span { display: inline-flex; align-items: center; gap: 4px; }
.facts .i { color: var(--muted); width: 15px; height: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 3px; padding: 1px 7px; font-size: 12px; color: var(--ink); background: #fff; }
.chip .i { width: 14px; height: 14px; color: var(--muted); }
.quote { margin-top: 8px; font-size: 13px; color: #555; font-style: italic; }
.urgent { margin-top: 6px; color: var(--red); font-size: 12.5px; font-weight: 600; display: flex; gap: 4px; align-items: center; }
.urgent .i { width: 15px; height: 15px; }
.hcard-price { padding: 12px 14px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; text-align: right; gap: 10px; border-left: 1px dashed var(--line); }
.price-box { display: grid; gap: 1px; justify-items: end; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.price-lbl { font-size: 12px; color: var(--muted); }
.price { color: var(--red); font-size: 22px; font-weight: 700; line-height: 1.2; }
.price small { font-size: 12px; color: var(--muted); font-weight: 400; }
.perk { color: var(--green-d); font-size: 12.5px; font-weight: 600; display: flex; gap: 4px; align-items: center; }
.perk .i { width: 15px; height: 15px; }
.avail { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 12.5px; }
.avail .i { width: 15px; height: 15px; }
.avail.ok { color: var(--green-d); }
.avail.hot { color: var(--red); }
.avail.none { color: var(--muted); }

/* ---------- หน้าห้อง (แบบหน้าที่พัก) */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 180px 180px; gap: 4px; border-radius: var(--r-lg); overflow: hidden; }
.gallery a { position: relative; background: #e9edf2; display: block; overflow: hidden; }
.gallery a:first-child { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.03); }
.gallery .more { position: absolute; right: 10px; bottom: 10px; background: #fff; color: var(--ink); border-radius: var(--r); font-weight: 600; font-size: 13px; padding: 5px 10px; display: inline-flex; gap: 6px; align-items: center; box-shadow: var(--shadow); }
.gallery.n1 { grid-template-columns: 1fr; grid-template-rows: 360px; }
.gallery.n2 { grid-template-columns: 1fr 1fr; grid-template-rows: 360px; }
.gallery.n2 a:first-child { grid-row: auto; }
.gallery.n3 { grid-template-columns: 2fr 1fr; }
.gallery.n4 { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(3, 118px); }
.gallery.n4 a:first-child { grid-row: span 3; }
.tabs-sticky { position: sticky; top: 60px; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); margin: 14px 0 0; }
.tabs-sticky .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs-sticky a { padding: 12px 14px; font-weight: 600; color: var(--ink); white-space: nowrap; border-bottom: 3px solid transparent; font-size: 14px; }
.tabs-sticky a:hover, .tabs-sticky a.on { color: var(--blue); border-bottom-color: var(--blue); text-decoration: none; }
.prop-top { display: grid; grid-template-columns: 1fr 320px; gap: 16px; margin-top: 16px; align-items: start; }
.prop-top > .card { margin-top: 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; scroll-margin-top: 120px; }
.card + .card { margin-top: 12px; }
.card h2 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.title-line { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.title-line h1 { font-size: 24px; font-weight: 700; }
.hl { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.hl span { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
.hl .i { width: 24px; height: 24px; color: var(--blue); }
.side-score { display: flex; gap: 10px; align-items: center; }
.side-score b { display: block; font-size: 17px; color: var(--blue); }
.side-quote { background: var(--bg); border-radius: var(--r); padding: 10px 12px; font-size: 13px; margin-top: 12px; font-style: italic; color: #555; }
.amen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 16px; }
.amen { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.amen .i { width: 22px; height: 22px; color: var(--ink); }
.prose { white-space: pre-line; }
.ul-check { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.ul-check li { display: flex; gap: 8px; align-items: flex-start; }
.ul-check .i { color: var(--green); margin-top: 2px; }
.map { width: 100%; height: 300px; border: 0; border-radius: var(--r); }

/* ตารางเลือกห้องพัก */
.rtable { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.rt-head, .rt-row { display: grid; grid-template-columns: 1.3fr 1.2fr 0.9fr 1fr; }
.rt-head { background: #2c3e5c; color: #fff; font-size: 13px; font-weight: 600; }
.rt-head > div { padding: 10px 14px; }
.rt-row { border-top: 1px solid var(--line); }
.rt-row > div { padding: 14px; border-left: 1px solid var(--line); }
.rt-row > div:first-child { border-left: 0; }
.rt-row.is-current { background: #fbfcff; }
.rt-room img, .rt-room .ph { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 2px; background: #e9edf2; margin-bottom: 8px; display: block; }
.rt-room b { font-size: 15px; color: var(--blue); }
.rt-get { display: grid; gap: 6px; font-size: 13px; align-content: start; }
.rt-get span { display: flex; gap: 6px; align-items: flex-start; color: var(--green-d); }
.rt-get span.n { color: var(--ink); }
.rt-get .i { width: 16px; height: 16px; margin-top: 2px; }
.rt-price { text-align: right; }
.rt-pick { display: grid; gap: 8px; align-content: start; }
.rt-pick .inp { padding: 7px 9px; font-size: 14px; }

/* รีวิว */
.rv-sum { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.rv-big { display: flex; gap: 12px; align-items: center; }
.rv-big b { display: block; font-size: 20px; color: var(--blue); }
.rv-tools { display: flex; gap: 8px; align-items: center; margin: 14px 0 4px; flex-wrap: wrap; }
.rv-tools a { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; color: var(--ink); font-size: 13px; }
.rv-tools a.on { border-color: var(--blue); color: var(--blue); background: var(--blue-l); font-weight: 600; }
.rv-tools a:hover { text-decoration: none; }
.review { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.review:first-of-type { border-top: 0; }
.rv-who b { display: block; font-size: 14.5px; }
.rv-who p { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 5px; align-items: center; }
.rv-who .i { width: 14px; height: 14px; }
.verified { display: inline-flex; gap: 4px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--green-d); font-weight: 600; }
.rv-head { display: flex; gap: 10px; align-items: center; }
.rv-head b { font-size: 16px; }
.rv-body p { margin-top: 8px; font-size: 14px; }
.rv-body .pc { display: flex; gap: 6px; }
.rv-date { font-size: 12px; color: var(--muted); margin-top: 8px; }
.rv-reply { margin-top: 12px; background: var(--bg); border: 1px solid var(--line); padding: 10px 12px; border-radius: var(--r); font-size: 13.5px; }
.rv-reply b { display: block; font-size: 13px; margin-bottom: 2px; color: var(--blue); }
.rv-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rv-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 6px; align-content: start; }
.rv-card .rv-head b { font-size: 14px; }
.rv-card p { font-size: 13.5px; color: #444; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.rv-mini { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.rv-mini b { color: var(--blue); }

/* ---------- จอง / สถานะการจอง */
.room-grid { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.book-card { position: sticky; top: 76px; padding: 0; overflow: hidden; }
.book-card .bc-head { background: #2c3e5c; color: #fff; padding: 12px 18px; }
.book-card .bc-head .price { color: #fff; }
.book-card .bc-head .price small { color: #c9d4ea; }
.book-card .bc-body { padding: 16px 18px 18px; }
.bc-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 4px 0; }
.bc-line.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-weight: 700; font-size: 15px; }
.bc-line.total b { color: var(--red); font-size: 18px; }
.green-box { background: var(--green-l); color: var(--green-d); border-radius: var(--r); padding: 9px 12px; font-size: 13px; font-weight: 600; display: flex; gap: 8px; }
.steps { display: flex; margin: 16px 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.steps span { flex: 1; padding: 11px; text-align: center; font-weight: 600; font-size: 13.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; justify-content: center; }
.steps span b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #e4e6ea; color: var(--muted); font-size: 12px; }
.steps span.on { color: var(--blue); background: var(--blue-l); }
.steps span.on b { background: var(--blue); color: #fff; }
.steps span.done b { background: var(--green); color: #fff; }
.sum-room { display: flex; gap: 12px; }
.sum-room img, .sum-room .ph { width: 88px; height: 68px; border-radius: var(--r); object-fit: cover; background: #e9edf2; flex-shrink: 0; }
.code-big { font-size: 28px; font-weight: 700; letter-spacing: .08em; font-family: ui-monospace, monospace; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 11px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill-amber { background: var(--amber-l); color: var(--amber); }
.pill-blue { background: var(--blue-l); color: var(--blue); }
.pill-green { background: var(--green-l); color: var(--green-d); }
.pill-red { background: #fff2f2; color: var(--red); }
.pill-gray { background: #f0f0f0; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 34px; }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: #e4e6ea; display: grid; place-items: center; color: #fff; }
.timeline .dot .i { width: 14px; height: 14px; stroke-width: 3; }
.timeline li.done .dot { background: var(--green); }
.timeline li.now .dot { background: var(--blue); box-shadow: 0 0 0 5px rgba(32, 103, 218, .18); }
.timeline b { display: block; }
.qr { width: 190px; height: 190px; margin: 0 auto; }
.pay-grid { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: center; }
.drop { border: 2px dashed #c3cad6; border-radius: var(--r-lg); padding: 18px; text-align: center; cursor: pointer; display: block; background: #fafbfd; color: var(--muted); }
.drop:hover { border-color: var(--blue); }
.drop b { color: var(--ink); }
.drop input { display: block; margin: 10px auto 0; max-width: 100%; }

/* ---------- ท้ายเว็บ */
.foot { background: #fff; border-top: 1px solid var(--line); margin-top: 36px; padding: 28px 0 16px; font-size: 13.5px; color: var(--muted); }
.foot b { color: var(--ink); display: block; margin-bottom: 6px; font-size: 14px; }
.foot a { display: inline-flex; gap: 6px; align-items: center; }
.foot-in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; }
.foot-in p { margin-bottom: 4px; }
.foot-copy { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; font-size: 12px; }

/* ---------- lightbox */
.lb { position: fixed; inset: 0; background: rgba(10, 12, 18, .92); z-index: 100; display: none; align-items: center; justify-content: center; }
.lb.on { display: flex; }
.lb img { max-width: 92vw; max-height: 84vh; border-radius: 4px; }
.lb button { position: absolute; background: rgba(255, 255, 255, .15); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 22px; cursor: pointer; }
.lb .x { top: 16px; right: 16px; }
.lb .pv { left: 16px; }
.lb .nx { right: 16px; }
.lb .cap { position: absolute; bottom: 18px; color: #fff; font-size: 14px; }

/* ---------- หลังบ้าน */
.adm { background: #f2f3f5; }
.adm-top { background: #2c3e5c; color: #fff; position: sticky; top: 0; z-index: 30; }
.adm-top .brand, .adm-top .brand small { color: #fff; }
.adm-top .brand small { opacity: .7; }
.adm-nav { display: flex; gap: 2px; flex: 1; }
.adm-nav a { color: #cfd8e8; padding: 8px 11px; border-radius: var(--r); display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: 13.5px; }
.adm-nav a:hover { background: rgba(255, 255, 255, .08); text-decoration: none; color: #fff; }
.adm-nav a.on { background: var(--btn); color: #fff; }
.cnt { background: var(--red); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; line-height: 18px; }
.adm-user { display: flex; gap: 6px; align-items: center; }
.adm-user form { margin: 0; }
.ghost-btn { display: inline-flex; gap: 6px; align-items: center; color: #fff; background: rgba(255, 255, 255, .1); border: 0; border-radius: var(--r); padding: 7px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.ghost-btn:hover { background: rgba(255, 255, 255, .2); text-decoration: none; }
.who { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; opacity: .9; padding: 0 6px; }
.adm-main { padding-top: 20px; padding-bottom: 40px; }
.adm h1 { font-size: 22px; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; color: inherit; }
.stat b { display: block; font-size: 24px; font-weight: 700; }
.stat span { font-size: 13px; color: var(--muted); }
.stat.amber b { color: var(--amber); }
.stat.green b { color: var(--green-d); }
.stat.red b { color: var(--red); }
.ftabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.ftabs a { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; font-size: 13px; font-weight: 600; color: var(--ink); }
.ftabs a.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.ftabs a:hover { text-decoration: none; }
.tbl-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #f7f9ff; }
.mono { font-family: ui-monospace, monospace; font-weight: 700; }
.two { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 7px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.slip-img { max-height: 420px; border-radius: var(--r); border: 1px solid var(--line); margin: 0 auto; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.photo-grid figure { margin: 0; position: relative; border-radius: var(--r); overflow: hidden; background: #e9edf2; aspect-ratio: 4/3; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid form { position: absolute; top: 6px; right: 6px; margin: 0; }
.photo-grid .cover { position: absolute; left: 6px; top: 6px; background: var(--blue); color: #fff; font-size: 11px; border-radius: 3px; padding: 1px 6px; }
.amen-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 12px; }
.login-box { max-width: 420px; margin: 70px auto; }
.rv-admin.is-hidden { opacity: .65; }

/* ---------- แท็บเล็ต / มือถือ */
@media (max-width: 980px) {
  .search-bar { flex-wrap: wrap; }
  .search-bar .sfield { flex: 1 1 calc(50% - 6px); }
  .search-bar .btn { flex: 1 1 100%; padding: 12px; }
  .results { grid-template-columns: 1fr; }
  .side { position: static; }
  .filters-d > summary { display: flex; }
  .filters-d .map-thumb { display: none; }
  .filters { margin-top: 8px; }
  .hcard { grid-template-columns: 200px 1fr; }
  .hcard-price { grid-column: 1 / -1; border-left: 0; border-top: 1px dashed var(--line); flex-direction: row; align-items: flex-end; }
  .prop-top, .room-grid, .two { grid-template-columns: 1fr; }
  .book-card { position: static; }
  .top-nav, .top-link { display: none; }
  .adm-nav span { display: none; }
  .adm-user .ghost-btn span, .who { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .rt-head { display: none; }
  .rt-row { grid-template-columns: 1fr 1fr; }
  .rt-row > div { border-left: 0; }
  .rt-row > .rt-room { grid-column: 1 / -1; display: grid; grid-template-columns: 140px 1fr; gap: 10px; }
  .rt-room img, .rt-room .ph { margin: 0; }
  .rt-price { text-align: left; }
  .rv-cards { grid-template-columns: 1fr; }
  .rv-sum { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top-in { gap: 10px; }
  .top-btn span { display: none; }
  .hero { padding: 34px 0 30px; }
  .search-bar .sfield { flex-basis: 100%; }
  .sortbar > span { display: none; }
  .hcard { grid-template-columns: 1fr; }
  .hcard-media { padding: 0; }
  .hcard-img { border-radius: var(--r) var(--r) 0 0; aspect-ratio: 16/9; }
  .thumbs { display: none; }
  .gallery, .gallery.n3, .gallery.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 200px 100px; }
  .gallery.n1, .gallery.n2 { grid-template-rows: 220px; }
  .gallery a:first-child, .gallery.n4 a:first-child { grid-column: span 2; grid-row: auto; }
  .gallery a:nth-child(n+4) { display: none; }
  .grid2, .pay-grid { grid-template-columns: 1fr; }
  .steps span { font-size: 12px; flex-direction: column; gap: 2px; padding: 8px 4px; }
  .foot-in { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
  .title-line h1 { font-size: 21px; }
  .adm-top .brand small { display: none; }
  .bars { grid-template-columns: 1fr; }
  .review { grid-template-columns: 1fr; gap: 8px; }
  .rt-row > .rt-room { grid-template-columns: 110px 1fr; }
}
@media print { .top, .foot, .no-print { display: none !important; } body { background: #fff; } .card { border-color: #ccc; } }

/* =========================================================================
   Polish: พื้นผิวเบราว์เซอร์ · โฟกัส · ฟอร์ม · อัปโหลดสลิป · แถบจองบนมือถือ
   ========================================================================= */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; min-width: 0; width: 100%; }
::selection { background: #cfe0ff; color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn:focus-visible, .top-btn:focus-visible { outline-offset: 3px; }
html { scrollbar-color: #c3c9d4 transparent; }
.price, .bc-line, .code-big, .score-badge, .mono, .countdown { font-variant-numeric: tabular-nums; }
a { text-underline-offset: 2px; }
input::placeholder, textarea::placeholder { color: #8a8f98; }

/* วันที่แบบไทยใต้ช่องวันที่ (ช่อง date ของเบราว์เซอร์แสดง ค.ศ.) */
.th-date { display: block; font-size: 12px; color: var(--blue); font-weight: 600; margin-top: 2px; min-height: 1em; }
.sfield .th-date { margin-top: 0; }

/* ปุ่มคัดลอก */
.copy { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: #fff; color: var(--blue); border-radius: 999px; padding: 2px 10px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; vertical-align: middle; }
.copy:hover { background: var(--blue-l); border-color: #c9dafb; }
.copy .i { width: 14px; height: 14px; }
.copy.done { color: var(--green-d); border-color: #cfe9ca; background: var(--green-l); }
.pay-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* นับถอยหลังเวลาโอน */
.countdown { display: flex; align-items: center; gap: 10px; background: var(--amber-l); border: 1px solid #f6dcb6; color: var(--amber); border-radius: var(--r); padding: 10px 14px; font-weight: 600; }
.countdown b { font-size: 17px; }
.countdown.late { background: #fff2f2; border-color: #f5c6c6; color: var(--red); }

/* อัปโหลดสลิป: ลากวางหรือแตะเลือก + ดูตัวอย่าง */
.drop { position: relative; transition: border-color .15s, background .15s; }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; margin: 0; }
.drop.over { border-color: var(--blue); background: var(--blue-l); }
.drop.has-file { border-style: solid; border-color: #bfe3b8; background: #f6fcf5; }
.drop-preview { display: none; align-items: center; gap: 12px; text-align: left; }
.drop.has-file .drop-preview { display: flex; }
.drop.has-file .drop-empty { display: none; }
.drop-preview img { width: 64px; height: 84px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); background: #fff; }
.drop-preview b { display: block; color: var(--ink); overflow-wrap: anywhere; }

/* ยกเลิกการจอง (ซ่อนไว้ใต้หัวข้อ ไม่ให้เด่นกว่างานหลัก) */
.cancel-d > summary { cursor: pointer; color: var(--muted); font-size: 13.5px; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.cancel-d > summary::-webkit-details-marker { display: none; }
.cancel-d > summary:hover { color: var(--red); }
.cancel-d[open] > summary { margin-bottom: 10px; }

/* แถบจองติดล่างจอ (มือถือ หน้าห้อง) */
.m-cta { display: none; }
@media (max-width: 980px) {
  .m-cta { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .08); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); align-items: center; gap: 12px; }
  .m-cta .price { font-size: 20px; }
  .m-cta .btn { margin-left: auto; padding: 11px 22px; }
  body.has-m-cta { padding-bottom: 74px; }
}
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; margin: 14px 0 0; }
.back-link .i { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

.title-line + .timeline { margin-top: 22px; }
.title-line > .grow { flex: 1 1 260px; }

/* รูปน้อย (1–2 รูป): แสดงทั้งภาพ ไม่ครอป · พื้นหลังเป็นรูปเดียวกันแบบเบลอ */
.gallery.n1 a, .gallery.n2 a { background: #1b1f27; }
.gallery.n1 a::before, .gallery.n2 a::before { content: ""; position: absolute; inset: -24px; background: var(--bg) center / cover; filter: blur(20px) brightness(.8); }
.gallery.n1 img, .gallery.n2 img { position: relative; object-fit: contain; }
.gallery.n1 a:hover img, .gallery.n2 a:hover img { transform: none; }
.gallery .more { z-index: 1; }
.gallery.n1 a:first-child { grid-row: auto; }
.gallery.n1, .gallery.n2 { grid-template-rows: 420px; }
@media (max-width: 640px) { .gallery.n1, .gallery.n2 { grid-template-rows: 300px; } }

/* =========================================================================
   Motion แบบเว็บจองที่พัก: เร็ว นุ่ม มีหน้าที่ (โหลด / เปลี่ยนสถานะ / ชี้ตำแหน่ง)
   ทุกอย่างอยู่ใต้ html.motion — ผู้ใช้ที่ตั้ง “ลดการเคลื่อนไหว” ไม่เห็นเลย
   ========================================================================= */
:root { --ease-out: cubic-bezier(0.16, 1, 0.3, 1); }

/* แถบโหลดสีฟ้าบนสุดของจอ (กดเรียง/กรอง/ค้นหา/เปลี่ยนหน้า) */
.nav-progress { position: fixed; left: 0; top: 0; height: 3px; width: 0; z-index: 200; background: linear-gradient(90deg, var(--btn), var(--blue)); box-shadow: 0 1px 6px rgba(32, 103, 218, .45); opacity: 0; pointer-events: none; }
.nav-progress.run { opacity: 1; width: 85%; transition: width 6s cubic-bezier(.1, .7, .2, 1), opacity .2s; }
.nav-progress.done { opacity: 0; width: 100%; transition: width .2s ease-out, opacity .3s .15s; }

/* รูปกำลังโหลด: แถบเงาวิ่งสีเทา (skeleton) */
.motion .hcard-img, .motion .thumbs span, .motion .gallery a, .motion .rt-room .ph, .motion .photo-grid figure { background-image: linear-gradient(100deg, #e9edf2 30%, #f5f7fa 50%, #e9edf2 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
.motion .is-loaded { animation: none !important; background-image: none !important; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.motion .hcard-img img, .motion .thumbs img, .motion .gallery img, .motion .rt-room img, .motion .photo-grid img { opacity: 0; transition: opacity .35s ease-out, transform .5s var(--ease-out); }
.motion img.in { opacity: 1; }

/* ผลค้นหาค่อย ๆ ขึ้นมาทีละการ์ด (ครั้งเดียวตอนเปิดหน้า) */
.motion .js-stagger > * { opacity: 0; transform: translateY(14px); }
.motion .js-stagger.go > * { opacity: 1; transform: none; transition: opacity .45s var(--ease-out), transform .55s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }

/* การ์ดห้อง: ลอยขึ้นเล็กน้อย + รูปซูมช้า ๆ */
.motion .hcard { transition: box-shadow .25s ease-out, transform .25s var(--ease-out), border-color .25s; }
.motion .hcard:hover { transform: translateY(-2px); border-color: #c9d6ea; }
.hcard-img img { transition: transform .6s var(--ease-out); }
.motion .hcard:hover .hcard-img img { transform: scale(1.05); }
.motion .hcard:hover .btn { background: var(--btn-h); }
.motion .rv-card, .motion .bk-cta { transition: box-shadow .25s ease-out, transform .25s var(--ease-out); }
.motion .rv-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); }

/* ปุ่ม: กดแล้วยุบ + หมุนโหลดตอนส่งฟอร์ม */
.motion .btn { transition: background .15s, transform .12s ease-out, box-shadow .2s; }
.motion .btn:active:not([disabled]) { transform: scale(.97); }
.btn.is-busy { pointer-events: none; opacity: .85; }
.btn.is-busy::before { content: ""; width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite; flex-shrink: 0; }
.btn-line.is-busy::before, .btn-gray.is-busy::before, .btn-red.is-busy::before { border-color: rgba(32, 103, 218, .25); border-top-color: var(--blue); }
@keyframes spin { to { transform: rotate(360deg); } }

/* แถบเรียงลำดับ + แท็บหน้าห้อง: เส้น/พื้นสีฟ้าเลื่อนตามตัวที่เลือก */
.sortbar { position: relative; }
.sortbar a { position: relative; z-index: 1; transition: color .2s; }
.sort-ind { position: absolute; top: 0; bottom: 0; background: var(--blue); z-index: 0; transition: left .35s var(--ease-out), width .35s var(--ease-out); }
.js .sortbar.has-ind a.on { background: transparent; }
.tabs-sticky .wrap { position: relative; }
.tab-ind { position: absolute; bottom: 0; height: 3px; background: var(--blue); border-radius: 3px 3px 0 0; transition: left .35s var(--ease-out), width .35s var(--ease-out); pointer-events: none; }
.js .tabs-sticky.has-ind a.on, .js .tabs-sticky.has-ind a:hover { border-bottom-color: transparent; }

/* ป้ายห้องใกล้หมด: กะพริบเบา ๆ 2 ครั้งตอนเห็นครั้งแรก */
.motion .avail.hot { animation: nudge 1.2s ease-in-out .6s 2; }
@keyframes nudge { 50% { transform: scale(1.06); } }

/* ขั้นตอนปัจจุบันบนไทม์ไลน์: วงแสงขยายออก */
.motion .timeline li.now .dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--blue); animation: ring 1.8s ease-out infinite; }
@keyframes ring { from { transform: scale(1); opacity: .7; } to { transform: scale(2.1); opacity: 0; } }

/* ดูรูปเต็ม: จางเข้า + ขยายเล็กน้อย */
.motion .lb { display: flex; opacity: 0; visibility: hidden; transition: opacity .25s ease-out, visibility 0s .25s; }
.motion .lb.on { opacity: 1; visibility: visible; transition: opacity .25s ease-out; }
.motion .lb img { transform: scale(.96); transition: transform .35s var(--ease-out), opacity .2s; }
.motion .lb.on img { transform: none; }

/* แถบจองล่างจอมือถือ: เลื่อนขึ้นมาตอนเปิดหน้า */
@media (max-width: 980px) { .motion .m-cta { animation: slideUp .5s var(--ease-out) .3s both; } }
@keyframes slideUp { from { transform: translateY(100%); } }

/* ค้นหาไม่เจอ / กล่องคัดลอกแล้ว */
.motion .copy.done { animation: pop .3s var(--ease-out); }
@keyframes pop { 50% { transform: scale(1.08); } }

/* =========================================================================
   หลังบ้านบนมือถือ: เมนูเป็นแถบล่างแบบแอป · ตารางเป็นการ์ด · ช่องค้นหาเต็มจอ
   ========================================================================= */
.adm-search .inp { width: 220px; }
@media (max-width: 980px) {
  .adm .top-in { gap: 8px; }
  .adm .brand { flex: 1; }
  .adm-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #2c3e5c; border-top: 1px solid rgba(255, 255, 255, .1); padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); gap: 2px; justify-content: space-around; box-shadow: 0 -4px 16px rgba(0, 0, 0, .15); }
  .adm-nav a { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 11px; font-weight: 600; position: relative; text-align: center; min-height: 48px; justify-content: center; }
  .adm-nav a span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .adm-nav a .i { width: 21px; height: 21px; }
  .adm-nav a.on { background: rgba(83, 146, 249, .22); color: #fff; }
  .adm-nav .cnt { position: absolute; top: 2px; left: calc(50% + 6px); font-size: 10px; line-height: 16px; padding: 0 5px; }
  .adm-main { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .adm-user .ghost-btn { padding: 8px; }
}
@media (max-width: 700px) {
  .adm-main { padding-top: 14px; }
  .adm h1 { font-size: 19px; }
  .adm-title { gap: 8px; }
  .adm-search { flex: 1 1 100%; flex-wrap: nowrap; }
  .adm-search .inp { width: auto; flex: 1; min-width: 0; }
  .stats { gap: 8px; margin: 10px 0; }
  .stat { padding: 10px 12px; min-width: 0; }
  .stat b { font-size: 20px; }
  .stat span { font-size: 12px; display: block; }
  .ftabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 10px; padding: 0 16px 4px; scrollbar-width: none; }
  .ftabs a { flex-shrink: 0; }
  /* ตาราง → การ์ด */
  .tbl.cards, .tbl.cards tbody { display: block; }
  .tbl.cards thead { display: none; }
  .tbl-wrap:has(.tbl.cards) { background: transparent; border: 0; overflow: visible; }
  .tbl.cards tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; margin-bottom: 8px; }
  .tbl.cards td { display: block; padding: 0; border: 0; min-width: 0; }
  .tbl.cards td[colspan] { grid-column: 1 / -1; }
  .tbl.cards td.c-head { grid-column: 1; }
  .tbl.cards td.c-status { grid-column: 2; grid-row: 1; justify-self: end; }
  .tbl.cards td.c-wide { grid-column: 1 / -1; }
  .tbl.cards td.c-wide:first-child { grid-column: 1; grid-row: 1; }
  .tbl.cards td[data-label] { display: flex; justify-content: flex-end; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; text-align: right; grid-column: 1 / -1; font-size: 13.5px; border-top: 1px dashed var(--line); padding-top: 6px; }
  .tbl.cards td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; flex-shrink: 0; margin-right: auto; }
  .tbl.cards td[data-label] br { display: none; }

  .tbl.cards tr.click:hover td { background: transparent; }
  .kv { font-size: 13.5px; }
  .card { padding: 14px 16px; }
  .card h2 { font-size: 17px; }
  .slip-img { max-height: 320px; }
  .login-box { margin: 32px auto; }
}