/* ของแต่งชื่อจากร้านเพชร: กรอบชื่อ (fr_) · สีชื่อ (nc_) · ฟองแชท (bb_) — ความสวยงามล้วน ไม่มีพลัง (5 ต.ค.)
   ชื่อคลาสมาจากเซิร์ฟเวอร์ (pub.cs / chat ev.cs = "fr_leaf nc_sun bb_cream") — id ทั้งหมดอยู่ใน data/gem_shop.json (catalog tab "style")
   ใช้ที่: ป้ายชื่อเหนือหัว (main.js renderLabel) · แชท (ui.js log) · ร้านเพชรแท็บ "สไตล์" (gem-shop.js)
   โทน: ครีม · ทอง · teal ของเกม — ทำด้วย CSS ล้วน (ภาพจริงเป็นใบงาน design-briefs/44-name-cosmetics) · เพิ่มแบบใหม่ = เพิ่มทั้งที่นี่และใน gem_shop.json
   ⚠️ แชทมี #chat-log .say b / .world b ระบายสีชื่อตามช่อง — ตัวเลือก "#chat-log .ln b.who.nc_*" ต้องชนะ */

/* ── กรอบชื่อ ─────────────────────────────────────────────── */
.fr_gold, .fr_leaf, .fr_scroll, .fr_star { position: relative; display: inline-block; padding: 1px 12px; border-radius: 999px; line-height: 1.35;
  text-shadow: none; font-weight: 700; white-space: nowrap; vertical-align: baseline; }
