/* แสตมป์มอนสเตอร์ (ใบ 204) — ชิ้นแสตมป์ (stamp-view.js) · ป้ายได้ซอง · ป๊อปอัปเปิดซอง (stamp-reveal.js) · หน้าแปะ (stamp-window.js) · สมุด (stamp-book.js)
   ⚠️ ตำแหน่งในแสตมป์มาจาก frames.json (ใส่เป็น % ในบรรทัด) — ที่นี่ตั้งแค่ขนาดรวม (--w) ชั้น และสี · ชื่อบนป้ายใช้ cqw = ขนาดเท่ากันทุก Rank
   แอนิเมชัน transform/opacity เท่านั้น · infinite มีแค่เงาวิ่ง Rank S ตอนอยู่บนจอ (.live จาก IntersectionObserver) · ไม่มี canvas */
.srv-rk, .stp-tagr { --rkc: #6fae5a; }
.srv-rk.rB, .stp-tagr.rB { --rkc: #4a8fd0; } .srv-rk.rA, .stp-tagr.rA { --rkc: #9a6ad8; } .srv-rk.rS, .stp-tagr.rS { --rkc: #e8b64a; }

/* ── ชิ้นแสตมป์ ── */
.stp { --w: 132px; position: relative; display: inline-block; flex: none; width: var(--w); aspect-ratio: 0.6446; container-type: inline-size; vertical-align: middle; line-height: 0; text-align: left; isolation: isolate; }
.stp-xs { --w: 27px; } .stp-s { --w: 72px; } .stp-m { --w: 132px; } .stp-l { --w: 216px; }
.stp > *, .stp-win > * { position: absolute; }
.stp-win { overflow: hidden; border-radius: 10% / 7%; background: #efe3c4; }
.stp-sh { border-radius: 50%; background: radial-gradient(closest-side, rgba(60, 40, 20, .42), rgba(60, 40, 20, .16) 62%, rgba(60, 40, 20, 0)); }
.stp-fr, .stp-bd, .stp-pl { pointer-events: none; }
.stp-pl { display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 0 2%; }
/* ชื่อบนป้าย (เฟส 2 · ผู้ใช้: "มือถือป้ายชื่อว่าง"): 6% ของความกว้างแสตมป์ แต่ย่อตามความยาวชื่อให้พอดีป้าย (--len = จำนวนตัวอักษร · Mitr 600 ≈ 0.56em/ตัว · ป้ายกว้าง ~62%)
   ไม่ต่ำกว่า 13px (กฎตัวอักษรขั้นต่ำ) — ยังไม่พอดีที่ 13px = ตัดท้าย "…" (ป้ายไม่ว่างอีกต่อไป) · แสตมป์เล็ก s/xs ไม่มีป้าย */
.stp-pl b { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 13px/1.2 'Mitr', 'Anuphan', sans-serif; font-size: max(13px, min(6cqw, calc(108cqw / var(--len, 8)))) !important; color: #5a381c; letter-spacing: 0; }   /* !important: กฎพื้นหน้าต่าง .win b/span { font-size: inherit } */
.stp-pl { padding: 0 1%; }
.stp-pl b.long { letter-spacing: -.035em; font-weight: 500; }   /* ชื่อยาว (≥ 12 ตัว เช่น Magma Serpent) — บีบระยะตัวอักษรก่อนต้องตัด … */
.stp-pl .pl-sh { display: none; }
@container (max-width: 112px) { .stp-pl b { letter-spacing: -.04em; font-weight: 500; } .stp-pl .pl-fu { display: none; } .stp-pl .pl-sh { display: inline; } }
@container (max-width: 150px) { .stp-pl b.n12 .pl-fu { display: none; } .stp-pl b.n12 .pl-sh { display: inline; } }   /* ชื่อ ≥ 12 ตัว */   /* แสตมป์แคบ (ช่องแปะมือถือ): ชื่อย่อ "Magma S." แทนการตัดกลางคำ */
/* ความหายากของสายพันธุ์ (เฟส 2): ✦ หายาก · ♛ บอส มุมขวาบน (ไม่ทับเหรียญ Rank ซ้ายบน) */
.stp-tc { right: 4%; top: 3.2%; z-index: 3; width: 17%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; pointer-events: none; line-height: 1;
  font: 700 max(9px, 10cqw)/1 'Mitr', sans-serif; color: #fff8e4; text-shadow: 0 1px 1px rgba(60, 30, 0, .55); box-shadow: 0 1px 3px rgba(60, 30, 10, .35), inset 0 0 0 1.5px rgba(255, 248, 220, .85); }
.stp-tc.t-rare { background: radial-gradient(circle at 35% 30%, #c9a8ff, #7a52c8 75%); }
.stp-tc.t-boss { background: radial-gradient(circle at 35% 30%, #ffe08a, #c8862a 75%); }
.stp.sil .stp-tc { filter: grayscale(.6); opacity: .7; }
.stp-tier { display: inline-flex; align-items: center; gap: .2em; padding: .05em .55em; margin-right: .35em; border-radius: 999px; font-weight: 700; font-size: .86em; line-height: 1.5; color: #fff8e4; vertical-align: middle; white-space: nowrap; }
.stp-tier.t-rare { background: linear-gradient(135deg, #a07ae6, #6a44b8); }
.stp-tier.t-boss { background: linear-gradient(135deg, #f0c45a, #b9782a); }
.stp-skic { width: 1.5em; height: 1.5em; object-fit: contain; border-radius: 22%; vertical-align: middle; flex: none; box-shadow: 0 1px 2px rgba(60, 40, 20, .3); }
.stp-bd { translate: 0 -50%; filter: drop-shadow(.5cqw 1.2cqw 1.2cqw rgba(70, 40, 10, .5)); }
.stp-xs .stp-win { border-radius: 8% / 6%; }
/* ยังไม่เคยได้ = เงาเทา */
.stp.sil .stp-bg, .stp.sil .stp-fr { filter: grayscale(1) brightness(1.06); opacity: .55; }
.stp.sil .stp-mob { filter: brightness(0); opacity: .28; }
.stp.sil .stp-sh, .stp.sil .stp-bd { display: none; }
.stp.sil .stp-pl b { color: #8a7a62; }
/* Rank S: เงาทองวิ่งผ่านกรอบ (เฉพาะตอนอยู่บนจอ) + ประกาย 3 จุด */
.stp-shine { inset: 0; overflow: hidden; pointer-events: none; -webkit-mask: url('assets/ui/stamp/frame_s.webp') 0 0 / 100% 100% no-repeat; mask: url('assets/ui/stamp/frame_s.webp') 0 0 / 100% 100% no-repeat; }
.stp-shine::before { content: ''; position: absolute; top: -10%; bottom: -10%; left: 0; width: 38%; background: linear-gradient(90deg, rgba(255, 248, 215, 0), rgba(255, 250, 225, .75), rgba(255, 248, 215, 0)); transform: translateX(-130%) skewX(-16deg); }
.stp.rS.live .stp-shine::before { animation: stp-sweep 3s ease-in-out infinite; }
@keyframes stp-sweep { 0% { transform: translateX(-130%) skewX(-16deg); } 55%, 100% { transform: translateX(330%) skewX(-16deg); } }
.stp-spk { width: 9%; aspect-ratio: 1; pointer-events: none; opacity: .0; background: radial-gradient(closest-side, #fff 0 18%, rgba(255, 240, 190, .9) 30%, rgba(255, 230, 160, 0) 72%);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }
.stp-spk.k1 { left: 76%; top: 9%; } .stp-spk.k2 { left: 6%; top: 62%; width: 7%; } .stp-spk.k3 { left: 85%; top: 80%; width: 6%; }
.stp.rS .stp-spk { opacity: .85; }
.stp.rS.live .stp-spk { animation: stp-twinkle 2.4s ease-in-out infinite; } .stp.rS.live .stp-spk.k2 { animation-delay: .8s; } .stp.rS.live .stp-spk.k3 { animation-delay: 1.6s; }
@keyframes stp-twinkle { 0%, 100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1); } }
.stp-xs .stp-spk, .stp-xs .stp-shine { display: none; }

/* ซองปิดผนึก — เงามอนจางในหน้าต่างกลม (ตรงวงตราไปรษณีย์) */
.stp-env { --ew: 120px; position: relative; display: inline-block; flex: none; width: var(--ew); aspect-ratio: 256 / 185; line-height: 0; vertical-align: middle; }
.env-xs { --ew: 46px; } .env-s { --ew: 64px; } .env-m { --ew: 120px; } .env-l { --ew: 236px; }
.env-win { position: absolute; left: 84%; top: 66%; width: 24%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 40% 35%, #fffaf0, #efe0bd); box-shadow: inset 0 0 0 1.5px #c99f58, inset 0 1px 4px rgba(80, 50, 20, .25), 0 1px 2px rgba(80, 50, 20, .25); }
.env-win img { filter: blur(1.2px) sepia(.25); opacity: .55; }
.env-xs .env-win img { filter: blur(.6px) sepia(.25); }

/* ช่องว่างรูปแสตมป์ (สูงเท่าแสตมป์ขนาดเดียวกัน) */
.stp-empty { --w: 132px; position: relative; display: inline-grid; place-items: center; flex: none; height: calc(var(--w) / 0.6446 * .9); margin: calc(var(--w) / 0.6446 * .05) 0; aspect-ratio: 288 / 348; max-width: 100%; }
.stp-empty.stp-s { --w: 72px; }
.stp-empty.locked img { opacity: .55; filter: grayscale(.6); }
.stp-lock { position: relative; z-index: 1; padding: 3px 8px; border-radius: 99px; background: #fffaf0e6; border: 1px solid #d9c08a; font: 600 12.5px/1.25 'Mitr', 'Anuphan', sans-serif; color: #6b4f22; white-space: nowrap; }

/* ป้าย Rank เล็ก (Rank pill) + ป้ายมุมช่อง */
.srv-rk { font-size: 12px !important; display: inline-grid; place-items: center; min-width: 22px; height: 20px; box-sizing: border-box; padding: 0 7px; border-radius: 99px; background: var(--rkc); color: #fff; font: 600 12px/1 'Mitr', 'Anuphan', sans-serif; text-shadow: 0 1px 0 #0003; vertical-align: middle; }
.srv-rk.rS { color: #5a3a08; text-shadow: 0 1px 0 #fff6; }
html body .stp-tagr { position: absolute; left: 2px; top: 2px; z-index: 2; min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box; border-radius: 6px; background: var(--rkc); color: #fff; font: 600 13px/18px 'Mitr', sans-serif; text-align: center; pointer-events: none; }
html body .stp-tagr.rS { color: #5a3a08; }
/* ===== stamp-rank-tag-1112 · ป้าย Rank บนแสตมป์ในกระเป๋า: ไม่มีป้ายลอย (เหรียญที่วาดในภาพทำหน้าที่เอง) + ช่องมีกรอบสีตาม Rank (stkC/B/A/S จาก ui.js) · ป้ายยาว .srv-rk ไล่สีเข้าชุด · ?stprk=0 = แบบเดิมทั้งหมด ===== */
/* แบบ 3: ไม่มีป้ายลอย — เหรียญ+กรอบที่วาดในภาพแสตมป์ทำหน้าที่เอง · ช่องกระเป๋าได้วงขอบสีตาม Rank (คลาส stkC/B/A/S ใส่จาก ui.js) ให้กวาดตาแยกได้ · S ขอบทองหนา+เรืองนิ่ง */
html:not(.stprk0) body :is(.inv, .spg-box) .stp-tagr { display: none; }
html:not(.stprk0) body #windows :is(.inv, .spg-box) .slot.stkC:not(.sel):not(.x):not(.y) { border-color: #6fae5a; box-shadow: inset 0 0 0 1.5px #6fae5a; background: radial-gradient(circle at 50% 38%, #fff, #eaf4e3); }
html:not(.stprk0) body #windows :is(.inv, .spg-box) .slot.stkB:not(.sel):not(.x):not(.y) { border-color: #4a8fd0; box-shadow: inset 0 0 0 1.5px #4a8fd0; background: radial-gradient(circle at 50% 38%, #fff, #e1eefa); }
html:not(.stprk0) body #windows :is(.inv, .spg-box) .slot.stkA:not(.sel):not(.x):not(.y) { border-color: #9a6ad8; box-shadow: inset 0 0 0 1.5px #9a6ad8; background: radial-gradient(circle at 50% 38%, #fff, #efe6fa); }
html:not(.stprk0) body #windows :is(.inv, .spg-box) .slot.stkS:not(.sel):not(.x):not(.y) { border-color: #e8b64a; box-shadow: inset 0 0 0 3px #e8b64a, inset 0 0 10px #ffd86b, 0 0 7px #f6cf5acc; background: radial-gradient(circle at 50% 38%, #fffbe8, #fbe9b0); }
/* ป้ายยาว .srv-rk (หน้าแสตมป์/สมุด/เปิดซอง/ตลาด) เข้าชุดเดียวกัน: ไล่สีตาม Rank เหมือนริบบิ้น + ขอบทองบาง + ฟอนต์หัวเรื่อง · S ทองเรืองนิ่ง (ไม่มีอนิเมชัน) */
html:not(.stprk0) .srv-rk { --rkc2: #3f7a38; background: linear-gradient(var(--rkc), var(--rkc2)); border: 1.5px solid #e8c872; font-family: var(--font-head, 'Mitr', serif); font-weight: 800; letter-spacing: .02em; text-shadow: 0 1px 0 #0006; box-shadow: 0 1px 2px #3a2a1066, inset 0 1px 0 #fff5; }
html:not(.stprk0) .srv-rk.rB { --rkc2: #2f68a8; } html:not(.stprk0) .srv-rk.rA { --rkc2: #6c3fb0; }
html:not(.stprk0) .srv-rk.rS { --rkc: #f9d768; --rkc2: #d8901c; color: #5a3208; text-shadow: 0 1px 0 #fff9; border-color: #fff0b8; box-shadow: 0 1px 2px #3a2a1066, 0 0 6px #ffd86bcc, inset 0 1px 0 #fff9; }
.stv-ic, .bp-ic { position: relative; }
.slot > .stp.bag-stp { --w: 34px; pointer-events: none; margin: auto; }

/* แถบช่วงค่า + คุณภาพ */
.stp-range { display: grid; grid-template-columns: auto minmax(60px, 1fr) auto; align-items: center; column-gap: 8px; row-gap: 2px; font: 600 12.5px/1.2 var(--font, sans-serif); color: #6b5a3a; }
.sr-bar { position: relative; height: 10px; border-radius: 99px; background: #eadfc6; box-shadow: inset 0 1px 2px rgba(80, 50, 20, .2); }
.sr-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: linear-gradient(90deg, #9fd0cc, #2f6f73); transform-origin: 0 50%; }
.stp-range.hi .sr-fill { background: linear-gradient(90deg, #f6dc8e, #e8b64a); }
.sr-pin { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; box-sizing: border-box; border-radius: 50%; background: #fffaf0; border: 3px solid #2f6f73; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.stp-range.hi .sr-pin { border-color: #c8901a; }
.sr-q { grid-column: 1 / -1; text-align: center; color: #7a6540; }
.sr-q b { color: #2f6f73; font-size: 14px; } .stp-range.hi .sr-q b { color: #a8681a; }

/* ตารางอัตรา/ช่วง (การ์ดไอเทม · สมุด) */
.stp-rt { width: 100%; border-collapse: collapse; font: 500 13px/1.3 var(--font, sans-serif); color: #4a3a20; }
.stp-rt th { font: 600 12px var(--font-head, sans-serif); color: #8a6a3a; text-align: left; padding: 2px 6px; border-bottom: 1px solid #e6d6b0; }
.stp-rt td { padding: 3px 6px; border-bottom: 1px dashed #eadfc6; }
.stp-rt tr.on td, .stp-rt tr.got td { background: #fff4d6; }
.stp-rt tr.got td:last-child { color: #2f6f3c; font-weight: 700; }

/* ── ข้อความลอยตอนซองตก (main.js floatText 'stamp') ── */
.dmg.stamp { color: #fff3c8; font: 700 17px var(--font-head, sans-serif); -webkit-text-stroke: 0; text-shadow: 0 1px 0 #8a5a10, 0 0 6px #e8b64acc, 0 2px 3px #0009; }

/* ── ป้ายได้ซอง/ค้นพบคอมโบ #stamp-toast = ป้ายแจ้งมาตรฐาน notify.js (ui-notify.css · popup-std-1022) ── */

/* ── ป๊อปอัปเปิดซอง #stamp-reveal (ชั้น Popup) ── */
#stamp-reveal { position: fixed; z-index: var(--z-popup, 300); inset: 0; display: grid; place-items: center; box-sizing: border-box; background: rgba(14, 22, 30, .55);
  padding: max(10px, var(--sa-t, 0px)) max(12px, var(--sa-r, 0px)) max(10px, var(--sa-b, 0px)) max(12px, var(--sa-l, 0px)); font-family: var(--font, sans-serif); }
.srv { --rk: #6fae5a; } .srv.rB { --rk: #4a8fd0; } .srv.rA { --rk: #9a6ad8; } .srv.rS { --rk: #e8b64a; }
.srv-card { --sw: min(216px, calc((min(70vh, 100vh - 24px) - 40px) * .6446)); position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 18px;
  width: min(680px, 100%); max-height: min(100%, 100vh - 20px); box-sizing: border-box; padding: 18px 22px 18px 18px; overflow: hidden;
  border-radius: 22px; border: 2px solid var(--rk); background: linear-gradient(#fffaf0, #f6ead0); box-shadow: inset 0 0 0 5px #fffaf0, 0 14px 40px rgba(0, 0, 0, .45); color: #4a3a20; }
.srv-stage { position: relative; width: calc(var(--sw) * 1.12); height: calc(var(--sw) / .6446 + 8px); display: grid; place-items: center; }
.srv-glow { position: absolute; inset: -10% -20%; background: radial-gradient(closest-side, rgba(255, 220, 130, .65), rgba(255, 220, 130, 0)); opacity: 0; transition: opacity .5s; pointer-events: none; }
.srv.rS.s4 .srv-glow { opacity: 1; } .srv.rA.s4 .srv-glow { opacity: .45; }
.srv-stamp { position: relative; z-index: 1; opacity: 0; transform: translateY(26%) scale(.94); transition: opacity .28s ease-out, transform .32s cubic-bezier(.2, .9, .3, 1.1); }
.srv-stamp .stp { --w: var(--sw); }
.srv.s3 .srv-stamp { opacity: 1; transform: none; }
.srv-fr0 { filter: grayscale(1) sepia(.35) brightness(1.06); transition: opacity .35s ease-out; pointer-events: none; }
.srv.s4 .srv-fr0 { opacity: 0; }
.srv .stp-bd { opacity: 0; scale: 2.2; }
.srv.s4 .stp-bd { animation: srv-stamp .34s cubic-bezier(.3, 1.5, .55, 1) both; }
@keyframes srv-stamp { 0% { opacity: 0; scale: 2.2; } 60% { opacity: 1; scale: .9; } 100% { opacity: 1; scale: 1; } }
.srv.done .stp-bd { opacity: 1; scale: 1; animation: none; }
.srv.rS.s4 .stp-shine::before { animation: stp-sweep 1.4s ease-out 1 .1s; }
.srv-env { position: absolute; z-index: 2; left: 50%; top: 50%; translate: -50% -38%; pointer-events: none; }
.srv-env .stp-env { --ew: calc(var(--sw) * 1.12); }
.srv-env.top { clip-path: polygon(0 0, 100% 0, 100% 50%, 92% 46%, 84% 51%, 76% 46%, 68% 51%, 60% 46%, 52% 51%, 44% 46%, 36% 51%, 28% 46%, 20% 51%, 12% 46%, 4% 51%, 0 48%); }
.srv-env.bot { clip-path: polygon(0 48%, 4% 51%, 12% 46%, 20% 51%, 28% 46%, 36% 51%, 44% 46%, 52% 51%, 60% 46%, 68% 51%, 76% 46%, 84% 51%, 92% 46%, 100% 50%, 100% 100%, 0 100%); }
.srv.s1 .srv-env { animation: srv-shake .36s ease-in-out 1; }
@keyframes srv-shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-3deg); } 45% { transform: rotate(3deg); } 70% { transform: rotate(-2deg); } 88% { transform: rotate(1deg); } }
.srv-env { transition: transform .32s ease-in, opacity .3s ease-in; }
.srv.s2 .srv-env.top { transform: translateY(-48%) rotate(-10deg); opacity: 0; }
.srv.s2 .srv-env.bot { transform: translateY(42%) rotate(4deg); opacity: 0; }
.srv-info { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.srv-kick { margin: 0; font: 500 13px var(--font); color: #8a6a3a; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.srv-new { font-style: normal; padding: 1px 8px; border-radius: 99px; background: #2f6f73; color: #fff; font: 600 12px var(--font-head, var(--font)); }
.srv-name { margin: 0; font: 600 21px/1.2 var(--font-head, var(--font)); color: #4a2e12; overflow-wrap: anywhere; }
.srv-rank { margin: 0; display: flex; align-items: center; gap: 8px; }
.srv-rank .srv-rk { height: 26px; font-size: 14px !important; padding: 0 12px; }
.srv.rS .srv-rank .srv-rk { letter-spacing: .06em; box-shadow: 0 0 0 2px #fff3c4, 0 0 10px #e8b64a99; }
.srv-fx { margin: 0; display: flex; align-items: center; gap: 8px; }
.srv-fx .ui-ic { width: 26px; height: 26px; flex: none; }
.srv-fx span { display: grid; min-width: 0; } .srv-fx b { font: 600 15px/1.25 var(--font-head, var(--font)); color: #2f6f73; } .srv-fx small { font: 500 12.5px/1.3 var(--font); color: #6b5a3a; }
.srv-val { margin: 0; } .srv-num { font: 600 34px/1 var(--font-head, var(--font)); color: #2f6f73; font-variant-numeric: tabular-nums; }
.srv.rS .srv-num { color: #a8681a; }
.srv-bound { margin: 0; font: 500 12.5px var(--font); color: #a0402a; }
.srv-acts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }
.srv-acts[hidden], .srv-ask[hidden], .srv-price[hidden] { display: none; }
.srv-acts button, .srv-ask button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid #cdb27a; background: #fffaf0; color: #5b4526; font: 600 14px var(--font-head, var(--font)); cursor: pointer; }
.srv-acts button.main, .srv-ask button.main { border-color: #245d60; background: linear-gradient(#3f8584, #2f6f73); color: #fff; }
.srv-acts button:disabled { opacity: .55; cursor: default; }
.srv-acts .ui-ic { width: 18px; height: 18px; }
.srv-up { font-style: normal; color: #ffe48a; font-size: 12px; }
.srv-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 12px; background: #fff4d6; border: 1px solid #e8c77a; }
.srv-ask p { margin: 0; flex: 1 1 100%; font: 500 13.5px/1.4 var(--font); color: #5b4526; } .srv-ask b { color: #a0402a; }
.srv-price { display: grid; gap: 4px; } .srv-price > small { color: #8a6a3a; font: 500 12px var(--font); }
/* จังหวะ: ชื่อ/Rank ขึ้นพร้อมแสตมป์ · ค่า/แถบ/ปุ่มขึ้นตอน ⑤ */
.srv-info > * { transition: opacity .25s ease-out, transform .25s ease-out; }
.srv:not(.s3) :is(.srv-kick, .srv-name) { opacity: 0; transform: translateY(6px); }
.srv:not(.s4) :is(.srv-rank, .srv-fx) { opacity: 0; transform: translateY(6px); }
.srv:not(.all):not(.s5) :is(.srv-val, .stp-range, .srv-bound, .srv-acts) { opacity: 0; transform: translateY(6px); }
.srv .sr-fill { transition: transform .45s ease-out .05s; } .srv:not(.s5) .sr-fill { transform: scaleX(0); }
.srv .sr-pin { transition: opacity .2s .4s, transform .25s .4s; } .srv:not(.s5) .sr-pin { opacity: 0; transform: scale(.4); }
/* ── เอฟเฟกต์ภาพแยกชั้น (เฟส 2 · ผู้ใช้ "เปิดซองไม่ว้าว") — ภาพ webp เดิมของเกม + สีของ Rank ผ่าน mask · transform/opacity เท่านั้น · จำกัดรอบ (ไม่มี infinite) ──
   tease: glow.webp เรืองรอบซองตอนสั่น · rays: rays.webp หมุนหลังแสตมป์ · ring: ring_<rank>/s_ring.webp วงคลื่นตอนปั๊ม · sparks: spark.webp พุ่งออก
   A: aura.webp ม่วง · B: เงาฟ้าวิ่งผ่านกรอบ · S: fish-aura.webp ตะวันทองหมุนหลังป๊อปอัป + s_burst.webp + ริบบิ้น + ขอบจอทอง */
.srv-stage > :is(.srv-tease, .srv-rays, .srv-aura, .srv-ring, .srv-burst, .srv-sparks) { position: absolute; left: 50%; top: 50%; pointer-events: none; }
.srv-tease { z-index: 0; width: 150%; aspect-ratio: 1; translate: -50% -46%; background: var(--rk); -webkit-mask: url('assets/particles/glow.webp') center / contain no-repeat; mask: url('assets/particles/glow.webp') center / contain no-repeat; opacity: 0; scale: .6; }
.srv.s1 .srv-tease { animation: srv-tease .5s ease-out 1 both; }
.srv.rS.s1 .srv-tease { animation: srv-tease .72s ease-out 1 both; }
@keyframes srv-tease { 0% { opacity: 0; scale: .5; } 55% { opacity: .95; scale: 1.05; } 80% { opacity: .7; scale: .95; } 100% { opacity: 1; scale: 1.1; } }
.srv.s3 .srv-tease { animation: srv-tease-out .5s ease-out 1 both; }
@keyframes srv-tease-out { from { opacity: 1; scale: 1.1; } to { opacity: 0; scale: 1.6; } }
.srv-rays { z-index: 0; width: 190%; aspect-ratio: 1; translate: -50% -50%; background: radial-gradient(closest-side, #fff 0 20%, var(--rk) 55%, var(--rk)); -webkit-mask: url('assets/ui/luckybell/rays.webp') center / contain no-repeat; mask: url('assets/ui/luckybell/rays.webp') center / contain no-repeat; opacity: 0; scale: .3; }
.srv.s3 .srv-rays { animation: srv-rays-in .45s cubic-bezier(.2, .9, .3, 1.15) 1 both, srv-spin 14s linear 1 .1s; }
.srv.done .srv-rays { opacity: .55; scale: 1; }
@keyframes srv-rays-in { from { opacity: 0; scale: .3; } to { opacity: .8; scale: 1; } }
@keyframes srv-spin { from { rotate: 0deg; } to { rotate: 360deg; } }
.srv-aura { z-index: 0; width: 135%; aspect-ratio: 1; translate: -50% -50%; background: var(--rk); -webkit-mask: url('assets/particles/aura.webp') center / contain no-repeat; mask: url('assets/particles/aura.webp') center / contain no-repeat; opacity: 0; scale: .7; }
.srv.s4 .srv-aura { animation: srv-aura .7s ease-out 1 both; }
.srv.done .srv-aura { opacity: .55; scale: 1.05; }
@keyframes srv-aura { 0% { opacity: 0; scale: .6; } 40% { opacity: .95; scale: 1.15; } 100% { opacity: .6; scale: 1.05; } }
.srv-ring { z-index: 0; width: 95%; aspect-ratio: 1; translate: -50% -50%; background: var(--rk); -webkit-mask: url('assets/particles/k_circle_03.webp') center / contain no-repeat; mask: url('assets/particles/k_circle_03.webp') center / contain no-repeat; opacity: 0; scale: .4; }
.srv.s4:not(.done) .srv-ring { animation: srv-ring .6s cubic-bezier(.15, .7, .3, 1) 1 both; }
@keyframes srv-ring { 0% { opacity: 1; scale: .45; } 55% { opacity: .9; } 100% { opacity: 0; scale: 2.3; } }
.srv-burst { z-index: 3; width: 120%; height: auto; translate: -50% -50%; opacity: 0; scale: .3; }
.srv.s4:not(.done) .srv-burst { animation: srv-burst .7s ease-out 1 both; }
@keyframes srv-burst { 0% { opacity: 0; scale: .3; rotate: -20deg; } 25% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1.5; rotate: 15deg; } }
.srv-sparks { z-index: 4; width: 0; height: 0; }
.srv-sparks i { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; background: url('assets/ui/pet/spark.webp') center / contain no-repeat; opacity: 0; rotate: var(--a); }
.srv.rS .srv-sparks i { width: 24px; height: 24px; left: -12px; top: -12px; }
.srv.s4:not(.done) .srv-sparks i { animation: srv-spark .75s cubic-bezier(.2, .8, .3, 1) 1 both; }
@keyframes srv-spark { 0% { opacity: 0; transform: translateY(0) scale(.4); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(calc(var(--sw) * -.95 * var(--d))) scale(1.1); } }
/* การ์ดเต้นเบา ๆ ตอนเหรียญปั๊ม (screen pulse) */
.srv.s4:not(.done) .srv-card { animation: srv-pulse .34s ease-out 1; }
@keyframes srv-pulse { 0% { scale: 1; } 35% { scale: 1.025; } 100% { scale: 1; } }
/* แสตมป์พุ่งขึ้นแรงกว่าเดิม (overshoot) */
.srv.s3:not(.done) .srv-stamp { animation: srv-pop .42s cubic-bezier(.2, 1.4, .4, 1) 1 both; }
@keyframes srv-pop { 0% { opacity: 0; transform: translateY(42%) scale(.85); } 70% { opacity: 1; transform: translateY(-5%) scale(1.04); } 100% { opacity: 1; transform: none; } }
/* B: เงาฟ้าวิ่งผ่านกรอบ 1 รอบ */
.srv-shim { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; -webkit-mask: url('assets/ui/stamp/frame_b.webp') 0 0 / 100% 100% no-repeat; mask: url('assets/ui/stamp/frame_b.webp') 0 0 / 100% 100% no-repeat; }
.srv-shim::before { content: ''; position: absolute; top: -10%; bottom: -10%; left: 0; width: 40%; background: linear-gradient(90deg, rgba(200, 235, 255, 0), rgba(225, 245, 255, .95), rgba(200, 235, 255, 0)); transform: translateX(-130%) skewX(-16deg); }
.srv.rB.s4 .srv-shim::before { animation: stp-sweep 1.1s ease-out 1 .05s; }
/* S: ตะวันทองหลังทั้งป๊อปอัป + ขอบจอทองจาง + ริบบิ้น */
#stamp-reveal > .srv-sun, #stamp-reveal > .srv-vig { position: absolute; pointer-events: none; }
.srv-sun { left: 50%; top: 50%; width: min(120vmin, 860px); aspect-ratio: 1; translate: -50% -50%; background: url('assets/ui/life/fish-aura.webp') center / contain no-repeat; opacity: 0; scale: .4; }
.srv.rS.s4 > .srv-sun { animation: srv-sun-in .6s ease-out 1 both, srv-spin 24s linear 1; }
.srv.rS.done > .srv-sun { opacity: .42; scale: 1; }
@keyframes srv-sun-in { from { opacity: 0; scale: .4; } to { opacity: .55; scale: 1; } }
.srv-vig { inset: 0; background: radial-gradient(ellipse at center, rgba(255, 210, 110, 0) 45%, rgba(255, 196, 80, .38) 100%); opacity: 0; transition: opacity .5s; }
.srv.rS.s1 > .srv-vig { opacity: .5; } .srv.rS.s4 > .srv-vig { opacity: 1; }
.srv-ribbon { position: absolute; z-index: 5; left: 18px; top: 12px; margin: 0; pointer-events: none; opacity: 0; transform: translateY(-14px) rotate(-6deg) scale(1.3); }
.srv-ribbon span { display: inline-block; padding: 4px 18px 5px; border-radius: 6px; background: linear-gradient(#ffe48a, #e8b64a 60%, #c8901a); color: #5a3a08; font: 700 18px/1 var(--font-head, var(--font)); letter-spacing: .12em; box-shadow: 0 3px 0 #a8681a, 0 6px 14px rgba(120, 70, 0, .45); border: 2px solid #fff3c4; }
.srv.rS.s4 .srv-ribbon { animation: srv-ribbon .42s cubic-bezier(.3, 1.6, .5, 1) 1 .12s both; }
.srv.rS.done .srv-ribbon { opacity: 1; transform: rotate(-6deg); }
@keyframes srv-ribbon { from { opacity: 0; transform: translateY(-14px) rotate(-6deg) scale(1.3); } to { opacity: 1; transform: rotate(-6deg) scale(1); } }
.srv-card { z-index: 1; }
.srv-name .stp-tier { font-size: 12.5px; }
.srv-fx .stp-skic { width: 28px; height: 28px; }
/* ใบไม้/ประกายโปรย (S) */
.srv-petals { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.srv-petals i { position: absolute; top: -30px; background-image: url('assets/ui/pet/petals.webp'); background-repeat: no-repeat; animation: srv-fall 2s ease-in both; }
@keyframes srv-fall { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 12% { opacity: 1; } 100% { transform: translate(var(--dx), 420px) rotate(var(--r)); opacity: 0; } }
/* เปิดทั้งหมด — ตารางสรุป */
.srv-card.sra { grid-template-columns: minmax(0, 1fr); gap: 10px; width: min(560px, 100%); align-items: stretch; }
.sra-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .sra-head > b { font: 600 19px var(--font-head, var(--font)); color: #4a2e12; margin-right: auto; }
.sra-cnt { display: flex; gap: 5px; } .sra-cnt i { font-style: normal; padding: 2px 8px; border-radius: 99px; font: 600 12.5px var(--font-head, var(--font)); color: #fff; background: #6fae5a; }
.sra-cnt i.rB { background: #4a8fd0; } .sra-cnt i.rA { background: #9a6ad8; } .sra-cnt i.rS { background: #e8b64a; color: #5a3a08; } .sra-cnt i.z { opacity: .35; }
.sra-list { list-style: none; margin: 0; padding: 2px; display: grid; gap: 6px; min-height: 0; max-height: min(52vh, 420px); overflow-y: auto; overscroll-behavior: contain; }
.sra-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 5px 10px 5px 8px; border-radius: 12px; background: #fffdf6; border: 1px solid #eadcb8; }
.sra-row .stp { --w: 44px; }
.sra-row.rA { background: #f6f0ff; border-color: #c9b2ee; } .sra-row.rS { background: #fff6dc; border-color: #e8b64a; box-shadow: 0 0 0 2px #e8b64a44; }
.sra-tx { display: grid; min-width: 0; } .sra-tx b { font: 600 14.5px/1.25 var(--font-head, var(--font)); } .sra-tx small { font: 500 12.5px/1.3 var(--font); color: #6b5a3a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sra-v { display: grid; justify-items: end; gap: 1px; } .sra-v > span { display: inline-flex; align-items: center; gap: 6px; } .sra-v b { font: 600 17px var(--font-head, var(--font)); color: #2f6f73; } .sra-v small { font: 500 12px var(--font); color: #7a6540; }
.sra-left { margin: 0; font: 500 13px var(--font); color: #a0402a; }
.srv.all .sra-row { opacity: 0; transform: translateY(6px); transition: opacity .2s ease-out, transform .2s ease-out; transition-delay: calc(var(--i) * 60ms); }
.srv.all.go .sra-row { opacity: 1; transform: none; }
/* จอเตี้ย (มือถือแนวนอน): การ์ดสูง ≤ 70% จอ · ตัวเล็กลง */
@media (max-height: 520px) {
  .srv-card { gap: 12px; padding: 10px 14px 10px 12px; max-height: 70vh; width: min(560px, 100%); }
  .srv-card.sra { max-height: 92vh; }
  .srv-info { gap: 4px; max-height: calc(70vh - 20px); overflow-y: auto; }
  .srv-kick { font-size: 12px; } .srv-name { font-size: 16px; } .srv-num { font-size: 24px; }
  .srv-fx .ui-ic { width: 20px; height: 20px; } .srv-fx b { font-size: 13.5px; } .srv-fx small { font-size: 12px; }
  .srv-acts { gap: 5px; } .srv-acts button, .srv-ask button { min-height: 40px; padding: 0 10px; font-size: 13px; }
  .stp-range { font-size: 12px; }
  .sra-list { max-height: 52vh; }
}
html.touch-ui .srv-acts button, html.touch-ui .srv-ask button { min-height: 44px; }

/* ── หน้าแปะแสตมป์ (หน้าต่าง stamps) ── */
.spg { position: relative; display: grid; grid-template-columns: 260px minmax(0, 1fr); grid-template-areas: "tabs tabs" "side main" "sheet sheet"; gap: 12px 16px; font-family: var(--font, sans-serif); color: #4a3a20; }
.spg-side { grid-area: side; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.spg-main { grid-area: main; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.spg-pv { display: grid; place-items: center; height: 230px; border-radius: 16px; overflow: hidden; border: 1px solid #e0cfab;
  background: radial-gradient(ellipse 46% 9% at 50% 88%, #d9c79c 0 60%, transparent 62%), radial-gradient(circle at 50% 40%, #fffaf0, #efe2c2 70%); }
.spg-pv canvas { width: 152px !important; height: 230px !important; }
.spg-tot { padding: 10px 12px; border-radius: 14px; background: #fffaf0; border: 1px solid #e6d6b0; }
.spg-tot h5, .spg-own h5 { margin: 0 0 6px; font: 600 14px var(--font-head, var(--font)); color: #245d60; }
.spg-totl { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.spg-totl li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 6px; font: 500 13px/1.3 var(--font); }
.spg-totl li .ui-ic { width: 20px; height: 20px; } .spg-totl li b { font: 600 14px var(--font-head, var(--font)); color: #2f6f73; }
.spg-cap { grid-column: 2 / -1; justify-self: end; font-style: normal; font: 600 11.5px var(--font); color: #a0402a; background: #fde9df; padding: 0 6px; border-radius: 99px; }
.spg-leaf { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font: 500 12.5px var(--font); color: #2f6f3c; }
.spg-leaf img { width: 20px; height: 20px; object-fit: contain; flex: none; }
.spg-none { margin: 0; font: 500 13px/1.4 var(--font); color: #8a7a62; }
.spg-pickbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 12px; background: #e3f1ef; border: 1px solid #9fc9c4; font: 600 14px var(--font-head, var(--font)); color: #245d60; }
html body #windows .spg-pickbar button { min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid #9fc9c4; background: #fff; color: #245d60; font: 600 13px var(--font); cursor: pointer; }
.spg-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
html body #windows .spg-slot { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; min-height: 96px; padding: 10px 8px 8px; border-radius: 16px; border: 1.5px solid #e0cfab; background: #fffaf0; color: inherit; cursor: pointer; font: inherit; }
.spg-slot .stp, .spg-slot .stp-empty { --w: 168px; }
html body #windows .spg-slot:hover { border-color: #d9b56a; }
html body #windows .spg-slot.on { border-color: #e8b64a; background: linear-gradient(#fff8e2, #fbedc4); box-shadow: 0 0 0 2px #e8b64a55; }
html body #windows .spg-slot.locked { background: #f4ecd9; cursor: default; }
html body #windows .spg-slot.cand { border-color: #2f6f73; box-shadow: 0 0 0 2px #2f6f7355; }
html body #windows .spg-slot.cand::after { content: ''; position: absolute; inset: 3px; border-radius: 13px; border: 2px dashed #2f6f73aa; pointer-events: none; }
.spg-sl { position: absolute; left: 8px; top: 6px; font: 600 12px var(--font-head, var(--font)); color: #8a6a3a; }
.spg-sv { font: 500 13px/1.3 var(--font); color: #6b5a3a; text-align: center; } .spg-sv b { font: 600 14px var(--font-head, var(--font)); color: #2f6f73; } .spg-sv.off { color: #a0402a; }
.spg-own { padding: 8px 10px; border-radius: 14px; background: #fbf4e2; border: 1px solid #e6d6b0; min-width: 0; }
.spg-strip { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; padding: 2px 2px 6px; align-items: flex-end; }
html body #windows :is(.spg-own-it, .spg-env-it) { position: relative; flex: none; display: grid; justify-items: center; gap: 2px; padding: 5px 5px 3px; border-radius: 12px; border: 1.5px solid transparent; background: transparent; cursor: pointer; font: inherit; color: inherit; }
.spg-own-it .stp { --w: 66px; }
.spg-own-it small { font: 500 12.5px var(--font); color: #6b5a3a; } .spg-own-it small b { font: 600 13px var(--font-head, var(--font)); color: #2f6f73; }
html body #windows :is(.spg-own-it, .spg-env-it):hover { border-color: #e0cfab; background: #fffaf0; }
html body #windows .spg-own-it.on { border-color: #e8b64a; background: #fff6dc; }
.spg-envs { flex: none; display: flex; align-items: center; gap: 6px; padding-right: 8px; margin-right: 2px; border-right: 1px dashed #d9c08a; }
.spg-env-it .stp-env { --ew: 72px; }
.spg-q { position: absolute; right: 2px; top: 2px; font-style: normal; padding: 0 5px; border-radius: 99px; background: #2f6f73; color: #fff; font: 600 11.5px/18px var(--font); }
html body #windows .spg-openall { flex: none; min-height: 40px; padding: 0 12px; border-radius: 11px; border: 1.5px solid #245d60; background: linear-gradient(#3f8584, #2f6f73); color: #fff; font: 600 13px var(--font-head, var(--font)); cursor: pointer; }
.spg-foot { font: 500 12px var(--font); color: #7a6540; }
html:not(.touch-ui) body #windows .win[data-win="stamps"] { max-height: calc(100vh - 32px) !important; }
/* แผ่นรายละเอียด (bottom sheet ในหน้าต่าง) */
.spg-sheet { grid-area: sheet; position: sticky; bottom: 0; z-index: 2; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px 40px 12px 14px;
  border-radius: 18px 18px 12px 12px; background: linear-gradient(#fffdf6, #fbf1d8); border: 1.5px solid #e8b64a; box-shadow: 0 -8px 22px rgba(80, 50, 20, .22); }
.spg-sheet .ss-pic .stp { --w: 168px; }
html body #windows .ss-x { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f3e6c6; color: #6b4f22; font-size: 20px; cursor: pointer; }
.ss-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ss-name { font: 600 18px/1.2 var(--font-head, var(--font)); color: #4a2e12; }
.ss-rank { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ss-rank em, .stp-ic-rank em { font-style: normal; padding: 1px 8px; border-radius: 99px; font: 600 12px var(--font); }
.ss-bound { background: #fde9df; color: #a0402a; } .ss-free { background: #e3f1ef; color: #245d60; } .ss-on { background: #fff1c7; color: #8a5a10; }
.ss-fx { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ss-fx .ui-ic { width: 24px; height: 24px; } .ss-fx span { display: grid; } .ss-fx span b { font: 600 14.5px var(--font-head, var(--font)); color: #2f6f73; } .ss-fx small { font: 500 12.5px var(--font); color: #6b5a3a; }
.ss-val { font: 600 24px var(--font-head, var(--font)); color: #2f6f73; }
/* สายค่าคงที่ = ประโยค → ขนาดตัวอ่าน ไม่ใช่ตัวเลขเด่น (เจ้าของ 8 พ.ย. · stamp-view fxsCls) */
.ss-val.fxs { font-size: var(--fs-sm, 14px); line-height: 1.3; } .srv-num.fxs { font-size: var(--fs-body, 16px); line-height: 1.3; }
.stp-ic-val.fxs { font-size: var(--fs-body, 16px) !important; line-height: 1.3 !important; }
.ss-warn { margin: 0; font: 500 12.5px var(--font); color: #a0402a; }
.ss-acts, .ss-ask { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
html body #windows :is(.ss-acts, .ss-ask) button { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid #cdb27a; background: #fffaf0; color: #5b4526; font: 600 14px var(--font-head, var(--font)); cursor: pointer; }
html body #windows :is(.ss-acts, .ss-ask) button.main { border-color: #245d60; background: linear-gradient(#3f8584, #2f6f73); color: #fff; }
.ss-acts button:disabled { opacity: .5; }
.ss-acts .ui-ic { width: 18px; height: 18px; }
.ss-ask { padding: 8px 10px; border-radius: 12px; background: #fff4d6; border: 1px solid #e8c77a; } .ss-ask p { margin: 0; flex: 1 1 100%; font: 500 13.5px/1.4 var(--font); } .ss-ask p b { color: #a0402a; }
.ss-price { display: grid; gap: 3px; } .ss-price > small { color: #8a6a3a; }
/* รวมผล (เฟส 2): สกิลติดตัว · สายหายาก ไฮไลต์ */
.spg-tsub { margin: 2px 0 4px; font: 600 12.5px var(--font); color: #8a5a10; }
.spg-totl li.pas, .spg-totl li.wow { padding: 2px 6px; margin: 0 -6px; border-radius: 9px; background: linear-gradient(90deg, #fff1c7, #fffaf0); }
.spg-totl li.pas { background: linear-gradient(90deg, #efe6ff, #fffaf0); }
.spg-totl li .stp-skic { width: 20px; height: 20px; }
.spg-totl + .spg-totl { margin-top: 6px; }
/* โหมดย่อย 5 → ซอง */
.spg-own h5 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; } .spg-own h5 > span { margin-right: auto; }
html body #windows .spg-recbtn { min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1.5px solid #9fc9c4; background: #fff; color: #245d60; font: 600 13px var(--font-head, var(--font)); cursor: pointer; }
.spg-recbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 6px; padding: 6px 8px; border-radius: 12px; background: #e3f1ef; border: 1px solid #9fc9c4; font: 500 13px/1.35 var(--font); color: #245d60; }
.spg-recn { font: 700 15px var(--font-head, var(--font)); } .spg-rect { flex: 1 1 200px; min-width: 0; } .spg-rect .bad { color: #a0402a; font-weight: 600; }
html body #windows .spg-recbar button { min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1.5px solid #9fc9c4; background: #fff; color: #245d60; font: 600 13px var(--font-head, var(--font)); cursor: pointer; }
html body #windows .spg-recbar button.main { border-color: #245d60; background: linear-gradient(#3f8584, #2f6f73); color: #fff; }
html body #windows .spg-recbar button:disabled { opacity: .5; cursor: default; }
html body #windows .spg-own-it.rec { border-color: #2f6f73; background: #e3f1ef; }
.spg-recck { position: absolute; right: 2px; top: 2px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: #2f6f73; color: #fff; font: 700 13px/1 var(--font); }
html.touch-ui body #windows :is(.spg-recbtn, .spg-recbar button) { min-height: 48px; }
/* ปุ่มในหน้าสถานะ */
.stp-status > b { white-space: nowrap; }
/* จอสัมผัส (Screen Shell): ซ้าย 38% ตัวละคร + รวมผล · ขวา 2×2 ช่อง (≥ 96px) + แถวกระเป๋า · ปุ่ม ≥ 48px · ตัวอักษร ≥ 13px */
html.touch-ui .spg { grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); gap: 8px 10px; }
html.touch-ui .spg-pv { --pvh: clamp(110px, calc(100dvh - 300px), 230px); height: var(--pvh); }
html.touch-ui .spg-pv canvas { height: var(--pvh) !important; width: calc(var(--pvh) * .66) !important; }
html.touch-ui .spg-slots { gap: 8px; }
html.touch-ui body #windows .spg-slot { min-height: 96px; padding: 6px 4px 5px; }
html.touch-ui .spg-slot .spg-sl { display: none; }   /* มือถือ: ช่องเรียง 1–4 ซ้าย→ขวาอยู่แล้ว — ตัดป้าย "ช่อง n" ให้แสตมป์สูงเต็มที่ (ป้ายชื่อในแสตมป์อ่านได้) */
html.touch-ui .spg-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }   /* มือถือ: 4 ช่องแถวเดียว — ความสูงทั้งหมดให้แสตมป์ (2×2 เดิมสูงได้แค่ครึ่ง → ป้ายชื่อแคบจนว่าง) */
html.touch-ui .spg-slot .stp, html.touch-ui .spg-slot .stp-empty { --w: min(clamp(64px, calc((100dvh - 218px) * .6446), 150px), calc((62vw - 90px) / 4)); }
html.touch-ui .spg-sv, html.touch-ui .spg-totl li, html.touch-ui .spg-none, html.touch-ui .spg-leaf { font-size: 13px; }
html.touch-ui .spg-own-it .stp { --w: 54px; }
html.touch-ui body #windows :is(.spg-own-it, .spg-env-it) { min-height: 48px; min-width: 48px; }
html.touch-ui .spg-env-it .stp-env { --ew: 60px; }
html.touch-ui body #windows :is(.spg-openall, .spg-pickbar button, .ss-acts button, .ss-ask button) { min-height: 48px; }
html.touch-ui body #windows .ss-x { width: 44px; height: 44px; }
html.touch-ui .spg-sheet { padding: 10px 48px 10px 10px; }
html.touch-ui .spg-sheet .ss-pic .stp { --w: clamp(80px, calc((100dvh - 190px) * .6446), 168px); }
html.touch-ui .spg-foot { display: none; }

/* ── สมุด › แสตมป์ (stamp-book.js) ── */
.cx-card.sbk-c { gap: 2px; }
.sbk-ic .stp { --w: 58px; }
.cx-card.sbk-c small { font-size: 12.5px; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbk-zh { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 6px 4px 2px; font: 600 14px var(--font-head, var(--font)); color: #245d60; }
.sbk-zh .pet-meter { flex: 1 1 auto; max-width: 180px; }
.sbk-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font: 600 14px var(--font-head, var(--font)); color: #245d60; }
.sbk-sum > b { margin-right: 6px; } .sbk-sum i { font-style: normal; font: 600 13px var(--font); color: #5b4526; margin-right: 6px; }
.sbk-sum .cx-go { margin-left: auto; }
.sbk-panel { display: grid; gap: 10px; }
.sbk-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
.sbk-top .stp { --w: 116px; }
.sbk-fx { display: grid; gap: 4px; min-width: 0; } .sbk-fx .cx-p { margin: 0; }
.sbk-name { margin: 0; display: flex; align-items: center; gap: 6px; } .sbk-name .ui-ic { width: 24px; height: 24px; } .sbk-name b { font: 600 16px var(--font-head, var(--font)); color: #2f6f73; }
.sbk-rs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; } .sbk-rs .pet-meter { width: 140px; } .sbk-rs small { flex: 1 1 100%; color: #7a6540; }
.sbk-acts { display: flex; flex-wrap: wrap; gap: 6px; } .sbk-acts .cx-go { min-height: 40px; }
.sbk-acts .cx-go.main, .sbk-sum .cx-go.main { background: linear-gradient(#3f8584, #2f6f73); color: #fff; border-color: #2f6f73; }
html.touch-ui .sbk-acts .cx-go, html.touch-ui .sbk-sum .cx-go { min-height: 48px; }
.sbk-price { display: grid; gap: 4px; padding: 8px 10px; border-radius: 12px; background: #fffaf0; border: 1px solid #e6d6b0; }
.sbk-pr { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; align-items: center; font: 500 13px var(--font); } .sbk-pr > span { font-weight: 700; color: #5b4526; }
@container cxw (max-width: 860px) {
  .cx-mwrap[data-mt="stamp"] .cx-mt[data-p="stamp"] { display: block; }
  .sbk-top .stp { --w: 92px; }
}
.srv-rk.z { opacity: .3; }
.sbk-fx .sbk-eff { margin: 2px 0; }

/* ── สมุดนักสะสม (หมวดแสตมป์ · เฟส 2 ตามภาพแนวคิดผู้ใช้) ── จัดใหม่ 16 ต.ค. (LAYOUT-FIX.md · ผู้ใช้ "layout ยังเพี้ยน เก็บรายละเอียดมือถือ")
   รูปแบบตามพื้นที่จริง (container query cxw) — ไม่ย่อทั้งก้อน:
     > 1180  คอม/iPad Pro: บอร์ดเต็มความสูงหน้าต่าง ไม่เลื่อนทั้งหน้า — รายชื่อ | แสตมป์ใหญ่ | ข้อมูล | Rank+ของฉัน+ที่แปะ · ล่าง: ความคืบหน้า | รางวัลครบชุด
             (ข้อมูล/คอลัมน์ขวาเลื่อนในตัวเองเมื่อจอเตี้ย) · ≤ 1440 (จอ 1366/1440) คอลัมน์แคบลง ให้ข้อมูลไม่ถูกบีบ
     861–1180 iPad: รายชื่อติดซ้ายเต็มความสูง (เลื่อนในตัว) · ขวาเลื่อนทั้งก้อน: แสตมป์+รางวัลครบชุด | ข้อมูล → Rank/ของฉัน | ที่แปะ → ความคืบหน้า
     ≤ 860   มือถือแนวนอน: ปุ่มสลับ 3 สถานะ · รายละเอียด = แสตมป์+[แปะ] ติดซ้าย (ไม่มีแถบปุ่มล่างบังเนื้อหาแล้ว) · ขวาเลื่อน
   ความสูงอ้างอิง 100cqh จาก .cx-body (container sbkb · size) · หน้าต่างกว้างขึ้นเฉพาะคอม · :has() จบด้วยคลาส (กฎ perf) */
html:not(.touch-ui) #windows .win[data-win="codex"]:has(.cx[data-cx="stamp"]) { width: min(calc(100vw - 24px), 1500px) !important; height: min(92vh, 880px) !important; max-width: calc(100vw - 24px); left: calc((100vw - min(calc(100vw - 24px), 1500px)) / 2) !important; top: max(8px, calc((100vh - min(92vh, 880px)) / 2)) !important; }   /* หน้าต่างกว้างขึ้น = จัดกลางจอ (ตำแหน่งเดิมจะล้นขอบขวา) */
.cx[data-cx="stamp"] .cx-filter:empty { display: none; }
.cx[data-cx="stamp"] .cx-body { container: sbkb / size; }
.sbk2 { --cream: #fffaf0; --ln: #e6d6b0; display: grid; gap: 10px 14px; box-sizing: border-box; padding: 0 2px 2px;
  grid-template-columns: 236px minmax(230px, 270px) minmax(0, 1fr) 316px; grid-template-rows: minmax(0, 1fr) auto; height: 100cqh;
  grid-template-areas: "list show info own" "prog mst info own"; }
.sbk2 > .sbk-list { grid-area: list; } .sbk2 > .sbk-show { grid-area: show; } .sbk2 > .sbk-info { grid-area: info; } .sbk2 > .sbk-ownw { grid-area: own; }
.sbk2 > .sbk-prog { grid-area: prog; } .sbk2 > .sbk-master { grid-area: mst; }
.sbk2 > :is(.sbk-info, .sbk-ownw) { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 4px; }
.sbk-seg, .sbk-flt.in-bar, .sbk-place, .sbk-zoom { display: none; }
.sbk2 section, .sbk2 aside { min-width: 0; }
.sbk-h { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; font: 600 14px var(--font-head, var(--font)); color: #6b4510; } .sbk-h b { color: #2f6f73; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
/* รายชื่อ */
.sbk-list { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.sbk-flt select { width: 100%; min-height: 40px; padding: 0 10px; border-radius: 12px; border: 1.5px solid #c9a86a; background: linear-gradient(#f3e3bd, #e9d3a1); color: #4a3216; font: 600 14px var(--font-head, var(--font)); }
.sbk-rows { list-style: none; margin: 0; padding: 2px 4px 4px 0; display: grid; align-content: start; gap: 4px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1 1 auto; scrollbar-width: thin; }
.sbk-lh { padding: 8px 4px 2px; font: 600 13px var(--font); color: #8a6a3a; border-bottom: 1px dashed #dcc898; }
html body #windows .sbk-row { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 52px; padding: 3px 8px 3px 4px; box-sizing: border-box;
  border-radius: 12px; border: 1.5px solid transparent; background: transparent; color: #3e2c16; cursor: pointer; text-align: left; font: inherit; }
html body #windows .sbk-row:hover { background: #fff6e0; }
html body #windows .sbk-row.on { border-color: #e8b64a; background: linear-gradient(90deg, #fff4d2, #fdf0c8); box-shadow: 0 2px 6px rgba(138, 90, 26, .18); }
.sbk-face { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: radial-gradient(circle at 50% 40%, #fffaf0, #eadbb6); }
.sbk-row.unk .sbk-face { filter: grayscale(.85) brightness(.9); opacity: .7; }
.sbk-rowt { display: flex; align-items: center; gap: 5px; min-width: 0; }
.sbk-rowt b { font: 600 14.5px/1.4 var(--font-head, var(--font)); overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }   /* ชื่อยาว (Heartroot Spirit · Magma Serpent ✦) ขึ้นสองบรรทัดแทน "Magma Serp…" */
.sbk-nw { white-space: nowrap; }
.sbk-mk { flex: none; font-style: normal; width: 22px; height: 22px; display: inline-grid; vertical-align: -3px; margin-left: 2px; place-items: center; border-radius: 50%; font: 700 13px/1 var(--font); color: #fff8e4; }
.sbk-mk.t-rare { background: #7a52c8; } .sbk-mk.t-boss { background: #c8862a; }
.sbk-crown { font: 600 13px var(--font-head, var(--font)); color: #8a5a10; white-space: nowrap; } .sbk-crown.full { color: #c8901a; }
.sbk-mini { display: none; }
@container cxw (max-width: 1440px) {
  html body #windows .sbk-row { grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; row-gap: 1px; min-height: 56px; padding: 4px 8px 4px 4px; }
  .sbk-row .sbk-face { grid-row: 1 / span 2; } .sbk-row .sbk-rowt { align-self: end; } .sbk-row .sbk-crown { grid-column: 2; align-self: start; font-size: 13px; }
}
/* แสตมป์ใหญ่ */
.sbk-show { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 4px; }
.sbk-showw { position: relative; display: grid; place-items: center; padding: 0 24px; }
html body #windows .sbk-bigbtn { position: relative; display: block; padding: 0; margin: 0; border: 0; background: none; cursor: zoom-in; line-height: 0; }
.sbk-showw .stp { --w: 220px; filter: drop-shadow(0 6px 10px rgba(80, 50, 20, .28)); }
html body #windows .sbk-step { position: absolute; top: 50%; translate: 0 -50%; width: 44px; height: 44px; border-radius: 50%; border: 2px solid #c9a86a; background: linear-gradient(#fffaf0, #ead8ad); color: #6b4510; font: 700 26px/1 var(--font-head, var(--font)); cursor: pointer; box-shadow: 0 2px 5px rgba(80, 50, 20, .25); z-index: 2; }
.sbk-step.prev { left: 0; } .sbk-step.next { right: 0; }
html body #windows .sbk-full { min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1.5px solid #c9a86a; background: linear-gradient(#fff4d2, #f0dca8); color: #5a3a10; font: 600 14px var(--font-head, var(--font)); cursor: pointer; }
.sbk-lock { margin: 0; font: 500 13px/1.4 var(--font); color: #8a7a62; text-align: center; max-width: 240px; }
/* ข้อมูล */
.sbk-info { display: flex; flex-direction: column; gap: 10px; container: sbki / inline-size; }
.sbk-title { margin: 0; font: 700 22px/1.25 var(--font-head, var(--font)); color: #4a2e12; overflow-wrap: break-word; }
.sbk-tags { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sbk-tag { font-style: normal; padding: 2px 10px; border-radius: 999px; background: #efe3c4; color: #6b4f22; font: 600 13px/1.5 var(--font); white-space: nowrap; }
.sbk-tags .stp-tier { margin: 0; font-size: 13px; line-height: 1.5; padding: 2px 10px; }
.sbk-tag.reg { background: #e3efd8; color: #3f6f30; } .sbk-tag.fam { background: #e3f1ef; color: #245d60; }
.sbk-lore { margin: 0; font: 500 14px/1.55 var(--font); color: #5b4526; }
.sbk-eff { border-radius: 14px; border: 1.5px solid #cfe0c6; background: var(--cream); overflow: hidden; }
.sbk-eff.pas { border-color: #c9b2ee; }
.sbk-effh { margin: 0; padding: 3px 12px; background: #3f8f4e; color: #fff; font: 600 13px var(--font-head, var(--font)); display: inline-block; border-radius: 0 0 10px 0; }
.sbk-eff.pas .sbk-effh { background: #7a52c8; }
.sbk-effb { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px 10px; }
.sbk-effb > .ui-ic { width: 34px; height: 34px; flex: none; } .sbk-effb .stp-skic.big { width: 40px; height: 40px; flex: none; }
.sbk-effb > span { display: grid; gap: 3px; min-width: 0; } .sbk-effb b { font: 600 15px/1.3 var(--font-head, var(--font)); color: #2f6f73; }
.sbk-effb small { font: 500 13px/1.45 var(--font); color: #5b4526; } .sbk-pnote { color: #7a52c8 !important; }
.sbk-rrw { border-radius: 14px; border: 1px solid var(--ln); background: var(--cream); padding: 8px 10px; }
.sbk-rr { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.sbk-rr li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 3px 8px; border-radius: 9px; font: 500 14px var(--font); }
.sbk2 .srv-rk { font-size: 13px !important; height: 22px; min-width: 26px; }
.sbk-rr li b { font: 600 14px var(--font-head, var(--font)); color: #4a3a20; } .sbk-rr li small { font: 600 13px var(--font); color: #8a6a3a; }
.sbk-rr li.rS { background: linear-gradient(90deg, #fff1c7, #fffaf0); }
/* ชิป 3 อัน: กว้างพอ = 3 คอลัมน์ · แคบ = แถวละอัน (ชื่อซ้าย ค่าขวา) แทนการบีบจน "เฉลี่ย 1 / 1,000 ตัว" ขาดสามบรรทัด */
.sbk-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
html body #windows .sbk-chip { display: grid; gap: 2px; align-content: start; min-height: 64px; padding: 8px 10px; box-sizing: border-box; border-radius: 14px; border: 1px solid var(--ln); background: var(--cream); color: inherit; text-align: left; font: inherit; }
html body #windows .sbk-chip.go { cursor: pointer; } html body #windows .sbk-chip.go:hover { border-color: #d9b56a; }
.sbk-chip b { font: 600 13px var(--font); color: #8a6a3a; } .sbk-cv { font: 700 18px/1.2 var(--font-head, var(--font)); color: #2f6f73; } .sbk-cv.sm { font-size: 14px; line-height: 1.35; }
.sbk-chip small { font: 500 13px/1.35 var(--font); color: #7a6540; white-space: nowrap; }
@container sbki (max-width: 540px) {
  .sbk-chips { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  html body #windows .sbk-chip { grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; column-gap: 10px; min-height: 48px; padding: 6px 12px; }
  .sbk-chip b { grid-row: 1; } .sbk-chip .sbk-cv { grid-row: 1; } .sbk-chip small { grid-row: 1; text-align: right; }
  .sbk-cv { font-size: 16px; }
}
@container sbki (max-width: 360px) {
  html body #windows .sbk-chip { grid-template-columns: 88px minmax(0, 1fr); }
  .sbk-chip small { grid-column: 2; grid-row: 2; text-align: left; }
}
.sbk-info .sbk-rs { margin: 0; }
.sbk-tip { margin: 0; display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 14px; background: #f6efdc; border: 1px dashed #d9c08a; }
.sbk-tip .ui-ic { width: 26px; height: 26px; flex: none; } .sbk-tip span { display: grid; gap: 2px; font: 500 13px/1.45 var(--font); color: #5b4526; } .sbk-tip b { font: 600 14px var(--font-head, var(--font)); color: #6b4510; }
/* ขวา: Rank 4 ใบ · ของฉัน · ที่แปะ — แสตมป์ทุก Rank ขนาดเดียวกันทุกแถว (--sw) ให้คอลัมน์ตรงกัน */
.sbk-ownw { --sw: 58px; display: flex; flex-direction: column; gap: 10px; }
.sbk-rk4, .sbk-own4, .sbk-d4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sbk-rk1 { display: grid; justify-items: center; gap: 5px; } .sbk-rk1 .stp { --w: calc(var(--sw) + 8px); } .sbk-rk1.dim .stp { opacity: .6; }
.sbk-rk1 .srv-rk { min-width: 46px; }
.sbk-mine, .sbk-deck, .sbk-prog, .sbk-master { border-radius: 16px; border: 1px solid var(--ln); background: var(--cream); padding: 10px 12px; box-sizing: border-box; }
.sbk-pbar { position: relative; height: 10px; border-radius: 99px; background: #eadfc6; box-shadow: inset 0 1px 2px rgba(80, 50, 20, .2); margin: 2px 0 8px; }
.sbk-pbar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: linear-gradient(90deg, #8fd08a, #3f8f4e); }
.sbk-pbar > em { position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #d9c08a; box-shadow: 0 0 0 2px #fffaf0; }
.sbk-pbar > em.on { background: #e8b64a; }
.sbk-pbar.thin { height: 8px; }
html body #windows .sbk-own1 { position: relative; display: grid; justify-items: center; align-content: start; gap: 3px; min-width: 0; padding: 5px 2px 4px; border-radius: 12px; border: 1.5px solid transparent; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.sbk-own1 .stp { --w: var(--sw); } .sbk-own1 b { font: 600 13px var(--font-head, var(--font)); color: #2f6f73; white-space: nowrap; } .sbk-own1 small { font: 500 13px var(--font); color: #8a7a62; white-space: nowrap; }
html body #windows .sbk-own1.best { border-color: #e8b64a; background: #fff6dc; }
.sbk-own1.none { cursor: default; }
.sbk-q { position: absolute; right: 0; bottom: 20px; font-style: normal; padding: 0 5px; border-radius: 99px; background: #fffaf0; border: 1px solid #c9a86a; font: 600 13px/18px var(--font); color: #5b4526; }
html body #windows .sbk-gop { margin-left: auto; flex: none; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1.5px solid #c9a86a; background: #fff; color: #5a3a10; font: 600 13px var(--font-head, var(--font)); cursor: pointer; white-space: nowrap; }
.sbk-d1 { display: grid; justify-items: center; align-content: start; gap: 3px; text-align: center; min-width: 0; } .sbk-d1 :is(.stp, .stp-empty) { --w: var(--sw); }
.sbk-d1 b { font: 600 13px var(--font-head, var(--font)); color: #2f6f73; white-space: nowrap; } .sbk-d1 small { font: 500 13px/1.25 var(--font); color: #6b5a3a; max-width: 100%; white-space: nowrap; }
.sbk-d1 small.fx { display: none; }   /* ชื่อผลอยู่ในรายการรวมผลข้างล่างแล้ว — เดิมขึ้นซ้ำใต้แสตมป์จนตัดกลางคำ "ดาเมจคริติ/คอล" */
.sbk-d1.lock small { color: #8a7a62; }
.sbk-tot { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px dashed var(--ln); display: grid; gap: 4px; }
.sbk-tot li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; font: 500 13.5px var(--font); }
.sbk-tot li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbk-tot li .ui-ic, .sbk-tot li .stp-skic { width: 22px; height: 22px; } .sbk-tot li b { font: 600 13.5px var(--font-head, var(--font)); color: #2f6f73; white-space: nowrap; }
/* ความคืบหน้า · รางวัลครบชุด */
.sbk-pn { margin: 0; font: 500 13px var(--font); color: #6b5a3a; } .sbk-pn b { font: 700 20px var(--font-head, var(--font)); color: #2f6f73; }
.sbk-soon { display: block; font: 500 13px/1.4 var(--font); color: #8a7a62; }
.sbk-master { display: grid; gap: 8px; align-content: start; background: linear-gradient(#fffaf0, #f6ead0); }
.sbk-master.done { border-color: #e8b64a; box-shadow: 0 0 0 2px #e8b64a44; }
.sbk-mrow { display: flex; align-items: center; gap: 10px; } .sbk-mrow > span:last-child { display: grid; gap: 4px; min-width: 0; }
.sbk-medal { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff3c4, #e8b64a); box-shadow: inset 0 0 0 2px #fff8e4, 0 2px 4px rgba(120, 70, 0, .3); }
.sbk-master:not(.done) .sbk-medal { filter: grayscale(.7); opacity: .7; }
.sbk-medal .ui-ic { width: 26px; height: 26px; } .sbk-mrow b { font: 600 14px/1.3 var(--font-head, var(--font)); color: #6b4510; } .sbk-mrow small { font: 500 13px/1.45 var(--font); color: #7a6540; }
html body #windows .sbk-ttl { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1.5px solid #245d60; background: linear-gradient(#3f8584, #2f6f73); color: #fff; font: 600 13.5px var(--font-head, var(--font)); cursor: pointer; justify-self: start; }
html body #windows .sbk-ttl.on { background: #e3f1ef; color: #245d60; }
.sbk-notyet { font-style: normal; font: 600 13px var(--font); color: #8a7a62; padding: 3px 12px; border-radius: 999px; background: #efe3c4; justify-self: start; }
/* ภาพเต็ม */
.sbk-bigv { position: fixed; inset: 0; z-index: var(--z-popup, 300); display: grid; place-items: center; align-content: center; gap: 10px; background: rgba(14, 22, 30, .6); cursor: pointer; }
.sbk-bigv .stp { --w: min(380px, calc((100dvh - 80px) * .6446)); filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .45)); }
.sbk-bigv small { color: #fff8e4; font: 500 14px var(--font); }
html.touch-ui body #windows :is(.sbk-ttl, .sbk-gop, .sbk-full) { min-height: 44px; }

/* จอ 1366/1440 (หน้าต่าง ≤ 1440): คอลัมน์ข้างแคบลง — ข้อมูลตรงกลางกว้างพอให้ชิปเรียงสามช่อง */
@container cxw (max-width: 1440px) {
  .sbk2 { grid-template-columns: 212px 228px minmax(0, 1fr) 292px; gap: 10px 12px; }
  .sbk-showw .stp { --w: 196px; }
  .sbk-ownw { --sw: 54px; }
}
/* iPad (861–1180): รายชื่อติดซ้ายเต็มความสูง · ขวาเลื่อนทั้งก้อน */
@container cxw (max-width: 1180px) {
  .sbk2 { height: auto; min-height: 100cqh; grid-template-columns: 206px 220px minmax(0, 1fr); grid-template-rows: auto 1fr auto auto;
    grid-template-areas: "list show info" "list mst info" "list own own" "list prog prog"; align-items: start; }
  .sbk2 > .sbk-list { position: sticky; top: 0; height: 100cqh; align-self: start; }
  .sbk2 > :is(.sbk-info, .sbk-ownw) { overflow: visible; padding-right: 0; }
  .sbk-showw .stp { --w: 180px; } .sbk-showw { padding: 0 22px; }
  .sbk2 > .sbk-master { align-self: start; }
  .sbk-ownw { --sw: 60px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; gap: 10px 12px; }
  .sbk-ownw > .sbk-rk4 { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 92px)); justify-content: space-around; }
}
@container cxw (max-width: 1000px) {
  .sbk2 { grid-template-columns: 196px 196px minmax(0, 1fr); }
  .sbk-showw .stp { --w: 160px; } .sbk-showw { padding: 0 20px; }
  .sbk-ownw { --sw: 54px; }
}

/* มือถือแนวนอน: 3 สถานะ — เปิดด้วยคลาส .cx.sbk-m (stamp-book.js wireStamp: หน้าต่าง ≤ 860 หรือจอเตี้ย ≤ 520)
   เดิมใช้แค่ความกว้าง ≤ 860 → มือถือกว้าง 915–932 ที่ไม่มีติ่ง ได้ผัง iPad (หัวเรื่องกินความสูง · ชื่อในรายชื่อโดนตัด "Rimeh") */
.cx.sbk-m { grid-template-columns: 62px minmax(0, 1fr); grid-template-rows: none; }
.cx.sbk-m .cx-nav { flex-direction: column; overflow-y: auto; overflow-x: hidden; padding: 6px 4px; border-bottom: 0; border-right: 2px solid #c9a86a; }
.cx.sbk-m .cx-nav button { justify-content: center; min-width: 0; min-height: 44px; padding: 4px; }
.cx.sbk-m .cx-nav button span { display: none; } .cx.sbk-m .cx-nav button img { width: 30px; height: 30px; }
.cx.sbk-m .cx-main { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); column-gap: 8px; row-gap: 8px; padding: 6px 8px; }
.cx.sbk-m .cx-main > .cx-top { grid-column: 1; grid-row: 1; flex-wrap: nowrap; }
.cx.sbk-m .cx-main > .cx-filter { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.cx.sbk-m .cx-main > .cx-filter::-webkit-scrollbar { display: none; }
.cx.sbk-m .cx-main > .cx-body { grid-column: 1 / -1; grid-row: 2; min-height: 0; }
.cx.sbk-m .cx-title { display: none; }
.cx.sbk-m .cx-search { width: 150px !important; min-height: 44px; box-sizing: border-box; }
.cx.sbk-m .sbk-seg { display: flex; flex: none; gap: 4px; padding: 2px; border-radius: 12px; background: #eadcb8; }
html body #windows .cx.sbk-m .sbk-seg button { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 0; background: transparent; color: #6b5530; font: 600 14px var(--font-head, var(--font)); cursor: pointer; white-space: nowrap; }
html body #windows .cx.sbk-m .sbk-seg button.on { background: #2f6f73; color: #fff; }
.cx.sbk-m .sbk-flt.in-bar { display: block; flex: 0 0 auto; } .cx.sbk-m .sbk-flt.in-bar select { width: 164px; min-height: 44px; font-size: 14px; }
.cx.sbk-m .sbk-flt.in-list { display: none; }
.cx.sbk-m .sbk2 { display: block; height: auto; min-height: 0; padding: 0; }
.cx.sbk-m .sbk2 > * { display: none !important; }
/* รายการ: 2–3 คอลัมน์ตามความกว้าง · แสตมป์เล็กซ้าย ชื่อ (สองบรรทัดได้) + มงกุฎซ้อนกันชิดกลาง ไม่ทิ้งช่องว่างกลางแถว */
.cx.sbk-m .sbk2.tab-list > .sbk-list { display: flex !important; height: auto; position: static; }
.cx.sbk-m .sbk2.tab-list .sbk-rows { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); overflow: visible; gap: 6px; padding: 0 0 6px; }
.cx.sbk-m .sbk2.tab-list .sbk-lh { grid-column: 1 / -1; }
html body #windows .cx.sbk-m .sbk2 .sbk-row { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; row-gap: 3px; column-gap: 10px; min-height: 76px; padding: 5px 10px 5px 6px; border-color: #e6d6b0; background: #fffdf6; }
html body #windows .cx.sbk-m .sbk2 .sbk-row.on { border-color: #e8b64a; background: linear-gradient(90deg, #fff4d2, #fdf0c8); }
.cx.sbk-m .sbk2 .sbk-row .sbk-face { display: none; }
.cx.sbk-m .sbk2 .sbk-row .sbk-mini { display: block; grid-row: 1 / span 2; } .cx.sbk-m .sbk2 .sbk-row .sbk-mini .stp { --w: 42px; }
.cx.sbk-m .sbk2 .sbk-row .sbk-rowt { align-self: end; } .cx.sbk-m .sbk2 .sbk-row .sbk-crown { grid-column: 2; grid-row: 2; align-self: start; }
/* รายละเอียด: ซ้าย = แสตมป์ + ◀ ▶ + [แปะ] ติดอยู่ (ความสูงเท่าพื้นที่จริง) · ขวา = ข้อมูล → ของฉัน เลื่อนตามหน้า */
.cx.sbk-m .sbk2.tab-detail { display: grid; grid-template-columns: clamp(156px, 27%, 212px) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "show info" "show own"; align-items: start; gap: 10px 14px; padding-bottom: 6px; }
.cx.sbk-m .sbk2.tab-detail > :is(.sbk-show, .sbk-info, .sbk-ownw) { display: flex !important; }
.cx.sbk-m .sbk2.tab-detail > .sbk-show { grid-area: show; position: sticky; top: 0; height: 100cqh; box-sizing: border-box; justify-content: center; gap: 8px; padding: 0; }
.cx.sbk-m .sbk2.tab-detail > .sbk-info { grid-area: info; overflow: visible; padding: 0; } .cx.sbk-m .sbk2.tab-detail > .sbk-ownw { grid-area: own; overflow: visible; padding: 0; }
.cx.sbk-m .sbk2.tab-detail .sbk-showw { padding: 0 16px; }
.cx.sbk-m .sbk2.tab-detail .sbk-showw .stp { --w: min(132px, calc((100cqh - 60px) * .6446)); }
html body #windows .cx.sbk-m .sbk2 .sbk-step { width: 44px; height: 44px; font-size: 22px; }
.cx.sbk-m .sbk2.tab-detail .sbk-step.prev { left: -6px; } .cx.sbk-m .sbk2.tab-detail .sbk-step.next { right: -6px; }
.cx.sbk-m .sbk2.tab-detail :is(.sbk-full, .sbk-lock) { display: none; }
.cx.sbk-m .sbk2.tab-detail .sbk-zoom { display: grid; position: absolute; right: -4px; bottom: -4px; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #fffaf0; border: 1.5px solid #c9a86a; font: 400 14px/1 var(--font); font-style: normal; box-shadow: 0 1px 3px rgba(80, 50, 20, .25); }
html body #windows .cx.sbk-m .sbk2.tab-detail .sbk-place { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; max-width: 170px; min-height: 44px; flex: none; border-radius: 12px; border: 1.5px solid #245d60; background: linear-gradient(#3f8584, #2f6f73); color: #fff; font: 600 14px var(--font-head, var(--font)); cursor: pointer; }
html body #windows .cx.sbk-m .sbk2.tab-detail .sbk-place:disabled { border-color: #cdb27a; background: #efe3c4; color: #8a7a62; cursor: default; }
.cx.sbk-m .sbk2.tab-detail .sbk-ownw > :is(.sbk-rk4, .sbk-deck) { display: none; }
.cx.sbk-m .sbk2.tab-detail .sbk-ownw { --sw: 56px; display: flex; }
.cx.sbk-m .sbk2.tab-detail .sbk-title { font-size: 19px; }
.cx.sbk-m .sbk2.tab-detail .sbk-info { gap: 8px; }
/* ที่แปะ: 4 ช่อง (2×2 แบบมีชื่อผล) | รวมผล */
.cx.sbk-m .sbk2.tab-deck > .sbk-ownw { display: flex !important; overflow: visible; padding: 0; }
.cx.sbk-m .sbk2.tab-deck .sbk-ownw > :not(.sbk-deck) { display: none; }
.cx.sbk-m .sbk2.tab-deck .sbk-deck { --sw: 50px; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 4px 16px; align-items: start; }
.cx.sbk-m .sbk2.tab-deck .sbk-deck > .sbk-h { grid-column: 1 / -1; }
.cx.sbk-m .sbk2.tab-deck .sbk-d4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.cx.sbk-m .sbk2.tab-deck .sbk-d1 { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; justify-items: start; align-content: center; align-items: center; column-gap: 8px; row-gap: 2px; text-align: left; }
.cx.sbk-m .sbk2.tab-deck .sbk-d1 > :first-child { grid-row: 1 / span 2; }
.cx.sbk-m .sbk2.tab-deck .sbk-d1 > b { align-self: end; } .cx.sbk-m .sbk2.tab-deck .sbk-d1 > small { align-self: start; }
.cx.sbk-m .sbk2.tab-deck .sbk-d1 small.fx { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.cx.sbk-m .sbk2.tab-deck .sbk-tot { margin: 0; border: 0; padding: 0; align-self: center; }
html body #windows .cx.sbk-m .sbk-gop { min-height: 44px; }
/* มือถือแคบ (หน้าต่าง ≤ 700 เช่น 667×300): รายละเอียดคอลัมน์ซ้ายแคบลง · ที่แปะซ้อนเป็นแถวเดียว */
@container cxw (max-width: 700px) {
  .cx.sbk-m .sbk2.tab-detail { grid-template-columns: 146px minmax(0, 1fr); gap: 8px 10px; }
  .cx.sbk-m .sbk2.tab-deck .sbk-deck { gap: 4px 12px; }
}
/* จอเตี้ยมาก (พื้นที่เนื้อหา ≤ 230 เช่น 667×300): ◀ ▶ ย้ายลงข้างปุ่ม [แปะ] — เดิมปุ่ม 44px สองข้างทับแสตมป์ที่เหลือกว้าง ~70px */
@container sbkb (max-height: 230px) {
  .cx.sbk-m .sbk2.tab-detail > .sbk-show { justify-content: space-between; padding-bottom: 2px; }
  .cx.sbk-m .sbk2.tab-detail .sbk-showw { position: static; padding: 0; }
  .cx.sbk-m .sbk2.tab-detail .sbk-showw .stp { --w: calc((100cqh - 54px) * .6446); }
  html body #windows .cx.sbk-m .sbk2.tab-detail .sbk-step { top: auto; bottom: 2px; translate: none; }
  .cx.sbk-m .sbk2.tab-detail .sbk-step.prev { left: 0; } .cx.sbk-m .sbk2.tab-detail .sbk-step.next { right: 0; }
  .cx.sbk-m .sbk2.tab-detail { grid-template-columns: 160px minmax(0, 1fr); }
  html body #windows .cx.sbk-m .sbk2.tab-detail .sbk-place { max-width: calc(100% - 100px); padding: 0 2px; font-size: 13px; }
  .cx.sbk-m .sbk2.tab-detail .sbk-pic { display: none; }
}
.sbk-pic { font-style: normal; }

/* ── แสตมป์ที่แปะแบบโชว์ (stamp-deck.js) — หน้าต่างสวมใส่ แท็บ "แสตมป์" · ดูอุปกรณ์คนอื่น ──
   4 การ์ดเท่ากัน (แสตมป์ขนาดเดียวทุก Rank · ค่า · ชื่อผลสองบรรทัด) + กล่องรวมผล · กว้าง = ข้างกัน · แคบ = รวมผลลงล่าง (flex-wrap) */
.sdk { --sw: 72px; display: grid; gap: 8px; min-width: 0; }
.sdk-h { margin: 0; display: flex; align-items: baseline; gap: 8px; font: 600 15px var(--font-head, var(--font)); color: #6b4510; } .sdk-h b { color: #2f6f73; }
.sdk-body { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: stretch; }
.sdk-4 { flex: 1 1 340px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; min-width: 0; }
html body .sdk-1 { display: grid; grid-template-rows: auto 1fr; justify-items: center; align-content: start; gap: 5px; min-width: 0; min-height: 44px; padding: 8px 4px 7px; box-sizing: border-box;
  border-radius: 14px; border: 1.5px solid #e6d6b0; background: #fffaf0; color: inherit; font: inherit; text-align: center; cursor: pointer; }
html body .sdk-1:hover { border-color: #d9b56a; }
html body .sdk-1.rS { border-color: #e8b64a; background: linear-gradient(#fff8e0, #fffaf0); }
html body .sdk-1:is(.empty, .lock) { border-style: dashed; border-color: #d8c49a; background: #f7f0e1; cursor: default; }
html body .sdk-1.empty[data-sdk-page] { cursor: pointer; }
.sdk-1 :is(.stp, .stp-empty) { --w: var(--sw); }
.sdk-t { display: grid; gap: 2px; justify-items: center; align-content: start; min-width: 0; width: 100%; }
.sdk-t b { font: 700 15px/1.2 var(--font-head, var(--font)); color: #2f6f73; white-space: nowrap; }
.sdk-t small { font: 500 13px/1.3 var(--font); color: #6b5a3a; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sdk-1:is(.empty, .lock) .sdk-t small { color: #8a7a62; }
.sdk-sum { flex: 1 1 210px; min-width: 0; padding: 8px 12px; border-radius: 14px; background: #fbf4e2; border: 1px solid #e6d3a6; box-sizing: border-box; }
.sdk-sh { margin: 0 0 4px; font: 600 13.5px var(--font-head, var(--font)); color: #8a5a12; }
.sdk-tot { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sdk-tot li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; font: 500 13.5px var(--font); color: #3b2a14; }
.sdk-tot li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdk-tot li :is(.ui-ic, .stp-skic) { width: 22px; height: 22px; } .sdk-tot li b { font: 600 14px var(--font-head, var(--font)); color: #2f6f73; white-space: nowrap; }
.sdk-none { margin: 0; font: 500 13px/1.45 var(--font); color: #7a6540; }
.eq2.stamps { display: block; } .eq2.stamps > .eq2-tabs { margin-bottom: 10px; }
.eq2-stamps { padding: 2px; }
.gv-stp { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #e3d2a8; }
.gv-stp .sdk { --sw: 62px; } .gv-stp .sdk-h { font-size: 14px; }
@media (max-height: 520px) { .eq2-stamps .sdk, .gv-stp .sdk { --sw: 56px; } .sdk-1 { padding: 6px 3px 5px; } }

/* ── การ์ดไอเทม · แถวตลาด ── */
.stp-ic { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; margin: 6px 0 8px; }
.stp-ic > .stp { --w: 96px; } .stp-ic.env > .stp-env { --ew: 110px; }
.stp-ic-b { display: grid; gap: 5px; min-width: 0; }
.stp-ic-b p { margin: 0; font: 500 13px/1.35 var(--font); color: #5b4526; }
.stp-ic-fx b { color: #2f6f73; } .stp-ic-val { font: 600 22px/1.1 var(--font-head, var(--font)) !important; color: #2f6f73 !important; }
.stp-ic-rank { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; } .stp-ic-rank .srv-rk { height: 22px; font-size: 13px; }
.stp-ic-note { color: #7a6540 !important; font-size: 12.5px !important; }
.stp-ic-drop { color: #8a5a10 !important; }
/* หน้าต่างสกิล: สกิลติดตัวจากแสตมป์ (เฟส 2) */
.sk-stamp { padding: 0 8px; border-radius: 999px; background: #efe6ff; color: #5a3a9a; font-weight: 600; white-space: nowrap; }
/* กระดานตลาด: แสตมป์ตาม Rank (เฟส 2) */
.mkb-srank { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 0 0 6px; } .mkb-srank small { font: 600 12.5px var(--font); color: #8a6a3a; margin-right: 2px; }
html body #windows .mkb-srank button { min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid #dcc898; background: #fbf4e2; color: #6b5530; font: 600 12.5px var(--font-head, var(--font)); cursor: pointer; }
html body #windows .mkb-srank button.on { background: #2f6f73; border-color: #2f6f73; color: #fff; }
html.touch-ui body #windows .mkb-srank button { min-height: 44px; }
.stp-row { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; font: 500 12.5px var(--font); color: #6b5a3a; } .stp-row b { font: 600 13px var(--font-head, var(--font)); color: #2f6f73; }

@media (prefers-reduced-motion: reduce) {
  .stp.rS.live .stp-shine::before, .stp.rS.live .stp-spk, .srv-petals { animation: none !important; display: none; }
  .srv * { transition: none !important; animation: none !important; }
}

/* ── คอมโบแสตมป์ F2 (stamp-combo-ui.js · DESIGN 9 · ART.md สี/ชั้น) ─────────────────────────────────────────
   ชั้นภาพ: ช่อง → ริบบิ้น (ใต้ช่อง) → ตรา · ประกายครั้งแรก 0.6 วิ ครั้งเดียว (ไม่มี infinite) · teal #2f6f73 · ทอง #e8b64a · พื้นการ์ดทำงาน #d6e9e4 */
.spg-tabs { grid-area: tabs; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
html body #windows .spg-tabs button { min-height: 40px; padding: 0 14px; border-radius: 12px; border: 1.5px solid #e0cfab; background: #fffaf0; color: #5b4526; font: 600 14px var(--font-head, var(--font)); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
html body #windows .spg-tabs button.on { border-color: #2f6f73; background: linear-gradient(#3f8584, #2f6f73); color: #fff; }
html body #windows .spg-tabs button small { font: 600 12px var(--font); opacity: .85; }
html body #windows .spg-tabs [data-spg-book] { margin-left: auto; }
.cmb-fi { width: 22px; height: 22px; object-fit: contain; flex: none; }
.cmb-gi { width: 30px; height: 30px; object-fit: contain; flex: none; }
/* ช่องที่อยู่ในคอมโบ: ขอบ teal (คอมโบที่ 1) / ทอง (คอมโบที่ 2) + ริบบิ้นใต้ช่อง + ตรามุมขวาบนของใบแรก */
html body #windows .spg-slot.cmb { border-color: #2f6f73; box-shadow: 0 0 0 2px #2f6f7340; padding-bottom: 26px; }
html body #windows .spg-slot.cmb.cmb-k1 { border-color: #c8901a; box-shadow: 0 0 0 2px #e8b64a55; }
.cmb-rib { position: absolute; left: 6px; right: 6px; bottom: 3px; height: 22px; background: url(assets/ui/stamp/combo/combo_ribbon.webp) center / 100% 100% no-repeat; pointer-events: none; }
.spg-slot.cmb-k1 .cmb-rib { filter: sepia(1) saturate(2.4) hue-rotate(-12deg) brightness(1.08); }   /* คอมโบที่ 2 = ริบบิ้นโทนทอง */
.cmb-sbadge { position: absolute; right: -6px; top: -8px; width: 40px; height: 40px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 2px 2px #0003); }
.spg-slot.cmb-new .cmb-rib { animation: cmb-unfurl .35s ease-out 1 both; transform-origin: left center; }
.spg-slot.cmb-new .cmb-sbadge { animation: cmb-pop .25s ease-out .35s 1 both; }
@keyframes cmb-unfurl { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes cmb-pop { 0% { transform: scale(.8); } 70% { transform: scale(1.06); } 100% { transform: scale(1); } }
/* ดูก่อนแปะ (โหมดเลือกช่อง) */
.cmb-pv { display: grid; gap: 1px; font: 600 12px/1.25 var(--font); font-style: normal; text-align: center; }
.cmb-pv .on { color: #1f6a52; } .cmb-pv .off { color: #a0402a; }
/* จุด teal ที่ใบในกระเป๋าที่แปะแล้วเปิดคอมโบได้ (ART 6.5) */
.cmb-dot { position: absolute; right: 3px; bottom: 3px; width: 12px; height: 12px; border-radius: 50%; background: #2f6f73; box-shadow: 0 0 0 2px #fff; pointer-events: none; }
/* แผงคอมโบในหน้าแปะ — คอม: ขวาของช่อง 2×2 */
.spg-main.has-cmb { display: grid; grid-template-columns: minmax(0, auto) minmax(230px, 1fr); align-items: start; }
.spg-main > .spg-pickbar, .spg-main > .spg-own { grid-column: 1 / -1; }
.spg-cmb { min-width: 0; padding: 8px 10px; border-radius: 14px; background: #fbf4e2; border: 1px solid #e6d6b0; display: grid; gap: 6px; }
.spg-cmb h5 { margin: 0; display: flex; align-items: center; gap: 8px; font: 600 14px var(--font-head, var(--font)); color: #245d60; } .spg-cmb h5 > span { margin-right: auto; }
html body #windows .spg-cmb .cmb-all { min-height: 36px; padding: 0 10px; border-radius: 10px; border: 1.5px solid #9fc9c4; background: #fff; color: #245d60; font: 600 13px var(--font-head, var(--font)); cursor: pointer; }
.cmb-chips { display: none; flex-wrap: wrap; gap: 6px; }
html body #windows .cmb-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px; border-radius: 12px; border: 1.5px solid #e0cfab; background: #fffaf0; color: #4a3a20; font: 600 13px var(--font-head, var(--font)); cursor: pointer; }
html body #windows .cmb-chip.on { border-color: #2f6f73; background: #d6e9e4; }
.cmb-chip .cmb-gi { width: 24px; height: 24px; }
.cmb-list { display: grid; gap: 6px; max-height: 380px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.cmb-sub { margin: 4px 0 0; font: 600 12.5px var(--font); color: #8a5a10; }
.cmb-none { margin: 0; font: 500 13px/1.4 var(--font); color: #8a7a62; }
/* การ์ดคอมโบ */
.cmb-card { position: relative; display: grid; gap: 4px; padding: 8px 10px; border-radius: 14px; background: #fffaf0; border: 1.5px solid #e6d6b0; min-width: 0; align-content: start; }
.cmb-card.on { background: #d6e9e4; border-color: #2f6f73; }
.cmb-card.hid { background: #f3ead4; }
.cmb-card header { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cmb-nm { font: 600 15px/1.2 var(--font-head, var(--font)); color: #2f4f3a; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmb-card.on .cmb-nm { color: #1f4f52; }
.cmb-n { margin-left: auto; font: 500 12px var(--font); color: #8a7a62; white-space: nowrap; }
.cmb-badge { margin-left: auto; width: 34px; height: 34px; object-fit: contain; }
.cmb-star { font: 700 14px var(--font-head, var(--font)); color: #c8901a; white-space: nowrap; } .cmb-star.s2 { color: #e8a020; text-shadow: 0 0 6px #ffe7a0; }
.cmb-rec { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cmb-rec .stp { --w: 52px; }
.cmb-ns { display: inline-grid; place-items: center; position: relative; }
.cmb-ns.any { width: 52px; height: 63px; }
.cmb-ns.any .cmb-slot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cmb-ns.any .ui-ic { position: relative; width: 26px; height: 26px; }
.cmb-ns.any small { position: absolute; left: 2px; right: 2px; bottom: 4px; font: 500 9.5px/1.1 var(--font); color: #245d60; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cmb-rec.sec .cmb-secret { width: 64px; height: 64px; object-fit: contain; }
.cmb-hint { margin: 0; font: 500 12.5px/1.4 var(--font); color: #6b5a3a; font-style: italic; }
.cmb-tail { margin: 0; font: 500 12px var(--font); color: #7a6540; }
.cmb-fx { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font: 500 13px/1.35 var(--font); color: #4a3a20; }
.cmb-fx li::before { content: '✦ '; color: #2f6f73; }
.cmb-fx2 { margin: 0; font: 500 12.5px/1.35 var(--font); color: #7a6540; } .cmb-fx2 b { color: #c8901a; } .cmb-fx2.on { color: #1f4f52; font-weight: 600; }
.cmb-note { margin: 0; font: 500 12px/1.35 var(--font); color: #8a5a10; }
.cmb-pr { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font: 500 12.5px var(--font); color: #5b4526; }
.cmb-pr .pet-meter { width: 70px; }
html body #windows .cmb-go { min-height: 32px; padding: 0 8px; border-radius: 9px; border: 1.5px solid #9fc9c4; background: #fff; color: #245d60; font: 600 12.5px var(--font); cursor: pointer; }
.cmb-pr em { font-style: normal; color: #245d60; }
/* สมุดคอมโบ (แท็บคอมโบ) */
.spg.spg-alb { display: flex; flex-direction: column; gap: 10px; }
.cmb-alb { display: grid; gap: 8px; }
.cmb-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.cmb-count { margin: 0; display: flex; align-items: center; gap: 6px; font: 600 14px var(--font-head, var(--font)); color: #245d60; } .cmb-count .pet-meter { width: 110px; }
.cmb-flt { display: flex; flex-wrap: wrap; gap: 6px; }
html body #windows .cmb-flt button { display: inline-flex; align-items: center; gap: 4px; min-height: 38px; padding: 0 10px; border-radius: 99px; border: 1.5px solid #e0cfab; background: #fffaf0; color: #5b4526; font: 600 13px var(--font); cursor: pointer; }
html body #windows .cmb-flt button.on { border-color: #2f6f73; background: #d6e9e4; color: #1f4f52; }
.cmb-rule { margin: 0; font: 500 12.5px/1.4 var(--font); color: #7a6540; }
.cmb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 8px; }
/* ป้ายในสมุด › แสตมป์ — "อยู่ในคอมโบ" (ART 6.4) · ดาวสายเลือดครบ (ART 6.1) */
.cmb-in { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font: 500 12.5px var(--font); color: #5b4526; }
.cmb-inch { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px 1px 3px; border-radius: 99px; background: #e3f1ef; color: #1f4f52; font-weight: 600; }
.cmb-lin { width: 1.35em; height: 1.35em; object-fit: contain; vertical-align: -0.3em; }
/* จอสัมผัส: แผงคอมโบย่อเป็นชิป (ความสูงจอแนวนอนให้ช่อง/กระเป๋า) · ปุ่ม ≥ 44px */
html.touch-ui .spg-main.has-cmb { display: flex; }
html.touch-ui .spg-cmb { display: none; }   /* มือถือ: ชิปคอมโบอยู่คอลัมน์ซ้าย (comboChipsHtml) */
html.touch-ui .cmb-chips { display: flex; }
html.touch-ui body #windows .spg-slot.cmb { padding-bottom: 5px; }
html.touch-ui .cmb-rib { display: none; }   /* มือถือ: ขอบ teal/ทอง + ตราพอ (ริบบิ้นกินความสูงแถวกระเป๋า) */
html.touch-ui .cmb-sbadge { width: 28px; height: 28px; right: -4px; top: -6px; }
html.touch-ui body #windows .spg-tabs button, html.touch-ui body #windows .cmb-flt button, html.touch-ui body #windows .cmb-go, html.touch-ui body #windows .cmb-all { min-height: 44px; }
@media (prefers-reduced-motion: reduce) { .spg-slot.cmb-new .cmb-rib, .spg-slot.cmb-new .cmb-sbadge { animation: none !important; } }
/* แสตมป์ที่แปะแบบโชว์ (stamp-deck.js · หน้าสวมใส่/ส่องคนอื่น) — คอมโบ F2 */
.sdk-cmb { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 6px; font: 500 12.5px var(--font); }
.sdk-1.cmb { box-shadow: 0 0 0 2px #2f6f73; border-radius: 12px; } .sdk-1.cmb.cmb-k1 { box-shadow: 0 0 0 2px #e8b64a; }
/* จอสัมผัส: แท็บอยู่คอลัมน์ซ้ายบน (ไม่กินความสูงของช่อง/กระเป๋าฝั่งขวา) · มีคอมโบ = ช่องเล็กลงเท่าแถวชิป+ริบบิ้น */
html.touch-ui .spg:not(.spg-alb) { grid-template-areas: "tabs main" "side main" "sheet sheet"; grid-template-rows: auto minmax(0, 1fr) auto; }
html.touch-ui .spg-main { grid-row: 1 / span 2; }
html.touch-ui .spg-tabs { gap: 4px; } html.touch-ui body #windows .spg-tabs button { padding: 0 10px; font-size: 13px; }
html.touch-ui .cmb-rule { display: none; }
/* ทางเข้าสมุดคอมโบ (สมุดผจญภัย · หน้าสวมใส่ · แท็บหน้าแปะ) + ป้าย "ใหม่" */
html body #windows .cmb-entry { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid #2f6f73; background: linear-gradient(#fbfff9, #d6e9e4); color: #1f4f52; font: 600 14px var(--font-head, var(--font)); cursor: pointer; box-shadow: 0 2px 0 #2f6f7355; }
html body #windows .cmb-entry small { font: 600 12.5px var(--font); color: #2f6f73; }
html body #windows .cmb-entry.wide { display: flex; width: 100%; justify-content: center; box-sizing: border-box; margin-bottom: 6px; }
.cmb-new-dot { position: absolute; right: -6px; top: -8px; padding: 0 6px; border-radius: 99px; background: #d9483b; color: #fff; font: 700 11px/18px var(--font); font-style: normal; box-shadow: 0 0 0 2px #fff; }
.spg-tabs .cmb-new-dot { position: static; margin-left: 2px; }
html body #windows .cmb-entry .cmb-new-dot { position: static; margin-left: 4px; }   /* ในปุ่มเอง ไม่โดนขอบรายชื่อตัด */

/* ── คอมโบ f2-ui (จัดใหม่ "เข้าใจใน 3 วิ" · design-briefs/stamp-combo-1018/f2-ui/BRIEF.md) ───────────────────────────
   การ์ดสูตรสะสมใบเล็ก: ตัวอักษร 3 ระดับ (ชื่อ 15 · เนื้อ 13 · เล็ก 12) · ครีม/teal/ทอง · สถานะ = ไอคอน+คำสั้น · ไม่มี infinite animation */
.cmb-main { display: grid; gap: 12px; min-width: 0; }
html body #windows .cmb-q { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid #9fc9c4; background: #fff; color: #245d60; font: 700 16px var(--font-head, var(--font)); cursor: pointer; }
html body #windows .cmb-q.on { background: #2f6f73; color: #fff; }
.cmb-help { padding: 8px 12px; border-radius: 12px; background: #fffaf0; border: 1px dashed #c9b47f; font: 500 13px/1.45 var(--font); color: #4a3a20; }
.cmb-help ol { margin: 0 0 4px; padding-left: 20px; } .cmb-help p { margin: 0; color: #5a3f8a; }
.cmb-sec { display: grid; gap: 8px; }
.cmb-sec h4 { margin: 0; font: 600 15px var(--font-head, var(--font)); color: #245d60; }
.cmb-empty { margin: 0; padding: 10px 12px; border-radius: 12px; background: #fbf4e2; font: 500 13px/1.45 var(--font); color: #6b5a3a; }
html body #windows .cmb-link { min-height: 32px; padding: 0 6px; border: 0; background: none; color: #1f6a6e; font: 600 13px var(--font); text-decoration: underline; cursor: pointer; }
/* การ์ดย่อ */
.cbc { position: relative; display: grid; gap: 6px; align-content: start; padding: 10px; border-radius: 14px; background: #fffaf0; border: 1.5px solid #e6d6b0; box-shadow: 0 2px 0 #e6d6b0; cursor: pointer; min-width: 0; }
.cbc:hover { border-color: #d9b56a; }
.cbc:focus-visible { outline: 3px solid #2f6f7388; outline-offset: 2px; }
.cbc header { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cbc .cmb-gi { width: 26px; height: 26px; }
.cbc-nm { flex: 1 1 auto; min-width: 0; font: 600 15px/1.2 var(--font-head, var(--font)); color: #3a2f1a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbc-st { flex: none; display: inline-flex; align-items: center; gap: 3px; padding: 0 8px; border-radius: 99px; font: 600 12px/22px var(--font); white-space: nowrap; background: #f3e6c8; color: #6b4510; }
.cbc-st .ui-ic { width: 14px; height: 14px; }
.cbc-st.st-slot, .cbc-st.st-busy { background: #f6d9a8; color: #8a4a10; }
.cbc-st.st-on { background: #2f8a5a; color: #fff; } .cbc-st.st-ready { background: #e8b64a; color: #4a3210; } .cbc-st.st-miss1 { background: #f6d9a8; color: #8a4a10; }
.cbc-st.st-unk, .cbc-st.st-spart, .cbc-st.st-near { background: #3d4f7a; color: #fff; } .cbc-st.st-near { background: #6a4fa8; }
.cbc.k-on { background: linear-gradient(#e9f5f1, #d6e9e4); border-color: #2f6f73; box-shadow: 0 2px 0 #2f6f7355; }
.cbc.k-ready { border-color: #e8b64a; box-shadow: 0 0 0 2px #e8b64a44; }
.cbc.k-miss1 { border-color: #e8b64a; }
.cbc.k-sec { background: linear-gradient(#f4f1fb, #ebe6f6); border-color: #b9aedb; }
.cbc.k-sec.sec-near { border-color: #8a6ad8; box-shadow: 0 0 0 2px #8a6ad833; }
.cbc-slots { position: relative; display: inline-flex; justify-self: start; gap: 6px; align-items: center; }
.cbc-slots .stp { --w: 50px; }
.cbc.hero .cbc-slots .stp { --w: 84px; }
.cbc-sl { position: relative; display: inline-grid; place-items: center; }
.cbc-sl.miss .stp { opacity: .55; }
.cbc-sl.any { width: 50px; height: 61px; } .cbc.hero .cbc-sl.any { width: 84px; height: 102px; }
.cbc-sl.any img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; } .cbc-sl.any .ui-ic { position: relative; width: 24px; height: 24px; opacity: .8; }
.cbc-sl.sec { width: 50px; height: 61px; } .cbc.hero .cbc-sl.sec { width: 84px; height: 102px; }
.cbc-q { position: absolute; inset: 4px; border-radius: 10px; background: radial-gradient(circle at 50% 42%, #b9aedb 0, #8f86b8 38%, #6d6597aa 70%, transparent 72%), #e6e0f3; filter: blur(.3px); display: grid; place-items: center; box-shadow: inset 0 0 0 2px #fff8; }
.cbc-q i { font: 700 22px var(--font-head, var(--font)); font-style: normal; color: #fff; text-shadow: 0 1px 2px #3d2f6a; }
.cbc-q::after { content: '✦'; position: absolute; right: 4px; top: 2px; font-size: 11px; color: #fff4c4; }
/* ครบ = เส้นทอง/teal เชื่อมช่อง */
.cbc-slots.linked::before { content: ''; position: absolute; left: 20px; right: 20px; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; background: linear-gradient(90deg, #2f6f73, #e8b64a, #2f6f73); z-index: 0; }
.cbc-slots.linked .cbc-sl { z-index: 1; }
.cbc-meta { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.cbc-x { flex: none; font: 700 15px var(--font-head, var(--font)); color: #2f6f73; }
.cbc-bn { margin: 0; font: 500 13px/1.35 var(--font); color: #4a3a20; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cbc.hero .cbc-bn { -webkit-line-clamp: 3; }
.cbc-miss { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; font: 500 12.5px/1.3 var(--font); color: #8a4a10; }
.cbc-miss.ok { color: #6b4510; } .cbc-miss b { color: #5b3a10; }
.cbc-hint { margin: 0; font: 500 12.5px/1.35 var(--font); color: #4a3f7a; font-style: italic; }
html body #windows .cbc-go { flex: none; min-height: 34px; padding: 0 10px; border-radius: 10px; border: 1.5px solid #2f6f73; background: #fff; color: #1f4f52; font: 600 13px var(--font-head, var(--font)); cursor: pointer; }
html body #windows .cbc-go.main { background: linear-gradient(#3f8584, #2f6f73); color: #fff; }
.cbc-badge { position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; object-fit: contain; pointer-events: none; }
.cbc.hero { padding: 12px 14px; }
.cbc.hero .cbc-nm { font-size: 16px; }
/* รายละเอียด: แผงขวา (คอม) / bottom sheet (มือถือ) — ทีละชั้น */
html body #windows .cbd-x { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid #e0cfab; background: #fff; font: 600 20px var(--font); cursor: pointer; }
.cbd-pr { margin: 0; display: flex; align-items: center; gap: 8px; } .cbd-pr .pet-meter { width: 120px; } .cbd-pr b { font: 700 15px var(--font-head, var(--font)); color: #2f6f73; }
.cbd-bns { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font: 500 14px/1.4 var(--font); color: #3a2f1a; }
.cbd-bns li::before { content: '✦ '; color: #2f6f73; } .cbd-bns li.dim { opacity: .6; }
.cbd-bn2 { margin: 0; font: 500 13px/1.4 var(--font); color: #7a6540; } .cbd-bn2 b { color: #c8901a; } .cbd-bn2.on { color: #1f4f52; font-weight: 600; }
.cbd-note { margin: 0; font: 500 12.5px/1.4 var(--font); color: #7a6540; }
.cbd-hint { margin: 0; font: 600 14px/1.45 var(--font); color: #4a3f7a; } .cbd-bn { margin: 0; font: 600 13px var(--font); color: #6d6597; }
.cbd2 h5 { margin: 4px 0 0; font: 600 14px var(--font-head, var(--font)); color: #8a4a10; }
.cbd-miss { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cbd-mob { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 8px; align-items: center; padding: 6px; border-radius: 12px; background: #fbf4e2; }
.cbd-mob img { width: 40px; height: 40px; object-fit: contain; grid-row: span 2; } .cbd-mob b { font: 600 14px var(--font-head, var(--font)); color: #3a2f1a; display: block; } .cbd-mob small { font: 500 12px var(--font); color: #7a6540; }
.cbd-btns { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.cbd-any { padding: 2px 4px; } .cbd-any b { display: block; font: 600 13px var(--font); color: #5b4526; } .cbd-any small { font: 500 12px var(--font); color: #7a6540; }
.cbd-ok { margin: 0; font: 600 13px var(--font); color: #6b4510; }
.cbd-sticky { position: sticky; bottom: -12px; margin-top: auto; padding: 8px 0 0; background: linear-gradient(transparent, #fffaf0 30%); display: flex; gap: 6px; justify-content: flex-end; }
/* หน้าแปะ: กล่อง "โบนัสจากคอมโบ" แยกจาก "ผลรวมจากแสตมป์" */
.spg-cbn { padding: 10px 12px; border-radius: 14px; background: linear-gradient(#f2faf7, #e3f1ef); border: 1px solid #9fc9c4; }
.spg-cbn h5 { margin: 0 0 6px; font: 600 14px var(--font-head, var(--font)); color: #245d60; }
.spg-cbn ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.spg-cbn li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; align-items: start; font: 500 13px/1.35 var(--font); color: #3a2f1a; }
.spg-cbn li b { font: 600 14px var(--font-head, var(--font)); color: #1f4f52; } .spg-cbn li small { display: block; color: #4a5a50; font: 500 12.5px/1.35 var(--font); }
.spg-cmb .cbc { padding: 8px; } .spg-cmb .cbc-slots .stp { --w: 42px; } .spg-cmb .cbc-sl.any { width: 42px; height: 51px; }
html body #windows .spg-cmb .cmb-all { justify-self: end; }
/* เปิดคอมโบ: ป้ายสั้น ~1 วิ บนช่องแรก (ครั้งเดียว) */
.cmb-flash { position: absolute; left: 50%; top: 40%; translate: -50% 0; padding: 2px 10px; border-radius: 99px; background: #2f6f73; color: #fff; font: 700 13px/22px var(--font-head, var(--font)); font-style: normal; white-space: nowrap; pointer-events: none;
  box-shadow: 0 0 0 2px #e8b64a, 0 4px 10px #0004; animation: cmb-flash 1.1s ease-out 1 both; }
@keyframes cmb-flash { 0% { opacity: 0; transform: scale(.85); } 15% { opacity: 1; transform: scale(1.05); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
/* จอสัมผัส: หมวดเป็นแถวชิปแนวนอน · การ์ดเรียงลง · รายละเอียด = bottom sheet · ปุ่ม ≥ 48px */
html.touch-ui .cbc.hero .cbc-slots .stp { --w: 64px; } html.touch-ui .cbc.hero .cbc-sl.any, html.touch-ui .cbc.hero .cbc-sl.sec { width: 64px; height: 78px; }
html.touch-ui body #windows :is(.cbc-go, .cbd-x, .cmb-q, .cmb-link) { min-height: 48px; min-width: 48px; }
html.touch-ui body #windows .cmb-q { width: 48px; height: 48px; }
@media (prefers-reduced-motion: reduce) { .cmb-flash { animation: none; display: none; } }
/* คอม: รายละเอียดเป็นคอลัมน์ขวาแบบ sticky (อยู่ในจอเสมอแม้เลื่อนรายการ) */
.spg-cmb .cbc.k-on .cbc-st { display: none; }   /* แผงหน้าแปะแคบ: สีการ์ดบอกว่าใช้งานอยู่แล้ว ให้ที่กับชื่อ */

/* ── คอมโบ F2-ART "สมุดภาพมอนสเตอร์" (design-briefs/stamp-combo-1018/f2-art/BRIEF.md) ─────────────────────────────
   ภาพนำ ข้อมูลรอง: ฮีโร่ภาพใหญ่ → ใกล้ครบ → การ์ดภาพ (ภาพบน · ชื่อ · ช่อง+x/n · โบนัส ≤2 · ขาด 1) · ลับ = ภาพมืด/เผยด้วยโค้ด
   ภาพ = <img> (ไม่ใช่ canvas) · ไม่มี blur หนัก · แอนิเมชันเล่นครั้งเดียว (ค้นพบ) · ไม่มี infinite */
.spg.spg-alb { container: cmbalb / inline-size; }
.cmb-alb { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.cmb-top { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; min-width: 0; margin: 0; }
.cmb-fbar { flex: 1 1 auto; min-width: 0; display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 2px; }
.cmb-fbar::-webkit-scrollbar { display: none; }
html body #windows .cmb-fbar button { flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 10px 0 8px; border-radius: 99px; border: 1.5px solid #e6d6b0; background: #fffaf0; color: #5b4526; font: 600 13px var(--font-head, var(--font)); cursor: pointer; white-space: nowrap; }
html body #windows .cmb-fbar button.on { border-color: #2f6f73; background: linear-gradient(#3f8584, #2f6f73); color: #fff; }
html body #windows .cmb-fbar button.zero { opacity: .55; }
.cmb-fbar small { min-width: 18px; padding: 0 5px; border-radius: 99px; background: #f3e6c8; color: #6b4510; font: 600 11.5px/18px var(--font); text-align: center; }
.cmb-fbar button.on small { background: #fff3; color: #fff; }
.cmb-fbar .cmb-fi { width: 20px; height: 20px; }
.cmb-count { flex: none; display: inline-flex; align-items: center; gap: 5px; margin: 0; font: 700 14px var(--font-head, var(--font)); color: #245d60; white-space: nowrap; }
.cmb-count .pet-meter { width: 60px; }
.cmb-main { display: grid; gap: 14px; min-width: 0; }
.cmb-sec { display: grid; gap: 8px; }
.cmb-sec h4 { margin: 0; display: flex; align-items: center; gap: 10px; font: 700 15px var(--font-head, var(--font)); color: #245d60; }
.cmb-sec h4::before, .cmb-sec h4::after { content: ''; height: 2px; flex: 1 1 0; border-radius: 2px; background: linear-gradient(90deg, transparent, #d9c08a); }
.cmb-sec h4::before { flex: 0 0 18px; }
.cmb-sec h4::after { background: linear-gradient(90deg, #d9c08a, transparent); }
/* ComboArtwork — กรอบภาพ 3:2 ตายตัว (วงเผยลับใช้พิกัด % ของภาพ) */
.cba { position: relative; overflow: hidden; aspect-ratio: 3 / 2; background: #3a2f2a; isolation: isolate; }
.cba > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; }
.cba > img.cba-mob { inset: auto; width: auto; max-width: 46%; object-fit: contain; translate: -50% 0; filter: drop-shadow(0 5px 3px #2a1a0a66); }
.cba > img.cba-mob.flip { transform: scaleX(-1); }
.cba > img.cba-mob.cba-cst { max-width: 30%; filter: drop-shadow(0 6px 6px #1a103a88); }   /* คอมโบแสตมป์ดัน: แสตมป์ลอยหน้าประตูวงก์ */
.cba > img.cba-mob.dim { filter: grayscale(.6) brightness(.6) drop-shadow(0 5px 3px #2a1a0a55); }
.cba-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 42%; background: linear-gradient(#0000, #2a1d1026 55%, #2a1d104d); pointer-events: none; }
.cba-vig { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 75% 70% at 50% 45%, #0000 62%, #1a10082e); box-shadow: inset 0 0 0 1px #fff5; }
.cba.col .cba-bg { filter: saturate(1.05); }
/* ลับ: มืด ~85% + หมอกม่วงเย็น · เผยวงมอนที่แปะตรงจริง · ใกล้ค้นพบ = วงทองนุ่ม */
.cba.sec > img.cba-art:not(.cba-hole), .cba.sec > img.cba-bg { filter: brightness(.22) saturate(.35) contrast(1.15); }
.cba.sec::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2; background: radial-gradient(ellipse 90% 60% at 50% 100%, #8f86b84d, #0000 70%), linear-gradient(#2a234a33, #0000 45%); }
.cba.sec > img.cba-hole { z-index: 3; }
.cba-ring { position: absolute; z-index: 4; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 2px #e8b64ad9, 0 0 16px 5px #e8b64a80, inset 0 0 18px #ffe9a85c; }
.cba > img.cba-seal { inset: auto; left: 50%; top: 50%; width: 30%; height: auto; translate: -50% -50%; opacity: .85; z-index: 3; }
/* ค้นพบครั้งแรก: มืด → แสงแผ่ → สี (ครั้งเดียว ~1.2 วิ · เปิดหน้าสมุด ไม่ใช่แจ็กพอต) */
.cba.reveal > img.cba-art { animation: cba-rv 1.2s ease-out 1 both; }
.cba-burst { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: radial-gradient(circle at 50% 58%, #fff3c4c0 0, #e8b64a55 22%, #0000 50%); opacity: 0; animation: cba-burst 1.2s ease-out 1 both; }
@keyframes cba-rv { 0% { filter: brightness(.16) saturate(.3); } 40% { filter: brightness(.55) saturate(.5); } 100% { filter: none; } }
@keyframes cba-burst { 0% { opacity: 0; transform: scale(.5); } 35% { opacity: 1; } 100% { opacity: 0; transform: scale(1.5); } }
@media (prefers-reduced-motion: reduce) { .cba.reveal > img.cba-art, .cba-burst { animation: none; } .cba-burst { display: none; } }
/* ComboVisualCard / SecretComboVisualCard — คอม 2–3 ใบต่อแถว */
.cbv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.cbv { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 16px; background: #fffaf0; border: 1.5px solid #e6d6b0; box-shadow: 0 3px 0 #e6d6b0, 0 6px 14px #5a3c1414; cursor: pointer; }
.cbv:hover { border-color: #d9b56a; }
.cbv:focus-visible { outline: 3px solid #2f6f7388; outline-offset: 2px; }
.cbv-art { position: relative; flex: none; }
.cbv-art .cba { border-bottom: 1.5px solid #e6d6b0; }
.cbv-art .cbc-st { position: absolute; left: 8px; top: 8px; z-index: 4; box-shadow: 0 1px 3px #0004; }
.cbv-gi { position: absolute; right: 8px; top: 6px; z-index: 4; width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 1px 2px #0006); }
.cbv-badge { position: absolute; right: 8px; bottom: 8px; z-index: 4; width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 2px #0004); }
.cbv-body { display: grid; gap: 5px; padding: 8px 10px 10px; align-content: start; min-width: 0; }
.cbv-body header { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cbv-body header .cbc-x { margin-left: auto; }
.cbv-req { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cbv-req .cbc-x { margin-left: auto; }
.cbv .cbc-slots { gap: 4px; } .cbv .cbc-slots .stp { --w: 38px; } .cbv .cbc-sl.any, .cbv .cbc-sl.sec { width: 38px; height: 46px; }
.cbv .cbc-slots.linked::before { left: 14px; right: 14px; height: 3px; }
.cbv .cbc-miss em { font-style: normal; color: #8a7a62; }
.cbc-miss.ok { justify-content: flex-start; } .cbc-miss.ok .ui-ic { width: 16px; height: 16px; }
.cbv.k-on { border-color: #2f6f73; background: linear-gradient(#f2faf7, #e3f1ef); box-shadow: 0 3px 0 #2f6f7355, 0 6px 14px #1f4f521f; }
.cbv.k-on .cbv-art .cba { border-color: #2f6f73; }
.cbv.k-ready { border-color: #e8b64a; box-shadow: 0 0 0 2px #e8b64a55, 0 3px 0 #d9b56a; }
.cbv.k-miss1 { border-color: #e8c27a; }
.cbv.k-sec { background: linear-gradient(#f6f3fb, #ece7f6); border-color: #c4b9e2; box-shadow: 0 3px 0 #c4b9e2, 0 6px 14px #3d2f6a14; }
.cbv.k-sec.sec-near { border-color: #d9b56a; box-shadow: 0 0 0 2px #e8b64a44, 0 3px 0 #c4b9e2; }
.cbv.k-sec .cbv-art .cba { border-color: #c4b9e2; }
html body #windows .cbv.k-sec .cbc-go { justify-self: start; }
.cbv .cbc-hint { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* ช่องลับในแถบสูตร: ช่องว่างเส้นประนุ่ม (ไม่ใช่กล่อง ? ม่วงทึบ) · ใกล้ค้นพบ = ขอบทองนุ่มรอบช่องสุดท้าย */
.cbc-q { background: #f4f0fa; border: 2px dashed #b9aedb; box-shadow: none; filter: none; }
.cbc-q i { color: #8f86b8; text-shadow: none; font-size: 18px; }
.cbc-sl.sec.near .cbc-q { border: 2px solid #e8b64a; box-shadow: 0 0 0 2px #fff3c4, 0 0 12px 3px #e8b64a88; background: #fffaf0; }
.cbc-sl.sec.near .cbc-q i { color: #c8901a; }
/* ActiveComboHero / ClosestComboWidget / StartWidget — เด่นกว่าทุกอย่าง */
.cbh-wrap.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cbh { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-width: 0; overflow: hidden; border-radius: 18px; background: linear-gradient(#f2faf7, #e3f1ef); border: 2px solid #2f6f73; box-shadow: 0 4px 0 #2f6f7355, 0 10px 24px #1f4f5222; cursor: pointer; }
.cbh:focus-visible { outline: 3px solid #2f6f7388; outline-offset: 2px; }
.cbh-art { position: relative; min-width: 0; background: #2a2018; display: flex; align-items: center; }
.cbh-art .cba { width: 100%; }
.cbh-info { display: grid; align-content: center; gap: 8px; padding: 14px 16px; min-width: 0; }
.cbh-k { justify-self: start; display: inline-flex; align-items: center; gap: 5px; padding: 0 12px 0 6px; border-radius: 99px; font: 700 13px/28px var(--font-head, var(--font)); white-space: nowrap; }
.cbh-k.on { background: #2f8a5a; color: #fff; box-shadow: 0 0 0 2px #e8b64a; padding-left: 2px; }
.cbh-k.on img { width: 32px; height: 32px; margin: -4px 0; object-fit: contain; }
.cbh-k.near { background: #fff3d6; color: #8a4a10; box-shadow: inset 0 0 0 1.5px #e8b64a; }
.cbh-k .ui-ic { width: 16px; height: 16px; }
.cbh h3 { margin: 0; display: flex; align-items: center; gap: 8px; min-width: 0; font: 700 20px/1.2 var(--font-head, var(--font)); color: #1f4f52; }
.cbh h3 > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbh h3 .cmb-gi { width: 30px; height: 30px; }
.cbh .cbc-slots .stp { --w: 62px; } .cbh .cbc-sl.any, .cbh .cbc-sl.sec { width: 62px; height: 76px; }
.cbh-fx { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font: 500 14px/1.4 var(--font); color: #3a2f1a; }
.cbh-fx li::before { content: '✦ '; color: #2f6f73; }
.cbh-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.cbh .cbd-pr .pet-meter { width: 140px; }
.cbh.near { border-color: #e8b64a; background: linear-gradient(#fffaf0, #fbf1d8); box-shadow: 0 4px 0 #d9b56a, 0 10px 24px #8a5a1022; }
.cbh.start { border-color: #e6d6b0; background: #fffaf0; box-shadow: 0 4px 0 #e6d6b0, 0 10px 24px #5a3c1414; cursor: default; }
.cba > img.cbh-guide { inset: auto; left: 50%; bottom: 6%; width: auto; height: 80%; translate: -50% 0; object-fit: contain; filter: drop-shadow(0 6px 5px #0004); }
.cbh-p { margin: 0; font: 500 13.5px/1.45 var(--font); color: #4a3a20; }
.cbh-sub { margin: 0; font: 600 12.5px var(--font); color: #8a5a10; }
.cbh-recs { display: flex; flex-wrap: wrap; gap: 6px; } .cbh-recs .stp { --w: 46px; }
.cbh.duo { grid-template-columns: minmax(0, 1fr); }
.cbh.duo .cbh-info { align-content: start; padding: 10px 12px 12px; }
.cbh.duo h3 { font-size: 17px; } .cbh.duo .cbc-slots .stp { --w: 50px; }
/* ComboDetailPanel — หน้าสมุด: ภาพซ้าย ข้อมูลขวา · กล่องแคบ = เรียงลง · ปุ่มติดล่าง */
.cmb-alb.det { display: grid; gap: 10px; }
.cbd2 { display: grid; gap: 10px; min-width: 0; }
html body #windows .cbd-back { justify-self: start; min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1.5px solid #9fc9c4; background: #fff; color: #1f4f52; font: 600 14px var(--font-head, var(--font)); cursor: pointer; }
.cbd2-grid { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: 16px; align-items: start; }
.cbd2-art { position: sticky; top: 0; }
.cbd2-art .cba { border-radius: 16px; border: 2px solid #e6d6b0; box-shadow: 0 4px 0 #e6d6b0, 0 10px 22px #5a3c1418; }
.cbd2.k-on .cbd2-art .cba { border-color: #2f6f73; box-shadow: 0 4px 0 #2f6f7355; }
.cbd2.k-sec .cbd2-art .cba { border-color: #c4b9e2; box-shadow: 0 4px 0 #c4b9e2; }
.cbd2-info { display: grid; gap: 8px; align-content: start; min-width: 0; }
.cbd2-info header { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cbd2-info h3 { margin: 0; font: 700 22px/1.2 var(--font-head, var(--font)); color: #1f4f52; }
.cbd2-tags { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font: 600 13px var(--font); color: #5b4526; }
.cbd2-found { display: inline-flex; align-items: center; gap: 3px; padding: 0 8px; border-radius: 99px; background: #f3e6c8; line-height: 22px; font-size: 12px; } .cbd2-found.on { background: #d6e9e4; color: #1f4f52; }
.cbd2-found .ui-ic { width: 14px; height: 14px; }
.cbd2 .cbc-slots { flex-wrap: wrap; } .cbd2 .cbc-slots .stp { --w: 68px; } .cbd2 .cbc-sl.any, .cbd2 .cbc-sl.sec { width: 68px; height: 83px; }
.cbd2 .cbd-sticky { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin: 0; padding: 8px 10px; border-radius: 14px; background: #fffaf0f5; border: 1px solid #e6d6b0; box-shadow: 0 -4px 14px #5a3c141f; }
.cbd-mkt { display: grid; gap: 4px; padding: 8px 10px; border-radius: 12px; background: #fbf4e2; border: 1px solid #e6d6b0; }
.cbd-mkt > small { font: 600 12px var(--font); color: #7a6540; }
.cbd-mr { display: flex; align-items: center; gap: 8px; font: 500 12.5px var(--font); } .cbd-mr > b { flex: none; width: 56px; color: #5b4526; }
html body #windows .cbc-go.on { background: #d6e9e4; }
@container cmbalb (max-width: 620px) { .cbd2-grid { grid-template-columns: minmax(0, 1fr); } .cbd2-art { position: static; } .cbh { grid-template-columns: minmax(0, 1fr); } .cbh-wrap.duo { grid-template-columns: minmax(0, 1fr); } }
/* จอสัมผัสแนวนอน: แท็บ [สวมใส่][คอมโบ][คลัง] + แถบหมวด แถวเดียวกัน → ฮีโร่อยู่เหนือขอบจอ · การ์ด 1 ใบต่อแถว (ภาพซ้าย) · ปุ่ม ≥ 44/48px */
html.touch-ui .spg.spg-alb { flex-flow: row wrap; align-items: center; gap: 8px; }
html.touch-ui .spg.spg-alb > .spg-tabs { flex: none; }
html.touch-ui .spg.spg-alb > .cmb-alb:not(.det) { display: contents; }
html.touch-ui .spg.spg-alb > .cmb-alb:not(.det) > .cmb-top { flex: 1 1 260px; }
html.touch-ui .spg.spg-alb > .cmb-alb > .cmb-help, html.touch-ui .spg.spg-alb > .cmb-alb > .cmb-main, html.touch-ui .spg.spg-alb > .cmb-alb.det { flex: 1 1 100%; min-width: 0; }
html.touch-ui .spg.spg-alb > .spg-tabs [data-spg-book] { margin-left: 0; }
html.touch-ui body #windows .cmb-fbar button { min-height: 44px; }
html.touch-ui .cmb-count .pet-meter { display: none; }
html.touch-ui .cbh { grid-template-columns: minmax(0, 44%) minmax(0, 1fr); }
html.touch-ui .cbh-info { gap: 6px; padding: 10px 12px; }
html.touch-ui .cbh h3 { font-size: 17px; }
html.touch-ui .cbh .cbc-slots .stp { --w: 46px; } html.touch-ui .cbh .cbc-sl.any, html.touch-ui .cbh .cbc-sl.sec { width: 46px; height: 56px; }
html.touch-ui .cbh-fx { font-size: 13px; } html.touch-ui .cbh-fx li:nth-child(n+3) { display: none; }
html.touch-ui .cbh.duo .cbh-info { padding: 8px 10px 10px; }
html.touch-ui .cbv-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
html.touch-ui .cbv { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); }
html.touch-ui .cbv-art { align-self: stretch; background: #2a2018; display: flex; align-items: center; }
html.touch-ui .cbv-art .cba { width: 100%; border-bottom: 0; }
html.touch-ui .cbv-body { align-content: center; padding: 10px 12px; }
html.touch-ui .cbv .cbc-slots .stp { --w: 44px; } html.touch-ui .cbv .cbc-sl.any, html.touch-ui .cbv .cbc-sl.sec { width: 44px; height: 54px; }
html.touch-ui body #windows :is(.cbd-back, .cbd2 .cbd-sticky .cbc-go, .cbh-btns .cbc-go, .cbv .cbc-go) { min-height: 48px; }
html.touch-ui .cbd2-info h3 { font-size: 19px; }
html.touch-ui .cbd2 .cbc-slots .stp { --w: 56px; } html.touch-ui .cbd2 .cbc-sl.any, html.touch-ui .cbd2 .cbc-sl.sec { width: 56px; height: 68px; }
/* หน้าสวมใส่ (คอม): การ์ดคอมโบที่ทำงานในแผงขวามีแถบภาพ · มือถือ: ชิปคอมโบมีภาพย่อ */
.cbc-strip { margin: -10px -10px 2px; border-radius: 12px 12px 0 0; overflow: hidden; height: 64px; position: relative; }
.spg-cmb .cbc-strip { margin: -8px -8px 2px; }
.cbc-strip > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; display: block; }
.cmb-chip .cmb-cth { width: 40px; height: 27px; border-radius: 6px; object-fit: cover; flex: none; box-shadow: 0 0 0 1.5px #fff; }
/* ฮีโร่: ภาพเต็มช่องเมื่อข้อมูลสูงกว่าภาพ (ฮีโร่ไม่ใช่คอมโบลับที่ยังไม่ค้น → ครอปได้ ไม่มีวงเผย) */
.cbh-art { display: block; }
.cbh-art .cba, html.touch-ui .cbv:not(.k-sec) .cbv-art .cba { min-height: 100%; }
html.touch-ui .cbv:not(.k-sec) .cbv-art { display: block; }
/* จอสัมผัส: ตราสถานะฮีโร่ลอยบนภาพ (ประหยัดความสูง → ฮีโร่ทั้งใบอยู่เหนือขอบจอ) · ปุ่มกลับอยู่แถวแท็บ · ถาดปุ่มชิดขวา */
html.touch-ui .cbh { position: relative; }
html.touch-ui .cbh-k { position: absolute; left: 8px; top: 8px; z-index: 4; box-shadow: 0 1px 4px #0005; }
html.touch-ui .cbh-k.on { box-shadow: 0 0 0 2px #e8b64a, 0 1px 4px #0005; }
html.touch-ui .cbh .cbc-slots .stp { --w: 42px; } html.touch-ui .cbh .cbc-sl.any, html.touch-ui .cbh .cbc-sl.sec { width: 42px; height: 51px; }
html.touch-ui .spg.spg-alb > .cmb-alb.det { display: contents; }
html.touch-ui .spg.spg-alb > .cmb-alb.det > .cbd-back { flex: none; }
html.touch-ui .spg.spg-alb > .cmb-alb.det > .cbd2 { flex: 1 1 100%; min-width: 0; }
.cbd2 .cbd-sticky { justify-self: end; width: max-content; max-width: 100%; }

/* F3 คอมโบหน้า (เสียงก้องอำพัน / ราชันแสตมป์) — แถบตราแยกเหนือแผงคอมโบ/ฮีโร่ · ไม่นับในคอมโบที่ใช้งาน n/2 (stamp-combo-ui.js pageBannerHtml) */
html body #windows .cmb-page { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; margin: 0 0 8px; padding: 6px 12px 6px 6px; border-radius: 12px; border: 1.5px solid #e8b64a;
  background: linear-gradient(90deg, #fff1cf, #fffaf0 70%); color: #4a3422; text-align: left; cursor: pointer; font: 600 13px var(--font-head, var(--font)); }
html body #windows .cmb-page img { width: 36px; height: 36px; flex: none; }
html body #windows .cmb-page span { display: flex; flex-direction: column; min-width: 0; }
html body #windows .cmb-page small { font: 500 11.5px var(--font); color: #7c6248; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body #windows .cmb-page.crown { border-color: #d89a1e; background: linear-gradient(90deg, #ffe39a, #fff6dc 70%); }
html body #windows .cmb-chips .cmb-page { margin: 0; }

/* ── stamp-mobile-1018: หน้าแปะบนจอสัมผัส ("ดูเละ" — ช่อง 4 ใบกินครึ่งจอ · กระเป๋าต้องเลื่อน · ผลรวมโดนตัด) ─────────────────────────
   จอสัมผัสเท่านั้น (คอมไม่โดน) · iPad (สูง > 520) ใช้บล็อกจอสัมผัสเดิมข้างบน (ช่อง ≤150px แถวเดียว + ตัวละคร พอดีจอ)
   · มือถือแนวนอน (สูง ≤ 520): ตัวละครซ่อน · ช่อง 4 ใบแถวเดียวแบบเตี้ย (ภาพ 52px ซ้าย ค่าขวา · เดิม ~120px กว้าง 190px สูง)
   · กระเป๋าเห็นเต็ม 1 แถว · คอลัมน์ซ้าย (แท็บ · ชิปคอมโบ · ผลรวม · โบนัสคอมโบ) สูงเท่าคอลัมน์ขวาแล้วเลื่อนในตัวเอง (height:0 + min-height:100% = ไม่ดันความสูงแถว) */
@media (max-height: 520px) {
  html.touch-ui .spg:not(.spg-alb) { grid-template-columns: 236px minmax(0, 1fr); gap: 8px 10px; }
  html.touch-ui .spg-pv { display: none; }   /* ตัวละครดูได้ที่หน้าสวมใส่ — จอเตี้ยให้ที่กับช่อง/กระเป๋า */
  html.touch-ui .spg-side { height: 0; min-height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; gap: 8px; padding-right: 2px; }
  html.touch-ui .spg-main { gap: 8px; }
  html.touch-ui .spg-tabs { flex-wrap: nowrap; } html.touch-ui body #windows .spg-tabs button { padding: 0 8px; gap: 4px; white-space: nowrap; }
  html.touch-ui body #windows .spg-tabs button small { font-size: 11.5px; } html.touch-ui .spg-tabs .cmb-fi { width: 20px; height: 20px; }
  html[lang="en"].touch-ui .spg-tabs { flex-wrap: wrap; }
  /* ช่องแปะ: แถวเดียว 4 ใบ · ภาพซ้าย ชื่อช่อง+ค่าขวา */
  html.touch-ui .spg-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  html.touch-ui body #windows .spg-slot { grid-template-columns: auto minmax(0, 1fr); justify-items: start; align-content: center; align-items: center; column-gap: 5px; row-gap: 2px; min-height: 0; padding: 5px 5px 5px 4px; border-radius: 12px; }
  html.touch-ui body #windows .spg-slot > :is(.stp, .stp-empty) { --w: 52px; grid-row: 1 / span 4; margin: 0; }
  html.touch-ui .spg-sv { grid-column: 2; text-align: left; font-size: 12px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
  html.touch-ui .spg-sv b { display: block; font-size: 13.5px; }
  html.touch-ui .spg-slot .cmb-pv { grid-column: 2; text-align: left; font-size: 11.5px; }
  html.touch-ui .cmb-sbadge { width: 24px; height: 24px; right: -3px; top: -5px; }
  html.touch-ui .cmb-flash { font-size: 12px; top: 30%; }
  /* กระเป๋า: หัวข้อแถวเตี้ย · แสตมป์เล็กลงให้เห็นทั้งแถว */
  html.touch-ui .spg-own { padding: 5px 8px; }
  html.touch-ui .spg-own h5 { margin-bottom: 2px; font-size: 13.5px; }
  html.touch-ui body #windows .spg-recbtn, html.touch-ui body #windows .spg-openall, html.touch-ui body #windows .spg-pickbar button { min-height: 44px; }
  html.touch-ui .spg-strip { gap: 4px; padding-bottom: 4px; }
  html.touch-ui .spg-own-it .stp { --w: 54px; }
  html.touch-ui body #windows :is(.spg-own-it, .spg-env-it) { padding: 3px 3px 2px; min-width: 48px; }
  html.touch-ui .spg-env-it .stp-env { --ew: 58px; }
  /* คอลัมน์ซ้าย: ผลรวม/โบนัสคอมโบแบบแน่น (ตัวหนังสือ ≥ 12px) */
  html.touch-ui :is(.spg-tot, .spg-cbn) { padding: 7px 9px; border-radius: 12px; }
  html.touch-ui :is(.spg-tot, .spg-cbn) h5 { margin-bottom: 4px; font-size: 13.5px; }
  html.touch-ui .spg-totl { gap: 2px; } html.touch-ui .spg-totl li { font-size: 12.5px; gap: 5px; grid-template-columns: 18px minmax(0, 1fr) auto; }
  html.touch-ui .spg-totl li :is(.ui-ic, .stp-skic) { width: 18px; height: 18px; } html.touch-ui .spg-totl li b { font-size: 13.5px; }
  html.touch-ui .spg-leaf { margin-top: 4px; font-size: 12px; }
  html.touch-ui .spg-cbn li { font-size: 12.5px; } html.touch-ui .spg-cbn li small { font-size: 12px; }
  html.touch-ui .cmb-chips { gap: 4px; flex: none; } html.touch-ui body #windows .cmb-chip { padding: 0 8px; }
  html.touch-ui .spg-tsub { margin: 0 0 2px; font-size: 12px; }
  html.touch-ui .spg-pickbar { padding: 2px 4px 2px 10px; }
}

/* ── stamp-mobile-1018 รอบ 2: จัดหน้าแปะใหม่ทุกขนาด (ผู้ใช้ 18 ต.ค. 17:40 "หน้าแปะ stamp เพี้ยน") ─────────────────────────────
   ต้นเหตุ: ① ช่องว่าง .stp-empty กว้าง = 1.16 × --w (สัดส่วน 288/348 สูง 90%) + --w 168px ตายตัว = กรอบเส้นประล้นการ์ด
   ② .spg-main.has-cmb { align-items:start } → กระเป๋า/ช่องกว้างตามเนื้อหา (มือถือล้นขวา · iPad ไม่เต็มคอลัมน์)
   ③ แผงคอมโบเป็นคอลัมน์ขวาแคบลอยข้างช่อง 2×2 ด้านล่างโล่ง
   ใหม่: ช่อง 4 ใบแถวเดียว ขนาดตามความกว้างจริง (cqw ของ .spg-slots) + ความสูงจอ · แผงคอมโบเป็นแถบแนวนอนใต้ช่อง (การ์ดย่อแถวเดียว)
   · กระเป๋าเต็มความกว้าง · ตัวละครย่อในคอลัมน์ซ้าย · ช่องว่างกว้างเท่าแสตมป์ */
.spg-main, .spg-main.has-cmb { display: flex; flex-direction: column; align-items: stretch; }
.spg-slots { container: spgs / inline-size; grid-template-columns: repeat(4, minmax(0, 1fr)); }
html body #windows .spg-slot { min-width: 0; }
.spg-slot > .stp-empty { --w: calc(var(--sw) * .865); margin: calc(var(--sw) / 0.6446 * .063) auto; }   /* กว้าง ≈ แสตมป์ · สูง ≈ แสตมป์ */
html:not(.touch-ui) .spg:not(.spg-alb) { grid-template-columns: 220px minmax(0, 1fr); }
html:not(.touch-ui) .spg-pv { height: clamp(120px, calc(100vh - 560px), 210px); }
html:not(.touch-ui) .spg-pv canvas { height: clamp(120px, calc(100vh - 560px), 210px) !important; width: calc(clamp(120px, calc(100vh - 560px), 210px) * .66) !important; }
html:not(.touch-ui) .spg-slots { gap: 10px; }
html:not(.touch-ui) .spg-slot { --sw: clamp(78px, min(calc((100cqw - 30px) / 4 - 22px), calc((100vh - 590px) * .6446)), 150px); }
html:not(.touch-ui) .spg-slot > .stp { --w: var(--sw); }
html:not(.touch-ui) body #windows .spg-slot { padding: 22px 8px 8px; min-height: 0; }
html:not(.touch-ui) body #windows .spg-slot.cmb { padding-bottom: 26px; }   /* ริบบิ้นคอมโบใต้แสตมป์ ไม่ทับค่า */
@media (max-height: 800px) { html:not(.touch-ui) .spg-own-it .stp { --w: 50px; } html:not(.touch-ui) .spg-env-it .stp-env { --ew: 56px; } html:not(.touch-ui) .spg-main { gap: 8px; } html:not(.touch-ui) .spg-own h5 { margin-bottom: 2px; } html:not(.touch-ui) .spg-cmb { padding-block: 6px; } html:not(.touch-ui) body #windows .spg-slot { padding-top: 20px; padding-bottom: 6px; } }
html:not(.touch-ui) .spg-sv { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* แผงคอมโบ (คอม): แถบแนวนอนใต้ช่อง · การ์ดย่อ (ภาพย่อ · ช่องจิ๋ว · โบนัส) · แสดงแถวแรกแถวเดียว (ที่เหลือดูในแท็บคอมโบ) */
.spg-cmb { display: block; }
.spg-cmb h5 { margin-bottom: 6px; } html body #windows .spg-cmb h5 .cmb-all { min-height: 34px; }
.spg-cmb .cmb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); grid-template-rows: auto; grid-auto-rows: 0; gap: 0 8px; overflow: hidden; max-height: none; }
.spg-cmb .cmb-sub { display: none; }
.spg-cmb .cmb-none { align-self: center; padding: 4px 2px; }
.spg-cmb .cbc { display: flex; flex-wrap: wrap; align-items: center; align-content: start; gap: 4px 8px; padding: 7px 9px; }
.spg-cmb .cbc > header { flex: 1 1 100%; order: -1; }
.spg-cmb .cbc-strip { flex: none; width: 64px; height: 48px; margin: 0; border-radius: 8px; }
.spg-cmb .cbc-slots { flex: none; } .spg-cmb .cbc-slots .stp { --w: 34px; } .spg-cmb .cbc-sl.any, .spg-cmb .cbc-sl.sec { width: 34px; height: 42px; }
.spg-cmb .cbc-meta { flex: 1 1 100px; min-width: 0; align-items: center; }
.spg-cmb .cbc-meta .cbc-bn { font-size: 12.5px; }
.spg-cmb :is(.cbc-miss, .cbc-hint) { flex: 1 1 100%; }
.spg-cmb .cbc .cmb-gi { width: 22px; height: 22px; } .spg-cmb .cbc-nm { font-size: 14px; }
/* iPad (จอสัมผัส สูง > 520): คอลัมน์ซ้ายแคบลง · ช่องแถวเดียวพอดีความกว้าง */
@media (min-height: 521px) {
  html.touch-ui .spg:not(.spg-alb) { grid-template-columns: 250px minmax(0, 1fr); grid-template-areas: "tabs tabs" "side main" "sheet sheet"; grid-template-rows: auto auto auto; }
  html.touch-ui .spg-main { grid-row: auto; }
  html.touch-ui .spg-cmb { display: block; } html.touch-ui .spg-side .cmb-chips { display: none; }   /* iPad มีที่ = แผงคอมโบใต้ช่องแบบคอม (ไม่ใช่ชิปคอลัมน์ซ้าย) */
  html.touch-ui body #windows .spg-cmb h5 .cmb-all { min-height: 44px; }
  html.touch-ui .spg-pv { --pvh: clamp(110px, calc(100dvh - 560px), 220px); }
  html.touch-ui .spg-slot { --sw: clamp(70px, min(calc((100cqw - 24px) / 4 - 10px), calc((100dvh - 330px) * .6446)), 150px); }
  html.touch-ui .spg-slot > .stp { --w: var(--sw); }
  html.touch-ui body #windows .spg-slot > .stp-empty { --w: calc(var(--sw) * .865); }
  html.touch-ui .spg-sv { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* มือถือแนวนอน (สูง ≤ 520): แท็บแคบพอคอลัมน์ซ้าย (คลัง = ไอคอน · "ใหม่" = จุด) · ช่องเตี้ยแสดงค่าอย่างเดียว (ชื่อผลอยู่ในผลรวม/แตะดู) */
@media (max-height: 520px) {
  html.touch-ui .spg:not(.spg-alb) { grid-template-columns: 250px minmax(0, 1fr); }
  html.touch-ui body #windows .spg-slot > .stp { --w: var(--sw); }
  html.touch-ui body #windows .spg-slot > .stp-empty { --w: calc(var(--sw) * .865); margin: 0; }
  html.touch-ui .spg-sv .spg-fxn { display: none; }
  html.touch-ui .spg-slot { --sw: 58px; }
  html.touch-ui body #windows .spg-slot > :is(.stp, .stp-empty) { grid-row: 1 / span 2; }
  html.touch-ui body #windows .spg-slot > .spg-sv { grid-row: 1 / span 2; align-self: center; }
  html.touch-ui:not([lang="en"]) .spg-tabs { flex-wrap: nowrap; }
  html.touch-ui body #windows .spg-tabs [data-spg-book] { min-width: 44px; padding: 0 10px; justify-content: center; margin-left: auto; }
  html.touch-ui body #windows .spg-tabs [data-spg-book] > span { display: none; }
  html.touch-ui .spg-tabs .cmb-new-dot { width: 10px; height: 10px; padding: 0; font-size: 0; align-self: flex-start; margin-top: 6px; }
}
/* กติกาซ้อน/เพดานแสตมป์ (19 ต.ค. reports-ui-1019 · stamp-view.js stackNoteHtml · rulesHtml) */
.stp-stack { margin: 6px 0 0; padding: 5px 9px; border-radius: 9px; font: 500 13px/1.45 var(--font); color: #2f5a33; background: #eef7ee; border: 1px solid #cfe5cf; overflow-wrap: anywhere; }
.stp-stack b { font-weight: 700; }
.stp-stack.cap { color: #6b4510; background: #fff4dc; border-color: #ecd49a; }
.stp-stack.cap.full { color: #8a2a1e; background: #fdecea; border-color: #f2c4bd; }
.stp-stack.pas { color: #5a3a9a; background: #f3ecfd; border-color: #dccbf4; }
.stp-rules { margin: 8px 0 0; padding: 8px 10px; border-radius: 12px; background: #fffaf0; border: 1px solid #e6d6b0; min-width: 0; }
.stp-rules-h { margin: 0 0 4px; font: 600 14px var(--font-head, var(--font)); color: #6b4510; }
.stp-rules ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.stp-rules li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 6px; align-items: start; font: 500 13px/1.45 var(--font); color: #5b4526; overflow-wrap: anywhere; }
.stp-rules li i { font-style: normal; text-align: center; }
.stp-rules li b { color: #2f6f73; }
.spg-cap.full { color: #fff; background: #c0392b; }
.sbk-rrf { font: 500 12.5px var(--font); color: #7a6548; }
/* 19 ต.ค. reports-ui-1019: คอลัมน์ข้อมูล/ของฉันเป็น flex คอลัมน์ที่เลื่อนได้ (min-height 0) → ลูกถูกบีบ — กล่อง "ผลพาสซีฟ" (overflow hidden)
   เหลือสูง 2px บนคอม = ผู้เล่นไม่เห็นว่าแสตมป์ให้ค่าอะไร ("จอ pc แสดงไม่ครบ") · ลูกห้ามหด ให้คอลัมน์เลื่อนแทน */
.sbk-info > *, .sbk-ownw > * { flex-shrink: 0; }
/* หัว "แสตมป์ที่แปะ" + ปุ่มสองอัน: คอลัมน์แคบ (1366) ปุ่มที่สองล้นขอบ → ขึ้นบรรทัดใหม่ได้ ปุ่มกว้างตามข้อความ */
.sbk-deck > .sbk-h { flex-wrap: wrap; row-gap: 6px; }
html body #windows .sbk-deck > .sbk-h .sbk-gop { min-width: max-content; }

/* คำอธิบายสกิลติดตัว (stamp-skill-desc-1020) — ชื่อแตะเปิดการ์ดสกิล · ข้อความตัดคำไม่ล้นจอ */
.stp-pd { display: grid; gap: 2px; min-width: 0; margin: 4px 0; padding: 6px 9px; border-radius: 11px; background: #f4eeff; border: 1px solid #d9c9f3; text-align: left; }
.stp-pd-n { justify-self: start; max-width: 100%; margin: 0; padding: 2px 4px; min-height: 28px; border: 0; background: none; font: 600 13.5px/1.3 var(--font-head, var(--font)); color: #6a43b8; text-decoration: underline dotted; cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.stp-pd-t { margin: 0; font: 500 12.5px/1.45 var(--font); color: #4a3a22; overflow-wrap: anywhere; word-break: break-word; }
.stp-pd-s { font: 500 11.5px/1.35 var(--font); color: #7a52c8; }
.spg-totl li .stp-pd.in-li { grid-column: 1 / -1; margin: 0 0 2px; padding: 4px 8px; }
.spg-totl li .stp-pd.in-li .stp-pd-n { font-size: 12.5px; min-height: 24px; }
html.touch-ui .stp-pd-n { min-height: 32px; }
.sbk-effb .stp-pd { margin: 0; }
.srv-info .stp-pd, .ss-info .stp-pd { margin: 2px 0; } .srv-info .stp-pd-t, .ss-info .stp-pd-t { max-height: 6.2em; overflow-y: auto; }
@media (max-height: 460px) { .srv-info .stp-pd-t, .ss-info .stp-pd-t { max-height: 4.4em; font-size: 12px; } .stp-pd-s { display: none; } }

/* ── stamp-s-1023 ชั้นบน "ดูแพง" (CSS ล้วน · ไม่มีภาพใหม่ · ภาพตราทอง/มงกุฎ/พื้นตำนาน รอผู้ใช้อนุมัติแล้วค่อยเปลี่ยน) ──
   ♛ ตำนาน = มงกุฎบนกรอบ + ออร่าทองนวลรอบใบ · S+ = ตราครั่งทองมุมขวาล่าง · ฟอยล์ = ลายรุ้งจาง (ทับได้ทุก Rank) · พุดดิ้ง = เด้งดึ๋ง
   ภาพเคลื่อนไหววนเฉพาะใบที่อยู่บนจอ (.live · IntersectionObserver ใน stampLive) · prefers-reduced-motion = นิ่ง · ห้ามวนบนของที่สะสมนอกจอ (perf 4b) */
.stp :is(.stp-foil, .stp-lgd-aura, .stp-crown, .stp-seal) { position: absolute; pointer-events: none; }
.stp-foil { inset: 0; z-index: 3; mix-blend-mode: soft-light; opacity: .55; border-radius: 6%;
  background: linear-gradient(115deg, #ff9ad5 0%, #ffe28a 20%, #9bf0c6 40%, #8ad0ff 60%, #c5a4ff 80%, #ff9ad5 100%); background-size: 260% 100%; background-position: 0 0;
  -webkit-mask: url('assets/ui/stamp/frame_s.webp') 0 0 / 100% 100% no-repeat; mask: url('assets/ui/stamp/frame_s.webp') 0 0 / 100% 100% no-repeat; }
.stp.foil.live .stp-foil { animation: stp-foil 5s linear infinite; }
@keyframes stp-foil { to { background-position: 260% 0; } }
.stp-lgd-aura { inset: -7%; z-index: -1; border-radius: 12%; background: radial-gradient(closest-side, #fff3c4cc, #e8b64a66 55%, #e8b64a00 100%); }
.stp.lgd.live .stp-lgd-aura { animation: stp-lgd-pulse 2.6s ease-in-out infinite; }
@keyframes stp-lgd-pulse { 50% { opacity: .55; transform: scale(1.04); } }
.stp-crown { left: 50%; top: -9%; translate: -50% 0; z-index: 4; font: 700 1.05em/1 var(--font-head, sans-serif); color: #e8b64a; text-shadow: 0 1px 0 #8a5a10, 0 0 6px #fff3c4; }
.stp-s .stp-crown, .stp-xs .stp-crown { font-size: .8em; top: -12%; }
.stp-l .stp-crown { font-size: 1.6em; }
.stp-seal { right: 4%; bottom: 13%; z-index: 4; width: 26%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, #e8b64a 55%, #b9821c); color: #5a3a08; font: 700 .72em/1 var(--font-head, sans-serif);
  box-shadow: 0 0 0 2px #fff3c4, 0 2px 4px rgba(90, 58, 8, .45); }
.stp-s .stp-seal { font-size: .5em; } .stp-l .stp-seal { font-size: 1.1em; }
.stp.jelly.live .stp-mob { animation: stp-jelly 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes stp-jelly { 0%, 100% { scale: 1 1; } 12% { scale: 1.08 .9; } 24% { scale: .94 1.07; } 36% { scale: 1.03 .97; } 48% { scale: 1 1; } }
@media (prefers-reduced-motion: reduce) { .stp.live :is(.stp-foil, .stp-lgd-aura, .stp-mob) { animation: none !important; } }
/* บรรทัดชั้นบนในการ์ด/ป๊อปอัป */
.stp-top { margin: 6px 0 2px; display: grid; gap: 3px; font-size: 12.5px; }
.stp-pvh { margin: 0; font-size: 11.5px; color: #8a7350; }
.stp-star { margin: 0; color: #9a6a10; font-weight: 600; }
.stp-lgd-box { padding: 5px 8px; border-radius: 9px; background: linear-gradient(#fff8e2, #fbedc4); border: 1.5px solid #e8b64a; }
.stp-lgd-box b { color: #7a4f08; } .stp-lgd-box b em { font-style: normal; padding: 0 5px; border-radius: 5px; background: #e8b64a; color: #5a3a08; }
.stp-lgd-box p { margin: 2px 0 0; } .stp-lgd-box .good { color: #3d5a1e; } .stp-lgd-box .bad { color: #a0522d; }
.stp-lgd-box small { display: block; color: #8a7350; font-size: 11px; }
.stp-top .pv { opacity: .62; filter: saturate(.6); }
.stp-echo { margin: 0; color: #2f6f73; }
.ss-foil { font-style: normal; margin-left: 6px; padding: 0 6px; border-radius: 6px; background: linear-gradient(90deg, #ffd6ee, #fff1c2, #d2f6e6, #d6ecff); color: #5a3a6a; font-size: 12px; }
.spg-zz { display: block; color: #8a7350; font-size: 11px; }
.ss-fuse { margin: 6px 0; padding: 6px 8px; border-radius: 9px; background: #fff8e2; border: 1px dashed #e8b64a; font-size: 12.5px; }
.ss-fuse p { margin: 0 0 4px; } .ss-fuse button { min-height: 36px; }
/* ฉากเปิดซองชั้นบน (ใหญ่กว่า S ปกติ · aura texture เดิม + halo ทอง) */
.srv:is(.lgd, .plus, .foil) { --rk: #e8b64a; }
.srv.foil:not(.lgd):not(.plus) { --rk: #c5a4ff; }
.srv:is(.lgd, .plus, .foil).s4 > .srv-sun { animation: srv-sun-in .6s ease-out 1 both, srv-spin 24s linear 1; }
.srv:is(.lgd, .plus, .foil).done > .srv-sun { opacity: .5; scale: 1.1; }
.srv:is(.lgd, .plus, .foil).s4 .srv-ribbon { animation: srv-ribbon .42s cubic-bezier(.3, 1.6, .5, 1) 1 .12s both; }
.srv:is(.lgd, .plus, .foil).done .srv-ribbon { opacity: 1; transform: rotate(-6deg); }
.srv-ribbon.lgd span { background: linear-gradient(#fff1b8, #e8b64a 55%, #b9821c); font-size: 20px; }
.srv-ribbon.foil span { background: linear-gradient(90deg, #ffd6ee, #fff1c2, #d2f6e6, #d6ecff); color: #4a2f5a; box-shadow: 0 3px 0 #9a7ab8, 0 6px 14px rgba(80, 50, 120, .35); }
#stamp-reveal > .srv-halo { position: absolute; left: 50%; top: 50%; width: min(90vmin, 640px); aspect-ratio: 1; translate: -50% -50%; pointer-events: none; opacity: 0;
  background: var(--rk); -webkit-mask: url('assets/particles/aura.webp') center / contain no-repeat; mask: url('assets/particles/aura.webp') center / contain no-repeat; }
.srv.s4 > .srv-halo { animation: srv-aura .8s ease-out 1 both; }
.srv.done > .srv-halo { opacity: .45; }
.srv.jelly.s4 .srv-stamp { animation: stp-jelly .9s ease-out 1; transform-origin: 50% 100%; }
/* stamp-drop-fx-1109 (เจ้าของ 9 พ.ย. "เด้งออร่าเหมือนได้ของแรร์") — แยกขั้นให้ต่างกันชัด · ภาพเดิมของเกมผ่าน mask (ไม่มี canvas) · ครั้งเดียว ไม่ infinite · ?stampfx=0 = ไม่มีคลาส sfx2
   C เรียบ: แสงรอบซอง + วงคลื่นเท่านั้น · B ประกายฟ้า (เดิม) · A ระเบิดม่วง s_burst ย้อมสี Rank · S เดิม (ตะวัน+ระเบิดทอง+ริบบิ้น+ระฆัง) · ฟอยล์: เงารุ้งวิ่งผ่านแสตมป์ 2 รอบ */
.srv.sfx2.rC:not(.foil) :is(.srv-rays, .srv-sparks) { display: none; }
.srv-stage > .srv-burst2 { position: absolute; left: 50%; top: 50%; z-index: 0; width: 150%; aspect-ratio: 1; translate: -50% -50%; pointer-events: none; opacity: 0; scale: .3;
  background: radial-gradient(closest-side, #e6d2ff 0 15%, #b48aff 45%, var(--rk)); -webkit-mask: url('assets/ui/pet/s_burst.webp') center / contain no-repeat; mask: url('assets/ui/pet/s_burst.webp') center / contain no-repeat; }
.srv.s4:not(.done) .srv-burst2 { animation: srv-burst2 .55s ease-out 1 both; }
@keyframes srv-burst2 { 0% { opacity: 0; scale: .4; rotate: -16deg; } 30% { opacity: .85; scale: 1; } 100% { opacity: 0; scale: 1.35; rotate: 12deg; } }
.srv-holo { position: absolute; inset: 3%; z-index: 4; overflow: hidden; pointer-events: none; mix-blend-mode: screen; border-radius: 6%; opacity: .75; }
.srv-holo::before { content: ''; position: absolute; top: -10%; bottom: -10%; left: 0; width: 70%; transform: translateX(-130%) skewX(-16deg);
  background: linear-gradient(90deg, rgba(255, 154, 213, 0), rgba(255, 154, 213, .8) 20%, rgba(255, 226, 138, .9) 40%, rgba(155, 240, 198, .9) 60%, rgba(138, 208, 255, .85) 80%, rgba(197, 164, 255, 0)); }
.srv.s4 .srv-holo::before { animation: stp-sweep 1.1s ease-in-out 2 .05s; }
@media (prefers-reduced-motion: reduce) { .srv-burst2, .srv-holo { display: none; } }

/* ร้านเพชรรอบแสตมป์ (ใบ refine-gem-1023) — ความสวยล้วน · ไม่ใช้สีของ Rank · ชั้นสีครีมทับภาพให้ตัวหนังสืออ่านออก */
.spg.sc_meadow, .spg.sc_starry { border-radius: 14px; padding: 8px; background-size: cover; background-position: center; }
.spg.sc_meadow { background-image: linear-gradient(rgba(255, 250, 238, .55), rgba(255, 250, 238, .55)), url('assets/ui/stamp/cover_meadow.webp'); }
.spg.sc_starry { background-image: linear-gradient(rgba(252, 248, 255, .55), rgba(252, 248, 255, .55)), url('assets/ui/stamp/cover_starry.webp'); }
.srv.sp_lantern .srv-card { background: linear-gradient(rgba(255, 250, 240, .72), rgba(246, 234, 208, .82)), url('assets/ui/stamp/pack_lantern.webp') center / cover; }
.srv.sp_garden .srv-card { background: linear-gradient(rgba(255, 250, 240, .72), rgba(246, 234, 208, .82)), url('assets/ui/stamp/pack_garden.webp') center / cover; }
/* เด็คที่บันทึก — แถวการ์ดเล็กใต้ 4 ช่อง · ปุ่ม ≥ 40px */
.sdk { margin: 6px 0 4px; }
.sdk-h { margin: 0 0 4px; font-weight: 700; font-size: 13px; } .sdk-h small { font-weight: 400; color: #8a7a58; }
.sdk-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; }
.sdk-it { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 6px; padding: 4px 6px; border-radius: 10px; background: #fff8e8; border: 1px solid #e3d3ad; }
.sdk-it.empty { background: #fbf5e6; } .sdk-it.lock { opacity: .75; }
.sdk-it b { font-size: 12px; } .sdk-it small { color: #8a7a58; font-size: 11px; justify-self: end; }
.sdk-it span { grid-column: 1 / -1; display: flex; gap: 4px; }
.sdk-it button { flex: 1; min-height: 40px; border-radius: 8px; border: 1px solid #d9c595; background: #fffdf6; color: #4a3a20; font: inherit; font-size: 12px; cursor: pointer; }
.sdk-it.lock button { grid-column: 1 / -1; }

/* ── ลากวาง + แตะใบ→แตะช่อง (ใบ stamp-dnd-1031 · client/stamp-dnd.js · ?sdnd=0 = แบบเดิม) ─────────────────────────────
   ช่องที่วางได้เรือง teal · ช่องล็อกจาง · ช่องใต้นิ้วขอบทองหนา · ภาพตามนิ้วอยู่เหนือนิ้ว (นิ้วไม่บัง) · ตัวหนังสือใช้ --fs-* (ratchet ui-scale) */
:is(.spg-own-it, .spg-slots .spg-slot) { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.spg-own-it .stp img, .spg-slot .stp img { -webkit-user-drag: none; }
html body #windows .spg-own-it[data-bag] { cursor: grab; }
html body #windows .spg.dnd .spg-slot.dnd-ok { border-color: #2f6f73; background: #eef7f4; box-shadow: 0 0 0 3px #2f6f7340; }
html body #windows .spg.dnd .spg-slot.dnd-ok::after { content: ''; position: absolute; inset: 3px; border-radius: 13px; border: 2px dashed #2f6f73aa; pointer-events: none; }
html body #windows .spg.dnd .spg-slot.dnd-no { opacity: .45; filter: saturate(.4); }
html body #windows .spg.dnd .spg-slot.dnd-over { border-color: #e8b64a; background: linear-gradient(#fff8e2, #fbedc4); box-shadow: 0 0 0 4px #e8b64a88; transform: scale(1.03); transition: transform .12s ease-out; }
html body #windows .spg.dnd .dnd-src { opacity: .35; }
.spg.dnd.dnd-from-slot .spg-own { outline: 2px dashed #c98a5a; outline-offset: -2px; background: #fdf0e6; }
/* จองช่องว่าง (แตะช่องก่อน) → ช่องขอบทอง + แสตมป์ในกระเป๋าเรือง */
html body #windows .spg-slot.armed { border-color: #e8b64a; background: linear-gradient(#fff8e2, #fbedc4); box-shadow: 0 0 0 3px #e8b64a66; }
html body #windows .spg-own-it.cand { border-color: #2f6f73; background: #eef7f4; }
.spg-pickbar .spg-pkn { font-weight: 600; color: #4a2e12; white-space: nowrap; }
.spg-pickbar .spg-pkn .srv-rk { font-style: normal; padding: 0 6px; border-radius: 99px; font-size: var(--fs-xs, 12px); }
.spg-pkb { display: inline-flex; gap: 6px; flex: none; }
.spg-dndhint { margin: 0 0 4px; font: 600 var(--fs-xs, 12.5px)/1.3 var(--font); color: #245d60; }
/* ภาพตามนิ้ว (ลูกของ <body> · ชั้น Popup) */
.sdnd-ghost { position: fixed; left: 0; top: 0; z-index: var(--z-popup, 300); pointer-events: none; display: grid; justify-items: center; gap: 4px; margin: -48px 0 0 -36px; filter: drop-shadow(0 8px 14px rgba(80, 50, 20, .35)); will-change: transform; }
.sdnd-ghost.touch { margin: -118px 0 0 -36px; }   /* นิ้ว: ลอยเหนือนิ้ว ไม่โดนบัง */
.sdnd-ghost .stp { --w: 72px; transform: rotate(-4deg); }
.sdnd-cap { padding: 2px 10px; border-radius: 99px; background: #2f6f73; color: #fff; font: 600 var(--fs-sm, 14px) var(--font-head, var(--font)); white-space: nowrap; }
.sdnd-ghost.rm .sdnd-cap { background: #a0502a; }
.sdnd-ghost.bad .sdnd-cap { background: #7a6a52; }
@media (prefers-reduced-motion: reduce) { html body #windows .spg.dnd .spg-slot.dnd-over { transform: none; transition: none; } }
/* รอบ 2 (ข้อเสนอ D): ซองปุ่มเดียวที่หัวกระเป๋า · แถบพับชั้นสอง (แถวพิเศษ · เด็ค · กติกา) — เฉพาะ .spg.sdnd */
.spg.sdnd .spg-own h5 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.spg.sdnd .spg-own h5 > span:first-child { margin-right: auto; }
html body #windows .spg-envbtn { display: inline-flex; align-items: center; gap: 6px; min-height: var(--btn-h, 44px); padding: 0 6px 0 4px; border-radius: 12px; border: 1.5px solid #c9a86a; background: #fff6dc; color: #5b4526; font: 600 var(--fs-sm, 14px) var(--font-head, var(--font)); cursor: pointer; }
.spg-envbtn .stp-env { --ew: 30px; flex: none; }
.spg-envbtn b { padding: 4px 12px; border-radius: 9px; background: linear-gradient(#3f8584, #2f6f73); color: #fff; font-weight: 600; }
.spg-folds { display: grid; gap: 6px; }
.spg-fold { border-radius: 12px; border: 1px solid #e6d6b0; background: #fbf4e2; min-width: 0; }
html body #windows .spg-fold-h { display: flex; align-items: center; gap: 8px; width: 100%; min-height: var(--btn-h, 44px); padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: #245d60; font: 600 var(--fs-sm, 14px) var(--font-head, var(--font)); text-align: left; cursor: pointer; }
.spg-fold-h .spg-fold-t { margin-right: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spg-fold-h small { font: 500 var(--fs-xs, 12px) var(--font); color: #7a6540; white-space: nowrap; }
.spg-fold-h i { font-style: normal; color: #8a6a3a; }
.spg-fold-b { padding: 0 10px 10px; }
.spg-fold-b > :is(.cst-wrap, .sdk, .sj-sub) { margin-top: 0; }

/* info-tags-1108: หน้ารายละเอียดคอมโบ — "คอมโบแสตมป์ (ไม่ใช่สกิล)" + PvP (stamp-combo-core comboBrief) */
.cbd-kind { margin: 0 0 4px; padding: 4px 8px; border-radius: 8px; background: #f3ead2; font: 600 var(--fs-xs, 12px)/1.4 var(--font); color: #5b4526; }
.cbd-kind .ico { vertical-align: -2px; }
.cbd-kind .cbd-nw { white-space: nowrap; }
