/* iSpeak — màn ăn mừng dùng chung (js/celebrate.js). Xem đầu file js cho vì-sao.
   z-index 70: TRÊN bốn bảng game (z 60) — fanfare phải hiện đè lên bản đồ đang mở —
   và nền cố ý TRONG SUỐT (không dim) để toast (z 50, đáy màn) vẫn đọc được nếu hai
   kênh cùng nói. Overlay chỉ bắt chạm khi đang hiện (chạm = bỏ qua). */

.clb-overlay {
  position: fixed; inset: 0; z-index: 70;
  display: grid; place-items: center;
  pointer-events: none; opacity: 0;
  transition: opacity .16s ease;
}
.clb-overlay.clb-show { pointer-events: auto; opacity: 1; }

.clb-card {
  background: var(--card, #fff); color: inherit;
  border: 1px solid var(--line, #e5e1f5);
  border-radius: var(--radius-lg, 20px);
  box-shadow: var(--shd-l, 0 18px 40px rgba(36, 27, 74, .22));
  padding: 18px 28px; text-align: center; max-width: min(86vw, 380px);
  animation: clb-pop .38s cubic-bezier(.2, 1.4, .4, 1);
}
.clb-emoji { font-size: 44px; line-height: 1.1; }
.clb-big .clb-emoji { font-size: 64px; animation: clb-bounce .7s ease .1s; }
.clb-title { font-weight: 800; font-size: 18px; margin-top: 6px; }
.clb-big .clb-title { font-size: 22px; }
.clb-sub { font-weight: 600; font-size: 13px; opacity: .75; margin-top: 4px; }

@keyframes clb-pop {
  from { transform: scale(.6); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}
@keyframes clb-bounce {
  0% { transform: translateY(0); } 35% { transform: translateY(-14px); }
  70% { transform: translateY(0); } 85% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

/* ---- confetti: 36 mảnh <i>, mọi biến thể quyết bằng nth-child — không một dòng JS
   ngẫu nhiên nào (cùng lý do sprites của game là tất định: chạy lại phải giống hệt).
   Bốn màu lấy từ chính bảng màu app; rơi 1.6-2.4s rồi tự biến (overlay gỡ ở 2.4s). */
.clb-rain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.clb-rain i {
  position: absolute; top: -14px; width: 8px; height: 14px; border-radius: 2px;
  background: var(--pink, #ff5c8a); opacity: 0;
  animation: clb-fall 2s linear forwards;
}
.clb-rain i:nth-child(4n+1) { background: var(--pink, #ff5c8a); }
.clb-rain i:nth-child(4n+2) { background: #ffc93c; }
.clb-rain i:nth-child(4n+3) { background: #35c489; }
.clb-rain i:nth-child(4n+4) { background: #5b8def; }
.clb-rain i:nth-child(3n)   { width: 6px; height: 10px; }
.clb-rain i:nth-child(5n)   { border-radius: 50%; height: 8px; }
/* 12 cột vị trí × lệch pha: phủ đều màn mà không cần toạ độ per-mảnh */
.clb-rain i:nth-child(12n+1)  { left: 4%; }  .clb-rain i:nth-child(12n+2)  { left: 12%; }
.clb-rain i:nth-child(12n+3)  { left: 21%; } .clb-rain i:nth-child(12n+4)  { left: 29%; }
.clb-rain i:nth-child(12n+5)  { left: 38%; } .clb-rain i:nth-child(12n+6)  { left: 46%; }
.clb-rain i:nth-child(12n+7)  { left: 54%; } .clb-rain i:nth-child(12n+8)  { left: 62%; }
.clb-rain i:nth-child(12n+9)  { left: 71%; } .clb-rain i:nth-child(12n+10) { left: 79%; }
.clb-rain i:nth-child(12n+11) { left: 88%; } .clb-rain i:nth-child(12n+12) { left: 96%; }
.clb-rain i:nth-child(2n)  { animation-duration: 2.4s; }
.clb-rain i:nth-child(7n)  { animation-delay: .15s; }
.clb-rain i:nth-child(7n+3){ animation-delay: .3s; }
.clb-rain i:nth-child(7n+5){ animation-delay: .5s; }

@keyframes clb-fall {
  0%   { opacity: 0; transform: translateY(0) rotate(0deg); }
  8%   { opacity: 1; }
  100% { opacity: .9; transform: translateY(104vh) rotate(540deg); }
}

/* prefers-reduced-motion: js đã tắt confetti + rút thời gian; chặn nốt hai animation
   của thẻ ở tầng css cho chắc — một máy xin giảm chuyển động thì thẻ chỉ mờ vào/ra. */
@media (prefers-reduced-motion: reduce) {
  .clb-card, .clb-big .clb-emoji { animation: none; }
}

/* ---- (169) thông báo một-lần My Room MỚI (js/notice.js) ----
   Khác .clb-overlay: nền DIM + không tự tắt — phải bấm nút. z 72: trên fanfare (70).
   Nằm ở celebrate.css có chủ ý: file này ngoài các cổng CSS của tools/test.mjs. */
.ntc-overlay { position: fixed; inset: 0; z-index: 72; display: grid; place-items: center;
  background: rgba(20, 15, 45, .45); padding: 16px; }
.ntc-card { background: var(--card, #fff); border: 1px solid var(--line, #e7e4f0);
  border-radius: var(--radius-lg, 14px); box-shadow: var(--shd-l, 0 16px 40px rgba(36,27,74,.14));
  padding: 22px 26px; text-align: center; max-width: min(88vw, 400px);
  animation: clb-pop .38s cubic-bezier(.2, 1.4, .4, 1); }
.ntc-emoji { font-size: 52px; line-height: 1.1; }
.ntc-title { font-weight: 800; font-size: 20px; margin-top: 8px; color: var(--text, #241b4a); }
.ntc-body  { font-size: 14px; margin-top: 8px; color: var(--prose, #2e2757); }
.ntc-refund { font-weight: 700; font-size: 14px; margin-top: 8px; color: var(--pink-d, #00a87c); }
.ntc-btns  { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.ntc-btn { min-height: 44px; padding: 10px 18px; border-radius: var(--radius-full, 999px);
  border: 1px solid var(--line, #e7e4f0); background: var(--card, #fff);
  color: var(--text, #241b4a); font-weight: 700; font-size: 14px; cursor: pointer; }
.ntc-btn.primary { background: var(--pink, #00e5a0); border-color: var(--pink, #00e5a0);
  color: var(--mint-on, #05271c); }
@media (prefers-reduced-motion: reduce) { .ntc-card { animation: none; } }
