/* สมุดผจญภัย › แสตมป์ 3 แท็บ (ใบ stamp-journal-1025 · stamp-book.js stampView) + แถวรอง 4 ช่องล็อก (สมุด + หน้าแปะจริง)
   รายการ "เก็บอะไรได้บ้าง?" · รายละเอียด "แสตมป์นี้ทำอะไร?" · ที่แปะ "กำลังสร้าง build อะไร?" — แท็บทุกขนาดจอ (เดิมคอม = กริด 5 คอลัมน์)
   ตัวหนังสือใช้ตัวแปร --fs-* ของ ui-scale.css เท่านั้น (server/ui-scale.test.js: ไฟล์ใหม่ = 0 px ตรง) · ไม่มี blur/animation infinite
   ความสูงอ้างอิง 100cqh จาก .cx-body (container sbkb · ui-stamp.css) · :has() จบด้วยคลาส (กฎ perf) */
#windows .cx[data-cx="stamp"] { --sj-cream: #fffaf0; --sj-paper: #fffdf6; --sj-ln: #e6d6b0; --sj-teal: #2f6f73; --sj-gold: #e8b64a; --sj-ink: #3e2c16; --sj-mute: #7a6540; }
#windows .sj { box-sizing: border-box; min-height: 100cqh; color: var(--sj-ink); }
#windows .sj *, #windows .sj *::before { box-sizing: border-box; }
#windows .sj .ui-ic { width: 18px; height: 18px; flex: none; }
/* แท็บ (อยู่ในแถว .cx-filter ทุกขนาดจอ) */
#windows .cx[data-cx="stamp"] .sbk-seg { display: flex; flex: none; gap: 4px; padding: 3px; border-radius: 14px; background: #eadcb8; width: max-content; }
html body #windows .cx[data-cx="stamp"] .sbk-seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 11px; border: 0; background: transparent; color: #6b5530; font: 600 var(--fs-sm, 14px) var(--font-head, var(--font)); cursor: pointer; white-space: nowrap; }
html body #windows .cx[data-cx="stamp"] .sbk-seg button.on { background: var(--sj-teal); color: #fff; box-shadow: 0 2px 5px rgba(47, 111, 115, .35); }
html body #windows .cx[data-cx="stamp"] .sbk-seg button.on .ui-ic { filter: brightness(0) invert(1); }
html.touch-ui body #windows .cx[data-cx="stamp"] .sbk-seg button { min-height: 44px; }
#windows .cx[data-cx="stamp"] .sbk-seg .ui-ic { width: 20px; height: 20px; }
#windows .sj-bar { display: block; height: 10px; border-radius: 6px; background: #eadcb8; overflow: hidden; box-shadow: inset 0 1px 2px rgba(80, 50, 20, .18); }
#windows .sj-bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4a9592, var(--sj-teal)); }
#windows .sj-bar.cmb > i { background: linear-gradient(90deg, #f3cf72, #d9a43a); }
#windows .sj-none { margin: 4px 0; color: var(--sj-mute); font: 500 var(--fs-sm, 14px) var(--font); }

