/* จุดแจ้งเตือนชุดเดียวทั้งเกม (badges.js · 7 ต.ค. · design-briefs/59-badges)
 * หน้าตาเดียวทุกที่: วงแดง #e8503a ≥ 12px ขอบครีม #fff2d8 มุมขวาบนของปุ่ม/แท็บ · มีเลขเมื่อ > 1 · อ่านออกบนหญ้า ทราย กรอบครีม
 * ☰/⋯ (พ่อ) → ปุ่มในเมนู → หมวด/แท็บในหน้าต่าง → รายการ (ป้าย "ใหม่/NEW")
 * ⚠️ ไม่มี animation infinite/forwards (กฎ 4b) · ไม่ตั้ง z-index เกินตาราง --z-* · ตัวเลือก :has() ไม่ใช้ */

:root { --bdg-red: #e8503a; --bdg-rim: #fff2d8; }

/* ── ปุ่มเมนู (ทั้งคอมและจอสัมผัส) + ปุ่มในแถบหลัก + ⋯ ── */
html body #menu > button.attn::after,
html body #hud #sysbar button.attn::after {
  content: ''; position: absolute; top: 2px; right: 2px; z-index: 1; box-sizing: border-box;
  width: auto; min-width: 13px; height: 13px; padding: 0; border-radius: 999px;
  background: var(--bdg-red); box-shadow: 0 0 0 2px var(--bdg-rim), 0 1px 3px #0005;
  font: 800 10px/13px var(--font, sans-serif); color: #fff; text-align: center; pointer-events: none;
}
html body #menu > button.attn[data-badge]::after { content: attr(data-badge); width: auto; padding: 0 3px; min-width: 17px; height: 17px; line-height: 17px; font-size: 11px; top: 1px; right: 1px; }
/* จอสัมผัส: เดิมเป็นแค่ขอบสีเหลือง (style.css .attn) แยกไม่ออกว่าปุ่มไหน — จุดแดงใหญ่ขึ้นนิ้วอ่านได้ */
html.touch-ui body #menu > button.attn::after { min-width: 15px; height: 15px; line-height: 15px; top: 3px; right: 3px; }
html.touch-ui body #menu > button.attn[data-badge]::after { min-width: 19px; height: 19px; line-height: 19px; font-size: 12px; }

/* ☰ ปุ่มกลม (จอสัมผัส): จุดเดิม 9px → 13px ขอบครีม */
html.touch-ui body #fabs button i { width: 13px; height: 13px; top: 0; right: 0; border: 0; box-shadow: 0 0 0 2px var(--bdg-rim), 0 1px 3px #0005; background: var(--bdg-red); }

/* ── ในหน้าต่าง: จุดบนหมวด/ตัวกรอง/แท็บ (dotHtml) ── */
.bdg-dot {
  display: inline-block; box-sizing: border-box; min-width: 12px; height: 12px; margin-left: 5px; vertical-align: 1px; flex: none;
  border-radius: 999px; background: var(--bdg-red); box-shadow: 0 0 0 2px var(--bdg-rim);
  font: 800 10px/12px var(--font, sans-serif); font-style: normal; color: #fff; text-align: center;
}
.bdg-dot:not(:empty) { min-width: 16px; height: 16px; line-height: 16px; padding: 0 3px; }
.cx-nav button { position: relative; }
.cx-nav button > .bdg-dot { margin-left: auto; }
.cx-mtabs button > .bdg-dot { position: absolute; top: -4px; right: -4px; margin: 0; }

/* รายการ: ป้าย "ใหม่/NEW" (การ์ดมอนที่มีชิ้นความทรงจำใหม่ยังไม่ได้ดู) */
.bdg-new {
  display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 6px; vertical-align: 1px;
  background: var(--bdg-red); color: #fff; font: 800 10px/15px var(--font, sans-serif); font-style: normal; letter-spacing: .02em;
  box-shadow: 0 0 0 1.5px var(--bdg-rim);
}

/* หน้าต่างสกิล/สถานะ: ปุ่ม ▲ / + ที่กดได้ตอนมีแต้ม = ที่ที่จุดแดงหมายถึง */
.win[data-win="skills"] .sk-row[data-state="ready"] .rbtn.up:not(:disabled),
.st-row .up:not(:disabled) { position: relative; }
.win[data-win="skills"] .sk-row[data-state="ready"] .rbtn.up:not(:disabled)::after,
.st-row .up:not(:disabled)::after {
  content: ''; position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--bdg-red); box-shadow: 0 0 0 2px var(--bdg-rim); pointer-events: none;
}
/* ── ป้ายได้ชิ้นความทรงจำ #mem-new = ป้ายแจ้งมาตรฐาน notify.js (ui-notify.css · popup-std-1022) ── */

/* ── ชี้ทางครั้งแรก #mem-tip (ชั้นบทสอน) ── */
#mem-tip, #mem-tip-ring { position: fixed; left: 0; top: 0; z-index: var(--z-tut, 400); }
#mem-tip[hidden], #mem-tip-ring[hidden] { display: none; }
#mem-tip {
  width: min(350px, 80vw); display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px 10px 6px; pointer-events: auto;
  border-radius: 14px; border: 2px solid #e8b64a; background: #fffaf0; color: #4a3210; box-shadow: 0 6px 18px #0005;
}
#mem-tip::before {           /* หัวลูกศรชี้ปุ่ม (--ax = ตำแหน่งแนวนอนของปุ่ม) */
  content: ''; position: absolute; left: calc(var(--ax, 50%) - 9px); bottom: -10px; width: 16px; height: 16px; rotate: 45deg;
  background: #fffaf0; border-right: 2px solid #e8b64a; border-bottom: 2px solid #e8b64a;
}
#mem-tip.below::before { bottom: auto; top: -10px; border: 0; border-left: 2px solid #e8b64a; border-top: 2px solid #e8b64a; }
#mem-tip .mt-guide { width: 64px; height: 64px; flex: none; object-fit: contain; }
#mem-tip .mt-body { display: grid; gap: 4px; min-width: 0; }
#mem-tip .mt-body b { font: 700 14px/1.3 var(--font-head, var(--font)); }
#mem-tip .mt-line { font: 700 13px/1.3 var(--font); color: #2f6f73; }
#mem-tip .mt-acts { display: flex; gap: 6px; margin-top: 2px; }
#mem-tip .mt-acts button { min-height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid #c4a064; background: linear-gradient(#fffbef, #ead9b5); color: #5a4218; font: 700 13px var(--font); cursor: pointer; }
#mem-tip .mt-acts .mt-go { background: linear-gradient(#e8c578, #c4903a); color: #3a2a0c; border-color: #a87a2c; }
#mem-tip-ring { pointer-events: none; border-radius: 14px; box-sizing: border-box; border: 3px solid #e8b64a; box-shadow: 0 0 0 3px #fff2d8, 0 0 16px #e8b64a; }
html.touch-ui #mem-tip-ring { border-radius: 50%; }
html.touch-ui.menu-open #mem-tip-ring { border-radius: 14px; }
