/* ═══ อันดับนักสะสมแสตมป์ + อัลบั้มแสตมป์ (ใบ stamp-showcase-1025 · client/stamp-rank.js) ═══════════════════
   แท่น/แถว/การ์ดของเราใช้คลาสหน้าอันดับเดิม (ui-fame.css) — ไฟล์นี้แค่ทำให้เป็นปุ่มแตะได้ + แถบขอบเขต + หน้าต่างอัลบั้ม
   โทน: กระดาษครีม + ทองของเกม (cozy) · ไม่มี animation infinite (รายการยาว · กฎ perf 4b) · ไม่ตั้ง z-index เอง
   frame (อนาคต): คลาส .alb-frame-<id> บนหัวอัลบั้ม/แถว — ยังไม่มีภาพ ไม่มีสไตล์ */

/* ── ปุ่มแท่น/แถว/การ์ด (เดิมเป็น div) ── */
.srk-pd, .srk-row, .srk-me { font: inherit; color: inherit; border: 0; cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.srk-pd { background: none; padding: 0; text-align: center; }
.srk-pd .pd-av, .srk-pd .pd-base { display: grid; }
.srk-pd:focus-visible, .srk-row:focus-visible, .srk-me:focus-visible { outline: 2px solid #2f6f73; outline-offset: 2px; }
.srk-row { width: 100%; min-height: 44px; }
.srk-row:hover { background: #fff7df; }
.srk-row.lock { opacity: .88; }
.srk-me { width: 100%; }
.srk-lock { font-style: normal; font-size: 11px; margin-left: 4px; vertical-align: 1px; }
.rk-val small { white-space: nowrap; }

/* ── หัวรายชื่อ: ทั้งเซิร์ฟ / เพื่อน + วิธีนับแต้ม ── */
.srk-head { display: flex; align-items: center; gap: 8px; padding: 2px 0 6px; position: sticky; top: 0; background: inherit; }
.srk-list { background: var(--paper, #fbf6ea); }
.srk-scope { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: #e9d9b4; box-shadow: inset 0 1px 3px #0002; }
.srk-scope button { min-height: 36px; min-width: 64px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: #6b5423; font: 500 13px var(--font-head); cursor: pointer; }
.srk-scope button.on { background: linear-gradient(#fff8e6, #f2dfb0); color: #3a2a0c; box-shadow: 0 1px 3px #0003, inset 0 0 0 1px #c9a45a; }
.srk-how { margin-left: auto; min-height: 36px; padding: 0 10px; border: 1px solid #d8c08a; border-radius: 99px; background: #fffaf0; color: #7a4f12; font: 500 12px var(--font-head); cursor: pointer; }
.srk-how[aria-expanded="true"] { background: #f6e6bd; }
.srk-rule { margin: 0 0 6px; padding: 7px 10px; border-radius: 10px; background: #fff7df; color: #5a4520; font-size: 12px; line-height: 1.45; }
.srk-few { margin: 10px 4px; color: var(--ink-soft); font-size: 12px; text-align: center; }
html.touch-ui body #windows .srk-scope button, html.touch-ui body #windows .srk-how { min-height: 44px; }   /* ชนะ ui-win-fix.css [role=tab] 40px */

/* ── หน้าต่างอัลบั้ม ── */
.alb { display: grid; gap: 10px; }
.alb-head { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px;
  background: linear-gradient(135deg, #fff8e6, #f3e2b8); box-shadow: inset 0 0 0 1.5px #d8bd7c, 0 2px 6px #8a5a1a1f; }
.alb-av { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #fffaf0, #e8d4a6); box-shadow: 0 0 0 3px #e8b64a; }
.alb-av img { width: 40px; height: 40px; }
.alb-who { display: grid; min-width: 0; line-height: 1.25; }
.alb-who b { font: 600 18px var(--font-head); color: #3a2a0c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alb-who small { color: var(--ink-soft); font-size: 12px; }
.alb-stats { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.alb-st { display: grid; justify-items: center; min-width: 54px; padding: 4px 8px; border-radius: 10px; background: #ffffffa8; line-height: 1.15; }
.alb-st b { font: 600 16px var(--font-head); color: #4a3714; font-variant-numeric: tabular-nums; }
.alb-st b i { font-style: normal; font-size: 11px; color: var(--ink-soft); }
.alb-st small { font-size: 10.5px; color: var(--ink-soft); }
.alb-st.rk b { color: #a8741c; }
.alb-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.alb-pv { margin-left: auto; min-height: 36px; padding: 0 12px; border: 1px solid #9cc7c2; border-radius: 99px; background: #e8f5f3; color: #245a5e; font: 500 12px var(--font-head); cursor: pointer; }
.alb-pv.off { border-color: #d6b38a; background: #fbeee0; color: #7a4f12; }
html.touch-ui body #windows .alb-pv { min-height: 44px; }
.alb-regs { display: grid; gap: 12px; }
.alb-reg h4 { display: flex; align-items: baseline; gap: 6px; margin: 0 2px 6px; font: 600 14px var(--font-head); color: #6b4f19; }
.alb-reg h4 small { font: 500 12px var(--font); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.alb-ok { font-style: normal; font: 500 11px var(--font-head); color: #2e7d4f; background: #e3f6dd; padding: 1px 8px; border-radius: 99px; }
.alb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px 6px; }
.alb-c { display: grid; justify-items: center; gap: 3px; padding: 6px 2px 5px; border-radius: 10px; background: #ffffff70; content-visibility: auto; contain-intrinsic-size: 84px 150px; }
.alb-c.full { background: linear-gradient(#fff6d8, #ffffff80); box-shadow: inset 0 0 0 1.5px #e8b64a; }
.alb-c.no .stp { opacity: .55; }
.alb-nm { max-width: 100%; padding: 0 2px; font-size: 11px; line-height: 1.2; color: #4a3714; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alb-c.no .alb-nm { color: var(--ink-soft); }
.alb-pips { display: flex; gap: 2px; }
.alb-pips i { width: 15px; height: 15px; display: grid; place-items: center; border-radius: 50%; font: 600 9px/1 var(--font-head); font-style: normal; color: #0004; background: #0000000d; }
.alb-pips i.on.rC { background: #6fae5a; color: #fff; } .alb-pips i.on.rB { background: #4a8fd0; color: #fff; }
.alb-pips i.on.rA { background: #9a6ad8; color: #fff; } .alb-pips i.on.rS { background: #e8b64a; color: #fff; }
.alb-locked .alb-lockic { font-size: 40px; line-height: 1; }
.alb-back { white-space: nowrap; }

/* อัลบั้มบนจอเตี้ย/แคบ (มือถือแนวนอน): หัวการ์ดสองแถว · ตัวเลขย่อ · แสตมป์เล็กลงให้เห็นหลายแถว */
@media (max-width: 700px) {
  .alb-head { grid-template-columns: 44px minmax(0, 1fr); }
  .alb-stats { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-height: 520px) {
  /* จอเตี้ย (มือถือแนวนอน): หัวการ์ดแถวเดียว ~50px · กว้างพอ (≥ 760) แถบกรองไปอยู่ข้างหัวการ์ด — เห็นแสตมป์ตั้งแต่เปิด */
  .alb { gap: 6px; }
  .alb-head { padding: 4px 8px; gap: 8px; grid-template-columns: 40px minmax(0, 1fr) auto; }
  .alb-av { width: 40px; height: 40px; box-shadow: 0 0 0 2px #e8b64a; } .alb-av img { width: 28px; height: 28px; }
  .alb-who b { font-size: 15px; } .alb-who small { font-size: 11px; }
  .alb-stats { grid-column: auto; flex-wrap: nowrap; gap: 4px; }
  .alb-st { min-width: 40px; padding: 2px 5px; } .alb-st b { font-size: 13px; } .alb-st small { font-size: 9.5px; }
  .alb-reg h4 { margin-bottom: 4px; }
  .alb-grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
  .alb-c .stp { --w: 56px; }
  .alb-c { contain-intrinsic-size: 70px 128px; }
}
.sbk-rkgo { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }   /* สมุด › แสตมป์: ปุ่มอันดับนักสะสม/อัลบั้มของฉัน (stamp-book.js) */
@media (max-height: 520px) and (min-width: 760px) {
  .alb { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .alb-head { grid-column: 1; } .alb-bar { grid-column: 2; flex-wrap: nowrap; } .alb-regs { grid-column: 1 / -1; }
}
.srk-me { position: static; margin: 8px 0 4px; box-shadow: none; }   /* แท็บแสตมป์: การ์ดของเราอยู่เหนือรายชื่อ ไม่ sticky ทับแถว */