/* ── แท็บ 1 รายการ ── */
#windows .sj-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; min-height: 128px; border-radius: 18px; overflow: hidden; background: #cfe3e6; border: 2px solid #d9c08a; }
#windows .sj-hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 75% 45%; }
#windows .sj-hero-in { position: relative; display: grid; gap: 6px; width: min(440px, 100%); margin: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 250, 240, .9); box-shadow: 0 2px 8px rgba(60, 40, 20, .18); }
#windows .sj-hero-t { display: flex; align-items: center; gap: 8px; margin: 0; } #windows .sj-hero-t b { font: 700 var(--fs-title, 20px) var(--font-head, var(--font)); color: var(--sj-teal); }
#windows .sj-hero-t .ui-ic { width: 24px; height: 24px; }
#windows .sj-prow { display: grid; grid-template-columns: minmax(0, auto) auto minmax(90px, 1fr); align-items: center; gap: 10px; margin: 0; }
#windows .sj-prow > span { font: 600 var(--fs-sm, 14px) var(--font); color: #5b4526; white-space: nowrap; }
#windows .sj-prow > b { font: 700 var(--fs-name, 18px) var(--font-head, var(--font)); color: var(--sj-teal); white-space: nowrap; } #windows .sj-prow > b small { font-size: var(--fs-xs, 12px); color: var(--sj-mute); }
#windows .sj-hero-s { font: 500 var(--fs-xs, 12px) var(--font); color: var(--sj-mute); }
#windows .sj-hero-go { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin: 12px; }
html body #windows .sj-go { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 12px; border: 1.5px solid #c9a86a; background: rgba(255, 250, 240, .94); color: #4a3216; font: 600 var(--fs-sm, 14px) var(--font-head, var(--font)); cursor: pointer; white-space: nowrap; box-shadow: 0 2px 5px rgba(60, 40, 20, .18); }
html body #windows .sj-go:hover { background: #fff; }
html body #windows .sj-go small { font-size: var(--fs-xs, 12px); color: var(--sj-mute); }
html.touch-ui body #windows .sj-go { min-height: 44px; }
/* ตัวกรองแถวเดียว */
#windows .sj-fbar { display: flex; align-items: center; gap: 6px; margin: 10px 0 2px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
#windows .sj-fbar::-webkit-scrollbar { display: none; }
html body #windows .sj-chip { display: inline-flex; flex: none; align-items: center; gap: 5px; min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1.5px solid var(--sj-ln); background: var(--sj-paper); color: #5b4526; font: 600 var(--fs-sm, 14px) var(--font); cursor: pointer; white-space: nowrap; }
html body #windows .sj-chip.on { border-color: var(--sj-teal); background: var(--sj-teal); color: #fff; }
html body #windows .sj-chip.on .ui-ic { filter: brightness(0) invert(1); }
html.touch-ui body #windows .sj-chip { min-height: 44px; }
#windows .sj-more-f { flex: none; margin-left: auto; }
#windows .sj-more-f select { min-height: 40px; max-width: 200px; padding: 0 10px; border-radius: 99px; border: 1.5px solid #c9a86a; background: linear-gradient(#f8ecd0, #efdcae); color: #4a3216; font: 600 var(--fs-sm, 14px) var(--font); }
#windows .sj-more-f.on select { border-color: var(--sj-teal); box-shadow: 0 0 0 2px rgba(47, 111, 115, .3); }
html.touch-ui #windows .sj-more-f select { min-height: 44px; }
/* กริดการ์ด จัดกลุ่มตามภูมิภาค */
#windows .sj-grid { list-style: none; margin: 8px 0 0; padding: 0 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(222px, 1fr)); gap: 8px; }
#windows .sj-grid > li { min-width: 0; }
#windows .sj-rh { grid-column: 1 / -1; position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; margin-top: 6px; padding: 0 14px; border-radius: 14px; overflow: hidden; background: #f3e6c6; border: 1.5px solid #dcc898; }
#windows .sj-rh:first-child { margin-top: 0; }
#windows .sj-rh-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; -webkit-mask-image: linear-gradient(90deg, transparent 0, transparent 30%, #000 85%); mask-image: linear-gradient(90deg, transparent 0, transparent 30%, #000 85%); }
#windows .sj-rh-t { position: relative; display: flex; align-items: baseline; gap: 10px; min-width: 0; }
#windows .sj-rh-t b { font: 700 var(--fs-body, 16px) var(--font-head, var(--font)); color: #5b3f12; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#windows .sj-rh-t small { font: 600 var(--fs-xs, 12px) var(--font); color: var(--sj-teal); white-space: nowrap; }
#windows .sj-rh .sj-bar.reg { position: relative; width: 120px; flex: none; height: 8px; background: rgba(255, 250, 240, .85); }
html body #windows .sj-card { position: relative; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; min-height: 96px; padding: 6px 10px 6px 6px; border-radius: 14px; border: 1.5px solid var(--sj-ln); background: var(--sj-paper); color: var(--sj-ink); text-align: left; font: inherit; cursor: pointer; box-shadow: 0 1px 3px rgba(80, 50, 20, .1); }
html body #windows .sj-card:hover { border-color: #d6b46a; background: #fff8e6; }
html body #windows .sj-card.on { border-color: var(--sj-gold); background: linear-gradient(90deg, #fff4d2, #fdf0c8); box-shadow: 0 2px 7px rgba(138, 90, 26, .22); }
html body #windows .sj-card.rS { border-color: #e8c66a; } html body #windows .sj-card.rA { border-color: #cdb4ec; } html body #windows .sj-card.rB { border-color: #b4d0ee; }
html body #windows .sj-card.unk { background: #f5efe0; border-style: dashed; border-color: #d8c8a4; box-shadow: none; }
#windows .sj-cimg { display: block; line-height: 0; } #windows .sj-cimg .stp { --w: 54px; }
#windows .sj-cb { display: grid; gap: 4px; min-width: 0; }
#windows .sj-cn { font: 600 var(--fs-sm, 14px)/1.25 var(--font-head, var(--font)); color: #3e2c16; overflow-wrap: anywhere; }
#windows .sj-card.unk .sj-cn { color: #8a7a62; }
#windows .sj-pips { display: flex; gap: 3px; }
#windows .sj-pips i { display: inline-grid; place-items: center; width: 20px; height: 18px; border-radius: 6px; border: 1px solid #dccca8; background: #fff; color: #c2b392; font: 700 var(--fs-xs, 12px)/1 'Mitr', 'Anuphan', sans-serif; font-style: normal; }
#windows .sj-pips i.on { border-color: transparent; color: #fff; text-shadow: 0 1px 0 #0003; }
#windows .sj-pips i.rC.on { background: #6fae5a; } #windows .sj-pips i.rB.on { background: #4a8fd0; } #windows .sj-pips i.rA.on { background: #9a6ad8; } #windows .sj-pips i.rS.on { background: #e8b64a; color: #5a3a08; text-shadow: none; }
#windows .sj-ics { display: flex; align-items: center; gap: 4px; }
#windows .sj-ic { display: inline-flex; align-items: center; justify-content: center; gap: 2px; min-width: 24px; height: 22px; padding: 0 3px; border-radius: 7px; background: #f3ead6; font-style: normal; }
#windows .sj-ic .ui-ic { width: 16px; height: 16px; }
#windows .sj-ic.g-atk { background: #f8dfd6; } #windows .sj-ic.g-def { background: #dbe8f4; } #windows .sj-ic.g-sup { background: #dfeed6; } #windows .sj-ic.g-passive { background: #f7ebc6; }
#windows .sj-ic.s-boss, #windows .sj-ic.s-rare { background: #fbefc9; } #windows .sj-ic.s-evt { background: #f6dcea; }
#windows .sj-ic.cmb { border: 1px solid #9cc3c0; background: #eef6f4; } #windows .sj-ic.cmb small { font: 700 var(--fs-xs, 12px)/1 var(--font); color: var(--sj-teal); }
#windows .sj-ic.cmb.on { border-color: #d9a43a; background: #fdeec2; } #windows .sj-ic.cmb.on small { color: #8a5a10; }

