/* หน้า Summon — ใช้โทนเดียวกับหน้าสุ่ม Trait (Fredoka, ตัวหนังสือขอบดำ, แผงมืด, ปุ่มนูนแบบเกม) */
.sm-page { --sm-ink: #16121f; font-family: var(--gs-font, "Fredoka", "Noto Sans Thai", system-ui, sans-serif); display: grid; gap: 22px; }
/* หน้านี้ใช้ความกว้างจอมากกว่าหน้าอื่น (3 ส่วน) ไม่ให้กระจุกตรงกลาง */
.page.sm-page { max-width: min(1560px, 100%); padding-left: clamp(16px, 3vw, 48px); padding-right: clamp(16px, 3vw, 48px); }
.sm-page :is(.sm-tab span, .sm-btn, .sm-spent b, .sm-spent > span, .sm-card-name, .sm-rates h2, .sm-pull i) { -webkit-text-stroke: var(--sw, 4px) var(--ik, var(--sm-ink)); paint-order: stroke fill; }
/* สีตามระดับ */
[data-tier="blue"] { --tc: #3d8bff; --tc2: #1d55d8; --tbg: linear-gradient(160deg, #6fb2ff, #2f6dff 55%, #1c3fb3); }
[data-tier="epic"] { --tc: #a23dff; --tc2: #6a1fd0; --tbg: linear-gradient(160deg, #d9a3ff, #9b3dff 50%, #5a14b8); }
[data-tier="gold"] { --tc: #ffc21a; --tc2: #e08a00; --tbg: linear-gradient(160deg, #ffe58a, #ffc21a 50%, #d98200); }
[data-tier="mythic"] { --tc: #ff5fd2; --tc2: #8a4cff; --tbg: conic-gradient(from 200deg, #ff4d4d, #ffa64d, #fff04d, #5dff7a, #4dd8ff, #6b7bff, #e14dff, #ff4d4d); }
[data-tier="secret"] { --tc: #ff3b3b; --tc2: #9e0f0f; --tbg: linear-gradient(160deg, #ff8a7a, #ff2b2b 50%, #8c0b0b); }

/* แท็บตู้ */
.sm-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.sm-tab { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 14px; background: #151619; border: 3px solid #0c0d0f; box-shadow: inset 0 0 0 2px #2a2c31; color: #fff; cursor: pointer; transition: transform .15s, box-shadow .2s; }
.sm-tab span { font-size: 17px; font-weight: 700; --sw: 4px; }
.sm-tab:hover { transform: translateY(-2px); }
.sm-tab.on { background: linear-gradient(180deg, #74f06c, #34c23e); box-shadow: 0 4px 0 #0008, inset 0 0 0 2px #a8ffa0; --ik: #0a3d12; }
.sm-tab-img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; background: #0f1012; }

/* ตารางเรทอยู่ซ้าย · การ์ด + ตัวควบคุมอยู่ขวา */
.sm-main { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: clamp(20px, 2.6vw, 48px); align-items: start; }
.sm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: clamp(20px, 2.6vw, 48px); align-items: start; }
.sm-left { display: grid; justify-items: center; gap: 16px; }

/* การ์ดผลลัพธ์ (กรอบสีตามระดับ, พลิกตอนได้ผลใหม่) */
.sm-cardwrap { perspective: 1000px; width: min(400px, 100%); }
.sm-card { position: relative; padding: 14px 16px 18px; border-radius: 22px; border: 6px solid transparent; color: #fff;
  background: linear-gradient(#17181c, #101114) padding-box, var(--tbg, linear-gradient(#444, #222)) border-box;
  box-shadow: 0 0 0 3px #0c0d0f, 0 18px 40px #000a, 0 0 40px color-mix(in srgb, var(--tc) 35%, transparent); transform: rotate(-3deg); transition: box-shadow .4s; }
.sm-card.flip { animation: sm-flip .5s cubic-bezier(.3, 1.3, .5, 1); }
@keyframes sm-flip { 0% { transform: rotate(-3deg) rotateY(90deg) scale(.9); } 100% { transform: rotate(-3deg); } }
.sm-card.shiny { box-shadow: 0 0 0 3px #0c0d0f, 0 18px 40px #000a, 0 0 50px #fff6, 0 0 90px color-mix(in srgb, var(--tc) 60%, transparent); }
.sm-card-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: #cfcbd9; margin-bottom: 8px; }
.sm-art { position: relative; aspect-ratio: 1; border-radius: 16px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--tc) 40%, #0b0c10), #0b0c10 75%); border: 2px solid #ffffff14; }
.sm-art-img { width: 82%; height: 82%; object-fit: contain; filter: drop-shadow(0 8px 14px #0009); }
.sm-card.shiny .sm-art::after { content: ""; position: absolute; inset: -50%; background: conic-gradient(from 0deg, transparent, #ffffff40, transparent 30%); animation: sm-spin 3s linear infinite; pointer-events: none; }
@keyframes sm-spin { to { transform: rotate(360deg); } }
.sm-shiny-tag { position: absolute; top: 8px; right: 8px; z-index: 1; padding: 2px 8px; border-radius: 8px; font: 700 12px var(--gs-font); font-style: normal; color: #1a1300; background: linear-gradient(90deg, #fff59a, #ffd1f3, #9ff6ff); }
.sm-card-name { margin: 10px 0 2px; font-size: clamp(28px, 5vw, 42px); font-weight: 700; line-height: 1.02; --sw: 7px; color: #fff; text-shadow: 0 3px 0 var(--sm-ink); }
.sm-card[data-tier] .sm-card-name { color: color-mix(in srgb, var(--tc) 35%, #fff); }
.sm-card-rate { font-size: 14px; font-weight: 600; color: #d7d2e2; }
.sm-ph, .sm-page .fb { display: grid; place-items: center; font: 700 28px var(--gs-font); color: #fff; background: var(--tbg, #333); border-radius: inherit; }
.sm-art .sm-ph, .sm-art .fb { width: 60%; height: 60%; font-size: 64px; border-radius: 24px; -webkit-text-stroke: 6px var(--sm-ink); paint-order: stroke fill; }
.sm-loading { padding: 80px 0; text-align: center; color: #a8a3b8; }

/* ปุ่ม */
.sm-btns { display: grid; grid-template-columns: 1fr 120px; gap: 12px; width: min(440px, 100%); }
.sm-btn { border-radius: 12px; font: 700 20px var(--gs-font); color: #fff; --sw: 5px; border: 3px solid #ffffff44; box-shadow: 0 5px 0 #0008, 0 0 0 3px #0c0d0f; cursor: pointer; transition: transform .1s, box-shadow .1s, filter .15s; }
.sm-btn:hover:not(:disabled) { filter: brightness(1.08); }
.sm-btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #0008, 0 0 0 3px #0c0d0f; }
.sm-btn:disabled { filter: grayscale(.7) brightness(.7); cursor: default; }
.sm-roll { padding: 14px; font-size: 30px; --sw: 7px; background: linear-gradient(180deg, #ffa6ee, #e86ad9); }
.sm-roll10 { display: grid; place-items: center; line-height: 1; background: linear-gradient(180deg, #74f06c, #34c23e); --ik: #0a3d12; }
.sm-roll10 b { font-size: 28px; } .sm-roll10 small { font-size: 13px; }

/* ฝั่งขวา: ที่ใช้ไป + ช่องผลสุ่ม + ตัวควบคุม */
.sm-right { display: grid; gap: 12px; padding: 14px; border-radius: 6px 20px 20px 20px; background: #151619; border: 4px solid #0c0d0f; box-shadow: 0 18px 40px #000a, inset 0 0 0 2px #2a2c31; }
.sm-spent { display: grid; justify-items: end; line-height: 1.05; }
.sm-spent b { font-size: 46px; font-weight: 700; color: #fff3a6; --sw: 8px; --ik: #2e1d05; font-variant-numeric: tabular-nums; }
.sm-spent > span { font-size: 15px; font-weight: 700; color: #fff; }
.sm-spent small { font-size: 13px; color: #cfcbd9; } .sm-spent small b { font-size: 13px; color: #fff; -webkit-text-stroke: 0; }
.sm-pulls { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; position: relative; align-items: start; }
.sm-pull { position: relative; width: 100%; aspect-ratio: 1; border-radius: 9px; background: #0f1012; border: 2px solid #2a2c31; display: grid; place-items: center; overflow: hidden; }
.sm-pull[data-tier] { border-color: var(--tc); box-shadow: inset 0 0 8px color-mix(in srgb, var(--tc) 40%, transparent); }
.sm-pull[data-tier="mythic"] { border: 2px solid transparent; background: linear-gradient(#0f1012, #0f1012) padding-box, var(--tbg) border-box; }
.sm-pull-img { width: 100%; height: 100%; object-fit: cover; }
.sm-pull .sm-ph, .sm-pull .fb { width: 100%; height: 100%; font-size: 16px; border-radius: 0; }
.sm-pull i { position: absolute; right: 1px; bottom: -1px; font-size: 12px; font-style: normal; --sw: 0; }
.sm-pull.new { animation: sm-pop .4s cubic-bezier(.3, 1.6, .5, 1) var(--d) both; }
@keyframes sm-pop { from { opacity: 0; transform: scale(.4); } }
.sm-pull em { position: absolute; left: 0; top: 0; width: calc(600% + 25px); height: calc(400% + 15px); display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 14px; color: #cfcbd9; pointer-events: none; z-index: 1; }
.sm-box { display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: #0f1012; }
.sm-lbl { font-size: 12px; font-weight: 600; color: #a8a3b8; }
.sm-amt { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.sm-amt input { min-width: 0; padding: 8px 10px; border-radius: 10px; border: 2px solid #2a2c31; background: #17181c; color: #fff; font: 700 18px var(--gs-font); }
.sm-unit { display: flex; padding: 3px; gap: 2px; border-radius: 10px; background: #17181c; border: 2px solid #2a2c31; }
.sm-unit button { padding: 4px 10px; border-radius: 7px; font: 600 13px var(--gs-font); color: #a8a3b8; background: none; border: 0; cursor: pointer; transition: background .2s, color .2s; }
.sm-unit button.on { background: #fff; color: #16121f; }
.sm-custom { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 17px; background: linear-gradient(180deg, #6c7bff, #4a4fe0); }
.sm-custom small { font-size: 13px; --sw: 3px; }
.sm-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sm-secret { padding: 10px; font-size: 15px; background: linear-gradient(180deg, #ff7a7a, #d83030); }
.sm-stop { padding: 10px; font-size: 15px; background: linear-gradient(180deg, #4a4e57, #33363d); }
.sm-msg { min-height: 18px; font-size: 13px; font-weight: 600; color: #cfcbd9; text-align: center; }
.sm-msg b { color: #fff3a6; }
.sm-reset { justify-self: center; background: none; border: 0; color: #a8a3b8; font: 600 13px var(--gs-font); text-decoration: underline; cursor: pointer; }

/* ตารางเรท */
.sm-rates { padding: 16px; border-radius: 20px; background: #151619; border: 4px solid #0c0d0f; box-shadow: 0 18px 40px #000a, inset 0 0 0 2px #2a2c31; }
.sm-rates-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sm-rates h2 { font-size: 28px; font-weight: 700; color: #fff; --sw: 6px; }
.sm-rates-head p, .sm-rates-head > span { font-size: 13px; color: #cfcbd9; font-weight: 600; }
.sm-extra { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0; font-size: 13px; color: #cfcbd9; }
.sm-extra b { color: #fff; }
.sm-hunter { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; background: #0f1012; cursor: pointer; }
.sm-hunter input { display: none; }
.sm-hunter > i { position: relative; width: 40px; height: 22px; border-radius: 11px; background: #2c2f37; flex-shrink: 0; transition: background .25s; }
.sm-hunter > i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.sm-hunter input:checked + i { background: linear-gradient(90deg, #ffd84d, #ff6bd6); }
.sm-hunter input:checked + i::after { transform: translateX(18px); }
.sm-hunter span { display: grid; line-height: 1.2; } .sm-hunter small { font-size: 11px; color: #a8a3b8; }
.sm-rh { display: flex; justify-content: space-between; font-size: 12px; color: #a8a3b8; padding: 0 4px 6px; border-bottom: 1px solid #ffffff12; }
.sm-list { list-style: none; display: grid; }
.sm-item { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 6px; border-bottom: 1px solid #ffffff0d; border-radius: 10px; transition: background .3s; }
.sm-item.last { background: color-mix(in srgb, var(--tc) 18%, #0f1012); }
.sm-item-img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; border: 2px solid var(--tc); background: #0f1012; }
.sm-item .sm-ph, .sm-item .fb { width: 46px; height: 46px; font-size: 20px; border-radius: 10px; }
.sm-item-main { display: grid; gap: 5px; min-width: 0; }
.sm-item-name { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-item-name em { font-style: normal; font-size: 11px; color: #8b8796; }
.sm-item-name .ok { font-style: normal; color: #74f06c; } .sm-item-name .sh { font-style: normal; font-size: 12px; color: #fff3a6; }
/* แถบ log: ขีดแบ่งทุก 1 ขั้น (หายากขึ้น 10 เท่า) */
.sm-ruler { position: relative; height: 8px; border-radius: 4px; background: #24262c; overflow: hidden; }
.sm-ruler::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--dec) - 2px), #0006 calc(100% / var(--dec) - 2px) calc(100% / var(--dec))); }
.sm-ruler i { display: block; height: 100%; border-radius: 4px; background: var(--tbg, var(--tc)); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.sm-item-rate { display: grid; justify-items: end; font-size: 13px; font-weight: 600; color: #cfcbd9; }
.sm-item-rate b { font-size: 15px; color: #fff; }
.sm-pity { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; font-weight: 600; color: #cfcbd9; }
.sm-pity b { color: #fff; }
.sm-pbar { flex: 1; height: 10px; border-radius: 5px; background: #24262c; overflow: hidden; }
.sm-pbar i { display: block; height: 100%; background: linear-gradient(90deg, #ff6bd6, #ffd84d); transition: width .5s; }
.sm-note { margin-top: 8px; font-size: 12px; color: #8b8796; }

@media (max-width: 1280px) { .sm-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .sm-main { grid-template-columns: 1fr; } .sm-main > .sm-rates { order: 2; } }
/* แถบ Mythic เป็นรุ้งแนวนอน (แบบวงกลมดูแปลกบนแถบบาง) */
.sm-item[data-tier="mythic"] .sm-ruler i { background: linear-gradient(90deg, #ff4d4d, #ffd84d, #5dff7a, #4dd8ff, #b44dff); }
@media (prefers-reduced-motion: reduce) { .sm-page *, .sm-page *::after { animation: none !important; transition: none !important; } }
/* เลือกเป้าหมาย "สุ่มจนได้" (Secret / Shiny / รายการใดก็ได้) */
.sm-target { width: 100%; padding: 8px 10px; border-radius: 10px; border: 2px solid #2a2c31; background: #17181c; color: #fff; font: 600 14px var(--gs-font); }
.sm-target:disabled { opacity: .6; }
/* แผงซ้าย/ขวาเล็กลง: ตัวหนังสือ/ระยะกระชับขึ้น */
.sm-rates { padding: 14px; } .sm-rates h2 { font-size: 24px; }
.sm-item { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; padding: 6px 4px; }
.sm-item-img, .sm-item .sm-ph, .sm-item .fb { width: 38px; height: 38px; font-size: 17px; }
.sm-item-name { font-size: 13px; } .sm-item-rate { font-size: 12px; } .sm-item-rate b { font-size: 14px; }
.sm-right { padding: 12px; gap: 10px; } .sm-spent b { font-size: 38px; }
.sm-custom { font-size: 15px; padding: 9px 12px; } .sm-secret, .sm-stop { font-size: 14px; padding: 9px; }

/* =====================================================================
   แบบ 4 "แผงสรุปกระชับ" — ซ้าย: ผลลัพธ์ + ผลล่าสุด · ขวา: ตารางเรท · ล่าง: แถบปุ่มติดจอ
   ===================================================================== */
.page.sm-page.sm4 { max-width: min(1500px, 100%); padding-bottom: 110px; }
.sm4-main { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: clamp(16px, 2vw, 28px); align-items: start; }
.sm4-left { display: grid; gap: 14px; min-width: 0; }
.sm4-hero, .sm4-box { background: #151619; border: 4px solid #0c0d0f; border-radius: 20px; box-shadow: 0 16px 36px #000a, inset 0 0 0 2px #2a2c31; }
/* ผลลัพธ์: รูปใหญ่ซ้าย + ข้อมูลขวา, กรอบ/เงาเรืองตามระดับ */
.sm4-hero { display: grid; grid-template-columns: clamp(150px, 16vw, 220px) minmax(0, 1fr); gap: 18px; padding: 16px; align-items: center; transition: box-shadow .4s; }
.sm4-hero[data-tier] { box-shadow: 0 16px 36px #000a, inset 0 0 0 2px #2a2c31, 0 0 0 2px color-mix(in srgb, var(--tc) 55%, transparent), 0 0 34px color-mix(in srgb, var(--tc) 25%, transparent); }
.sm4-hero.pop .sm4-art { animation: sm4-pop .5s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes sm4-pop { 0% { transform: scale(.6) rotate(-8deg); opacity: .2; } }
.sm4-art { position: relative; aspect-ratio: 1; border-radius: 22px; display: grid; place-items: center; overflow: hidden; border: 4px solid transparent;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--tc) 35%, #0b0c10), #0b0c10 75%) padding-box, var(--tbg, #333) border-box; box-shadow: 0 0 26px color-mix(in srgb, var(--tc) 45%, transparent); }
.sm4-img { width: 100%; height: 100%; object-fit: cover; }
.sm4-art .sm-ph, .sm4-art .fb { width: 100%; height: 100%; font-size: clamp(56px, 6vw, 88px); border-radius: 0; -webkit-text-stroke: 7px var(--sm-ink); paint-order: stroke fill; }
.sm4-hero.shiny .sm4-art::after { content: ""; position: absolute; inset: -50%; background: conic-gradient(from 0deg, transparent, #ffffff45, transparent 30%); animation: sm-spin 3s linear infinite; pointer-events: none; }
.sm4-info { min-width: 0; }
.sm4-tag { display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--tbg, #333); font-size: 13px; font-weight: 700; color: #fff; -webkit-text-stroke: 3px var(--sm-ink); paint-order: stroke fill; }
.sm4-name { margin: 6px 0 2px; font-size: clamp(26px, 3vw, 40px); font-weight: 700; line-height: 1.02; color: #fff; -webkit-text-stroke: 7px var(--sm-ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--sm-ink); }
.sm4-hero[data-tier] .sm4-name { color: color-mix(in srgb, var(--tc) 30%, #fff); }
.sm4-rate { font-size: 13px; font-weight: 600; color: #cfcbd9; }
.sm4-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.sm4-meta > div { padding: 8px 10px; border-radius: 12px; background: #0f1012; min-width: 0; }
.sm4-meta span { display: block; font-size: 11px; color: #a8a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm4-meta b { display: block; font-size: 19px; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm4-meta > div:first-child b { color: #fff3a6; }
.sm4-pbar { display: block; height: 5px; margin-top: 4px; border-radius: 3px; background: #24262c; overflow: hidden; }
.sm4-pbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ff6bd6, #ffd84d); transition: width .5s; }
/* ผลล่าสุด 24 ช่อง (แถวละ 12) */
.sm4-box { padding: 12px 14px; }
.sm4-boxh { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: #a8a3b8; }
.sm4-boxh .sm-msg { min-height: 0; text-align: right; }
.sm4-pulls { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 5px; }
.sm4-pulls em { width: calc(1200% + 55px); height: calc(200% + 5px); }
/* ตารางเรท (ขวา) */
.sm4-rates { padding: 14px; }
.sm4-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.sm4-foot .sm-note { margin: 0; }
.sm4-rates .sm-extra { margin: 10px 0 0; }
/* แถบปุ่มล่างติดจอ */
.sm4-dock { position: sticky; bottom: 12px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; padding: 10px 12px; border-radius: 20px;
  background: #151619ee; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 4px solid #0c0d0f; box-shadow: 0 12px 34px #000c, inset 0 0 0 2px #2a2c31; }
.sm4-dock .sm-roll { padding: 11px 34px; font-size: 26px; }
.sm4-dock .sm-roll10 { padding: 11px 20px; font-size: 22px; }
.sm4-more { display: none; padding: 10px 0; font-size: 18px; background: linear-gradient(180deg, #4a4e57, #33363d); }
.sm4-extra { flex: 1; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; min-width: 0; }
.sm4-extra .sm-amt { display: grid; grid-template-columns: 110px auto; gap: 6px; }
.sm4-extra .sm-custom { gap: 10px; padding: 9px 14px; font-size: 15px; }
.sm4-extra .sm-target { width: 220px; }
.sm4-go { display: flex; gap: 8px; }
.sm4-go .sm-btn { padding: 9px 16px; font-size: 15px; }
@media (max-width: 1050px) {
  .sm4-main { grid-template-columns: 1fr; }
}
/* มือถือ: ผลลัพธ์แถวเดียว (รูปเล็ก), ผลล่าสุดแถวละ 8, แถบปุ่มลอยติดล่างจอ — ตัวเลือกอื่นซ่อนใน ⚙️ */
@media (max-width: 640px) {
  .page.sm-page.sm4 { padding-bottom: 200px; }
  .sm4-hero { grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .sm4-art { border-radius: 18px; border-width: 3px; }
  .sm4-art .sm-ph, .sm4-art .fb { font-size: 40px; -webkit-text-stroke: 5px var(--sm-ink); }
  .sm4-tag { font-size: 11px; padding: 1px 9px; }
  .sm4-name { font-size: 24px; -webkit-text-stroke: 5px var(--sm-ink); }
  .sm4-rate { font-size: 11px; }
  .sm4-meta { gap: 4px; margin-top: 8px; } .sm4-meta > div { padding: 5px 6px; } .sm4-meta span { font-size: 10px; } .sm4-meta b { font-size: 13px; }
  .sm4-pulls { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .sm4-pulls em { width: calc(800% + 35px); height: calc(300% + 10px); }
  .sm4-dock { position: fixed; left: 8px; right: 8px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) 64px 52px; gap: 8px; padding: 8px; }
  .sm4-dock .sm-roll { padding: 12px; font-size: 24px; } .sm4-dock .sm-roll10 { padding: 10px 0; font-size: 18px; }
  .sm4-more { display: block; }
  .sm4-extra { display: none; grid-column: 1 / -1; }
  .sm4-dock.open .sm4-extra { display: grid; gap: 8px; }
  .sm4-extra .sm-amt { grid-template-columns: minmax(0, 1fr) auto; }
  .sm4-extra .sm-target { width: 100%; }
  .sm4-go { display: grid; grid-template-columns: 1fr 1fr; }
}

/* คำเตือนบนหน้าตู้ (ตั้งในหลังบ้าน) */
.sm-notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 14px; background: #2a210c; border: 2px solid #e0b44a66; color: #f3dc9b; font: 600 13.5px/1.5 "Noto Sans Thai", system-ui, sans-serif; }
.sm-notice[hidden] { display: none; }
.sm-notice .ic { width: 20px; height: 20px; flex: none; margin-top: 1px; color: #ffc93c; }
.sm-notice p { margin: 0; }
