/* ป้ายประกาศ artwork (news-banner-1026 · client/news-banner.js) — ชั้น Popup (--z-popup) · ตัวหนังสือ/ปุ่มใช้ค่ากลาง ui-scale.css
   กรอบ a = ฟอยล์ทอง ตัวหนังสือทับภาพ · b = การ์ดสะสม ขอบแสตมป์ + ตราครั่ง ตัวหนังสือใต้ภาพ (data/banners.json "frame")
   ประกายวิ่ง 2 รอบตอนเปิดแล้วหยุด (perf.md 4b ห้าม infinite/forwards) · prefers-reduced-motion = ไม่วิ่ง */
#news-banner { position: fixed; inset: 0; z-index: var(--z-popup, 300); display: grid; place-items: center;
  font-family: var(--font, sans-serif); color: #3a2a12; -webkit-user-select: none; user-select: none; touch-action: pan-y; }
#news-banner .nb-dim { position: absolute; inset: 0; background: radial-gradient(ellipse at center, #1a120a99, #0d0905d9); }
#news-banner .nb-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
  --nb-w: min(80vw, 1000px, calc((100vh - 110px) * 16 / 9)); }
html.touch-ui #news-banner .nb-stage { --nb-w: min(86vw, 1000px, calc((100vh - 64px - var(--sa-t, 0px) - var(--sa-b, 0px)) * 16 / 9)); gap: 4px; }
#news-banner .nb-card { position: relative; width: var(--nb-w); }
#news-banner .nb-slide { position: relative; }
#news-banner .nb-img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* ✕ ใหญ่ (≥ 48px) — อยู่บนมุมภาพ ไม่ล้นจอ */
#news-banner .nb-x { position: absolute; top: 10px; right: 10px; z-index: 5; width: 52px; height: 52px; border-radius: 50%;
  border: 3px solid #ead8ad; background: radial-gradient(circle at 40% 35%, #fffaf0, #f1e2bf); color: #6b4a1e;
  font: 700 var(--fs-hero, 24px)/1 var(--font-head, sans-serif); display: grid; place-items: center; box-shadow: 0 4px 14px #0006; cursor: pointer; padding: 0; }
#news-banner .nb-nav { position: absolute; top: calc(var(--nb-w) * 9 / 32); translate: 0 -50%; width: 48px; height: 64px; border: 0; border-radius: 14px;
  background: #fdf8ecd9; color: #6b4a1e; font: 700 var(--fs-hero, 24px)/1 var(--font-head, sans-serif); box-shadow: 0 3px 10px #0005; cursor: pointer; }
#news-banner .nb-prev { left: -60px; } #news-banner .nb-next { right: -60px; }
html.touch-ui #news-banner .nb-nav { display: none; }
#news-banner .nb-nav[hidden] { display: none; }
#news-banner .nb-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: var(--nb-w); gap: 12px; }
#news-banner .nb-dots { display: flex; gap: 8px; align-items: center; justify-content: center; min-height: 44px; }
#news-banner .nb-dots i { width: 10px; height: 10px; border-radius: 50%; background: #fff7; display: block; cursor: pointer; }
#news-banner .nb-dots i.on { width: 28px; border-radius: 6px; background: #e8b64a; box-shadow: 0 0 6px #e8b64a88; }
#news-banner .nb-skip { display: flex; align-items: center; gap: 8px; min-height: 44px; color: #fff3dc; font-size: var(--fs-sm, 14px); text-shadow: 0 1px 2px #0008; cursor: pointer; }
#news-banner .nb-skip input { width: 22px; height: 22px; accent-color: #e8b64a; margin: 0; }
#news-banner .nb-count { justify-self: end; color: #fff3dccc; font-size: var(--fs-xs, 12px); text-shadow: 0 1px 2px #0008; }
#news-banner .nb-go { height: var(--btn-h-main, 52px); padding: 0 26px; border-radius: 999px; border: 0; white-space: nowrap; cursor: pointer;
  font: 600 var(--fs-btn-main, 18px)/1 var(--font-head, sans-serif); }