/* ── แท็บ 2 รายละเอียด (ซ้ายภาพใหญ่ · ขวาข้อมูล — เลื่อนแยก) ── */
#windows .sj.sj-detail { display: grid; grid-template-columns: minmax(250px, 38%) minmax(0, 1fr); gap: 14px; height: 100cqh; min-height: 0; }
#windows .sj-show { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 0; padding: 14px 12px; border-radius: 18px; overflow: hidden; background: #f1e3c0; border: 2px solid #d9c08a; }
#windows .sj-show-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
#windows .sj-show::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 42%, rgba(255, 250, 240, .78), rgba(255, 250, 240, .25) 70%); }
#windows .sj-show > :not(.sj-show-bg) { position: relative; }
#windows .sj-showw { display: flex; align-items: center; gap: 6px; }
#windows .sj-showw .stp { --w: clamp(110px, calc((100cqh - 210px) * .6446), 250px); filter: drop-shadow(0 6px 10px rgba(60, 40, 20, .28)); }
html body #windows .sj-bigbtn { padding: 0; border: 0; background: none; cursor: zoom-in; line-height: 0; }
html body #windows .sj-step { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid #c9a86a; background: rgba(255, 250, 240, .92); color: #6b4510; font: 700 var(--fs-hero, 24px)/1 var(--font); cursor: pointer; box-shadow: 0 2px 5px rgba(60, 40, 20, .2); }
#windows .sj-rk4 { display: flex; justify-content: center; gap: 6px; }
html body #windows .sj-rk1 { position: relative; display: grid; justify-items: center; gap: 2px; padding: 3px 4px 2px; border-radius: 10px; border: 1.5px solid transparent; background: rgba(255, 250, 240, .85); font: inherit; color: inherit; cursor: pointer; }
#windows .sj-rk1 .stp { --w: 34px; } #windows .sj-rk1 b { font: 700 var(--fs-xs, 12px)/1 'Mitr', 'Anuphan', sans-serif; color: #6b5530; }
html body #windows .sj-rk1.best { border-color: var(--sj-gold); background: #fff4d2; }
#windows .sj-rk1.dim { opacity: .45; cursor: default; } #windows .sj-rk1.seen { cursor: default; }
#windows .sj-rk1 .sbk-q { position: absolute; top: -7px; right: -7px; bottom: auto; z-index: 2; min-width: 0; height: auto; padding: 1px 5px; border-radius: 99px; border: 0; background: var(--sj-teal); color: #fff; font: 700 var(--fs-xs, 12px)/1.25 var(--font); font-style: normal; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
#windows .sj-lock { display: flex; align-items: center; gap: 6px; margin: 0; padding: 4px 10px; border-radius: 99px; background: rgba(255, 250, 240, .9); font: 500 var(--fs-xs, 12px) var(--font); color: #6b5530; }
html body #windows .sj-place { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 180px; padding: 0 18px; border-radius: 14px; border: 1.5px solid #245d60; background: linear-gradient(#3f8584, var(--sj-teal)); color: #fff; font: 600 var(--fs-body, 16px) var(--font-head, var(--font)); cursor: pointer; box-shadow: 0 2px 6px rgba(47, 111, 115, .35); }
html body #windows .sj-place .ui-ic { filter: brightness(0) invert(1); }
html body #windows .sj-place:disabled { border-color: #cdb27a; background: #efe3c4; color: #8a7a62; cursor: default; box-shadow: none; }
html body #windows .sj-place:disabled .ui-ic { filter: none; opacity: .6; }
#windows .sj-info { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 0 4px 8px 0; }
#windows .sj-title { margin: 0; font: 700 var(--fs-hero, 24px)/1.2 var(--font-head, var(--font)); color: var(--sj-teal); }
#windows .sj-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
#windows .sj-tag { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 10px; border-radius: 99px; background: #f3ead6; border: 1px solid #e2d2ac; font: 600 var(--fs-xs, 12px) var(--font); font-style: normal; color: #5b4526; }
#windows .sj-tag .ui-ic { width: 16px; height: 16px; }
#windows .sj-tag.g-atk { background: #f8dfd6; border-color: #ecc3b4; } #windows .sj-tag.g-def { background: #dbe8f4; border-color: #b9d1ea; } #windows .sj-tag.g-sup { background: #dfeed6; border-color: #bfdcb0; } #windows .sj-tag.g-passive { background: #f7ebc6; border-color: #e8d390; }
#windows .sj-tag.s-boss, #windows .sj-tag.s-rare { background: #fbefc9; border-color: #ead48a; } #windows .sj-tag.s-evt { background: #f6dcea; border-color: #e6bcd3; }
#windows .sj-fx { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--sj-cream); border: 2px solid var(--sj-gold); box-shadow: 0 2px 6px rgba(138, 90, 26, .14); }
#windows .sj-fxic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: #f6ecd0; } #windows .sj-fxic .ui-ic { width: 30px; height: 30px; }
#windows .sj-fx .stp-skic.big { width: 46px; height: 46px; }
#windows .sj-fxt { display: grid; gap: 2px; min-width: 0; } #windows .sj-fxt b { font: 700 var(--fs-name, 18px) var(--font-head, var(--font)); color: #4a3216; } #windows .sj-fxt small { font: 500 var(--fs-sm, 14px) var(--font); color: var(--sj-mute); }
#windows .sj-fxv { display: grid; justify-items: end; gap: 0; text-align: right; } #windows .sj-fxv b { font: 700 var(--fs-hero, 24px)/1.1 var(--font-head, var(--font)); color: var(--sj-teal); white-space: nowrap; } #windows .sj-fxv small { font: 500 var(--fs-xs, 12px) var(--font); color: var(--sj-mute); }
#windows .sj-rnow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: -2px 0 0; font: 600 var(--fs-sm, 14px) var(--font); color: #5b4526; }
#windows .sj-rnext { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 99px; background: #eef6f4; border: 1px solid #b7d6d2; color: #2c5e60; }
#windows .sj-rnext b { color: var(--sj-teal); } #windows .sj-rnext small { font-size: var(--fs-xs, 12px); color: var(--sj-mute); }
#windows .sj-rnext.top { background: #fdf0c8; border-color: #ead48a; color: #7a5410; }
#windows .sj-sec { display: grid; gap: 8px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 250, 240, .7); border: 1.5px solid var(--sj-ln); }
#windows .sj-sec > h4 { display: flex; align-items: center; gap: 6px; margin: 0; font: 700 var(--fs-body, 16px) var(--font-head, var(--font)); color: #6b4510; }
#windows .sj-sec .sbk-chips { margin: 0; }
/* คอมโบที่ใช้แสตมป์นี้ */
#windows .sj-cmbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
html body #windows .sj-cmb { display: grid; gap: 6px; width: 100%; padding: 8px 10px; border-radius: 14px; border: 1.5px solid var(--sj-ln); background: var(--sj-paper); color: var(--sj-ink); text-align: left; font: inherit; cursor: pointer; }
html body #windows .sj-cmb:hover { background: #fff8e6; }
html body #windows .sj-cmb.k-on { border-color: var(--sj-gold); background: linear-gradient(135deg, #fff6da, #fdeec2); box-shadow: 0 0 0 2px rgba(232, 182, 74, .28); }
html body #windows .sj-cmb.k-ready { border-color: #7fb3ae; } html body #windows .sj-cmb.k-miss1 { border-style: dashed; border-color: #d9a43a; }
#windows .sj-cmbh { display: flex; align-items: center; gap: 6px; min-width: 0; } #windows .sj-cmbh b { flex: 1 1 auto; min-width: 0; font: 700 var(--fs-sm, 14px) var(--font-head, var(--font)); color: #4a3216; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#windows .sj-cmbh .cmb-fi { width: 22px; height: 22px; flex: none; }
#windows .sj-cmbb { display: flex; align-items: center; gap: 10px; min-width: 0; }
#windows .sj-cmbb .cbc-slots { flex: none; } #windows .sj-cmbb .cbc-slots .stp { --w: 30px; } #windows .sj-cmbb .cbc-sl.any, #windows .sj-cmbb .cbc-sl.sec { width: 30px; height: 40px; }
#windows .sj-cmbx { display: grid; gap: 1px; min-width: 0; } #windows .sj-cmbx > b { font: 700 var(--fs-body, 16px)/1 var(--font-head, var(--font)); color: var(--sj-teal); }
#windows .sj-cmbx .cbc-bn { margin: 0; font: 500 var(--fs-xs, 12px)/1.3 var(--font); color: #5b4526; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html body #windows .sj-more { justify-self: start; min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1.5px solid #c9a86a; background: var(--sj-paper); color: #4a3216; font: 600 var(--fs-sm, 14px) var(--font); cursor: pointer; }
html.touch-ui body #windows .sj-more { min-height: 44px; }

