/* Map-only composition; shared palette and type are in theme-brand.css. */

/* The artwork is a quiet frame for the controls, with detail at the sides. */
.head.stacked{position:sticky;top:0;background:var(--paper);border-bottom:1px solid #ded6c7;box-shadow:0 3px 12px rgba(18,59,99,.09);isolation:isolate}
.head.stacked::before{content:"";position:absolute;inset:0 0 auto;height:152px;background:#d7efff url("img/header-map-vivid-desktop-nocat.webp") center bottom/cover no-repeat;z-index:-1;pointer-events:none}
.head.stacked .head-in{position:relative;display:grid;grid-template-columns:300px minmax(0,1fr);grid-template-rows:152px auto auto;align-items:stretch;gap:0;min-height:0;max-width:none;width:100%;padding:0;margin:0}
.head.stacked .brand{grid-column:1;grid-row:1;align-self:center;justify-self:center;margin:0;padding:0 8px;max-width:100%;height:auto;align-items:center;overflow:visible}
.head.stacked .brand img{display:block;width:min(282px,100%);height:auto;max-width:none;max-height:none;filter:drop-shadow(0 4px 5px rgba(18,59,99,.2))}
.head.stacked .head-col{grid-column:2;grid-row:1;display:grid;grid-template-rows:54px minmax(0,1fr);min-width:0;align-content:stretch}
.head.stacked .head-top{min-height:0;height:54px;gap:8px;padding:3px 24px 0 2px}
.head.stacked .brandline{display:none}
.head.stacked .nav{margin-left:0;gap:3px;min-width:0}
.head.stacked .nav button{color:#143b62;font-family:var(--display);font-size:14px;font-weight:700;padding:8px 14px;border-radius:24px;text-shadow:0 1px 0 rgba(255,255,255,.7)}
.head.stacked .nav button.on{color:#fff;background:#123b63;text-shadow:none;box-shadow:0 2px 5px rgba(18,59,99,.16)}
.head.stacked .nav button:hover:not(.on){background:rgba(255,255,255,.75)}
.head.stacked .head-r{margin-left:auto;gap:8px}
.head.stacked .langsw,.head.stacked .acct{background:rgba(255,255,255,.85);box-shadow:0 2px 7px rgba(18,59,99,.1)}
.head.stacked .fbar{position:static;border:0;background:none;min-width:0;align-self:start}
.head.stacked .fbar>.hs{width:100%;min-width:0;overflow:visible}
.head.stacked .fbar>.hs:before,.head.stacked .fbar>.hs:after,.head.stacked .fbar>.hs>.hs-btn{display:none!important}
.head.stacked .fbar-row{display:flex;flex-wrap:nowrap;overflow:visible;cursor:auto;gap:9px;align-items:center;padding:13px 20px 0 0;min-height:72px;width:100%;box-sizing:border-box}
.head.stacked .fbar-row>.searchwrap{flex:1 1 440px;min-width:120px;max-width:620px;width:0}
.head.stacked .searchwrap input{width:100%;height:54px;border:1px solid #d8dee7;border-radius:30px;background:#fff;box-shadow:0 3px 8px rgba(18,59,99,.17);padding:0 20px 0 51px;font-size:16px;color:var(--ink)}
.head.stacked .searchwrap input::placeholder{color:#7187a3}
.head.stacked .searchwrap span{left:18px;top:13px;font-size:22px;line-height:1}
.head.stacked .homebtn{height:51px;width:51px;min-width:51px;justify-content:center;border-radius:50%;background:#fff;border-color:#e2e0dc;box-shadow:0 3px 8px rgba(18,59,99,.13);font-size:20px;padding:0}
.head.stacked .homebtn .lbl-wide{display:none}
/* 27 ก.ย. เจ้าของหาช่องเลือกจังหวัดบนจอใหญ่ไม่เจอ — เดิมซ่อนไว้ · โชว์ข้างปุ่มหมุด ขนาดเท่าปุ่มอื่นในแถว */
@media(min-width:761px){
.head.stacked .fbar-row>.barsel{display:contents}
.head.stacked .fbar-row>.barsel .selbox{height:52px;border-radius:28px;padding:0 16px;background:#fff;border:1px solid #e2e0dc;box-shadow:0 3px 8px rgba(18,59,99,.13);font-size:15px;color:var(--navy);max-width:190px}
}
/* มือถือ: จังหวัดอยู่ในแผงตัวกรอง เป็นหัวข้อแรกสุด */
@media(max-width:760px){.head.stacked .fdrawer{display:flex;flex-direction:column}.head.stacked .fdrawer .sel-sect{order:-1}.head.stacked .fdrawer>.fdrawer-h{order:-2}}
.head.stacked .fpill{min-height:52px;padding:0 20px;border-radius:28px;background:linear-gradient(180deg,#fff0d3,#ffd591);border-color:#ffd38e;color:var(--navy);box-shadow:0 3px 8px rgba(146,91,15,.12);font-family:var(--display);font-size:16px;font-weight:700}
.head.stacked .fpill.open{background:var(--navy);border-color:var(--navy);color:#fff}
.head.stacked .fbar-row .quick-inline-sep,.head.stacked .fbar-row .search-scope{display:none}
.head.stacked .fbar-row>.clr{height:46px;background:#fff}
.head.stacked .fdrawer{position:absolute;z-index:20;top:143px;left:300px;right:0;padding:12px 18px;background:var(--paper);border:1px solid var(--rule);border-radius:0 0 18px 18px;box-shadow:0 12px 22px rgba(18,59,99,.17)}
.head.stacked .fscrim{position:fixed;inset:0;z-index:10}

.head.stacked .catrail{grid-column:1/-1;grid-row:2;background:#fff9ed;border:0;border-bottom:1px solid #ebdfca;min-width:0;box-shadow:0 -2px 7px rgba(255,255,255,.6)}
.head.stacked .catrail-in{gap:9px;padding:7px 38px;min-height:56px}
.head.stacked .catbub{width:auto;gap:6px;padding:3px 13px 3px 5px;background:#fff;border:1px solid #e7e2db;border-radius:24px;box-shadow:0 2px 5px rgba(18,59,99,.11)}
.head.stacked .catbub img{width:27px;height:27px}
.head.stacked .catbub b{font-size:13px;font-weight:700;color:var(--navy)}
.head.stacked .catbub.all .glyph{width:27px;height:27px;font-size:17px}
.head.stacked .catbub.on{border-color:var(--chili);background:#fff;color:var(--chili);box-shadow:0 0 0 1px var(--chili) inset,0 2px 5px rgba(18,59,99,.08)}
.head.stacked .catbub.on b{color:var(--chili)}
.head.stacked .catbub:hover{border-color:#f5a623;background:#fff8e9}
.head.stacked .catsub{background:#fff9ed}

.quickbar-map{grid-column:1/-1;grid-row:3;display:flex;align-items:center;gap:13px;min-width:0;min-height:54px;padding:5px 32px;background:#fff9ed}
.quickbar-map{overflow:hidden}
.quickbar-title{flex:0 0 auto;font-family:var(--display);font-weight:700;font-size:14px;color:var(--navy)}
.quickbar-map .quick-set{display:flex;flex:0 0 auto;align-items:center;gap:8px}
.quickbar-map .quick-chip,.quickbar-map .wg-chip{min-height:38px;padding:6px 13px;background:#fff;border:1px solid #e3dfd9;border-radius:24px;box-shadow:0 2px 5px rgba(18,59,99,.1);color:var(--navy);font-size:13.5px;font-weight:600}
.quickbar-map .quick-chip.on,.quickbar-map .wg-chip.on{background:#ffe0a7;border-color:#ffce7a;color:var(--navy)}
.quickbar-map .wg-chip{padding:5px 12px 5px 8px}
.quickbar-map .wg-chip .wg-e{font-size:18px}
.quickbar-map .wg-chip small{display:none}
.quickbar-map .wgbar{padding:0 30px 0 0;gap:8px}
.quickbar-map>.hs{flex:1 1 auto;min-width:0}
.quickbar-map .wg-grp{gap:8px}
.quickbar-map .wg-sep{display:none}
.quickbar-map .wg-hint{display:none}
.quickbar-map .quick-label{font-family:var(--display);color:var(--navy);font-size:13px}

body:has(.head.stacked) .listcol{background:linear-gradient(165deg,#fff9ed 0%,#f5f9ff 52%,#fff8ee 100%)}
body:has(.head.stacked) .listhead{background:rgba(255,249,237,.96);backdrop-filter:blur(8px);padding:12px 18px 10px}
body:has(.head.stacked) .listhead h2{font-family:var(--display);font-size:19px;color:var(--navy)}
body:has(.head.stacked) .rcard{width:calc(100% - 24px);margin:8px 12px;padding:14px 14px;gap:14px;border:1px solid #e9e3d8;border-radius:16px;background:linear-gradient(125deg,#fff 0%,#fffaf1 100%);box-shadow:0 2px 7px rgba(18,59,99,.055)}
body:has(.head.stacked) .rcard:nth-of-type(even){background:linear-gradient(125deg,#fff 0%,#f2f8fd 100%);border-color:#dfe8ef}
body:has(.head.stacked) .rcard:hover{border-color:#eebc75;box-shadow:0 4px 14px rgba(18,59,99,.11)}
body:has(.head.stacked) .rcard h3{font-family:var(--display);font-size:16px;line-height:1.32;font-weight:700}
body:has(.head.stacked) .rcard.act{background:linear-gradient(125deg,#fffdf6,#ffedcf);border-color:#efbf74;box-shadow:inset 3px 0 var(--amber),0 3px 10px rgba(18,59,99,.08)}
body:has(.head.stacked) .mono,body:has(.head.stacked) .dist,body:has(.head.stacked) .fcount{font-variant-numeric:tabular-nums}
/* The search and dice controls already guide a first visit; lead with the shops. */
body:has(.head.stacked) .startbar{display:none}
body:has(.head.stacked) .daily{margin:7px 12px 8px;padding:7px 9px;gap:5px;border-color:#ffdc9d;border-radius:16px;background:#fff8e9}
body:has(.head.stacked) .daily-h b{font-family:var(--display);font-size:13px;color:#af6410}
body:has(.head.stacked) .daily-h .small{display:none}
body:has(.head.stacked) .daily-b{grid-template-columns:60px 1fr;gap:9px;padding:5px;border:0;background:#fff;border-radius:11px}
body:has(.head.stacked) .daily-b .thumb{height:55px}
body:has(.head.stacked) .daily-t b{font-family:var(--display);font-size:15px}
body:has(.head.stacked) .daily-cv{display:none}
body:has(.head.stacked) .daily-f{display:none}
body:has(.head.stacked) .maptools button{border-radius:22px;box-shadow:0 2px 7px rgba(18,59,99,.16)}
body:has(.head.stacked) .maptools button.dicebtn{background:linear-gradient(135deg,#f5a623,#ef4938);border-color:#f5a623;color:#fff;box-shadow:0 3px 10px rgba(190,90,28,.2)}

@media(max-width:1100px) and (min-width:761px){
  .head.stacked .head-in{grid-template-columns:240px minmax(0,1fr)}
  .head.stacked .brand img{width:226px}
  .head.stacked .nav button{font-size:12.5px;padding:7px 9px}
  .head.stacked .nav button:nth-child(n+4){display:none}
  .head.stacked .menubtn{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(18,59,99,.12)}
  .head.stacked .head-top{padding-right:10px}
  .head.stacked .fbar-row{padding-right:12px}
  .head.stacked .fdrawer{left:240px}
  .quickbar-map{padding-left:16px;padding-right:16px}
}
@media(max-width:760px){
  .head.stacked::before{height:131px;background-image:url("img/header-map-vivid-mobile.webp")}
  .head.stacked .head-in{grid-template-columns:minmax(0,1fr) 92px;grid-template-rows:68px 63px auto;gap:0;padding:0}
  .head.stacked .brand{grid-column:1;grid-row:1;justify-self:start;align-self:center;padding:1px 0 0 9px;margin:0;max-width:100%;min-width:0}
  .head.stacked .brand img{width:132px;max-width:100%;height:auto;max-height:none;filter:drop-shadow(0 2px 3px rgba(18,59,99,.18))}
  .head.stacked .head-col{display:contents}
  .head.stacked .head-top{grid-column:2;grid-row:1;min-width:0;width:100%;height:68px;padding:0 8px 0 0;justify-content:flex-end}
  .head.stacked .nav,.head.stacked .langsw,.head.stacked .acct{display:none}
  .head.stacked .head-r{margin:0}
  .head.stacked .menubtn{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(18,59,99,.12);color:var(--navy)}
  .head.stacked .fbar{grid-column:1/-1;grid-row:2;min-width:0;align-self:center;margin:0}
  .head.stacked .fbar-row{gap:6px;min-height:0;padding:4px 8px;flex-wrap:nowrap;overflow:visible}
  .head.stacked .fbar-row>.searchwrap{flex:1 1 auto;min-width:0;max-width:none}
  .head.stacked .searchwrap input{height:46px;font-size:13px;padding-left:38px;padding-right:8px;box-shadow:0 2px 6px rgba(18,59,99,.12)}
  .head.stacked .searchwrap span{left:12px;top:12px;font-size:17px}
  .head.stacked .homebtn{width:44px;min-width:44px;height:44px;font-size:17px}
  .head.stacked .fpill{height:44px;min-height:44px;padding:0 11px;font-size:13px;white-space:nowrap}
  .head.stacked .fpill .lbl-wide{display:none}
  .head.stacked .fbar-row>.clr{display:none}
  .head.stacked .catrail{display:none}
  .quickbar-map{grid-column:1/-1;grid-row:3;display:block;padding:5px 8px 6px;min-height:0;background:#fff9ed}
  .quickbar-title{display:none}
  .quickbar-map .quick-set{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
  .quickbar-map .quick-chip{min-width:0;min-height:34px;justify-content:center;padding:4px 2px;font-size:11.5px;gap:2px}
  .quickbar-map .quick-chip .qi{font-size:11px}
  .quickbar-map>.hs{margin-top:5px}
  .quickbar-map .wgbar{padding:0 23px 0 0;gap:6px}
  .quickbar-map .wg-chip{min-height:31px;padding:3px 8px 3px 5px;font-size:11px}
  .quickbar-map .wg-chip b{font-size:11px}
  .quickbar-map .wg-chip .wg-e{font-size:15px}
  .quickbar-map .quick-label{font-size:11px}
  .head.stacked .fdrawer{position:fixed;inset:auto 0 0;max-height:82dvh;overflow:auto;border-radius:18px 18px 0 0;padding:10px 12px 22px}
  body:has(.head.stacked) .listhead h2{font-size:17px}
  body:has(.head.stacked) .rcard{width:calc(100% - 20px);margin:8px 10px;padding:13px 11px;gap:11px}
}
@media(max-width:360px){
  .head.stacked .head-in{grid-template-columns:minmax(0,1fr) 60px}
  .head.stacked .brand img{width:122px}
  .head.stacked .searchwrap input{font-size:12px}
  .head.stacked .fpill{padding:0 8px;font-size:12px}
  .head.stacked .homebtn{width:40px;min-width:40px;height:40px}
  .quickbar-map .quick-chip{font-size:11px}
}

/* 27 ก.ย. ปุ่มซูมแผนที่ (+/−) ลอยทับแผงตัวกรอง (อยู่คนละชั้นซ้อน ยก z-index ไม่ช่วย) — ซ่อนตอนแผงเปิด */
body:has(.fdrawer) .leaflet-control-zoom{visibility:hidden}
/* 27 ก.ย. แผงตัวกรองจอคอม — จัดเป็นตาราง: แถวบน แบบไหน | เวลา | ราคา · แถวล่าง ที่มา เต็มความกว้าง */
@media(min-width:1101px){
  .head.stacked .fdrawer{display:grid;grid-template-columns:minmax(0,1fr) 260px 190px;gap:10px;align-items:stretch}
  .head.stacked .fdrawer>.fdrawer-h,.head.stacked .fdrawer>.fscrim{grid-column:1/-1}
  .head.stacked .fdrawer .fsect{max-width:none;min-width:0}
  .head.stacked .fdrawer .kind-sect{order:1}
  .head.stacked .fdrawer .w-hrs{order:2}
  .head.stacked .fdrawer .price-sect{order:3}
  .head.stacked .fdrawer .source-sect{order:4;grid-column:1/-1;max-height:none}
  .head.stacked .fdrawer .price-sect .chiprow{display:grid;grid-template-columns:1fr 1fr;gap:6px}
}
/* 27 ก.ย. เจ้าของ: ปุ่มเชฟ (กล่องแม่) ใช้หน้าตาเดียวกับปุ่มอื่นในแผง — ไม่ต้องแดงกว่าคนอื่น */
.fsect .source-group-chip{border-color:var(--rule,#e6ddcf);background:#FFFEFB;color:inherit}
.fsect .source-group-chip.expanded{background:var(--chili-bg);border-color:var(--chili)}
/* ราคาบนมือถือ: 4 ปุ่มเรียงแถวเดียว ขนาดเท่าปุ่มอื่น ไม่ยืดเต็มจอ */
@media(max-width:760px){
  .head.stacked .fdrawer .price-sect{max-width:none}
  .head.stacked .fdrawer .price-sect .chiprow{display:flex;flex-direction:row;flex-wrap:wrap;gap:6px}
  .head.stacked .fdrawer .price-sect .chip{width:auto;justify-content:center;min-width:56px}
}
/* 27 ก.ย. ปุ่มระยะในแถวทางลัด — select อยู่ในปุ่ม */
.quick-chip.radpick{gap:4px;padding-right:6px}
.quick-chip.radpick .radsel{height:auto;border:0;background:transparent;box-shadow:none;padding:0 2px;font:inherit;font-weight:700;color:inherit;cursor:pointer;max-width:none}
.listhead .search-scope,.listhead .mono.small.muted{color:var(--navy);opacity:.85}
/* 27 ก.ย. ป้าย "📍 ใกล้ … · ในระยะ … กม." เด่นขึ้นเล็กน้อย — คนต้องรู้ว่าวัดระยะจากไหน */
.listhead .pinline{display:inline-block;font-size:13px;font-weight:700;color:var(--navy);background:#FFF1D6;border:1px solid #F3D49A;border-radius:999px;padding:3px 10px;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
/* 27 ก.ย. คนเข้าครั้งแรก (ยังไม่มีหมุดที่จำไว้) — ปุ่มชวนใช้ตำแหน่ง ไม่เด้งขอ GPS เอง */
.listhead .pinask{margin-left:6px;font-size:12.5px;font-weight:700;color:#fff;background:var(--navy);border:0;border-radius:999px;padding:4px 11px;cursor:pointer;white-space:nowrap}
/* 27 ก.ย. แท็บเล็ต (761–1100) — แถวบน: แบบไหน (กว้าง) | ราคา (เล็ก) · แถวล่าง: เวลา (เล็ก) | ที่มา (กว้าง)
   กล่องเล็กไม่กินที่ · ไม่มีเลื่อนในกล่อง */
@media(max-width:1100px) and (min-width:761px){
  .head.stacked .fdrawer{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 190px;gap:10px;align-items:start;max-height:calc(100dvh - 190px);overflow:auto}
  .head.stacked .fdrawer>.fdrawer-h{grid-column:1/-1}
  .head.stacked .fdrawer .fsect{max-width:none;min-width:0;max-height:none}
  .head.stacked .fdrawer .kind-sect{grid-column:1/3;grid-row:2}
  .head.stacked .fdrawer .price-sect{grid-column:3;grid-row:2}
  .head.stacked .fdrawer .w-hrs{grid-column:3;grid-row:3}
  .head.stacked .fdrawer .source-sect{grid-column:1/3;grid-row:3}
  .head.stacked .fdrawer .price-sect .chiprow,.head.stacked .fdrawer .w-hrs .chiprow{display:grid;grid-template-columns:1fr 1fr;gap:6px}
  .head.stacked .fdrawer .w-hrs .chip{padding:5px 8px}
  .head.stacked .fdrawer .kind-sect .chiprow,.head.stacked .fdrawer .source-sect .chiprow{display:flex;flex-wrap:wrap}
}
/* แท็บเล็ตแนวตั้ง (761–899): ช่องจังหวัดบีบช่องค้นหา — ย้ายไปอยู่หัวแผงตัวกรองแทน */
@media(max-width:899px) and (min-width:761px){
  .head.stacked .fbar-row>.barsel{display:none}
  .head.stacked .fdrawer .fsect.sel-sect{display:block;grid-column:1/-1;grid-row:1}
  .head.stacked .fdrawer>.fdrawer-h{display:none}
}

/* 27 ก.ย. รีวิว ข้อ 2: มือถือบอกว่ากำลังดูรอบไหน + ปุ่มตำแหน่งมีคำว่า "ใกล้ฉัน" */
.lbl-near{display:none}
@media(max-width:760px){
  .head.stacked .homebtn{width:auto;min-width:0;padding:0 13px;border-radius:26px;gap:4px;font-size:14px;font-weight:600;color:var(--navy)}
  .head.stacked .homebtn .lbl-near{display:inline}
  /* ป้ายลอยบนแผนที่ใต้หัวเว็บ ไม่เบียดช่องค้นหา · หน้ารายการมีป้ายในหัวรายการอยู่แล้ว */
  body:has(.mapshell):not(.m-list) .head.stacked .fbar-row .search-scope{display:flex;position:fixed;z-index:431;top:calc(var(--head-h,250px) + 10px);left:50%;transform:translateX(-50%);max-width:calc(100vw - 110px);margin:0;padding:6px 13px;border-radius:18px;background:#fff;border:1px solid #e2e0dc;box-shadow:0 3px 8px rgba(18,59,99,.15);font-size:12.5px;font-weight:600;color:var(--navy)}
  .head.stacked .fbar-row .search-scope:before{display:none}
  body:has(.mapshell) .searchhere{top:52px}
}
/* 27 ก.ย. รีวิว ข้อ 6: บอกว่าเป็นร้านแนะนำทั่วประเทศ ให้เห็นบนมือถือด้วย */
body:has(.head.stacked) .daily-h .small{display:block;font-size:11.5px}
/* 27 ก.ย. รีวิว ข้อ 3: ปุ่มที่กดแล้วไม่เจอร้านในพื้นที่นี้ */
.chip.zero{opacity:.45}