#news-banner h2 { margin: 0; font-family: var(--font-head, sans-serif); font-weight: 600; }
#news-banner p { margin: 6px 0 0; line-height: 1.45; }

/* ── แบบ a · ฟอยล์ทองเต็มภาพ ── */
#news-banner .nb-a { border-radius: 22px; padding: 5px;
  background: linear-gradient(135deg, #fff3c8 0%, #e8b64a 18%, #a8761f 34%, #f7d77e 50%, #b9852a 68%, #ffe9a8 84%, #c48f30 100%);
  box-shadow: 0 0 0 2px #6b4a1e55, 0 20px 60px #000a, 0 0 40px #e8b64a33; }
#news-banner .nb-a .nb-slide { aspect-ratio: 16 / 9; }
#news-banner .nb-a .nb-art { position: absolute; inset: 0; border-radius: 17px; overflow: hidden; background: #2b2118; }
#news-banner .nb-a .nb-shade { position: absolute; inset: 0; box-shadow: inset 0 0 0 2px #fff4d266, inset 0 0 30px #00000055;
  background: linear-gradient(90deg, #1c130acc 0%, #1c130a88 28%, #1c130a00 54%), linear-gradient(0deg, #1c130ab0 0%, #1c130a00 36%); }
#news-banner .nb-sheen { position: absolute; inset: -5px; border-radius: 22px; overflow: hidden; pointer-events: none; }
#news-banner .nb-sheen::before { content: ''; position: absolute; top: -20%; bottom: -20%; width: 22%; left: -30%;
  background: linear-gradient(100deg, #fff0 0%, #fff6 50%, #fff0 100%); mix-blend-mode: soft-light; transform: skewX(-18deg);
  animation: nbSheen 2.4s ease-in-out .3s 2; }
@keyframes nbSheen { from { left: -30%; } to { left: 120%; } }
#news-banner .nb-ribbon { position: absolute; top: 18px; left: -8px; z-index: 3; padding: 7px 26px 7px 16px;
  font: 600 var(--fs-sm, 14px)/1 var(--font-head, sans-serif); letter-spacing: .06em; color: #fff3d0;
  background: linear-gradient(#3b8a8f, #1f4f52); border-radius: 0 8px 8px 0; box-shadow: 0 3px 8px #0006, inset 0 0 0 1.5px #e8b64a;
  clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 50%, 100% 100%, 0 100%); }   /* รอยบากกว้างคงที่ (เดิม 92% = ป้ายยาวกินตัวอักษรท้าย · cbt-x2-1108) */
#news-banner .nb-ribbon:not(.lim) { background: linear-gradient(#f3cf73, #c9922f); color: #4a300c; box-shadow: 0 3px 8px #0006, inset 0 0 0 1.5px #fff3c8; }
#news-banner .nb-ribbon span { color: #e8b64a; margin-right: 6px; }
#news-banner .nb-ribbon:not(.lim) span { color: #fff8dc; }
#news-banner .nb-txt { position: absolute; left: 5.5%; bottom: 8%; max-width: 52%; z-index: 2; color: #fff8e8; }
#news-banner .nb-when { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #00000066;
  border: 1.5px solid #e8b64a99; font-size: var(--fs-xs, 12px); color: #ffe7a8; margin-bottom: 8px; }
#news-banner .nb-a h2 { font-size: calc(var(--fs-hero, 24px) * 1.33); line-height: 1.2; text-shadow: 0 2px 6px #000a; }
#news-banner .nb-a p { font-size: var(--fs-body, 16px); color: #f6e9cf; text-shadow: 0 1px 3px #000a; }
#news-banner .nb-a .nb-go { position: absolute; right: 4.5%; bottom: 8%; z-index: 2;
  background: linear-gradient(#ffe39a, #e8b64a 55%, #c9922f); color: #4a300c; box-shadow: 0 4px 0 #8a5d1a, 0 8px 18px #0006, inset 0 1px 0 #fff8; }
html.touch-ui #news-banner .nb-a h2 { font-size: var(--fs-hero, 24px); }
html.touch-ui #news-banner .nb-a p { font-size: var(--fs-sm, 14px); }
html.touch-ui #news-banner .nb-ribbon { top: 12px; font-size: var(--fs-xs, 12px); }
html.touch-ui #news-banner .nb-txt { max-width: 56%; bottom: 7%; }

/* ── แบบ b · การ์ดสะสม ── */
#news-banner .nb-b { background: #fdf8ec; border-radius: 20px; padding: 12px 12px 0;
  box-shadow: 0 0 0 3px #ead8ad, 0 0 0 5px #fffaf0, 0 0 0 7px #c9a25a, 0 22px 60px #000a; }
html.touch-ui #news-banner .nb-stage:has(.nb-b) { --nb-w: min(86vw, 1000px, calc((100vh - 140px - var(--sa-t, 0px) - var(--sa-b, 0px)) * 16 / 9)); }
#news-banner .nb-b .nb-art { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden;
  -webkit-mask: radial-gradient(circle 5px at 50% 50%, #0000 98%, #000) -7px -7px / 14px 14px, linear-gradient(#000, #000) 7px 7px / calc(100% - 14px) calc(100% - 14px) no-repeat;
  mask: radial-gradient(circle 5px at 50% 50%, #0000 98%, #000) -7px -7px / 14px 14px, linear-gradient(#000, #000) 7px 7px / calc(100% - 14px) calc(100% - 14px) no-repeat; }
#news-banner .nb-seal { position: absolute; top: -24px; left: 24px; width: 96px; height: 96px; z-index: 4; filter: drop-shadow(0 4px 6px #0006); rotate: -8deg; }
#news-banner .nb-seal-star { animation: nbSeal 1.8s ease-in-out .4s 2; }
@keyframes nbSeal { 50% { opacity: .35; } }
#news-banner .nb-strip { display: flex; align-items: center; gap: 14px; padding: 10px 6px 12px 8px; }
#news-banner .nb-ttl { flex: 1; min-width: 0; }
#news-banner .nb-tag { font-size: var(--fs-xs, 12px); color: #2f6f73; font-weight: 700; letter-spacing: .04em; }
#news-banner .nb-b h2 { font-size: var(--fs-title, 20px); color: #4a300c; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#news-banner .nb-b p { font-size: var(--fs-sm, 14px); color: #7a6544; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
#news-banner .nb-stub { align-self: stretch; display: grid; place-items: center; padding: 0 14px; border-left: 2px dashed #d9c08a;
  font-size: var(--fs-xs, 12px); color: #a8761f; font-weight: 700; text-align: center; max-width: 150px; }
#news-banner .nb-b .nb-go { background: linear-gradient(#3e8d91, #2f6f73 55%, #1f4f52); color: #fff6dd; box-shadow: 0 4px 0 #173b3d, 0 6px 14px #0004, inset 0 1px 0 #ffffff55; }
#news-banner .nb-b .nb-x { top: 20px; right: 20px; }

@media (prefers-reduced-motion: reduce) { #news-banner .nb-sheen::before, #news-banner .nb-seal-star { animation: none; } }

/* ── แบนเนอร์บนสุดของหน้าต่าง Lyra (herald-window.js) ── */
.nb-hero { position: relative; display: block; aspect-ratio: 32 / 9; min-height: 120px; border-radius: 16px; overflow: hidden; cursor: pointer; margin: 0 0 12px; background: #2b2118; }
.nb-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.nb-hero-a { box-shadow: 0 0 0 3px #e8b64a, 0 0 0 5px #b9852a66; }
.nb-hero-b { box-shadow: 0 0 0 3px #ead8ad, 0 0 0 5px #fffaf0, 0 0 0 7px #c9a25a; margin-top: 4px; }
.nb-hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, #1c130acc, #1c130a00 62%); }
.nb-hero-t { position: absolute; left: 18px; bottom: 14px; max-width: 64%; color: #fff8e8; }
.nb-hero-t small { display: inline-block; font-size: var(--fs-xs, 12px); color: #ffe7a8; background: #0006; border: 1.5px solid #e8b64a99; border-radius: 999px; padding: 3px 10px; margin-bottom: 6px; }
.nb-hero-t b { display: block; font: 600 var(--fs-title, 20px)/1.25 var(--font-head, sans-serif); text-shadow: 0 2px 5px #000a; }
.nb-hero-rb { position: absolute; top: 12px; left: 0; padding: 5px 16px 5px 12px; font: 600 var(--fs-xs, 12px)/1 var(--font-head, sans-serif); color: #fff3d0; letter-spacing: .06em;
  background: linear-gradient(#3b8a8f, #1f4f52); border-radius: 0 6px 6px 0; box-shadow: inset 0 0 0 1.5px #e8b64a; }
.nb-hero .nb-seal { position: absolute; top: 8px; right: 10px; width: 64px; height: 64px; rotate: 8deg; }
.nb-hero-dots { position: absolute; right: 8px; bottom: 4px; display: flex; gap: 0; }
.nb-hero-dots i { width: 44px; height: 36px; display: grid; place-items: center; }
.nb-hero-dots i::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #fff8; }
.nb-hero-dots i.on::after { width: 24px; border-radius: 5px; background: #e8b64a; }

#news-banner .nb-note { display: block; margin-top: 6px; font-size: var(--fs-xs, 12px); color: #ffe7a8; text-shadow: 0 1px 3px #000a; line-height: 1.35; }
#news-banner .nb-b .nb-note { color: #a8761f; text-shadow: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.touch-ui #news-banner .nb-a .nb-note { display: none; }   /* มือถือ: ภาพเตี้ย — เงื่อนไขเต็มอยู่ในหน้าต่าง "วันนี้" › ประกาศ */

/* ── แท็บ "ประกาศ" ในหน้าต่างวันนี้ (checkin-window.js) — การ์ดภาพซ้าย ข้อความขวา ── */
.win[data-win="checkin"] .nb-list { display: flex; flex-direction: column; gap: 10px; }
.win[data-win="checkin"] .nb-item { display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 1fr); gap: 12px; align-items: start; padding: 8px; border-radius: 14px;
  background: #fffaf0; box-shadow: inset 0 0 0 2px #ead8ad; }
.win[data-win="checkin"] .nb-item.new { box-shadow: inset 0 0 0 2px #e8b64a, 0 0 10px #e8b64a55; }
.win[data-win="checkin"] .nb-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: #2b2118;
  box-shadow: 0 0 0 2px #e8b64a, 0 3px 8px #0003; }
.win[data-win="checkin"] .nb-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.win[data-win="checkin"] .nb-thumb-tag { position: absolute; left: 0; top: 8px; padding: 3px 10px 3px 8px; border-radius: 0 6px 6px 0; font: 600 var(--fs-xs, 12px)/1.2 var(--font-head, sans-serif);
  color: #4a300c; background: linear-gradient(#f3cf73, #c9922f); max-width: 92%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win[data-win="checkin"] .nb-thumb-tag.lim { color: #fff3d0; background: linear-gradient(#3b8a8f, #1f4f52); box-shadow: inset 0 0 0 1.5px #e8b64a; }
.win[data-win="checkin"] .nb-new { position: absolute; right: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; background: #e2463a; color: #fff; font: 600 var(--fs-xs, 12px)/1.4 var(--font-head, sans-serif); }
.win[data-win="checkin"] .nb-info b { display: block; font: 600 var(--fs-name, 18px)/1.25 var(--font-head, sans-serif); color: #4a3418; }
.win[data-win="checkin"] .nb-info p { margin: 4px 0 0; font-size: var(--fs-sm, 14px); line-height: 1.4; color: #6b5330; }
.win[data-win="checkin"] .nb-info small { display: block; margin-top: 4px; font-size: var(--fs-xs, 12px); color: #8a6a3a; }
.win[data-win="checkin"] .nb-conds { margin: 6px 0 0; padding-left: 18px; font-size: var(--fs-xs, 12px); line-height: 1.45; color: #6b5330; }
.win[data-win="checkin"] .nb-empty { padding: 24px; text-align: center; color: #8a6a3a; }
@container ckw (max-width: 720px) {
  .win[data-win="checkin"] .nb-item { grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 8px; padding: 6px; }
  .win[data-win="checkin"] .nb-info b { font-size: var(--fs-body, 16px); }
}