/* ── แท็บ 3 ที่แปะ: กระดาน (หลัก 4 + รอง 4 ล็อก) · ผลรวม · คอมโบ ── */
#windows .sj.sj-deck { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "board sum" "cmb sum"; gap: 12px 14px; height: 100cqh; min-height: 0; }
#windows .sj-board { grid-area: board; position: relative; container: sjb / inline-size; display: grid; gap: 8px; padding: 12px 16px 14px; border-radius: 18px; overflow: hidden; background: var(--sj-cream); border: 2px solid #d9c08a; box-shadow: 0 2px 8px rgba(60, 40, 20, .12); }
#windows .sj-board-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#windows .sj-board > :not(.sj-board-bg) { position: relative; }
#windows .sj-bh { display: flex; align-items: center; gap: 8px; } #windows .sj-bh b { display: inline-flex; align-items: center; gap: 6px; font: 700 var(--fs-body, 16px) var(--font-head, var(--font)); color: #6b4510; }
#windows .sj-row { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 24px 0; }
#windows .sj-links { position: absolute; left: 0; right: 0; width: 100%; height: 24px; overflow: visible; pointer-events: none; z-index: 2; }
#windows .sj-links.top { top: 0; } #windows .sj-links.bot { bottom: 0; }
#windows .sj-links path { fill: none; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 7; vector-effect: non-scaling-stroke; }
#windows .sj-links path.k0 { stroke: #d9a43a; } #windows .sj-links path.k1 { stroke: var(--sj-teal); }
#windows .sj-cell { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 8px 4px 6px; border-radius: 14px; background: rgba(255, 250, 240, .88); border: 1.5px solid var(--sj-ln); text-align: center; }
#windows .sj-cell .stp, #windows .sj-cell .stp-empty { --w: clamp(56px, calc((100cqw - 90px) / 4 * .62), 112px); }
#windows .sj-cell > b { font: 700 var(--fs-sm, 14px) var(--font-head, var(--font)); color: var(--sj-teal); }
#windows .sj-cell > small { max-width: 100%; font: 500 var(--fs-xs, 12px)/1.25 var(--font); color: var(--sj-mute); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#windows .sj-cell.lock > small { display: inline-flex; align-items: center; gap: 3px; color: #8a6a3a; } #windows .sj-cell.lock .ui-ic { width: 14px; height: 14px; }
#windows .sj-cell.lock { background: rgba(240, 232, 214, .8); }
#windows .sj-cell.cmb.k0 { border-color: var(--sj-gold); box-shadow: 0 0 0 2px rgba(232, 182, 74, .4); background: linear-gradient(#fff8e2, #fdf0c8); }
#windows .sj-cell.cmb.k1 { border-color: #5f9e9b; box-shadow: 0 0 0 2px rgba(47, 111, 115, .28); background: linear-gradient(#f3faf8, #e3f1ee); }
#windows .sj-cbadge { position: absolute; top: -10px; right: -6px; width: 28px; height: auto; z-index: 3; }
#windows .sj-div { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; }
#windows .sj-div > i { flex: 1 1 auto; height: 0; border-top: 1.5px dashed #c9a86a; }
#windows .sj-div > img { width: 16px; height: auto; opacity: .85; }
/* แถวรอง 4 ช่อง — ล็อก · เล็กกว่าแถวหลัก (เห็นว่าเป็นคนละแถว ไม่ใช่ 8 ช่องเท่ากัน) · ไม่มีข้อความ */
#windows .sj-sub { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; justify-items: center; }
#windows .sj-rs { display: block; line-height: 0; }
#windows .sj-rs > img { display: block; width: clamp(40px, calc((100cqw - 90px) / 4 * .42), 74px); height: auto; filter: drop-shadow(0 2px 3px rgba(30, 60, 60, .25)); }
#windows .sj-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
html body #windows .sj-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1.5px solid #c9a86a; background: var(--sj-paper); color: #4a3216; font: 600 var(--fs-sm, 14px) var(--font-head, var(--font)); cursor: pointer; }
html body #windows .sj-btn.main { border-color: #245d60; background: linear-gradient(#3f8584, var(--sj-teal)); color: #fff; }
html body #windows .sj-btn.main .ui-ic { filter: brightness(0) invert(1); }
html body #windows .sj-btn .cmb-fi { width: 20px; height: 20px; }
html.touch-ui body #windows .sj-btn { min-height: 44px; }
#windows .sj-sum { grid-area: sum; display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 12px 14px; border-radius: 18px; background: var(--sj-cream); border: 1.5px solid var(--sj-ln); }
#windows .sj-sum > h4 { display: flex; align-items: center; gap: 6px; margin: 0; font: 700 var(--fs-body, 16px) var(--font-head, var(--font)); color: #6b4510; }
#windows .sj-sum .sbk-tot { margin: 0; }
#windows .sj-always { margin: auto 0 0; padding-top: 4px; font: 500 var(--fs-xs, 12px) var(--font); color: var(--sj-mute); }
#windows .sj-cmbp { grid-area: cmb; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 4px; }
#windows .sj-cmbp .spg-cmb { display: block; padding: 0; border: 0; background: none; }
#windows .sj-cmbp .spg-cmb .cmb-list { grid-auto-rows: auto; gap: 8px; overflow: visible; }
#windows .sj-cmbp .spg-cmb .cmb-sub { display: block; grid-column: 1 / -1; margin: 4px 0 0; }

