/* สมุดผจญภัย › สำรวจภูมิภาค (explore-book.js · ใบ 107 · mockup design-briefs/107-explore/mockup_region.png)
   ภาษาภาพเดียวกับสมุด: กระดาษครีม ขอบทองบาง ปุ่ม teal · ซ้าย = สรุป + แผนที่ภูมิภาค · ขวา = รางวัลขั้น % + รายละเอียดจุด
   ตามพื้นที่จริง (container cxw ของสมุด · ui-codex.css): กว้าง 2 คอลัมน์ · แคบ (มือถือแนวนอน) ยังสองคอลัมน์แต่ย่อสรุป เลื่อนในคอลัมน์
   ⚠️ ไม่มี animation infinite/forwards (ของในหน้าวาดใหม่ทุกครั้ง — กฎ 4b) · ตัวอักษร ≥ 13px · ปุ่ม 44px บนจอสัมผัส */
/* หน้านี้ไม่มีอะไรให้ค้นหา — ซ่อนช่องค้นหาของสมุด (ชิปภูมิภาคขึ้นแทนที่) */
.cx[data-cx="explore"] .cx-search { display: none; }
.xp { display: grid; gap: 8px; padding: 2px 2px 8px; color: var(--ink, #3e2c16); }
.xp-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(250px, 1fr); gap: 10px; align-items: start; }
.xp-left, .xp-right { display: grid; gap: 8px; min-width: 0; }

/* การ์ดสรุป */
.xp-sum { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 6px 10px; padding: 8px; border-radius: 13px; border: 1.5px solid #e6d6b0; background: linear-gradient(#fffdf8, #fbf1dc); }
.xp-sumart { width: 112px; height: 74px; object-fit: cover; border-radius: 9px; border: 1px solid #d9c092; }
.xp-sumtxt { display: grid; gap: 3px; min-width: 0; }
.xp-sumtxt > b { font: 800 16px/1.2 var(--font-head, inherit); color: #4a3008; }
.xp-sumtxt > b small { font: 700 13px var(--font-head, inherit); color: #8a5a10; margin-left: 4px; }
.xp-sumtxt > p { margin: 0; font-size: 13px; line-height: 1.35; color: var(--mute, #7a6548); }
.xp-barrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.xp-barrow .cx-bar { height: 11px; }
.xp-barrow > b { font: 800 16px var(--font-head, inherit); color: var(--teal, #2f6f73); }
.xp-kinds { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.xp-kinds > span { display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 5px; align-items: center; padding: 4px 6px; border-radius: 10px; background: #f6efdc; border: 1px solid #eadcb8; }
.xp-kinds img { grid-row: 1 / 3; width: 28px; height: 28px; object-fit: contain; }
.xp-kinds small { font-size: 12.5px; color: #8a6a3a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-kinds b { font: 800 14px var(--font-head, inherit); color: #4a3008; }

/* แผนที่ภูมิภาค + หมุด */
.xp-map { display: grid; gap: 5px; }
.xp-art { position: relative; aspect-ratio: 3 / 2; border-radius: 13px; overflow: hidden; border: 2px solid #d9b56a; background: #e9d9b3; box-shadow: 0 2px 6px #8a5a1a26; }
.xp-art > img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* หมุด: ขนาดตามความกว้างแผนที่ (container xpart — มือถือเล็กลงเอง ~60% ของคอม) · จุดแผนที่เดียวกันเรียงเป็นวง (explore-book.js layoutPins)
   พื้นที่แตะ ≥ 32px เสมอ แม้ไอคอนเล็กกว่า · ยังไม่พบ = เล็กลง + จาง ให้ที่พบแล้วอ่านก่อน */
.xp-art { container: xpart / inline-size; }
.xp-pin { --pin: clamp(17px, 6.4cqw, 32px); }   /* cqw = กว้างของแผนที่ (xpart) — ต้องตั้งบนลูก ไม่ใช่ตัว container เอง */
.xp-pin { position: absolute; width: max(32px, var(--pin)); height: max(32px, var(--pin)); transform: translate(-50%, -50%); padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.xp-pin img { width: var(--pin); height: var(--pin); object-fit: contain; filter: drop-shadow(0 2px 2px #3e2c1666); }
.xp-pin.unk img { width: calc(var(--pin) * .74); height: calc(var(--pin) * .74); filter: grayscale(1) brightness(1.2) opacity(.45); }
.xp-pin.unk i { position: absolute; inset: 0; display: grid; place-items: center; font: 900 calc(var(--pin) * .42)/1 var(--font-head, inherit); font-style: normal; color: #5a4630; opacity: .75; text-shadow: 0 0 3px #fff, 0 0 2px #fff; pointer-events: none; }
.xp-pin.lock img { opacity: .35; }
.xp-pin.on { z-index: 2; transform: translate(-50%, -50%) scale(1.3); }
.xp-pin.on img { filter: drop-shadow(0 0 4px #fff4b8) drop-shadow(0 0 2px #e8b64a); }
.xp-pin.on.unk img { filter: grayscale(.4) drop-shadow(0 0 4px #fff4b8); }
.xp-pin:focus-visible { outline: 2px solid var(--teal, #2f6f73); outline-offset: 2px; border-radius: 8px; }
.xp-me { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #3f8f4e; border: 3px solid #fff; box-shadow: 0 0 0 2px #2f6f3c88; pointer-events: none; }
.xp-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: #6b5530; }
.xp-legend span { display: inline-flex; align-items: center; gap: 3px; }
.xp-legend img { width: 18px; height: 18px; object-fit: contain; }
.xp-unkf { margin-left: auto; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid #dcc898; background: #fbf4e2; color: #6b5530; font: 700 13px var(--font-head, inherit); cursor: pointer; }
.xp-unkf.on { background: var(--teal, #2f6f73); border-color: var(--teal, #2f6f73); color: #fff; }
.xp-legend .unk b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #d8ccb2; color: #5a4630; font-size: 12px; }

/* รางวัลขั้น % */
.xp-rw, .xp-det { padding: 8px 10px; border-radius: 13px; border: 1.5px solid #e6d6b0; background: linear-gradient(#fffdf8, #fbf1dc); }
.xp-rw h5 { margin: 0 0 6px; font: 800 15px var(--font-head, inherit); color: #6b4510; }
.xp-rw ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.xp-rw li { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 44px; padding: 4px 6px; border-radius: 10px; background: #f6efdc; }
.xp-rw li em { font: 800 14px var(--font-head, inherit); font-style: normal; text-align: center; padding: 3px 0; border-radius: 999px; background: #e7dcc2; color: #6b5530; }
.xp-rw li.got em, .xp-rw li.ready em { background: linear-gradient(#5cb86a, #3f8f4e); color: #fff; }
.xp-rw li span { font-size: 13px; line-height: 1.3; color: #4a3008; overflow-wrap: anywhere; }
.xp-rw li.ready { background: #fff8e2; box-shadow: 0 0 0 2px #e8b64a66; }
.xp-claim { min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid #c8901a; background: linear-gradient(#ffe08a, #f2b84a); color: #4a3008; font: 800 13px var(--font-head, inherit); cursor: pointer; white-space: nowrap; }
.xp-st { font: 700 13px var(--font-head, inherit); color: #9a8664; white-space: nowrap; }
.xp-st.ok { color: #2f6f3c; }

/* รายละเอียดจุด */
.xp-det .cx-back { display: none !important; }
.xp-dhead { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 10px; align-items: start; }
.xp-dart { width: 118px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid #d9c092; background: #efe4c8; }
.xp-dart.unk { filter: grayscale(.85) brightness(.95) blur(.6px); }
.xp-dhead b { display: flex; align-items: center; gap: 5px; font: 800 15.5px/1.25 var(--font-head, inherit); color: #2f5f63; overflow-wrap: anywhere; }
.xp-dhead b img { width: 22px; height: 22px; object-fit: contain; flex: none; }
.xp-dhead dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; margin: 5px 0 0; font-size: 13px; }
.xp-dhead dt { color: #8a6a3a; } .xp-dhead dd { margin: 0; color: #4a3008; }
.xp-dhead dd b.ok, .xp-dhead dd .ok { color: #2f8f4e; font-size: 13px; }
.xp-dhead dd b { font-size: 13px; color: #8a6a3a; display: inline; }
.xp-text { margin: 7px 0 0; font-size: 13.5px; line-height: 1.45; color: #4a3008; }
.xp-text.hint { font-style: italic; color: #6b5530; }
.xp-go { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; margin-top: 8px; border-radius: 999px; cursor: pointer;
  border: 2px solid #1f5256; background: linear-gradient(#3f8f8f, #2f6f73); color: #fff; font: 800 15px var(--font-head, inherit); box-shadow: inset 0 1px 0 #ffffff40, 0 2px 4px #1f525640; }
.xp-go:hover { filter: brightness(1.06); }

/* แคบ (มือถือแนวนอน ≤ 860): ยังเห็นแผนที่กับรายละเอียดข้างกัน — ย่อการ์ดสรุป (ไม่มีภาพ/คำบรรยาย) */
@container cxw (max-width: 860px) {
  /* จอเตี้ย: แผนที่ + รายละเอียดจุดขึ้นก่อน (เห็นทันทีไม่ต้องเลื่อน) · สรุป/รางวัลเลื่อนลงไปดู */
  .xp-cols { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 7px; }
  .xp-map { order: -1; } .xp-det { order: -1; }
  .xp-sum { grid-template-columns: minmax(0, 1fr); padding: 6px 8px; }
  .xp-sumart, .xp-sumtxt > p { display: none; }
  .xp-kinds { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .xp-kinds > span { grid-template-columns: 22px auto; padding: 3px 4px; justify-content: center; }
  .xp-kinds img { width: 22px; height: 22px; }
  .xp-kinds small { display: none; }
  .xp-dhead { grid-template-columns: 84px minmax(0, 1fr); }
  .xp-dart { width: 84px; height: 66px; }
  .xp-claim { min-height: 44px; }
  .xp-legend > span { display: none; }   /* จอเตี้ย: เหลือแค่ปุ่มกรอง */
  .xp-pin { --pin: clamp(14px, 4.2cqw, 20px); }   /* มือถือ ≈ 60% ของคอม · พื้นที่แตะยัง 32px */
}
@media (prefers-reduced-motion: reduce) { .xp-pin.on { transform: translate(-50%, -50%); } }