/* ทอง: บัตรรายเดือน / แพ็กเริ่มต้น — ไม่ขาย */
.fr_gold { color: #fff3c9; background: linear-gradient(#6b4a1c, #3f2b12); border: 2px solid #e8b64a;
  box-shadow: inset 0 1px 0 #fff3c966, 0 0 0 1px #6b4a1c, 0 1px 4px #0006; }
.fr_gold::before, .fr_gold::after { content: ''; position: absolute; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; background: #ffe08a; transform: rotate(45deg); box-shadow: 0 0 3px #ffd76a; }
.fr_gold::before { left: 3px; } .fr_gold::after { right: 3px; }
/* ใบไม้: teal ป่า + ใบสองข้าง */
.fr_leaf { color: #eafff4; background: linear-gradient(#2c6d70, #1b4a4e); border: 2px solid #8fdcb6; box-shadow: inset 0 1px 0 #ffffff33, 0 1px 4px #0006; }
.fr_leaf::before, .fr_leaf::after { content: ''; position: absolute; top: 50%; width: 8px; height: 8px; margin-top: -4px; background: #a9eec4; border-radius: 0 100% 0 100%; box-shadow: 0 0 2px #1b4a4e; }
.fr_leaf::before { left: 2px; transform: rotate(-15deg); } .fr_leaf::after { right: 2px; transform: scaleX(-1) rotate(-15deg); }
/* ม้วนกระดาษ: ครีมขอบทอง ปลายริบบิ้น teal */
.fr_scroll { color: #4a3512; background: linear-gradient(#fff8e2, #f2e3b8); border: 2px solid #c4953f; box-shadow: inset 0 1px 0 #ffffffaa, 0 1px 4px #0005; }
.fr_scroll::before, .fr_scroll::after { content: ''; position: absolute; top: 50%; width: 7px; height: 12px; margin-top: -6px; background: #2f6f73; border: 1px solid #1f4a4d; }
.fr_scroll::before { left: -5px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 45% 50%); }
.fr_scroll::after { right: -5px; clip-path: polygon(0 0, 100% 0, 55% 50%, 100% 100%, 0 100%); }
/* ดาวคราม: น้ำเงินเข้ม ขอบทองสองชั้น + ✦ */
.fr_star { color: #fff6d8; background: linear-gradient(#1f4560, #12293f); border: 2px solid #e8b64a; box-shadow: 0 0 0 2px #12293f, 0 0 0 3px #e8b64a99, 0 2px 5px #0006; }
.fr_star::before, .fr_star::after { content: '✦'; position: absolute; top: 50%; margin-top: -0.62em; font-size: 9px; line-height: 1.2; color: #ffe08a; text-shadow: 0 0 4px #ffd76a; }
.fr_star::before { left: 3px; } .fr_star::after { right: 3px; }

/* ── สีชื่อ ───────────────────────────────────────────────── */
.nc_teal, #chat-log .ln b.who.nc_teal { color: #7fe6dc; }
.nc_sun, #chat-log .ln b.who.nc_sun { color: #ffd76a; }
.nc_aurora, #chat-log .ln b.who.nc_aurora { color: transparent; -webkit-text-fill-color: transparent; text-shadow: none;
  background: linear-gradient(90deg, #8ff0d8, #9bc4ff 40%, #e9b0ff 70%, #ffd9a0); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 1px 0 #000a) drop-shadow(0 0 1px #000a); }
/* กรอบสว่าง (ม้วนกระดาษ) — สีชื่อเข้มขึ้นให้อ่านออกบนครีม */
.fr_scroll.nc_teal { color: #1c6a70; } .fr_scroll.nc_sun { color: #9a5a08; }
.fr_scroll.nc_aurora { background: linear-gradient(90deg, #1d9c86, #3a6fd0 40%, #a850d8 70%, #d9791a); -webkit-background-clip: text; background-clip: text; filter: none; }
/* กรอบทอง/ดาว/ใบไม้ + สีชื่อ: ตัวหนังสือไม่ต้องมีเงาดำ (พื้นกรอบเข้มอยู่แล้ว) */
.fr_gold.nc_aurora, .fr_leaf.nc_aurora, .fr_star.nc_aurora { filter: none; }

/* ── ฟองแชท (เหนือหัว .bubble · แชท .msg · ตัวอย่างในร้าน .cs-msg/.cs-bub) ────── */
body .label .bubble.bb_cream, #chat-log .ln .msg.bb_cream, .cs-msg.bb_cream, .cs-bub.bb_cream { background: #fff6dc; color: #4a3512; border: 1px solid #d8bf86; }
body .label .bubble.bb_teal, #chat-log .ln .msg.bb_teal, .cs-msg.bb_teal, .cs-bub.bb_teal { background: linear-gradient(#3b8388, #2a6266); color: #f1ffee; border: 1px solid #8fdcb6; }
body .label .bubble.bb_gold, #chat-log .ln .msg.bb_gold, .cs-msg.bb_gold, .cs-bub.bb_gold { background: linear-gradient(#fff0b8, #f1c24a); color: #4a3010; border: 1px solid #b8841a; }
#chat-log .ln .msg.bb_cream, #chat-log .ln .msg.bb_teal, #chat-log .ln .msg.bb_gold { padding: 1px 9px; border-radius: 10px; box-shadow: 0 1px 3px #0004; text-shadow: none; }
body .label .bubble.bb_cream, body .label .bubble.bb_teal, body .label .bubble.bb_gold { border-radius: 10px; font-weight: 600; text-shadow: none; }
/* กรอบแชทโคม (ตู้ระฆังโชค · bubble:lantern · gem_shop.json capsuleCos) — กระดาษโคมสีอุ่น ขอบแดงโคม ขลิบทอง + โคมเล็กหน้าข้อความ
   ไม่มีแอนิเมชัน (บรรทัดแชทสะสม — กฎ 4b: ห้าม CSS animation บนของที่สะสม) · ไม่มีภาพ = ไม่มีโหลดเพิ่ม */
body .label .bubble.bb_lantern, #chat-log .ln .msg.bb_lantern, .cs-msg.bb_lantern, .cs-bub.bb_lantern {
  background: linear-gradient(#fff4dc, #ffd9a0); color: #5a2a12; border: 1.5px solid #c8553d; box-shadow: inset 0 0 0 1.5px #f2c56a, 0 1px 3px #0004; text-shadow: none; }
#chat-log .ln .msg.bb_lantern { padding: 1px 9px 1px 7px; border-radius: 10px; }
body .label .bubble.bb_lantern { border-radius: 12px; font-weight: 600; }
#chat-log .ln .msg.bb_lantern::before, body .label .bubble.bb_lantern::before, .cs-msg.bb_lantern::before, .cs-bub.bb_lantern::before { content: '🏮'; margin-right: 3px; font-size: .9em; }

/* ── ร้านเพชร แท็บ "สไตล์" ─────────────────────────────── */
.cs-wrap { display: grid; gap: 14px; }
.cs-preview { position: sticky; top: -16px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 14px; background: linear-gradient(#2f4d50, #213a3d); color: #fff; box-shadow: 0 4px 12px #0003; }
.cs-pv-l { display: grid; gap: 6px; min-width: 0; }
.cs-pv-l small { color: #cfe4d8; font-size: 12px; }
.cs-line { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font: 600 15px/1.4 var(--font-head, sans-serif); }
.cs-line .sep { opacity: .6; }
.cs-msg { padding: 1px 9px; border-radius: 10px; color: #fff; font-weight: 500; }
.cs-sec h4 { margin: 0 0 8px; font: 700 15px/1.2 var(--font-head, sans-serif); color: #2f5a5e; }
.cs-grid.gs-grid.items { padding: 0; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; overflow: visible; }
.cs-tile { cursor: pointer; text-align: center; align-content: start; }
.cs-tile.on { box-shadow: 0 0 0 2px #2f6f73, 0 2px 0 #e2cfa2; }
.cs-prev { display: grid; place-items: center; min-height: 44px; padding: 6px; border-radius: 10px; background: linear-gradient(#2f4d50, #213a3d); font: 600 14px/1.3 var(--font-head, sans-serif); color: #fff; overflow: hidden; }
.cs-bub { display: inline-block; padding: 2px 10px; border-radius: 10px; background: #fff; color: #222; font-weight: 500; border: 1px solid #7f95c4; }
.gs-starter { position: relative; display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 14px; align-items: center; width: 100%; margin: 4px 0 14px; padding: 14px 16px; border-radius: 16px; cursor: pointer; text-align: left; color: #fff;
  border: 2px solid #e8b64a; background: linear-gradient(110deg, #2b686c, #1f4a5c 60%, #2f4d6a); box-shadow: 0 0 0 3px #f7d88a44, 0 4px 14px #1f4a5c55; font: inherit; }
.gs-starter:hover { transform: translateY(-2px); }
.gs-starter .gs-st-body { display: grid; gap: 6px; min-width: 0; }
.gs-starter .gs-st-body > b { font: 700 20px/1.2 var(--font-head, sans-serif); color: #ffe9a8; }
.gs-starter ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 13.5px; }
.gs-starter li::before { content: '✓ '; color: #ffd76a; font-weight: 800; }
.gs-starter .gs-tag { position: static; justify-self: start; }
.gs-starter .gs-st-buy .gs-price { background: linear-gradient(#f3c75c, #d99a2b); color: #4a3010; font-size: 18px; padding: 10px 16px; }
.gs-starter .gs-st-thumb { width: 110px; height: 110px; aspect-ratio: auto; }
.gs-art.starterart { width: 120px; aspect-ratio: 1; background: var(--art) center / contain no-repeat; border-radius: 0; }
.gs-art.starterart.ph::after { font-size: 56px; }
.gs-perks.sm { gap: 4px; } .gs-perks.sm li { padding: 6px 10px 6px 30px; font-size: 13px; }
.gs-perks.sm li::before { left: 9px; }
.sty-gemlink { display: block; width: 100%; margin-top: 8px; padding: 8px 10px; border-radius: 10px; border: 1px dashed #c9a24a; background: #fff8e6; color: #7a5a1a; font: 700 13px/1.2 inherit; cursor: pointer; }
.sty-gemlink:hover { background: #fff1c8; }
.gs-win.tab-hair .gs-body { padding: 0; overflow: hidden; display: flex; }
@media (max-height: 520px) and (orientation: landscape) {
  .gs-starter { grid-template-columns: 70px minmax(0, 1fr) auto; padding: 8px 12px; margin-bottom: 8px; gap: 10px; }
  .gs-starter .gs-st-body > b { font-size: 16px; } .gs-starter ul { font-size: 11.5px; gap: 1px; }
  .gs-art.starterart { width: 70px; } .gs-art.starterart.ph::after { font-size: 36px; }
  .gs-starter .gs-st-thumb { width: 74px; height: 74px; }
  .gs-starter .gs-st-buy .gs-price { font-size: 15px; padding: 7px 11px; }
  .cs-preview { padding: 6px 10px; top: -10px; } .cs-grid.gs-grid.items { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
@media (max-width: 760px) and (orientation: portrait) { .gs-starter { grid-template-columns: 74px minmax(0, 1fr); } .gs-starter .gs-st-thumb { width: 74px; height: 74px; } .gs-starter .gs-st-buy { grid-column: 1 / -1; } }