/* ── จอแคบ/มือถือแนวนอน (.cx.sbk-m · หน้าต่าง ≤ 860 หรือจอเตี้ย ≤ 520) ── ใช้ความกว้าง ไม่เรียงยาวแนวตั้ง */
#windows .cx.sbk-m .sj-hero { min-height: 0; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-radius: 14px; }
#windows .cx.sbk-m .sj-hero-in { margin: 8px; padding: 6px 10px; gap: 3px; width: min(330px, 100%); }
#windows .cx.sbk-m :is(.sj-hero-t, .sj-hero-s) { display: none; }
#windows .cx.sbk-m .sj-prow { gap: 8px; } #windows .cx.sbk-m .sj-prow > b { font-size: var(--fs-body, 16px); }
#windows .cx.sbk-m .sj-hero-go { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; margin: 8px; gap: 6px; }
html body #windows .cx.sbk-m .sj-go { padding: 0 10px; }
#windows .cx.sbk-m .sj-fbar { margin-top: 8px; }
#windows .cx.sbk-m .sj-more-f select { max-width: 150px; }
#windows .cx.sbk-m .sj-grid { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 6px; }
html body #windows .cx.sbk-m .sj-card { min-height: 84px; gap: 8px; }
#windows .cx.sbk-m .sj-cimg .stp { --w: 46px; }
#windows .cx.sbk-m .sj-rh { min-height: 40px; }
#windows .cx.sbk-m .sj.sj-detail { grid-template-columns: minmax(170px, 40%) minmax(0, 1fr); gap: 10px; }
#windows .cx.sbk-m .sj-show { gap: 6px; padding: 8px; border-radius: 14px; }
#windows .cx.sbk-m .sj-showw .stp { --w: clamp(70px, calc((100cqh - 170px) * .6446), 160px); }
#windows .cx.sbk-m .sj-rk1 .stp { --w: 26px; }
html body #windows .cx.sbk-m .sj-place { min-width: 0; width: 100%; padding: 0 8px; font-size: var(--fs-sm, 14px); }
#windows .cx.sbk-m .sj-lock { display: none; }
#windows .cx.sbk-m .sj-title { font-size: var(--fs-title, 20px); }
#windows .cx.sbk-m .sj-fx { padding: 8px 10px; gap: 8px; }
#windows .cx.sbk-m .sj-fxv b { font-size: var(--fs-title, 20px); }
/* สายค่าคงที่ (แสตมป์บอสพเนจร "ทุกครั้งที่ 7 ไม่สน DEF…") = ประโยค ไม่ใช่ตัวเลข → ตัวอ่านปกติ ตัดบรรทัดได้ (เจ้าของ 8 พ.ย. ตัวใหญ่เกิน · stamp-view fxsCls) */
#windows .sj-fxv.fxs { max-width: 15em; } #windows .sj-fxv.fxs b, #windows .cx.sbk-m .sj-fxv.fxs b { font: 600 var(--fs-body, 16px)/1.3 var(--font-head, var(--font)); white-space: normal; text-wrap: balance; }
#windows .cx.sbk-m .sj-fxv.fxs { max-width: 9.5em; } #windows .cx.sbk-m .sj-fxv.fxs b { font-size: var(--fs-sm, 14px); }
#windows .cx.sbk-m .sj-cmbs { grid-template-columns: minmax(0, 1fr); }
#windows .cx.sbk-m .sj.sj-deck { height: auto; min-height: 100cqh; align-items: start; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "board sum" "cmb sum"; gap: 8px 10px; }
#windows .cx.sbk-m .sj-board { padding: 8px 10px 10px; gap: 6px; border-radius: 14px; }
#windows .cx.sbk-m .sj-sum { padding: 8px 10px; border-radius: 14px; }
#windows .cx.sbk-m .sj-row { gap: 6px; padding: 20px 0; }
#windows .cx.sbk-m .sj-links { height: 20px; }
#windows .cx.sbk-m .sj-cell { padding: 6px 2px 4px; }
#windows .cx.sbk-m .sj-cell .stp, #windows .cx.sbk-m .sj-cell .stp-empty { --w: clamp(44px, calc((100cqw - 60px) / 4 * .62), 90px); }
#windows .cx.sbk-m .sj-rs > img { width: clamp(28px, calc((100cqw - 60px) / 4 * .38), 52px); }
#windows .cx.sbk-m .sj-cmbp .spg-cmb .cmb-list { grid-template-columns: minmax(0, 1fr); }
@container cxw (max-width: 700px) {
  #windows .cx.sbk-m .sj.sj-detail { grid-template-columns: minmax(150px, 40%) minmax(0, 1fr); }
  #windows .cx.sbk-m .sj-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  #windows .cx.sbk-m .sj-hero-in { width: min(270px, 100%); }
  #windows .cx.sbk-m .sj-prow { grid-template-columns: auto auto minmax(50px, 1fr); }
}

/* ── หน้าแปะจริง (stamp-window.js): แถวรองใต้ 4 ช่องหลัก ── */
#windows .sj-sub.in-page { display: flex; justify-content: center; gap: 12px; padding: 6px 10px; border-radius: 12px; background: rgba(47, 111, 115, .08); border: 1px dashed rgba(47, 111, 115, .35); }
#windows .sj-sub.in-page .sj-rs > img { width: 36px; }
html.touch-ui #windows .sj-sub.in-page { gap: 10px; padding: 4px 8px; } html.touch-ui #windows .sj-sub.in-page .sj-rs > img { width: 26px; }
/* แถวรองกินความสูงราว 56px → ย่อแสตมป์ช่องหลักบนคอมให้ทั้งหน้ายังพอดีจอ (สูตรเดิม ui-stamp.css · 100vh − 590px) */
html:not(.touch-ui) #windows .spg-slot { --sw: clamp(78px, min(calc((100cqw - 30px) / 4 - 22px), calc((100vh - 646px) * .6446)), 150px); }
/* ชิ้นจากไฟล์อื่นที่ตัวเล็กกว่า 12px ในหน้านี้ (มือถืออ่านไม่ออก) */
#windows .sj .spg-cap, #windows .sj-go .cmb-new-dot, #windows .sj .cmb-page small, #windows .sj .stp-pvh { font-size: var(--fs-xs, 12px); }
html.touch-ui body #windows .sj-cmbp .spg-cmb h5 .cmb-all { min-height: 44px; }
@container cxw (max-width: 700px) { html body #windows .cx.sbk-m .sj-chip { padding: 0 10px; } #windows .cx.sbk-m .sj-more-f select { max-width: 128px; } }

/* stamp-confirm-1104: การ์ดสรุปที่แปะ (อ่านอย่างเดียว) บนสุดของสมุด › แสตมป์ */
.sbk-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 8px; padding: 8px 12px; border-radius: 14px; background: #fff7e2; border: 1.5px solid #e2c27a; }
.sbk-sum p { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: var(--fs-sm, 14px); color: #4a3a22; }
.sbk-sum p b { font-size: var(--fs-body, 16px); color: #2f6f73; }
.sbk-sum .sj-acts { margin: 0 0 0 auto; display: flex; gap: 8px; }
